data Document = RootDoc root:Root data Root = Root decls:[Decl] { idP:IDP } data EnrichedDoc = RootEnr root:RootE HeliumTypeInfo data RootE = RootE decls:[Decl] idListDecls:[Decl] { idP:IDP } -- We put the decls first, so the paths in the enriched document and the document are the same. -- This is necessary because there is no translation on paths yet. -- lists have no pres elts of its own, so no ids for them. This also means we won't be able to recover Decls's id -- 4 pres elts: "=", ";", TypeDecl, and "[...]" data Decl = Decl expanded:Bool autoLayout:Bool Ident Exp { idP0:IDP idP1:IDP idP2:IDP idP3:IDP } | BoardDecl Board { idP0:IDP idP1:IDP } | PPPresentationDecl PPPresentation { idP0:IDP idP1:IDP } -- one pres elt for in program source, other for in list -- however, only the one for source is used, the other has no layout data Ident = Ident String { idP0:IDP idP1:IDP } data Exp = PlusExp exp1:Exp exp2:Exp { idP0:IDP } | TimesExp exp1:Exp exp2:Exp { idP0:IDP } | DivExp exp1:Exp exp2:Exp { idP0:IDP } | PowerExp exp1:Exp exp2:Exp { idP0:IDP } | BoolExp Bool { idP0:IDP } | IntExp Int { idP0:IDP } | LamExp Ident Exp { idP0:IDP idP1:IDP } | AppExp exp1:Exp exp2:Exp | CaseExp Exp alts:[Alt] { idP0:IDP idP1:IDP } | LetExp [Decl] Exp { idP0:IDP idP1:IDP } | IdentExp Ident | IfExp exp1:Exp exp2:Exp exp3:Exp { idP0:IDP idP1:IDP idP2:IDP } | ParenExp Exp { idP0:IDP idP1:IDP } | ListExp exps:[Exp] { idP0:IDP idP1:IDP ids:[IDP] } | ProductExp exps:[Exp] { idP0:IDP idP1:IDP ids:[IDP] } data Alt = Alt Ident Exp { idP0:IDP idP1:IDP } data Board = Board r1:BoardRow r2:BoardRow r3:BoardRow r4:BoardRow r5:BoardRow r6:BoardRow r7:BoardRow r8:BoardRow data BoardRow = BoardRow ca:BoardSquare cb:BoardSquare cc:BoardSquare cd:BoardSquare ce:BoardSquare cf:BoardSquare cg:BoardSquare ch:BoardSquare data BoardSquare = Queen color : Bool | King color : Bool | Bishop color : Bool | Knight color : Bool | Rook color : Bool | Pawn color : Bool | Empty data PPPresentation = PPPresentation viewType : Bool [Slide] data Slide = Slide title : String ItemList data ItemList = ItemList ListType items:[Item] data ListType = Bullet | Number | Alpha data Item = StringItem string : String | HeliumItem Exp | ListItem ItemList