Ruby Top Down Grammar

This project tries to implement a reusable top-down grammar of the Ruby language.

It may be used to

This Ruby grammar can be classified as a non-exhaustively backtracking, non-deterministic top-down parser.

The ruby grammar is written in a parsing specific language in Lisp syntax. This decision was made because it is simple to parse. An implementation of this definition language takes a few hundred lines (well, in elisp). This facilitates bootstraping.

Another goal was to avoid 'semantic actions' written in an arbitrary language. This is necessary for seriously targetting multiple host languages.

Currently there exists a translator to elisp, a (dated) interpreter written in elisp, and a translator to C.

Errors and warnings in the Ruby grammar had no priority in development so far, so syntactically wrong code is still accepted and there are no warnings.

The rubyforge page is http://rubyforge.org/projects/ruby-tp-dw-gram/

You can get the subversion repository via svn checkout svn://rubyforge.org/var/svn/ruby-tp-dw-gram