home
/
code
/
tiger.ml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Expand status notes
[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
..
b40892a
100644
(file)
--- a/
compiler/src/lib/tiger/tiger_parser.mly
+++ b/
compiler/src/lib/tiger/tiger_parser.mly
@@
-1,5
+1,6
@@
%{
module Ast = Tiger_absyn
%{
module Ast = Tiger_absyn
+ module Err = Tiger_error
module Sym = Tiger_symbol
let pos () =
module Sym = Tiger_symbol
let pos () =
@@
-73,7
+74,10
@@
%%
%%
-program: exp EOF { $1 };
+program:
+ | exp EOF { $1 }
+ | error {Err.raise (Err.Invalid_syntax (pos ()))}
+ ;
exp:
| NIL
exp:
| NIL
This page took
0.025368 seconds
and
4
git commands to generate.