Link Search Menu Expand Document
% cbs-katex.sty % \newcommand{\STYLE}[2]{\htmlClass{cbs-#1}{#2}} \newcommand{\DECL}[3]{\htmlId{#1:#2}{#3}} \newcommand{\REF}[3]{\href{###1:#2}{#3}} \newcommand{\HYPER}[5]{\href{#1/#2/index.html###3:#4}{#5}} % \SHADE{MATH} can be defined to produce a shaded background to highlight % inline MATH in running text: \newcommand{\SHADE}[1]{#1} % \KEY{TEXT}, \STRING{TEXT}, \ATOM{TEXT}, \LEX{TEXT} can be used in math mode: \newcommand{\KEY}[1]{\textsf{\textit{\STYLE{Key}{#1}}}} \newcommand{\STRING}[1]{\textsf{``\texttt{#1}''}} \newcommand{\ATOM}[1]{\textsf{`\texttt{#1}'}} \newcommand{\LEX}[1]{\textsf{\STYLE{Key}{`}\texttt{#1}\STYLE{Key}{'}}} % The following commands produce ASCII characters that are treated specially by LaTeX: \newcommand{\HASH}{\char`\#} \newcommand{\DOLLAR}{\char`\$} \newcommand{\PERCENT}{\char`\%} \newcommand{\AMPERSAND}{\char`\&} \newcommand{\APOSTROPHE}{\char`\'} \newcommand{\BACKSLASH}{\char`\\} \newcommand{\CARET}{\char`\^} \newcommand{\UNDERSCORE}{\char`\_} \newcommand{\GRAVE}{\char`\`} \newcommand{\LEFTBRACE}{\char`\{} \newcommand{\RIGHTBRACE}{\char`\}} \newcommand{\TILDE}{\textasciitilde} % {\char`\~} % \NAME{name} highlights the name; % \NAMEDECL{name} declares Name.name as the target of links to name; % \NAMEREF{name} links name to the target Name.name in the current file; % \NAMEHYPER{url}{file}{name} links name to Name.name at url/file/file.pdf. % Similarly for \VAR{partvariable}, \SYN{syntaxname}, \SEM{semanticsName}, % and \SECT{sectionnumber} % The kerns in \SUB and \VAR avoid overlaps with primes: \newcommand{\SUB}[1]{_{\kern-2mu\STYLE{PartVariable}{\textsf{#1}}}} % PLAIN \newcommand{\VAR}[1]{\STYLE{PartVariable}{\textsf{\textit{#1}\kern2mu}}} \newcommand{\NAME}[1]{\STYLE{Name}{\textsf{#1}}} \newcommand{\SYN}[1]{\STYLE{SyntaxName}{\textsf{#1}}} \newcommand{\SEM}[1]{\STYLE{SemanticsName}{\textsf{#1}}} \newcommand{\SECT}[1]{\STYLE{SectionNumber}{\textsf{#1}}} % DECL \newcommand{\VARDECL}[1]{\DECL{PartVariable}{#1}{\VAR{#1}}} \newcommand{\NAMEDECL}[1]{\DECL{Name}{#1}{\NAME{#1}}} \newcommand{\SYNDECL}[1]{\DECL{SyntaxName}{#1}{\SYN{#1}}} \newcommand{\SEMDECL}[1]{\DECL{SemanticsName}{#1}{\SEM{#1}}} \newcommand{\SECTDECL}[1]{\DECL{SectionNumber}{#1}{\textsf{#1}}} % REF \newcommand{\VARREF}[1]{\REF{PartVariable}{#1}{\VAR{#1}}} \newcommand{\NAMEREF}[1]{\REF{Name}{#1}{\NAME{#1}}} \newcommand{\SYNREF}[1]{\REF{SyntaxName}{#1}{\SYN{#1}}} \newcommand{\SEMREF}[1]{\REF{SemanticsName}{#1}{\SEM{#1}}} \newcommand{\SECTREF}[1]{\REF{SectionNumber}{#1}{\SECT{#1}}} % HYPER \newcommand{\VARHYPER}[3]{\HYPER{#1}{#2}{PartVariable}{#3}{\VAR{#3}}} \newcommand{\NAMEHYPER}[3]{\HYPER{#1}{#2}{Name}{#3}{\NAME{#3}}} \newcommand{\SYNHYPER}[3]{\HYPER{#1}{#2}{SyntaxName}{#3}{\SYN{#3}}} \newcommand{\SEMHYPER}[3]{\HYPER{#1}{#2}{SemanticsName}{#3}{\SEM{#3}}} \newcommand{\SECTHYPER}[3]{\HYPER{#1}{#2}{SectionNumber}{#3}{\SECT{#3}}} % \LEFTPHRASE MATH \RIGHTPHRASE produces [[ MATH ]] with proper brackets: \newcommand{\LEFTPHRASE}{\llbracket} \newcommand{\RIGHTPHRASE}{\rrbracket} % \LEFTGROUP MATH \RIGHTGROUP produces ( MATH ) where the parentheses are % highlighted the same as keywords: \newcommand{\LEFTGROUP}{\STYLE{Key}{(}} \newcommand{\RIGHTGROUP}{\STYLE{Key}{)}} % MATH\PLUS produces a superscript + % MATH\STAR produces a superscript * % MATH\QUERY produces a superscript ? \newcommand{\PLUS}{{}^{\texttt{+}}} \newcommand{\STAR}{{}^{\texttt{*}}} \newcommand{\QUERY}{{}^{\texttt{?}}} % \RULE{& PREMISE \\ & ...}{& FORMULA ... \\ & ...} produces an inference rule % with separately aligned premises and conclusion % PREMISE % ... % ----------- % FORMULA ... % ... \newcommand{\RULE}[2] {\frac{\begin{aligned}#1\end{aligned}}{\begin{aligned}#2\end{aligned}}} % \AXIOM{& FORMULA ... \\ & ...} produces an aligned formula % % FORMULA ... % ... \newcommand{\AXIOM}[1]{\begin{aligned}#1\end{aligned}} % \TO TYPE produces => TYPE \newcommand{\TO}{\mathop{\Rightarrow}} % TERM \TRANS TERM produces TERM ---> TERM \newcommand{\TRANS}{\longrightarrow} % TERM \xrightarrow{LABEL} TERM puts the label above the long arrow %

Languages-beta : OC-L-A-Disambiguation.cbs | PLAIN | PDF


LanguageOCaml Light\KEY{Language} \quad \STRING{OCaml Light}

A\SECT{A} Disambiguation

Lexis SDF\KEY{Lexis SDF}

// 1 Lexical conventions

// Comments

lexical syntax

LAYOUT = LEX-block-comment
LEX-block-comment = “(” LEX-comment-part “*)”

LEX-comment-part = ~[()*]
LEX-comment-part = LEX-asterisk
LEX-comment-part = LEX-left-paren
LEX-comment-part = LEX-right-paren
LEX-comment-part = LEX-block-comment

LEX-asterisk = [*]
LEX-left-paren = [(]
LEX-right-paren = [)]

lexical restrictions

LEX-asterisk -/- [)]
LEX-left-paren -/- [*]

context-free restrictions

LAYOUT? -/- [(].[*]

// Identifiers

lexical syntax

ident\SHADE{\SYNHYPER{../.}{OC-L-01-Lexical-Conventions}{ident}} = keyword\SHADE{\SYNHYPER{../.}{OC-L-01-Lexical-Conventions}{keyword}} {reject}
lowercase-ident\SHADE{\SYNHYPER{../.}{OC-L-01-Lexical-Conventions}{lowercase-ident}} = keyword\SHADE{\SYNHYPER{../.}{OC-L-01-Lexical-Conventions}{keyword}} {reject}

lexical restrictions

ident\SHADE{\SYNHYPER{../.}{OC-L-01-Lexical-Conventions}{ident}}
lowercase-ident\SHADE{\SYNHYPER{../.}{OC-L-01-Lexical-Conventions}{lowercase-ident}}
capitalized-ident\SHADE{\SYNHYPER{../.}{OC-L-01-Lexical-Conventions}{capitalized-ident}} -/- [A-Za-z0-9_']

Syntax SDF\KEY{Syntax SDF}

// Integer literals

context-free restrictions

integer-literal\SHADE{\SYNHYPER{../.}{OC-L-01-Lexical-Conventions}{integer-literal}} -/- [0-9eE]

Syntax SDF\KEY{Syntax SDF}

// Floating-point literals

context-free restrictions

float-literal\SHADE{\SYNHYPER{../.}{OC-L-01-Lexical-Conventions}{float-literal}} -/- [0-9eE]

// String literals

syntax

string-character-star ::=  string-character_string-character-star\SHADE{ \SYNHYPER{../.}{OC-L-01-Lexical-Conventions}{string-character-star} \ ::= \ \ \SYNHYPER{../.}{OC-L-01-Lexical-Conventions}{string-character} \_ \SYNHYPER{../.}{OC-L-01-Lexical-Conventions}{string-character-star}} {avoid}

Lexis SDF\KEY{Lexis SDF}

// Keywords

lexical restrictions

“and” “as” “assert” “asr” “begin” “class”
“constraint” “do” “done” “downto” “else” “end”
“exception” “external” “false” “for” “fun” “function”
“functor” “if” “in” “include” “inherit” “initializer”
“land” “lazy” “let” “lor” “lsl” “lsr”
“lxor” “match” “method” “mod” “module” “mutable”
“new” “nonrec” “object” “of” “open” “or”
“private” “rec” “sig” “struct” “then” “to”
“true” “try” “type” “val” “virtual” “when”
“while” “with”
-/- [A-Za-z0-9_]

// Key symbols

infix-op-1\SHADE{\SYNHYPER{../.}{OC-L-03-Names}{infix-op-1}} infix-op-2\SHADE{\SYNHYPER{../.}{OC-L-03-Names}{infix-op-2}} infix-op-3\SHADE{\SYNHYPER{../.}{OC-L-03-Names}{infix-op-3}} infix-op-4\SHADE{\SYNHYPER{../.}{OC-L-03-Names}{infix-op-4}}
infix-op-5\SHADE{\SYNHYPER{../.}{OC-L-03-Names}{infix-op-5}} infix-op-6\SHADE{\SYNHYPER{../.}{OC-L-03-Names}{infix-op-6}} infix-op-7\SHADE{\SYNHYPER{../.}{OC-L-03-Names}{infix-op-7}} infix-op-8\SHADE{\SYNHYPER{../.}{OC-L-03-Names}{infix-op-8}}
-/- [!$\%\*+-.\/:<=>\?\@\^|~]
“[” -/- [|]
“|” -/- []]
“:” -/- [:]
“;” -/- [\;]

lexical syntax

infix-op-3\SHADE{\SYNHYPER{../.}{OC-L-03-Names}{infix-op-3}} = “->” {reject}

infix-op-5\SHADE{\SYNHYPER{../.}{OC-L-03-Names}{infix-op-5}} = “<-“ {reject}

Syntax SDF\KEY{Syntax SDF}

// 4 Type expressions

context-free syntax

typexpr ::=  typexpr -> typexpr\SHADE{\quad\SYNHYPER{../.}{OC-L-04-Type-Expressions}{typexpr} \ ::= \ \ \SYNHYPER{../.}{OC-L-04-Type-Expressions}{typexpr} \ \LEX{{-}{>}} \ \SYNHYPER{../.}{OC-L-04-Type-Expressions}{typexpr}} {right}
typexpr ::=  typexpr star-typexpr+\SHADE{\quad\SYNHYPER{../.}{OC-L-04-Type-Expressions}{typexpr} \ ::= \ \ \SYNHYPER{../.}{OC-L-04-Type-Expressions}{typexpr} \ \SYNHYPER{../.}{OC-L-04-Type-Expressions}{star-typexpr}\PLUS} {non-assoc}

context-free priorities

typexpr ::=  typexpr typeconstr\SHADE{\quad\SYNHYPER{../.}{OC-L-04-Type-Expressions}{typexpr} \ ::= \ \ \SYNHYPER{../.}{OC-L-04-Type-Expressions}{typexpr} \ \SYNHYPER{../.}{OC-L-03-Names}{typeconstr}}
>
constr-args ::=  typexpr star-typexpr*\SHADE{\quad\SYNHYPER{../.}{OC-L-08-Type-and-Exception-Definitions}{constr-args} \ ::= \ \ \SYNHYPER{../.}{OC-L-04-Type-Expressions}{typexpr} \ \SYNHYPER{../.}{OC-L-04-Type-Expressions}{star-typexpr}\STAR}
>
typexpr ::=  typexpr star-typexpr+\SHADE{\quad\SYNHYPER{../.}{OC-L-04-Type-Expressions}{typexpr} \ ::= \ \ \SYNHYPER{../.}{OC-L-04-Type-Expressions}{typexpr} \ \SYNHYPER{../.}{OC-L-04-Type-Expressions}{star-typexpr}\PLUS}
>
typexpr ::=  typexpr -> typexpr\SHADE{\quad\SYNHYPER{../.}{OC-L-04-Type-Expressions}{typexpr} \ ::= \ \ \SYNHYPER{../.}{OC-L-04-Type-Expressions}{typexpr} \ \LEX{{-}{>}} \ \SYNHYPER{../.}{OC-L-04-Type-Expressions}{typexpr}}

context-free priorities

star-typexpr ::=  * typexpr\SHADE{\quad\SYNHYPER{../.}{OC-L-04-Type-Expressions}{star-typexpr} \ ::= \ \ \LEX{{*}} \ \SYNHYPER{../.}{OC-L-04-Type-Expressions}{typexpr}}
>
typexpr ::=  typexpr star-typexpr+\SHADE{\quad\SYNHYPER{../.}{OC-L-04-Type-Expressions}{typexpr} \ ::= \ \ \SYNHYPER{../.}{OC-L-04-Type-Expressions}{typexpr} \ \SYNHYPER{../.}{OC-L-04-Type-Expressions}{star-typexpr}\PLUS}


// 6 Patterns

context-free syntax

pattern ::=  pattern | pattern\SHADE{\quad\SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ ::= \ \ \SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ \LEX{{|}} \ \SYNHYPER{../.}{OC-L-06-Patterns}{pattern}} {left}
pattern ::=  pattern comma-pattern+\SHADE{\quad\SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ ::= \ \ \SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ \SYNHYPER{../.}{OC-L-06-Patterns}{comma-pattern}\PLUS} {non-assoc}
pattern ::=  pattern :: pattern\SHADE{\quad\SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ ::= \ \ \SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ \LEX{{:}{:}} \ \SYNHYPER{../.}{OC-L-06-Patterns}{pattern}} {right}

context-free priorities

pattern ::=  constr pattern\SHADE{\quad\SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ ::= \ \ \SYNHYPER{../.}{OC-L-03-Names}{constr} \ \SYNHYPER{../.}{OC-L-06-Patterns}{pattern}}
>
pattern ::=  pattern :: pattern\SHADE{\quad\SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ ::= \ \ \SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ \LEX{{:}{:}} \ \SYNHYPER{../.}{OC-L-06-Patterns}{pattern}}
>
pattern ::=  pattern comma-pattern+\SHADE{\quad\SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ ::= \ \ \SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ \SYNHYPER{../.}{OC-L-06-Patterns}{comma-pattern}\PLUS}
>
pattern ::=  pattern | pattern\SHADE{\quad\SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ ::= \ \ \SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ \LEX{{|}} \ \SYNHYPER{../.}{OC-L-06-Patterns}{pattern}}
>
pattern ::=  pattern as value-name\SHADE{\quad\SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ ::= \ \ \SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ \LEX{as} \ \SYNHYPER{../.}{OC-L-03-Names}{value-name}}

context-free priorities
{
comma-pattern ::=  , pattern\SHADE{\quad\SYNHYPER{../.}{OC-L-06-Patterns}{comma-pattern} \ ::= \ \ \LEX{{,}} \ \SYNHYPER{../.}{OC-L-06-Patterns}{pattern}}
(pattern comma-pattern*)\SHADE{\LEFTGROUP \SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ \SYNHYPER{../.}{OC-L-06-Patterns}{comma-pattern}\STAR \RIGHTGROUP}
} >
pattern ::=  pattern comma-pattern+\SHADE{\quad\SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ ::= \ \ \SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ \SYNHYPER{../.}{OC-L-06-Patterns}{comma-pattern}\PLUS}


// 7 Expressions

context-free syntax

expr ::=  expr argument+\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{argument}\PLUS} {non-assoc,avoid}
expr ::=  - expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \LEX{{-}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}} {avoid}
expr ::=  expr infix-op-1 expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-03-Names}{infix-op-1} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}} {right}
expr ::=  expr infix-op-2 expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-03-Names}{infix-op-2} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}} {left}
expr ::=  expr infix-op-3 expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-03-Names}{infix-op-3} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}} {left,prefer}
expr ::=  expr :: expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{:}{:}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}} {right}
expr ::=  expr infix-op-4 expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-03-Names}{infix-op-4} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}} {right}
expr ::=  expr infix-op-5 expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-03-Names}{infix-op-5} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}} {left}
expr ::=  expr infix-op-6 expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-03-Names}{infix-op-6} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}} {right}
expr ::=  expr infix-op-7 expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-03-Names}{infix-op-7} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}} {right}
expr ::=  expr comma-expr+\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{comma-expr}\PLUS} {non-assoc}
expr ::=  expr infix-op-8 expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-03-Names}{infix-op-8} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}} {right}
expr ::=  expr . field <- expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{.}} \ \SYNHYPER{../.}{OC-L-03-Names}{field} \ \LEX{{<}{-}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}{right}
expr ::=  expr .( expr ) <- expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{.}{(}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{)}} \ \LEX{{<}{-}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}{right}
expr ::=  expr ; expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{;}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}} {right}

