// File: pranavmodx[P]modlang/rppl.cpp
// Function: RPPL()
void RPPL()
{
	const std::string PROMPT = ">> ";

	Lexer lexer;
	Parser parser;
	
	std::string line;

	while (true)
	{
		std::cout << PROMPT;

		std::getline(std::cin, line);

		lexer.New(line);
		parser.New(lexer);

		Program *program = parser.ParseProgram();

		if (parser.Errors().size())
			for (std::string error : parser.Errors())
				std::cout << error << std::endl;
		else
			std::cout << program->getStringRepr() << std::endl;

		parser.resetErrors();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2b0, %rsp            # imm = 0x2B0
leaq -0x21(%rbp), %rdi
movq %rdi, -0x290(%rbp)
callq 0x5440
movq -0x290(%rbp), %rdx
leaq 0x18bab(%rip), %rsi     # 0x250a4
leaq -0x20(%rbp), %rdi
callq 0xc810
jmp 0xc504
leaq -0x21(%rbp), %rdi
callq 0x52a0
leaq -0x68(%rbp), %rdi
callq 0xc8c0
leaq -0x1d8(%rbp), %rdi
callq 0x17c10
jmp 0xc524
leaq -0x1f8(%rbp), %rdi
callq 0x5350
jmp 0xc532
movq 0x2aa8f(%rip), %rdi     # 0x36fc8
leaq -0x20(%rbp), %rsi
callq 0x5220
jmp 0xc544
movq 0x2aa95(%rip), %rdi     # 0x36fe0
leaq -0x1f8(%rbp), %rsi
callq 0x5090
jmp 0xc559
leaq -0x68(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x10860
jmp 0xc56b
leaq -0x1d8(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x180d0
jmp 0xc57d
leaq -0x1d8(%rbp), %rdi
callq 0x1a6e0
movq %rax, -0x298(%rbp)
jmp 0xc592
movq -0x298(%rbp), %rax
movq %rax, -0x200(%rbp)
leaq -0x218(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x1b410
jmp 0xc5b5
leaq -0x218(%rbp), %rdi
callq 0xc8e0
movq %rax, -0x2a0(%rbp)
leaq -0x218(%rbp), %rdi
callq 0xc900
movq -0x2a0(%rbp), %rax
cmpq $0x0, %rax
je 0xc736
leaq -0x238(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x1b410
jmp 0xc5fa
leaq -0x238(%rbp), %rax
movq %rax, -0x220(%rbp)
movq -0x220(%rbp), %rdi
callq 0xc960
movq %rax, -0x240(%rbp)
movq -0x220(%rbp), %rdi
callq 0xc990
movq %rax, -0x248(%rbp)
leaq -0x240(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0xc9c0
testb $0x1, %al
jne 0xc692
leaq -0x238(%rbp), %rdi
callq 0xc900
jmp 0xc734
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x21(%rbp), %rdi
callq 0x52a0
jmp 0xc7e5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xc7d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xc7bb
leaq -0x240(%rbp), %rdi
callq 0xca00
movq %rax, %rsi
leaq -0x268(%rbp), %rdi
callq 0x5110
jmp 0xc6af
movq 0x2a912(%rip), %rdi     # 0x36fc8
leaq -0x268(%rbp), %rsi
callq 0x5220
movq %rax, -0x2a8(%rbp)
jmp 0xc6cb
movq -0x2a8(%rbp), %rdi
movq 0x2a8c7(%rip), %rsi     # 0x36fa0
callq 0x5280
jmp 0xc6e0
leaq -0x268(%rbp), %rdi
callq 0x54a8
leaq -0x240(%rbp), %rdi
callq 0xca20
jmp 0xc62e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xc723
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x54a8
leaq -0x238(%rbp), %rdi
callq 0xc900
jmp 0xc7bb
jmp 0xc7a8
movq -0x200(%rbp), %rsi
movq (%rsi), %rax
movq 0x8(%rax), %rax
leaq -0x288(%rbp), %rdi
callq *%rax
jmp 0xc74f
movq 0x2a872(%rip), %rdi     # 0x36fc8
leaq -0x288(%rbp), %rsi
callq 0x5220
movq %rax, -0x2b0(%rbp)
jmp 0xc76b
movq -0x2b0(%rbp), %rdi
movq 0x2a827(%rip), %rsi     # 0x36fa0
callq 0x5280
jmp 0xc780
leaq -0x288(%rbp), %rdi
callq 0x54a8
jmp 0xc7a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x288(%rbp), %rdi
callq 0x54a8
jmp 0xc7bb
leaq -0x1d8(%rbp), %rdi
callq 0x1b450
jmp 0xc7b6
jmp 0xc530
leaq -0x1f8(%rbp), %rdi
callq 0x54a8
leaq -0x1d8(%rbp), %rdi
callq 0xca40
leaq -0x68(%rbp), %rdi
callq 0xcac0
leaq -0x20(%rbp), %rdi
callq 0x54a8
movq -0x30(%rbp), %rdi
callq 0x5430
nop