mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 08:20:31 +00:00
c49cbae7f0
Change-Id: Iddd1e8a795bfaed0092a30bb9d83070fe62d4a60 Reviewed-on: https://dart-review.googlesource.com/7261 Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
27 lines
976 B
Java
27 lines
976 B
Java
// 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);
|
|
}
|
|
}
|
|
}
|