%token begin end semi %token colon sub bus ref %token open close %token eq lt gt ne le ge %token dblhash %token at hat bar %token enter do exit %token for repeat %token if then else dblslash %token leave restart inner suspend %token comma %token arrow %token new %token this %token dot %token plus minus or xor %token star slash div mod and %token not none %token nameappl namedecl string const %start BetaForm %% BetaForm: DescriptorForm | AttributesForm; DescriptorForm: ObjectDescriptor; AttributesForm: Attributes; ObjectDescriptor: MainPart | Prefix MainPart; MainPart: begin Attributes semi ActionPart end | begin Attributes end | begin ActionPart end | begin end; Attributes: Attributes semi AttributeDecl | AttributeDecl; Prefix: AttributeDenotation; AttributeDecl: PatternDecl | SimpleDecl | RepetitionDecl | VirtualDecl | BindingDecl | FinalDecl; PatternDecl: Names colon ObjectDescriptor; SimpleDecl: Names colon ReferenceSpecification; RepetitionDecl: Names colon sub Index bus ReferenceSpecification; VirtualDecl: Names colon lt ObjectSpecification; BindingDecl: Names colon colon lt ObjectSpecification; FinalDecl: Names colon colon ObjectSpecification; VariablePattern: dblhash AttributeDenotation; ReferenceSpecification: StaticItem | DynamicItem | StaticComponent | DynamicComponent | VariablePattern; StaticItem: at ObjectSpecification; DynamicItem: hat AttributeDenotation; StaticComponent: at bar ObjectSpecification; DynamicComponent: hat bar AttributeDenotation; ObjectSpecification: ObjectDescriptor | AttributeDenotation; Index: SimpleIndex | NamedIndex; NamedIndex: NameDcl colon Evaluation; ActionPart: EnterPart | DoPart | EnterPart DoPart | EnterPart ExitPart | DoPart ExitPart | EnterPart DoPart ExitPart; EnterPart: enter Evaluation; DoPart: do Imperatives; ExitPart: exit Evaluation; Imperatives: Imperatives semi Imp | Imp; Imp: LabelledImp | ForImp | SimpleIfImp | GeneralIfImp | LeaveImp | RestartImp | InnerImp | SuspendImp | Evaluation; LabelledImp: NameDcl colon Imp; ForImp: open for Index repeat Imperatives for close; SimpleIfImp: open if Evaluation then Imperatives if close | open if Evaluation then Imperatives ElsePart if close; GeneralIfImp: open if Evaluation Alternatives if close | open if Evaluation Alternatives ElsePart if close; LeaveImp: leave NameApl; RestartImp: restart NameApl; InnerImp: inner | inner NameApl; SuspendImp: suspend; Alternatives: Alternatives Alternative | Alternative; Alternative: Selections then Imperatives; Selections: Selections Selection | Selection; Selection: CaseSelection; CaseSelection: dblslash Evaluation; ElsePart: else Imperatives; Evaluations: Evaluations comma Evaluation | Evaluation; Evaluation: Expression | AssignmentEvaluation; AssignmentEvaluation: Evaluation arrow Transaction; Transaction: ObjectEvaluation | ObjectReference | EvalList | StructureReference; ObjectEvaluation: InsertedItem | Reference; Reference: ObjectDenotation | DynamicObjectGeneration; DynamicObjectGeneration: DynamicItemGeneration | DynamicComponentGeneration; InsertedItem: ObjectDescriptor; ObjectDenotation: AttributeDenotation; ObjectReference: Reference ref; StructureReference: AttributeDenotation dblhash; EvalList: open Evaluations close; DynamicItemGeneration: new ObjectSpecification; DynamicComponentGeneration: new bar ObjectSpecification; AttributeDenotation: NameApl | Remote | ComputedRemote | Indexed | ThisObject; Remote: AttributeDenotation dot NameApl; ComputedRemote: open Evaluations close dot NameApl; Indexed: AttributeDenotation sub Evaluation bus; ThisObject: this open NameApl close; Expression: RelationalExp | SimpleExp; RelationalExp: EqExp | LtExp | LeExp | GtExp | GeExp | NeExp; SimpleExp: AddExp | SignedTerm | Term; AddExp: PlusExp | MinusExp | OrExp | XorExp; SignedTerm: UnaryPlusExp | UnaryMinusExp; Term: MulExp | Factor; MulExp: TimesExp | RealDivExp | IntDivExp | ModExp | AndExp; EqExp: SimpleExp eq SimpleExp; LtExp: SimpleExp lt SimpleExp; LeExp: SimpleExp le SimpleExp; GtExp: SimpleExp gt SimpleExp; GeExp: SimpleExp ge SimpleExp; NeExp: SimpleExp ne SimpleExp; PlusExp: SimpleExp plus Term; MinusExp: SimpleExp minus Term; OrExp: SimpleExp or Term; XorExp: SimpleExp xor Term; UnaryPlusExp: plus Term; UnaryMinusExp: minus Term; TimesExp: Term star Factor; RealDivExp: Term slash Factor; IntDivExp: Term div Factor; ModExp: Term mod Factor; AndExp: Term and Factor; Factor: TextConst | IntegerConst | NotExp | NoneExp | RepetitionSlice | Transaction; RepetitionSlice: AttributeDenotation sub Evaluation colon Evaluation bus; NotExp: not Factor; NoneExp: none; Names: Names comma NameDcl | NameDcl; NameDcl: namedecl; NameApl: nameappl; TextConst: string; IntegerConst: const; SimpleIndex: Evaluation; %%