mjc

org.multijava.util.lexgen
Class Main

java.lang.Object
  extended byorg.multijava.util.lexgen.Main

public class Main
extends Object

This class is the entry point for the keyword lookup generation facility.


Field Summary
private  String[] args
           
private  DefinitionFile[] definitions
           
private static int MIN_TOKEN_ID
           
private  LexgenOptions options
           
 
Constructor Summary
Main(String[] args)
           
 
Method Summary
private  boolean buildDefinitionFile()
          Builds the ANTLR TokenTypes.txt file and returns true iff successful.
private  boolean buildInterfaceFile()
          Builds the TokenTypes.java file and returns true iff successful.
private  boolean buildKeywordFile()
          Generates the keyword file that instantiates tokens for each literal and keyword and that provides the hashtable lookup of IDENTs.
private  boolean checkIdentifiers()
          Checks the identifiers in the definitions and returns true iff they are OK.
static void main(String[] args)
          Entry point to the assembler
private static String[] makeStringArray(ArrayList vec)
          Transforms a list of strings into a string array.
private  boolean parseArguments(String[] args)
           
private  boolean parseSourceFiles(String[] infiles)
          Parses the named *.t files and returns true iff successful.
 boolean run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

options

private LexgenOptions options

definitions

private DefinitionFile[] definitions

MIN_TOKEN_ID

private static final int MIN_TOKEN_ID

args

private final String[] args
Constructor Detail

Main

public Main(String[] args)
Method Detail

run

public boolean run()

parseSourceFiles

private boolean parseSourceFiles(String[] infiles)
Parses the named *.t files and returns true iff successful.


checkIdentifiers

private boolean checkIdentifiers()
Checks the identifiers in the definitions and returns true iff they are OK.


buildDefinitionFile

private boolean buildDefinitionFile()
Builds the ANTLR TokenTypes.txt file and returns true iff successful.


buildInterfaceFile

private boolean buildInterfaceFile()
Builds the TokenTypes.java file and returns true iff successful.


buildKeywordFile

private boolean buildKeywordFile()
Generates the keyword file that instantiates tokens for each literal and keyword and that provides the hashtable lookup of IDENTs.


makeStringArray

private static String[] makeStringArray(ArrayList vec)
Transforms a list of strings into a string array.


main

public static void main(String[] args)
Entry point to the assembler


parseArguments

private boolean parseArguments(String[] args)

mjc

mjc is Copyright (C) 2000-2004 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. mjc is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.