98e903e7a0
bison, keeping full compatibility with our previous yacc implementation. Also bring the ability to create reentrant parser This fix bin/140309 [1] PR: bin/140309 [1] Submitted by: Philippe Pepiot <ksh@philpep.org> [1] Approved by: des (mentor) MFC after: 1 month
29 lines
269 B
Plaintext
29 lines
269 B
Plaintext
%{
|
|
int yylex(void);
|
|
static void yyerror(const char *);
|
|
%}
|
|
%%
|
|
S: error
|
|
%%
|
|
|
|
#include <stdio.h>
|
|
|
|
int
|
|
main(void)
|
|
{
|
|
printf("yyparse() = %d\n", yyparse());
|
|
return 0;
|
|
}
|
|
|
|
int
|
|
yylex(void)
|
|
{
|
|
return -1;
|
|
}
|
|
|
|
static void
|
|
yyerror(const char* s)
|
|
{
|
|
printf("%s\n", s);
|
|
}
|