projects
/
uebersetzerbau-ss10.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gesamt: sicheres umgehen mit den vars, aber dafuer mehr befehle wo es oft nicht
[uebersetzerbau-ss10.git]
/
parser
/
parser.y
diff --git
a/parser/parser.y
b/parser/parser.y
index e6f2a6f056711e6439bfe6738e527e3ffc47a6f4..4031e7b4086e0d01718a3442ca9ba7866000c56a 100644
(file)
--- a/
parser/parser.y
+++ b/
parser/parser.y
@@
-81,20
+81,14
@@
Term:
| THIS
| IDENT
| Term '.' IDENT
| THIS
| IDENT
| Term '.' IDENT
- | Methcall
- ;
-
-Methcall:
- IDENT '(' Exprs ')'
+ | IDENT '(' Exprs ')'
| Term '.' IDENT '(' Exprs ')'
;
| Term '.' IDENT '(' Exprs ')'
;
-/* beachte dass hier auch "nichts" vorkommen kann
- * sonst waer ein aufruf der art 'f()' nicht
- * moeglich (leere parameterliste) */
Exprs:
Exprs:
+ Expr ',' Exprs
| Expr
| Expr
- |
Exprs ',' Expr
+ |
;
%%
;
%%
@@
-104,7
+98,7
@@
extern int yylineno;
int yyerror(char *error_text)
{
int yyerror(char *error_text)
{
- fprintf(stderr,"
Lin
e %i: %s\n", yylineno, error_text);
+ fprintf(stderr,"
Zeil
e %i: %s\n", yylineno, error_text);
exit(2);
}
exit(2);
}