<SMLfragment> --> SMLfragment(<what> , <in_omega> , <in> , <isa> , <with> )
<what> --> what(<object> )
<in_omega> --> in_omega(nil)
| in_omega([<classlist> ])
<in> --> in(nil)
| in([<classlist> ])
<isa> --> isa(nil)
| isa([<classlist> ])
<with> --> with(nil)
| with([<attrdecllist> ])
<classlist> --> class(<object> )
| <classlist> , class(<object> )
<attrdecllist> --> attrdecl(<attrcategorylist> , <propertylist> )
| <attrdecllist> , attrdecl(<attrcategorylist> , <propertylist> )
<attrcategorylist>--> nil
| [ <labellist> ]
<propertylist> --> nil
| [ <propertylist2> ]
<propertylist2>--> property(<label> , <propertyvalue> )
| <propertylist2> , property(<label> , <propertyvalue> )
<propertyvalue>--> <object>
| <selectExpB>
| enumeration( [ <classlist> ] )
| [ <SMLfragment> ]
<selectExpB> --> selectExpB( <restriction> , <selectOperator> , <selectExpB> )
| selectExpB( <restriction> , <selectOperator> , <object> )
| selectExpB( <object> , <selectOperator> , <selectExpB> )
| selectExpB( <object> , <selectOperator> , <object> )
<restriction> --> restriction( <label> , <selectExpB> )
| restriction( <label> , enumeration( [ <classlist> ] ) )
| restriction( <label> , <object> )
<selectOperator> --> dot
| bar
<labellist> --> <label>
| <labellist> , <label>
<label> --> ALPHANUM
| LABEL
| NUMBER
<object> --> derive([ <substlist> ])
| <selectexp>
<substlist> --> <singlesubst>
| <substlist> , <singlesubst>
<singlesubst> --> substitute(<object> , <label> )
| specialize(<label> , <label> )
<selectexp> --> <label>
| select(<selectexp> , SELECTOR1, <label> )
| select(<selectexp> , SELECTOR2, <selectexp> )