home
/
code
/
tiger.ml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Centralize error message construction
[tiger.ml.git]
/
compiler
/
src
/
lib
/
tiger
/
tiger_parser.mly
diff --git
a/compiler/src/lib/tiger/tiger_parser.mly
b/compiler/src/lib/tiger/tiger_parser.mly
index
1bb9388
..
78d56a0
100644
(file)
--- a/
compiler/src/lib/tiger/tiger_parser.mly
+++ b/
compiler/src/lib/tiger/tiger_parser.mly
@@
-73,7
+73,10
@@
%%
-program: exp EOF { $1 };
+program:
+ | exp EOF { $1 }
+ | error {Tiger_error.exn ~pos:(pos ()) ~msg:"invalid syntax"}
+ ;
exp:
| NIL
This page took
0.021796 seconds
and
4
git commands to generate.