src/Behat/Gherkin/Parser.php
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));
    }
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));
    }
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 ) ) ; }
Parses current expression & returns Node.

@return string|FeatureNode|BackgroundNode|ScenarioNode|OutlineNode|TableNode|StepNode

@throws ParserException
Parses current expression & returns Node .