pike.git/
src/
language.yacc
Branch:
Tag:
Non-build tags
All tags
No tags
2004-11-05
2004-11-05 15:27:36 by Henrik Grubbström (Grubba) <grubba@grubba.org>
392c794f6f827e9fca3ce8d1fc090b6170597fa2 (
49
lines) (+
30
/-
19
)
[
Show
|
Annotate
]
Branch:
7.9
Split yyerror() into yyerror() and low_yyerror().
Rev: src/language.yacc:1.349
Rev: src/las.h:1.68
2:
|| 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.
348
2004/
10
/
30
15:
30
:
02
nilsson
Exp $
+
|| $Id: language.yacc,v 1.
349
2004/
11
/
05
15:
27
:
19
grubba
Exp $
*/ %pure_parser
458:
pop_stack(); } else
-
yyerror("
Illegal
facet group specifier.");
+
yyerror("
Invalid
facet group specifier.");
pop_stack(); } }
492:
} /* If this is a product class, check that all product classes in its
-
* facet-group
inherits
from all facets */
+
* facet-group
inherit
from all facets */
if($3 && Pike_compiler->compiler_pass == 2) { if (Pike_compiler->new_program->facet_class==PROGRAM_IS_PRODUCT_CLASS){ if (!Pike_compiler->new_program->facet_group)
-
yyerror("
Invalid
facet group.");
-
apply(Pike_compiler->new_program->facet_group,
+
yyerror("
Product
class without
facet group.");
+
else {
+
safe_
apply(Pike_compiler->new_program->facet_group,
"product_classes_checked", 0); if (Pike_sp[-1].type == T_INT && Pike_sp[-1].u.integer == 0) {
509:
0, "Error in some product classes"); }
+
pop_stack();
} }
-
+
}
if($4) free_node($4); pop_stack();
709:
if(!Pike_compiler->compiler_frame->previous || !Pike_compiler->compiler_frame->previous->current_type) {
-
yyerror("Internal compiler
fault
.");
+
yyerror("Internal compiler
error (push_compiler_frame0)
.");
copy_pike_type(Pike_compiler->compiler_frame->current_type, mixed_type_string); }else{
3976:
%%
-
void yyerror(
char
*str)
+
void
low_
yyerror(
struct
pike_string
*str)
{ extern int cumulative_parse_error;
4002:
push_constant_text(""); } push_int(lex.current_line);
-
push_
text
(str);
+
ref_
push_
string
(str);
low_safe_apply_handler("compile_error", error_handler, compat_handler, 3); pop_stack(); }else{
4010:
(void)fprintf(stderr, "%s:%ld: %s\n", lex.current_file->str, (long)lex.current_line,
-
str);
+
str
->str
);
} else { (void)fprintf(stderr, "NULL:%ld: %s\n", (long)lex.current_line,
-
str);
+
str
->str
);
} fflush(stderr); }
4022:
STACK_LEVEL_DONE(0); }
+
void yyerror(char *str)
+
{
+
push_text(str);
+
low_yyerror(Pike_sp[-1].u.string);
+
pop_stack();
+
}
+
static void yyerror_reserved(char *keyword) { char fmt[100];