"Eric Fisher" <[EMAIL PROTECTED]> writes:
> Seems the question has been solved, here is the changes of
> treelang/parse.y, just for fun :-)
>
> $ diff treelang/parse.y treelang/parse_new.y -u
> --- treelang/parse.y 2004-01-08 15:50:46.000000000 +0800
> +++ treelang/parse_new.y 2006-04-13 18:00:34.390625000 +0800
> @@ -48,6 +48,7 @@
> #include "tm.h"
> #include "diagnostic.h"
> #include "timevar.h"
> +#include "tree.h"
>
> #include "treelang.h"
> #include "treetree.h"
> @@ -182,7 +183,7 @@
> ;
>
> variable_def:
> -storage typename NAME init_opt SEMICOLON {
> +storage_opt typename NAME init_opt SEMICOLON {
> struct prod_token_parm_item* tok;
> struct prod_token_parm_item *prod;
> tok = $3;
Don't you have to deal with $1 being NULL?
> @@ -225,6 +226,15 @@
> }
> ;
>
> +storage_opt:
> +/* Nil. */ {
> + $$ = 0;
> +}
> +|storage {
> + $$ = $1;
> +}
> +;
> +
> storage:
> STATIC
> |AUTOMATIC
> @@ -254,7 +264,7 @@
> ;
>
> function_prototype:
> -storage typename NAME LEFT_PARENTHESIS parameters RIGHT_PARENTHESIS SEMICOLON
>
> +storage_opt typename NAME LEFT_PARENTHESIS parameters RIGHT_PARENTHESIS SEMIC
> ON {
> struct prod_token_parm_item* tok;
> struct prod_token_parm_item *prod;
> struct prod_token_parm_item *type;
> @@ -951,6 +961,11 @@
> {
> struct prod_token_parm_item* stg_class;
> stg_class = STORAGE_CLASS_TOKEN (prod);
> + if(stg_class==NULL_TREE)
> + {
> + STORAGE_CLASS (prod) = EXTERNAL_DEFINITION_STORAGE;
> + return;
> + }
> switch (stg_class->type)
> {
> case STATIC:
>
--
Thanks,
Jim
http://www.csclub.uwaterloo.ca/~ja2morri/
http://phython.blogspot.com
http://open.nit.ca/wiki/?page=jim