LANGUAGE "Petrinetze": EXTENSION "petri.vle"; /* Abstract Tree Grammar */ RULE root: ROOT ::= PetriNet END; RULE pPetriNet: PetriNet ::= NetElem* Connection* END; RULE pNetElem1: NetElem ::= State END; RULE pNetElem2: NetElem ::= Transition END; RULE pNetElem3: NetElem ::= Comment END; RULE pState: State ::= END; RULE pTransition: Transition ::= END; RULE pComment: Comment ::= END; RULE pConnection: Connection ::= ConnectionLabel END; RULE ConnLabel: ConnectionLabel ::= END; /* The cursor-position of newly created (or moved) abstract tree nodes * is assigned to attribute POS, if it exists */ SYMBOL PetriNet INHERITS VP_view1_Set END; SYMBOL NetElem INHERITS VP_view1_MovableContext END; SYMBOL State INHERITS VP_view1_EndPoint END; SYMBOL Transition INHERITS VP_view1_EndPoint END; SYMBOL Comment INHERITS VP_view1_EndPoint END; SYMBOL Connection INHERITS VP_view1_RelationType END; SYMBOL ConnectionLabel INHERITS VP_view1_RelationLabel END; SYMBOL Connection: persFrom : DEFTABLEKEY, persTo : DEFTABLEKEY; SYMBOL State: persEndpoint : DEFTABLEKEY; SYMBOL Transition: persEndpoint : DEFTABLEKEY; SYMBOL ConnectionLabel:persName : VLString; SYMBOL Comment: text : VLString; /* Visual Windows are defined through this declaration: Specify * title and name of attribute evaluator here. Automatically creates * an edit command for the specified symbol (here: ROOT) */ VISUAL view1 (ROOT): TITLE "Petri-Netz2"; BUTTON IMAGE "circle" INSERTS pNetElem1; BUTTON IMAGE "rectangle" INSERTS pNetElem2; BUTTON IMAGE "xy" INSERTS pNetElem3; END;