A sandwich consists of a lower slice of bread, mustard or mayonnaise; optional lettuce, an optional slice of tomato; two to four slices of either bologna, salami, or ham (in any combination); one or more slices of cheese, and a top slice of bread [translated into Backus Normal Form becomes ]

sandwich ::=


    [ mustard | mayonnaise ]

    lettuce? tomato?

    [ bologna | salami | ham ] {2,4}



I sense a Perl module being born...