equal
deleted
inserted
replaced
25 self._methods = methods |
25 self._methods = methods |
26 self.current = None |
26 self.current = None |
27 def _advance(self): |
27 def _advance(self): |
28 'advance the tokenizer' |
28 'advance the tokenizer' |
29 t = self.current |
29 t = self.current |
30 try: |
30 self.current = next(self._iter, None) |
31 self.current = self._iter.next() |
|
32 except StopIteration: |
|
33 pass |
|
34 return t |
31 return t |
35 def _match(self, m, pos): |
32 def _match(self, m, pos): |
36 'make sure the tokenizer matches an end condition' |
33 'make sure the tokenizer matches an end condition' |
37 if self.current[0] != m: |
34 if self.current[0] != m: |
38 raise error.ParseError(_("unexpected token: %s") % self.current[0], |
35 raise error.ParseError(_("unexpected token: %s") % self.current[0], |