/* SCCS - @(#)NPP.java 1.3 - 09/09/99 - 18:54:42 */
/*
* Copyright (c) 1997 USC Brain Project. email nsl@java.usc.edu.
*/
/* NSLJ Pre-Processor
* based on Guava
* it uses Java to Bison F (JBF).
* This inputs to this file get made by JB.
* The inputs are: jbf/YYtokentypes.java, YYparse.java, YYlex.java
*
* $Log: NPP.java,v $
* Revision 1.4 1997/11/06 03:21:46 erhan
* NSL3.0.b
*
* Revision 1.3 1997/07/30 21:10:30 erhan
* nsl3.0
*
* Revision 1.2 1997/03/28 02:04:30 aalx
* modified to include copyright notices to us or the appropriate author.
*
* Revision 1.1.1.1 1997/03/12 23:09:23 nsl
* changed dir struct
*
* Revision 1.3 1997/02/27 07:07:34 erhan
* 1
*
* Revision 1.2 1997/02/25 23:37:35 erhan
* ok?
*
* Revision 1.1.1.1 1997/02/20 08:04:35 nsl
* Importing npp
*
*/
package npp.src;
import java.io.*;
import npp.src.util.*;
import npp.src.YYlex;
import pp.src.jbf.*;
/** NSLJ Pre-Processor
* based on JBF.
*/
public class NPP {
public static YYlex yyl = new YYlex(System.in,System.out);
public static YYparse yyp = new YYparse(yyl,System.err);
public static NslPreProcessor npp = new NslPreProcessor();
protected static boolean debuglex;
protected static boolean debugparse;
protected static boolean verbose;
protected static boolean lexonly;
protected static boolean nocomments;
// protected static YYtoken yylval;
protected static int llevel;
protected static int plevel;
/** Main runtime routine - call java NPP to run.
*/
public static void main(String argv[])
{
debuglex = false;
debugparse = false;
verbose = false;
lexonly = false;
//nocomments = false; taking this out as a default
nocomments = true;
llevel = 0;
plevel = 0;
// System.err.println("NSL pre-processor PHASE 2....");
if (argv.length == 1 &&
(argv[0].compareTo("-0")==0 || argv[0].compareTo("-h")==0)) {
// change to comments instead of nocomments
System.out.println("Usage: java NPP [-comments] [-verbose] [-debug][-debuglex][-debugparse][-lex][-l Lexlevel][-p ParseLevel] .java");
}
for(int i=0;i