testing why grammar does not work

This commit is contained in:
Partho Bhattacharya
2025-02-27 14:13:19 -05:00
parent 3ce8cbae59
commit 5626a5c371
5 changed files with 103 additions and 5 deletions

View File

@ -8,9 +8,9 @@
extern int yylex(void);
void yyerror(const char *err);
%}
/*
%token ID 101
%token T_INTEGER 201
%token T_INTEGER
%token T_ADDRESS 202
%token T_BOOLEAN 203
%token T_CHARACTER 204
@ -54,10 +54,19 @@
%token DOT 612
%token RESERVE 613
%token RELEASE 614
%token COMMENT 700 */
%token COMMENT 700
%%
start: /*empty for now*/
input: /*empty for now*/
OPTIONAL;
OPTIONAL_OPTIONAL:
OPTIONAL
| OPTIONAL_OPTIONAL OPTIONAL {printf("expansion\n");};
OPTIONAL:
'[' {printf("success");}
|%empty
;
// B : '{'{CreateScope(cur,line,column)} E '}'; //Braced Expressions can have braces removed to get regular expressions
// D : '[' l ']'; //Declaration Lists Brackets can be taken out to get a list of Declarations