byucc.jhdl.util.xmac
Class XMAC

java.lang.Object
  extended bybyucc.jhdl.util.xmac.XMAC

public class XMAC
extends java.lang.Object

This class implements a replacement for the old JMAC program written in perl. XMAC files are (X)ML (Mac)ros that are mostly for use in library primitives. XMAC files are composed of a series of tags that define certain behaviors and specifications that become java files.

Author:
Isaac E. Wagner

Field Summary
static java.lang.String programName
          Indicates the name of the program to run from command line
 
Constructor Summary
XMAC(java.lang.String basedir, java.lang.String[] xmacList, boolean quiet, boolean createTestVect, boolean createMainMethod)
          Contstruct a new XMAC parser.
 
Method Summary
static void main(java.lang.String[] args)
          The main method.
 boolean parse()
          Parse the .xmac files.
static void setOutputFileExtension(java.lang.String extension)
          Determines the extension of new files.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

programName

public static java.lang.String programName
Indicates the name of the program to run from command line

Constructor Detail

XMAC

public XMAC(java.lang.String basedir,
            java.lang.String[] xmacList,
            boolean quiet,
            boolean createTestVect,
            boolean createMainMethod)
Contstruct a new XMAC parser.

Parameters:
basedir - A String that contains the base directory to toss the resulting java files into.
xmacList - An array containing the file names to process.
quiet - If true then supress output to stdin.
createTestVect - If true then create test vectors.
createMainMethod - If true then create the main method.
Method Detail

main

public static void main(java.lang.String[] args)
The main method. Run java xmac for the current list of command line options.


parse

public boolean parse()
Parse the .xmac files. This method is what actually starts the xmac parser on the list of files passed into the constructor.

Returns:
True on success, false on fail or bad parameters passed in.

setOutputFileExtension

public static void setOutputFileExtension(java.lang.String extension)
Determines the extension of new files. All new output files will use this extension instead of the default.

Parameters:
extension - the new extension to use in creating new files


Copyright ? 2006 Brigham Young University, Configurable Computing Laboratory. All Rights Reserved.