Rizin
unix-like reverse engineering framework and cli tools
cmd_descs_generate.py File Reference

Go to the source code of this file.

Classes

class  cmd_descs_generate.Arg
 
class  cmd_descs_generate.Detail
 
class  cmd_descs_generate.CmdDesc
 

Namespaces

 cmd_descs_generate
 

Functions

def cmd_descs_generate._escape (s)
 
def cmd_descs_generate.strornull (s)
 
def cmd_descs_generate.strip (s)
 
def cmd_descs_generate.format_detail_entry (c)
 
def cmd_descs_generate.createcd_typegroup (cd)
 
def cmd_descs_generate.createcd (cd)
 
def cmd_descs_generate.arg2decl (cd)
 
def cmd_descs_generate.detail2decl (cd)
 
def cmd_descs_generate.handler2decl (cd, cd_type, handler_name)
 

Variables

string cmd_descs_generate.CMDDESCS_C_TEMPLATE
 
string cmd_descs_generate.CMDDESCS_H_TEMPLATE
 
tuple cmd_descs_generate.DESC_HELP_DETAIL_ENTRY_TEMPLATE
 
string cmd_descs_generate.DESC_HELP_DETAIL_ENTRIES_TEMPLATE
 
string cmd_descs_generate.DESC_HELP_DETAIL_TEMPLATE = """\t{{ .name = {name}, .entries = {entries} }}"""
 
string cmd_descs_generate.DESC_HELP_DETAILS_TEMPLATE
 
string cmd_descs_generate.DECL_DESC_HELP_DETAILS_TEMPLATE = "static const RzCmdDescDetail {cname}[{size}];"
 
string cmd_descs_generate.DESC_HELP_ARG_CHOICES = "static const char *{cname}[] = {{ {choices} }};\n"
 
string cmd_descs_generate.DESC_HELP_ARG_UNION_CHOICES = "\t\t.choices = {choices},\n"
 
string cmd_descs_generate.DESC_HELP_ARG_UNION_CHOICES_CB = "\t\t.choices_cb = {choices_cb},\n"
 
string cmd_descs_generate.DESC_HELP_ARG_TEMPLATE_FLAGS = "\t\t.flags = {flags},\n"
 
string cmd_descs_generate.DESC_HELP_ARG_TEMPLATE_OPTIONAL = "\t\t.optional = {optional},\n"
 
string cmd_descs_generate.DESC_HELP_ARG_TEMPLATE_NO_SPACE = "\t\t.no_space = {no_space},\n"
 
string cmd_descs_generate.DESC_HELP_ARG_TEMPLATE_DEFAULT_VALUE = "\t\t.default_value = {default_value},\n"
 
string cmd_descs_generate.DESC_HELP_ARG_TEMPLATE
 
string cmd_descs_generate.DESC_HELP_ARGS_TEMPLATE
 
string cmd_descs_generate.DECL_DESC_HELP_ARGS_TEMPLATE = "static const RzCmdDescArg {cname}[{size}];"
 
string cmd_descs_generate.DESC_HELP_TEMPLATE_DESCRIPTION = "\t.description = {description},\n"
 
string cmd_descs_generate.DESC_HELP_TEMPLATE_ARGS_STR = "\t.args_str = {args_str},\n"
 
string cmd_descs_generate.DESC_HELP_TEMPLATE_USAGE = "\t.usage = {usage},\n"
 
string cmd_descs_generate.DESC_HELP_TEMPLATE_SORT_SUBCOMMANDS = "\t.sort_subcommands = {sort_subcommands},\n"
 
string cmd_descs_generate.DESC_HELP_TEMPLATE_OPTIONS = "\t.options = {options},\n"
 
string cmd_descs_generate.DESC_HELP_TEMPLATE_DETAILS = "\t.details = {details},\n"
 
string cmd_descs_generate.DESC_HELP_TEMPLATE_DETAILS_CB = "\t.details_cb = {details_cb},\n"
 
string cmd_descs_generate.DESC_HELP_TEMPLATE_ARGS = "\t.args = {args},\n"
 
string cmd_descs_generate.DESC_HELP_TEMPLATE
 
string cmd_descs_generate.DEFINE_OLDINPUT_TEMPLATE
 
string cmd_descs_generate.DEFINE_ARGV_TEMPLATE
 
string cmd_descs_generate.DEFINE_ARGV_MODES_TEMPLATE
 
string cmd_descs_generate.DEFINE_ARGV_STATE_TEMPLATE
 
string cmd_descs_generate.DEFINE_GROUP_TEMPLATE
 
string cmd_descs_generate.DEFINE_GROUP_MODES_TEMPLATE
 
string cmd_descs_generate.DEFINE_GROUP_STATE_TEMPLATE
 
string cmd_descs_generate.DEFINE_INNER_TEMPLATE
 
string cmd_descs_generate.DEFINE_FAKE_TEMPLATE
 
string cmd_descs_generate.SET_DEFAULT_MODE_TEMPLATE
 
 cmd_descs_generate.parser
 
 cmd_descs_generate.type
 
 cmd_descs_generate.str
 
 cmd_descs_generate.required
 
 cmd_descs_generate.False
 
 cmd_descs_generate.help
 
 cmd_descs_generate.True
 
 cmd_descs_generate.nargs
 
 cmd_descs_generate.args = parser.parse_args()
 
list cmd_descs_generate.commands_yml_arr = [yaml.safe_load(f) for f in args.yaml_files]
 
dictionary cmd_descs_generate.commands_yml = {c["name"]: c["commands"] for c in commands_yml_arr}
 
 cmd_descs_generate.root_cd = CmdDesc(commands_yml, None)
 
list cmd_descs_generate.root_cds = [CmdDesc(commands_yml, c, root_cd) for c in commands_yml["root"]]
 
list cmd_descs_generate.arg_decls = [arg2decl(cd) for cd in CmdDesc.c_args.values()]
 
list cmd_descs_generate.detail_decls = [detail2decl(cd) for cd in CmdDesc.c_details.values()]
 
list cmd_descs_generate.helps = [str(cd) for cd in root_cds]
 
list cmd_descs_generate.init_code = [createcd(cd) for cd in root_cds]
 
string cmd_descs_generate.cf_text
 
 cmd_descs_generate.encoding
 
 cmd_descs_generate.handlers_decls
 
string cmd_descs_generate.hf_text