mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-20 01:33:03 +00:00
* src/scan-skel.l: Postprocess quadrigraphs.
* src/reader.c (copy_character): New function, used to output single characters while replacing `[' and `]' with quadrigraphs, to avoid troubles with M4 quotes. (copy_comment): Output characters with copy_character. (read_additionnal_code): Likewise. (copy_string2): Likewise. (copy_definition): Likewise. * tests/calc.at: Exercise M4 quoting.
This commit is contained in:
@@ -38,9 +38,12 @@ static char *yyoutname = NULL;
|
||||
yylineno = 1;
|
||||
}
|
||||
|
||||
"@<:@" fputc ('[', yyout);
|
||||
"@:>@" fputc (']', yyout);
|
||||
|
||||
"__oline__" fprintf (yyout, "%d", yylineno);
|
||||
"__ofile__" fprintf (yyout, "%s", yyoutname);
|
||||
[^_\n]+ ECHO;
|
||||
[^@_\n]+ ECHO;
|
||||
\n+ yylineno += yyleng; ECHO;
|
||||
. ECHO;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user