129 |
} |
} |
130 |
|
|
131 |
|
|
132 |
|
/* Report an unexpected end of file at LOC. A token or comment began |
133 |
|
with TOKEN_START, but an end of file was encountered and the |
134 |
|
expected TOKEN_END was missing. */ |
135 |
|
|
136 |
|
static void |
137 |
|
unexpected_end_of_file (location_t loc, |
138 |
|
char const *token_start, char const *token_end) |
139 |
|
{ |
140 |
|
complain_at (loc, _("unexpected end of file in `%s ... %s'"), |
141 |
|
token_start, token_end); |
142 |
|
} |
143 |
|
|
144 |
|
|
145 |
|
|
146 |
/* STRING_OBSTACK -- Used to store all the characters that we need to |
/* STRING_OBSTACK -- Used to store all the characters that we need to |
147 |
keep (to construct ID, STRINGS etc.). Use the following macros to |
keep (to construct ID, STRINGS etc.). Use the following macros to |
362 |
[^*]+|"*" ; |
[^*]+|"*" ; |
363 |
|
|
364 |
<<EOF>> { |
<<EOF>> { |
365 |
complain_at (*yylloc, _("unexpected end of file in a comment")); |
unexpected_end_of_file (*yylloc, "/*", "*/"); |
366 |
BEGIN INITIAL; |
BEGIN INITIAL; |
367 |
} |
} |
368 |
} |
} |
378 |
[^*\[\]]+|"*" YY_OBS_GROW; |
[^*\[\]]+|"*" YY_OBS_GROW; |
379 |
|
|
380 |
<<EOF>> { |
<<EOF>> { |
381 |
complain_at (*yylloc, _("unexpected end of file in a comment")); |
unexpected_end_of_file (*yylloc, "/*", "*/"); |
382 |
yy_pop_state (); |
yy_pop_state (); |
383 |
} |
} |
384 |
} |
} |
416 |
[^\"\\]+ YY_OBS_GROW; |
[^\"\\]+ YY_OBS_GROW; |
417 |
|
|
418 |
<<EOF>> { |
<<EOF>> { |
419 |
complain_at (*yylloc, _("unexpected end of file in a string")); |
unexpected_end_of_file (*yylloc, "\"", "\""); |
420 |
assert (yy_top_state () == INITIAL); |
assert (yy_top_state () == INITIAL); |
421 |
YY_OBS_FINISH; |
YY_OBS_FINISH; |
422 |
yylval->string = last_string; |
yylval->string = last_string; |
451 |
[^\'\\]+ YY_OBS_GROW; |
[^\'\\]+ YY_OBS_GROW; |
452 |
|
|
453 |
<<EOF>> { |
<<EOF>> { |
454 |
complain_at (*yylloc, _("unexpected end of file in a character literal")); |
unexpected_end_of_file (*yylloc, "'", "'"); |
455 |
assert (yy_top_state () == INITIAL); |
assert (yy_top_state () == INITIAL); |
456 |
YY_OBS_FINISH; |
YY_OBS_FINISH; |
457 |
yylval->string = last_string; |
yylval->string = last_string; |
542 |
\\ YY_OBS_GROW; |
\\ YY_OBS_GROW; |
543 |
|
|
544 |
<<EOF>> { |
<<EOF>> { |
545 |
complain_at (*yylloc, _("unexpected end of file in a character literal")); |
unexpected_end_of_file (*yylloc, "'", "'"); |
546 |
assert (yy_top_state () != INITIAL); |
assert (yy_top_state () != INITIAL); |
547 |
yy_pop_state (); |
yy_pop_state (); |
548 |
} |
} |
569 |
\\ YY_OBS_GROW; |
\\ YY_OBS_GROW; |
570 |
|
|
571 |
<<EOF>> { |
<<EOF>> { |
572 |
complain_at (*yylloc, _("unexpected end of file in a string")); |
unexpected_end_of_file (*yylloc, "\"", "\""); |
573 |
assert (yy_top_state () != INITIAL); |
assert (yy_top_state () != INITIAL); |
574 |
yy_pop_state (); |
yy_pop_state (); |
575 |
} |
} |
629 |
[^\"$%\'/<@\[\]\{\}]+|[$%/<@]|"<"{splice}"<" YY_OBS_GROW; |
[^\"$%\'/<@\[\]\{\}]+|[$%/<@]|"<"{splice}"<" YY_OBS_GROW; |
630 |
|
|
631 |
<<EOF>> { |
<<EOF>> { |
632 |
complain_at (*yylloc, _("unexpected end of file in `{ ... }'")); |
unexpected_end_of_file (*yylloc, "{", "}"); |
633 |
yy_pop_state (); |
yy_pop_state (); |
634 |
YY_OBS_FINISH; |
YY_OBS_FINISH; |
635 |
yylval->string = last_string; |
yylval->string = last_string; |
656 |
"%" YY_OBS_GROW; |
"%" YY_OBS_GROW; |
657 |
|
|
658 |
<<EOF>> { |
<<EOF>> { |
659 |
complain_at (*yylloc, _("unexpected end of file in `%%{ ... %%}'")); |
unexpected_end_of_file (*yylloc, "%{", "%}"); |
660 |
yy_pop_state (); |
yy_pop_state (); |
661 |
YY_OBS_FINISH; |
YY_OBS_FINISH; |
662 |
yylval->string = last_string; |
yylval->string = last_string; |
884 |
/* A non-ASCII host. Use CODE to index into a table of the C |
/* A non-ASCII host. Use CODE to index into a table of the C |
885 |
basic execution character set, which is guaranteed to exist on |
basic execution character set, which is guaranteed to exist on |
886 |
all Standard C platforms. This table also includes '$', '@', |
all Standard C platforms. This table also includes '$', '@', |
887 |
and '`', which not in the basic execution character set but |
and '`', which are not in the basic execution character set but |
888 |
which are unibyte characters on all the platforms that we know |
which are unibyte characters on all the platforms that we know |
889 |
about. */ |
about. */ |
890 |
static signed char const table[] = |
static signed char const table[] = |