pike.git/
src/
language.yacc
Branch:
Tag:
Non-build tags
All tags
No tags
2010-11-19
2010-11-19 14:57:29 by Henrik Grubbström (Grubba) <grubba@grubba.org>
eb9ef979fa501c29d4c851663abf1b7842f5e679 (
12
lines) (+
9
/-
3
)
[
Show
|
Annotate
]
Branch:
7.9
Improved diagnostics for some cases of missing end braces.
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.455 2010/05/29 13:44:32 grubba Exp $
+
||
$Id$
*/ %pure_parser
2014:
} ;
+
/* Node with line number info at $0. */
end_block: '}' | TOK_LEX_EOF { yyerror("Missing '}'.");
-
+
if ($<n>0) {
+
low_yyreport(REPORT_ERROR, $<n>0->current_file, $<n>0->line_number,
+
parser_system_string, 0, "Opening '{' was here.");
+
}
yyerror("Unexpected end of file."); } ;
2729:
} ;
-
failsafe_program: '{' program end_block
+
failsafe_program: '{' program
{ $<n>$ = NULL; }
end_block
| error { yyerrok; } | TOK_LEX_EOF {
3099:
$<n>$ = mkconstantsvaluenode(Pike_sp-1); pop_stack(); }
-
enum_list end_block
+
enum_list
{ $<n>$ = NULL; }
end_block
{ struct pike_type *t = pop_unfinished_type(); free_node($<n>5);