[antlr-interest] Tree parsing problem

Serafettin Senturk serafettin_sentuerk at intergral.com
Thu May 19 01:26:49 PDT 2005


  Hello,

  I am trying to display variables with dots like (a.b.c.d) in my AST
generated by tree parser. For this reason, I have written the following rule
in my parser:

  identifier
	:
		IDENT (DOT! IDENT)*
		{#identifier = #(#[ILIST,"ILIST"], identifier);}
	;

   The following is the one that i have written in my tree parser grammar:

	ilist
	:	#(ILIST (IDENT)*)
	;

   In this case, i cannot see the DOTs(.) in my AST. But i want to include
DOTs in the AST and see them. When i write (DOT^) or only DOT in my parser,
it does not work. Does anybody have an idea how i can include this DOTs in
my AST?

  Regards,
 Serafettin







More information about the antlr-interest mailing list