context-free priorities

argument ::=  expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{argument} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
>
expr ::=  prefix-symbol expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-01-Lexical-Conventions}{prefix-symbol} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
>
expr ::=  expr . field\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{.}} \ \SYNHYPER{../.}{OC-L-03-Names}{field}}
> {
expr ::=  expr argument+\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{argument}\PLUS}
expr ::=  assert expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \LEX{assert} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
} > {
expr ::=  - expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \LEX{{-}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
expr ::=  -. expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \LEX{{-}{.}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
} >
expr ::=  expr infix-op-1 expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-03-Names}{infix-op-1} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
>
expr ::=  expr infix-op-2 expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-03-Names}{infix-op-2} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
>
expr ::=  expr infix-op-3 expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-03-Names}{infix-op-3} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
>
expr ::=  expr :: expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{:}{:}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
>
expr ::=  expr infix-op-4 expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-03-Names}{infix-op-4} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
>
expr ::=  expr infix-op-5 expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-03-Names}{infix-op-5} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
>
expr ::=  expr infix-op-6 expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-03-Names}{infix-op-6} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
>
expr ::=  expr infix-op-7 expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-03-Names}{infix-op-7} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
>
expr ::=  expr comma-expr+\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{comma-expr}\PLUS}
> {
expr ::=  expr . field <- expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{.}} \ \SYNHYPER{../.}{OC-L-03-Names}{field} \ \LEX{{<}{-}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
expr ::=  expr .( expr ) <- expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{.}{(}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{)}} \ \LEX{{<}{-}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
expr ::=  expr infix-op-8 expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-03-Names}{infix-op-8} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
} >
expr ::=  expr ; expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{;}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}

