mirror of
https://github.com/davidhalter/parso.git
synced 2026-03-07 07:32:17 +08:00
Some small grammar changes for 2.7.
This commit is contained in:
@@ -329,8 +329,8 @@ class ParserGenerator(object):
|
||||
msg = msg % args
|
||||
except:
|
||||
msg = " ".join([msg] + list(map(str, args)))
|
||||
line = open(self.filename).readlines()[self.begin[0]]
|
||||
raise SyntaxError(msg, (self.filename, self.begin[0],
|
||||
line = self._bnf_text.splitlines()[self.begin[0] - 1]
|
||||
raise SyntaxError(msg, ('<grammar>', self.begin[0],
|
||||
self.begin[1], line))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user