package org.allspice.javacompiler;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import org.allspice.parser.parsetable.SyntaxError;
import org.allspice.tok.TOKParser;
import org.allspice.tok.Tok;
public class CreateJavaTokenizer {
public static void main(String[] args) throws IOException {
InputStream res = CreateJavaTokenizer.class.getClassLoader().getResourceAsStream("org/allspice/javacompiler/java.tok");
InputStreamReader r = new InputStreamReader(res) ;
Tok builder;
try {
builder = TOKParser.parseTok(r);
} catch (SyntaxError e) {
System.err.println(e.getLocalizedMessage());
return ;
}
FileWriter writer = new FileWriter("src/org/allspice/javacompiler/JavaTokenizer.java");
builder.spew("org.allspice.javacompiler","JavaTokenizer",writer) ;
writer.close() ;
}
}