Added identifier lists

This commit is contained in:
Sven Vogel 2024-04-26 17:30:22 +02:00
parent 3c0a885186
commit dd867db271
1 changed files with 8 additions and 2 deletions

View File

@ -67,7 +67,11 @@ expr: ValFloat
assign: Ident '=' expr { DEBUG("Assignment"); };
decl: type ':' Ident { DEBUG("Declaration"); };
identlist: Ident ',' identlist
| Ident
| ;
decl: type ':' identlist { DEBUG("Declaration"); };
definition: decl '=' expr { DEBUG("Definition"); };
@ -81,10 +85,12 @@ scale: scale KeyShort
| scale KeyDouble
| ;
type: Ident
type: sign scale Ident
| sign scale KeyInt
| sign scale KeyFloat;
%%
int yyerror(char *s) {