// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x68, %rsp
leaq -0x68(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movq %rdi, %rbx
movb $0x0, (%rax)
leaq 0x420(%rdi), %r14
leaq 0x2a5f(%rip), %rsi      # 0x9485
movq %r14, %rdi
callq 0x21f0
movq %rax, %r15
movq 0x8(%rbx), %rsi
movl 0x10(%rbx), %edx
leaq -0x38(%rbp), %rdi
callq 0x3df8
leaq -0x38(%rbp), %rsi
movq %r15, %rdi
callq 0x21d0
leaq 0x1e9c(%rip), %rsi      # 0x88f0
movq %rax, %rdi
callq 0x21f0
movq %rax, %r15
movq 0x8(%rbx), %rsi
leaq -0x58(%rbp), %rdi
callq 0x3e22
leaq -0x58(%rbp), %rsi
movq %r15, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x2130
leaq -0x58(%rbp), %rdi
callq 0x2398
leaq -0x38(%rbp), %rdi
callq 0x2398
movl 0x10(%rbx), %edx
leal -0x1(%rdx), %eax
cmpl $0x20, %eax
ja 0x6cac
leaq 0x1d68(%rip), %rcx      # 0x8810
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2a45(%rip), %rsi      # 0x94fd
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x2b63(%rip), %rsi      # 0x9638
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x2b0a(%rip), %rsi      # 0x95fc
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x2aa2(%rip), %rsi      # 0x95b1
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x2b2a(%rip), %rsi      # 0x9656
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x2ad1(%rip), %rsi      # 0x961a
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x2a1e(%rip), %rsi      # 0x9584
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x2b00(%rip), %rsi      # 0x9683
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x2a6b(%rip), %rsi      # 0x960b
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x29e5(%rip), %rsi      # 0x95a2
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x2a6d(%rip), %rsi      # 0x9647
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x2924(%rip), %rsi      # 0x951b
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x2a7e(%rip), %rsi      # 0x9692
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x2a70(%rip), %rsi      # 0x96a1
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
movl %eax, 0x10(%rbx)
movq %rbx, %rdi
callq 0x69f8
movl %eax, %r15d
jmp 0x6ece
leaq 0x2a54(%rip), %rsi      # 0x96b0
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x291a(%rip), %rsi      # 0x9593
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x2993(%rip), %rsi      # 0x9629
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
movq 0x8(%rbx), %rsi
leaq -0x58(%rbp), %rdi
callq 0x3df8
leaq 0x2a0e(%rip), %rsi      # 0x96ce
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rdx
callq 0x76ba
leaq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0x48e6
leaq -0x38(%rbp), %rdi
callq 0x2398
leaq -0x58(%rbp), %rdi
callq 0x2398
movq 0x8(%rbx), %rdi
callq 0x35fa
movl %eax, 0x10(%rbx)
pushq $0x1
popq %r15
jmp 0x6ece
leaq 0x2805(%rip), %rsi      # 0x950c
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x2824(%rip), %rsi      # 0x9548
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x2816(%rip), %rsi      # 0x9557
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x2862(%rip), %rsi      # 0x95c0
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x2854(%rip), %rsi      # 0x95cf
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x2723(%rip), %rsi      # 0x94bb
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
movl %eax, 0x10(%rbx)
movq %rbx, %rdi
callq 0x6806
movl %eax, %r15d
movl 0x10(%rbx), %edx
cmpl $0x20, %edx
jne 0x6f24
movq 0x8(%rbx), %rdi
callq 0x35fa
movl %eax, 0x10(%rbx)
jmp 0x6ece
leaq 0x274f(%rip), %rsi      # 0x952a
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x2741(%rip), %rsi      # 0x9539
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x2760(%rip), %rsi      # 0x9575
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x2734(%rip), %rsi      # 0x9566
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x279e(%rip), %rsi      # 0x95ed
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x2775(%rip), %rsi      # 0x95de
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x283c(%rip), %rsi      # 0x96bf
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x27d7(%rip), %rsi      # 0x9674
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
jmp 0x6ec8
leaq 0x27ae(%rip), %rsi      # 0x9665
movq %r14, %rdi
callq 0x21f0
movq 0x8(%rbx), %rdi
callq 0x35fa
movl %eax, 0x10(%rbx)
xorl %r15d, %r15d
leaq 0x2837(%rip), %rsi      # 0x970c
movq %r14, %rdi
callq 0x21f0
movq %rax, %r14
movq 0x8(%rbx), %rsi
movl 0x10(%rbx), %edx
leaq -0x38(%rbp), %rdi
callq 0x3df8
leaq -0x38(%rbp), %rsi
movq %r14, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x2130
leaq -0x38(%rbp), %rdi
callq 0x2398
leaq -0x78(%rbp), %rdi
callq 0x2398
movl %r15d, %eax
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rbx), %rsi
leaq -0x58(%rbp), %rdi
callq 0x3df8
leaq 0x2593(%rip), %rsi      # 0x94cb
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rdx
callq 0x76ba
leaq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0x48e6
incl %r15d
leaq -0x38(%rbp), %rdi
callq 0x2398
leaq -0x58(%rbp), %rdi
callq 0x2398
jmp 0x6ece
jmp 0x6f71
jmp 0x6f7f
jmp 0x6fae
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x2398
jmp 0x6f82
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
jmp 0x6fa7
jmp 0x6fae
jmp 0x6fae
jmp 0x6fa0
jmp 0x6fae
jmp 0x6fa0
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x2398
jmp 0x6fa3
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x2398
jmp 0x6fb1
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x2398
movq %rbx, %rdi
callq 0x2330