AST Rewrite issue
0 posts in topic
Thread View Thread View

AST Rewrite issue...
Mon Jul 02, 2012 10:36 AM

I am trying to create an AST tree with a label as a root node, however, no matter how I do the rewrite rule for label, I cannot get the full label to show up in my AST tree. If I  do not include a rewrite rule, I get a blank in my tree. If I assign reference variables and use those in my rewrite rule, I can only get one letter to show up. Here is my grammar with no rewrite for label:

data_part : label (hex2 | hex4)+  '<DBLOCK_END>'  -> ^(label hex2* hex4*) ;
label : alpha_character ('_' | alpha_character | digit)+  ; 

How can I get my entire label to show up in the tree?


About | Sitemap | Contact