ANTLR - accessing token values in c/c++
- by Bernhard Schenkenfelder
Hello,
I am trying to parse integers and to access their value in antlr 3.2.
I already found out how to do this in Java:
//token definition
INT : '0'..'9'+;
//rule to access token value:
start : val=INT {Integer x = Integer.valueOf( $val.text ).intValue(); }
;
... but I couldn't find a solution for this in C/C++. Does someone know how to do this?
Bernie