0
votes

I am making a parser which handles multiple line input. The input program define some functions and main line is for the result. For example, define function A which has { x+3 } (x is parameter for function A). If main line call function A such as MAIN { A(1+3) }, then how can I call the function A to calculate the expression in the MAIN line.

1

1 Answers

1
votes

Normally your parser would translate the function to a representation that can be stored and interpreted later. See my answer to how do I implement loops (For) in javacc for more.