Home | History | Annotate | Download | only in antlr3

Lines Matching refs:self

44     def getText(self):
51 def setText(self, text):
59 def getType(self):
66 def setType(self, ttype):
74 def getLine(self):
83 def setLine(self, line):
91 def getCharPositionInLine(self):
100 def setCharPositionInLine(self, pos):
108 def getChannel(self):
115 def setChannel(self, channel):
123 def getTokenIndex(self):
133 def setTokenIndex(self, index):
141 def getInputStream(self):
149 def setInputStream(self, input):
177 def __init__(self, type=None, channel=DEFAULT_CHANNEL, text=None,
179 Token.__init__(self)
182 self.type = oldToken.type
183 self.line = oldToken.line
184 self.charPositionInLine = oldToken.charPositionInLine
185 self.channel = oldToken.channel
186 self.index = oldToken.index
187 self._text = oldToken._text
188 self.input = oldToken.input
190 self.start = oldToken.start
191 self.stop = oldToken.stop
194 self.type = type
195 self.input = input
196 self.charPositionInLine = -1 # set to invalid position
197 self.line = 0
198 self.channel = channel
201 self.index = -1
206 self._text = text
209 self.start = start
213 self.stop = stop
216 def getText(self):
217 if self._text is not None:
218 return self._text
220 if self.input is None:
223 if self.start < self.input.size() and self.stop < self.input.size():
224 return self.input.substring(self.start, self.stop)
229 def setText(self, text):
236 self._text = text
241 def getType(self):
242 return self.type
244 def setType(self, ttype):
245 self.type = ttype
247 def getTypeName(self):
248 return str(self.type)
252 def getLine(self):
253 return self.line
255 def setLine(self, line):
256 self.line = line
259 def getCharPositionInLine(self):
260 return self.charPositionInLine
262 def setCharPositionInLine(self, pos):
263 self.charPositionInLine = pos
266 def getChannel(self):
267 return self.channel
269 def setChannel(self, channel):
270 self.channel = channel
273 def getTokenIndex(self):
274 return self.index
276 def setTokenIndex(self, index):
277 self.index = index
280 def getInputStream(self):
281 return self.input
283 def setInputStream(self, input):
284 self.input = input
287 def __str__(self):
288 if self.type == EOF:
292 if self.channel > 0:
293 channelStr = ",channel=" + str(self.channel)
295 txt = self.text
304 self.index,
305 self.start, self.stop,
307 self.typeName, channelStr,
308 self.line, self.charPositionInLine
323 def __init__(self, type=None, text=None, channel=DEFAULT_CHANNEL,
326 Token.__init__(self)
329 self.text = oldToken.text
330 self.type = oldToken.type
331 self.line = oldToken.line
332 self.charPositionInLine = oldToken.charPositionInLine
333 self.channel = oldToken.channel
335 self.text = text
336 self.type = type
337 self.line = None
338 self.charPositionInLine = None
339 self.channel = channel
340 self.index = None
343 def getText(self):
344 return self.text
346 def setText(self, text):
347 self.text = text
350 def getType(self):
351 return self.type
353 def setType(self, ttype):
354 self.type = ttype
357 def getLine(self):
358 return self.line
360 def setLine(self, line):
361 self.line = line
364 def getCharPositionInLine(self):
365 return self.charPositionInLine
367 def setCharPositionInLine(self, pos):
368 self.charPositionInLine = pos
371 def getChannel(self):
372 return self.channel
374 def setChannel(self, channel):
375 self.channel = channel
378 def getTokenIndex(self):
379 return self.index
381 def setTokenIndex(self, index):
382 self.index = index
385 def getInputStream(self):
388 def setInputStream(self, input):
392 def toString(self):
394 if self.channel > 0:
395 channelStr = ",channel=" + str(self.channel)
397 txt = self.text
401 return "[@%r,%r,<%r>%s,%r:%r]" % (self.index,
403 self.type,
405 self.line,
406 self.charPositionInLine