From 396cc63cfc3658a11bbc76c9b5c4bf32e21cef6a Mon Sep 17 00:00:00 2001
From: bringert <bringert@cs.chalmers.se>
Date: Thu, 1 Dec 2005 17:27:06 +0000
Subject: Added list patterns. Added som simple prelude functions.

---
 src/Transfer/Syntax/Doc.tex | 38 +++++++++++++++++++++++++++-----------
 1 file changed, 27 insertions(+), 11 deletions(-)

(limited to 'src/Transfer/Syntax/Doc.tex')

diff --git a/src/Transfer/Syntax/Doc.tex b/src/Transfer/Syntax/Doc.tex
index 8c34773fe..759047dd5 100644
--- a/src/Transfer/Syntax/Doc.tex
+++ b/src/Transfer/Syntax/Doc.tex
@@ -63,15 +63,15 @@ The symbols used in Syntax are the following: \\
 \begin{tabular}{lll}
 {\symb{;}} &{\symb{:}} &{\symb{\{}} \\
 {\symb{\}}} &{\symb{{$=$}}} &{\symb{{$|$}{$|$}}} \\
-{\symb{(}} &{\symb{)}} &{\symb{\_}} \\
-{\symb{{$-$}{$>$}}} &{\symb{{$<$}{$-$}}} &{\symb{$\backslash$}} \\
-{\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{/{$=$}}} \\
+{\symb{{$<$}}} &{\symb{{$<$}{$=$}}} &{\symb{{$>$}}} \\
+{\symb{{$>$}{$=$}}} &{\symb{{$+$}}} &{\symb{{$-$}}} \\
 {\symb{*}} &{\symb{/}} &{\symb{\%}} \\
-{\symb{.}} &{\symb{[}} &{\symb{]}} \\
-{\symb{?}} &{\symb{,}} & \\
+{\symb{.}} &{\symb{?}} & \\
 \end{tabular}\\
 
 \subsection*{Comments}
@@ -126,12 +126,18 @@ All other symbols are terminals.\\
 \end{tabular}\\
 
 \begin{tabular}{lll}
-{\nonterminal{Pattern1}} & {\arrow}  &{\nonterminal{Ident}} {\nonterminal{Pattern2}} {\nonterminal{ListPattern}}  \\
+{\nonterminal{Pattern1}} & {\arrow}  &{\nonterminal{Pattern2}} {\terminal{::}} {\nonterminal{Pattern1}}  \\
  & {\delimit}  &{\nonterminal{Pattern2}}  \\
 \end{tabular}\\
 
 \begin{tabular}{lll}
-{\nonterminal{Pattern2}} & {\arrow}  &{\terminal{rec}} {\terminal{\{}} {\nonterminal{ListFieldPattern}} {\terminal{\}}}  \\
+{\nonterminal{Pattern2}} & {\arrow}  &{\nonterminal{Ident}} {\nonterminal{Pattern3}} {\nonterminal{ListPattern}}  \\
+ & {\delimit}  &{\nonterminal{Pattern3}}  \\
+\end{tabular}\\
+
+\begin{tabular}{lll}
+{\nonterminal{Pattern3}} & {\arrow}  &{\terminal{rec}} {\terminal{\{}} {\nonterminal{ListFieldPattern}} {\terminal{\}}}  \\
+ & {\delimit}  &{\terminal{[}} {\nonterminal{ListPListElem}} {\terminal{]}}  \\
  & {\delimit}  &{\terminal{Type}}  \\
  & {\delimit}  &{\nonterminal{String}}  \\
  & {\delimit}  &{\nonterminal{Integer}}  \\
@@ -140,9 +146,19 @@ All other symbols are terminals.\\
  & {\delimit}  &{\terminal{(}} {\nonterminal{Pattern}} {\terminal{)}}  \\
 \end{tabular}\\
 
+\begin{tabular}{lll}
+{\nonterminal{PListElem}} & {\arrow}  &{\nonterminal{Pattern}}  \\
+\end{tabular}\\
+
+\begin{tabular}{lll}
+{\nonterminal{ListPListElem}} & {\arrow}  &{\emptyP} \\
+ & {\delimit}  &{\nonterminal{PListElem}}  \\
+ & {\delimit}  &{\nonterminal{PListElem}} {\terminal{,}} {\nonterminal{ListPListElem}}  \\
+\end{tabular}\\
+
 \begin{tabular}{lll}
 {\nonterminal{ListPattern}} & {\arrow}  &{\emptyP} \\
- & {\delimit}  &{\nonterminal{Pattern2}} {\nonterminal{ListPattern}}  \\
+ & {\delimit}  &{\nonterminal{Pattern3}} {\nonterminal{ListPattern}}  \\
 \end{tabular}\\
 
 \begin{tabular}{lll}
-- 
cgit v1.2.3

