[antlr-interest] Re: summary of trip to Montreal/SableCC land

lgcraymer lgc at mail1.jpl.nasa.gov
Mon Nov 15 14:51:56 PST 2004



--- In antlr-interest at yahoogroups.com, Terence Parr <parrt at c...> wrote:
[snipped]
> Yes, a tool that lets you derive a new pass from a "template" grammar 
> is what we want. :)  I think diff3 that is ANTLR grammar based not text 
> based will do nicely :)
> 
> Ter

This should be fairly easy to implement.  diff works on an "alphabet"
which is usually taken to be lines of text (each unique line is a
"character" in the alphabet).  By changing the alphabet to be
non-whitespace tokens in a grammar file (TOKENs defined by antlr.g)
instead of lines and then mapping token sequence differences back to
lines, it should be fairly easy to get exactly what we would want. 
Since the core engine can be adopted from GNU diff3 or some other open
source baseline (if someone has done a simple Java version, that would
help), this is probably a good student project--only the adaptation of
input to ANTLRLexer identified tokens and the backend printer need to
be developed.  Both of those should be simple, and there are some good
software engineering lessons to be learned from the exercise.

--Loring

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