Re: The AST tree modification. Edited.

2011-10-15 Thread niXman
Up. 2011/10/12 niXman : > Hello! > > I have figured out the creation of functions and structures, thanks > Andi's and Balaji's. Couldn't understand how to create tree for > template functions, classes, methods. > Can you help me figure that out, please? > > Thanks. >

Re: The AST tree modification. Edited.

2011-10-11 Thread niXman
Hello! I have figured out the creation of functions and structures, thanks Andi's and Balaji's. Couldn't understand how to create tree for template functions, classes, methods. Can you help me figure that out, please? Thanks.

Re: The AST tree modification. Edited.

2011-10-06 Thread Andi Hellmund
Hi, as an addition to Balaji's answer. Please find attached an extract of a sample front-end generating various types of tree nodes (e.g. arrays, structs, ...). This used to work with an older version of GCC, but I'm not sure if this still works with the most recent version. Anyway, it should

Re: The AST tree modification. Edited.

2011-10-04 Thread Ian Lance Taylor
niXman writes: > "lang_hooks" - what this? where is declared? Running grep will show you that it is declared in langhooks.h. The lang hooks are frontend hooks called from the middle-end. The hooks are defined in langhooks.h. Ian

Re: The AST tree modification. Edited.

2011-10-04 Thread niXman
Hello. "lang_hooks" - what this? where is declared? Thanks! 2011/10/5 Iyer, Balaji V > > Hello, >        For most of the things you are looking for, please look for a function > called build_decl. It is used in several places inside GCC. Let me give you a > small example, > > If you do the fol

RE: The AST tree modification. Edited.

2011-10-04 Thread Iyer, Balaji V
Hello, For most of the things you are looking for, please look for a function called build_decl. It is used in several places inside GCC. Let me give you a small example, If you do the following: tree x = build_decl (UNKNOWN_LOCATION, VAR_DECL, get_identifer("ii"), integer_type_node)