2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-29 21:41:44 +01:00
waf/demos/bisonflex/main.c

25 lines
358 B
C
Raw Normal View History

2011-09-10 11:13:51 +02:00
#include <stdio.h>
/* this file should work in both c and c++ */
extern int yyparse();
int yyerror (char const *a)
{
printf("yyerror: (%s)\n", a);
return 1;
}
int main(int argc, char *argv[])
{
int yy;
yy = yyparse();
if (yy != 0)
{
printf("Syntax or parse error %i. Aborting.\n", yy);
return 1;
}
else{
printf("Success.\n");
}
return 0;
}