[antlr-interest] Re: ANTLR 2.7.3 release candidate 3 available

lgcraymer lgc at mail1.jpl.nasa.gov
Fri Mar 19 14:45:34 PST 2004


--- In antlr-interest at yahoogroups.com, "micheal_jor" <open.zone at v...> wrote: 
> He want to know why you've decided to use
>    antlr.test.Parser       (or antlr::test::Parser)
>    antlr.test.TreeParser   (or antlr::test::TreeParser )
> 
> instead of the "original"
>    antlr.debug.Parser      (or antlr::debug::Parser)
>    antlr.debug.TreeParser  (or antlr::debug::TreeParser )

You mean "ParseTreeDebugParser, don't you?  I haven't looked at the rc3; maybe Ter put it in "debug" as "Parser" after our 
discussions.

At any rate, it is so I can specify a superclass package on the command line to override the default "antlr" for locating the 
CharScanner, Parser and TreeParser classes.  That way, you can use the same grammar to generate debugging code that you use 
for normal code output just by specifying "-super antlr.test" as a command line option.  I had originally thought to override the 
superclass grammars individually on the command line, but Ter convinced me that proliferation of command line options was evil; 
anyway, this is a cleaner approach.

I felt that Ter's parse tree debugging approach was elegant to be an add-on, so I've made it a built-in.  The antlr.test namespace will 
also includes a TestFilter class (grammar) that allow you to do each test case as a separate tree with its own derivation output.  It 
makes for a very satisfying ANTLR Unit test framework; the only thing missing right now is a working CharScanner class (and C# 
TreeParser class, but that should be easy--the debug TreeParser is quite similar to the debug Parser in both Java and C++).

--Loring

> Cheers,
> 
> Micheal



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
     antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 



More information about the antlr-interest mailing list