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