Lines Matching refs:offset
136 def __init__(self, buf, offset=0, path=None): argument
147 self.end = offset
206 def decode_oct(buf, offset, start, end): argument
211 raise LexerError(buf, offset, 'bad octal escape sequence')
215 raise LexerError(buf, offset, 'bad octal escape sequence')
217 raise LexerError(buf, offset, 'bad octal escape sequence')
222 def decode_hex(buf, offset, start, end): argument
227 raise LexerError(buf, offset, 'bad hex escape sequence')
231 raise LexerError(buf, offset, 'bad hex escape sequence')
235 def lex_interpreted_string(cls, buf, offset): argument
249 pos = offset + 1
297 def lex_string(cls, buf, offset): argument
309 char = buf[offset]
312 end = buf.index('`', offset + 1)
313 return (end + 1, buf[offset + 1 : end])
317 return cls.lex_interpreted_string(buf, offset)
318 raise LexerError(buf, offset, 'no string literal start character')
348 def lex(cls, buf, offset): argument
361 match = cls.LEXER_MATCHER.match(buf, offset)
363 raise LexerError(buf, offset, 'unknown token')
367 end, literal = cls.lex_string(buf, offset)
371 literal = buf[offset:end]