| 1 | |
|
| 2 | |
|
| 3 | |
package org.galagosearch.tupleflow.typebuilder; |
| 4 | |
|
| 5 | |
import java.io.IOException; |
| 6 | |
import org.antlr.runtime.ANTLRFileStream; |
| 7 | |
import org.antlr.runtime.CommonTokenStream; |
| 8 | |
import org.antlr.runtime.RecognitionException; |
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | 0 | public class ParserDriver { |
| 15 | |
public static TypeSpecification getTypeSpecification(String fileName) throws IOException, RecognitionException { |
| 16 | 0 | ANTLRFileStream input = new ANTLRFileStream(fileName); |
| 17 | 0 | GalagoTypeBuilderLexer lexer = new GalagoTypeBuilderLexer(input); |
| 18 | 0 | CommonTokenStream tokens = new CommonTokenStream(lexer); |
| 19 | 0 | GalagoTypeBuilderParser parser = new GalagoTypeBuilderParser(tokens); |
| 20 | 0 | TypeSpecification spec = parser.type_def(); |
| 21 | 0 | return spec; |
| 22 | |
} |
| 23 | |
} |