Last few small changes to the parser. Now beginning to work on the tests again.
This commit is contained in:
1 parent
70bc6642d8
commit
9549c2b389
1 file changed
+2
-3
@@ -131,7 +131,7 @@ class Parser(object):
|
||||
itsstates, itsfirst = itsdfa
|
||||
if ilabel in itsfirst:
|
||||
# Push a symbol
|
||||
self.push(t, self.grammar.dfas[t], newstate)
|
||||
self.push(t, itsdfa, newstate)
|
||||
break # To continue the outer while loop
|
||||
else:
|
||||
if (0, state) in arcs:
|
||||
@@ -139,8 +139,7 @@ class Parser(object):
|
||||
self.pop()
|
||||
if not self.stack:
|
||||
# Done parsing, but another token is input
|
||||
raise ParseError("too much input",
|
||||
type, value, start_pos)
|
||||
raise ParseError("too much input", type, value, start_pos)
|
||||
else:
|
||||
self.error_recovery(self.grammar, self.stack, type, value)
|
||||
break
|
||||
|
||||
Reference in new issue
Block a user