That is similar to what I'm doing. A primary difference
between what you are doing and I am is that for yours a rule is
a proc/method and for mine a rule is an object. I think the
way I did it is cleaner, but having a rule as a proc does make
it easier to have local variables in a rule. I have to pass
variables in a rule around in the parse tree (preferred) or via
globals (yuck).
The samples you show parse strings. Can you parse files
without reading the whole thing in? Can you do things with or
without a lexer? The way I have it set up a lexer is optional
and a lexer can be built out of the same parse classes.
We could collaborate off-line if you wish...
Eric
Eric Mahurin wrote:
> Here is my first contribution to Ruby:
> http://raa.ruby-lang.org/project/syntax/Let me inform you that I'm also developing similar library
TDP4R.
http://rubyforge.org/projects/tdp4r
Some examples are available at:
http://rubyforge.org/cgi-bin/viewcvs.cgi/tdp4r/samples/?cvsroot=tdp4r
···
--- Takaaki Tateishi <ttate@ttsky.net> wrote:
Thanks,
--
Takaaki Tateishi <ttate@ttsky.net>
__________________________________
Do you Yahoo!?
Plan great trips with Yahoo! Travel: Now over 17,000 guides!
http://travel.yahoo.com/p-travelguide