From 91505e4ce023d7b3559a8c70e8c5fb32b849bbc8 Mon Sep 17 00:00:00 2001 From: Bernhard Urban Date: Tue, 30 Mar 2010 18:20:44 +0200 Subject: [PATCH] ag: felder haben nicht ganz gepasst --- ag/parser.y | 17 ++++++++--------- parser/parser.y | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/ag/parser.y b/ag/parser.y index 3fe648b..af8f0a6 100644 --- a/ag/parser.y +++ b/ag/parser.y @@ -19,7 +19,7 @@ @attributes { struct symbol *f; } Idents Structdef @attributes { struct symbol *p; } Parms @attributes { struct symbol *s; } Methoddef Statseq Lexpr Expr Minusterm Multerm Orterm -Term Exprs +Term Exprs Feld @attributes { struct symbol *sin; struct symbol *sout; } Statement @traversal @postorder c @@ -161,9 +161,12 @@ Lexpr: @c check_variable(@Lexpr.s@, @IDENT.name@); @} - | Term '.' IDENT + | Feld + ; + +Feld: Term '.' IDENT @{ - @c check_variable(@Lexpr.s@, @IDENT.name@); + @c check_field(@Feld.s@, @IDENT.name@); @} ; @@ -204,11 +207,7 @@ Term: @c check_variable(@Term.s@, @IDENT.name@); @} - | Term '.' IDENT - @{ - @c check_variable(@Term.s@, @IDENT.name@); - @} - + | Feld | IDENT '(' Exprs ')' @{ @c check_variable(@Term.s@, @IDENT.name@); @@ -236,7 +235,7 @@ extern int yylineno; int yyerror(char *error_text) { - fprintf(stderr,"Line %i: %s\n", yylineno, error_text); + fprintf(stderr,"Zeile %i: %s\n", yylineno, error_text); exit(2); } diff --git a/parser/parser.y b/parser/parser.y index 181bc5a..e5f1909 100644 --- a/parser/parser.y +++ b/parser/parser.y @@ -100,7 +100,7 @@ extern int yylineno; int yyerror(char *error_text) { - fprintf(stderr,"Line %i: %s\n", yylineno, error_text); + fprintf(stderr,"Zeile %i: %s\n", yylineno, error_text); exit(2); } -- 2.25.1