context-free priorities

expr ::=  prefix-symbol expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-01-Lexical-Conventions}{prefix-symbol} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
>
expr ::=  expr .( expr )\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{.}{(}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{)}}}
<0> >
expr ::=  expr argument+\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{argument}\PLUS}

context-free priorities
{
argument ::=  expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{argument} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
expr ::=  expr . field\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{.}} \ \SYNHYPER{../.}{OC-L-03-Names}{field}}
expr ::=  expr .( expr )\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{.}{(}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{)}}}
expr ::=  expr argument+\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{argument}\PLUS}
expr ::=  assert expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \LEX{assert} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
expr ::=  expr infix-op-1 expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-03-Names}{infix-op-1} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
expr ::=  expr infix-op-2 expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-03-Names}{infix-op-2} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
expr ::=  expr infix-op-3 expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-03-Names}{infix-op-3} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
expr ::=  expr :: expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{:}{:}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
expr ::=  expr infix-op-4 expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-03-Names}{infix-op-4} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
expr ::=  expr infix-op-5 expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-03-Names}{infix-op-5} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
expr ::=  expr infix-op-6 expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-03-Names}{infix-op-6} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
expr ::=  expr infix-op-7 expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-03-Names}{infix-op-7} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
expr ::=  expr comma-expr+\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{comma-expr}\PLUS}
expr ::=  expr . field <- expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{.}} \ \SYNHYPER{../.}{OC-L-03-Names}{field} \ \LEX{{<}{-}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
expr ::=  expr .( expr ) <- expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{.}{(}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{)}} \ \LEX{{<}{-}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
expr ::=  expr infix-op-8 expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-03-Names}{infix-op-8} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
expr ::=  expr ; expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{;}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
} <0>. > {
expr ::=  if expr then expr (else expr)?\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \LEX{if} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{then} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEFTGROUP \LEX{else} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \RIGHTGROUP\QUERY}
expr ::=  match expr with pattern-matching\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \LEX{match} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{with} \ \SYNHYPER{../.}{OC-L-07-Expressions}{pattern-matching}}
expr ::=  function pattern-matching\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \LEX{function} \ \SYNHYPER{../.}{OC-L-07-Expressions}{pattern-matching}}
expr ::=  fun pattern+ -> expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \LEX{fun} \ \SYNHYPER{../.}{OC-L-06-Patterns}{pattern}\PLUS \ \LEX{{-}{>}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
expr ::=  try expr with pattern-matching\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \LEX{try} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{with} \ \SYNHYPER{../.}{OC-L-07-Expressions}{pattern-matching}}
expr ::=  let-definition in expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{let-definition} \ \LEX{in} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
}

