pike.git / src / language.yacc

version» Context lines:

pike.git/src/language.yacc:170:   %left F_LSH F_RSH   %left '+' '-'   %left '*' '%' '/'   %right F_NOT '~'   %nonassoc F_INC F_DEC      %{   /* This is the grammar definition of Pike. */      #include "global.h" - RCSID("$Id: language.yacc,v 1.94 1998/04/30 06:32:36 hubbe Exp $"); + RCSID("$Id: language.yacc,v 1.95 1998/04/30 16:30:37 hubbe Exp $");   #ifdef HAVE_MEMORY_H   #include <memory.h>   #endif      #include "interpret.h"   #include "array.h"   #include "object.h"   #include "stralloc.h"   #include "las.h"   #include "interpret.h"
pike.git/src/language.yacc:959:         new_local_name: optional_stars F_IDENTIFIER    {    push_finished_type($<n>0->u.sval.u.string);    while($1--) push_type(T_ARRAY);    add_local_name($2->u.sval.u.string, pop_type());    $$=mknode(F_ASSIGN,mkintnode(0),mklocalnode(islocal($2->u.sval.u.string)));    free_node($2);    } -  | optional_stars bad_identifier {} +  | optional_stars bad_identifier { $$=0; }    | optional_stars F_IDENTIFIER '=' expr0    {    push_finished_type($<n>0->u.sval.u.string);    while($1--) push_type(T_ARRAY);    add_local_name($2->u.sval.u.string, pop_type());    $$=mknode(F_ASSIGN,$4,mklocalnode(islocal($2->u.sval.u.string)));    free_node($2);    }    | optional_stars bad_identifier '=' expr0    {    free_node($4); -  +  $$=0;    }    | optional_stars F_IDENTIFIER '=' error    {    free_node($2);    /* No yyerok here since we aren't done yet. */ -  +  $$=0;    }    ;      new_local_name2: F_IDENTIFIER    {    add_ref($<n>0->u.sval.u.string);    add_local_name($1->u.sval.u.string, $<n>0->u.sval.u.string);    $$=mknode(F_ASSIGN,mkintnode(0),mklocalnode(islocal($1->u.sval.u.string)));    free_node($1);    }