Work towards getting it to run in a web page.

This commit is contained in:
Simon Brooke 2024-06-09 00:55:28 +01:00
parent 1dfc487fd9
commit d5b1b91315
6 changed files with 168 additions and 41 deletions

8
docs/js/grammar.bnf Normal file
View file

@ -0,0 +1,8 @@
EXPRESSION := NUMBER | NUMBER <SPACE> OPERATOR <SPACE> EXPRESSION
<NUMBER> := #'[IVXLCDM]+'
<OPERATOR> := ADD | SUBTRACT | MULTIPLY | DIVIDE
ADD := <'+'>
SUBTRACT := <'-'>
MULTIPLY := <'x'> | <'*'>
DIVIDE := <'/'>
SPACE := #'(?U)\s+'