News for hackers. Stuff that matters.
Re:The Lemon Parser Generator by hobo_mark on Tuesday September 29, 2015 @05:33PM (#10299828)
what kind of limitations did you find in the JavaScript ones?
Re:The Lemon Parser Generator by haxiomic on Thursday October 01, 2015 @10:21AM (#10311311)
There were a few aims I wanted to meet:

- Stick as closely as possible to the GLSL specification by using the reference grammar with minimal modification

- Produce a haxe version of the parser so I could do some haxe-compile-time magic with it

Haxe is fairly similar to javascript so I tried altering PEG.js to spit out haxe. The result was a 9000 line file which it turns out was too big to compile. ANTLR looked promising but it appeared to be a bit too much to work create a haxe port of the runtime.

Lemon was minimalistic and had a simple syntax which was fairly close to the syntax of the reference grammar. The core parser is only about 300 lines[0] and everything else is in data tables[1] which are generated by the lemon command line tool.

[0] https://github.com/haxiomic/haxe-glsl-parser/blob/master/gls...

[1] https://github.com/haxiomic/haxe-glsl-parser/blob/master/gls...