re-fresh
[nedit-bw.git] / yacc-debug.patch
blob6b0f4e803667378bfe1fef5302e03d6e2d30a84c
1 ---
3 source/parse.y | 16 ++++++++++++++++
4 1 file changed, 16 insertions(+)
6 diff --quilt old/source/parse.y new/source/parse.y
7 --- old/source/parse.y
8 +++ new/source/parse.y
9 @@ -455,6 +455,12 @@ Program *ParseMacro(char *expr, char **m
11 Program *prog;
13 +#if YYDEBUG
14 + int oldyydebug = yydebug;
15 + yydebug = 1;
16 +#endif
19 BeginCreatingProgram();
21 /* call yyparse to parse the string and check for success. If the parse
22 @@ -465,6 +471,11 @@ Program *ParseMacro(char *expr, char **m
23 *msg = ErrMsg;
24 *stoppedAt = InPtr;
25 FreeProgram(FinishCreatingProgram());
27 +#if YYDEBUG
28 + yydebug = oldyydebug;
29 +#endif
31 return NULL;
34 @@ -474,6 +485,11 @@ Program *ParseMacro(char *expr, char **m
35 /* parse succeeded */
36 *msg = "";
37 *stoppedAt = InPtr;
39 +#if YYDEBUG
40 + yydebug = oldyydebug;
41 +#endif
43 return prog;