Dhaka 0.0.4 released

To recap, Dhaka is an LALR1 parser generator written purely in Ruby (see
http://dhaka.rubyforge.org).

It is now much faster in its generation capabilities than its initial
release and adds several new features:

  • Supporting conflict resolution in ambiguous grammars via declarations
    for
    precedences and associativities a la Yacc
  • Writing syntax-trees to dot format
  • Dumping gobs of information about conflicts and, optionally, debugging
    and
    progress information

Everything’s backwards compatible with 0.0.1 (and will continue to be).

There’s a new example illustrating the precedence features at:

http://dhaka.rubyforge.org/example2.html

What’s next:

Ruby’s grammar

I’ve converted the Ruby Yacc grammar specification in parse.y to a Dhaka
specification. This is purely an academic exercise to help push Dhaka’s
limits. Turns out there are some nasty reduce-reduce conflicts nestled
deep
within the Ruby grammar. Right now, the parser generator throws up an
exception on RR conflicts (they’re bad and should be avoided like the
plague). Nevertheless, some kind of resolution strategy for such
conflicts
is called for. I’m not sure Yacc’s is the best one to follow. If anyone
has
any thoughts on this matter, let me know.

Error recovery

There’s error handling, but no error recovery. Specifically Yacc’s
special
‘error’ symbol has no counterpart in Dhaka. I’m wondering if I should
include this. Suggestions?

Mushfeq.