[antlr-interest] newline() -> parser; Ter adds 3.0 status report

Terence Parr parrt at cs.usfca.edu
Sat Jun 26 15:53:47 PDT 2004


On Jun 26, 2004, at 2:45 PM, Kaleb Pederson wrote:
> Sounds great!  I'm soooo looking forward to Antlr-3!

Me too ;)

I just today got (...)+ (...)* (...)? and wildcard code generation 
working (for Java).  Woohoo!

I had to think really really hard about the precise behavior we want 
from + and * loops.  Further, how does greedy affect them and how does 
it get implemented in the analysis.  Turns out it's all verrrrrry 
smooth.  The new DFA-based lookahead just always seems to do the right 
thing magically.  I'm doing the happy dance.

My goal is to get ANTLR 3 together enough to handle the (upgraded) java 
lexer/parser/treeparser and then build a C code generator as it's 
pretty different (non-OO, header files, ...).  Then error 
reporting/recovery for generated parsers and more importantly tool 
nondeterminism warning stuff.  Then attributes, trees, templates, and 
other goodies.

All the while I have to be writing specs, papers, and doc. ;)

Oh, I've completed separated the antlr java runtime into its own 
package.  It's currently only a measly 350 lines and is enough to 
lex/parse some simple stuff.  Entire project is only 17k lines so far 
and it has full analysis including semantic predicate hoisting and the 
core of the code generator.  The java string template file is 250 lines 
(it describes what the Java output should look like).  For example, 
here is how I know what a parser looks like in Java:

parser(name, tokens, rules, DFAs) ::= <<
class <name> extends Parser {
     <tokens:{public static final int <attr.name>=<attr.type>;}; 
separator="\n">
     public <name>(TokenStream input) {
         super(input);
     }
     <rules; separator="\n">

     <DFAs>
}
 >>

The arguments and this file format are new for StringTemplate 2.0. :)

Ter
PS	Yes, i make backups of this stuff constantly in case my box goes to 
the "big network in the sky" ;)
--
CS Professor & Grad Director, University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Cofounder, http://www.jguru.com
Cofounder, http://www.knowspam.net enjoy email again!
Cofounder, http://www.peerscope.com pure link sharing





 
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