def __init__(self,lexer, debug = False,safe_mode=False,update=True,stacksize=500,env=None): DebugUtils.__init__(self,debug) self.SAFE_MODE = safe_mode self.debug = debug self.MAX_REC_DEPTH = 10000 #for Python self.stacksize = stacksize #for Ezhil stacksize 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 if not env: self.env = Environment( self.call_stack, self.function_map, \ self.builtin_map, self.debug, self.stacksize ) else: self.env = env 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() if update : ## update globals global global_interpreter global_interpreter = self
def __init__(self,lexer,fcn_map, builtin_map, dbg = False): DebugUtils.__init__(self,dbg) self.parsing_function = False self.lex=lexer self.ast=None self.currently_parsing = [] # stack, just in case we should have parse errors self.function_map = fcn_map #parsed functions self.builtin_map = builtin_map #pointers to builtin functions self.if_stack = [] #parsing if-statements self.loop_stack = [] #parsing while-statements self.last_tok = None ## handle to last token dequeued self.inside_if = False
def __init__(self, lexer, fcn_map, builtin_map, dbg=False): DebugUtils.__init__(self, dbg) self.parsing_function = False self.lex = lexer self.ast = None self.currently_parsing = [ ] # stack, just in case we should have parse errors self.function_map = fcn_map #parsed functions self.builtin_map = builtin_map #pointers to builtin functions self.if_stack = [] #parsing if-statements self.loop_stack = [] #parsing while-statements self.last_tok = None ## handle to last token dequeued self.inside_if = False
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()
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()
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()