Myself, Coding, Ranting, and Madness

The Consciousness Stream Continues…

Shift-Reduce Conflicts

23 Aug 2010 10:30 Tags: None

Information in this post is reproduced, with permission, from Anthony Byrant's Blog (link), which is well worth a read especially given his current project is the construction of a tokeniser/parser/compiler(?) for a generified language.

Not only is he doing that, he's doing it using his own home-brewed LALR(1) parser, which is quite a big project in it's own right.

The mirror of the grammar is availiable here (retrieved 23/08/2010 15:09+0100). "Language X" has a lot of in built tuple support: the following are expected to parse correctly, for example: class X { void foo() { (a>>, unsigned int) variableName; } } class X { void foo() { (a>>h).functionName(); } } (Examples taken from The Facebooks)

Now, the post I was going to makes here originally has lost most of it's relevence since finding out more about the project (specifically that the project is using a custom LALR(1) parser), but you can still read an abridged version in the comments to the post on Shift-Reduce conflicts. Regardless, take a read. More commentary when I've had time to think :)