new gcc front end question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I build a new gcc front end for my language called "uml",
I do not use a parser or a lexer, I generate the GENRIC form directly from 
another tool that parse my source file "test.uml". in a txt file that I include 
in my compiler parse_file hook.

void uml_parse_file (int debug_flag ATTRIBUTE_UNUSED)
{
.....
#include "/export/home/charfi/test.txt";
.....
gimplify_function_tree(main_fn_decl);
cgraph_node(main_fn_decl);
cgraph_finalize_function(main_fn_decl, false);
}my test.txt looks contains all the tree that correspond to my source file

( for example if I have int x ; 
my test.txt contains :
tree x_tree = build_decl(BUILTINS_LOCATION, VAR_DECL, get_identifier("x"), 
integer_type_node); )

this works perfectly when I compile test.uml after generating the test.txt by 
calling : guml test.uml -S -fdump-tree-all

however, when I try to compile another file test2.uml that need to read 
test2.txt , I have to re make , re make install my front end. and modify the 
uml_parse_file hook to modify the name of the text file .. #include 
"/export/home/charfi/test2.txt";

I can modify this langhook by recovering the name using in_fnames[0] (first 
argument of guml command)
but I can not pass this argument to the include command that requires only 
<FILENAME> or "filename". (i,e. #include in_fnames[0] ; did not works )

my question is:

1. How can I modify my front end in order to not re make and remake install each 
time I want to compile a new file (knowing that I want to keep my method that 
build the Generic form first )?

thanks

Asma






[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux