edu.byu.ece.edif.util.parse
Class EdifParser

java.lang.Object
  extended by edu.byu.ece.edif.util.parse.EdifParserCore
      extended by edu.byu.ece.edif.util.parse.EdifParser
All Implemented Interfaces:
EdifParserCoreConstants

public class EdifParser
extends EdifParserCore

Provides a stand alone EDIF parser that interacts with the edu.byu.ece.edif.core package. This class extends the EdifParserCore class which is auto generated from the edif.jj file. Classes that want to integrate an Edif parser should use this object rather than the EdifParserCore. It is much easier to work with the parser in a new class rather than editing the class in a .jj file.

Version:
$Id:EdifParser.java 144 2008-04-02 01:40:38Z jamesfcarroll $

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.byu.ece.edif.util.parse.EdifParserCore
EdifParserCore.ArrayElement, EdifParserCore.JJCalls
 
Field Summary
 
Fields inherited from class edu.byu.ece.edif.util.parse.EdifParserCore
jj_input_stream, jj_nt, keepComments, lookingAhead, primitiveViewName, tagPrimitives, token, token_source
 
Fields inherited from interface edu.byu.ece.edif.util.parse.EdifParserCoreConstants
ABS, ACLOAD, AFTER, AND, ANGLE, ANNOTATE, APPLY, ARC, ARRAY, ARRAYMACRO, ARRAYRELATEDINFO, ARRAYSITE, ATLEAST, ATMOST, AUTHOR, BASEARRAY, BECOMES, BEHAVIOR, BETWEEN, BOOLEAN, BOOLEANDISPLAY, BOOLEANMAP, BORDERPATTERN, BORDERWIDTH, BOUNDINGBOX, CALCULATED, CAPACITANCE, CEILING, CELL, CELLREF, CELLTYPE, CENTERCENTER, CENTERLEFT, CENTERRIGHT, CHANGE, CHARGE, CIRCLE, COLOR, COMMENT, COMMENTGRAPHICS, COMPOUND, CONCAT, CONDUCTANCE, CONNECTLOCATION, CONSTANT, CONSTRAINT, CONTENTS, CORNERTYPE, CRITICALITY, CURRENT, CURRENTMAP, CURVE, CYCLE, DATAORIGIN, DCFANINLOAD, DCFANOUTLOAD, DCMAXFANIN, DCMAXFANOUT, DEFAULT, DELAY, DELTA, DERIVATION, DESIGN, DESIGNATOR, DIFFERENCE, DIGIT, DIRECTION, DISPLAY, DISTANCE, DIVIDE, DOCUMENT, DOMINATES, DOT, DURATION, E, EDIF, EDIFLEVEL, EDIFVERSION, ENCLOSUREDISTANCE, ENDTYPE, ENERGY, ENTRY, EOF, EQUAL, EVENT, EXACTLY, EXTEND, EXTERNAL, FABRICATE, FALSE, FIGURE, FIGUREAREA, FIGUREGROUP, FIGUREGROUPOBJECT, FIGUREGROUPOVERRIDE, FIGUREGROUPREF, FIGUREPERIMETER, FIGUREWIDTH, FILLPATTERN, FIX, FLOOR, FLUX, FOLLOW, FORBIDDENEVENT, FREQUENCY, GENERIC, GLOBALPORTREF, GRAPHIC, GREATERTHAN, GRIDMAP, IDENTIFIER, IGNORE, INCLUDEFIGUREGROUP, INCREASING, INDUCTANCE, INITIAL, INOUT, INPUT, INSTANCE, INSTANCEBACKANNOTATE, INSTANCEGROUP, INSTANCEMAP, INSTANCEREF, INTEGER, INTEGER_TOK, INTEGERDISPLAY, INTERFACE, INTERFIGUREGROUPSPACING, INTERSECTION, INTRAFIGUREGROUPSPACING, INVERSE, ISOLATED, JOINED, JUSTIFY, KEYWORDDISPLAY, KEYWORDLEVEL, KEYWORDMAP, LBR, LESSTHAN, LETTER, LIBRARY, LIBRARYREF, LISTOFNETS, LISTOFPORTS, LOADDELAY, LOGICASSIGN, LOGICINPUT, LOGICLIST, LOGICMAPINPUT, LOGICMAPOUTPUT, LOGICMODEL, LOGICONEOF, LOGICOUTPUT, LOGICPORT, LOGICREF, LOGICVALUE, LOGICWAVEFORM, LOWERCENTER, LOWERLEFT, LOWERRIGHT, MAINTAIN, MASKLAYOUT, MASS, MATCH, MAX, MEASURED, MEMBER, MIN, MINOMAX, MINOMAXDISPLAY, MNM, MOD, MULTIPLEVALUESET, MUSTJOIN, MX, MXR90, MY, MYR90, NAME, NEGATE, NET, NETBACKANNOTATE, NETBUNDLE, NETDELAY, NETGROUP, NETLIST, NETMAP, NETREF, NOCHANGE, NONPERMUTABLE, NOT, NOTALLOWED, NOTCHSPACING, NUMBER, NUMBERDEFINITION, NUMBERDISPLAY, OFFPAGECONNECTOR, OFFSETEVENT, OPENSHAPE, OR, ORIENTATION, ORIGIN, OUTPUT, OVERHANGDISTANCE, OVERLAPDISTANCE, OVERSIZE, OWNER, PAGE, PAGESIZE, PARAMETER, PARAMETERASSIGN, PARAMETERDISPLAY, PATH, PATHDELAY, PATHWIDTH, PCBLAYOUT, PERMUTABLE, PHYSICALDESIGNRULE, PLUG, POINT, POINTDISPLAY, POINTLIST, POINTSUBTRACT, POINTSUM, POLYGON, PORT, PORTBACKANNOTATE, PORTBUNDLE, PORTDELAY, PORTGROUP, PORTIMPLEMENTATION, PORTINSTANCE, PORTLIST, PORTLISTALIAS, PORTMAP, PORTREF, POWER, PRODUCT, PROGRAM, PROPERTY, PROPERTYDISPLAY, PROTECTIONFRAME, PT, R0, R180, R270, R90, RANGEVECTOR, RBR, RECTANGLE, RECTANGLESIZE, RENAME, REQUIRED, RESISTANCE, RESOLVES, RIPPER, ROUND, SCALE, SCALEX, SCALEY, SCHEMATIC, SECTION, SHAPE, SIMULATE, SIMULATIONINFO, SINGLEVALUESET, SITE, SOCKET, SOCKETSET, STATUS, STEADY, STRANGER, STRICTLYINCREASING, STRING, STRING_TOK, STRINGDISPLAY, STRONG, SUBTRACT, SUM, SYMBOL, SYMBOLIC, SYMMETRY, TABLE, TABLEDEFAULT, TECHNOLOGY, TEMPERATURE, TEXTHEIGHT, TIE, TIME, TIMEINTERVAL, TIMESTAMP, TIMING, tokenImage, TRANSFORM, TRANSITION, TRIGGER, TRUE, TRUNCATE, UNCONSTRAINED, UNDEFINED, UNION, UNIT, UNUSED, UPPERCENTER, UPPERLEFT, UPPERRIGHT, USERDATA, VARIABLE, VERSION, VIEW, VIEWLIST, VIEWMAP, VIEWREF, VIEWTYPE, VISIBLE, VOLTAGE, VOLTAGEMAP, WAVEVALUE, WEAK, WEAKJOINED, WHEN, WRITTEN, XCOORD, XOR, YCOORD
 
Constructor Summary
EdifParser()
           
 
Method Summary
static void main(java.lang.String[] args)
           
static EdifEnvironment translate(java.io.InputStream is)
           
static EdifEnvironment translate(java.io.InputStream is, java.lang.String filename, java.util.Collection prims)
          This method will create an EdifEnvironment object from an InputStream object.
static EdifEnvironment translate(java.lang.String filename)
          This method will create an EdifEnvironment object from a given edif file.
static EdifEnvironment translate(java.lang.String filename, java.util.Collection prims)
          This method will create an EdifEnvironment object from a given edif file.
static EdifEnvironment translate(java.lang.String filename, EdifLibrary prims)
          This method will create an EdifEnvironment object from a given edif file.
 
Methods inherited from class edu.byu.ece.edif.util.parse.EdifParserCore
abs, acLoad, after, and, annotate, apply, arc, array, arrayMacro, arrayRelatedInfo, arraySite, atLeast, atMost, author, baseArray, becomes, between, booleanDisplay, booleanMap, booleanValue, borderPattern, borderWidth, boundingBox, ceiling, cell, cellNameDef, cellNameRef, cellRef, cellType, change, circle, color, comment, commentGraphics, compound, concat, connectLocation, constant, constraint, contents, cornerType, criticality, currentMap, curve, cycle, dataOrigin, dcFaninLoad, dcFanoutLoad, dcMaxFanin, dcMaxFanout, delay, delta, derivation, design, designator, designNameDef, difference, direction, disable_tracing, display, divide, dominates, dot, duration, e, edif, edifFileName, edifLevel, edifVersion, enable_tracing, enclosureDistance, endType, entry, equal, event, exactly, external, fabricate, figure, figureArea, figureGroup, figureGroupNameDef, figureGroupNameRef, figureGroupObject, figureGroupOverride, figureGroupRef, figureOp, figurePerimeter, figureWidth, fillPattern, fix, floor, follow, forbiddenEvent, form, generateParseException, getEdifEnvironment, getName, getNextToken, getToken, globalPortRef, greaterThan, gridMap, ident, identifier, ignore, includeFigureGroup, increasing, initial, instance, instanceBackAnnotate, instanceGroup, instanceMap, instanceNameDef, instanceNameRef, instanceRef, integer, integerDisplay, integerToken, integerValue, interFigureGroupSpacing, intersection, intraFigureGroupSpacing, inverse, isolated, joined, justify, keywordDisplay, keywordLevel, keywordMap, keywordNameRef, layerNameDef, lessThan, library, libraryDefinition, libraryNameDef, libraryNameRef, libraryRef, listOfNets, listOfPorts, loadDelay, logicAssign, logicInput, logicList, logicMapInput, logicMapOutput, logicNameDef, logicNameRef, logicOneOf, logicOutput, logicPort, logicRef, logicValue, logicWaveform, maintain, match, max, member, min, miNoMax, miNoMaxDisplay, miNoMaxValue, mnm, mod, multipleValueSet, mustJoin, myBoolean, myFalse, myInterface, myTrue, name, nameDef, nameRef, negate, net, netBackAnnotate, netBundle, netDelay, netGroup, netMap, netNameDef, netNameRef, netRef, noChange, nonPermutable, not, notAllowed, notchSpacing, number, numberDefinition, numberDisplay, numberValue, offPageConnector, offsetEvent, openShape, or, orientation, origin, overhangDistance, overlapDistance, oversize, owner, page, pageSize, parameter, parameterAssign, parameterDisplay, path, pathDelay, pathWidth, permutable, physicalDesignRule, plug, point, pointDisplay, pointList, pointSubtract, pointSum, pointValue, polygon, port, portBackAnnotate, portBundle, portDelay, portGroup, portImplementation, portInstance, portList, portListAlias, portMap, portNameDef, portNameRef, portRef, product, program, property, propertyDisplay, propertyNameDef, propertyNameRef, protectionFrame, pt, range, rangeVector, rectangle, rectangleSize, ReInit, ReInit, ReInit, ReInit, rename, resolves, ruleNameDef, scale, scaledInteger, scaleX, scaleY, section, shape, simulate, simulateNameDef, simulationInfo, singleValueSet, site, socket, socketSet, status, steady, strictlyIncreasing, string, stringDisplay, stringToken, stringValue, strong, subtract, sum, symbol, symmetry, table, tableDefault, technology, textHeight, timeInterval, timeStamp, timing, transform, transition, trigger, typedValue, unconstrained, undefined, union, unit, unused, userData, valueNameDef, valueNameRef, variable, version, view, viewList, viewMap, viewNameDef, viewNameRef, viewRef, viewType, visible, voltageMap, waveValue, weak, weakJoined, when, written, xCoord, xor, yCoord
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EdifParser

