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


\[\KEY{Language} \quad \STRING{OCaml Light}\]

\(\SECT{A}\) Disambiguation

\(\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

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

lexical restrictions

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

\(\KEY{Syntax SDF}\)

// Integer literals

context-free restrictions

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

\(\KEY{Syntax SDF}\)

// Floating-point literals

context-free restrictions

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

// String literals

syntax

\(\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}

\(\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

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

lexical syntax

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

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

\(\KEY{Syntax SDF}\)

// 4 Type expressions

context-free syntax

\(\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}
\(\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

\(\SHADE{\quad\SYNHYPER{../.}{OC-L-04-Type-Expressions}{typexpr} \ ::= \ \ \SYNHYPER{../.}{OC-L-04-Type-Expressions}{typexpr} \ \SYNHYPER{../.}{OC-L-03-Names}{typeconstr}}\)
>
\(\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}\)
>
\(\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}\)
>
\(\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

\(\SHADE{\quad\SYNHYPER{../.}{OC-L-04-Type-Expressions}{star-typexpr} \ ::= \ \ \LEX{{*}} \ \SYNHYPER{../.}{OC-L-04-Type-Expressions}{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

\(\SHADE{\quad\SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ ::= \ \ \SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ \LEX{{|}} \ \SYNHYPER{../.}{OC-L-06-Patterns}{pattern}}\) {left}
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ ::= \ \ \SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ \SYNHYPER{../.}{OC-L-06-Patterns}{comma-pattern}\PLUS}\) {non-assoc}
\(\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

\(\SHADE{\quad\SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ ::= \ \ \SYNHYPER{../.}{OC-L-03-Names}{constr} \ \SYNHYPER{../.}{OC-L-06-Patterns}{pattern}}\)
>
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ ::= \ \ \SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ \LEX{{:}{:}} \ \SYNHYPER{../.}{OC-L-06-Patterns}{pattern}}\)
>
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ ::= \ \ \SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ \SYNHYPER{../.}{OC-L-06-Patterns}{comma-pattern}\PLUS}\)
>
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ ::= \ \ \SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ \LEX{{|}} \ \SYNHYPER{../.}{OC-L-06-Patterns}{pattern}}\)
>
\(\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
{
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-06-Patterns}{comma-pattern} \ ::= \ \ \LEX{{,}} \ \SYNHYPER{../.}{OC-L-06-Patterns}{pattern}}\)
\(\SHADE{\LEFTGROUP \SYNHYPER{../.}{OC-L-06-Patterns}{pattern} \ \SYNHYPER{../.}{OC-L-06-Patterns}{comma-pattern}\STAR \RIGHTGROUP}\)
} >
\(\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

\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{argument}\PLUS}\) {non-assoc,avoid}
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \LEX{{-}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}\) {avoid}
\(\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}
\(\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}
\(\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}
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{:}{:}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}\) {right}
\(\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}
\(\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}
\(\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}
\(\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}
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{comma-expr}\PLUS}\) {non-assoc}
\(\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}
\(\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}
\(\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}
\(\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

\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{argument} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}\)
>
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-01-Lexical-Conventions}{prefix-symbol} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}\)
>
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{.}} \ \SYNHYPER{../.}{OC-L-03-Names}{field}}\)
> {
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{argument}\PLUS}\)
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \LEX{assert} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}\)
} > {
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \LEX{{-}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}\)
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \LEX{{-}{.}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{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}}\)
>
\(\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}}\)
>
\(\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}}\)
>
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{:}{:}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{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}}\)
>
\(\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}}\)
>
\(\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}}\)
>
\(\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}}\)
>
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{comma-expr}\PLUS}\)
> {
\(\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}}\)
\(\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}}\)
\(\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}}\)
} >
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{;}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}\)

context-free priorities

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

context-free priorities
{
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{argument} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}\)
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{.}} \ \SYNHYPER{../.}{OC-L-03-Names}{field}}\)
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{.}{(}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{)}}}\)
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{argument}\PLUS}\)
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \LEX{assert} \ \SYNHYPER{../.}{OC-L-07-Expressions}{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}}\)
\(\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}}\)
\(\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}}\)
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{:}{:}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{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}}\)
\(\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}}\)
\(\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}}\)
\(\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}}\)
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{comma-expr}\PLUS}\)
\(\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}}\)
\(\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}}\)
\(\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}}\)
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{;}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}\)
} <0>. > {
\(\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}\)
\(\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}}\)
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \LEX{function} \ \SYNHYPER{../.}{OC-L-07-Expressions}{pattern-matching}}\)
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \LEX{fun} \ \SYNHYPER{../.}{OC-L-06-Patterns}{pattern}\PLUS \ \LEX{{-}{>}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}\)
\(\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}}\)
\(\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
{
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{comma-expr} \ ::= \ \ \LEX{{,}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}\)
\(\SHADE{\LEFTGROUP \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{comma-expr}\STAR \RIGHTGROUP}\)
} >
\(\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
{
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \LEX{{[}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{semic-expr}\STAR \ \LEX{{]}}}\)
\(\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{{]}}}\)
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \LEX{{[}{|}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{semic-expr}\STAR \ \LEX{{|}{]}}}\)
\(\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{{|}{]}}}\)
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{semic-expr} \ ::= \ \ \LEX{{;}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}\)
\(\SHADE{\LEFTGROUP \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \SYNHYPER{../.}{OC-L-07-Expressions}{semic-expr}\STAR \RIGHTGROUP}\)
\(\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}}}\)
\(\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}}}\)
\(\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}}}\)
\(\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}}}\)
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{semic-field-expr} \ ::= \ \ \LEX{{;}} \ \SYNHYPER{../.}{OC-L-03-Names}{field} \ \LEX{{=}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}\)
} >
\(\SHADE{\quad\SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ ::= \ \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr} \ \LEX{{;}} \ \SYNHYPER{../.}{OC-L-07-Expressions}{expr}}\)