rizin/subprojects/rizin-shell-parser/corpus/grep_commands.txt
Riccardo Schirone 9d68e9614f
Fix old math commands (#3828)
* core/cmd: Adjust math commands

* shell: make `?x` commands a parsing failure

We have moved the `?x` commands to `%x`, thus now no command should
start with `?`. This patch makes the parser fail to parse `?x`
strings.

* core/tui: use APIs in panels

* There's no `%q` anymore, use `%=`
2023-09-14 08:53:25 +08:00

60 lines
1.4 KiB
Text

================
Very simple grep
================
pd 10 ~ mov
pd 10~mov
afl~$
---
(statements
(grep_stmt
command: (arged_stmt
command: (cmd_identifier)
args: (args (arg (arg_identifier))))
specifier: (grep_specifier (grep_specifier_identifier)))
(grep_stmt
command: (arged_stmt
command: (cmd_identifier)
args: (args (arg (arg_identifier))))
specifier: (grep_specifier (grep_specifier_identifier)))
(grep_stmt
command: (arged_stmt command: (cmd_identifier))
specifier: (grep_specifier (grep_specifier_identifier))))
=======================================
Grep with cmd substitution as specifier
=======================================
pd 10~`echo mov`
pd 10~mo`echo v`
pd 10~mo$(echo v)
---
(statements
(grep_stmt
(arged_stmt (cmd_identifier)
(args (arg (arg_identifier))))
(grep_specifier
(cmd_substitution_arg
(arged_stmt (cmd_identifier)
(args (arg (arg_identifier)))))))
(grep_stmt
(arged_stmt (cmd_identifier)
(args (arg (arg_identifier))))
(grep_specifier
(grep_specifier_identifier)
(cmd_substitution_arg
(arged_stmt (cmd_identifier)
(args (arg (arg_identifier)))))))
(grep_stmt
(arged_stmt (cmd_identifier)
(args (arg (arg_identifier))))
(grep_specifier
(grep_specifier_identifier)
(cmd_substitution_arg
(arged_stmt (cmd_identifier)
(args (arg (arg_identifier))))))))