public EdifParser()
Method Detail

translate

public static EdifEnvironment translate(java.io.InputStream is,
                                        java.lang.String filename,
                                        java.util.Collection prims)
                                 throws ParseException
This method will create an EdifEnvironment object from an InputStream object.

Parameters:
is - The input stream that contains the file
filename - The filename that was used to get the file
prims - The Collection of primitive libraries
Returns:
An EdifEnvironment that represents the file
Throws:
ParseException

translate

public static EdifEnvironment translate(java.lang.String filename,
                                        EdifLibrary prims)
                                 throws ParseException,
                                        java.io.FileNotFoundException
This method will create an EdifEnvironment object from a given edif file. This will call the javacc parser and create the data structure from the contents of the given file.

Parameters:
filename - The filename that was used to get the file
prims - An EdifLibrary of primitives
Returns:
An EdifEnvironment that represents the file
Throws:
ParseException
java.io.FileNotFoundException

translate

public static EdifEnvironment translate(java.lang.String filename,
                                        java.util.Collection prims)
                                 throws ParseException,
                                        java.io.FileNotFoundException
This method will create an EdifEnvironment object from a given edif file. This will call the javacc parser and create the data structure from the contents of the given file.

Parameters:
filename - The filename that was used to get the file
prims - The Collection of primitive libraries
Returns:
An EdifEnvironment that represents the file TODO: Explain the use of the prims argument
Throws:
ParseException
java.io.FileNotFoundException

translate

public static EdifEnvironment translate(java.lang.String filename)
                                 throws ParseException,
                                        java.io.FileNotFoundException
This method will create an EdifEnvironment object from a given edif file. This will call the javacc parser and create the data structure from the contents of the given file.

Parameters:
filename - The filename that was used to get the file
Returns:
An EdifEnvironment that represents the file
Throws:
ParseException
java.io.FileNotFoundException

translate

public static EdifEnvironment translate(java.io.InputStream is)
                                 throws ParseException,
                                        java.io.FileNotFoundException
Throws:
ParseException
java.io.FileNotFoundException

main

public static void main(java.lang.String[] args)