- if (yytext[0] == '\n')
- unexpected_newline (token_start, "'");
- STRING_FREE;
- BEGIN INITIAL;
- return CHAR;
- }
- <<EOF>> {
- STRING_FINISH;
- loc->start = token_start;
- val->character = last_string[0];
- {
- /* FIXME: Eventually, make these errors. */
- if (last_string[0] == '\0')
- {
- complain (loc, Wother, _("empty character literal"));
- /* '\0' seems dangerous even if we are about to complain. */
- val->character = '\'';
- }
- else if (last_string[1] != '\0')
- complain (loc, Wother,
- _("extra characters in character literal"));
- }
- unexpected_eof (token_start, "'");