Home
last modified time | relevance | path

Searched refs:parser (Results 1 – 25 of 115) sorted by relevance

12345

/system/sepolicy/build/
Dbuild_sepolicy.py96 parser = subparsers.add_parser('build_cil', help='build CIL files')
97 parser.add_argument('-i', '--input_policy_conf', required=True,
99 parser.add_argument('-m', '--reqd_mask', required=True,
101 parser.add_argument('-b', '--base_policy', required=True,
103 parser.add_argument('-t', '--treble_sepolicy_vers', required=True,
105 parser.add_argument('-p', '--policy_vers', required=True,
109 parser.add_argument('-c', '--checkpolicy_env',
111 parser.add_argument('-f', '--filter_out_files', nargs='+',
113 parser.add_argument('-d', '--dependent_cils', nargs='+',
116 parser.add_argument('-o', '--output_cil', help='the output cil file')
[all …]
/system/tools/aidl/
Daidl_language_l.ll22 #include "parser.h"
57 return yy::parser::token::C_STR; }
87 "<<" { return(yy::parser::token::LSHIFT); }
88 ">>" { return(yy::parser::token::RSHIFT); }
89 "&&" { return(yy::parser::token::LOGICAL_AND); }
90 "||" { return(yy::parser::token::LOGICAL_OR); }
93 "<=" { return(yy::parser::token::LEQ); }
94 ">=" { return(yy::parser::token::GEQ); }
95 "==" { return(yy::parser::token::EQUALITY); }
96 "!=" { return(yy::parser::token::NEQ); }
[all …]
Dparser.cpp42 std::unique_ptr<Parser> parser(new Parser(filename, *raw_buffer, typenames)); in Parse() local
44 if (yy::parser(parser.get()).parse() != 0 || parser->HasError()) { in Parse()
48 return parser; in Parse()
/system/extras/ext4_utils/
Dmkuserimg_mke2fs.py51 parser = argparse.ArgumentParser(
55 parser.add_argument("src_dir", help="The source directory for user image.")
56 parser.add_argument("output_file", help="The path of the output image file.")
57 parser.add_argument("ext_variant", choices=["ext2", "ext4"],
59 parser.add_argument("mount_point", help="The mount point for user image.")
60 parser.add_argument("fs_size", help="Size of the file system.")
61 parser.add_argument("file_contexts", nargs='?',
64 parser.add_argument("--android_sparse", "-s", action="store_true",
66 parser.add_argument("--journal_size", "-j",
68 parser.add_argument("--timestamp", "-T",
[all …]
/system/media/audio_utils/spdif/
DDTSFrameScanner.cpp80 BitFieldParser parser(&mHeaderBuffer[mSyncLength]); in parseHeader() local
84 (void) /* uint32_t ftype = */ parser.readBits(1); in parseHeader()
85 (void) /* uint32_t deficit = */ parser.readBits(5); // "short" in parseHeader()
86 uint32_t cpf = parser.readBits(1); in parseHeader()
87 uint32_t nblks = parser.readBits(7); in parseHeader()
88 uint32_t fsize = parser.readBits(14); in parseHeader()
89 (void) /* uint32_t amode = */ parser.readBits(6); in parseHeader()
90 uint32_t sfreq = parser.readBits(4); in parseHeader()
92 ALOG_ASSERT((mSyncLength + ((parser.getBitCursor() + 7) >> 3)) in parseHeader()
/system/sepolicy/tests/
Dsepolicy_tests.py51 def take_action(self, action, dest, opt, value, values, parser): argument
55 Option.take_action(self, action, dest, opt, value, values, parser)
71 parser = OptionParser(option_class=MultipleOption, usage=usage) variable
72 parser.add_option("-f", "--file_contexts", dest="file_contexts",
74 parser.add_option("-p", "--policy", dest="policy", metavar="FILE")
75 parser.add_option("-l", "--library-path", dest="libpath", metavar="FILE")
76 parser.add_option("-t", "--test", dest="test", action="extend",
79 (options, args) = parser.parse_args()
82 sys.exit("Must specify path to libsepolwrap library\n" + parser.usage)
85 + parser.usage)
[all …]
Dsearchpolicy.py6 parser = argparse.ArgumentParser( variable
9 parser.add_argument("policy", help="Path to the SELinux policy to search.", nargs="?")
10 parser.add_argument("--libpath", dest="libpath", help="Path to the libsepolwrap.so", nargs="?")
11 tertypes = parser.add_argument_group("TE Rule Types")
15 expr = parser.add_argument_group("Expressions")
25 args = parser.parse_args()
28 parser.error("Must specify \"--allow\"")
31 parser.error("Must include path to policy")
33 parser.error("Must include path to libsepolwrap library")
36 parser.error("Must something to filter on, e.g. --source, --target, etc.")
Dtreble_sepolicy_tests.py319 def take_action(self, action, dest, opt, value, values, parser): argument
323 Option.take_action(self, action, dest, opt, value, values, parser)
335 parser = OptionParser(option_class=MultipleOption, usage=usage) variable
336 parser.add_option("-b", "--basepolicy", dest="basepolicy", metavar="FILE")
337 parser.add_option("-u", "--base-pub-policy", dest="base_pub_policy",
339 parser.add_option("-f", "--file_contexts", dest="file_contexts",
341 parser.add_option("-l", "--library-path", dest="libpath", metavar="FILE")
342 parser.add_option("-m", "--mapping", dest="mapping", metavar="FILE")
343 parser.add_option("-o", "--oldpolicy", dest="oldpolicy", metavar="FILE")
344 parser.add_option("-p", "--policy", dest="policy", metavar="FILE")
[all …]
Dcombine_maps.py59 parser = argparse.ArgumentParser() variable
60 parser.add_argument("-t", "--top-map", dest="top_map",
62 parser.add_argument("-b", "--bottom-map", dest="bottom_map",
64 parser.add_argument("-o", "--output-file", dest="output_file",
66 args = parser.parse_args()
/system/timezone/distro/tools/
Dcreate-distro.py73 parser = argparse.ArgumentParser()
74 parser.add_argument('-iana_version', required=True,
76 parser.add_argument('-revision', type=int, default=1,
78 parser.add_argument('-tzdata', required=True, help='The location of the tzdata file to include')
79 parser.add_argument('-icu', required=True,
81 parser.add_argument('-tzlookup', required=True,
83 parser.add_argument('-telephonylookup', required=True,
85 parser.add_argument('-output_distro_dir', required=True,
87 parser.add_argument('-output_version_file', required=True,
89 args = parser.parse_args()
/system/tools/mkbootimg/
Dmkbootimg.py181 def __call__(self, parser, namespace, values, option_string=None): argument
229 parser = ArgumentParser()
230 parser.add_argument('--kernel', help='path to the kernel', type=FileType('rb'))
231 parser.add_argument('--ramdisk', help='path to the ramdisk', type=FileType('rb'))
232 parser.add_argument('--second', help='path to the 2nd bootloader', type=FileType('rb'))
233 parser.add_argument('--dtb', help='path to dtb', type=FileType('rb'))
234 recovery_dtbo_group = parser.add_mutually_exclusive_group()
240 parser.add_argument('--cmdline', help='extra arguments to be passed on the '
242 parser.add_argument('--vendor_cmdline',
245 parser.add_argument('--base', help='base address', type=parse_int, default=0x10000000)
[all …]
/system/core/init/
Dinit_test.cpp49 Parser parser; in TestInit() local
50 parser.AddSectionParser("service", in TestInit()
52 parser.AddSectionParser("on", std::make_unique<ActionParser>(&am, nullptr)); in TestInit()
53 parser.AddSectionParser("import", std::make_unique<ImportParser>(&parser)); in TestInit()
55 ASSERT_TRUE(parser.ParseConfig(init_script_file)); in TestInit()
112 Parser parser; in TEST() local
113 parser.AddSectionParser("on", std::make_unique<ActionParser>(&am, nullptr)); in TEST()
115 ASSERT_TRUE(parser.ParseConfig(tf.path)); in TEST()
116 ASSERT_EQ(1u, parser.parse_error_count()); in TEST()
263 Parser parser; in TEST() local
[all …]
Dueventd_parser.cpp210 auto parser = parser_map.Find(args); in ParseLineSection() local
212 if (!parser.ok()) return Error() << parser.error(); in ParseLineSection()
214 return std::invoke(*parser, this, std::move(args)); in ParseLineSection()
224 Parser parser; in ParseConfig() local
227 parser.AddSectionParser("subsystem", in ParseConfig()
231 parser.AddSingleLineParser( in ParseConfig()
234 parser.AddSingleLineParser("/dev/", std::bind(ParsePermissionsLine, _1, nullptr, in ParseConfig()
236 parser.AddSingleLineParser("firmware_directories", in ParseConfig()
239 parser.AddSingleLineParser("external_firmware_handler", in ParseConfig()
242 parser.AddSingleLineParser("modalias_handling", in ParseConfig()
[all …]
Dhost_builtin_map.py12 parser = argparse.ArgumentParser('host_builtin_map.py') variable
13 parser.add_argument('--builtins', required=True, help='Path to builtins.cpp')
14 parser.add_argument('--check_builtins', required=True, help='Path to check_builtins.cpp')
15 args = parser.parse_args()
/system/extras/simpleperf/scripts/
Dreport_sample.py66 parser = argparse.ArgumentParser(description='Report samples in perf.data.')
67 parser.add_argument('--symfs',
69 parser.add_argument('--kallsyms', help='Set the path to find kernel symbols.')
70 parser.add_argument('record_file', nargs='?', default='perf.data',
72 parser.add_argument('--show_tracing_data', action='store_true', help='print tracing data.')
73 args = parser.parse_args()
/system/update_engine/scripts/
Dblockdiff.py87 parser = argparse.ArgumentParser(
91 parser.add_argument('-b', '--block-size', metavar='NUM', type=int,
93 parser.add_argument('-m', '--max-length', metavar='NUM', type=int, default=-1,
95 parser.add_argument('file1', metavar='FILE1')
96 parser.add_argument('file2', metavar='FILE2')
98 args = parser.parse_args(argv[1:])
Dpaycheck.py76 parser = argparse.ArgumentParser(
91 check_args = parser.add_argument_group('Checking payload integrity')
124 apply_args = parser.add_argument_group('Applying payload')
142 parser.add_argument('payload', metavar='PAYLOAD', help='the payload file')
143 parser.add_argument('--part_names', metavar='NAME', nargs='+',
147 args = parser.parse_args(argv)
163 parser.error('partitions in --%s do not match --part_names' % arg)
172 parser.error('%s payload does not accept source partition arguments'
178 parser.error('%s payload requires source partitions arguments'
185 parser.error('--extract-bsdiff can only be used when applying payloads')
[all …]
/system/core/storaged/tools/
Dranker.py50 parser = argparse.ArgumentParser()
51 parser.add_argument("-i", "--input", dest="input", required="true",
53 parser.add_argument("-o", "--output", dest="output", default="stdout",
55 parser.add_argument("-u", "--uidcnt", dest="uidcnt", type=int, default=10,
58 parser.add_argument("-c", "--combine", dest="combine", default=False,
61 parser.add_argument("-n", "--native", dest="native", default=False,
64 parser.add_argument("-t", "--task", dest="task", default=False,
67 return parser.parse_args()
/system/apex/apexer/
Dapexer.py49 parser = argparse.ArgumentParser(description='Create an APEX file')
50 parser.add_argument(
52 parser.add_argument(
54 parser.add_argument(
58 parser.add_argument(
62 parser.add_argument(
66 parser.add_argument(
70 parser.add_argument(
74 parser.add_argument(
77 parser.add_argument(
[all …]
/system/sepolicy/tools/
Dinsertkeys.py223 parser = OptionParser(usage=usage, version=version) variable
225 parser.add_option("-v", "--verbose",
229 parser.add_option("-o", "--output", default="stdout", dest="output_file",
232 parser.add_option("-c", "--cwd", default=os.getcwd(), dest="root",
236 parser.add_option("-t", "--target-build-variant", default="eng", dest="target_build_variant",
239 parser.add_option("-d", "--key-directory", default="", dest="key_directory",
242 (options, args) = parser.parse_args()
245 parser.error("Must specify a config file (keys.conf) AND mac_permissions.xml file(s)!")
264 parser = make_parser() variable
265 parser.setContentHandler(ReplaceTags(key_map, output_file))
[all …]
/system/libufdt/utils/src/
Dmkdtboimg.py563 parser = argparse.ArgumentParser(add_help=False)
564 parser.add_argument('dt_file', nargs='?',
567 parser.add_argument('--id', type=str, dest='id', action='store',
569 parser.add_argument('--rev', type=str, dest='rev',
571 parser.add_argument('--flags', type=str, dest='flags',
574 parser.add_argument('--custom0', type=str, dest='custom0',
577 parser.add_argument('--custom1', type=str, dest='custom1',
580 parser.add_argument('--custom2', type=str, dest='custom2',
583 return parser.parse_args(arglist)
737 parser = argparse.ArgumentParser(prog='create', add_help=False)
[all …]
/system/extras/systrace_analysis/
Danalyze_trace.py25 parser = argparse.ArgumentParser()
26 parser.add_argument('systrace_file', metavar='SYSTRACE_FILE', help='systrace file to analyze')
27 parser.add_argument('-e', metavar='EVENT_LOG', help='android event log file')
28 args = parser.parse_args()
/system/ca-certificates/google/
Dextract_from_pem.py61 parser = argparse.ArgumentParser(description='PEM Certificate Importer')
62 parser.add_argument('--pem_file', nargs='?', default='roots.pem')
63 parser.add_argument('--output_dir', nargs='?', default='files')
64 parser.add_argument('--timestamp_file', nargs='?', default='TIMESTAMP')
65 args = parser.parse_args()
/system/core/init/test_utils/
Dservice_utils.cpp32 Parser parser; in GetOnDeviceServiceInterfacesMap() local
33 parser.AddSectionParser("service", in GetOnDeviceServiceInterfacesMap()
43 parser.ParseConfig(location); in GetOnDeviceServiceInterfacesMap()
/system/tools/hidl/c2hal/test/
Dbuild_all.py42 parser = argparse.ArgumentParser()
43 parser.add_argument("path", help="location of headers to parse", type=str)
44 parser.add_argument("-g", help="enable opengl specific parsing", action="store_true")
46 return parser.parse_args()

12345