o
import. Whether I do or not, I get compile errors trying to debug the
grammar.
So I guess I'm asking two questions: why can't combined grammars import
other combined grammars, and does anyone have any suggestions for how to
best handle this situation?
Thanks a lot in advance!
Mike
-
lexer class that mentions all the token names and has
overridable lexer rules. Not sure if that can even happen.
Thanks in advance for any tips...
--
Mike J. Bell on gmail
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/ant
ns will get out of sync.
You meant tokenVocab...thanks, this did the trick!!! (I get warnings
about "no lexer rule corresponding to token ..." but the generated
code seems to be OK).
Thanks!!!
--
Mike J. Bell on gmail
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Uns
;t seem to be able to
get the (ANTLR) grammar right to make this happen.
Any ideas? Does this happen a lot to you tree parser gurus? Any wealth of
knowledge besides the ANTLR wiki on tree parsing lore?
Thanks in advance,
Mike
--
Mike J. Bell on gmail
--~--~-~--~~~
lly)...
> collection returns [String value]
> :
>( t=thing
> { $value += $t.text; }
>)*
> ;
>
This was the trick...thanks!
--
Mike J. Bell on gmail
--~--~-~--~~~---~--~~
You received this message because you are subscrib
. Is there a simple way to turn on debugging for token or tree node
streams? I can't seem to get my weird case to run in ANTLRWorks, so I'm
running standalone, and I don't have the nice parse trees or ASTs or
event/stack viewers...so it would
in the
future. Surely there must be some way I can express this tree splicing in
ANTLR directly?
Thanks again in advance for any ideas...
--
Mike J. Bell on gmail
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
&
And here's my solution:
subordinate[CommonTree subAST] : -> ^({$subAST});
somerule: body = subordinatebody subordinate[$body.node] ;
There we go! Just had to read the string template pages really carefully to
figure it out.
Mike
On Fri, May 29, 2009 at 10:07 AM, Mike J. Bell wrot