Tweaks to lexer, incl. matching func all at once

Reviewers: xymostech

Reviewed By: xymostech

Differential Revision: http://phabricator.benalpert.com/D42
This commit is contained in:
Ben Alpert
2013-07-07 21:27:08 -07:00
parent eab3322db3
commit 2643f72a9d
3 changed files with 25 additions and 52 deletions

View File

@@ -1,13 +1,5 @@
/* description: Parses end executes mathematical expressions. */
/* lexical grammar */
%lex
%%
<<EOF>> return 'EOF'
/lex
/* operator associations and precedence */
%left '^'
@@ -45,8 +37,8 @@ group
{$$ = $1;}
| '{' ex '}'
{$$ = $2;}
| '\' func
{$$ = $2;}
| func
{$$ = $1;}
;
func