#NEWLINE# def __init__( self , input = None ) : #NEWLINE# #INDENT# Exception . __init__ ( self ) #NEWLINE# self . input = None #NEWLINE# self . index = None #NEWLINE# self . token = None #NEWLINE# self . node = None #NEWLINE# self . c = None #NEWLINE# self . line = None #NEWLINE# self . charPositionInLine = None #NEWLINE# self . approximateLineInfo = False #NEWLINE# if ( self is not None ) : #NEWLINE# #INDENT# self . input = input #NEWLINE# self . index = input . index ( ) #NEWLINE# from antlr3.streams import TokenStream , CharStream #NEWLINE# from antlr3.tree import TreeNodeStream #NEWLINE# if isinstance ( self . input , TokenStream ) : #NEWLINE# #INDENT# self . token = self . input . LT ( 1 ) #NEWLINE# self . line = self . token . line #NEWLINE# self . charPositionInLine = self . token . charPositionInLine #NEWLINE# #UNINDENT# if isinstance ( self . input , TreeNodeStream ) : #NEWLINE# #INDENT# self . extractInformationFromTreeNodeStream ( self . input ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( self . input , CharStream ) : #NEWLINE# #INDENT# self . c = self . input . LT ( 1 ) #NEWLINE# self . line = self . input . line #NEWLINE# self . charPositionInLine = self . input . charPositionInLine #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . c = self . input . LA ( 1 )