// File: /workspace/github_cpp_makefile_star2_O1/matteorr[P]EarleyParser/EarleyParser.cpp
// Function: EarleyParser::parse()
void EarleyParser::parse()
{
	/*
	 * early parser main cycle
	 */
	for( unsigned int i = 0; i <= this->inputVector.size(); i++ )
	{
		cout << i << "  *****************************************************" << endl << "*****************************************************" << endl;
		/*
		 * cycles over all chart
		 */
		for( unsigned int j = 0; j < this->earleyParserChart[i].size(); j++ )
		{
			if( !( this->earleyParserChart[i].at(j)->isComplete() ) )
			{
				/*
				 * the state is not complete
				 * the production corresponding to the state has not
				 * been yet analized completely
				 */
				if( this->getProduction( this->earleyParserChart[i].at(j)->nextSymbolToProcess() ) != NULL )
				{
					/*
					 * symbol to process is a non terminal and is contained in the
					 * production hash map initialized from the input context free grammar
					 *
					 * the correct production of the symbol must be predicted
					 */
					this->predictor( this->earleyParserChart[i].at(j), i );

				}else{
					/*
					 * symbol to process is a terminal symbol
					 * which has no further expansions
					 *
					 * symbol must be simply scanned
					 */
					this->scanner( this->earleyParserChart[i].at(j), i );
				}
			}else{
				/*
				 * the state is complete
				 * all symbols in the corresponding production have been
				 * expanded (non terminals) or scanned (terminals)
				 */
				this->completer( this->earleyParserChart[i].at(j), i );
			}
		}
	}

	cout << "[DEBUG]: finished parsing input string!" << endl << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r14
leaq 0x10(%rdi), %rax
movq %rax, -0x38(%rbp)
xorl %r15d, %r15d
movq 0x9c3e(%rip), %rdi      # 0xdfd8
movq %r15, %rsi
callq 0x2140
movq %rax, %rbx
movl $0x37, %edx
movq %rax, %rdi
leaq 0x5ee7(%rip), %rsi      # 0xa29b
callq 0x2220
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
movq %rax, %rbx
movl $0x35, %edx
movq %rax, %rdi
leaq 0x5eab(%rip), %rsi      # 0xa29d
callq 0x2220
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
movq 0x80(%r14), %rcx
leaq (%r15,%r15,2), %r13
movq (%rcx,%r13,8), %rax
cmpq %rax, 0x8(%rcx,%r13,8)
je 0x453b
movl $0x1, %r12d
xorl %ebx, %ebx
movq %r15, -0x30(%rbp)
movq (%rax,%rbx,8), %rdi
callq 0x94c6
movq 0x80(%r14), %rdx
movq (%rdx,%r13,8), %rcx
movq 0x8(%rdx,%r13,8), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
testb %al, %al
je 0x4485
cmpq %rbx, %rdx
jbe 0x45d4
movq (%rcx,%rbx,8), %rsi
movq %r14, %rdi
movl %r15d, %edx
callq 0x4f64
jmp 0x4515
cmpq %rbx, %rdx
jbe 0x45d4
movq (%rcx,%rbx,8), %rsi
leaq -0x58(%rbp), %r15
movq %r15, %rdi
callq 0x9510
movq -0x38(%rbp), %rdi
movq %r15, %rsi
callq 0x6804
movq %rax, %r15
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x44bf
callq 0x21a0
movq 0x80(%r14), %rcx
movq (%rcx,%r13,8), %rax
movq 0x8(%rcx,%r13,8), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
testq %r15, %r15
je 0x44f9
cmpq %rbx, %rdx
movq -0x30(%rbp), %r15
jbe 0x45d4
movq (%rax,%rbx,8), %rsi
movq %r14, %rdi
movl %r15d, %edx
callq 0x4602
jmp 0x4515
cmpq %rbx, %rdx
movq -0x30(%rbp), %r15
jbe 0x45d4
movq (%rax,%rbx,8), %rsi
movq %r14, %rdi
movl %r15d, %edx
callq 0x4b06
movl %r12d, %ebx
movq 0x80(%r14), %rcx
movq (%rcx,%r13,8), %rax
movq 0x8(%rcx,%r13,8), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
incl %r12d
cmpq %rbx, %rcx
ja 0x4444
incl %r15d
movq 0xa0(%r14), %rax
subq 0x98(%r14), %rax
sarq $0x5, %rax
cmpq %r15, %rax
jae 0x4393
leaq 0x5d73(%rip), %rsi      # 0xa2d3
movl $0x27, %edx
movq 0x9a6c(%rip), %rbx      # 0xdfd8
movq %rbx, %rdi
callq 0x2220
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x603a(%rip), %rdi      # 0xa615
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2280
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x45fa
callq 0x21a0
movq %rbx, %rdi
callq 0x22f0