2 Gazelle: a system for building fast, reusable parsers
4 <http://www.reverberate.org/gazelle/>
9 This is experimental, immature software. A few things work, but a lot of
10 things don't. And everything is subject to change: the APIs, the grammar
13 Still with me? Great. :)
18 You need to have Lua installed to do anything interesting. The C runtime
19 doesn't need Lua, but without Lua you can't compile any grammars.
21 Gazelle should build out-of-the-box on UNIX-like systems if Lua is installed.
22 Ubuntu Linux and Mac OS X are tested. Just type make:
29 Now you can do fun things. First you'll want to set up your LUA_PATH,
30 which you can do using the easy "lua_path" script:
34 Now you can compile a grammar into byte-code.
36 $ lua compiler/compile.lua sketches/json.parser json.bc
37 Writing grammar to disk...
40 You can use dump_grammar to generate visual diagrams of the grammar in
43 $ lua utilities/dump_grammar.lua json.bc
46 $ dot -Tpng -o 1.png 1.dot (you have to have Graphviz installed for this)
49 You can also parse some data using gzlparse. However, you won't get
50 anything interesting from this (except a syntax error message if there
51 is a syntax error). Well, you can use this to find out how fast Gazelle
54 $ time ./utilities/gzlparse json.bc my-json-data.txt
60 what parses the grammar, turns it into state machines, and dumps into bytcode
62 compiler code that will not be needed once Gazelle is self-hosting
64 wrappers around the C runtime, for high-level languages (currently only Lua)
66 the tiny, fast, small-memory-footprint C runtime that actually does the parsing
68 code that is either half-written or for debugging-only
70 unit tests (not very many at the moment)
72 command-line utilities for doing useful things
77 Joshua Haberman <joshua@reverberate.org>