See demo.
This is a simple shipping DSL parser. It's based on the code mentioned at the end of this talk by Neil Green at JSConf 2014. I've simply written a different implementation of the DSL parser using Jison.
It's a great talk, and should be watched before making sense of this parser.
The tests should help you understand how the parser works and what it does.
$ git clone git@github.com:rcorral/jison-dsl-parser-example.git
$ cd jison-dsl-parser-example
$ npm install
$ npm run-script build
$ npm test
MIT