// File: /workspace/github_cpp_makefile_star2_O3/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 0x9c22(%rip), %rdi      # 0xdfd8
movq %r15, %rsi
callq 0x2140
movq %rax, %rbx
movl $0x37, %edx
movq %rax, %rdi
leaq 0x5ecb(%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 0x5e8f(%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 0x4557
movl $0x1, %r12d
xorl %ebx, %ebx
movq %r15, -0x30(%rbp)
movq (%rax,%rbx,8), %rdi
callq 0x94ba
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 0x44a1
cmpq %rbx, %rdx
jbe 0x45f0
movq (%rcx,%rbx,8), %rsi
movq %r14, %rdi
movl %r15d, %edx
callq 0x4f52
jmp 0x4531
cmpq %rbx, %rdx
jbe 0x45f0
movq (%rcx,%rbx,8), %rsi
leaq -0x58(%rbp), %r15
movq %r15, %rdi
callq 0x9504
movq -0x38(%rbp), %rdi
movq %r15, %rsi
callq 0x67f8
movq %rax, %r15
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x44db
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 0x4515
cmpq %rbx, %rdx
movq -0x30(%rbp), %r15
jbe 0x45f0
movq (%rax,%rbx,8), %rsi
movq %r14, %rdi
movl %r15d, %edx
callq 0x461e
jmp 0x4531
cmpq %rbx, %rdx
movq -0x30(%rbp), %r15
jbe 0x45f0
movq (%rax,%rbx,8), %rsi
movq %r14, %rdi
movl %r15d, %edx
callq 0x4af6
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 0x4460
incl %r15d
movq 0xa0(%r14), %rax
subq 0x98(%r14), %rax
sarq $0x5, %rax
cmpq %r15, %rax
jae 0x43af
leaq 0x5d57(%rip), %rsi      # 0xa2d3
movl $0x27, %edx
movq 0x9a50(%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 0x601e(%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 0x4616
callq 0x21a0
movq %rbx, %rdi
callq 0x22f0