This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gimplefe] Patch for recognizing function declarations
- From: Dodji Seketeli <dodji at seketeli dot org>
- To: Sandeep Soni <soni dot sandeepb at gmail dot com>
- Cc: gcc patches <gcc-patches at gcc dot gnu dot org>, Diego Novillo <dnovillo at google dot com>
- Date: Wed, 01 Aug 2012 11:31:00 +0200
- Subject: Re: [gimplefe] Patch for recognizing function declarations
- References: <CANY-sXUQQN-mhTkvJ_nwnnE+D2CbOHihKVMd_EZDYReS4cMQbQ@mail.gmail.com>
Hello,
Sandeep Soni <soni.sandeepb@gmail.com> 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 <soni.sandeepb@gmail.com>
>
> * parser.c (gl_token_starts_decl): Modify. Matches function decls.
> (gp_parse_parm_decl): New.
> (gp_parse_return_type): New.
> (gp_parse_function_decl): New.
> (gp_parse_decl): Modify. Adds case for function decls.
Just a random note.
For casual patch readers like myself, it would be nice to have test
cases added to commits like this, so that we have a better idea of the
syntax we are parsing against.
The functions are greatly commented in the patch, which helps, but I
think having test cases would be even better.
Thanks.
--
Dodji