(Badly Collapsed GLR States): Avoid //

comments, since they're not portable.  Use GNU coding style.
This commit is contained in:
Paul Eggert
2002-11-13 23:20:52 +00:00
parent caf52fdfab
commit c240826c06

View File

@@ -25,7 +25,7 @@ AT_DATA([glr-regr1.y],
/* Reported by Scott McPeak */
%{
#include <stdio.h> // fgetc, printf
#include <stdio.h>
#define YYSTYPE int
static YYSTYPE exprMerge (YYSTYPE x0, YYSTYPE x1);
@@ -70,7 +70,7 @@ main (void)
int
yyerror (char const *msg)
{
printf("%s\n", msg);
fprintf (stderr, "%s\n", msg);
exit (4);
}
@@ -78,15 +78,15 @@ yyerror (char const *msg)
int
yylex (void)
{
while (1) {
int ch = fgetc(stdin);
if (ch == EOF) {
return 0; // bison's EOF
} else if (ch == 'B' || ch == 'P') {
for (;;)
{
int ch = getchar ();
if (ch == EOF)
return 0;
else if (ch == 'B' || ch == 'P')
return ch;
}
}
}
]])
AT_CHECK([[bison -o glr-regr1.c glr-regr1.y]], 0, [],