|antlr output with J# firstname.lastname@example.org (2005-10-02)|
|Re: antlr output with J# email@example.com (George Neuner) (2005-10-04)|
|From:||George Neuner <firstname.lastname@example.org>|
|Date:||4 Oct 2005 01:44:40 -0400|
|Posted-Date:||04 Oct 2005 01:44:40 EDT|
On 2 Oct 2005 02:50:50 -0400, email@example.com wrote:
>Does anyone know if it's possible to use antlr output with J#?
>Basically the question boils
>down to would antlr ever generate code which used a java api library
>above 1.1 or language feature above jdk 1.1 (J# supports these with
>some exceptions which I can't imagine antlr output would ever use).
I don't know whether ANTLR Java code will run under J#. It would be
best to ask ANTLR's creator, Terence Parr. You can find his email
address at www.antlr.org or ask in comp.compilers.tools.pccts.
>Just using antlr's C# output wouldn't be ideal because this is for a
>library which may need to used in both a java environment and a .NET
>one and my thinking is that if I can stick to the subset of java 1.1 J#
>supports I can keep maximum flexibility.
One issue you may run into is with Java's method code size limitation.
Depending on the complexity of your grammar, the generator could
create some very long methods that just won't compile. It is very
_unlikely_, but it can happen.
Another possible solution, if you can stand it, would be to use PCCTS.
It is not as sophisticated, but it works the same way as ANTLR and
generates C code which could be called from either .NET or Java. The
primary drawback is that it does not also generate a lexer. It comes
with a separate lexer tool called DLG, or you can use (F)lex.
Return to the
Search the comp.compilers archives again.