jasn/pyRASMUS — pull request #1 by antialize (2013-10-04 21:02:59+00:00)
Title: Add exception based error recovery

Add exception based error recovery, using a list of tokens at which to recover

The following program:
(+ val x = (+ val x = = = in foo == dah +)
val y = mod
val z = 42; mod; 112; mod
in tup kat +)

Now yields the following output:
Parse error: Unexpected token
(+ val x = (+ val x = = = in foo == dah +)
^
Parse error: Expected "+)" at
(+ val x = (+ val x = = = in foo == dah +)
^
Parse error: Unexpected token
val y = mod
^~~
Parse error: Unexpected token
val z = 42; mod; 112; mod
^~~
Parse error: Unexpected token
val z = 42; mod; 112; mod
^~~
Parse error: Expected "(" at
in tup kat +)
^~~
Instead of just the first error