RoseGrammar.Tioga
Last Edited by: Spreitzer, May 8, 1985 5:09:24 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 | Exports | 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 | StateType | Initializer | Expansion | Tester | Behavior | RecordHelp | 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 )
CedarInteger:
An integer (expressed in decimal, octal, or hex), expressed as in Cedar.
CedarReal:
A real number literal, expressed as in Cedar.
CedarNumber: CedarInteger | CedarReal
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].
StateType: (State | InittableState) <children:> CedarVariantFieldList
RecordHelp: (SwitchIOAux | SimpleIOAux | StateAux | DriveAux) (RefType | RecType | InitialValue) (ID | CedarLiteral)
Initializer: Initializer <children:> CedarDeclarationSeries CedarStatementSeries
Tester: Test TesterName TesterType <children:> CedarDeclarationSeries CedarStatementSeries
TesterName: ID
TesterType: BlackBox | StateToo
Behavior: EvalName <children:> CedarDeclarationSeries CedarStatementSeries
EvalName: ValsChanged | InitQ | PropQ | InitUD | PropUD | FinalUD | EvalSimple | EnumerateVicinity
Expansion: Expand ExpansionStatement ( ; ExpansionStatement)*
ExpansionStatement: NodeInstantiation | CellInstantiation | SplitJoin | ChildrenCedar
NodeInstantiation: IDList : NodeTypeConstructor Note* [InitialValue] [InitialData]
InitialValue: ←v (RopeLiteral | CedarLiteral) [fmt RopeLiteral]
InitialData: 𡤍 CedarLiteral
CellInstantiation: IDList : CellInstanceConstructor Note*
CellInstanceConstructor: CellTypeExpr [[ [ConnectionList] ]]
ConnectionList: Connection ( , Connection)*
Connection: [ IDList : ] ID
CellTypeExpr: ID [ [ ArgList ] ]
SplitJoin: EQUIVALENCE NodeExpression, NodeExpression
NodeExpression:
ID |
NodeExpression [ CedarInteger [ .. CedarInteger] ] |
[NodeExpression ( , NodeExpression)*] |
NodeExpression cat NodeExpression
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 ports of leaf cells. Default is XPhobic.
(SimpleInstructions)
(SwitchInstructions)
Says whether test procs will instruct this port at the switch level or the simple. Default is simple.
(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. 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.