Skip to content
Snippets Groups Projects
Commit 12386b5f authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

Fehlerbehandlung in xax verbessert;

dafür muss eine Warnung in Kauf genommen werden.
parent 4907a9a0
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,7 @@ vector<CTree*>* vtree;
%debug
%{
#define YYERROR_VERBOSE 1
#define YYPARSE_PARAM T /* used via xaxparse( CTree *T ) */
int xaxerror(const char*); /* provided by calling code (expr.cpp, ...) */
int xaxlex(YYSTYPE *xaxlval); /* created by lex.l */
......@@ -60,14 +61,7 @@ int xaxlex(YYSTYPE *xaxlval); /* created by lex.l */
%%
input:
/* empty */ { printf("pars got empty line\n"); }
| line
;
line:
exp END { *((CTree*)T) = *$1;
delete $1;
return 0; }
exp END { *((CTree*)T) = *$1; delete $1; return 0; }
| error { yyerrok; return -1; }
;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment