%% File generated by the BNF Converter. \batchmode \documentclass[a4paper,11pt]{article} \usepackage[T1]{fontenc} \usepackage[utf8x]{inputenc} \setlength{\parindent}{0mm} \setlength{\parskip}{1mm} \title{The Language GF} \author{BNF-converter} \begin{document} \maketitle \newcommand{\emptyP}{\mbox{$\epsilon$}} \newcommand{\terminal}[1]{\mbox{{\texttt {#1}}}} \newcommand{\nonterminal}[1]{\mbox{$\langle \mbox{{\sl #1 }} \! \rangle$}} \newcommand{\arrow}{\mbox{::=}} \newcommand{\delimit}{\mbox{$|$}} \newcommand{\reserved}[1]{\mbox{{\texttt {#1}}}} \newcommand{\literal}[1]{\mbox{{\texttt {#1}}}} \newcommand{\symb}[1]{\mbox{{\texttt {#1}}}} This document was automatically generated by the {\em BNF-Converter}. \section*{The lexical structure of GF} \subsection*{Literals} Integer literals \nonterminal{Int}\ are nonempty sequences of digits. String literals \nonterminal{String}\ have the form \terminal{"}$x$\terminal{"}, where $x$ is any sequence of any characters except \terminal{"}\ unless preceded by \verb6\6. Ident literals are recognized by the regular expression \(({\nonterminal{lower}} \mid {\nonterminal{upper}}) ({\nonterminal{upper}} \mid {\nonterminal{lower}} \mid {\nonterminal{digit}} \mid \mbox{`\_'} \mid \mbox{`''})*\) LString literals are recognized by the regular expression \((\mbox{`''}) ({\nonterminal{anychar}} - \mbox{`''})* (\mbox{`''})\) \subsection*{Reserved words and symbols} The set of reserved words is the set of terminals appearing in the grammar. Those reserved words that consist of non-letter characters are called symbols, and they are treated in a different way from those that are similar to identifiers. The lexer follows rules familiar from languages like Haskell, C, and Java, including longest match and spacing conventions. The reserved words used in GF are the following: \\ \begin{tabular}{lll} {\reserved{Lin}} & {\reserved{PType}} & {\reserved{Str}} \\ {\reserved{Strs}} & {\reserved{Tok}} & {\reserved{Type}} \\ {\reserved{abstract}} & {\reserved{case}} & {\reserved{cat}} \\ {\reserved{concrete}} & {\reserved{data}} & {\reserved{def}} \\ {\reserved{flags}} & {\reserved{fn}} & {\reserved{fun}} \\ {\reserved{grammar}} & {\reserved{in}} & {\reserved{include}} \\ {\reserved{incomplete}} & {\reserved{instance}} & {\reserved{interface}} \\ {\reserved{let}} & {\reserved{lin}} & {\reserved{lincat}} \\ {\reserved{lindef}} & {\reserved{lintype}} & {\reserved{of}} \\ {\reserved{open}} & {\reserved{oper}} & {\reserved{out}} \\ {\reserved{package}} & {\reserved{param}} & {\reserved{pattern}} \\ {\reserved{pre}} & {\reserved{printname}} & {\reserved{resource}} \\ {\reserved{reuse}} & {\reserved{strs}} & {\reserved{table}} \\ {\reserved{tokenizer}} & {\reserved{transfer}} & {\reserved{union}} \\ {\reserved{var}} & {\reserved{variants}} & {\reserved{where}} \\ {\reserved{with}} & & \\ \end{tabular} \\ The symbols used in GF are the following: \\ \begin{tabular}{lll} {\symb{!}} & {\symb{\$}} & {\symb{\%}} \\ {\symb{(}} & {\symb{)}} & {\symb{*}} \\ {\symb{**}} & {\symb{{$+$}}} & {\symb{{$+$}{$+$}}} \\ {\symb{,}} & {\symb{{$-$}}} & {\symb{{$-$}{$>$}}} \\ {\symb{.}} & {\symb{/}} & {\symb{:}} \\ {\symb{;}} & {\symb{{$<$}}} & {\symb{{$=$}}} \\ {\symb{{$=$}{$>$}}} & {\symb{{$>$}}} & {\symb{?}} \\ {\symb{@}} & {\symb{[}} & {\symb{$\backslash$}} \\ {\symb{]}} & {\symb{\_}} & {\symb{\{}} \\ {\symb{{$|$}}} & {\symb{\}}} & \\ \end{tabular} \\ \subsection*{Comments} Single-line comments begin with {\symb{{$-$}{$-$}}}. Multiple-line comments are enclosed with {\symb{\{{$-$}}} and {\symb{{$-$}\}}}. \section*{The syntactic structure of GF} Non-terminals are enclosed between $\langle$ and $\rangle$. The symbols {\arrow} (production), {\delimit} (union) and {\emptyP} (empty rule) belong to the BNF notation. All other symbols are terminals.\\ \begin{tabular}{lll} {\nonterminal{Altern}} & {\arrow} &{\nonterminal{Exp}} {\terminal{/}} {\nonterminal{Exp}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{Bind}} & {\arrow} &{\nonterminal{Ident}} \\ & {\delimit} &{\terminal{\_}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{Case}} & {\arrow} &{\nonterminal{ListPattAlt}} {\terminal{{$=$}{$>$}}} {\nonterminal{Exp}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{CatDef}} & {\arrow} &{\terminal{[}} {\nonterminal{Ident}} {\nonterminal{ListDDecl}} {\terminal{]}} \\ & {\delimit} &{\terminal{[}} {\nonterminal{Ident}} {\nonterminal{ListDDecl}} {\terminal{]}} {\terminal{\{}} {\nonterminal{Integer}} {\terminal{\}}} \\ & {\delimit} &{\nonterminal{Ident}} {\nonterminal{ListDDecl}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ComplMod}} & {\arrow} &{\emptyP} \\ & {\delimit} &{\terminal{incomplete}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ConcExp}} & {\arrow} &{\nonterminal{Ident}} {\nonterminal{ListTransfer}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ConcSpec}} & {\arrow} &{\nonterminal{Ident}} {\terminal{{$=$}}} {\nonterminal{ConcExp}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{DDecl}} & {\arrow} &{\terminal{(}} {\nonterminal{ListBind}} {\terminal{:}} {\nonterminal{Exp}} {\terminal{)}} \\ & {\delimit} &{\nonterminal{Exp4}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{DataConstr}} & {\arrow} &{\nonterminal{Ident}} \\ & {\delimit} &{\nonterminal{Ident}} {\terminal{.}} {\nonterminal{Ident}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{DataDef}} & {\arrow} &{\nonterminal{Ident}} {\terminal{{$=$}}} {\nonterminal{ListDataConstr}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{Decl}} & {\arrow} &{\terminal{(}} {\nonterminal{ListBind}} {\terminal{:}} {\nonterminal{Exp}} {\terminal{)}} \\ & {\delimit} &{\nonterminal{Exp2}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{Def}} & {\arrow} &{\nonterminal{ListName}} {\terminal{:}} {\nonterminal{Exp}} \\ & {\delimit} &{\nonterminal{ListName}} {\terminal{{$=$}}} {\nonterminal{Exp}} \\ & {\delimit} &{\nonterminal{ListName}} {\terminal{:}} {\nonterminal{Exp}} {\terminal{{$=$}}} {\nonterminal{Exp}} \\ & {\delimit} &{\nonterminal{Name}} {\nonterminal{ListPatt}} {\terminal{{$=$}}} {\nonterminal{Exp}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{Equation}} & {\arrow} &{\nonterminal{ListPatt}} {\terminal{{$-$}{$>$}}} {\nonterminal{Exp}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{Exp}} & {\arrow} &{\terminal{$\backslash$}} {\nonterminal{ListBind}} {\terminal{{$-$}{$>$}}} {\nonterminal{Exp}} \\ & {\delimit} &{\terminal{$\backslash$}} {\terminal{$\backslash$}} {\nonterminal{ListBind}} {\terminal{{$=$}{$>$}}} {\nonterminal{Exp}} \\ & {\delimit} &{\nonterminal{Exp1}} {\terminal{{$+$}{$+$}}} {\nonterminal{Exp}} \\ & {\delimit} &{\terminal{fn}} {\terminal{\{}} {\nonterminal{ListEquation}} {\terminal{\}}} \\ & {\delimit} &{\nonterminal{Exp1}} {\terminal{{$+$}}} {\nonterminal{Exp}} \\ & {\delimit} &{\terminal{let}} {\terminal{\{}} {\nonterminal{ListLocDef}} {\terminal{\}}} {\terminal{in}} {\nonterminal{Exp}} \\ & {\delimit} &{\terminal{let}} {\nonterminal{ListLocDef}} {\terminal{in}} {\nonterminal{Exp}} \\ & {\delimit} &{\nonterminal{Decl}} {\terminal{{$-$}{$>$}}} {\nonterminal{Exp}} \\ & {\delimit} &{\nonterminal{Exp1}} {\terminal{{$=$}{$>$}}} {\nonterminal{Exp}} \\ & {\delimit} &{\nonterminal{Exp1}} {\terminal{where}} {\terminal{\{}} {\nonterminal{ListLocDef}} {\terminal{\}}} \\ & {\delimit} &{\nonterminal{Exp1}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{Exps}} & {\arrow} &{\nonterminal{Exp4}} {\nonterminal{Exps}} \\ & {\delimit} &{\emptyP} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{Extend}} & {\arrow} &{\nonterminal{ListIncluded}} {\terminal{**}} \\ & {\delimit} &{\emptyP} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{FileName}} & {\arrow} &{\nonterminal{Ident}} {\nonterminal{FileName}} \\ & {\delimit} &{\terminal{.}} {\nonterminal{FileName}} \\ & {\delimit} &{\nonterminal{Ident}} \\ & {\delimit} &{\terminal{{$-$}}} {\nonterminal{FileName}} \\ & {\delimit} &{\terminal{/}} {\nonterminal{FileName}} \\ & {\delimit} &{\nonterminal{String}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{FlagDef}} & {\arrow} &{\nonterminal{Ident}} {\terminal{{$=$}}} {\nonterminal{Ident}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{FunDef}} & {\arrow} &{\nonterminal{ListIdent}} {\terminal{:}} {\nonterminal{Exp}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{Grammar}} & {\arrow} &{\nonterminal{ListModDef}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{IncludeDecl}} & {\arrow} &{\terminal{include}} {\nonterminal{ListFileName}} \\ & {\delimit} &{\emptyP} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{Included}} & {\arrow} &{\nonterminal{Ident}} \\ & {\delimit} &{\nonterminal{Ident}} {\terminal{{$-$}}} {\terminal{[}} {\nonterminal{ListIdent}} {\terminal{]}} \\ & {\delimit} &{\nonterminal{Ident}} {\terminal{[}} {\nonterminal{ListIdent}} {\terminal{]}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{Label}} & {\arrow} &{\nonterminal{Ident}} \\ & {\delimit} &{\terminal{\$}} {\nonterminal{Integer}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{LocDef}} & {\arrow} &{\nonterminal{ListIdent}} {\terminal{:}} {\nonterminal{Exp}} \\ & {\delimit} &{\nonterminal{ListIdent}} {\terminal{{$=$}}} {\nonterminal{Exp}} \\ & {\delimit} &{\nonterminal{ListIdent}} {\terminal{:}} {\nonterminal{Exp}} {\terminal{{$=$}}} {\nonterminal{Exp}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ModBody}} & {\arrow} &{\nonterminal{Extend}} {\nonterminal{Opens}} {\terminal{\{}} {\nonterminal{ListTopDef}} {\terminal{\}}} \\ & {\delimit} &{\terminal{reuse}} {\nonterminal{Ident}} \\ & {\delimit} &{\terminal{union}} {\nonterminal{ListIncluded}} \\ & {\delimit} &{\nonterminal{Ident}} {\terminal{with}} {\nonterminal{ListOpenDecl}} \\ & {\delimit} &{\nonterminal{ListIncluded}} {\terminal{**}} {\nonterminal{Ident}} {\terminal{with}} {\nonterminal{ListOpenDecl}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ModDef}} & {\arrow} &{\terminal{grammar}} {\nonterminal{Ident}} {\terminal{{$=$}}} {\terminal{\{}} {\terminal{abstract}} {\terminal{{$=$}}} {\nonterminal{Ident}} {\terminal{;}} {\nonterminal{ListConcSpec}} {\terminal{\}}} \\ & {\delimit} &{\nonterminal{ComplMod}} {\nonterminal{ModType}} {\terminal{{$=$}}} {\nonterminal{ModBody}} \\ & {\delimit} &{\nonterminal{ModDef}} {\terminal{;}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ModType}} & {\arrow} &{\terminal{abstract}} {\nonterminal{Ident}} \\ & {\delimit} &{\terminal{concrete}} {\nonterminal{Ident}} {\terminal{of}} {\nonterminal{Ident}} \\ & {\delimit} &{\terminal{instance}} {\nonterminal{Ident}} {\terminal{of}} {\nonterminal{Ident}} \\ & {\delimit} &{\terminal{interface}} {\nonterminal{Ident}} \\ & {\delimit} &{\terminal{resource}} {\nonterminal{Ident}} \\ & {\delimit} &{\terminal{transfer}} {\nonterminal{Ident}} {\terminal{:}} {\nonterminal{OpenDecl}} {\terminal{{$-$}{$>$}}} {\nonterminal{OpenDecl}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{Name}} & {\arrow} &{\nonterminal{Ident}} \\ & {\delimit} &{\terminal{[}} {\nonterminal{Ident}} {\terminal{]}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{OldGrammar}} & {\arrow} &{\nonterminal{IncludeDecl}} {\nonterminal{ListTopDef}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{OpenDecl}} & {\arrow} &{\nonterminal{Ident}} \\ & {\delimit} &{\terminal{(}} {\nonterminal{QualOpen}} {\nonterminal{Ident}} {\terminal{{$=$}}} {\nonterminal{Ident}} {\terminal{)}} \\ & {\delimit} &{\terminal{(}} {\nonterminal{QualOpen}} {\nonterminal{Ident}} {\terminal{)}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{Opens}} & {\arrow} &{\emptyP} \\ & {\delimit} &{\terminal{open}} {\nonterminal{ListOpenDecl}} {\terminal{in}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ParConstr}} & {\arrow} &{\nonterminal{Ident}} {\nonterminal{ListDDecl}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ParDef}} & {\arrow} &{\nonterminal{Ident}} \\ & {\delimit} &{\nonterminal{Ident}} {\terminal{{$=$}}} {\nonterminal{ListParConstr}} \\ & {\delimit} &{\nonterminal{Ident}} {\terminal{{$=$}}} {\terminal{(}} {\terminal{in}} {\nonterminal{Ident}} {\terminal{)}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{Patt}} & {\arrow} &{\nonterminal{Ident}} {\nonterminal{ListPatt}} \\ & {\delimit} &{\nonterminal{Ident}} {\terminal{.}} {\nonterminal{Ident}} {\nonterminal{ListPatt}} \\ & {\delimit} &{\nonterminal{Patt1}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{PattAlt}} & {\arrow} &{\nonterminal{Patt}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{PattAss}} & {\arrow} &{\nonterminal{ListIdent}} {\terminal{{$=$}}} {\nonterminal{Patt}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{PattTupleComp}} & {\arrow} &{\nonterminal{Patt}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{PrintDef}} & {\arrow} &{\nonterminal{ListName}} {\terminal{{$=$}}} {\nonterminal{Exp}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{QualOpen}} & {\arrow} &{\emptyP} \\ & {\delimit} &{\terminal{incomplete}} \\ & {\delimit} &{\terminal{interface}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{Sort}} & {\arrow} &{\terminal{PType}} \\ & {\delimit} &{\terminal{Str}} \\ & {\delimit} &{\terminal{Strs}} \\ & {\delimit} &{\terminal{Tok}} \\ & {\delimit} &{\terminal{Type}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{TopDef}} & {\arrow} &{\terminal{cat}} {\nonterminal{ListCatDef}} \\ & {\delimit} &{\terminal{data}} {\nonterminal{ListDataDef}} \\ & {\delimit} &{\terminal{def}} {\nonterminal{ListDef}} \\ & {\delimit} &{\terminal{flags}} {\nonterminal{ListFlagDef}} \\ & {\delimit} &{\terminal{fun}} {\nonterminal{ListFunDef}} \\ & {\delimit} &{\terminal{data}} {\nonterminal{ListFunDef}} \\ & {\delimit} &{\terminal{lin}} {\nonterminal{ListDef}} \\ & {\delimit} &{\terminal{lincat}} {\nonterminal{ListPrintDef}} \\ & {\delimit} &{\terminal{lindef}} {\nonterminal{ListDef}} \\ & {\delimit} &{\terminal{lintype}} {\nonterminal{ListDef}} \\ & {\delimit} &{\terminal{oper}} {\nonterminal{ListDef}} \\ & {\delimit} &{\terminal{package}} {\nonterminal{Ident}} {\terminal{{$=$}}} {\terminal{\{}} {\nonterminal{ListTopDef}} {\terminal{\}}} {\terminal{;}} \\ & {\delimit} &{\terminal{param}} {\nonterminal{ListParDef}} \\ & {\delimit} &{\terminal{pattern}} {\nonterminal{ListDef}} \\ & {\delimit} &{\terminal{printname}} {\terminal{cat}} {\nonterminal{ListPrintDef}} \\ & {\delimit} &{\terminal{printname}} {\terminal{fun}} {\nonterminal{ListPrintDef}} \\ & {\delimit} &{\terminal{printname}} {\nonterminal{ListPrintDef}} \\ & {\delimit} &{\terminal{tokenizer}} {\nonterminal{Ident}} {\terminal{;}} \\ & {\delimit} &{\terminal{transfer}} {\nonterminal{ListDef}} \\ & {\delimit} &{\terminal{var}} {\nonterminal{ListDef}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{Transfer}} & {\arrow} &{\terminal{(}} {\terminal{transfer}} {\terminal{in}} {\nonterminal{OpenDecl}} {\terminal{)}} \\ & {\delimit} &{\terminal{(}} {\terminal{transfer}} {\terminal{out}} {\nonterminal{OpenDecl}} {\terminal{)}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{TupleComp}} & {\arrow} &{\nonterminal{Exp}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListIdent}} & {\arrow} &{\nonterminal{Ident}} \\ & {\delimit} &{\nonterminal{Ident}} {\terminal{,}} {\nonterminal{ListIdent}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListAltern}} & {\arrow} &{\emptyP} \\ & {\delimit} &{\nonterminal{Altern}} \\ & {\delimit} &{\nonterminal{Altern}} {\terminal{;}} {\nonterminal{ListAltern}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListBind}} & {\arrow} &{\emptyP} \\ & {\delimit} &{\nonterminal{Bind}} \\ & {\delimit} &{\nonterminal{Bind}} {\terminal{,}} {\nonterminal{ListBind}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListCase}} & {\arrow} &{\nonterminal{Case}} \\ & {\delimit} &{\nonterminal{Case}} {\terminal{;}} {\nonterminal{ListCase}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListCatDef}} & {\arrow} &{\nonterminal{CatDef}} {\terminal{;}} \\ & {\delimit} &{\nonterminal{CatDef}} {\terminal{;}} {\nonterminal{ListCatDef}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListConcSpec}} & {\arrow} &{\emptyP} \\ & {\delimit} &{\nonterminal{ConcSpec}} \\ & {\delimit} &{\nonterminal{ConcSpec}} {\terminal{;}} {\nonterminal{ListConcSpec}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListDDecl}} & {\arrow} &{\emptyP} \\ & {\delimit} &{\nonterminal{DDecl}} {\nonterminal{ListDDecl}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListDataConstr}} & {\arrow} &{\emptyP} \\ & {\delimit} &{\nonterminal{DataConstr}} \\ & {\delimit} &{\nonterminal{DataConstr}} {\terminal{{$|$}}} {\nonterminal{ListDataConstr}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListDataDef}} & {\arrow} &{\nonterminal{DataDef}} {\terminal{;}} \\ & {\delimit} &{\nonterminal{DataDef}} {\terminal{;}} {\nonterminal{ListDataDef}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListDef}} & {\arrow} &{\nonterminal{Def}} {\terminal{;}} \\ & {\delimit} &{\nonterminal{Def}} {\terminal{;}} {\nonterminal{ListDef}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListEquation}} & {\arrow} &{\emptyP} \\ & {\delimit} &{\nonterminal{Equation}} \\ & {\delimit} &{\nonterminal{Equation}} {\terminal{;}} {\nonterminal{ListEquation}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListExp}} & {\arrow} &{\emptyP} \\ & {\delimit} &{\nonterminal{Exp}} \\ & {\delimit} &{\nonterminal{Exp}} {\terminal{;}} {\nonterminal{ListExp}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListFileName}} & {\arrow} &{\nonterminal{FileName}} {\terminal{;}} \\ & {\delimit} &{\nonterminal{FileName}} {\terminal{;}} {\nonterminal{ListFileName}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListFlagDef}} & {\arrow} &{\nonterminal{FlagDef}} {\terminal{;}} \\ & {\delimit} &{\nonterminal{FlagDef}} {\terminal{;}} {\nonterminal{ListFlagDef}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListFunDef}} & {\arrow} &{\nonterminal{FunDef}} {\terminal{;}} \\ & {\delimit} &{\nonterminal{FunDef}} {\terminal{;}} {\nonterminal{ListFunDef}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListIncluded}} & {\arrow} &{\emptyP} \\ & {\delimit} &{\nonterminal{Included}} \\ & {\delimit} &{\nonterminal{Included}} {\terminal{,}} {\nonterminal{ListIncluded}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListLocDef}} & {\arrow} &{\emptyP} \\ & {\delimit} &{\nonterminal{LocDef}} \\ & {\delimit} &{\nonterminal{LocDef}} {\terminal{;}} {\nonterminal{ListLocDef}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListModDef}} & {\arrow} &{\emptyP} \\ & {\delimit} &{\nonterminal{ModDef}} {\nonterminal{ListModDef}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListName}} & {\arrow} &{\nonterminal{Name}} \\ & {\delimit} &{\nonterminal{Name}} {\terminal{,}} {\nonterminal{ListName}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListOpenDecl}} & {\arrow} &{\emptyP} \\ & {\delimit} &{\nonterminal{OpenDecl}} \\ & {\delimit} &{\nonterminal{OpenDecl}} {\terminal{,}} {\nonterminal{ListOpenDecl}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListParConstr}} & {\arrow} &{\emptyP} \\ & {\delimit} &{\nonterminal{ParConstr}} \\ & {\delimit} &{\nonterminal{ParConstr}} {\terminal{{$|$}}} {\nonterminal{ListParConstr}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListParDef}} & {\arrow} &{\nonterminal{ParDef}} {\terminal{;}} \\ & {\delimit} &{\nonterminal{ParDef}} {\terminal{;}} {\nonterminal{ListParDef}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListPatt}} & {\arrow} &{\nonterminal{Patt1}} \\ & {\delimit} &{\nonterminal{Patt1}} {\nonterminal{ListPatt}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListPattAlt}} & {\arrow} &{\nonterminal{PattAlt}} \\ & {\delimit} &{\nonterminal{PattAlt}} {\terminal{{$|$}}} {\nonterminal{ListPattAlt}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListPattAss}} & {\arrow} &{\emptyP} \\ & {\delimit} &{\nonterminal{PattAss}} \\ & {\delimit} &{\nonterminal{PattAss}} {\terminal{;}} {\nonterminal{ListPattAss}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListPattTupleComp}} & {\arrow} &{\emptyP} \\ & {\delimit} &{\nonterminal{PattTupleComp}} \\ & {\delimit} &{\nonterminal{PattTupleComp}} {\terminal{,}} {\nonterminal{ListPattTupleComp}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListPrintDef}} & {\arrow} &{\nonterminal{PrintDef}} {\terminal{;}} \\ & {\delimit} &{\nonterminal{PrintDef}} {\terminal{;}} {\nonterminal{ListPrintDef}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListTopDef}} & {\arrow} &{\emptyP} \\ & {\delimit} &{\nonterminal{TopDef}} {\nonterminal{ListTopDef}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListTransfer}} & {\arrow} &{\emptyP} \\ & {\delimit} &{\nonterminal{Transfer}} {\nonterminal{ListTransfer}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{ListTupleComp}} & {\arrow} &{\emptyP} \\ & {\delimit} &{\nonterminal{TupleComp}} \\ & {\delimit} &{\nonterminal{TupleComp}} {\terminal{,}} {\nonterminal{ListTupleComp}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{Exp1}} & {\arrow} &{\nonterminal{Exp1}} {\terminal{**}} {\nonterminal{Exp2}} \\ & {\delimit} &{\nonterminal{Exp1}} {\terminal{!}} {\nonterminal{Exp2}} \\ & {\delimit} &{\nonterminal{Exp1}} {\terminal{*}} {\nonterminal{Exp2}} \\ & {\delimit} &{\nonterminal{Exp2}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{Exp2}} & {\arrow} &{\nonterminal{Exp2}} {\nonterminal{Exp3}} \\ & {\delimit} &{\terminal{case}} {\nonterminal{Exp}} {\terminal{of}} {\terminal{\{}} {\nonterminal{ListCase}} {\terminal{\}}} \\ & {\delimit} &{\nonterminal{Ident}} {\terminal{@}} {\nonterminal{Exp4}} \\ & {\delimit} &{\terminal{Lin}} {\nonterminal{Ident}} \\ & {\delimit} &{\terminal{pre}} {\terminal{\{}} {\nonterminal{Exp}} {\terminal{;}} {\nonterminal{ListAltern}} {\terminal{\}}} \\ & {\delimit} &{\terminal{strs}} {\terminal{\{}} {\nonterminal{ListExp}} {\terminal{\}}} \\ & {\delimit} &{\terminal{table}} {\nonterminal{Exp4}} {\terminal{\{}} {\nonterminal{ListCase}} {\terminal{\}}} \\ & {\delimit} &{\terminal{table}} {\terminal{\{}} {\nonterminal{ListCase}} {\terminal{\}}} \\ & {\delimit} &{\terminal{table}} {\nonterminal{Exp4}} {\terminal{[}} {\nonterminal{ListExp}} {\terminal{]}} \\ & {\delimit} &{\terminal{variants}} {\terminal{\{}} {\nonterminal{ListExp}} {\terminal{\}}} \\ & {\delimit} &{\nonterminal{Exp3}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{Exp3}} & {\arrow} &{\nonterminal{Exp3}} {\terminal{.}} {\nonterminal{Label}} \\ & {\delimit} &{\terminal{\%}} {\nonterminal{Ident}} {\terminal{.}} {\nonterminal{Ident}} \\ & {\delimit} &{\terminal{\{}} {\nonterminal{Ident}} {\terminal{.}} {\nonterminal{Ident}} {\terminal{\}}} \\ & {\delimit} &{\nonterminal{Exp4}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{Exp4}} & {\arrow} &{\terminal{\%}} {\nonterminal{Ident}} {\terminal{\%}} \\ & {\delimit} &{\terminal{\{}} {\nonterminal{Ident}} {\terminal{\}}} \\ & {\delimit} &{\terminal{data}} \\ & {\delimit} &{\terminal{[}} {\terminal{]}} \\ & {\delimit} &{\nonterminal{Ident}} \\ & {\delimit} &{\terminal{(}} {\terminal{in}} {\nonterminal{Ident}} {\terminal{)}} \\ & {\delimit} &{\nonterminal{Integer}} \\ & {\delimit} &{\nonterminal{LString}} \\ & {\delimit} &{\terminal{[}} {\nonterminal{Ident}} {\nonterminal{Exps}} {\terminal{]}} \\ & {\delimit} &{\terminal{?}} \\ & {\delimit} &{\terminal{\{}} {\nonterminal{ListLocDef}} {\terminal{\}}} \\ & {\delimit} &{\nonterminal{Sort}} \\ & {\delimit} &{\nonterminal{String}} \\ & {\delimit} &{\terminal{[}} {\nonterminal{String}} {\terminal{]}} \\ & {\delimit} &{\terminal{{$<$}}} {\nonterminal{ListTupleComp}} {\terminal{{$>$}}} \\ & {\delimit} &{\terminal{{$<$}}} {\nonterminal{Exp}} {\terminal{:}} {\nonterminal{Exp}} {\terminal{{$>$}}} \\ & {\delimit} &{\terminal{(}} {\nonterminal{Exp}} {\terminal{)}} \\ \end{tabular} \\ \begin{tabular}{lll} {\nonterminal{Patt1}} & {\arrow} &{\terminal{\{}} {\nonterminal{Ident}} {\terminal{\}}} \\ & {\delimit} &{\nonterminal{Integer}} \\ & {\delimit} &{\nonterminal{Ident}} {\terminal{.}} {\nonterminal{Ident}} \\ & {\delimit} &{\terminal{\{}} {\nonterminal{ListPattAss}} {\terminal{\}}} \\ & {\delimit} &{\nonterminal{String}} \\ & {\delimit} &{\terminal{{$<$}}} {\nonterminal{ListPattTupleComp}} {\terminal{{$>$}}} \\ & {\delimit} &{\nonterminal{Ident}} \\ & {\delimit} &{\terminal{\_}} \\ & {\delimit} &{\terminal{(}} {\nonterminal{Patt}} {\terminal{)}} \\ \end{tabular} \\ \end{document}