Re: [gimplefe] Patch for recognizing function declarations

2012-08-02 Thread Diego Novillo
On Tue, Jul 31, 2012 at 11:06 AM, Sandeep Soni wrote: > +/* The syntax of a function declaration is as follows: > + > + FUNCTION_DECL > + < > + function body > + > > + > + Here, each of the PARMS in itself is a parameter declaration similar to a > + variable declaration, TYPE is th

Re: [gimplefe] Patch for recognizing function declarations

2012-08-01 Thread Dodji Seketeli
Hello, Sandeep Soni a écrit: > Hi Diego, > > The following patch recognizes function declarations. I am now trying > to create a gimple sequence of all the statements within the function > body. > The chagelog is as follows: > > 2012-07-31 Sandeep Soni > > * parser.c (gl_token_starts_de

Re: [gimplefe] patch that fixes the bug for the failure test case

2012-06-12 Thread Diego Novillo
On 12-06-12 13:52 , Sandeep Soni wrote: On Tue, Jun 12, 2012 at 6:57 PM, Diego Novillo wrote: On 12-06-08 22:25 , Sandeep Soni wrote: Hi, This patch fixes the failure test case that I had submitted the last time. The changeLog is testsuite/gChangeLog.gimplefe is as follows. 2012-06-09 Sa

Re: [gimplefe] patch that fixes the bug for the failure test case

2012-06-12 Thread Sandeep Soni
On Tue, Jun 12, 2012 at 6:57 PM, Diego Novillo wrote: > On 12-06-08 22:25 , Sandeep Soni wrote: >> >> Hi, >> >> This patch fixes the failure test case that I had submitted the last time. >> >> The changeLog is testsuite/gChangeLog.gimplefe is as follows. >> >> 2012-06-09   Sandeep Soni >>        

Re: [gimplefe] patch that fixes the bug for the failure test case

2012-06-12 Thread Diego Novillo
On 12-06-08 22:25 , Sandeep Soni wrote: Hi, This patch fixes the failure test case that I had submitted the last time. The changeLog is testsuite/gChangeLog.gimplefe is as follows. 2012-06-09 Sandeep Soni * gimple.dg/20120605-2.gimple : New. While the changelog in gimple/Chan

Re: [gimplefe] [patch] splits cpp_lshift and cpp_rshift tokens into discrete cpp_less and cpp_greater tokens respectively

2012-03-14 Thread Sandeep Soni
On Tue, Mar 13, 2012 at 9:42 PM, Diego Novillo wrote: > On 08/03/12 20:47 , Sandeep Soni wrote: > >> +/* Splits the token TOKEN into two tokens FIRST_TOKEN and SECOND_TOKEN. >> +   Note that the split should work only if the type of the TOKEN is >> +   either CPP_RSHIFT or CPP_LSHIFT which gets sp

Re: [gimplefe] [patch] splits cpp_lshift and cpp_rshift tokens into discrete cpp_less and cpp_greater tokens respectively

2012-03-13 Thread Diego Novillo
On 08/03/12 20:47 , Sandeep Soni wrote: +/* Splits the token TOKEN into two tokens FIRST_TOKEN and SECOND_TOKEN. + Note that the split should work only if the type of the TOKEN is + either CPP_RSHIFT or CPP_LSHIFT which gets splitted into two tokens s/splitted/split/ while (gl_lex_tok

Re: [gimplefe][patch] The symbol table for declarations

2012-03-05 Thread Diego Novillo
On 01/03/12 13:06 , Sandeep Soni wrote: 2012-03-01 Sandeep Soni * parser.c : Include hashtab.h. (gimple_symtab): New. The symbol table. (gimple_symtab_entry_hash): New. (gimple_symtab_eq_hash): New. (gimple_symtab_entry_marked_p):New. (gimple_sym

Re: [gimplefe][patch] The symbol table for declarations

2012-03-01 Thread Sandeep Soni
On Wed, Feb 29, 2012 at 8:14 PM, Diego Novillo wrote: > On 24/02/12 01:03 , Sandeep Soni wrote: > >> +  name_token = gl_consume_expected_token (parser->lexer, CPP_NAME); >> +  name = gl_token_as_text (name_token); >> + >> +  e = ggc_alloc_cleared_gimple_symtab_entry_def (); >> +  e->id = get_ident

Re: [gimplefe][patch] The symbol table for declarations

2012-02-29 Thread Diego Novillo
On 24/02/12 01:03 , Sandeep Soni wrote: + name_token = gl_consume_expected_token (parser->lexer, CPP_NAME); + name = gl_token_as_text (name_token); + + e = ggc_alloc_cleared_gimple_symtab_entry_def (); + e->id = get_identifier(name); + slot = htab_find_slot (gimple_symtab, e, NO_INSERT); +

Re: [gimplefe][patch] The symbol table for declarations

2012-02-23 Thread Sandeep Soni
On Wed, Nov 30, 2011 at 9:48 AM, Sandeep Soni wrote: > Sorry. Wrong patch. New patch attached. > > I am getting the following error in the new patch though. > > ../../gimple-front-end/gcc/gimple/parser.c: In function ‘gp_parse_var_decl’: > ../../gimple-front-end/gcc/gimple/parser.c:927:3: error: i

Re: [gimplefe][patch] The symbol table for declarations

2011-11-29 Thread Sandeep Soni
Sorry. Wrong patch. New patch attached. I am getting the following error in the new patch though. ../../gimple-front-end/gcc/gimple/parser.c: In function ‘gp_parse_var_decl’: ../../gimple-front-end/gcc/gimple/parser.c:927:3: error: implicit declaration of function ‘ggc_alloc_cleared_gimple_symtab

Re: [gimplefe][patch] The symbol table for declarations

2011-10-12 Thread Diego Novillo
On 11-10-10 17:47 , Sandeep Soni wrote: Hi, The following patch is a basic attempt to build a symbol table that stores the names of all the declarations made in the input file. Index: gcc/gimple/parser.c === --- gcc/gimple/parser.c

Re: [gimplefe][patch] The symbol table for declarations

2011-10-12 Thread Diego Novillo
On Tue, Oct 11, 2011 at 09:42, Tom Tromey wrote: >> "Sandeep" == Sandeep Soni writes: > > Sandeep> The following patch is a basic attempt to build a symbol table that > Sandeep> stores the names of all the declarations made in the input file. > > I don't know anything about gimplefe, but unle

Re: [gimplefe][patch] A bugfix for a missed symbol

2011-10-12 Thread Diego Novillo
On Mon, Oct 10, 2011 at 17:28, Sandeep Soni wrote: > 2011-10-11  Sandeep Soni   > >        * parser.c (gp_parse_var_decl): Fixed a bug for the >        missing symbol 'CPP_LESS' in the 'INTEGER_TYPE' declaration. OK. Diego.

Re: [gimplefe][patch] The symbol table for declarations

2011-10-11 Thread Tom Tromey
> "Sandeep" == Sandeep Soni writes: Sandeep> The following patch is a basic attempt to build a symbol table that Sandeep> stores the names of all the declarations made in the input file. I don't know anything about gimplefe, but unless you have complicated needs, it is more usual to just put

Re: [gimplefe] patch

2011-07-19 Thread Diego Novillo
Ketaki, Some comments on your patch. Apologies for the delay. It's going in the right direction, though it needs several adjustments. Could you please add the document you sent me for the grammar to the wiki page? It's better if we edit the grammar there instead of having a separate document.