Takaaki Tateishi
4/18/2005 3:06:00 PM
Eric Mahurin wrote:
> 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.
A rule of tdp4r is an instance of Rule, which consists of Proc objects and methods.
In order to handle a recursive rule easily, tdp4r uses methods.
> The samples you show parse strings. Can you parse files
> without reading the whole thing in?
It's possible if you define methods shift and unshift.
A parser read a token using shift and push it back using unshift.
> Can you do things with or without a lexer?
tdp4r doesn't provide a function of a lexer.
Thanks,
--
Takaaki Tateishi <ttate@ttsky.net>