Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(587)

Side by Side Diff: tools/spec_parser/spec_parse.dart

Issue 2688903004: Creating an ANTLR grammar for Dart, potentially the syntax spec.
Patch Set: Enabled parsing many files from one JVM process Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/spec_parser/SpecParserRunner.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env dart
2 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
3 // for details. All rights reserved. Use of this source code is governed by a
4 // BSD-style license that can be found in the LICENSE file.
5
6 import 'dart:io';
7
8 const String ClassPath = '.:/usr/share/java/antlr3-runtime.jar';
9 const String MainClass = 'SpecParser';
10 const String JavaExecutable = 'java';
11
12 main([arguments]) {
13 for (String arg in arguments) {
14 handleResult(ProcessResult result) {
15 if (result.stderr.length != 0) {
16 print('Error parsing $arg:\n${result.stderr}');
17 }
18 print(result.stdout);
19 }
20
21 List<String> javaArguments = <String>['-cp', ClassPath, MainClass, arg];
22 Process.run(JavaExecutable, javaArguments).then(handleResult);
23 }
24 }
OLDNEW
« no previous file with comments | « tools/spec_parser/SpecParserRunner.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698