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

Side by Side 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, 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/SpecParser.java ('k') | tools/spec_parser/spec_parse.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 import java.util.Scanner;
6 import java.util.List;
7 import java.util.ArrayList;
8
9 /// Class for `main` which will parse files given as lines on stdio.
10 public class SpecParserRunner {
11 public static void main(String[] args) throws Exception {
12 if (args.length != 0) {
13 System.err.println("No command line arguments expected.");
14 System.err.println("Files to parse are accepted on the standard input.");
15 System.exit(1);
16 }
17
18 Scanner scanner = new Scanner(System.in);
19 String[] filenames = new String[1];
20 while (scanner.hasNextLine()) {
21 String filename = scanner.nextLine().trim();
22 filenames[0] = filename;
23 System.out.println("---------- " + filename + " ----------");
24 SpecParser.main(filenames);
25 }
26 }
27 }
OLDNEW
« 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