// File: /workspace/github_cpp_makefile_star2_O2/ssubrandon[P]460Project2/LexicalAnalyzer.cpp
// Function: LexicalAnalyzer::LexicalAnalyzer(char*)
LexicalAnalyzer::LexicalAnalyzer (char * filename)
{
	cout << "Input file: " << filename << endl;
	string name = filename;
	string extension;
	if (name.length() > 3)
		extension = name.substr (name.length()-3, 3);
	if (extension != ".ss")
	{
		cout << "Invalid file extension; must be '.ss'\n";
		exit (1);
	}
	input.open (filename);
	if (input.fail())
	{
		cout << "File " << filename << " not found\n";
		exit (2);
	}
	string p1name = name.substr (0, name.length()-3) + ".p1"; 
	p1file.open (p1name.c_str());
	string listingname = name.substr (0, name.length()-3) + ".Zlst"; 
	listing.open (listingname.c_str());
	listing << "Input file: " << filename << endl;
	string debugname = name.substr (0, name.length()-3) + ".dbg"; 
	debug.open (debugname.c_str());
	debug << "Input file: " << filename << endl;
	line = " ";
	linenum = 0;
	pos = 0;
	lexeme = "";
	errors = 0;

	symbols.insert (pair<string,token_type> ("cons", CONS_T));
	symbols.insert (pair<string,token_type> ("if", IF_T));
	symbols.insert (pair<string,token_type> ("cond", COND_T));
	symbols.insert (pair<string,token_type> ("display", DISPLAY_T));
	symbols.insert (pair<string,token_type> ("newline", NEWLINE_T));
	symbols.insert (pair<string,token_type> ("and", AND_T));
	symbols.insert (pair<string,token_type> ("or", OR_T));
	symbols.insert (pair<string,token_type> ("not", NOT_T));
	symbols.insert (pair<string,token_type> ("define", DEFINE_T));
	symbols.insert (pair<string,token_type> ("number?", NUMBERP_T));
	symbols.insert (pair<string,token_type> ("list?", LISTP_T));
	symbols.insert (pair<string,token_type> ("zero?", ZEROP_T));
	symbols.insert (pair<string,token_type> ("null?", NULLP_T));
	symbols.insert (pair<string,token_type> ("string?", STRINGP_T));
	symbols.insert (pair<string,token_type> ("modulo", MODULO_T));
	symbols.insert (pair<string,token_type> ("round", ROUND_T));
	symbols.insert (pair<string,token_type> ("else", ELSE_T));
	symbols.insert (pair<string,token_type> ("+", PLUS_T));
	symbols.insert (pair<string,token_type> ("-", MINUS_T));
	symbols.insert (pair<string,token_type> ("/", DIV_T));
	symbols.insert (pair<string,token_type> ("*", MULT_T));
	symbols.insert (pair<string,token_type> ("=", EQUALTO_T));
	symbols.insert (pair<string,token_type> (">", GT_T));
	symbols.insert (pair<string,token_type> ("<", LT_T));
	symbols.insert (pair<string,token_type> (">=", GTE_T));
	symbols.insert (pair<string,token_type> ("<=", LTE_T));
	symbols.insert (pair<string,token_type> ("(", LPAREN_T));
	symbols.insert (pair<string,token_type> (")", RPAREN_T));
	symbols.insert (pair<string,token_type> ("'", SQUOTE_T));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rsi, %r12
movq %rdi, %rbx
callq 0x2310
leaq 0x200(%rbx), %r14
movq %r14, %rdi
callq 0x2310
leaq 0x400(%rbx), %r15
movq %r15, %rdi
callq 0x2240
leaq 0x608(%rbx), %rdi
movq %rdi, -0x78(%rbp)
callq 0x2310
leaq 0x818(%rbx), %rax
movq %rax, 0x808(%rbx)
andq $0x0, 0x810(%rbx)
xorl %eax, %eax
movb %al, 0x818(%rbx)
leaq 0x840(%rbx), %rcx
movq %rcx, 0x830(%rbx)
andq $0x0, 0x838(%rbx)
leaq 0x808(%rbx), %rcx
movq %rcx, -0x70(%rbp)
leaq 0x830(%rbx), %rcx
movq %rcx, -0x68(%rbp)
movb %al, 0x840(%rbx)
leaq 0x858(%rbx), %r13
leaq 0x860(%rbx), %rax
andl $0x0, 0x860(%rbx)
andq $0x0, 0x868(%rbx)
movq %rax, 0x870(%rbx)
movq %rax, 0x878(%rbx)
andq $0x0, 0x880(%rbx)
movq 0x94c9(%rip), %rdi      # 0xbfd8
leaq 0x5ae8(%rip), %rsi      # 0x85fe
callq 0x21f0
movq %rax, %rdi
movq %r12, %rsi
callq 0x21f0
movq %rax, %rdi
callq 0x2130
leaq -0x98(%rbp), %rdi
leaq -0x60(%rbp), %rdx
movq %r12, %rsi
callq 0x3e7a
leaq -0xa8(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq -0x90(%rbp), %rdx
cmpq $0x4, %rdx
jb 0x2b9b
movq %r14, -0x30(%rbp)
addq $-0x3, %rdx
leaq -0x60(%rbp), %rdi
leaq -0x98(%rbp), %rsi
pushq $0x3
popq %rcx
callq 0x2220
leaq -0xb8(%rbp), %rdi
leaq -0x60(%rbp), %r14
movq %r14, %rsi
callq 0x2270
movq %r14, %rdi
callq 0x2398
movq -0x30(%rbp), %r14
leaq 0x5a69(%rip), %rsi      # 0x860b
leaq -0xb8(%rbp), %rdi
callq 0x3eb5
testb %al, %al
jne 0x32d0
pushq $0x8
popq %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x2150
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r15,%rax)
jne 0x32eb
leaq -0x98(%rbp), %rsi
movq 0x8(%rsi), %rcx
addq $-0x3, %rcx
leaq -0x60(%rbp), %rdi
xorl %edx, %edx
callq 0x2220
leaq 0x5a50(%rip), %rdx      # 0x8648
leaq -0x118(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x3ec2
leaq -0x60(%rbp), %rdi
callq 0x2398
movq -0x118(%rbp), %rsi
pushq $0x10
popq %rdx
movq -0x78(%rbp), %rdi
callq 0x2050
leaq -0x98(%rbp), %rsi
movq 0x8(%rsi), %rcx
addq $-0x3, %rcx
leaq -0x60(%rbp), %rdi
xorl %edx, %edx
callq 0x2220
leaq 0x5a07(%rip), %rdx      # 0x864c
leaq -0xf8(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x3ec2
leaq -0x60(%rbp), %rdi
callq 0x2398
movq -0xf8(%rbp), %rsi
pushq $0x10
popq %rdx
movq %r14, %rdi
callq 0x2050
leaq 0x5987(%rip), %rsi      # 0x85fe
movq %r14, %rdi
callq 0x21f0
movq %rax, %rdi
movq %r12, %rsi
callq 0x21f0
movq %rax, %rdi
callq 0x2130
leaq -0x98(%rbp), %rsi
movq 0x8(%rsi), %rcx
addq $-0x3, %rcx
leaq -0x60(%rbp), %rdi
xorl %edx, %edx
callq 0x2220
leaq 0x599f(%rip), %rdx      # 0x8652
leaq -0xd8(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x3ec2
leaq -0x60(%rbp), %rdi
callq 0x2398
movq -0xd8(%rbp), %rsi
pushq $0x10
popq %rdx
movq %rbx, %rdi
callq 0x2050
leaq 0x5919(%rip), %rsi      # 0x85fe
movq %rbx, %rdi
callq 0x21f0
movq %rax, %rdi
movq %r12, %rsi
callq 0x21f0
movq %rax, %rdi
callq 0x2130
leaq 0x5d87(%rip), %rsi      # 0x8a8e
movq -0x70(%rbp), %rdi
callq 0x2370
andq $0x0, 0x828(%rbx)
leaq 0x5916(%rip), %rsi      # 0x8635
movq -0x68(%rbp), %rdi
callq 0x2370
andl $0x0, 0x854(%rbx)
leaq -0x34(%rbp), %rdx
movl $0x4, (%rdx)
leaq 0x5917(%rip), %rsi      # 0x8657
leaq -0x60(%rbp), %rdi
callq 0x3eec
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0x5, (%rdx)
leaq 0x58ed(%rip), %rsi      # 0x865c
leaq -0x60(%rbp), %rdi
callq 0x3f16
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0x6, (%rdx)
leaq 0x58c1(%rip), %rsi      # 0x865f
leaq -0x60(%rbp), %rdi
callq 0x3eec
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0x7, (%rdx)
leaq 0x5897(%rip), %rsi      # 0x8664
leaq -0x60(%rbp), %rdi
callq 0x3f40
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0x8, (%rdx)
leaq 0x5870(%rip), %rsi      # 0x866c
leaq -0x60(%rbp), %rdi
callq 0x3f40
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0xa, (%rdx)
leaq 0x5849(%rip), %rsi      # 0x8674
leaq -0x60(%rbp), %rdi
callq 0x3f6a
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0xb, (%rdx)
leaq 0x581e(%rip), %rsi      # 0x8678
leaq -0x60(%rbp), %rdi
callq 0x3f16
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0xc, (%rdx)
leaq 0x57f2(%rip), %rsi      # 0x867b
leaq -0x60(%rbp), %rdi
callq 0x3f6a
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0xd, (%rdx)
leaq 0x57c7(%rip), %rsi      # 0x867f
leaq -0x60(%rbp), %rdi
callq 0x3f94
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0xe, (%rdx)
leaq 0x579f(%rip), %rsi      # 0x8686
leaq -0x60(%rbp), %rdi
callq 0x3f40
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0xf, (%rdx)
leaq 0x5778(%rip), %rsi      # 0x868e
leaq -0x60(%rbp), %rdi
callq 0x3fbe
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0x10, (%rdx)
leaq 0x574f(%rip), %rsi      # 0x8694
leaq -0x60(%rbp), %rdi
callq 0x3fbe
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0x11, (%rdx)
leaq 0x5726(%rip), %rsi      # 0x869a
leaq -0x60(%rbp), %rdi
callq 0x3fbe
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0x12, (%rdx)
leaq 0x56fd(%rip), %rsi      # 0x86a0
leaq -0x60(%rbp), %rdi
callq 0x3f40
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0x13, (%rdx)
leaq 0x56d6(%rip), %rsi      # 0x86a8
leaq -0x60(%rbp), %rdi
callq 0x3f94
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0x14, (%rdx)
leaq 0x56ae(%rip), %rsi      # 0x86af
leaq -0x60(%rbp), %rdi
callq 0x3fbe
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0x15, (%rdx)
leaq 0x5685(%rip), %rsi      # 0x86b5
leaq -0x60(%rbp), %rdi
callq 0x3eec
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0x16, (%rdx)
leaq 0x565b(%rip), %rsi      # 0x86ba
leaq -0x60(%rbp), %rdi
callq 0x3fe8
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0x17, (%rdx)
leaq 0x562e(%rip), %rsi      # 0x86bc
leaq -0x60(%rbp), %rdi
callq 0x3fe8
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0x18, (%rdx)
leaq 0x5601(%rip), %rsi      # 0x86be
leaq -0x60(%rbp), %rdi
callq 0x3fe8
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0x19, (%rdx)
leaq 0x55d4(%rip), %rsi      # 0x86c0
leaq -0x60(%rbp), %rdi
callq 0x3fe8
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0x1a, (%rdx)
leaq 0x55af(%rip), %rsi      # 0x86ca
leaq -0x60(%rbp), %rdi
callq 0x3fe8
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0x1b, (%rdx)
leaq 0x5578(%rip), %rsi      # 0x86c2
leaq -0x60(%rbp), %rdi
callq 0x3fe8
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0x1c, (%rdx)
leaq 0x554b(%rip), %rsi      # 0x86c4
leaq -0x60(%rbp), %rdi
callq 0x3fe8
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0x1d, (%rdx)
leaq 0x551e(%rip), %rsi      # 0x86c6
leaq -0x60(%rbp), %rdi
callq 0x3f16
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0x1e, (%rdx)
leaq 0x54f2(%rip), %rsi      # 0x86c9
leaq -0x60(%rbp), %rdi
callq 0x3f16
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0x1f, (%rdx)
leaq 0x54c6(%rip), %rsi      # 0x86cc
leaq -0x60(%rbp), %rdi
callq 0x3fe8
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0x20, (%rdx)
leaq 0x5499(%rip), %rsi      # 0x86ce
leaq -0x60(%rbp), %rdi
callq 0x3fe8
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0x34(%rbp), %rdx
movl $0x21, (%rdx)
leaq 0x546c(%rip), %rsi      # 0x86d0
leaq -0x60(%rbp), %rdi
callq 0x3fe8
leaq -0x60(%rbp), %rsi
movq %r13, %rdi
callq 0x4172
leaq -0x60(%rbp), %rdi
callq 0x2398
leaq -0xd8(%rbp), %rdi
callq 0x2398
leaq -0xf8(%rbp), %rdi
callq 0x2398
leaq -0x118(%rbp), %rdi
callq 0x2398
leaq -0xb8(%rbp), %rdi
callq 0x2398
leaq -0x98(%rbp), %rdi
callq 0x2398
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8d01(%rip), %rdi      # 0xbfd8
leaq 0x5331(%rip), %rsi      # 0x860f
callq 0x21f0
pushq $0x1
popq %rdi
callq 0x2260
movq 0x8ce6(%rip), %rdi      # 0xbfd8
leaq 0x533d(%rip), %rsi      # 0x8636
callq 0x21f0
movq %rax, %rdi
movq %r12, %rsi
callq 0x21f0
leaq 0x532c(%rip), %rsi      # 0x863c
movq %rax, %rdi
callq 0x21f0
pushq $0x2
jmp 0x32e5
jmp 0x347c
jmp 0x3403
jmp 0x348a
jmp 0x3403
jmp 0x348a
jmp 0x3403
jmp 0x348a
jmp 0x3403
jmp 0x348a
jmp 0x3403
jmp 0x348a
jmp 0x3403
jmp 0x348a
jmp 0x3403
jmp 0x348a
jmp 0x3403
jmp 0x348a
jmp 0x3403
jmp 0x348a
jmp 0x3403
jmp 0x348a
jmp 0x3403
jmp 0x348a
jmp 0x3403
jmp 0x348a
jmp 0x3403
jmp 0x348a
jmp 0x3403
jmp 0x348a
jmp 0x3403
jmp 0x348a
jmp 0x3403
jmp 0x348a
jmp 0x3403
jmp 0x348a
jmp 0x3403
jmp 0x348a
jmp 0x3403
jmp 0x348a
jmp 0x3403
jmp 0x348a
jmp 0x3403
jmp 0x348a
jmp 0x3403
jmp 0x348a
jmp 0x3403
jmp 0x348a
jmp 0x3403
jmp 0x348a
jmp 0x3403
jmp 0x348a
jmp 0x3403
jmp 0x348a
jmp 0x3403
jmp 0x348a
jmp 0x3403
jmp 0x348a
movq %r14, -0x30(%rbp)
movq %rax, %r14
leaq -0x60(%rbp), %rdi
callq 0x2398
jmp 0x3491
jmp 0x348a
movq %r14, -0x30(%rbp)
movq %rax, %r14
leaq -0x60(%rbp), %rdi
jmp 0x3498
jmp 0x3481
movq %r14, -0x30(%rbp)
movq %rax, %r14
leaq -0x60(%rbp), %rdi
jmp 0x34a4
jmp 0x3435
movq %r14, -0x30(%rbp)
movq %rax, %r14
jmp 0x34a9
movq %r14, -0x30(%rbp)
movq %rax, %r14
leaq -0x60(%rbp), %rdi
jmp 0x34b0
jmp 0x3478
jmp 0x346f
movq %r14, -0x30(%rbp)
movq %rax, %r14
jmp 0x34f0
movq %r14, -0x30(%rbp)
movq %rax, %r14
jmp 0x34f8
movq %rax, %r14
jmp 0x3501
movq %r14, -0x30(%rbp)
movq %rax, %r14
jmp 0x34cd
movq %r14, -0x30(%rbp)
movq %rax, %r14
jmp 0x34b5
movq %r14, -0x30(%rbp)
movq %rax, %r14
jmp 0x349d
movq %r14, -0x30(%rbp)
movq %rax, %r14
leaq -0xd8(%rbp), %rdi
callq 0x2398
leaq -0xf8(%rbp), %rdi
callq 0x2398
leaq -0x118(%rbp), %rdi
callq 0x2398
leaq -0xb8(%rbp), %rdi
callq 0x2398
leaq -0x98(%rbp), %rdi
callq 0x2398
movq %r13, %rdi
callq 0x4048
movq -0x68(%rbp), %rdi
callq 0x2398
movq -0x70(%rbp), %rdi
callq 0x2398
movq -0x78(%rbp), %rdi
callq 0x22d0
movq %r15, %rdi
callq 0x20c0
movq -0x30(%rbp), %rdi
callq 0x22d0
movq %rbx, %rdi
callq 0x22d0
movq %r14, %rdi
callq 0x2330
nop