예제 #1
0
 def __init__(self,lexer,fcn_map, builtin_map, dbg = False):
     if ( not isinstance(lexer, EzhilLex) ):
             exception_msg = get_message(Messages.ClassNotFound)
             raise RuntimeException(Messages.ClassNotFound,u"Ezhil lexer")
     Parser.__init__(self,lexer,fcn_map,builtin_map,dbg)
     self.open_if_stmts = 0
     self.backtrack_atexpr = None
예제 #2
0
 def __init__(self,lexer, dbg = False):
     DebugUtils.__init__(self,dbg)
     self.debug = dbg
     self.lexer=lexer
     self.ast=None
     self.function_map = dict()#parsed functions
     self.builtin_map = dict() #pointers to builtin functions
     self.call_stack = list() #call stack
     
     ## use the default Exprs parser.
     lang_parser = Parser(self.lexer,self.function_map, \
                          self.builtin_map, self.debug )
     self.parser = lang_parser
     
     ## run the installation code last
     self.install_builtins()
     self.install_blind_builtins()
예제 #3
0
    def __init__(self, lexer, dbg=False):
        DebugUtils.__init__(self, dbg)
        self.debug = dbg
        self.MAX_REC_DEPTH = 10000
        self.lexer = lexer
        self.ast = None
        self.function_map = NoClobberDict()  #parsed functions
        self.builtin_map = NoClobberDict()  #pointers to builtin functions
        self.call_stack = list()  #call stack
        sys.setrecursionlimit(
            self.MAX_REC_DEPTH)  # have a large enough Python stack
        ## use the default Exprs parser.
        lang_parser = Parser(self.lexer,self.function_map, \
                             self.builtin_map, self.debug )
        self.parser = lang_parser

        ## run the installation code last
        self.install_builtins()
        self.install_blind_builtins()
예제 #4
0
 def __init__(self,lexer,fcn_map, builtin_map, dbg = False):
     if ( not isinstance(lexer, EzhilLex) ):
             raise RuntimeException(u"Cannot find Ezhil lexer class")
     Parser.__init__(self,lexer,fcn_map,builtin_map,dbg)
     self.open_if_stmts = 0
     self.backtrack_atexpr = None
예제 #5
0
 def __init__(self,lexer,fcn_map, builtin_map, dbg = False):
     if ( not isinstance(lexer, EzhilLex) ):
             raise RuntimeException("Cannot find Ezhil lexer class")
     Parser.__init__(self,lexer,fcn_map,builtin_map,dbg)
예제 #6
0
 def __init__(self, lexer, fcn_map, builtin_map, dbg=False):
     if (not isinstance(lexer, EzhilLex)):
         raise RuntimeException("Cannot find Ezhil lexer class")
     Parser.__init__(self, lexer, fcn_map, builtin_map, dbg)