// File: ssubrandon[P]460Project2/SyntacticalAnalyzer.cpp
// Function: SyntacticalAnalyzer::more_tokens()
int SyntacticalAnalyzer::more_tokens(){
  //This function deals with the more-tokens rules (14-15) and will check for syntactical correctness,
  //this function will then, depending on the token seen, send the program to anyother tokens, more tokens,
  // or will return.
	ruleFile << "Entering more_tokens function; Current token is: " << lex ->GetTokenName(token) << ", lexeme: " << lex->GetLexeme() << endl;
  
	int errors = 0;
	
	if (token == EOF_T){
	  errors++;
	  ruleFile << "more_tokens function complete. Current token is: " << lex->GetTokenName(token) << endl;
	  return errors;  
	}
	
	if (token == RPAREN_T) {
		ruleFile << "Using Rule 15" << endl;
		ruleFile << "Exiting more_tokens function; current token is: " << lex ->GetTokenName (token) << endl;
		return errors;
	}
	ruleFile << "Using Rule 14" << endl;
	errors += any_other_token();
	errors += more_tokens();
	ruleFile << "Exiting more_tokens function; current token is: " << lex ->GetTokenName (token) << endl;

	return errors;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
addq $0x420, %rdi            # imm = 0x420
leaq 0x3681(%rip), %rsi      # 0x109e9
callq 0x3270
movq %rax, %rcx
movq -0xe8(%rbp), %rax
movq %rcx, -0xe0(%rbp)
movq 0x8(%rax), %rsi
movl 0x10(%rax), %edx
leaq -0x30(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x6f40
movq -0xe0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
callq 0x3240
movq %rax, -0xd0(%rbp)
jmp 0xd3b1
movq -0xd0(%rbp), %rdi
leaq 0x3095(%rip), %rsi      # 0x10454
callq 0x3270
movq %rax, -0xf0(%rbp)
jmp 0xd3cd
movq -0xe8(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x60(%rbp), %rdi
callq 0x6f80
jmp 0xd3e3
movq -0xf0(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x3240
movq %rax, -0xf8(%rbp)
jmp 0xd3fc
movq -0xf8(%rbp), %rdi
movq 0x7bb6(%rip), %rsi      # 0x14fc0
callq 0x32c0
jmp 0xd411
leaq -0x60(%rbp), %rdi
callq 0x34b8
leaq -0x30(%rbp), %rdi
callq 0x34b8
movq -0xe8(%rbp), %rax
movl $0x0, -0x64(%rbp)
cmpl $0x23, 0x10(%rax)
jne 0xd51e
movq -0xe8(%rbp), %rdi
movl -0x64(%rbp), %eax
incl %eax
movl %eax, -0x64(%rbp)
addq $0x420, %rdi            # imm = 0x420
leaq 0x35c3(%rip), %rsi      # 0x10a1b
callq 0x3270
movq %rax, %rcx
movq -0xe8(%rbp), %rax
movq %rcx, -0x110(%rbp)
movq 0x8(%rax), %rsi
movl 0x10(%rax), %edx
leaq -0x88(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x6f40
movq -0x110(%rbp), %rdi
movq -0x108(%rbp), %rsi
callq 0x3240
movq %rax, -0x100(%rbp)
jmp 0xd4a4
movq -0x100(%rbp), %rdi
movq 0x7b0e(%rip), %rsi      # 0x14fc0
callq 0x32c0
jmp 0xd4b9
leaq -0x88(%rbp), %rdi
callq 0x34b8
movl -0x64(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xd6fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xd4f3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x34b8
leaq -0x30(%rbp), %rdi
callq 0x34b8
jmp 0xd707
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x34b8
jmp 0xd707
movq -0xe8(%rbp), %rax
cmpl $0x20, 0x10(%rax)
jne 0xd602
movq -0xe8(%rbp), %rdi
addq $0x420, %rdi            # imm = 0x420
movq %rdi, -0x130(%rbp)
leaq 0x3502(%rip), %rsi      # 0x10a4d
callq 0x3270
movq %rax, %rdi
movq 0x7a66(%rip), %rsi      # 0x14fc0
callq 0x32c0
movq -0x130(%rbp), %rdi
leaq 0x34ee(%rip), %rsi      # 0x10a5b
callq 0x3270
movq %rax, %rcx
movq -0xe8(%rbp), %rax
movq %rcx, -0x128(%rbp)
movq 0x8(%rax), %rsi
movl 0x10(%rax), %edx
leaq -0xa8(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x6f40
movq -0x128(%rbp), %rdi
movq -0x120(%rbp), %rsi
callq 0x3240
movq %rax, -0x118(%rbp)
jmp 0xd5b9
movq -0x118(%rbp), %rdi
movq 0x79f9(%rip), %rsi      # 0x14fc0
callq 0x32c0
jmp 0xd5ce
leaq -0xa8(%rbp), %rdi
callq 0x34b8
movl -0x64(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xd6fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x34b8
jmp 0xd707
movq -0xe8(%rbp), %rdi
addq $0x420, %rdi            # imm = 0x420
movq %rdi, -0x150(%rbp)
leaq 0x346e(%rip), %rsi      # 0x10a8c
callq 0x3270
movq %rax, %rdi
movq 0x7993(%rip), %rsi      # 0x14fc0
callq 0x32c0
movq -0xe8(%rbp), %rdi
callq 0xd710
movq -0xe8(%rbp), %rdi
movl %eax, %ecx
movl -0x64(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x64(%rbp)
callq 0xd340
movq -0x150(%rbp), %rdi
movl %eax, %ecx
movl -0x64(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x64(%rbp)
leaq 0x33ef(%rip), %rsi      # 0x10a5b
callq 0x3270
movq %rax, %rcx
movq -0xe8(%rbp), %rax
movq %rcx, -0x148(%rbp)
movq 0x8(%rax), %rsi
movl 0x10(%rax), %edx
leaq -0xc8(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x6f40
movq -0x148(%rbp), %rdi
movq -0x140(%rbp), %rsi
callq 0x3240
movq %rax, -0x138(%rbp)
jmp 0xd6b8
movq -0x138(%rbp), %rdi
movq 0x78fa(%rip), %rsi      # 0x14fc0
callq 0x32c0
jmp 0xd6cd
leaq -0xc8(%rbp), %rdi
callq 0x34b8
movl -0x64(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xd6fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x34b8
jmp 0xd707
movl -0x4(%rbp), %eax
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x3430