Jison v0.2.0
- From:
- Zachary Carter
- Date:
- 2010-12-18 @ 20:55
Get it:
npm install jison
The lexer has been much improved in this version – enough to warrant a
minor version bump, in fact. Two new features I love are start
conditions and not having to put braces around one line actions. Start
conditions make the lexer strictly more powerful and should allow you
to describe more complex languages without the hacky work-arounds.
More on them: http://zaach.github.com/jison/docs/#lexical-analysis
Also added are "not" look-aheads:
"foo"/!("bar"|"baz") return 'FOO'
This would match a "foo" not followed by "bar" or "baz". This feature
diverges from flex.
Another improvement in this version is the command line interface
(thanks to nomnomargs):
$ jison -h
usage: jison <file> <lexfile> [options]
file Grammar file
lexfile Lexical grammar file (optional)
options:
-o FILE, --output-file=FILE Filename and base module name of the
generated parser
-t, --debug Use debug mode
-V, --version Version number
(Yes, there is a debug mode, but it could use some attention.)
Also, of interest to contributors, the test suite and make tasks
should all run smoothly with Node. There's currently one failing test
in the suite, which you can safely ignore. To build and preview the
website, you need ruby and the nanoc gem.
Thank you to everyone here for the patches and suggestions!
--
Zach Carter