javacc-7.0.3.examples.JavaGrammars.Test Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javacc Show documentation
Show all versions of javacc Show documentation
JavaCC is a parser/scanner generator for Java.
import java.io.*;
class Test
{
public static void main(String[] args) throws Exception
{
Reader fr = null;
if (args.length == 2)
fr = new InputStreamReader(new FileInputStream(new File(args[0])), args[1]);
else
fr = new InputStreamReader(new FileInputStream(new File(args[0])));
JavaParser jp = new JavaParser(fr);
jp.CompilationUnit();
}
}