/**
* @param \Jungle\Syntax $syntax
* @param \Jungle\SLR\Table $table
*
* @return \Zend\Code\Generator\ClassGenerator
*/
public function build(Syntax $syntax, Table $table)
{
$this->class = new ClassGenerator('Test');
$this->class->setDocBlock(new DocBlockGenerator('SLR parser', 'WARNING! THIS FILE AUTO GENERATED by JUNGLE. DO NOT EDIT IT!'));
$this->class->addPropertyFromGenerator($this->getActionTableProperty($table));
$this->class->addPropertyFromGenerator($this->getStackProperty());
$this->buildParseMethod();
$this->buildTokenizerMethod($syntax);
$this->buildGetNextTokenMethod($syntax);
$this->buildReduces($table->getReduces());
return $this->class;
}