diff options
author | Bobby Bingham <koorogi@koorogi.info> | 2017-01-18 19:11:57 -0600 |
---|---|---|
committer | Bobby Bingham <koorogi@koorogi.info> | 2017-01-18 19:11:57 -0600 |
commit | 2e0de3cc53d031ac2fa48eddc9a472b0e4c34a45 (patch) | |
tree | f4930b677a9bc2c7c23128192474d1adeeac49f8 | |
parent | 6ee196e6800099d52776bb16f84f26525586958f (diff) |
nqasm: reformat argument rules in grammar
-rw-r--r-- | parser.y | 21 |
1 files changed, 7 insertions, 14 deletions
@@ -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 { |