168 |
char *cp, location_t location); |
char *cp, location_t location); |
169 |
static void handle_syncline (char *args, location_t *location); |
static void handle_syncline (char *args, location_t *location); |
170 |
static int convert_ucn_to_byte (char const *hex_text); |
static int convert_ucn_to_byte (char const *hex_text); |
171 |
static void unexpected_end_of_file (location_t, char const *); |
static void unexpected_end_of_file (location_t *, char const *); |
172 |
|
|
173 |
%} |
%} |
174 |
%x SC_COMMENT SC_LINE_COMMENT SC_YACC_COMMENT |
%x SC_COMMENT SC_LINE_COMMENT SC_YACC_COMMENT |
331 |
} |
} |
332 |
|
|
333 |
.|\n ; |
.|\n ; |
334 |
<<EOF>> unexpected_end_of_file (*yylloc, "*/"); |
<<EOF>> unexpected_end_of_file (yylloc, "*/"); |
335 |
} |
} |
336 |
|
|
337 |
|
|
342 |
<SC_COMMENT> |
<SC_COMMENT> |
343 |
{ |
{ |
344 |
"*"{splice}"/" YY_OBS_GROW; BEGIN c_context; |
"*"{splice}"/" YY_OBS_GROW; BEGIN c_context; |
345 |
<<EOF>> unexpected_end_of_file (*yylloc, "*/"); |
<<EOF>> unexpected_end_of_file (yylloc, "*/"); |
346 |
} |
} |
347 |
|
|
348 |
|
|
375 |
} |
} |
376 |
|
|
377 |
.|\n YY_OBS_GROW; |
.|\n YY_OBS_GROW; |
378 |
<<EOF>> unexpected_end_of_file (*yylloc, "\""); |
<<EOF>> unexpected_end_of_file (yylloc, "\""); |
379 |
} |
} |
380 |
|
|
381 |
/*---------------------------------------------------------------. |
/*---------------------------------------------------------------. |
399 |
} |
} |
400 |
|
|
401 |
.|\n YY_OBS_GROW; |
.|\n YY_OBS_GROW; |
402 |
<<EOF>> unexpected_end_of_file (*yylloc, "'"); |
<<EOF>> unexpected_end_of_file (yylloc, "'"); |
403 |
} |
} |
404 |
|
|
405 |
|
|
472 |
"'" YY_OBS_GROW; BEGIN c_context; |
"'" YY_OBS_GROW; BEGIN c_context; |
473 |
\\{splice}[^\[\]] YY_OBS_GROW; |
\\{splice}[^\[\]] YY_OBS_GROW; |
474 |
{splice} YY_OBS_GROW; |
{splice} YY_OBS_GROW; |
475 |
<<EOF>> unexpected_end_of_file (*yylloc, "'"); |
<<EOF>> unexpected_end_of_file (yylloc, "'"); |
476 |
} |
} |
477 |
|
|
478 |
|
|
486 |
"\"" YY_OBS_GROW; BEGIN c_context; |
"\"" YY_OBS_GROW; BEGIN c_context; |
487 |
\\{splice}[^\[\]] YY_OBS_GROW; |
\\{splice}[^\[\]] YY_OBS_GROW; |
488 |
{splice} YY_OBS_GROW; |
{splice} YY_OBS_GROW; |
489 |
<<EOF>> unexpected_end_of_file (*yylloc, "\""); |
<<EOF>> unexpected_end_of_file (yylloc, "\""); |
490 |
} |
} |
491 |
|
|
492 |
|
|
534 |
"@"(-?[0-9]+|"$") { handle_at (current_braced_code, |
"@"(-?[0-9]+|"$") { handle_at (current_braced_code, |
535 |
yytext, *yylloc); } |
yytext, *yylloc); } |
536 |
|
|
537 |
<<EOF>> unexpected_end_of_file (*yylloc, "}"); |
<<EOF>> unexpected_end_of_file (yylloc, "}"); |
538 |
} |
} |
539 |
|
|
540 |
|
|
551 |
return PROLOGUE; |
return PROLOGUE; |
552 |
} |
} |
553 |
|
|
554 |
<<EOF>> unexpected_end_of_file (*yylloc, "%}"); |
<<EOF>> unexpected_end_of_file (yylloc, "%}"); |
555 |
} |
} |
556 |
|
|
557 |
|
|
842 |
`-------------------------------------------------------------*/ |
`-------------------------------------------------------------*/ |
843 |
|
|
844 |
static void |
static void |
845 |
unexpected_end_of_file (location_t loc, char const *token_end) |
unexpected_end_of_file (location_t *loc, char const *token_end) |
846 |
{ |
{ |
847 |
size_t i; |
size_t i = strlen (token_end); |
848 |
|
|
849 |
complain_at (loc, _("missing `%s' at end of file"), token_end); |
complain_at (*loc, _("missing `%s' at end of file"), token_end); |
850 |
for (i = strlen (token_end); i != 0; i--) |
|
851 |
unput (token_end[i - 1]); |
/* Adjust location's last column so that any later message does not |
852 |
|
mention the characters just inserted. */ |
853 |
|
loc->last_column -= i; |
854 |
|
|
855 |
|
while (i != 0) |
856 |
|
unput (token_end[--i]); |
857 |
} |
} |
858 |
|
|
859 |
|
|