context-free priorities
{
comma-expr ::=  , expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{comma-expr} \ ::= \ \ \LEX{{,}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
(expr comma-expr*)\SHADE{\LEFTGROUP \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{comma-expr}\STAR \RIGHTGROUP}
} >
expr ::=  expr comma-expr+\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{comma-expr}\PLUS}

context-free priorities
{
expr ::=  [ expr semic-expr* ]\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \LEX{{[}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{semic-expr}\STAR \ \LEX{{]}}}
expr ::=  [ expr semic-expr* ; ]\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \LEX{{[}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{semic-expr}\STAR \ \LEX{{;}} \ \LEX{{]}}}
expr ::=  [| expr semic-expr* |]\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \LEX{{[}{|}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{semic-expr}\STAR \ \LEX{{|}{]}}}
expr ::=  [| expr semic-expr* ; |]\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \LEX{{[}{|}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{semic-expr}\STAR \ \LEX{{;}} \ \LEX{{|}{]}}}
semic-expr ::=  ; expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{semic-expr} \ ::= \ \ \LEX{{;}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
(expr semic-expr*)\SHADE{\LEFTGROUP \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{semic-expr}\STAR \RIGHTGROUP}
expr ::=  { field = expr semic-field-expr* }\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \LEX{{\LEFTBRACE}} \ \SYNHYPER{../.}{OC-L-03-Names}{field} \ \LEX{{=}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{semic-field-expr}\STAR \ \LEX{{\RIGHTBRACE}}}
expr ::=  { field = expr semic-field-expr* ; }\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \LEX{{\LEFTBRACE}} \ \SYNHYPER{../.}{OC-L-03-Names}{field} \ \LEX{{=}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{semic-field-expr}\STAR \ \LEX{{;}} \ \LEX{{\RIGHTBRACE}}}
expr ::=  { expr with field = expr semic-field-expr* }\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \LEX{{\LEFTBRACE}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{with} \ \SYNHYPER{../.}{OC-L-03-Names}{field} \ \LEX{{=}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{semic-field-expr}\STAR \ \LEX{{\RIGHTBRACE}}}
expr ::=  { expr with field = expr semic-field-expr* ; }\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \LEX{{\LEFTBRACE}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{with} \ \SYNHYPER{../.}{OC-L-03-Names}{field} \ \LEX{{=}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{semic-field-expr}\STAR \ \LEX{{;}} \ \LEX{{\RIGHTBRACE}}}
semic-field-expr ::=  ; field = expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{semic-field-expr} \ ::= \ \ \LEX{{;}} \ \SYNHYPER{../.}{OC-L-03-Names}{field} \ \LEX{{=}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}
} >
expr ::=  expr ; expr\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{;}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}