pike.git / src / language.yacc

version» Context lines:

pike.git/src/language.yacc:1:   /* -*- c -*-   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: language.yacc,v 1.362 2005/12/31 15:04:13 nilsson Exp $ + || $Id: language.yacc,v 1.363 2006/01/21 14:31:09 grubba Exp $   */      %pure_parser      %token TOK_ARROW      /*    * Basic value pushing    */   %token TOK_CONSTANT TOK_FLOAT TOK_STRING
pike.git/src/language.yacc:82:   %token TOK_PROTECTED   %token TOK_PREDEF   %token TOK_PUBLIC   %token TOK_RSH_EQ   %token TOK_STATIC   %token TOK_STRING_ID   %token TOK_SUB_EQ   %token TOK_TYPEDEF   %token TOK_TYPEOF   %token TOK_VARIANT + %token TOK_VERSION   %token TOK_VOID_ID   %token TOK_WHILE   %token TOK_XOR_EQ   %token TOK_OPTIONAL         %right '='   %right '?'   %left TOK_LOR   %left TOK_LAND
pike.git/src/language.yacc:271:   %type <n> simple_type   %type <n> simple_type2   %type <n> simple_identifier_type   %type <n> string_constant   %type <n> string   %type <n> TOK_STRING   %type <n> TOK_NUMBER   %type <n> optional_rename_inherit   %type <n> optional_identifier   %type <n> TOK_IDENTIFIER + %type <n> TOK_VERSION   %type <n> assoc_pair   %type <n> line_number_info   %type <n> block   %type <n> optional_block   %type <n> failsafe_block   %type <n> open_paren_with_line_info   %type <n> close_paren_or_missing   %type <n> open_bracket_with_line_info   %type <n> block_or_semi   %type <n> break
pike.git/src/language.yacc:3570:    $$=index_node(tmp2, "predef", $3->u.sval.u.string);    if(!$$->name)    add_ref( $$->name=$3->u.sval.u.string );    free_node(tmp2);    free_node($3);    }    | TOK_PREDEF TOK_COLON_COLON bad_identifier    {    $$=0;    } +  | TOK_VERSION TOK_COLON_COLON TOK_IDENTIFIER +  { +  int old_major = Pike_compiler->compat_major; +  int old_minor = Pike_compiler->compat_minor; +  +  change_compiler_compatibility($1->u.integer.a, $1->u.integer.b); +  +  if(Pike_compiler->last_identifier) +  free_string(Pike_compiler->last_identifier); +  copy_shared_string(Pike_compiler->last_identifier, $3->u.sval.u.string); +  if (!($$ = resolve_identifier(Pike_compiler->last_identifier))) { +  if((Pike_compiler->flags & COMPILATION_FORCE_RESOLVE) || +  (Pike_compiler->compiler_pass==2)) { +  my_yyerror("Undefined identifier %d.%d::%S.", +  $1->u.integer.a, $1->u.integer.b, +  Pike_compiler->last_identifier); +  $$=0; +  }else{ +  $$=mknode(F_UNDEFINED,0,0); +  } +  } +  change_compiler_compatibility(old_major, old_minor); +  free_node($1); +  free_node($3); +  } +  | TOK_VERSION TOK_COLON_COLON bad_identifier +  { +  free_node($1); +  $$=0; +  }    | inherit_specifier TOK_IDENTIFIER    {    if ($1 >= 0) {    int id;       if(Pike_compiler->last_identifier) free_string(Pike_compiler->last_identifier);    copy_shared_string(Pike_compiler->last_identifier, $2->u.sval.u.string);       if ($1 > 0)    id = low_reference_inherited_identifier(inherit_state,