RoseGrammar.Tioga
Last Edited by: Spreitzer, October 6, 1984 6:16:19 pm PDT
Terminals are in bold face; syntactic categories and meta-characters are plain.
Syntactic categories whose names begin with "Cedar" are from the Cedar language, unless otherwise noted.
CompilationUnit: ModuleStatement ( ; ModuleStatement)*
ModuleStatement: Reference | ChildrenCedar | CellConstructor | Def
All of the References must come before any of the others.
Reference: (Directory | Open | Imports | Library) IDList
IDList: ID ( , ID)*
ChildrenCedar: CEDAR <children:> CedarDeclarationSeries CedarStatementSeries
Def: IDList : CellFnConstructor
CellFnConstructor: LAMBDA Parameters RETURN CellConstructor [HowToApply]
Parameters: [ Parameter (, Parameter)* ]
Parameter: IDList : CedarLiteral--denoting type--
CedarLiteral:
A Cedar expression surrounded by vertical bars (double to include).
Example: |"This is a text literal with a '||' (single vertical bar) in it"|
CellConstructor: CELLTYPE NameDescription CellStatement* ENDCELLTYPE
NameDescription: RopeLiteral | NameProc | AutoName
NameProc: NameMaker <children:> CedarDeclarationSeries CedarStatementSeries
This code should compute the name of the CellType. This code will go in a PROC [...] RETURNS [name: ROPE].
CellStatement: InterfaceDescription | StateDef | IOCreator | IORefType | Initializer | Expansion | Tester | Behavior | Other | InitCTProps
InterfaceDescription: SimpleInterface | InterfaceProc
SimpleInterface: PORTS [ [Port (, Port)*] ]
Port: IDList DirectionFlag NodeTypeConstructor Note*
DirectionFlag: < | = | >
Note: - Assertion
For all the random things up with which we do not want to garbage the syntax.
Assertion: ( ID RefAny* )
RefAny:
Something parseable by IO.GetRefAny.
NodeTypeConstructor: ID [[ [ArgList] ]]
ArgList: Arg ( , Arg)*
Arg: [ IDList : ] ( ID | CedarRopeLiteral | CedarNumber | CedarLiteral )
CedarNumber:
An integer (expressed in decimal, octal, or hex) or real number literal, expressed as in Cedar.
InterfaceProc: PortsProc <children:> CedarDeclarationSeries CedarStatementSeries
This code should compute the RoseTypes.Ports describing the cell type's interface. This code will go in a PROC [...] RETURNS [ports: Ports].
StateDef: (State | InittableState) <children:> CedarVariantFieldList
IOCreator: IOCreator <children:> CedarDeclarationSeries CedarStatementSeries
IORefType: IORefTypeName ID
Initializer: Initializer <children:> CedarDeclarationSeries CedarStatementSeries
Tester: (BlackBoxTest | TestStateToo) <children:> CedarDeclarationSeries CedarStatementSeries
Behavior: EvalName <children:> CedarDeclarationSeries CedarStatementSeries
EvalName: ValsChanged | InitQ | PropQ | InitUD | PropUD | FinalUD | EvalSimple | FindVicinity
Expansion: Expand ExpansionStatement ( ; ExpansionStatement)*
ExpansionStatement: NodeInstantiation | CellInstantiation | ChildrenCedar
NodeInstantiation: IDList : NodeTypeConstructor Note* [ (RopeLiteral | CedarLiteral) ]
CellInstantiation: IDList : CellInstanceConstructor
CellInstanceConstructor: CellTypeExpr [[ [ArgList] ]]
CellTypeExpr: ID [ [ ArgList ] ]
Other: Assert AssertionList
AssertionList: ( Assertion* )
InitCTProps: InitCTProps <children:> CedarDeclarationSeries CedarStatementSeries
This code computes an initial assertion list for the cell type. This code will go in a PROC [...] RETURNS [other: Asserting.Assertions].
HowToApply: ApplyCode <children:> CedarDeclarationSeries CedarStatementSeries
This code should compute the RoseTypes.CellType describing the cell type. This code will go in a PROC [...] RETURNS [ct: CellType].
Here are some assertions that can be made about ports:
(XPhobic)
(XPhillic)
Says whether or not Xes may cross the port. Only meaningful on switch-level ports. Default is XPhobic.
(Special)
(General)
Again only meaningful on switch-level ports. Says whether the general or special protocol is used. Default is general.
(EC relation:ID class:ID)
Specifies which equivalence class (as defined by the given relation) the port belongs to.
Here are some assertions that can be made about node instantiations:
(XPhobic)
(XPhillic)
Says whether or not the node may be in an X state. Only meaningful on switch-level nodes. Default is XPhobic.
Here are some assertions that can be made about cell types:
(EC relation:ID class:ID)
Specifies which equivalence class (as defined by the given relation) the cell type belongs to.