// File: ssubrandon[P]460Project2/SyntacticalAnalyzer.cpp
// Function: SyntacticalAnalyzer::SyntacticalAnalyzer(char*)
SyntacticalAnalyzer::SyntacticalAnalyzer (char * filename)
{
	lex = new LexicalAnalyzer (filename);
	token_type t;

	int i =0;
	string file = "";
	while( filename[i] != '.'){
		file += filename[i];
		i++;
	}
	token = lex -> GetToken();
	ruleFile.open(file + ".Zp2");

	errors = program();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x80(%rbp)
addq $0x18, %rdi
movq %rdi, -0x88(%rbp)
callq 0x3310
movq -0x80(%rbp), %rdi
addq $0x220, %rdi            # imm = 0x220
movq %rdi, -0x78(%rbp)
callq 0x3410
jmp 0x8981
movq -0x80(%rbp), %rdi
addq $0x420, %rdi            # imm = 0x420
movq %rdi, -0x90(%rbp)
callq 0x3410
jmp 0x899a
movq -0x80(%rbp), %rdi
addq $0x620, %rdi            # imm = 0x620
movq %rdi, -0x98(%rbp)
callq 0x3410
jmp 0x89b3
movq -0x80(%rbp), %rdi
addq $0x820, %rdi            # imm = 0x820
movq %rdi, -0xa8(%rbp)
callq 0x3380
movl $0x888, %edi            # imm = 0x888
callq 0x3280
movq %rax, -0xa0(%rbp)
jmp 0x89dd
movq -0xa0(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x45a0
jmp 0x89ef
movq -0x80(%rbp), %rax
movq -0xa0(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x0, -0x24(%rbp)
leaq -0x49(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x3440
movq -0xb0(%rbp), %rdx
leaq 0x776a(%rip), %rsi      # 0x1018d
leaq -0x48(%rbp), %rdi
callq 0x7040
jmp 0x8a2e
leaq -0x49(%rbp), %rdi
callq 0x32e0
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2e, %eax
je 0x8aff
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsbl (%rax,%rcx), %esi
leaq -0x48(%rbp), %rdi
callq 0x31a0
jmp 0x8a63
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x8a37
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x8bde
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x8bd5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x8bc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x8bb1
movq -0xa0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x888, %esi            # imm = 0x888
callq 0x3290
jmp 0x8bb1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x49(%rbp), %rdi
callq 0x32e0
jmp 0x8bb1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x8ba8
movq -0x80(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5fd0
movl %eax, -0xb4(%rbp)
jmp 0x8b14
movq -0x80(%rbp), %rax
movl -0xb4(%rbp), %ecx
movl %ecx, 0x10(%rax)
addq $0x420, %rax            # imm = 0x420
movq %rax, -0xc0(%rbp)
leaq 0x78c3(%rip), %rdx      # 0x103f8
leaq -0x70(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0xf130
jmp 0x8b44
movq -0xc0(%rbp), %rdi
leaq -0x70(%rbp), %rsi
movl $0x10, %edx
callq 0x3180
jmp 0x8b5b
leaq -0x70(%rbp), %rdi
callq 0x34b8
movq -0x80(%rbp), %rdi
callq 0x8c00
movl %eax, -0xc4(%rbp)
jmp 0x8b75
movq -0x80(%rbp), %rax
movl -0xc4(%rbp), %ecx
movl %ecx, (%rax)
leaq -0x48(%rbp), %rdi
callq 0x34b8
addq $0xd0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x34b8
leaq -0x48(%rbp), %rdi
callq 0x34b8
movq -0xa8(%rbp), %rdi
callq 0x34b8
movq -0x98(%rbp), %rdi
callq 0x33c0
movq -0x90(%rbp), %rdi
callq 0x33c0
movq -0x78(%rbp), %rdi
callq 0x33c0
movq -0x88(%rbp), %rdi
callq 0x30f0
movq -0x18(%rbp), %rdi
callq 0x3430
nopw %cs:(%rax,%rax)