[il-antlr-interest: 27841] Re: [antlr-interest] anybody using dynamic scopes?

2010-02-09 Thread kferrio
Don't do it on my account, but I think I would use it because it looks much more transparent and maintainable. As a new and occasional user, my biggest challenge is getting my head back in the game after some time away from the code. This would help. Kyle Sent from my Verizon Wireless Black

[il-antlr-interest: 27840] [antlr-interest] anybody using dynamic scopes?

2010-02-09 Thread Terence Parr
Hi, Is anybody using scopes? E.g., here is the use C grammar: scope Symbols { Set types; // only track types in order to get parser working } Every rule that declares its usage of Symbols pushes a new copy on the stack effectively creating a new symbol scope. translation_unit scope Sy

[il-antlr-interest: 27839] Re: [antlr-interest] Grammar composition in v3, multiple packages, no joy

2010-02-09 Thread Jim Idle
> -Original Message- > From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- > boun...@antlr.org] On Behalf Of Christian Nentwich > Sent: Tuesday, February 09, 2010 3:23 PM >... the difference in grammar inheritance. This is the situation here - > note, no > lexers involved, onl

[il-antlr-interest: 27838] [antlr-interest] Grammar composition in v3, multiple packages, no joy

2010-02-09 Thread Christian Nentwich
Hi all, I'm a long time user of ANTLR, and have recently gone through the painful but definitely useful exercise of moving from v2 to v3. I have now hit a point where I am stuck, with no workaround in sight, due to the difference in grammar inheritance. This is the situation here - note, no lexer

[il-antlr-interest: 27837] Re: [antlr-interest] Unknown method for CommonTreeNodeStream: getNodeIndex

2010-02-09 Thread fridi
Hi Terence, could you please give me a hint which one of the examples fits best the if-then-else problem? thanks in advance, fridi. Terence Parr schrieb: > Hi Steven, I'd recommend staying away from tree-based interpreters that need > to jump around. The code samples for my book, which are free

[il-antlr-interest: 27836] Re: [antlr-interest] Using $ as delimiter in StringTemplate from ANTRL rewriter grammars

2010-02-09 Thread Janico Greifenberg
Thanks Terence, Andre, I had somehow failed to see the setTemplateLib method. Seems obvious in hindsight... Anyway, it works now. Janico On Tue, Feb 9, 2010 at 4:37 AM, andre rutti wrote: > Hi Janico, > > when you create the string template, you can specify which 'TemplateLexer' > to use; what

[il-antlr-interest: 27835] Re: [antlr-interest] NoViableAltException remains undetected

2010-02-09 Thread Terence Parr
if it stops at bad input, you might have startRule : stuff+ ; instead of startRule : stuff+ EOF ; Ter On Feb 9, 2010, at 10:53 AM, John Pool wrote: > I have a grammar for which the parse tree in the ANTLRWorks interpreter > correctly shows a NoViableAltException-box for certain input sentences

[il-antlr-interest: 27834] [antlr-interest] NoViableAltException remains undetected

2010-02-09 Thread John Pool
I have a grammar for which the parse tree in the ANTLRWorks interpreter correctly shows a NoViableAltException-box for certain input sentences. In my C# test rig, however, this exception is not thrown. The parser simply stops at the erroneous input (as if it were an ), which can be seen from the ge

[il-antlr-interest: 27833] Re: [antlr-interest] Creating AST with third party grammar

2010-02-09 Thread John B. Brodie
On Tue, 2010-02-09 at 10:17 -0800, tahiti wrote: > No, I confused right for lack of return type of this methods. The method > query() that parse entire query has return type boid. It is only modify the > state of the parser class state._fsp located in base class of Parser: > RecognizerSharedState.

[il-antlr-interest: 27832] Re: [antlr-interest] Creating AST with third party grammar

2010-02-09 Thread tahiti
No, I confused right for lack of return type of this methods. The method query() that parse entire query has return type boid. It is only modify the state of the parser class state._fsp located in base class of Parser: RecognizerSharedState. I suppose that after calling this method I must to use s

[il-antlr-interest: 27831] [antlr-interest] Help needed with LL(*)-type grammar

2010-02-09 Thread Florian von Walter
Hi, I'm new to working with ANTLR and ANTLRWorks. I really appreciate what ANTLR and ANTLRWorks offer and purchased "The Definitive ANTLR Reference" and "Language Implementation Patterns" to get a better understanding on how to use ANTLR. I have some background with lexers and parsers and EBNF. I