JavaCC using input as a 'token'

Bub

New Member
I've been puzzling over this for days and searching doesn't seem to give any results. Makes me wonder if it's possible. For example: \[code\]funct functionNAME (Object o) { o+1 };\[/code\]The point is that The user has to use the identifier 'o' within the curly braces and not some other identifier. This is of course specified by the input in the (Object o) part where 'o' can be anything. Basically the identifier within the curly braces must be the same as the identifier defined in the parameter. I know I can store the matched token and print it out to screen but is it possible to use it as a lexical token itself? Thanks.
 
Back
Top