X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=compiler%2Fsrc%2Flib%2Ftiger%2Ftiger_parser.mly;h=78d56a0c8a9216f297e608ec6fe3371ec2f56242;hb=24fb19c0350b45cf027a4be60b1a0240e8c8b576;hp=1bb9388b7a3f5ac509bce3226a7a3fa3a16fcaad;hpb=cda83e5ec171672a59966d2bd9cd28bd7a8fe083;p=tiger.ml.git diff --git a/compiler/src/lib/tiger/tiger_parser.mly b/compiler/src/lib/tiger/tiger_parser.mly index 1bb9388..78d56a0 100644 --- 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