[il-antlr-interest: 32111] [antlr-interest] Debugging ANTLR tree grammar...

2011-04-06 Thread srinivasan karthikeyan pitchai
Hi All, I am a newbie to antlr. I am in the process of building a tree parser using the AST rewrite rules that I've coded in the parser grammar file. However I am running into RecognitionException when I use the tree grammar to parse the AST generated using the parser grammar. I've used the fol

[il-antlr-interest: 32743] [antlr-interest] AST rewrite

2011-06-11 Thread srinivasan karthikeyan pitchai
Hi Gurus, I'm a novice using ANTLR for a development project. I am at a stage where I need to rewrite AST so that the transformed AST renders itself more easy for me to walk and emit the translation that I need. In this context I've a concept question. In general, can I use the *same* tree

[il-antlr-interest: 32748] Re: [antlr-interest] AST rewrite

2011-06-11 Thread srinivasan karthikeyan pitchai
ng a version that does not have this dependency, so i can base my > trees on BaseTree, rather than CommonTree. > > On 2011 Jun 11, at 00:53, srinivasan karthikeyan pitchai wrote: > >> Hi Gurus, >> I'm a novice using ANTLR for a development project. I am at a stag

[il-antlr-interest: 33243] [antlr-interest] Deciphering the TreeWalker error message ...

2011-07-20 Thread srinivasan karthikeyan pitchai
Hi Folks, What does the ANTLR walker error message like the following mean? no viable alt; token=[@-1,0:0='DOWN' Would appreciate any general guidance/suggestions to zero in on the errors of this nature. Thanks, Vasan Input sql: --- select (1) from table1 where 2 between 3 and 4;

[il-antlr-interest: 33267] Re: [antlr-interest] Deciphering the TreeWalker error message ...

2011-07-20 Thread srinivasan karthikeyan pitchai
;>> Mostly the error says that you started a subtree that your grammar >>> does not match, probably an LPAREN or RPAREN rooted subtree from your >>> report of cases where you do or do not get the error. >>> >>> --Loring >>> >>> >>&

[il-antlr-interest: 33268] Re: [antlr-interest] Deciphering the TreeWalker error message ...

2011-07-20 Thread srinivasan karthikeyan pitchai
Thu, Jul 21, 2011 at 3:15 AM, Loring Craymer >>> wrote: >>> >>>> "UP" and "DOWN" tokens (start/end of child list for tree) do not have >>>> location information attached so no line/column error reporting. >>>> Mostly the err

[il-antlr-interest: 33270] Re: [antlr-interest] Deciphering the TreeWalker error message ...

2011-07-20 Thread srinivasan karthikeyan pitchai
Vasan On 7/21/2011 10:59 AM, srinivasan karthikeyan pitchai wrote: > Hi Folks, > I forgot to mention. The compoundExpression rule has options{backtrack > = true;} set that is it reads like > > compoundExpression > options {backtrack = true;} > : >^(scl

[il-antlr-interest: 33271] Re: [antlr-interest] Deciphering the TreeWalker error message ...

2011-07-20 Thread srinivasan karthikeyan pitchai
rules as the first element of a tree, its just not > something that turns up in my tree grammars. > > Regards > Gary > > On Thu, Jul 21, 2011 at 3:29 PM, srinivasan karthikeyan pitchai< > srinivasan.karthikeyan.pitc...@oracle.com> wrote: > >> Hi Folks, >> I forgo

[il-antlr-interest: 33305] Re: [antlr-interest] Deciphering the TreeWalker error message ...

2011-07-22 Thread srinivasan karthikeyan pitchai
Hi Folks, I take on board the unanimous input that the tree grammar rule should start with TOKEN. However what keeps me puzzled is that, inspite of having all my rules intact and just slightly rejigging my alternatives make the tree grammar parse the input tree perfectly fine. I am able to par