diff options
Diffstat (limited to 'README.org')
-rw-r--r-- | README.org | 25 |
1 files changed, 12 insertions, 13 deletions
@@ -63,7 +63,6 @@ slime, you can evoke ~M-x slime-documentation~ with your cursor over the ~calc~ symbol to see this: #+begin_src - Documentation for the symbol CALC: Function: @@ -71,22 +70,22 @@ Function: A calculator language -<START> ::= (<SUBEXPR> ::EOF:: | <VALUE> ::EOF:: | <UNOP> ::EOF:: | <BINOP> ::EOF::) -<EXPR> ::= (<SUBEXPR> | <VALUE> | <UNOP> | <BINOP>) -<SUBEXPR> ::= {CALC} -<VALUE> ::= ::TOKEN:: -<BINOP> ::= <EXPR> ('+' | '-' | '/' | '*' | '^' | '%') <EXPR>+ -<UNOP> ::= ('SIN' | 'COS' | 'TAN' | '-') <EXPR> +start ::= (subexpr eof | value eof | unop eof | binop eof) +expr ::= (subexpr | value | unop | binop) +subexpr ::= {CALC} +value ::= token +binop ::= expr ('+' | '-' | '/' | '*' | '^' | '%') expr+ +unop ::= ('SIN' | 'COS' | 'TAN' | '-') expr ------------------------------------------ ADDITIONAL NOTES: -<SUBEXPR> A subexpression, like (1 + 2 / cos(1.5)) -<VALUE> A Number +subexpr A subexpression, like (1 + 2 / cos(1.5)) +value A Number ------------------------------------------ KEY: -::TOKEN:: Any ole token -::EOF:: Explicitly match the end of the input -{GRAMMAR} Parse a sublist of tokens with GRAMMAR -(a|b|..) One of the alternavites a b ... +token Any ole token +eof Explicitly match the end of the input +{LANGUAGE} Parse a sublist of tokens with LANGUAGE +(A|B|...) One of the alternavites a b ... PATTERN+ One or more PATTERN PATTERN* Zero or more PATTERN <RULE> A nonterminal symbol - naming a parse rule |