From c42c2c574da1dc7e4a0e9a5fbf8a41fa09d64cd4 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Thu, 12 Jan 2012 06:42:08 +1000 Subject: Make the lexer more reentrant, and piss off yyerror. --- LuaSL/src/LuaSL_LSL_tree.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'LuaSL/src/LuaSL_LSL_tree.h') diff --git a/LuaSL/src/LuaSL_LSL_tree.h b/LuaSL/src/LuaSL_LSL_tree.h index bb29399..533237a 100644 --- a/LuaSL/src/LuaSL_LSL_tree.h +++ b/LuaSL/src/LuaSL_LSL_tree.h @@ -168,6 +168,13 @@ struct _LSL_Script LSL_Identifier *variables; }; +typedef struct +{ + char *ignorableText; + int column; + int line; +} LuaSL_yyparseExtra; + // define the type for flex and lemon3 #define YYSTYPE LSL_Leaf @@ -177,7 +184,6 @@ struct _LSL_Script #include "LuaSL_lexer.h" #endif - typedef struct { yyscan_t scanner; @@ -200,8 +206,6 @@ LSL_Leaf *addOperation(LSL_Leaf *left, LSL_Leaf *lval, LSL_Leaf *right); LSL_Leaf *addParenthesis(LSL_Leaf *lval, LSL_Leaf *expr, LSL_Leaf *rval); LSL_Leaf *addStatement(LSL_Leaf *lval, LSL_Type type, LSL_Leaf *expr); -int yyerror(const char *msg); - void *ParseAlloc(void *(*mallocProc)(size_t)); void ParseTrace(FILE *TraceFILE, char *zTracePrompt); void Parse(void *yyp, int yymajor, LSL_Leaf *yyminor, LuaSL_yyparseParam *param); -- cgit v1.1