[antlr-interest] Dynamically changing inputstream or AST node structure during parsing ?

Xavier Benveniste xavier.benveniste at free.fr
Fri Aug 5 06:55:30 PDT 2005


Hi,

I would like to know if it is possible to change the input stream (or AST node structure) during parsing.
For instance, let's say that I have to interpret a 'function'  expression like this :
<<
int x=1
if (x < 10) then x=f02() endif
return x
>>

where f02 is also 'function expression' stored in a file for example,
and which definition is :
<<f02():int { return 25 }>>

Is is possible to have the original input stream changed to 
<<
int x=1
function f02():int {
 return 25
}
if (x < 10) then x=f02() endif
return x
>>

?

Regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20050805/16a02bb9/attachment.html


More information about the antlr-interest mailing list