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
The short answer is yes, you can manipulate the tree (before walking, not
during).
I am using tree adapter manipulations to reorganize the AST, and then handing
the tree to the standard tree walker.
The only caution is that TreeIterator depends on parent pointers. I am
contemplating a version
On 6/11/11 3:16 AM, Terence Parr pa...@cs.usfca.edu wrote:
Hi Terrence,
Hi. Let me be more specific...I am going to serialize entire grammar as an
augmented transition network into any generated parser or lexer. This will
improve your recovery and error messages. There will be an API to
On Jun 11, 2011, at 7:40 AM, Ruslan Zasukhin wrote:
On 6/11/11 3:16 AM, Terence Parr pa...@cs.usfca.edu wrote:
Hi Terrence,
Hi. Let me be more specific...I am going to serialize entire grammar as an
augmented transition network into any generated parser or lexer. This will
improve your
Thanks for sharing your input. I am able to do some pretty complex AST
manipulation as stated initially. First results are very encouraging,
I am getting an end to end translation successfully.
Regards,
Vasan
On 6/11/2011 7:31 PM, Trevor John Thompson wrote:
The short answer is yes, you
Hello,
I'm working with Antlr to provide syntax highlight for Tcl (in
Netbeans). I have a problem with COMMENT token.
Basic version for one line comment looks like this:
COMMENT :
'#' (options {greedy=false;} : .)* NEWLINE
;
But comment in Tcl starts only at the beginning of a line with