pike.git / src / language.yacc

version» Context lines:

pike.git/src/language.yacc:103:   %left TOK_LSH TOK_RSH   %left '+' '-'   %left '*' '%' '/'   %right TOK_NOT '~'   %nonassoc TOK_INC TOK_DEC      %{   /* This is the grammar definition of Pike. */      #include "global.h" - RCSID("$Id: language.yacc,v 1.211 2000/09/05 19:33:24 grubba Exp $"); + RCSID("$Id: language.yacc,v 1.212 2000/09/20 13:22:51 grubba 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:323:   %type <n> local_function   %type <n> local_function2   %type <n> magic_identifier   %%      all: program { YYACCEPT; }    | program TOK_LEX_EOF { YYACCEPT; }   /* | error TOK_LEX_EOF { YYABORT; } */    ;    - program: program def optional_semi_colons - /* | error { yyerrok; } */ + program: program def +  | program ';'    | /* empty */    ;    - optional_semi_colons: /* empty */ -  | optional_semi_colons ';' -  ; -  +    string_constant: string    | string_constant '+' string    {    struct pike_string *a,*b;    copy_shared_string(a,$1->u.sval.u.string);    copy_shared_string(b,$3->u.sval.u.string);    free_node($1);    free_node($3);    a=add_and_free_shared_strings(a,b);    $$=mkstrnode(a);