Home
last modified time | relevance | path

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

1234

/development/vndk/tools/sourcedr/blueprint/tests/
Dtest_parser.py32 parser = Parser(None)
35 parser.define_var('a', str1)
36 self.assertEqual(len(parser.var_defs), 1)
37 self.assertEqual(len(parser.vars), 1)
38 self.assertIn('a', parser.vars)
39 self.assertIs(parser.vars['a'], str1)
42 parser.define_var('a', str2)
43 self.assertEqual(len(parser.var_defs), 2)
44 self.assertEqual(len(parser.vars), 1)
45 self.assertIn('a', parser.vars)
[all …]
Dtest_module_path.py43 parser = Parser(Lexer(content, path='test_path'))
44 parser.parse()
46 self.assertEqual('test_path', parser.modules[0][1]['_path'])
56 parser = RecursiveParser()
57 parser.parse_file(test_root_file, default_sub_name=SUBNAME)
59 named_mods = {module[1]['name']: module for module in parser.modules}
/development/samples/training/network-usage/src/com/example/android/networkusage/
DStackOverflowXmlParser.java39 XmlPullParser parser = Xml.newPullParser(); in parse() local
40 parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, false); in parse()
41 parser.setInput(in, null); in parse()
42 parser.nextTag(); in parse()
43 return readFeed(parser); in parse()
49 private List<Entry> readFeed(XmlPullParser parser) throws XmlPullParserException, IOException { in readFeed() argument
52 parser.require(XmlPullParser.START_TAG, ns, "feed"); in readFeed()
53 while (parser.next() != XmlPullParser.END_TAG) { in readFeed()
54 if (parser.getEventType() != XmlPullParser.START_TAG) { in readFeed()
57 String name = parser.getName(); in readFeed()
[all …]
/development/samples/browseable/BasicSyncAdapter/src/com.example.android.basicsyncadapter/net/
DFeedParser.java61 XmlPullParser parser = Xml.newPullParser(); in parse() local
62 parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, false); in parse()
63 parser.setInput(in, null); in parse()
64 parser.nextTag(); in parse()
65 return readFeed(parser); in parse()
79 private List<Entry> readFeed(XmlPullParser parser) in readFeed() argument
90 parser.require(XmlPullParser.START_TAG, ns, "feed"); in readFeed()
91 while (parser.next() != XmlPullParser.END_TAG) { in readFeed()
92 if (parser.getEventType() != XmlPullParser.START_TAG) { in readFeed()
95 String name = parser.getName(); in readFeed()
[all …]
/development/vndk/tools/header-checker/src/repr/symbol/
Dversion_script_parser_test.cpp45 VersionScriptParser parser; in TEST() local
48 std::unique_ptr<ExportedSymbolSet> result(parser.Parse(stream)); in TEST()
84 VersionScriptParser parser; in TEST() local
87 std::unique_ptr<ExportedSymbolSet> result(parser.Parse(stream)); in TEST()
99 VersionScriptParser parser; in TEST() local
100 parser.AddExcludedSymbolVersion("LIBEX_PRIVATE"); in TEST()
103 std::unique_ptr<ExportedSymbolSet> result(parser.Parse(stream)); in TEST()
139 VersionScriptParser parser; in TEST() local
142 std::unique_ptr<ExportedSymbolSet> result(parser.Parse(stream)); in TEST()
179 VersionScriptParser parser; in TEST() local
[all …]
/development/tools/repo_pull/
Drepo_review.py88 parser = argparse.ArgumentParser()
90 parser.add_argument('query', help='Change list query string')
91 parser.add_argument('-g', '--gerrit', help='Gerrit review URL')
93 parser.add_argument('--gitcookies',
96 parser.add_argument('--limits', default=1000,
99 parser.add_argument('-l', '--label', nargs=2, action='append',
101 parser.add_argument('-m', '--message', help='Review message')
103 parser.add_argument('--submit', action='store_true', help='Submit a CL')
105 parser.add_argument('--abandon', help='Abandon a CL with a message')
107 parser.add_argument('--add-hashtag', action='append', help='Add hashtag')
[all …]
Drepo_patch.py34 parser = argparse.ArgumentParser()
36 parser.add_argument('query', help='Change list query string')
37 parser.add_argument('-g', '--gerrit', help='Gerrit review URL')
39 parser.add_argument('--gitcookies',
42 parser.add_argument('--limits', default=1000,
45 return parser.parse_args()
Drepo_pull.py364 parser = argparse.ArgumentParser()
366 parser.add_argument('command', choices=['pull', 'bash', 'json'],
369 parser.add_argument('query', help='Change list query string')
370 parser.add_argument('-g', '--gerrit', help='Gerrit review URL')
372 parser.add_argument('--gitcookies',
375 parser.add_argument('--manifest', help='Manifest')
376 parser.add_argument('--limits', default=1000,
379 parser.add_argument('-m', '--merge',
384 parser.add_argument('-p', '--pick',
389 parser.add_argument('-b', '--branch',
[all …]
/development/testrunner/
Druntest.py104 parser = optparse.OptionParser(usage=self._RUNTEST_USAGE)
106 parser.add_option("-l", "--list-tests", dest="only_list_tests",
109 parser.add_option("-b", "--skip-build", dest="skip_build", default=False,
111 parser.add_option("-j", "--jobs", dest="make_jobs",
114 parser.add_option("-n", "--skip_execute", dest="preview", default=False,
117 parser.add_option("-i", "--build-install-only", dest="build_install_only", default=False,
120 parser.add_option("-r", "--raw-mode", dest="raw_mode", default=False,
123 parser.add_option("-a", "--suite-assign", dest="suite_assign_mode",
127 parser.add_option("-v", "--verbose", dest="verbose", default=False,
130 parser.add_option("-w", "--wait-for-debugger", dest="wait_for_debugger",
[all …]
/development/samples/XmlAdapters/src/com/example/android/xmladapters/
DXmlDocumentProvider.java176 XmlPullParser parser = null; in query() local
181 parser = getUriXmlPullParser(url); in query()
187 parser = getResourceXmlPullParser(resourceUri); in query()
191 if (parser != null) { in query()
194 xmlCursor.parseWith(parser); in query()
216 XmlPullParser parser = null; in getUriXmlPullParser() local
220 parser = factory.newPullParser(); in getUriXmlPullParser()
243 parser.setInput(inputStream, null); in getUriXmlPullParser()
249 return parser; in getUriXmlPullParser()
379 public void parseWith(XmlPullParser parser) throws IOException, XmlPullParserException { in parseWith() argument
[all …]
DAdapters.java501 XmlResourceParser parser = null; in loadAdapter() local
503 parser = context.getResources().getXml(id); in loadAdapter()
504 return createAdapterFromXml(context, parser, Xml.asAttributeSet(parser), in loadAdapter()
519 if (parser != null) parser.close(); in loadAdapter()
533 XmlPullParser parser, AttributeSet attrs, int id, Object[] parameters, in createAdapterFromXml() argument
540 int depth = parser.getDepth(); in createAdapterFromXml()
542 while (((type = parser.next()) != XmlPullParser.END_TAG || parser.getDepth() > depth) && in createAdapterFromXml()
549 String name = parser.getName(); in createAdapterFromXml()
557 adapter = createCursorAdapter(c, parser, attrs, id, parameters); in createAdapterFromXml()
559 throw new IllegalArgumentException("Unknown adapter name " + parser.getName() + in createAdapterFromXml()
[all …]
/development/vndk/tools/sourcedr/ninja/
Dlist_installed_file_from_source.py18 parser = argparse.ArgumentParser()
21 parser.add_argument('input_file', help='input ninja file')
22 parser.add_argument('--ninja-deps', help='.ninja_deps file')
23 parser.add_argument('--cwd', help='working directory for ninja')
24 parser.add_argument('--encoding', default='utf-8',
28 parser.add_argument(
30 parser.add_argument(
33 parser.add_argument(
37 return parser.parse_args()
Dlist_source_file.py21 parser = argparse.ArgumentParser()
24 parser.add_argument('input_file', help='input ninja file')
25 parser.add_argument('--ninja-deps', help='.ninja_deps file')
26 parser.add_argument('--cwd', help='working directory for ninja')
27 parser.add_argument('--encoding', default='utf-8',
31 parser.add_argument(
34 parser.add_argument(
37 return parser.parse_args()
Dlist_ninja_build_dep.py21 parser = argparse.ArgumentParser()
24 parser.add_argument('input_file', help='input ninja file')
25 parser.add_argument('--ninja-deps', help='.ninja_deps file')
26 parser.add_argument('--cwd', help='working directory for ninja')
27 parser.add_argument('--encoding', default='utf-8',
31 parser.add_argument('target', help='build target')
33 return parser.parse_args()
Dlist_installed_module_under_source.py39 parser = argparse.ArgumentParser()
41 parser.add_argument('module_info', help='Path to module-info.json')
43 parser.add_argument('--out-dir', default='out',
46 parser.add_argument('--installed-filter',
49 parser.add_argument('--module-definition-filter',
52 return parser.parse_args()
/development/vndk/tools/header-checker/utils/
Dcreate_reference_dumps.py171 parser = argparse.ArgumentParser()
172 parser.add_argument('--version', help='VNDK version')
173 parser.add_argument('--no-make-lib', action='store_true',
175 parser.add_argument('--llndk', action='store_true',
177 parser.add_argument('-libs', action='append',
179 parser.add_argument('-products', action='append',
181 parser.add_argument('--build-variant', default='userdebug',
183 parser.add_argument('--compress', action='store_true',
185 parser.add_argument('-ref-dump-dir',
189 args = parser.parse_args()
[all …]
/development/vndk/tools/sourcedr/blueprint/
Dlist_vndk_module.py33 parser = argparse.ArgumentParser()
34 parser.add_argument('root_bp',
36 parser.add_argument('-o', '--output', help='path to output file')
37 parser.add_argument('--exclude',
39 parser.add_argument('--select',
41 parser.add_argument('--namespace', action='append', default=[''],
43 return parser.parse_args()
Danalyze_manifest_split.py65 parser = RecursiveParser()
66 parser.parse_file(root_bp_path)
67 parsed_items = evaluate_defaults(parser.modules)
117 parser = argparse.ArgumentParser()
118 parser.add_argument('-b', '--blueprint', required=True,
120 parser.add_argument('-m', '--manifest', required=True,
122 group = parser.add_mutually_exclusive_group()
131 return parser.parse_args()
/development/tools/repo_diff/
Drepo_diff_android.py34 parser = argparse.ArgumentParser(description=HELP_MSG)
36 parser.add_argument("-u", "--manifest-url",
39 parser.add_argument("-b", "--manifest-branch",
42 parser.add_argument("-r", "--upstream-manifest-url",
45 parser.add_argument("-a", "--upstream-manifest-branch",
48 parser.add_argument("-e", "--exclusions-file",
51 parser.add_argument("-t", "--tag",
54 parser.add_argument("-i", "--ignore_error_during_sync",
59 return parser.parse_args()
/development/scripts/
Dstack26 parser = argparse.ArgumentParser(description='Parse and symbolize crashes')
27 parser.add_argument('--arch', help='the target architecture')
28 parser.add_argument('--syms', '--symdir', help='the symbols directory')
29 parser.add_argument('file',
38 args = parser.parse_args()
/development/vndk/tools/header-checker/src/utils/
Dconfig_file_test.cpp76 ConfigParser parser(stream); in TEST() local
77 parser.SetErrorListener( in TEST()
83 parser.ParseFile(); in TEST()
97 ConfigParser parser(stream); in TEST() local
98 parser.SetErrorListener( in TEST()
104 parser.ParseFile(); in TEST()
/development/samples/browseable/MediaBrowserService/src/com.example.android.mediabrowserservice/
DPackageValidator.java55 private Map<String, ArrayList<CallerInfo>> readValidCertificates(XmlResourceParser parser) { in readValidCertificates() argument
58 int eventType = parser.next(); in readValidCertificates()
61 && parser.getName().equals("signing_certificate")) { in readValidCertificates()
63 String name = parser.getAttributeValue(null, "name"); in readValidCertificates()
64 String packageName = parser.getAttributeValue(null, "package"); in readValidCertificates()
65 boolean isRelease = parser.getAttributeBooleanValue(null, "release", false); in readValidCertificates()
66 String certificate = parser.nextText().replaceAll("\\s|\\n", ""); in readValidCertificates()
80 eventType = parser.next(); in readValidCertificates()
/development/gsi/gsi_util/
Dgsi_util.py47 parser = argparse.ArgumentParser()
48 parser.add_argument('-v', '--version', action='version',
50 parser.add_argument(
54 subparsers = parser.add_subparsers(title='COMMAND')
60 args = parser.parse_args(argv[1:])
/development/tools/bugreport/src/com/android/bugreport/
DMain.java77 final BugreportParser parser = new BugreportParser(); in run() local
78 bugreport = parser.parse(Lines.readLines(options.bugreport)); in run()
89 final MonkeyLogParser parser = new MonkeyLogParser(); in run() local
90 parser.parse(bugreport, Lines.readLines(options.monkey)); in run()
102 final LogcatParser parser = new LogcatParser(); in run() local
103 bugreport.logcat = parser.parse(Lines.readLines(options.logcat)); in run()
/development/vndk/tools/image-diff-tool/
Ddiff.py207 parser = argparse.ArgumentParser( variable
211 parser.add_argument("-t", "--target", nargs="+", required=True)
212 parser.add_argument("-s", "--search_path", nargs="+", required=True)
213 parser.add_argument("-i", "--ignore_signing_key", action="store_true")
214 parser.add_argument(
219 parser.add_argument("-u", "--unzip", action="store_true")
220 parser.add_argument("-p", "--preserve_extracted_files", action="store_true")
221 parser.add_argument("-w", "--allowlist", action="append", default=[])
222 args = parser.parse_args()
224 parser.error("The number of targets has to be at least two.")

1234