diff options
author | Tucker Evans <tuckerevans24@gmail.com> | 2019-07-22 20:08:22 -0400 |
---|---|---|
committer | Tucker Evans <tuckerevans24@gmail.com> | 2019-07-22 20:08:22 -0400 |
commit | 54a92f688346f0cbd865ad42d8738fee630fd3b3 (patch) | |
tree | b0cc5257b3b417af60b72ec9e09ff1190bac3a5b /pc.y | |
parent | db268547e272dada20d7404a25881bef50d3be8d (diff) |
Add for do loop
Does not add for loop to parse tree.
Diffstat (limited to 'pc.y')
-rw-r--r-- | pc.y | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -56,6 +56,7 @@ extern int yylex(); %token IF ELSE THEN %token WHILE DO +%token FOR TO DT %token FCALL PCALL %token ARRAY_ACCESS @@ -227,8 +228,15 @@ statement { $$ = mktree(WHILE, $2, $4); } + |FOR var ASSIGNOP expr TD expr DO statement + { + /*TODO design tree structure for FOR loops*/ + $$ = NULL; + } ; +TD: TO | DT; + var :ID { |