Java tutorial
/* * This file is part of DictParser * * Copyright (C) 2013 federico[DOT]boschetti[DOT]73[AT]gmail[DOT]com * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package eu.himeros.dictparser; import java.io.FileInputStream; import org.antlr.v4.runtime.ANTLRInputStream; import org.antlr.v4.runtime.CommonTokenStream; import eu.himeros.dictparser.resources.*; /** * * @author federico[DOT]boschetti[DOT]73[AT]gmail[DOT]com */ public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here try { FileInputStream fis = new FileInputStream(args[0]); ANTLRInputStream input = new ANTLRInputStream(fis); DictParserLexer lexer = new DictParserLexer(input); CommonTokenStream tokens = new CommonTokenStream(lexer); DictParserParser parser = new DictParserParser(tokens); parser.main(args); } catch (Exception ex) { } } }