protected function parseExpression()
{
switch ($type = $this->predictTokenType()) {
case 'Feature':
return $this->parseFeature();
case 'Background':
return $this->parseBackground();
case 'Scenario':
return $this->parseScenario();
case 'Outline':
return $this->parseOutline();
case 'Examples':
return $this->parseExamples();
case 'TableRow':
return $this->parseTable();
case 'PyStringOp':
return $this->parsePyString();
case 'Step':
return $this->parseStep();
case 'Text':
return $this->parseText();
case 'Newline':
return $this->parseNewline();
case 'Tag':
return $this->parseTags();
case 'Comment':
return $this->parseComment();
case 'Language':
return $this->parseLanguage();
case 'EOS':
return '';
}
throw new ParserException(sprintf('Unknown token type: %s', $type));
}