Package org.allspice.javacompiler

Source Code of org.allspice.javacompiler.CreateJavaTokenizer

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() ;
  }
}
TOP

Related Classes of org.allspice.javacompiler.CreateJavaTokenizer

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.