Version 0.0.3
This implements a simple lexer and simple parser.
Tokens:
- PLUS = +
- MINUS = -
- ASTERISK = *
- F_SLASH = /
- OPEN_PAREN (not parseable yet) = (
- CLOSE_PAREN (not parseable yet) = )
- NUMBER = /d+
- EEOF = \0
- UNKNOWN = (anything else)
Syntax:
expr : term ((PLUS|MINUS) term)*
term : factor ((ASTERISK|F_SLASH) factor)*
factor : NUMBER