Behat/Gherkin — Issue #13: PyString isn't parsed correctly and causes php_warnings
Author: oleksiizozulenko
Created: 2012-01-25 08:41:11+00:00
State: open

When I used PyString inside my scenario (or scenario outline) and tried to run behat then I saw php warning:
Warning: preg_replace(): Compilation failed: numbers out of order in {} quantifier at offset 7 in /usr/share/pear/gherkin/src/Behat/Gherkin/Lexer.php on line 369

Call Stack:
0.0013 639736 1. {main}() /usr/bin/behat:0
0.1619 3881720 2. Symfony\Component\Console\Application->run() /usr/bin/behat:27
0.1848 4330136 3. Symfony\Component\Console\Application->doRun() /usr/share/pear/Symfony/Component/Console/Application.php:118
0.1853 4330216 4. Symfony\Component\Console\Command\Command->run() /usr/share/pear/Symfony/Component/Console/Application.php:194
1.1634 23649328 5. Behat\Behat\Console\Command\BehatCommand->execute() /usr/share/pear/Symfony/Component/Console/Command/Command.php:224
1.1634 23649328 6. Behat\Behat\Runner->run() /usr/share/pear/behat/src/Behat/Behat/Console/Command/BehatCommand.php:78
1.2226 27124784 7. Behat\Gherkin\Gherkin->load() /usr/share/pear/behat/src/Behat/Behat/Runner.php:94
1.2227 27125000 8. Behat\Gherkin\Loader\GherkinFileLoader->load() /usr/share/pear/gherkin/src/Behat/Gherkin/Gherkin.php:82
1.2229 27125792 9. Behat\Gherkin\Parser->parse() /usr/share/pear/gherkin/src/Behat/Gherkin/Loader/GherkinFileLoader.php:56
1.2611 27235696 10. Behat\Gherkin\Parser->parseExpression() /usr/share/pear/gherkin/src/Behat/Gherkin/Parser.php:80
1.2611 27235696 11. Behat\Gherkin\Parser->parseFeature() /usr/share/pear/gherkin/src/Behat/Gherkin/Parser.php:147
1.2629 27307888 12. Behat\Gherkin\Parser->parseExpression() /usr/share/pear/gherkin/src/Behat/Gherkin/Parser.php:223
1.2630 27307888 13. Behat\Gherkin\Parser->parseExpression() /usr/share/pear/gherkin/src/Behat/Gherkin/Parser.php:170
1.2630 27307888 14. Behat\Gherkin\Parser->parseScenario() /usr/share/pear/gherkin/src/Behat/Gherkin/Parser.php:151
1.2643 27368416 15. Behat\Gherkin\Parser->parseExpression() /usr/share/pear/gherkin/src/Behat/Gherkin/Parser.php:327
1.2643 27368416 16. Behat\Gherkin\Parser->parseStep() /usr/share/pear/gherkin/src/Behat/Gherkin/Parser.php:159
1.2651 27414992 17. Behat\Gherkin\Parser->parseExpression() /usr/share/pear/gherkin/src/Behat/Gherkin/Parser.php:347
1.2652 27414992 18. Behat\Gherkin\Parser->parsePyString() /usr/share/pear/gherkin/src/Behat/Gherkin/Parser.php:157
1.2687 27438256 19. Behat\Gherkin\Parser->predictTokenType() /usr/share/pear/gherkin/src/Behat/Gherkin/Parser.php:389
1.2687 27438304 20. Behat\Gherkin\Lexer->predictToken() /usr/share/pear/gherkin/src/Behat/Gherkin/Parser.php:135
1.2687 27438352 21. Behat\Gherkin\Lexer->getNextToken() /usr/share/pear/gherkin/src/Behat/Gherkin/Lexer.php:108
1.2687 27438352 22. Behat\Gherkin\Lexer->scanPyStringContent() /usr/share/pear/gherkin/src/Behat/Gherkin/Lexer.php:180
1.2687 27439288 23. preg_replace() /usr/share/pear/gherkin/src/Behat/Gherkin/Lexer.php:369