summaryrefslogtreecommitdiff
path: root/parser.y
diff options
context:
space:
mode:
authorBobby Bingham <koorogi@koorogi.info>2017-01-18 19:11:57 -0600
committerBobby Bingham <koorogi@koorogi.info>2017-01-18 19:11:57 -0600
commit2e0de3cc53d031ac2fa48eddc9a472b0e4c34a45 (patch)
treef4930b677a9bc2c7c23128192474d1adeeac49f8 /parser.y
parent6ee196e6800099d52776bb16f84f26525586958f (diff)
nqasm: reformat argument rules in grammar
Diffstat (limited to 'parser.y')
-rw-r--r--parser.y21
1 files changed, 7 insertions, 14 deletions
diff --git a/parser.y b/parser.y
index f63a70f..e698e47 100644
--- a/parser.y
+++ b/parser.y
@@ -149,20 +149,13 @@ inst:
| T_NOP { $$ = INSTRUCTION(NOP); }
;
-a_reg2:
- T_SPACE reg "," reg { $$ = MKARGS($2, $4); }
-a_reg3:
- T_SPACE reg "," reg "," reg { $$ = MKARGS($2, $4, $6); }
-a_regp:
- T_SPACE regp { $$ = MKARGS($2); }
-a_regp_reg:
- T_SPACE regp "," reg { $$ = MKARGS($2, $4); }
-a_reg_regp:
- T_SPACE reg "," regp { $$ = MKARGS($2, $4); }
-a_reg_expr:
- T_SPACE reg "," expr { $$ = MKARGS($2, $4); }
-a_expr:
- T_SPACE expr { $$ = MKARGS($2); }
+a_reg2: T_SPACE reg "," reg { $$ = MKARGS($2, $4); }
+a_reg3: T_SPACE reg "," reg "," reg { $$ = MKARGS($2, $4, $6); }
+a_regp: T_SPACE regp { $$ = MKARGS($2); }
+a_regp_reg: T_SPACE regp "," reg { $$ = MKARGS($2, $4); }
+a_reg_regp: T_SPACE reg "," regp { $$ = MKARGS($2, $4); }
+a_reg_expr: T_SPACE reg "," expr { $$ = MKARGS($2, $4); }
+a_expr: T_SPACE expr { $$ = MKARGS($2); }
regp: "@" reg { $$ = $2; }
reg: T_LABEL {