diff --git a/subprojects/rizin-shell-parser/grammar.js b/subprojects/rizin-shell-parser/grammar.js index cb4e5d149e7..8e34573ed4c 100644 --- a/subprojects/rizin-shell-parser/grammar.js +++ b/subprojects/rizin-shell-parser/grammar.js @@ -165,22 +165,22 @@ module.exports = grammar({ iter_step_stmt: ($) => prec.right(1, seq($._simple_stmt, "@@s:", $.args)), // tmp changes statements - tmp_seek_op: ($) => prec.right(1, seq("@ ", $.args)), - tmp_blksz_op: ($) => prec.right(1, seq("@!", $.args)), - tmp_fromto_op: ($) => prec.right(1, seq("@(", $.args, ")")), - tmp_arch_op: ($) => prec.right(1, seq("@a:", $.arg)), - tmp_bits_op: ($) => prec.right(1, seq("@b:", $.args)), - tmp_nthi_op: ($) => prec.right(1, seq("@B:", $.arg)), - tmp_eval_op: ($) => prec.right(1, seq("@e:", alias($.tmp_eval_args, $.args))), - tmp_fs_op: ($) => prec.right(1, seq("@F:", $.arg)), - tmp_reli_op: ($) => prec.right(1, seq("@i:", $.args)), - tmp_kuery_op: ($) => prec.right(1, seq("@k:", $.arg)), - tmp_fd_op: ($) => prec.right(1, seq("@o:", $.args)), - tmp_reg_op: ($) => prec.right(1, seq("@r:", $.arg)), - tmp_file_op: ($) => prec.right(1, seq("@f:", $.arg)), - tmp_string_op: ($) => prec.right(1, seq("@s:", $.arg)), - tmp_value_op: ($) => prec.right(1, seq("@v:", $.arg)), - tmp_hex_op: ($) => prec.right(1, seq("@x:", $.arg)), + tmp_seek_op: ($) => seq("@ ", $.args), + tmp_blksz_op: ($) => seq("@!", $.args), + tmp_fromto_op: ($) => seq("@(", $.args, ")"), + tmp_arch_op: ($) => seq("@a:", $.arg), + tmp_bits_op: ($) => seq("@b:", $.args), + tmp_nthi_op: ($) => seq("@B:", $.arg), + tmp_eval_op: ($) => seq("@e:", alias($.tmp_eval_args, $.args)), + tmp_fs_op: ($) => seq("@F:", $.arg), + tmp_reli_op: ($) => seq("@i:", $.args), + tmp_kuery_op: ($) => seq("@k:", $.arg), + tmp_fd_op: ($) => seq("@o:", $.args), + tmp_reg_op: ($) => seq("@r:", $.arg), + tmp_file_op: ($) => seq("@f:", $.arg), + tmp_string_op: ($) => seq("@s:", $.arg), + tmp_value_op: ($) => seq("@v:", $.arg), + tmp_hex_op: ($) => seq("@x:", $.arg), // basic statements help_stmt: ($) => diff --git a/subprojects/rizin-shell-parser/src/grammar.json b/subprojects/rizin-shell-parser/src/grammar.json index 756aab64edd..5ec1345bb6c 100644 --- a/subprojects/rizin-shell-parser/src/grammar.json +++ b/subprojects/rizin-shell-parser/src/grammar.json @@ -1101,285 +1101,221 @@ } }, "tmp_seek_op": { - "type": "PREC_RIGHT", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "@ " - }, - { - "type": "SYMBOL", - "name": "args" - } - ] - } + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "@ " + }, + { + "type": "SYMBOL", + "name": "args" + } + ] }, "tmp_blksz_op": { - "type": "PREC_RIGHT", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "@!" - }, - { - "type": "SYMBOL", - "name": "args" - } - ] - } + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "@!" + }, + { + "type": "SYMBOL", + "name": "args" + } + ] }, "tmp_fromto_op": { - "type": "PREC_RIGHT", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "@(" - }, - { - "type": "SYMBOL", - "name": "args" - }, - { - "type": "STRING", - "value": ")" - } - ] - } + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "@(" + }, + { + "type": "SYMBOL", + "name": "args" + }, + { + "type": "STRING", + "value": ")" + } + ] }, "tmp_arch_op": { - "type": "PREC_RIGHT", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "@a:" - }, - { - "type": "SYMBOL", - "name": "arg" - } - ] - } + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "@a:" + }, + { + "type": "SYMBOL", + "name": "arg" + } + ] }, "tmp_bits_op": { - "type": "PREC_RIGHT", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "@b:" - }, - { - "type": "SYMBOL", - "name": "args" - } - ] - } + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "@b:" + }, + { + "type": "SYMBOL", + "name": "args" + } + ] }, "tmp_nthi_op": { - "type": "PREC_RIGHT", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "@B:" - }, - { - "type": "SYMBOL", - "name": "arg" - } - ] - } + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "@B:" + }, + { + "type": "SYMBOL", + "name": "arg" + } + ] }, "tmp_eval_op": { - "type": "PREC_RIGHT", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "@e:" + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "@e:" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "tmp_eval_args" }, - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "tmp_eval_args" - }, - "named": true, - "value": "args" - } - ] - } + "named": true, + "value": "args" + } + ] }, "tmp_fs_op": { - "type": "PREC_RIGHT", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "@F:" - }, - { - "type": "SYMBOL", - "name": "arg" - } - ] - } + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "@F:" + }, + { + "type": "SYMBOL", + "name": "arg" + } + ] }, "tmp_reli_op": { - "type": "PREC_RIGHT", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "@i:" - }, - { - "type": "SYMBOL", - "name": "args" - } - ] - } + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "@i:" + }, + { + "type": "SYMBOL", + "name": "args" + } + ] }, "tmp_kuery_op": { - "type": "PREC_RIGHT", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "@k:" - }, - { - "type": "SYMBOL", - "name": "arg" - } - ] - } + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "@k:" + }, + { + "type": "SYMBOL", + "name": "arg" + } + ] }, "tmp_fd_op": { - "type": "PREC_RIGHT", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "@o:" - }, - { - "type": "SYMBOL", - "name": "args" - } - ] - } + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "@o:" + }, + { + "type": "SYMBOL", + "name": "args" + } + ] }, "tmp_reg_op": { - "type": "PREC_RIGHT", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "@r:" - }, - { - "type": "SYMBOL", - "name": "arg" - } - ] - } + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "@r:" + }, + { + "type": "SYMBOL", + "name": "arg" + } + ] }, "tmp_file_op": { - "type": "PREC_RIGHT", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "@f:" - }, - { - "type": "SYMBOL", - "name": "arg" - } - ] - } + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "@f:" + }, + { + "type": "SYMBOL", + "name": "arg" + } + ] }, "tmp_string_op": { - "type": "PREC_RIGHT", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "@s:" - }, - { - "type": "SYMBOL", - "name": "arg" - } - ] - } + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "@s:" + }, + { + "type": "SYMBOL", + "name": "arg" + } + ] }, "tmp_value_op": { - "type": "PREC_RIGHT", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "@v:" - }, - { - "type": "SYMBOL", - "name": "arg" - } - ] - } + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "@v:" + }, + { + "type": "SYMBOL", + "name": "arg" + } + ] }, "tmp_hex_op": { - "type": "PREC_RIGHT", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "@x:" - }, - { - "type": "SYMBOL", - "name": "arg" - } - ] - } + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "@x:" + }, + { + "type": "SYMBOL", + "name": "arg" + } + ] }, "help_stmt": { "type": "PREC_LEFT",