#define YYSTYPE int
static YYSTYPE exprMerge (YYSTYPE x0, YYSTYPE x1);
int yylex (void);
-int yyerror (char const *msg);
+void yyerror (char const *msg);
%}
return yyparse ();
}
-int
+void
yyerror (char const *msg)
{
fprintf (stderr, "%s\n", msg);
- exit (4);
}
break;
}
if (fscanf (yyin, "%49s", buf) != 1)
- abort ();
+ return 0;
if (sizeof buf - 1 <= strlen (buf))
abort ();
s = (char *) malloc (strlen (buf) + 1);
main (int argc, char **argv)
{
yyin = stdin;
- if (argc == 2 && !(yyin = fopen (argv[1], "r"))) return 1;
+ if (argc == 2 && !(yyin = fopen (argv[1], "r"))) return 3;
return yyparse ();
}
]])
int main(int argc, char* argv[]) {
yyin = stdin;
- if (argc == 2 && !(yyin = fopen (argv[1], "r"))) return 1;
+ if (argc == 2 && !(yyin = fopen (argv[1], "r"))) return 3;
return yyparse ();
}
]])