Skip to content

Commit

Permalink
Updated grammar to match recent changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewilson2002 committed Sep 9, 2018
1 parent 627763f commit ef30cdd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion grammar.ebnf
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ power_expr = factor, { "^", factor } ;
factor = "(", additive_expr, ")"
| function, factor
| "-", factor
| constant
| number ;
function = "sqrt" ;
function = "sqrt" | "sin" | "cos" | "tan" | "log" ;
constant = "pi" | "e" ;
digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
number = [ "-" ], ( digit, { digit }, [ ".", { digit } ] ) | ( ".", digit, { digit } ) ;

0 comments on commit ef30cdd

Please sign in to comment.