Fix .- command parsing
This commit is contained in:
parent
4762bd1289
commit
9c650deef1
4 changed files with 9138 additions and 8989 deletions
|
|
@ -378,3 +378,14 @@ rz-find -S واسع bins/pe/testapp-msvc64.exe
|
|||
(arg (arg_identifier))
|
||||
(arg (arg_identifier))
|
||||
(arg (arg_identifier)))))
|
||||
|
||||
===============
|
||||
.- with no args
|
||||
===============
|
||||
|
||||
.-
|
||||
|
||||
---
|
||||
|
||||
(statements
|
||||
(arged_stmt (cmd_identifier)))
|
||||
|
|
|
|||
|
|
@ -262,7 +262,10 @@ module.exports = grammar({
|
|||
1,
|
||||
choice(
|
||||
seq(field("command", alias(".", $.cmd_identifier)), field("args", $._simple_stmt)),
|
||||
seq(field("command", alias(/\.[\.:\-*]+/, $.cmd_identifier)), /[ ]+/, field("args", optional($.args))),
|
||||
seq(
|
||||
field("command", alias(/\.[\.:\-*]+/, $.cmd_identifier)),
|
||||
optional(seq(/[ ]+/, field("args", optional($.args))))
|
||||
),
|
||||
seq(field("command", alias(/\.[ ]+/, $.cmd_identifier)), field("args", optional($.args))),
|
||||
seq(field("command", alias(".(", $.cmd_identifier)), field("args", $.macro_call_content)),
|
||||
seq(field("command", alias($._interpret_search_identifier, $.cmd_identifier)), field("args", $.args)),
|
||||
|
|
|
|||
49
shlr/rizin-shell-parser/src/grammar.json
generated
49
shlr/rizin-shell-parser/src/grammar.json
generated
|
|
@ -1807,24 +1807,37 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"type": "PATTERN",
|
||||
"value": "[ ]+"
|
||||
},
|
||||
{
|
||||
"type": "FIELD",
|
||||
"name": "args",
|
||||
"content": {
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "args"
|
||||
},
|
||||
{
|
||||
"type": "BLANK"
|
||||
}
|
||||
]
|
||||
}
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "SEQ",
|
||||
"members": [
|
||||
{
|
||||
"type": "PATTERN",
|
||||
"value": "[ ]+"
|
||||
},
|
||||
{
|
||||
"type": "FIELD",
|
||||
"name": "args",
|
||||
"content": {
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "args"
|
||||
},
|
||||
{
|
||||
"type": "BLANK"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "BLANK"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
18062
shlr/rizin-shell-parser/src/parser.c
generated
18062
shlr/rizin-shell-parser/src/parser.c
generated
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue