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

Unified Diff: tools/spec_parser/SpecParserRunner.java

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, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/spec_parser/SpecParser.java ('k') | tools/spec_parser/spec_parse.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/spec_parser/SpecParserRunner.java
diff --git a/tools/spec_parser/SpecParserRunner.java b/tools/spec_parser/SpecParserRunner.java
new file mode 100644
index 0000000000000000000000000000000000000000..33308528d51ce2ac7fe6060d4c20faee605c7c27
--- /dev/null
+++ b/tools/spec_parser/SpecParserRunner.java
@@ -0,0 +1,27 @@
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import java.util.Scanner;
+import java.util.List;
+import java.util.ArrayList;
+
+/// Class for `main` which will parse files given as lines on stdio.
+public class SpecParserRunner {
+ public static void main(String[] args) throws Exception {
+ if (args.length != 0) {
+ System.err.println("No command line arguments expected.");
+ System.err.println("Files to parse are accepted on the standard input.");
+ System.exit(1);
+ }
+
+ Scanner scanner = new Scanner(System.in);
+ String[] filenames = new String[1];
+ while (scanner.hasNextLine()) {
+ String filename = scanner.nextLine().trim();
+ filenames[0] = filename;
+ System.out.println("---------- " + filename + " ----------");
+ SpecParser.main(filenames);
+ }
+ }
+}
« no previous file with comments | « tools/spec_parser/SpecParser.java ('k') | tools/spec_parser/spec_parse.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698