[antlr-interest] Support to Ter, questions

Jim Idle jimi at temporal-wave.com
Mon Jul 2 07:41:19 PDT 2007


> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Christian Boitet


>    Our case: Jean-Claude Durand and I have been
> building C++ compilers with ANTLR and previously
> C compilers with PCCTS for some time: knowing
> ANTLR-3.0 cannot yet generate C++, we simply
> continue to use ANTLR-2.

Sensible words indeed. There is a version that can be used and if the docs or a target or something isn’t there for one yet in 3.0, then stay with 2.0. Polite requests for features and so on always seem to be welcome though, especially if they seem to be useful for many.

> Questions (or remarks?):
> ---------
> To recap what we suspect are bugs in ANTRL-2:
> 
> - using the "à" character (à) anywhere in
> a xxx.g file, even if only in a comment, causes
> ANTLR to abort.

This is not a bug, it is just that Ter hates à the grave is a freeloader on the whole latin-1 race... ;-) It does rather sound like a bug though.

> 
> That leads to the following question: is there a
> way in ANTLR-2 to include rules from files?
> 
> - #include is used by the C or C++ preprocessor,
> but apparently not by the ANTLR preprocessor.
> - What we want is to build several compilers (for
> reengineering a variety of existing specialized
> programming languages sharing many parts of their
> syntax), and not to build one huge compiler with
> many options, and smaller compilers for
> increments.
> - For instance, we have a compiler for a whole
> tree rewriting system, containing a block of
> procedures, another one for a "control graph",
> and one for a set of rules. An increment may be a
> whole such block, or a rule, or various parts of
> a rule (nome+parameters, lhs, rhs).

Grammar inheritance is a future feature of, you guessed it, ANTLR3 :-)

Jim


More information about the antlr-interest mailing list