[il-antlr-interest: 33482] Re: [antlr-interest] Exception when generating tree grammar

2011-08-04 Thread Luigi Iannone
Hi, unfortunately the removal of the whitespace does not solve it. I get the same error. Cheers, Luigi On 4 Aug 2011, at 14:02, Stephen Tuttlebee wrote: Hi Luigi, At first I was thinking, why the heck are you getting an error about a missing StringTemplate file when you have an AST as

[il-antlr-interest: 33485] Re: [antlr-interest] Exception when generating tree grammar

2011-08-04 Thread Luigi Iannone
It works, Thanks, Luigi On 4 Aug 2011, at 15:41, Stephen Tuttlebee wrote: Well, to refresh my memory on this term rewriting stuff you're doing, I looked at Terence Parr's Language Implementation Patterns book which has a section about this (if you have the book, it's p138 in the pdf

[il-antlr-interest: 33452] [antlr-interest] Exception when generating tree grammar

2011-08-01 Thread Luigi Iannone
Hi all, the purpose of the following grammar is to simplify trees. The idea is to remove CONJUNCTION and DISJUNCTION nodes that have only one child tree grammar ManchesterOWLSyntaxSimplify; options { language = Java; tokenVocab = ManchesterOWLSyntax; ASTLabelType =

[il-antlr-interest: 33277] [antlr-interest] Left recursive grammar

2011-07-21 Thread Luigi Iannone
Hi all, I have this simple grammar grammar test; options { language = Java; output = AST; } a : a*B -^(B a*) | A ; B : '.B' ; A : 'A' ; and I get the following output when I

[il-antlr-interest: 28648] Re: [antlr-interest] Imported parser tokens mismatch

2010-04-15 Thread Luigi Iannone
Message- From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- boun...@antlr.org] On Behalf Of Luigi Iannone Sent: Thursday, April 15, 2010 6:45 AM To: ANTLR Subject: [antlr-interest] Imported parser tokens mismatch Hi, I am struggling to re-use tokens across grammars. I have two

[il-antlr-interest: 28453] [antlr-interest] Importing problems

2010-03-31 Thread Luigi Iannone
Hi I have built a lexer grammar, and a combined one which should import it. The problem is that as soon as I try to import using the following code in my combined grammar grammar ManchesterOWLSyntax; import ManchesterOWLSyntaxLexer ; main: IDENTIFIER ; I get the

[il-antlr-interest: 28454] Re: [antlr-interest] Importing problems

2010-03-31 Thread Luigi Iannone
Hi, strangely enough, I changed the name of the lexer to one which is not a sub-string of the combined grammar's name and it works fine. Luigi On 31 Mar 2010, at 23:29, Luigi Iannone wrote: Hi I have built a lexer grammar, and a combined one which should import it. The problem