lezer how to How to implement addition, subtraction, multiplication and division operations

like antlr4 visitor or listener mode

Get result from input

Lezer doesn’t run user code when building the parse tree. But you can of course iterate the resulting tree to compute results from it.

Do you have any reference examples or code?