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.   */      %pure-parser      /* Expect a single shift/reduce conflict (dangling else). */ - %expect 1 + %expect 2      %token TOK_ARROW "->"      /*    * Basic value pushing    */   %token TOK_CONSTANT "constant"   %token TOK_FLOAT "float literal"   %token TOK_STRING "string literal"   %token TOK_NUMBER "integer literal"
pike.git/src/language.yacc:1349:    }    | TOK_DEPRECATED_ID '(' error ')'    {    struct pike_string *deprecated_string;    MAKE_CONST_STRING(deprecated_string, "deprecated");    push_type(T_MIXED);    push_type_attribute(deprecated_string);    }    ;    - /* Identifier type. Value on type stack. */ - identifier_type: unqualified_idents + /* Identifier type. Value on type stack. +  * +  * NB: Introduces shift-reduce conflict on TOK_LOCAL_ID. +  */ + identifier_type: idents    {    if ($1) {    fix_type_field($1);       if (!pike_types_le($1->type, typeable_type_string) &&    (THIS_COMPILATION->lex.pragmas & ID_STRICT_TYPES)) {    yytype_report(REPORT_WARNING,    $1->current_file, $1->line_number, typeable_type_string,    $1->current_file, $1->line_number, $1->type,    0, "Invalid type.");