5import java.util.Scanner;
7import java.util.ArrayList;
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.");
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 +
" ----------");
Class for main which will parse files given as lines on stdio.
static void main(String[] args)
Class for main which will parse files given as command line arguments.
static void main(String[] args)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args