{int} yylval->integer = strtol (yytext, 0, 10); return INT;
/* Characters. We don't check there is only one. */
- \' YY_OBS_GROW; yy_push_state (SC_ESCAPED_CHARACTER);
+ "'" YY_OBS_GROW; yy_push_state (SC_ESCAPED_CHARACTER);
/* Strings. */
- \" YY_OBS_GROW; yy_push_state (SC_ESCAPED_STRING);
+ "\"" YY_OBS_GROW; yy_push_state (SC_ESCAPED_STRING);
/* Comments. */
"/*" yy_push_state (SC_COMMENT);
. {
LOCATION_PRINT (stderr, *yylloc);
- fprintf (stderr, ": invalid character: `%c'\n", *yytext);
+ fprintf (stderr, _(": invalid character: `%c'\n"), *yytext);
YY_STEP;
}
}
<<EOF>> {
LOCATION_PRINT (stderr, *yylloc);
- fprintf (stderr, ": unexpected end of file in a comment\n");
+ fprintf (stderr, _(": unexpected end of file in a comment\n"));
yy_pop_state ();
}
}
<SC_ESCAPED_STRING>
{
- \" {
+ "\"" {
assert (yy_top_state () == INITIAL);
YY_OBS_GROW;
YY_OBS_FINISH;
<<EOF>> {
LOCATION_PRINT (stderr, *yylloc);
- fprintf (stderr, ": unexpected end of file in a string\n");
+ fprintf (stderr, _(": unexpected end of file in a string\n"));
assert (yy_top_state () == INITIAL);
YY_OBS_FINISH;
yylval->string = last_string;
<SC_ESCAPED_CHARACTER>
{
- \' {
+ "'" {
YY_OBS_GROW;
assert (yy_top_state () == INITIAL);
{
}
}
- [^\'\n\r\\] YY_OBS_GROW;
+ [^\n\r\\] YY_OBS_GROW;
{eols} obstack_1grow (&string_obstack, '\n'); YY_LINES;
<<EOF>> {
LOCATION_PRINT (stderr, *yylloc);
- fprintf (stderr, ": unexpected end of file in a character\n");
+ fprintf (stderr, _(": unexpected end of file in a character\n"));
assert (yy_top_state () == INITIAL);
YY_OBS_FINISH;
yylval->string = last_string;
if (c > 255)
{
LOCATION_PRINT (stderr, *yylloc);
- fprintf (stderr, ": invalid escape: %s\n", quote (yytext));
+ fprintf (stderr, _(": invalid escape: %s\n"), quote (yytext));
YY_STEP;
}
else
\\[\\""] obstack_1grow (&string_obstack, yytext[1]);
\\(.|\n) {
LOCATION_PRINT (stderr, *yylloc);
- fprintf (stderr, ": unrecognized escape: %s\n", quote (yytext));
+ fprintf (stderr, _(": unrecognized escape: %s\n"), quote (yytext));
YY_OBS_GROW;
}
/* FLex wants this rule, in case of a `\<<EOF>>'. */
<SC_CHARACTER>
{
- \' {
+ "'" {
YY_OBS_GROW;
assert (yy_top_state () != INITIAL);
yy_pop_state ();
<<EOF>> {
LOCATION_PRINT (stderr, *yylloc);
- fprintf (stderr, ": unexpected end of file in a character\n");
+ fprintf (stderr, _(": unexpected end of file in a character\n"));
assert (yy_top_state () != INITIAL);
yy_pop_state ();
}
<SC_STRING>
{
- \" {
+ "\"" {
assert (yy_top_state () != INITIAL);
YY_OBS_GROW;
yy_pop_state ();
<<EOF>> {
LOCATION_PRINT (stderr, *yylloc);
- fprintf (stderr, ": unexpected end of file in a string\n");
+ fprintf (stderr, _(": unexpected end of file in a string\n"));
assert (yy_top_state () != INITIAL);
yy_pop_state ();
}
<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>
{
/* Characters. We don't check there is only one. */
- \' YY_OBS_GROW; yy_push_state (SC_CHARACTER);
+ "'" YY_OBS_GROW; yy_push_state (SC_CHARACTER);
/* Strings. */
- \" YY_OBS_GROW; yy_push_state (SC_STRING);
+ "\"" YY_OBS_GROW; yy_push_state (SC_STRING);
/* Comments. */
"/*" YY_OBS_GROW; yy_push_state (SC_COMMENT);
<<EOF>> {
LOCATION_PRINT (stderr, *yylloc);
- fprintf (stderr, ": unexpected end of file in a braced code\n");
+ fprintf (stderr, _(": unexpected end of file in a braced code\n"));
yy_pop_state ();
YY_OBS_FINISH;
yylval->string = last_string;
<<EOF>> {
LOCATION_PRINT (stderr, *yylloc);
- fprintf (stderr, ": unexpected end of file in a prologue\n");
+ fprintf (stderr, _(": unexpected end of file in a prologue\n"));
yy_pop_state ();
YY_OBS_FINISH;
yylval->string = last_string;
obstack_fgrow1 (&string_obstack,
"]b4_lhs_value([%s])[", type_name);
}
- else if (isdigit (*cp) || *cp == '-')
+ else if (('0' <= *cp && *cp <= '9') || *cp == '-')
{
/* RULE_LENGTH is the number of values in the current rule so
far, which says where to find `$0' with respect to the top of
{
obstack_sgrow (&string_obstack, "]b4_lhs_location[");
}
- else if (isdigit (*cp) || *cp == '-')
+ else if (('0' <= *cp && *cp <= '9') || *cp == '-')
{
/* RULE_LENGTH is the number of values in the current rule so
far, which says where to find `$0' with respect to the top of