// File: /workspace/github_cpp_makefile_star2_O2/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 $0x28, %rsp
movq %rdi, %rbx
xorl %r14d, %r14d
movl %r14d, %r14d
movq 0xa0(%rbx), %rax
subq 0x98(%rbx), %rax
sarq $0x5, %rax
movq 0x97cb(%rip), %rdi      # 0xcfd8
cmpq %r14, %rax
jb 0x391d
movq %r14, %rsi
callq 0x2150
movq %rax, %rdi
leaq 0x4a73(%rip), %rsi      # 0x829b
callq 0x21c0
movq %rax, %rdi
callq 0x2100
movq %rax, %rdi
leaq 0x4a5e(%rip), %rsi      # 0x829d
callq 0x21c0
movq %rax, %rdi
callq 0x2100
xorl %r12d, %r12d
imulq $0x18, %r14, %r15
movq %r14, -0x30(%rbp)
movl %r12d, %r12d
movq 0x80(%rbx), %rdi
movq 0x8(%rdi,%r15), %rax
subq (%rdi,%r15), %rax
sarq $0x3, %rax
cmpq %r12, %rax
jbe 0x3915
addq %r15, %rdi
movq %r12, %rsi
callq 0x4e04
movq (%rax), %rdi
callq 0x7864
movl %eax, %r13d
movq 0x80(%rbx), %rdi
addq %r15, %rdi
movq %r12, %rsi
callq 0x4e04
movq (%rax), %rsi
testb %r13b, %r13b
je 0x38b4
movq %rbx, %rdi
movl %r14d, %edx
callq 0x3f5a
jmp 0x390d
leaq -0x50(%rbp), %r14
movq %r14, %rdi
callq 0x78ae
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35ca
movq %rax, %r13
movq %r14, %rdi
callq 0x20f0
movq 0x80(%rbx), %rdi
addq %r15, %rdi
movq %r12, %rsi
callq 0x4e04
movq (%rax), %rsi
movq %rbx, %rdi
testq %r13, %r13
je 0x3901
movq -0x30(%rbp), %r14
movl %r14d, %edx
callq 0x395c
jmp 0x390d
movq -0x30(%rbp), %r14
movl %r14d, %edx
callq 0x3c94
incl %r12d
jmp 0x3857
incl %r14d
jmp 0x37f1
leaq 0x49af(%rip), %rsi      # 0x82d3
callq 0x21c0
movq %rax, %rdi
callq 0x2100
movq %rax, %rdi
callq 0x2100
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x22c0