EDIFGrammarImpl2.Mesa
Spreitzer, February 4, 1986 5:45:05 pm PST
DIRECTORY EDIFGrammar;
EDIFGrammarImpl2: CEDAR PROGRAM
IMPORTS EDIFGrammar
= {OPEN EDIFGrammar;
DefineEm: PROC = {
DL[$Technology, LIST[NameDef[], Opt[$NumberDefinition], StarCh[LIST[$Define, Oo[$Rename], $SimulationInfo, $SimulationMap, Oo[$GridMap], Oo[$FigureGroupDefault], $Comment, $UserData, Limit[$Repeat, 1], Limit[$Constraint, 1], Limit[$Assign, 1], Limit[$Block, 2], Limit[$Escape, 2], Limit[$Iterate, 2], Limit[$Redo, 2]]] ]];
DL[$NumberDefinition, LIST[$UnitSystem, StarCh[LIST[$Scale, $Comment, $UserData]] ]];
DC[$UnitSystem, LIST["si", $Identifier]];
DL[$Scale, LIST[$UnitType, $Number, $Number]];
DC[$UnitType, LIST["capacitance", "current", "distance", "resistance", "termperature", "time", "voltage"]];
DL[$Define, LIST[$Direction, $Type, $DefineObjects, Limit[Opt[$Default], 1], Star[$Rename]]];
DC[$Direction, LIST["local", "input", "inout", "output", "unspecified"]];
DC[$Type, LIST["figuregroup", "port", "signal", Limit["String", 1], Limit["Integer", 1], Limit["Number", 1], Limit["Boolean", 1], Limit["Point", 1], Limit[$UnitType, 1]]];
DQ[$DefineObjects, LIST[$Multiple, Star[$DefineObject]], $DefineObject];
DC[$DefineObject, LIST[NameDef[], $ArrayDefinition]];
DL[$ArrayDefinition, LIST[NameDef[], Star[$WholeNumber]]];
DL[$Default, LIST[Star[$PrimitiveData]], 1];
DL[$SimulationInfo, LIST[NameDef[], $SimulationValue, $Arbitrate, $Isolated, Opt[$Rename]]];
DL[$SimulationValue, LIST[Star[NameDef[]]]];
DL[$Arbitrate, LIST[$Pairwise]];
DL[$Pairwise, LIST[Star[NameRef[]]]];
DL[$Isolated, LIST[NameRef[]]];
DL[$SimulationMap, LIST[$Reference, $Reference, StarCh[LIST[$StateMap, $Comment, $UserData]] ]];
DL[$StateMap, LIST[Plus[NameRef[]]]];
DL[$GridMap, LIST[$Number, $Number]];
DL[$FigureGroupDefault, LIST[StarCh[LIST[$FigureGroupSpecification, $Comment, $UserData]] ]];
DL[$FigureGroupSpecification, LIST[NameRef[], StarCh[LIST[Oo[$Width], Oo[$PathType], Oo[$BorderPattern], Oo[$FillPattern], Oo[$Color], $Comment, $UserData]] ]];
DL[$Width, LIST[$Coordinate]];
DC[$Coordinate, LIST[$WholeNumber], 0, 0];
DC[$Coordinate, LIST[$Expression], 1];
DL[$PathType, LIST[$Style, $Style]];
DC[$Style, LIST["extend", "truncate", "round"]];
DL[$BorderPattern, LIST[$Integer, $String]];
DL[$FillPattern, LIST[$Integer, $Integer, $String]];
DL[$Color, LIST[$Integer, $Integer, $Integer]];
DL[$Cell, LIST[NameDef[], Opt[$Status], Opt[$Rename], Opt[$ViewMap], StarCh[LIST[$View, $Comment, $UserData]] ]];
DL[$ViewMap, LIST[StarCh[LIST[$PortMap, $InstanceMap, $Comment, $UserData, Limit[$Block, 2], Limit[$Escape, 2], Limit[$Iterate, 2], Limit[$Redo, 2]]] ]];
DL[$PortMap, LIST[StarCh[LIST[$Reference, $Comment, $UserData]] ]];
DL[$InstanceMap, LIST[StarCh[LIST[$Reference, $Comment, $UserData]] ]];
DL[$View, LIST[$ViewType, NameDef[], Opt[$Status], Opt[$Interface], Opt[$Contents], Opt[$Rename], StarCh[LIST[$Comment, $Property]] ]];
DC[$ViewType, LIST["document", "behavior", "netlist", "schematic", "symbolic", "masklayout", "stranger"]];
DL[$Repeat, LIST[NameDef[], $Integer, $Integer, $Integer, Star[$Form]], 1];
DL[$Constraint, LIST[Star[$Boolean], Star[$Property]], 1];
DL[$Assign, LIST[NameRef[], Star[$Expression]], 1];
DC[$Expression, LIST[$Primitive, NameRef[], $FunctionApplication], 1];
DL[$FunctionApplication, LIST[$FunctionName, Star[$Expression]], 1];
DC[$FunctionName, LIST["+", "-", "*", "/", "abs", "floor", "fix", "ceiling", "xcoord", "ycoord", "point", "concat", "and", "or", "xor", "not", "false", "true", "andnot", "<", "=", ">"], 1];
DL[$Iterate, LIST[Star[$Form]], 2];
DL[$Block, LIST[Star[$Form]], 2];
DL[$Redo, LIST[$Boolean, Star[$Form]], 2];
DL[$Escape, LIST[$Boolean, Star[$Form]], 2];
};
}.