I have had a look at the PEG.js parser generator for JavaScript. It looks pretty nice!
I don't have much experience with specifying grammars. I am searching for help to extend the example grammar at 1 a bit to allow for
- Decimal numbers
- Operator ^
- Predefined functions (not function declarations, only to call some functions that I specify beforehand), where arguments themselves are first order expressions, e.g. f(g(2+4) + 3)
- Variables A-Z (not declarations, only usage definitions -- these are meant to point to a input box that also contains a program, letters A to Z are sufficient)
Can you help me with where to find help to do that?