YY_STEP;
}
- ^"#line "{int}" \""[^\"]*"\"\n" handle_syncline (yytext + strlen ("#line "), yylloc); YY_STEP;
+ ^"#line "{int}" \"".*"\"\n" {
+ handle_syncline (yytext + sizeof "#line " - 1, yylloc);
+ YY_STEP;
+ }
"=" return EQUAL;
":" rule_length = 0; return COLON;
\\r obstack_1grow (&string_obstack, '\r');
\\t obstack_1grow (&string_obstack, '\t');
\\v obstack_1grow (&string_obstack, '\v');
- \\[\"\'?\\] obstack_1grow (&string_obstack, yytext[1]);
+
+ /* \\[\"\'?\\] would be shorter, but it confuses xgettext. */
+ \\("\""|"'"|"?"|"\\") obstack_1grow (&string_obstack, yytext[1]);
+
\\(u|U[0-9a-fA-F]{4})[0-9a-fA-F]{4} {
int c = convert_ucn_to_byte (yytext);
if (c < 0)
<SC_CHARACTER>
{
- "'" YY_OBS_GROW; BEGIN c_context;
- \\{splice}[\'\\] YY_OBS_GROW;
- <<EOF>> unexpected_end_of_file (yylloc, "'");
+ "'" YY_OBS_GROW; BEGIN c_context;
+ \\{splice}[^$@\[\]] YY_OBS_GROW;
+ <<EOF>> unexpected_end_of_file (yylloc, "'");
}
<SC_STRING>
{
- "\"" YY_OBS_GROW; BEGIN c_context;
- \\{splice}[\"\\] YY_OBS_GROW;
- <<EOF>> unexpected_end_of_file (yylloc, "\"");
+ "\"" YY_OBS_GROW; BEGIN c_context;
+ \\{splice}[^$@\[\]] YY_OBS_GROW;
+ <<EOF>> unexpected_end_of_file (yylloc, "\"");
}