Exemple #1
0
def CALL(class_name,modulename):
	if class_name == "component":
		
		debug.logs( " g_class 调用的 模块名称是  %s" , ( modulename ) )

		file_name = importname_filename(modulename)
		if isExistFile(file_name) == None:
			debug.logs( " g_class 找不到模块文件 %s " , ( modulename ) )
			return None
		else:
			# new 一个组件对象,并调用编译新的代码
			class_list[class_name]().compile(	\
				getImportNameByFileName(file_name) , getTokenList(	\
				 	breed_lex.input( breed_lex.getlex() , getSource( isExistFile(file_name) ) \
				 	) ) )
			debug.logs( " 模块名字是: %s , 文件名字是: %s" , ( modulename,file_name ))
		return import_.package(modulename)		
Exemple #2
0
def compile( filename ):
	lexer = breed_lex.getlex()

	s = file_.getSource( filename )
	lexer.input(s)
	breed_yacc.get_yacc(lexer)