Lines Matching refs:line

216         self.text = None   # content of current line, with final \n stripped
217 self.line = 0 # number of current line
218 self.pos = 0 # current character position in current line
219 self.len = 0 # length of current line text
222 def setLineText(self,line):
223 """set the content of the (next) current line. should be called
225 self.text = line
226 self.len = len(line)
230 """refresh the content of 'line' with a new line of input"""
237 tok.lineno = self.line + 1
240 tok.lineno = self.line
250 self.line += 1
261 """try to peek the next n chars on the same line"""
335 if c == '/': # C++ comment line
475 """a CppTokenizer derived class that accepts a single line of text as input"""
476 def __init__(self,line,lineno=1):
478 self.line = lineno
479 self.setLineText(line)
488 self.line = lineno
498 def addLine(self,line):
499 """add a line to a CppLinesTokenizer. this can be done after tokenization
502 self.setLineText(line)
504 self.lines.append(line)
520 self.line = lineno
523 line = self.file.readline()
524 if len(line) > 0:
525 if line[-1] == '\n':
526 line = line[:-1]
527 if len(line) > 0 and line[-1] == "\r":
528 line = line[:-1]
529 self.setLineText(line)
553 def expectToken(self,id,line,col):
555 if self.token.lineno != line:
556 raise BadExpectedToken, "### BAD LINENO: token '%s' got '%d' expecting '%d'" % (id,self.token.lineno,line)
560 def expectTokenVal(self,id,value,line,col):
561 self.expectToken(id,line,col)
1258 line = "(" + op
1260 line += " %d)" % e[1]
1262 line += " 0x%x)" % e[1]
1264 line += " %s)" % e[1]
1266 line += " %s)" % e[1]
1269 line += " %s [" % arg[0]
1275 line += "%s%s" % (prefix, par)
1277 line += "])"
1279 line += " %s)" % self.dump_node(e[1])
1281 line += " %s %s)" % (self.dump_node(e[1]), self.dump_node(e[2]))
1283 line += " ?%s)" % repr(e[1])
1285 return line
1619 line = 0 # index of line start
1627 # one the line start or the previous character. Don't append
1635 # If this is a line space, ignore the spaces we found previously
1636 # on the line, and remove empty lines.
1638 old_line = line
1640 #print "N line=%d space=%d ii=%d" % (line, space, ii)
1642 line = ii
1644 if old_space == old_line: # line only contains spaces
1647 if ii-1 == old_line: # line is empty
1975 NOTE: empty and line-numbering directives are ignored and removed
2023 # empty or line-numbering, ignore it