Cocol =
0{ANY} // using clauses in C#, import clauses in Java,
// #include
clauses in C++
1"COMPILER" 2ident 3
{ANY} // global fields and methods
ScannerSpecification
Parserspecification
"END"42 ident43 '.'45.
ScannerSpecification =
["IGNORECASE" 4]
["CHARACTERS"9 {SetDecl}
["TOKENS" {TokenDecl}]
["PRAGMAS" {PragmaDecl}]
{CommentDecl}
{WhiteSpaceDecl}.
SetDecl = 5ident '=' Set '.' 9.
Set =BasicSet {('+'|'-') BasicSet}.
BasicSet = 6 string | ident | char [".." 8char] | "ANY" 7.
TokenDecl = 10Symbol ['=' TokenExpr '.'] 18.
TokenExpr = TokenTerm {'|' TokenTerm}.
TokenTerm = TokenFactor {TokenFactor} ["CONTEXT" '(' TokenExpr ')'].
TokenFactor = 11 Symbol
| '('12 TokenExpr ')'13
| '['14 TokenExpr ']'15
| '{'16 TokenExpr '}'17.
Symbol = 50ident | string | char.
PragmaDecl = TokenDecl 19 [SemAction].
CommentDecl = "COMMENTS" 20"FROM" TokenExpr 21"TO" TokenExpr 22["NESTED"].
WhiteSpaceDecl = "IGNORE" Set 23.
ParserSpecification = "PRODUCTIONS"46 {Production}.
Production = 25ident 26[39 Attributes 44] [SemAction] '=' Expression '.'.41
Expression = 29Term {'|'29 Term}.
Term = [[Resolver 27] Factor {Factor}].
Factor = ["WEAK" 37] Symbol 38[39 Attributes 36]
| '('30 Expression ')'33
| '['31 Expression ']'34
| '{'32 Expression '}'35
| "ANY"
| "SYNC"
| SemAction 36.
Attributes = '<' {ANY} '>' | "<." {ANY} ".>".
SemAction = "(." 40{ANY} ".)".
Resolver = "IF" 28'(' {ANY} ')' .