Centralize error message construction
[tiger.ml.git] / compiler / src / lib / tiger / tiger_parser.mly
index 1bb9388..78d56a0 100644 (file)
 
 %%
 
-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.