module languages/box/syntax/Alignments

imports languages/box/syntax/Basic

exports
  sorts AlignmentOption AlignmentOptions
  context-free syntax
    "A" alignments:AlignmentOptions options:SpaceOption* -> BoxOperator {cons("alignment")}
    "R"                                                  -> BoxOperator {cons("row")}

    "l" options:SpaceOption* -> AlignmentOption {cons("left")}
    "c" options:SpaceOption* -> AlignmentOption {cons("centre")}
    "r" options:SpaceOption* -> AlignmentOption {cons("right")}

    "(" {AlignmentOption ","}* ")" -> AlignmentOptions
