diff -r 6052d0605a74 -r 29f149b6e2be mtasc/mtasc.patch --- a/mtasc/mtasc.patch Wed Feb 25 13:55:52 2009 +0100 +++ b/mtasc/mtasc.patch Wed Feb 25 13:58:24 2009 +0100 @@ -15,3 +15,44 @@ - prerr_endline msg; exit 1 \ No newline at end of file + prerr_endline msg; exit 1 +Index: ocaml/mtasc/parser.ml +--- ocaml/mtasc/parser.ml.orig 2007-02-04 14:56:04.000000000 +0100 ++++ ocaml/mtasc/parser.ml 2009-02-25 13:52:56.848237653 +0100 +@@ -166,8 +166,8 @@ + | [< '(Kwd For,p); '(POpen,_); c = parse_expr_opt; e = parse_for p c >] -> e + | [< '(Kwd If,p); cond = parse_eval; e = parse_expr_opt; e2 , p2 = parse_else (pos e) >] -> EIf (cond,wrap_var e,e2), punion p p2 + | [< '(Kwd Return,p); v , p2 = parse_eval_option p; >] -> EReturn v , punion p p2 +- | [< '(Kwd Break,p); >] -> EBreak , p +- | [< '(Kwd Continue,p); >] -> EContinue , p ++ | [< '(Kwd Break,p); placeholder1 >] -> EBreak , p ++ | [< '(Kwd Continue,p); placeholder2 >] -> EContinue , p + | [< '(Kwd While,p1); v = parse_eval; e = parse_expr_opt >] -> EWhile (v,wrap_var e,NormalWhile) , punion p1 (pos e) + | [< '(Kwd Do,p1); e = parse_expr; '(Kwd While,_); v = parse_eval; >] -> EWhile (v,wrap_var e,DoWhile) , punion p1 (pos v) + | [< '(Kwd Switch,p1); v = parse_eval; '(BrOpen,_); el, p2 = parse_switch false >] -> ESwitch (v,el) , punion p1 p2 +@@ -278,7 +278,7 @@ + + and parse_expr_opt = parser + | [< e = parse_expr >] -> e +- | [< '(Next,p); >] -> EBlock [] , p ++ | [< '(Next,p); placeholder3 >] -> EBlock [] , p + + and parse_for p c = parser + | [< '(Kwd In,_); v = parse_eval; '(PClose,p2); e = parse_expr_opt >] -> EForIn(c,v,wrap_var e) , punion p p2 +@@ -324,7 +324,7 @@ + and parse_block callb sp = parser + | [< e = callb; el,p = parse_block callb sp >] -> e :: el , p + | [< '(Next,_); el = parse_block callb sp >] -> el +- | [< '(BrClose,p); >] -> [] , p ++ | [< '(BrClose,p); placeholder4 >] -> [] , p + | [< '(Eof,_) >] -> error Unclosed_parenthesis sp + + and parse_expr_list p = parser +@@ -351,7 +351,7 @@ + + and parse_import = parser + | [< '(Const (Ident name),_); p = parse_import2 name >] -> p +- | [< '(Binop OpMult,_); >] -> [] , None ++ | [< '(Binop OpMult,_); placeholder5 >] -> [] , None + + and parse_import2 name = parser + | [< '(Dot,_); p , n = parse_import >] -> name :: p , n