From: Eric Mahurin Date: 2005-04-17T03:25:40+09:00 Subject: Re: BNF-like grammar specified DIRECTLY in Ruby 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 --- Takaaki Tateishi wrote: > 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 > > Thanks, > -- > Takaaki Tateishi > > > __________________________________ Do you Yahoo!? Plan great trips with Yahoo! Travel: Now over 17,000 guides! http://travel.yahoo.com/p-travelguide