Skip to content

astavale/gherkin-vala

Repository files navigation

Platform Status
Fedora 22 ![Build Status](http://jenkins.valadate.org:8080/buildStatus/icon?job=Gherkin for Vala (Fedora))
Ubuntu 15.04 ![Build Status](http://jenkins.valadate.org:8080/buildStatus/icon?job=Gherkin for Vala (Ubuntu 15.04))
Windows 7 ![Build Status](http://jenkins.valadate.org:8080/buildStatus/icon?job=Gherkin for Vala (Win64))
Mac OS X ![Build Status](http://jenkins.valadate.org:8080/buildStatus/icon?job=Gherkin for Vala (Mac OSX))

Gherkin parser/compiler for Vala. Please see Gherkin3 for details.

Building from Source

libgherkin3 uses autotools for the build process. For a fresh build, straight after git cloning this repository, do:

cd gherkin-vala
./autogen.sh

or

cd gherkin-vala
./autogen.sh --prefix /my/personal/directory/to/install/to

if you want to try out libgherkin3 without a system wide install. Then continue with:

make
make install

To run the test suite:

make test

Getting Started

gherkin-vala provides three command line tools to get started:

  • gherkin-generate-ast
  • gherkin-generate-pickles
  • gherkin-generate-tokens

A Gherkin .feature file, after any comments, should start with the Feature keyword in the human language specified for that file. The default language is English. Save this very basic example as test.feature:

Feature: A meaningless example

Then run gherkin-generate-ast with the file:

gherkin-generate-ast test.feature

This will dump the abstract syntax tree as JSON:

{
  "node-type" : "Feature",
  "location" : {
    "line" : 1,
    "column" : 1
  },
  "tags" : [
  ],
  "language" : "en",
  "keyword" : "Feature",
  "name" : "A meaningless example",
  "scenarioDefinitions" : [
  ],
  "comments" : [
  ]
}

libgherkin3 API and ABI

libgherkin3 was generated from the reference implementation, gherkin, and follows that API. Work currently needs to be done on marking internal functions as internal in Vala and also developing a stable ABI. Anyone wanting to work on the API/ABI should read:

GIR (GObject Introspection Repository) and Language Bindings

libgherkin3 is written in Vala and so easily generates a GIR file that can be used to generate a .typelib file to be read by libgirrepository and used with libffi for bindings to languages supporting GIR, for example Python, Javascript, Lua and Haskell.

For anyone wishing to work on API/ABI stability for libgherkin3 and so generate stable language bindings see:

About

Port of the Gherkin language to Vala

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published