Posted By: Ben Yu
Date: 2006-10-15 00:24
Summary: rparsec
Project: rparsec
rparsec (http://jparsec.codehaus.org/Ruby+Parsec) is the Haskell Parsec implemented in Ruby.
With rparsec, parser construction can be done within Ruby without a need of extra BNF file (as in ANTLR). Full power of the Ruby language can then be employed to get the work done handy and elegant.
Feature hightlight:
Operator precedence grammar
Dynamic grammar, context-sensitive grammar.
A calculator parser takes 10 lines of code; A sophisticated sql language parser takes only about 250 lines of code.
|
|