diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-04-09 20:41:43 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-04-09 20:41:43 +0300 |
| commit | 52d8eda04d1e2e33bf4c09713d83360453cec435 (patch) | |
| tree | 9f1822814233ab604204ee6d482be6d5a4798ddc /src/parser.y | |
| parent | 9295e8f445dae6431f8e7c543eb8c374742b136d (diff) | |
| download | qbt-52d8eda04d1e2e33bf4c09713d83360453cec435.tar.gz qbt-52d8eda04d1e2e33bf4c09713d83360453cec435.zip | |
add blit to instructions
Diffstat (limited to 'src/parser.y')
| -rw-r--r-- | src/parser.y | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/parser.y b/src/parser.y index c0653bd..24a2ebe 100644 --- a/src/parser.y +++ b/src/parser.y @@ -59,7 +59,9 @@ %token LEXTHINARROW "->" %token LEXTO ">>" %token LEXFROM "<<" +%token LEXBLIT "<<*" %token LEXSEMI ";" +%token LEXALLOC "^" %token LEXI9 "i9" %token LEXI27 "i27" @@ -370,9 +372,14 @@ mem /* really not a huge fan or 'reusing' the output slot... */ INSADD(STORE, $[type], noclass(), b, t, $[mem_off]); } + | id "<<*" int id { + struct val t = IDTOVAL($1); + struct val f = IDTOVAL($4); + INSADD(BLIT, NOTYPE, noclass(), t, f, $[int]); + } stack - : type id "=" "alloc" int { + : type id "=" "^" int { struct val t = IDALLOC($[id]); INSADD(ALLOC, $[type], t, noclass(), noclass(), $[int]); } |
