module z/concrete/SchemaText
imports
  z/Names
exports
  sorts SchemaText ZDecl
  context-free syntax
    {ZDecl ";"}*           -> SchemaText {cons("ZSchTxt")}
    {ZDecl ";"}* "|" Pred  -> SchemaText {cons("ZSchTxt")}

    ZName ":" ZExpr        -> ZDecl {cons("ZVarDecl")}
    ZName "==" ZExpr       -> ZDecl {cons("ZConstDecl")}
    ZExpr                  -> ZDecl {cons("ZIncludeDecl")}

    ZDecl2                 -> ZDecl
    {ZName ","}+ ":" ZExpr -> ZDecl2 {cons("ZVarDecl2")}
    ZName ":" ZExpr        -> ZDecl2 {reject}
