1
0
mirror of https://github.com/stefanocasazza/ULib.git synced 2025-09-28 19:05:55 +08:00
ULib/include/ulib/flex/bison_head.yy
2015-01-23 17:24:36 +01:00

50 lines
646 B
Plaintext

%{
/*
#define YYDEBUG 1
#define TRACE_DEBUG
*/
#include <ulib/flex/bison.h>
#include <%.h>
#define YYPARSE_PARAM obj
#define YYPARSE_RETURN_TYPE int
YYPARSE_RETURN_TYPE yyparse(void*);
int yyerror(char*);
#define yylex ((UBison*)obj)->yylex
#define YYLEX_PARAM &yylval
%}
/* BISON Declarations */
/* va commentato YYLEX_PARAM se abilitato parser rientrante...
%pure_parser
*/
%union {
int number;
UFlexerReference ref;
}
/*
%token ...
%type ...
*/
/* Grammar follows */
%%
%%
int yyerror(char* s)
{
U_INTERNAL_TRACE("yyerror(\"%s\")", s);
/*
extern int yylineno;
U_INTERNAL_TRACE("yylineno=%d", yylineno)
*/
return -1;
}