BadGrammar.OneCasaba
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
Bill Jackson (bj) April 9, 1987 8:28:13 pm PDT
Begin
{
"ABS" "ALL" "AND" "ANY" "APPLY" "ARRAY"
"BASE" "BEGIN" "BROADCAST"
"CEDAR" "CHECKED" "CODE" "COMPUTED" "CONS" "CONTINUE"
"DECREASING" "DEFINITIONS" "DEPENDENT" "DESCRIPTOR" "DIRECTORY" "DO"
"ELSE" "ENABLE" "END" "ENDCASE" "ENDLOOP" "ENTRY" "ERROR" "EXIT" "EXITS"
"EXPORTS"
"FINISHED" "FIRST" "FOR" "FORK" "FRAME" "FREE" "FROM"
"GO" "GOTO"
"IF" "IMPORTS" "IN" "INLINE" "INTERNAL" "ISTYPE"
"JOIN"
"LAST" "LENGTH" "LIST" "LOCKS" "LONG" "LOOP" "LOOPHOLE"
"MACHINE" "MAX" "MIN" "MOD" "MONITOR" "MONITORED"
"NARROW" "NEW" "NIL" "NOT" "NOTIFY" "NULL"
"OF" "OPEN" "OR" "ORD" "ORDERED" "OVERLAID"
"PACKED" "PAINTED" "POINTER" "PORT" "PRED" "PRIVATE" "PROC" "PROCEDURE" "PROCESS" "PROGRAM" "PUBLIC"
"READONLY" "RECORD" "REF" "REJECT" "RELATIVE" "REPEAT" "RESTART" "RESUME" "RETRY" "RETURN" "RETURNS"
"SAFE" "SELECT" "SEQUENCE" "SHARES" "SIGNAL" "SIZE" "START" "STATE" "STOP"
"SUCC"
"THEN" "THROUGH" "TO" "TRANSFER" "TRASH" "TRUSTED" "TYPE"
"UNCHECKED" "UNCOUNTED" "UNSAFE" "UNTIL" "USING"
"VAL" "VAR"
"WAIT" "WHILE" "WITH"
"ZONE"
"!" "#" "(" ")" "*" "+" "," "-" "." ".." "/" ":" ";" "<" "<=" "=" "=>" ">" ">=" "@"
"[" "]" "^" "←" "{" "|" "}" "~"
}: SimpleTokens;
maingoal: NonTerminal;
top: NonTerminal;
goal: NonTerminal;
module: NonTerminal;
directory: NonTerminal;
includelist: NonTerminal;
includeitem: NonTerminal;
using: NonTerminal;
defbody: NonTerminal;
defhead: NonTerminal;
definitions: NonTerminal;
cedar: NonTerminal;
proghead: NonTerminal;
resident: NonTerminal;
class: NonTerminal;
interface: NonTerminal;
exports: NonTerminal;
binditem: NonTerminal;
caselabel: NonTerminal;
caselabelP: NonTerminal;
casetest: NonTerminal;
block: NonTerminal;
exits: NonTerminal;
public: NonTerminal;
bounds: NonTerminal;
checked: NonTerminal;
default: NonTerminal;
positionP: NonTerminal;
optbits: NonTerminal;
sum: NonTerminal;
product: NonTerminal;
multop: NonTerminal;
factor: NonTerminal;
addop: NonTerminal;
readonly: NonTerminal;
catchany: NonTerminal;
interval: NonTerminal;
exp: NonTerminal;
caseexplist: NonTerminal;
caseexplistP: NonTerminal;
caseexpitem: NonTerminal;
transferop: NonTerminal;
disjunct: NonTerminal;
conjunct: NonTerminal;
negation: NonTerminal;
relation: NonTerminal;
catchlist: NonTerminal;
catchhead: NonTerminal;
ident: NonTerminal;
typeop: NonTerminal;
idlist: NonTerminal;
idlistP: NonTerminal;
arguments: NonTerminal;
arglist: NonTerminal;
returnlist: NonTerminal;
fieldlist: NonTerminal;
typeexp: NonTerminal;
num: NonTerminal;
lhs: NonTerminal;
qualifier: NonTerminal;
exitlist: NonTerminal;
exitlistP: NonTerminal;
exititem: NonTerminal;
optexp: NonTerminal;
catchcase: NonTerminal;
lhslist: NonTerminal;
initialization: NonTerminal;
initvalue: NonTerminal;
procaccess: NonTerminal;
inline: NonTerminal;
codelist: NonTerminal;
range: NonTerminal;
trash: NonTerminal;
defaultopt: NonTerminal;
orderlist: NonTerminal;
trusted: NonTerminal;
optrelation: NonTerminal;
relationtail: NonTerminal;
relop: NonTerminal;
shares: NonTerminal;
statement: NonTerminal;
balstmt: NonTerminal;
basicstmt: NonTerminal;
forclause: NonTerminal;
controlid: NonTerminal;
direction: NonTerminal;
doexit: NonTerminal;
transfer: NonTerminal;
dotest: NonTerminal;
optargs: NonTerminal;
free: NonTerminal;
casestmtlist: NonTerminal;
casestmtlistP: NonTerminal;
casestmtitem: NonTerminal;
declist: NonTerminal;
declaration: NonTerminal;
entry: NonTerminal;
optsize: NonTerminal;
primary: NonTerminal;
new: NonTerminal;
cons: NonTerminal;
listcons: NonTerminal;
desclist: NonTerminal;
optcatch: NonTerminal;
identlist: NonTerminal;
identlistP: NonTerminal;
prefixop: NonTerminal;
typecons: NonTerminal;
dependent: NonTerminal;
monitored: NonTerminal;
ordered: NonTerminal;
base: NonTerminal;
pointertype: NonTerminal;
pointerprefix: NonTerminal;
indextype: NonTerminal;
transfermode: NonTerminal;
elementlist: NonTerminal;
elementlistP: NonTerminal;
element: NonTerminal;
heap: NonTerminal;
typeappl: NonTerminal;
lengthP: NonTerminal;
reclist: NonTerminal;
variantpair: NonTerminal;
variantpart: NonTerminal;
vcasehead: NonTerminal;
tagtype: NonTerminal;
variantlist: NonTerminal;
variantitem: NonTerminal;
packed: NonTerminal;
imports: NonTerminal;
opttype: NonTerminal;
typelist: NonTerminal;
modulelist: NonTerminal;
moduleitem: NonTerminal;
tilde: NonTerminal;
pairlist: NonTerminal;
pairitem: NonTerminal;
typeid: NonTerminal;
typeidP: NonTerminal;
explist: NonTerminal;
keylist: NonTerminal;
keyitem: NonTerminal;
locks: NonTerminal;
lambda: NonTerminal;
open: NonTerminal;
bindlist: NonTerminal;
casehead: NonTerminal;
scope: NonTerminal;
enables: NonTerminal;
statementlist: NonTerminal;
statementlistP: NonTerminal;
safe: NonTerminal;
decimalnum: GenericToken = "tokenDECIMAL" ;
octalnum: GenericToken = "tokenOCTAL" ;
hexnum: GenericToken = "tokenHEX" ;
id: GenericToken = "tokenID" ;
string: GenericToken = "tokenROPE" ;
flnum: GenericToken = "tokenREAL" ;
char: GenericToken = "tokenCHAR" ;
atom: GenericToken = "tokenATOM" ;
maingoal ← top ;
top.a ← goal ;
top.p ← scope ;
goal.a ← module "." ;
goal.b ← module ".." ;
module.a ← directory identlist cedar proghead trusted checked block ;
module.b ← directory identlist cedar defhead defbody ;
directory.a ← "DIRECTORY" ";" ;
directory.b ← "DIRECTORY" includelist ";" ;
directory.c ← ;
includelist.a ← includeitem ;
includelist.b ← includelist "," includeitem ;
includeitem.a ← id ":" "FROM" string using ;
includeitem.b ← id ":" "TYPE" using ;
includeitem.c ← id using ;
includeitem.d ← id ":" "TYPE" id using ;
using.a ← "USING" "[" "]" ;
using.b ← "USING" "[" idlist "]" ;
using.c ← ;
defbody.a ← "BEGIN" open declist "END" ;
defbody.b ← "BEGIN" open declist ";" "END" ;
defbody.c ← "{" open declist "}" ;
defbody.d ← "{" open declist ";" "}" ;
defhead ← definitions locks imports shares tilde public ;
definitions ← "DEFINITIONS" ;
cedar.a ← "CEDAR" ;
cedar.b ← ;
proghead ← resident safe class arguments locks interface tilde public ;
resident ← ;
class.a ← "PROGRAM" ;
class.b ← "MONITOR" ;
interface ← imports exports shares ;
exports.a ← "EXPORTS" ;
exports.b ← "EXPORTS" modulelist ;
exports.c ← ;
binditem.a ← exp ;
binditem.b ← id ":" exp ;
binditem.c ← id "~" "~" exp ;
caselabel.a ← ident typeexp ;
caselabel.b ← caselabelP ;
caselabelP.a ← casetest ;
caselabelP.b ← caselabelP "," casetest ;
casetest.a ← optrelation ;
casetest.b ← exp ;
block.a ← "BEGIN" scope exits "END" ;
block.b ← "{" scope exits "}" ;
exits.a ← "EXITS" exitlist ;
exits.b ← ;
public.a ← "PUBLIC" ;
public.b ← "PRIVATE" ;
public.c ← ;
bounds ← exp ".." exp ;
checked.a ← ;
checked.b ← "CHECKED" ;
checked.c ← "TRUSTED" ;
checked.d ← "UNCHECKED" ;
default.a ← "←" defaultopt ;
default.b ← ;
positionP ← "(" exp optbits ")" ;
optbits.a ← ":" bounds ;
optbits.b ← ;
sum.a ← sum addop product ;
sum.b ← product ;
product.a ← product multop factor ;
product.b ← factor ;
multop.a ← "*" ;
multop.b ← "/" ;
multop.c ← "MOD" ;
factor.a ← addop primary ;
factor.b ← primary ;
addop.a ← "+" ;
addop.b ← "-" ;
readonly.a ← "READONLY" ;
readonly.b ← ;
catchany ← "ANY" "=>" statement ;
interval.a ← "[" bounds "]" ;
interval.b ← "(" bounds "]" ;
interval.c ← "[" bounds ")" ;
interval.d ← "(" bounds ")" ;
exp.a ← "IF" exp "THEN" exp "ELSE" exp ;
exp.b ← casehead caseexplist "ENDCASE" "=>" exp ;
exp.c ← lhs "←" exp ;
exp.d ← "[" explist "]" "←" exp ;
exp.e ← "ERROR" ;
exp.f ← transferop lhs ;
exp.g ← disjunct ;
caseexplist.a ← ;
caseexplist.b ← caseexplistP ;
caseexplist.c ← caseexplistP "," ;
caseexplistP.a ← caseexpitem ;
caseexplistP.b ← caseexplistP "," caseexpitem ;
caseexpitem ← caselabel "=>" exp ;
transferop.a ← "SIGNAL" ;
transferop.b ← "ERROR" ;
transferop.c ← "START" ;
transferop.d ← "JOIN" ;
transferop.e ← "NEW" ;
transferop.f ← "FORK" ;
disjunct.a ← disjunct "OR" conjunct ;
disjunct.b ← conjunct ;
conjunct.a ← conjunct "AND" negation ;
conjunct.b ← negation ;
negation.a ← "~" relation ;
negation.b ← "NOT" relation ;
negation.c ← relation ;
relation.a ← sum optrelation ;
relation.b ← sum ;
catchlist.a ← catchhead catchcase ;
catchlist.b ← catchhead ;
catchlist.c ← catchhead catchany ;
catchlist.d ← catchhead catchany ";" ;
catchhead.a ← ;
catchhead.b ← catchhead catchcase ";" ;
ident.a ← id positionP ":" ;
ident.b ← id ":" ;
typeop.a ← "CODE" ;
typeop.b ← "FIRST" ;
typeop.c ← "LAST" ;
typeop.d ← "NIL" ;
idlist ← idlistP ;
idlistP.a ← id ;
idlistP.b ← id "," idlistP ;
arguments ← arglist returnlist ;
arglist.a ← "ANY" ;
arglist.b ← fieldlist ;
arglist.c ← ;
returnlist.a ← "RETURNS" "ANY" ;
returnlist.b ← "RETURNS" fieldlist ;
returnlist.c ← ;
fieldlist.a ← "[" "]" ;
fieldlist.b ← "[" pairlist "]" ;
fieldlist.c ← "[" typelist "]" ;
typeexp.a ← id ;
typeexp.b ← typeid ;
typeexp.c ← typecons ;
num.a ← decimalnum ;
num.b ← octalnum ;
num.c ← hexnum ;
lhs.a ← id ;
lhs.b ← num ;
lhs.c ← string ;
lhs.e ← flnum ;
lhs.f ← char ;
lhs.h ← atom ;
lhs.i ← "NARROW" "[" exp opttype optcatch "]" ;
lhs.j ← "LOOPHOLE" "[" exp opttype "]" ;
lhs.k ← "APPLY" "[" exp "," exp optcatch "]" ;
lhs.l ← "(" exp ")" ;
lhs.m ← lhs qualifier ;
qualifier.a ← "." prefixop ;
qualifier.b ← "." typeop ;
qualifier.c ← "." "SIZE" ;
qualifier.d ← "[" explist optcatch "]" ;
qualifier.e ← "." id ;
qualifier.f ← "^" ;
exitlist.a ← ;
exitlist.b ← exitlistP ;
exitlist.c ← exitlistP ";" ;
exitlistP.a ← exititem ;
exitlistP.b ← exitlistP ";" exititem ;
exititem ← idlist "=>" statement ;
optexp.a ← trash ;
optexp.b ← exp ;
optexp.c ← ;
catchcase ← lhslist "=>" statement ;
lhslist.a ← lhs ;
lhslist.b ← lhslist "," lhs ;
initialization.a ← ;
initialization.b ← "←" initvalue ;
initialization.c ← tilde initvalue ;
initvalue.a ← procaccess trusted checked inline block ;
initvalue.b ← "CODE" ;
initvalue.c ← procaccess trusted checked "MACHINE" "CODE" "BEGIN" codelist "END" ;
initvalue.d ← procaccess trusted checked "MACHINE" "CODE" "{" codelist "}" ;
initvalue.e ← trash ;
initvalue.f ← exp ;
procaccess ← ;
inline.a ← "INLINE" ;
inline.b ← ;
codelist.a ← orderlist ;
codelist.b ← codelist ";" orderlist ;
range.a ← id ;
range.b ← id interval ;
range.c ← typeid interval ;
range.d ← interval ;
range.e ← typeid ;
trash.a ← "TRASH" ;
trash.b ← "NULL" ;
defaultopt.a ← trash ;
defaultopt.b ← exp "|" trash ;
defaultopt.c ← ;
defaultopt.d ← exp ;
orderlist.a ← optexp ;
orderlist.b ← orderlist "," optexp ;
trusted ← ;
optrelation.a ← "NOT" relationtail ;
optrelation.b ← relationtail ;
relationtail.a ← "IN" range ;
relationtail.b ← relop sum ;
relop.a ← "=" ;
relop.b ← "#" ;
relop.c ← "<" ;
relop.d ← "<=" ;
relop.e ← ">" ;
relop.f ← ">=" ;
shares.a ← "SHARES" idlist ;
shares.b ← ;
statement.a ← "IF" exp "THEN" statement ;
statement.b ← "IF" exp "THEN" balstmt "ELSE" statement ;
statement.c ← casehead casestmtlist "ENDCASE" "=>" statement ;
statement.d ← basicstmt ;
balstmt.a ← "IF" exp "THEN" balstmt "ELSE" balstmt ;
balstmt.b ← casehead casestmtlist "ENDCASE" "=>" balstmt ;
balstmt.c ← basicstmt ;
basicstmt.a ← lhs ;
basicstmt.b ← lhs "←" exp ;
basicstmt.c ← "[" explist "]" "←" exp ;
basicstmt.d ← trusted checked block ;
basicstmt.e ← casehead casestmtlist "ENDCASE" ;
basicstmt.f ← forclause dotest "DO" scope doexit "ENDLOOP" ;
basicstmt.g ← "EXIT" ;
basicstmt.h ← "LOOP" ;
basicstmt.i ← "GOTO" id ;
basicstmt.j ← "GO" "TO" id ;
basicstmt.k ← "RETURN" optargs ;
basicstmt.l ← transfer lhs ;
basicstmt.m ← free "[" exp optcatch "]" ;
basicstmt.n ← "WAIT" lhs ;
basicstmt.o ← "ERROR" ;
basicstmt.p ← "STOP" ;
basicstmt.q ← "NULL" ;
basicstmt.r ← "RESUME" optargs ;
basicstmt.s ← "REJECT" ;
basicstmt.t ← "CONTINUE" ;
basicstmt.u ← "RETRY" ;
basicstmt.v ← lhs "←" "STATE" ;
basicstmt.w ← "STATE" "←" exp ;
forclause.a ← "FOR" controlid "←" exp "," exp ;
forclause.b ← "FOR" controlid direction "IN" range ;
forclause.c ← "THROUGH" range ;
forclause.d ← ;
controlid.a ← ident typeexp ;
controlid.b ← id ;
direction.a ← "DECREASING" ;
direction.b ← ;
doexit.a ← ;
doexit.b ← "REPEAT" exitlist ;
doexit.c ← "REPEAT" exitlist "FINISHED" "=>" statement ;
doexit.d ← "REPEAT" exitlist "FINISHED" "=>" statement ";" ;
transfer.a ← "SIGNAL" ;
transfer.b ← "ERROR" ;
transfer.c ← "RETURN" "WITH" "ERROR" ;
transfer.d ← "START" ;
transfer.e ← "RESTART" ;
transfer.f ← "JOIN" ;
transfer.g ← "NOTIFY" ;
transfer.h ← "BROADCAST" ;
transfer.i ← "TRANSFER" "WITH" ;
transfer.j ← "RETURN" "WITH" ;
dotest.a ← "UNTIL" exp ;
dotest.b ← "WHILE" exp ;
dotest.c ← ;
optargs.a ← "[" explist "]" ;
optargs.b ← ;
optargs.c ← lhs ;
free.a ← "FREE" ;
free.b ← lhs "." "FREE" ;
casestmtlist.a ← ;
casestmtlist.b ← casestmtlistP ;
casestmtlist.c ← casestmtlistP ";" ;
casestmtlistP.a ← casestmtitem ;
casestmtlistP.b ← casestmtlistP ";" casestmtitem ;
casestmtitem ← caselabel "=>" statement ;
declist.a ← declaration ;
declist.b ← declist ";" declaration ;
declaration.a ← identlist public entry readonly typeexp initialization ;
declaration.b ← identlist public "TYPE" tilde public typeexp default ;
declaration.c ← identlist public "TYPE" optsize ;
entry.a ← "ENTRY" ;
entry.b ← "INTERNAL" ;
entry.c ← ;
optsize.a ← "[" exp "]" ;
optsize.b ← ;
primary.a ← "[" explist "]" ;
primary.b ← prefixop "[" orderlist "]" ;
primary.c ← "VAL" "[" orderlist "]" ;
primary.d ← "ALL" "[" orderlist "]" ;
primary.e ← new "[" typeexp initialization optcatch "]" ;
primary.f ← cons "[" explist optcatch "]" ;
primary.g ← listcons "[" explist "]" ;
primary.h ← "NIL" ;
primary.i ← typeop "[" typeexp "]" ;
primary.j ← "SIZE" "[" typeexp "]" ;
primary.k ← "SIZE" "[" typeexp "," exp "]" ;
primary.l ← "ISTYPE" "[" exp "," typeexp "]" ;
primary.m ← "@" lhs ;
primary.n ← "DESCRIPTOR" "[" desclist "]" ;
primary.o ← lhs ;
new.a ← "NEW" ;
new.b ← lhs "." "NEW" ;
cons.a ← "CONS" ;
cons.b ← lhs "." "CONS" ;
listcons.a ← "LIST" ;
listcons.b ← lhs "." "LIST" ;
desclist.a ← exp "," exp opttype ;
desclist.b ← exp ;
optcatch.a ← "!" catchlist ;
optcatch.b ← ;
identlist ← identlistP ;
identlistP.a ← id ":" ;
identlistP.b ← id positionP ":" ;
identlistP.c ← id "," identlistP ;
identlistP.d ← id positionP "," identlistP ;
prefixop.a ← "LONG" ;
prefixop.b ← "ABS" ;
prefixop.c ← "PRED" ;
prefixop.d ← "SUCC" ;
prefixop.e ← "ORD" ;
prefixop.f ← "MIN" ;
prefixop.g ← "MAX" ;
prefixop.h ← "BASE" ;
prefixop.i ← "LENGTH" ;
typecons.a ← interval ;
typecons.b ← id interval ;
typecons.c ← typeid interval ;
typecons.d ← dependent "{" elementlist "}" ;
typecons.e ← dependent monitored "RECORD" reclist ;
typecons.f ← ordered base pointertype ;
typecons.g ← "VAR" typeexp ;
typecons.h ← "REF" readonly typeexp ;
typecons.i ← "REF" readonly "ANY" ;
typecons.j ← "REF" ;
typecons.k ← "LIST" "OF" readonly typeexp ;
typecons.l ← packed "ARRAY" indextype "OF" typeexp ;
typecons.m ← "DESCRIPTOR" "FOR" readonly typeexp ;
typecons.n ← safe transfermode arguments ;
typecons.o ← id "RELATIVE" typeexp ;
typecons.p ← typeid "RELATIVE" typeexp ;
typecons.q ← heap "ZONE" ;
typecons.r ← "LONG" typeexp ;
typecons.s ← "FRAME" "[" id "]" ;
typecons.t ← id "PAINTED" typeexp ;
typecons.u ← typeid "PAINTED" typeexp ;
typecons.v ← typeappl ;
dependent.a ← "MACHINE" "DEPENDENT" ;
dependent.b ← ;
monitored.a ← "MONITORED" ;
monitored.b ← ;
ordered.a ← "ORDERED" ;
ordered.b ← ;
base.a ← "BASE" ;
base.b ← ;
pointertype.a ← pointerprefix ;
pointertype.b ← pointerprefix "TO" readonly typeexp ;
pointerprefix.a ← "POINTER" ;
pointerprefix.b ← "POINTER" interval ;
indextype.a ← typeexp ;
indextype.b ← ;
transfermode.a ← "PROCEDURE" ;
transfermode.b ← "PROC" ;
transfermode.c ← "PORT" ;
transfermode.d ← "SIGNAL" ;
transfermode.e ← "ERROR" ;
transfermode.f ← "PROCESS" ;
transfermode.g ← "PROGRAM" ;
elementlist.a ← ;
elementlist.b ← elementlistP ;
elementlistP.a ← element ;
elementlistP.b ← elementlistP "," element ;
element.a ← id "(" exp ")" ;
element.b ← "(" exp ")" ;
element.c ← id ;
heap.a ← "UNCOUNTED" ;
heap.b ← ;
typeappl.a ← typeappl "." id ;
typeappl.b ← id lengthP ;
typeappl.c ← typeid lengthP ;
typeappl.d ← typeappl lengthP ;
lengthP ← "[" exp "]" ;
reclist.a ← "[" "]" ;
reclist.b ← "NULL" ;
reclist.c ← "[" pairlist "]" ;
reclist.d ← "[" typelist "]" ;
reclist.e ← "[" pairlist "," variantpair "]" ;
reclist.f ← "[" variantpart default "]" ;
reclist.g ← "[" variantpair "]" ;
variantpair ← identlist public variantpart default ;
variantpart.a ← "SELECT" vcasehead "FROM" variantlist "ENDCASE" ;
variantpart.b ← "SELECT" vcasehead "FROM" variantlist "," "ENDCASE" ;
variantpart.c ← packed "SEQUENCE" vcasehead "OF" typeexp ;
vcasehead.a ← ident public tagtype ;
vcasehead.b ← "COMPUTED" tagtype ;
vcasehead.c ← "OVERLAID" tagtype ;
tagtype.a ← "*" ;
tagtype.b ← typeexp ;
variantlist.a ← variantitem ;
variantlist.b ← variantlist "," variantitem ;
variantitem ← idlist "=>" reclist ;
packed.a ← "PACKED" ;
packed.b ← ;
imports.a ← "IMPORTS" ;
imports.b ← "IMPORTS" modulelist ;
imports.c ← ;
opttype.a ← "," typeexp ;
opttype.b ← ;
typelist.a ← typecons default ;
typelist.b ← typeid default ;
typelist.c ← id ;
typelist.d ← id "←" defaultopt ;
typelist.e ← typecons default "," typelist ;
typelist.f ← typeid default "," typelist ;
typelist.g ← id "," typelist ;
typelist.h ← id "←" defaultopt "," typelist ;
modulelist.a ← moduleitem ;
modulelist.b ← modulelist "," moduleitem ;
moduleitem.a ← id ;
moduleitem.b ← id ":" id ;
tilde.a ← "~" ;
tilde.b ← "=" ;
pairlist.a ← pairitem ;
pairlist.b ← pairlist "," pairitem ;
pairitem ← identlist public typeexp default ;
typeid.a ← id id ;
typeid.b ← id typeid ;
typeid.c ← typeidP ;
typeidP.a ← id "." id ;
typeidP.b ← typeidP "." id ;
explist.a ← orderlist ;
explist.b ← keylist ;
keylist.a ← keyitem ;
keylist.b ← keylist "," keyitem ;
keyitem.a ← id "~" optexp ;
keyitem.b ← id ":" optexp ;
locks.a ← "LOCKS" primary lambda ;
locks.b ← ;
lambda.a ← "USING" ident typeexp ;
lambda.b ← ;
open.a ← "OPEN" bindlist ";" ;
open.b ← ;
bindlist.a ← binditem ;
bindlist.b ← bindlist "," binditem ;
casehead.a ← "SELECT" exp "FROM" ;
casehead.b ← "WITH" binditem "SELECT" optexp "FROM" ;
scope.a ← open enables statementlist ;
scope.b ← open enables declist ";" statementlist ;
enables.a ← "ENABLE" catchcase ";" ;
enables.b ← "ENABLE" catchany ";" ;
enables.c ← "ENABLE" "BEGIN" catchlist "END" ";" ;
enables.d ← "ENABLE" "{" catchlist "}" ";" ;
enables.e ← ;
statementlist.a ← ;
statementlist.b ← statementlistP ;
statementlist.c ← statementlistP ";" ;
statementlistP.a ← statement ;
statementlistP.b ← statementlistP ";" statement ;
safe.a ← ;
safe.b ← "UNSAFE" ;
safe.c ← "SAFE" ;
End.