[antlr-interest] Getting column number in simple parser
togol machillan
togolmach2 at lycos.com
Tue Mar 1 01:52:34 PST 2005
Hi,
I am using a simple parser with no AST construction. Let me explain the rule that I am trying to write.
sentence: keyword (rest of the rule or subrules ...)
keyword: "Town"|"City"|"Land"|"Country" ;
Now I want to check the column number where the keyword occurs by using getColumn() or some other way in C++. I am new to ANTLR, so any help will be appreciated.
Regards,
T. Mach
----- Original Message -----
From: "Bryan Ewbank" <ewbank at gmail.com>
To: "ANTLR Interest" <antlr-interest at antlr.org>
Subject: Re: [antlr-interest] Getting column no. in parser
Date: Fri, 11 Feb 2005 13:15:54 -0500
>
> I think what you need is "#t->getColumn()" (i.e, the tree returned by
> t, rather than the function called t). If you look at the generated
> code, it should be clear that "t" is the name of a function.
>
> - B
--
_______________________________________________
Find what you are looking for with the Lycos Yellow Pages
http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10
More information about the antlr-interest
mailing list