Is there a way in which we can modify the input stream during parsing using Javacc ? I have a use case where I want to replace a token with a string during parsing and then parse that replaced string.
define var $x="2*2"; evaluate $x;
So, during parsing when I encounter any token that starts with $ like $x in this case, I should do an inline replacement and then parse it normally using Javacc.
So, from the above example, it means I should be parsing the following statement after inline replacement :
Is this possible in Javacc ? Can we modify the input stream, so that on seeing a special token I append its inline replacement to the input stream ?