// File: /workspace/github_cpp_makefile_star2_O1/ssubrandon[P]460Project2/SyntacticalAnalyzer.cpp
// Function: SyntacticalAnalyzer::any_other_token()
int SyntacticalAnalyzer::any_other_token(){
   //This function deals with the stmt_pair_body rules (22-23) and will check for syntactical correctness,
  //this function will then, depending on the token seen, send the program tomre, tokens, any_other_tokens, or return. 
  int errors = 0;
	string error_type;
	ruleFile << "Entering any_other_token function; Current token is: " << lex ->GetTokenName(token) << ", lexeme: " << lex->GetLexeme() << endl;

	switch(token){
		case LPAREN_T:
			ruleFile << "Using Rule 50:\n";
			token = lex->GetToken();
			errors += more_tokens();
			if(token != RPAREN_T){
				errors++;
				ReportError(string("Expected RPARENT_T in any_other_token, but found " + lex->GetTokenName(token)));
			}
			else token = lex->GetToken();
      break;
		case IDENT_T:
			ruleFile << "Using Rule 51\n";
			token = lex->GetToken();
			break;
		case NUMLIT_T:
			ruleFile << "Using Rule 52\n";
			token = lex->GetToken();
			break;
		case STRLIT_T:
			ruleFile << "Using Rule 53\n";
			token = lex->GetToken();
			break;
		case CONS_T:
			ruleFile << "Using Rule 54\n";
			token = lex->GetToken();
			break;
		case IF_T:
			ruleFile << "Using Rule 55\n";
			token = lex->GetToken();
			break;
		case DISPLAY_T:
			ruleFile << "Using Rule 56\n";
			token = lex->GetToken();
			break;
		case NEWLINE_T:
			ruleFile << "Using Rule 57\n";
			token = lex->GetToken();
			break;
		case LISTOP_T:
			ruleFile << "Using Rule 58\n";
			token = lex->GetToken();
			break;
		case AND_T:
			ruleFile << "Using Rule 59\n";
			token = lex->GetToken();
			break;
		case OR_T:
			ruleFile << "Using Rule 60\n";
			token = lex->GetToken();
			break;
		case NOT_T:
			ruleFile << "Using Rule 61\n";
			token = lex->GetToken();
			break;
		case DEFINE_T:
			ruleFile << "Using Rule 62\n";
			token = lex->GetToken();
			break;
		case NUMBERP_T:
			ruleFile << "Using Rule 63\n";
			token = lex->GetToken();
			break;
		case LISTP_T:
			ruleFile << "Using Rule 64\n";
			token = lex->GetToken();
			break;
		case ZEROP_T:
			ruleFile << "Using Rule 65\n";
			token = lex->GetToken();
			break;
		case NULLP_T:
			ruleFile << "Using Rule 66\n";
			token = lex->GetToken();
			break;
		case STRINGP_T:
			ruleFile << "Using Rule 67\n";
			token = lex->GetToken();
			break;
		case PLUS_T:
			ruleFile << "Using Rule 68\n";
			token = lex->GetToken();
			break;
		case MINUS_T:
			ruleFile << "Using Rule 69\n";
			token = lex->GetToken();
			break;
		case DIV_T:
			ruleFile << "Using Rule 70\n";
			token = lex->GetToken();
			break;
		case MULT_T:
			ruleFile << "Using Rule 71\n";
			token = lex->GetToken();
			break;
		case MODULO_T:
			ruleFile << "Using Rule 72\n";
			token = lex->GetToken();
			break;
		case ROUND_T:
			ruleFile << "Using Rule 73\n";
			token = lex->GetToken();
			break;
		case EQUALTO_T:
			ruleFile << "Using Rule 74\n";
			token = lex->GetToken();
			break;
		case GT_T:
			ruleFile << "Using Rule 75\n";
			token = lex->GetToken();
			break;
		case LT_T:
			ruleFile << "Using Rule 76\n";
			token = lex->GetToken();
			break;
		case GTE_T:
			ruleFile << "Using Rule 77\n";
			token = lex->GetToken();
			break;
		case LTE_T:
			ruleFile << "Using Rule 78\n";
			token = lex->GetToken();
			break;
		case SQUOTE_T:
			ruleFile << "Using Rule 79\n";
			token = lex->GetToken();
			errors += any_other_token();
			break;
		case COND_T:
			ruleFile << "Using Rule 80\n";
			token = lex->GetToken();
			break;
		case ELSE_T:
			ruleFile << "Using Rule 81\n";
			token = lex->GetToken();
			break;
		default:
			//no rule found
			errors++;
			ReportError(string("No rule found in any_other_token function, current token is: " + lex->GetTokenName(token)));
			token = lex->GetToken();
	}

	//if the current token at this point is not apart of the follows then that is an error?
	ruleFile << "Exiting any_other_token function; current token is: " << lex->GetTokenName(token) << endl;
	return errors;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r14
leaq -0x78(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x420(%rdi), %rbx
leaq 0x3128(%rip), %rsi      # 0xc42d
movl $0x35, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rsi
movl 0x10(%r14), %edx
leaq -0x48(%rbp), %rdi
callq 0x4a1c
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %rbx, %rdi
callq 0x2260
movq %rax, %r15
leaq 0x255b(%rip), %rsi      # 0xb898
movl $0xa, %edx
movq %rax, %rdi
callq 0x2260
movq 0x8(%r14), %rsi
leaq -0x68(%rbp), %rdi
callq 0x4a56
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq %r15, %rdi
callq 0x2260
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
leaq -0x58(%rbp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x93ab
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0x38(%rbp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x93c4
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
movl 0x10(%r14), %edx
leal -0x1(%rdx), %eax
cmpl $0x20, %eax
ja 0x9635
leaq 0x23dd(%rip), %rcx      # 0xb7b8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x30ba(%rip), %rsi      # 0xc4a5
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x31d3(%rip), %rsi      # 0xc5e0
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x3175(%rip), %rsi      # 0xc5a4
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x3108(%rip), %rsi      # 0xc559
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x318b(%rip), %rsi      # 0xc5fe
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x312d(%rip), %rsi      # 0xc5c2
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x3075(%rip), %rsi      # 0xc52c
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x3152(%rip), %rsi      # 0xc62b
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x30b8(%rip), %rsi      # 0xc5b3
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x302d(%rip), %rsi      # 0xc54a
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x30b0(%rip), %rsi      # 0xc5ef
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x2f62(%rip), %rsi      # 0xc4c3
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x30b7(%rip), %rsi      # 0xc63a
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x30a4(%rip), %rsi      # 0xc649
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
movl %eax, 0x10(%r14)
movq %r14, %rdi
callq 0x92d0
movl %eax, %r15d
jmp 0x98a0
leaq 0x3082(%rip), %rsi      # 0xc658
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x2f43(%rip), %rsi      # 0xc53b
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x2fb7(%rip), %rsi      # 0xc5d1
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
movq 0x8(%r14), %rsi
leaq -0x68(%rbp), %rdi
callq 0x4a1c
leaq 0x302d(%rip), %rcx      # 0xc676
leaq -0x68(%rbp), %rdi
movl $0x3d, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x2240
movq %r13, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x99a1
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x99a9
leaq 0x2e2a(%rip), %rsi      # 0xc4b4
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x2e44(%rip), %rsi      # 0xc4f0
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x2e31(%rip), %rsi      # 0xc4ff
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x2e78(%rip), %rsi      # 0xc568
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x2e65(%rip), %rsi      # 0xc577
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x2d2f(%rip), %rsi      # 0xc463
movl $0xf, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
movl %eax, 0x10(%r14)
movq %r14, %rdi
callq 0x8f64
movl %eax, %r15d
movl 0x10(%r14), %edx
cmpl $0x20, %edx
jne 0x9942
movq 0x8(%r14), %rdi
callq 0x3e8e
movl %eax, 0x10(%r14)
jmp 0x98a0
leaq 0x2d53(%rip), %rsi      # 0xc4d2
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x2d40(%rip), %rsi      # 0xc4e1
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x2d5a(%rip), %rsi      # 0xc51d
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x2d29(%rip), %rsi      # 0xc50e
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x2d8e(%rip), %rsi      # 0xc595
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x2d60(%rip), %rsi      # 0xc586
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x2e22(%rip), %rsi      # 0xc667
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x2db8(%rip), %rsi      # 0xc61c
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
jmp 0x9899
leaq 0x2d8a(%rip), %rsi      # 0xc60d
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rdi
callq 0x3e8e
movl %eax, 0x10(%r14)
xorl %r15d, %r15d
leaq 0x2e0d(%rip), %rsi      # 0xc6b4
movl $0x34, %edx
movq %rbx, %rdi
callq 0x2260
movq 0x8(%r14), %rsi
movl 0x10(%r14), %edx
leaq -0x48(%rbp), %rdi
callq 0x4a1c
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %rbx, %rdi
callq 0x2260
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x9914
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x9930
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2210
movl %r15d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r14), %rsi
leaq -0x68(%rbp), %rdi
callq 0x4a1c
leaq 0x2b1d(%rip), %rsi      # 0xc473
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rdx
callq 0xa6b8
leaq -0x48(%rbp), %rsi
movq %r14, %rdi
callq 0x5778
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x9984
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x9999
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
incl %r15d
jmp 0x98a0
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq -0x48(%rbp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rdi
callq 0x5778
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x99e1
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x99f6
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
movq 0x8(%r14), %rdi
callq 0x3e8e
movl %eax, 0x10(%r14)
movl $0x1, %r15d
jmp 0x98a0
jmp 0x9a14
jmp 0x9a2e
jmp 0x9a92
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x9a31
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0x9a31
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x9a95
movq -0x58(%rbp), %rsi
jmp 0x9a88
jmp 0x9a92
jmp 0x9a92
jmp 0x9a48
jmp 0x9a92
movq %rax, %rbx
jmp 0x9a77
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
jne 0x9a84
jmp 0x9a95
movq %rax, %rbx
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9a77
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9a95
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0x9a95
movq %rax, %rbx
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x9ab1
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2340
nop