예제 #1
0
파일: compiler.py 프로젝트: g-i-o-/pyphp
	def __init__(self, tokens=None):
		self.i = 0
		self.tokens = tokens
		self.tree   = None
		self.indent = 0
		
		if VERBOSE >= VERBOSITY_TRACE_GRAMMAR:
			import trace
			trace.trace_obj_calls(self, ['!', 'cur_filename_line', 'cur_token', 'compile', 'compile_php_file', 'skip_comments_and_ws', 'skip_to_next'])
예제 #2
0
	def __init__(self, code_tree, initial_scope=None, config=None):
		self.code_tree = code_tree
		self.filename = code_tree.filename
		self.globals = self.make_global_scope(initial_scope)
		self.ERROR_REPORTING = constants.E_ALL
		self.last_node  = None
		self.last_scope = None
		if VERBOSE >= VERBOSITY_SHOW_VISITED_NODES:
			trace.trace_obj_calls(self, ['!', 'visit', 'get_val', 'report_error'], 'args')
예제 #3
0
 def __init__(self, code_tree, initial_scope=None, config=None):
     self.code_tree = code_tree
     self.filename = code_tree.filename
     self.globals = self.make_global_scope(initial_scope)
     self.ERROR_REPORTING = constants.E_ALL
     self.last_node = None
     self.last_scope = None
     if VERBOSE >= VERBOSITY_SHOW_VISITED_NODES:
         trace.trace_obj_calls(self,
                               ['!', 'visit', 'get_val', 'report_error'],
                               'args')
예제 #4
0
    def __init__(self, tokens=None):
        self.i = 0
        self.tokens = tokens
        self.tree = None
        self.indent = 0

        if VERBOSE >= VERBOSITY_TRACE_GRAMMAR:
            import trace
            trace.trace_obj_calls(self, [
                '!', 'cur_filename_line', 'cur_token', 'compile',
                'compile_php_file', 'skip_comments_and_ws', 'skip_to_next'
            ])
예제 #5
0
파일: executer.py 프로젝트: zzhgithub/pyphp
	def __init__(self, code_tree, initial_scope=None, 
		stdout=None, stderr=None, stdin=None):
		self.code_tree = code_tree
		self.filename = code_tree.filename
		self.globals = self.make_global_scope(initial_scope)
		self.ERROR_REPORTING = constants.E_ALL
		self.last_node  = None
		self.last_scope = None
		self.pipe_stdout = stdout if stdout else sys.stdout
		self.pipe_stderr = stderr if stderr else sys.stderr
		self.pipe_stdin = stdin if stdin else sys.stdin
	
		if VERBOSE >= VERBOSITY_SHOW_VISITED_NODES:
			trace.trace_obj_calls(self, ['!', 'visit', 'get_val', 'report_error'], 'args')