[antlr-interest] Re: Why ANTLR 2.x?

lgcraymer <lgc at mail1.jpl.nasa.gov> lgc at mail1.jpl.nasa.gov
Fri Jan 10 18:13:42 PST 2003


Just to throw in my 2 cents.  PCCTS has a definite documentation 
advantage over ANTLR 2 for teaching purposes; that should change after 
Ter puts together a set of lecture notes for his course.

I must also note that Ter's book is not really a comprehensive manual. 
 There is material in the PCCTS release notes that did not make it 
into the book (I can't remember what just offhand, but it was enough 
to make the release notes a required reference), and the latest 
version of Tom Moog's "Notes for New Users" is a definite must.

The disadvantages of PCCTS are
    1.) it's a dead-end product--there is a definite advantage to 
starting students on a path that they might immediately pursue as 
hobby (Java is everywhere) along the way to using 
ANTLR professionally.
    2.) The EBNF notations for ANTLR 2 and PCCTS are different.
    3.) SORCERER is an add-on, not an integrated component.

--Loring


--- In antlr-interest at yahoogroups.com, "John D. Mitchell" 
<johnm-antlr at n...> wrote:
> >>>>> "ksvanhorn" == ksvanhorn <kevin vanhorn at ndsu nodak edu> 
<kevin.vanhorn at n...> writes:
> [...]
> > I am planning to use PCCTS 1.33 in a compiler course I am 
teaching.
> 
> I've used both for a long time. [Wow, has it really been a decade?]
> 
> What's the nature of your course?  I.e., is it a basic undergraduate
> introduction to languages and translators (grammars, LR, pred-LL(k),
> lexing, syntax directed translation, etc.) or is it more of a 
graduate
> level course (multi-phasic, IR building and optimization, code 
generation,
> etc.)?
> 
> 
> > The reasons I am using this instead of ANTLR 2.x are
> 
> > - PCCTS 1.33 comes standard with RedHat Linux 7.3.
> 
> So? Antlr is a free download. 
> 
> 
> > - PCCTS 1.33 has a comprehensive manual (Language Translation 
Using PCCTS
> > and C++), whereas ANTLR 2.x has no such comprehensive 
documentation, to
> > my knowledge.
> 
> Hmm... Is the PCCTS book even still in print and available?
> 
> Have you looke at the antlr.org web site?  There's documentation, 
examples,
> the FAQ on the site and then there's this mailing list.
> 
> 
> > - ANTRL 2.x is a Java application.  It has been my experience that 
Java
> > apps are painfully slow, awkward to use, and difficult to install. 
 (I
> > always run into problems with having the right version of Java 
required
> > for an app, and then you have to worry about getting CLASSPATH set
> > correctly, etc.)
> 
> Sounds like you're stuck in C-land. :-)  Trying moving up to Java 
v1.4.1.
> 
> Personally speaking, I'm a bit scared of programmers who (try to) 
write
> translators but can't be relied upon to install the necessary 
toolchains
> (whether that's GCC + flex + yacc + homegrown or GCC + pccts + 
sorcerer or
> Java + Antlr).
> 
> In terms of "benchmark" performance, the speed differences really 
depend on
> what you're doing -- Swing-based GUI application in Java tend to 
really
> suck performance-wise (unless y'all are running Mac OS/X machines -- 
which
> has hardware-accelerated drivers for Swing :-).  For me, in building 
real
> translators, the productivity gains in using Java vastly outweigh 
any
> purported performance differences.  [ObKnuth: "Premature 
optimization is
> the root of all evil in computer science."]
> 
> 
> > Are there any compelling reasons to use ANTRL 2.x over 1.33?
> 
> The (vast?) majority of people available to help, including Ter, are 
using
> Antlr rather than the old PCCTS stuff.
> 
> Garbage-collection.  Java has it, plain C doesn't.
> 
> Antlr also has support for writing your code in Java or C++ or... 
Which
> would give you or your students the flexibility to choose which one 
they'd
> e.g., feel more comfortable using.  More work for the graders but 
I've
> always found that flexibility to be particularly nice in courses.  
As the
> instructor, this is an easy lead-in to interoperability. :-)
> 
> 
> IMHO, the only reason to use the old PCCTS stuff is if you want to 
really
> get into hoisting and that's a weak argument.
> 
> Hope this helps,
> 		John


 

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



More information about the antlr-interest mailing list