[antlr-interest] TreeParser Prob...

Guido Schwab 14.08.99 at gmx.de
Fri Aug 4 04:41:20 PDT 2006


Hi!

Is it possible (when yes, howto) to assign the content of different 
"words" to a single string?

eg.:

input:
  TOKEN1 this is a word TOKEN2

Lexer:
  WORD : ('A'..'Z'|'a'..'z')

TreeParser:
//This does not work, I know... but s.t. that way
  sentence: #(TOKEN1 a:(WORD)+ TOKEN2)
{
  String xy = new String(a.getText());
}


Thanks,
Guido


More information about the antlr-interest mailing list