Lines Matching refs:column
88 """Represents a position (line and column) in a text file."""
90 def __init__(self, line=-1, column=-1):
92 self.column = column
95 return self.line == rhs.line and self.column == rhs.column
102 self.line == rhs.line and self.column < rhs.column)
117 return '%s(%s)' % (self.line + 1, self.column)
120 return Cursor(self.line, self.column + offset)
123 return Cursor(self.line, self.column - offset)
128 return Cursor(self.line, self.column)
166 return lines[pos.line][pos.column:].startswith(string)
193 line = line[start.column:]
199 start_column += start.column
218 return lines[start.line][start.column:end.column]
220 result_lines = ([lines[start.line][start.column:]] +
222 [lines[end.line][:end.column]])
244 line = lines[pos.line][pos.column:]
262 line = lines[pos.line][pos.column:]
271 line = lines[pos.line][pos.column:]
276 print ('ERROR: %s expected on line %s after column %s.' %
277 (token_type, pos.line + 1, pos.column))