Method | Description | |
---|---|---|
__construct ( |
Initializes parser. | |
parse ( string $input, string $file = null ) : Behat\Gherkin\Node\FeatureNode | null | Parses input & returns features array. |
Method | Description | |
---|---|---|
acceptTokenType ( string $type ) : null | array | Returns next token if it's type equals to expected. | |
expectTokenType ( string $type ) : array | Returns next token if it's type equals to expected. | |
parseBackground ( ) : Behat\Gherkin\Node\BackgroundNode | Parses background token & returns it's node. | |
parseComment ( ) : Behat\Gherkin\Node\BackgroundNode | Behat\Gherkin\Node\FeatureNode | Behat\Gherkin\Node\OutlineNode | Behat\Gherkin\Node\ScenarioNode | Behat\Gherkin\Node\StepNode | Behat\Gherkin\Node\TableNode | string | Parses next comment token & returns it's string content. | |
parseExamples ( ) : Behat\Gherkin\Node\ExampleTableNode | Parses examples table node. | |
parseExpression ( ) : string | Behat\Gherkin\Node\FeatureNode | Behat\Gherkin\Node\BackgroundNode | Behat\Gherkin\Node\ScenarioNode | Behat\Gherkin\Node\OutlineNode | Behat\Gherkin\Node\TableNode | Behat\Gherkin\Node\StepNode | Parses current expression & returns Node. | |
parseFeature ( ) : Behat\Gherkin\Node\FeatureNode | Parses feature token & returns it's node. | |
parseLanguage ( ) : Behat\Gherkin\Node\BackgroundNode | Behat\Gherkin\Node\FeatureNode | Behat\Gherkin\Node\OutlineNode | Behat\Gherkin\Node\ScenarioNode | Behat\Gherkin\Node\StepNode | Behat\Gherkin\Node\TableNode | string | Parses language block and updates lexer configuration based on it. | |
parseNewline ( ) : string | Parses next newline & returns \n. | |
parseOutline ( ) : Behat\Gherkin\Node\OutlineNode | Parses scenario outline token & returns it's node. | |
parsePyString ( ) : Behat\Gherkin\Node\PyStringNode | Parses PyString token & returns it's node. | |
parseScenario ( ) : Behat\Gherkin\Node\ScenarioNode | Parses scenario token & returns it's node. | |
parseStep ( ) : Behat\Gherkin\Node\StepNode | Parses step token & returns it's node. | |
parseTable ( ) : Behat\Gherkin\Node\TableNode | Parses table token & returns it's node. | |
parseTags ( ) : Behat\Gherkin\Node\BackgroundNode | Behat\Gherkin\Node\FeatureNode | Behat\Gherkin\Node\OutlineNode | Behat\Gherkin\Node\ScenarioNode | Behat\Gherkin\Node\StepNode | Behat\Gherkin\Node\TableNode | string | Parses tags. | |
parseText ( ) : string | Parses next text line & returns it. | |
popTags ( ) : array | Returns current set of tags and clears tag buffer. | |
predictTokenType ( ) : string | Returns next token type without real input reading (prediction). |
Method | Description | |
---|---|---|
normalizeStepNodeKeywordType ( Behat\Gherkin\Node\StepNode $node, array $steps = [] ) : Behat\Gherkin\Node\StepNode | Changes step node type for types But, And to type of previous step if it exists else sets to Given | |
parseTableRows ( ) : string[][] | Parses the rows of a table |
public __construct ( |
||
$lexer | Lexer instance |
protected expectTokenType ( string $type ) : array | ||
$type | string | Token type |
return | array |
protected parseBackground ( ) : Behat\Gherkin\Node\BackgroundNode | ||
return | Behat\Gherkin\Node\BackgroundNode |
protected parseComment ( ) : Behat\Gherkin\Node\BackgroundNode | Behat\Gherkin\Node\FeatureNode | Behat\Gherkin\Node\OutlineNode | Behat\Gherkin\Node\ScenarioNode | Behat\Gherkin\Node\StepNode | Behat\Gherkin\Node\TableNode | string | ||
return | Behat\Gherkin\Node\BackgroundNode | Behat\Gherkin\Node\FeatureNode | Behat\Gherkin\Node\OutlineNode | Behat\Gherkin\Node\ScenarioNode | Behat\Gherkin\Node\StepNode | Behat\Gherkin\Node\TableNode | string |
protected parseExamples ( ) : Behat\Gherkin\Node\ExampleTableNode | ||
return | Behat\Gherkin\Node\ExampleTableNode |
protected parseExpression ( ) : string | Behat\Gherkin\Node\FeatureNode | Behat\Gherkin\Node\BackgroundNode | Behat\Gherkin\Node\ScenarioNode | Behat\Gherkin\Node\OutlineNode | Behat\Gherkin\Node\TableNode | Behat\Gherkin\Node\StepNode | ||
return | string | Behat\Gherkin\Node\FeatureNode | Behat\Gherkin\Node\BackgroundNode | Behat\Gherkin\Node\ScenarioNode | Behat\Gherkin\Node\OutlineNode | Behat\Gherkin\Node\TableNode | Behat\Gherkin\Node\StepNode |
protected parseFeature ( ) : Behat\Gherkin\Node\FeatureNode | ||
return | Behat\Gherkin\Node\FeatureNode |
protected parseLanguage ( ) : Behat\Gherkin\Node\BackgroundNode | Behat\Gherkin\Node\FeatureNode | Behat\Gherkin\Node\OutlineNode | Behat\Gherkin\Node\ScenarioNode | Behat\Gherkin\Node\StepNode | Behat\Gherkin\Node\TableNode | string | ||
return | Behat\Gherkin\Node\BackgroundNode | Behat\Gherkin\Node\FeatureNode | Behat\Gherkin\Node\OutlineNode | Behat\Gherkin\Node\ScenarioNode | Behat\Gherkin\Node\StepNode | Behat\Gherkin\Node\TableNode | string |
protected parseNewline ( ) : string | ||
return | string |
protected parseOutline ( ) : Behat\Gherkin\Node\OutlineNode | ||
return | Behat\Gherkin\Node\OutlineNode |
protected parsePyString ( ) : Behat\Gherkin\Node\PyStringNode | ||
return | Behat\Gherkin\Node\PyStringNode |
protected parseScenario ( ) : Behat\Gherkin\Node\ScenarioNode | ||
return | Behat\Gherkin\Node\ScenarioNode |
protected parseStep ( ) : Behat\Gherkin\Node\StepNode | ||
return | Behat\Gherkin\Node\StepNode |
protected parseTable ( ) : Behat\Gherkin\Node\TableNode | ||
return | Behat\Gherkin\Node\TableNode |
protected parseTags ( ) : Behat\Gherkin\Node\BackgroundNode | Behat\Gherkin\Node\FeatureNode | Behat\Gherkin\Node\OutlineNode | Behat\Gherkin\Node\ScenarioNode | Behat\Gherkin\Node\StepNode | Behat\Gherkin\Node\TableNode | string | ||
return | Behat\Gherkin\Node\BackgroundNode | Behat\Gherkin\Node\FeatureNode | Behat\Gherkin\Node\OutlineNode | Behat\Gherkin\Node\ScenarioNode | Behat\Gherkin\Node\StepNode | Behat\Gherkin\Node\TableNode | string |
protected predictTokenType ( ) : string | ||
return | string |