[antlr-interest] thoughts on parsing entity payloads

Terence Parr parrt at cs.usfca.edu
Sun Nov 14 09:41:57 PST 2004


Gang,

Just a couple of thoughts after scanning through the email threads.

Re: buffer copying etc...

To be clear, the current implementation assumes that the entire input 
will be in memory, with hooks to not do this.  An AST points at a token 
which points into a token buffer.  No chars should be copied; no 
strings should be created.

Re: single info "payload" object

Interesting.  The lexer creates a single object that is the token and 
also the tree node.  Interesting.  Saves n memory allocations (and 
associated GC cost later).

As for more thinking about trees: after I perfect lexing / parsing, I 
will turn my attention to trees (though I read what all you just said). 
  Progress is definitely being made on 3.0--it is a thing of beauty; I'm 
just about done with a testing rig that lets you interpret any grammar 
(ignoring actions) w/o generating code and compiling.  Useful for 
testing and very useful for GUI prototyping tool anticipated to begin 
next semester with a hot shot programmer. :)

Terence
--
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!





 
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