Gherkin 0 travis-ci Packagist phpunit

Gherkin parser, written in PHP 5.3+ for Behat project

Behat Gherkin Parser

This is the php Gherkin parser for Behat. It comes bundled with more than 40 native languages (see i18n.php) support & clean architecture.

Build Status Scrutinizer Code Quality Code Coverage

Useful Links

Usage Example

<?php

$keywords = new Behat\Gherkin\Keywords\ArrayKeywords(array(
    'en' => array(
        'feature'          => 'Feature',
        'background'       => 'Background',
        'scenario'         => 'Scenario',
        'scenario_outline' => 'Scenario Outline|Scenario Template',
        'examples'         => 'Examples|Scenarios',
        'given'            => 'Given',
        'when'             => 'When',
        'then'             => 'Then',
        'and'              => 'And',
        'but'              => 'But'
    ),
    'en-pirate' => array(
        'feature'          => 'Ahoy matey!',
        'background'       => 'Yo-ho-ho',
        'scenario'         => 'Heave to',
        'scenario_outline' => 'Shiver me timbers',
        'examples'         => 'Dead men tell no tales',
        'given'            => 'Gangway!',
        'when'             => 'Blimey!',
        'then'             => 'Let go and haul',
        'and'              => 'Aye',
        'but'              => 'Avast!'
    )
));
$lexer  = new Behat\Gherkin\Lexer($keywords);
$parser = new Behat\Gherkin\Parser($lexer);

$feature = $parser->parse(file_get_contents('some.feature'));

Installing Dependencies

$> curl http://getcomposer.org/installer | php
$> php composer.phar update

Contributors

Related Repositories

gherkin

gherkin

Cross platform parser for the Gherkin language. Used by Cucumber to parse .feature files. ...

Gherkin

Gherkin

Gherkin parser, written in PHP 5.3+ for Behat project ...

kawaii-gherkin

kawaii-gherkin

A Kawaii and small tool to fix and validate gherkin code styles. ...

gherkin-ruby

gherkin-ruby

gherkin-ruby is a Gherkin parser in pure Ruby using Parslet. ...

atom-language-gherkin

atom-language-gherkin

Gherkin language support for Atom ...


Top Contributors

everzet stof Halleck45 kibao headrevision PurpleBooth anbotero benja-M-1 dcsg danielholmes docteurklein unkind dbollaer

Releases

-   v4.4.4 zip tar
-   v4.4.3 zip tar
-   v4.4.2 zip tar
-   v4.4.1 zip tar
-   v4.4.0 zip tar
-   v4.3.0 zip tar
-   v4.2.1 zip tar
-   v4.2.0 zip tar
-   v4.1.3 zip tar
-   v4.1.2 zip tar
-   v4.1.1 zip tar
-   v4.1.0 zip tar
-   v4.0.0 zip tar
-   v3.1.3 zip tar
-   v3.1.2 zip tar
-   v3.1.1 zip tar
-   v3.1.0 zip tar
-   v3.0.5 zip tar
-   v3.0.4 zip tar
-   v3.0.3 zip tar
-   v3.0.2 zip tar
-   v3.0.1 zip tar
-   v3.0.0 zip tar
-   v2.3.5 zip tar
-   v2.3.4 zip tar
-   v2.3.3 zip tar
-   v2.3.2 zip tar
-   v2.3.1 zip tar
-   v2.3.0 zip tar
-   v2.2.9 zip tar