[antlr-interest] Re: suggested ANTLR projects?

Terence Parr parrt at cs.usfca.edu
Wed Aug 13 10:57:07 PDT 2003


On Tuesday, August 12, 2003, at 05:42  PM, tbrandonau wrote:

> As far as the Workbench, I would suggest considering Netbeans rather
> than Eclipse as they have more stuff for that sort of thing until
> (and if) the Harmonia
> (http://www.cs.berkeley.edu/~harmonia/harmonia/index.html)
> Eclipseport comes out. Eclipse have, from the brief look at their
> site (don't use it) no support for Editors (I imagine there's support
> for adding them but nothing for making them). Netbeans on the other
> hand have a Lexer module (http://lexer.netbeans.org/) that does
> incremental lexing using an Antlr lexer (interesting in itself).
> There is a syntax colouring bridge that allows for the creation of a
> Swing editor set on top of such a lexer. Which IDE is better is a big
> question, but perhaps Netbeans is better for developing, which is
> important here. There is an Antlr project for Netbeans but it is no
> longer maintained and is out of date with the Netbeans APIs, so would
> pretty much be a rewrite.

I think what we'll probably do is try to get a random prototype thing 
that tests ideas out this semester.  Once we know what the issues and 
such we can take a strategy to get it integrated into the various IDEs. 
  I think this is a proper software "engineering" idea.  Learn about the 
problem and then design a solution ;)

I like the idea of the incremental parsing stuff... Sounds like Spring 
2004's masters project class could have a student work on that. ;)  
I'll be teaching the graduate programming language course again in the 
Spring.

> As to grammars, I would suggest a rewrite of the Antlr grammar and
> possibly the Antlr tool on top of it. To create a TreeParser and put
> the code generation hooks in that rather than the Parser. This could
> then be built on for Antlr 3, and would be helpful (if not necessary)
> for an Antlr editing tool (if you do high-level analysis, the Antlr
> lexer ain't too bad, and is seperate from the rest, bar the nasty
> options\tokens\actions hack).

I have a very clean ANTLR grammar parser that generates a tree and I 
have tree parsers that do a variety of things like print it back out 
w/o actions.  I can post this if people would like to check it out.  I 
believe I ignore the options and other stuff, focusing on the grammar 
elements--I'm using it to build the new grammar analysis engine.

Soon I should a very clean and nice full LL(k) analysis engine that 
will be the core of the workbench project. :)  Trying to prep for class 
and work on this at the same time. After 15 years, I believe I 
understand the problem enough now to implement it in a very simple 
manner. ;)

Aside from features and clean up of ideas etc... for ANTLR 3, a HUGE 
motivation is to finally produce a bunch of code I'm proud to have 
people look at.  ANTLR has always been a gawd-awful messy prototype w/o 
rigorous testing facilities and was used as an experimental-ideas 
workhorse for me.  This new version will be written specifically for 
readability, testability, encapsulation, rigor, beauty.  Heck, I've 
already rewritten the analysis part 3 times since May ;)  I'm building 
tests first and then working on the code.

Once the analysis engine is done (the hard part) [yes, johnm with 
hoisting!!], I will focus on writing a whitepaper describing the new 
system and then writing the complete manual.  We'll need people to 
evaluate the functionality, consistency, flexibility etc... and then 
once we all agree it's about right, I'll start from a blank page and 
carefully craft the core system.

I will be focusing a great deal of effort on the code emitters (i.e., 
how you generate parsers) so that making a code generator for a new 
language is really simple.  Part of this focus will be precisely 
defining what a code generator has to do and what the functionality 
must be for tree stuff etc...  There will be multiple levels of 
compliance like generates parsers then handles trees then handles tree 
rewrites etc...  I'm even going to have a serialized text-based form of 
the intermediate representation so that you could, for example, read in 
the intermediate stuff generated by antlr in python and generate python 
parsers w/o ever touching Java (ANTLR's core implementation language).

Anyway, now that I'm back in academia at USF, I'm going to do this 
"right".  No more doing something "fast" instead of "right" because I 
have to finish my thesis or focus on making money ;)

Enough blabbing for now... :)

Terence
--
Professor Comp. Sci., University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Co-founder, http://www.jguru.com
Co-founder, http://www.knowspam.net enjoy email again!
Co-founder, http://www.peerscope.com link sharing, pure-n-simple




 

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




More information about the antlr-interest mailing list