Home
last modified time | relevance | path

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

123

/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_patch.py32 parser = argparse.ArgumentParser()
34 parser.add_argument('query', help='Change list query string')
35 parser.add_argument('-g', '--gerrit', required=True,
38 parser.add_argument('--gitcookies',
41 parser.add_argument('--limits', default=1000,
44 return parser.parse_args()
Drepo_review.py86 parser = argparse.ArgumentParser()
88 parser.add_argument('query', help='Change list query string')
89 parser.add_argument('-g', '--gerrit', required=True,
92 parser.add_argument('--gitcookies',
95 parser.add_argument('--limits', default=1000,
98 parser.add_argument('-l', '--label', nargs=2, action='append',
100 parser.add_argument('-m', '--message', help='Review message')
102 parser.add_argument('--abandon', help='Abandon a CL with a message')
104 parser.add_argument('--add-hashtag', action='append', help='Add hashtag')
105 parser.add_argument('--remove-hashtag', action='append',
[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_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()
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()
/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/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()
Dcheck_vndk_dep.py94 parser = argparse.ArgumentParser()
95 parser.add_argument('root_bp',
97 parser.add_argument('--namespace', action='append', default=[''],
99 return 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/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/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/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()
Dgit_commits_not_upstreamed.py111 parser = argparse.ArgumentParser(
113 parser.add_argument(
117 parser.add_argument(
121 parser.add_argument(
126 args = parser.parse_args()
/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/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/gsi_util/commands/
Dflash_gsi.py55 parser = subparsers.add_parser(
61 parser.add_argument('-i', '--image',
63 parser.set_defaults(func=do_flash_gsi)
/development/vndk/tools/header-checker/utils/
Dcreate_reference_dumps.py213 parser = argparse.ArgumentParser()
214 parser.add_argument('--version', help='VNDK version')
215 parser.add_argument('--no-make-lib', action='store_true',
217 parser.add_argument('--llndk', action='store_true',
219 parser.add_argument('-libs', action='append',
221 parser.add_argument('-products', action='append',
223 parser.add_argument('--build-variant', default='userdebug',
225 parser.add_argument('--compress', action='store_true',
227 parser.add_argument('-ref-dump-dir',
231 args = parser.parse_args()

123