[antlr-interest] AST.getType() Question

Nico nico123 at adinet.com.uy
Fri Oct 17 14:40:53 PDT 2003


MessageI know, but I want to know the token name from the AST, outside parsing. I want to do it after it.
Any suggestions?
  ----- Original Message ----- 
  From: Arnar Birgisson 
  To: antlr-interest at yahoogroups.com 
  Sent: Friday, October 17, 2003 7:09 AM
  Subject: RE: [antlr-interest] AST.getType() Question


  Both Parser and TreeParser have a function "string getTokenName(int)". You should be able to use that.

  Arnar
    -----Original Message-----
    From: Nico [mailto:nico123 at adinet.com.uy] 
    Sent: 17. október 2003 01:23
    To: antlr-interest at yahoogroups.com
    Subject: [antlr-interest] AST.getType() Question


    Hi all.

    AST.getType() returns an int according to the created tokenTypes. 
    Is there any way to return the String Type Name of the Token, instead of the representing int?
    I mean, I want the String name of the Token Type, not the Name of the node.

    regards


    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20031017/f2e66e1d/attachment.html


More information about the antlr-interest mailing list