Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /trunk/doc/report/grammar-defs.tex
ViewVC logotype

Diff of /trunk/doc/report/grammar-defs.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 386, Wed Oct 6 12:49:18 2010 UTC revision 1116, Thu May 5 04:49:02 2011 UTC
# Line 12  Line 12 
12    \begin{Rules}{Declaration}    \begin{Rules}{Declaration}
13      \RHS{\nt{InputDecl}}      \RHS{\nt{InputDecl}}
14      \RHS{\nt{VarDecl}}      \RHS{\nt{VarDecl}}
15      \RHS{\nt{ActorDecl}}      \RHS{\nt{StrandDecl}}
16      \RHS{\nt{CoordinationDecl}}      \RHS{\nt{CoordinationDecl}}
17    \end{Rules}}    \end{Rules}}
18  \newcommand{\InputDeclRULES}{  \newcommand{\InputDeclRULES}{
19    \begin{Rules}{InputDecl}    \begin{Rules}{InputDecl}
20      \RHS{\kw{input} \nt{Type} \term{Id} \OPTGRP{\kw{=} \nt{Expr}} \kw{;}}      \RHS{\kw{input} \nt{Type} \term{Id} \OPTGRP{\kw{=} \nt{Expr}} \kw{;}}
21    \end{Rules}}    \end{Rules}}
22  \newcommand{\ActorDeclRULES}{  \newcommand{\StrandDeclRULES}{
23    \begin{Rules}{ActorDecl}    \begin{Rules}{StrandDecl}
24      \RHS{\kw{actor} \term{Id} \kw{(} \nt{Params} \kw{)} \kw{\{} \LISTGRP{\nt{ActorStateDecl}} \LISTONEGRP{\nt{ActorMethod}} \kw{\}}}      \RHS{\kw{strand} \term{Id} \kw{(} \nt{Params} \kw{)} \kw{\{} \LISTGRP{\nt{StrandStateDecl}} \LISTONEGRP{\nt{StrandMethod}} \kw{\}}}
25    \end{Rules}}    \end{Rules}}
26  \newcommand{\ParamsRULES}{  \newcommand{\ParamsRULES}{
27    \begin{Rules}{Params}    \begin{Rules}{Params}
# Line 31  Line 31 
31    \begin{Rules}{Param}    \begin{Rules}{Param}
32      \RHS{\nt{ValueType} \term{Id}}      \RHS{\nt{ValueType} \term{Id}}
33    \end{Rules}}    \end{Rules}}
34  \newcommand{\ActorStateDeclRULES}{  \newcommand{\StrandStateDeclRULES}{
35    \begin{Rules}{ActorStateDecl}    \begin{Rules}{StrandStateDecl}
36      \RHS{\OPT{\kw{output}} \nt{VarDecl}}      \RHS{\OPT{\kw{output}} \nt{VarDecl}}
37    \end{Rules}}    \end{Rules}}
38  \newcommand{\ActorMethodRULES}{  \newcommand{\StrandMethodRULES}{
39    \begin{Rules}{ActorMethod}    \begin{Rules}{StrandMethod}
40      \RHS{\nt{MethodId} \nt{Block}}      \RHS{\nt{MethodId} \nt{Block}}
41    \end{Rules}}    \end{Rules}}
42  \newcommand{\MethodIdRULES}{  \newcommand{\MethodIdRULES}{
# Line 66  Line 66 
66    \end{Rules}}    \end{Rules}}
67  \newcommand{\TypeRULES}{  \newcommand{\TypeRULES}{
68    \begin{Rules}{Type}    \begin{Rules}{Type}
     \RHS{\nt{ValueType} \LISTGRP{\kw{[} \term{Int} \kw{]}}}  
69      \RHS{\kw{image} \kw{(} \term{Int} \kw{)} \nt{Dimensions}}      \RHS{\kw{image} \kw{(} \term{Int} \kw{)} \nt{Dimensions}}
70      \RHS{\kw{field} \kw{\#} \term{Int} \kw{(} \term{Int} \kw{)} \nt{Dimensions}}      \RHS{\kw{field} \kw{\#} \term{Int} \kw{(} \term{Int} \kw{)} \nt{Dimensions}}
71      \RHS{\kw{kernel} \kw{\#} \term{Int}}      \RHS{\kw{kernel} \kw{\#} \term{Int}}
72        \RHS{\nt{ValueType} \LISTGRP{\kw{\{} \term{Int} \kw{\}}}}
73    \end{Rules}}    \end{Rules}}
74  \newcommand{\ValueTypeRULES}{  \newcommand{\ValueTypeRULES}{
75    \begin{Rules}{ValueType}    \begin{Rules}{ValueType}
76      \RHS{\kw{bool}}      \RHS{\kw{tensor} \nt{Dimensions}}
     \RHS{\kw{int}}  
     \RHS{\kw{string}}  
77      \RHS{\kw{real}}      \RHS{\kw{real}}
78      \RHS{\kw{vec2}}      \RHS{\kw{vec2}}
79      \RHS{\kw{vec3}}      \RHS{\kw{vec3}}
80      \RHS{\kw{vec4}}      \RHS{\kw{vec4}}
81      \RHS{\kw{tensor} \nt{Dimensions}}      \RHS{\kw{bool}}
82        \RHS{\kw{int}}
83        \RHS{\kw{string}}
84    \end{Rules}}    \end{Rules}}
85  \newcommand{\DimensionsRULES}{  \newcommand{\DimensionsRULES}{
86    \begin{Rules}{Dimensions}    \begin{Rules}{Dimensions}
87      \RHS{\kw{[} \OPTGRP{\nt{\term{Int}} \LISTGRP{\kw{,} \nt{\term{Int}}}} \kw{]}}      \RHS{\kw{[} \OPTGRP{\term{Int} \LISTGRP{\kw{,} \term{Int}}} \kw{]}}
88    \end{Rules}}    \end{Rules}}
89  \newcommand{\CoordinationDeclRULES}{  \newcommand{\CoordinationDeclRULES}{
90    \begin{Rules}{CoordinationDecl}    \begin{Rules}{CoordinationDecl}
# Line 132  Line 132 
132    \end{Rules}}    \end{Rules}}
133  \newcommand{\MulExprRULES}{  \newcommand{\MulExprRULES}{
134    \begin{Rules}{MulExpr}    \begin{Rules}{MulExpr}
135      \RHS{\nt{ProbeExpr} \LISTGRP{\nt{MulOp} \nt{ProbeExpr}}}      \RHS{\nt{PowerExpr} \LISTGRP{\nt{MulOp} \nt{PowerExpr}}}
136      \end{Rules}}
137    \newcommand{\PowerExprRULES}{
138      \begin{Rules}{PowerExpr}
139        \RHS{\nt{ProbeExpr} \LISTGRP{\kw{\^} \nt{ProbeExpr}}}
140    \end{Rules}}    \end{Rules}}
141  \newcommand{\ProbeExprRULES}{  \newcommand{\ProbeExprRULES}{
142    \begin{Rules}{ProbeExpr}    \begin{Rules}{ProbeExpr}
# Line 140  Line 144 
144    \end{Rules}}    \end{Rules}}
145  \newcommand{\PrefixExprRULES}{  \newcommand{\PrefixExprRULES}{
146    \begin{Rules}{PrefixExpr}    \begin{Rules}{PrefixExpr}
147      \RHS{\nt{SliceExpr}}      \RHS{\nt{SuffixExpr}}
148      \RHS{\kw{-} \nt{PrefixExpr}}      \RHS{\kw{-} \nt{PrefixExpr}}
149      \RHS{\kw{!} \nt{PrefixExpr}}      \RHS{\kw{!} \nt{PrefixExpr}}
150      \RHS{\kw{D} \nt{PrefixExpr}}      \RHS{\kw{D} \nt{PrefixExpr}}
151    \end{Rules}}    \end{Rules}}
152  \newcommand{\SliceExprRULES}{  \newcommand{\SuffixExprRULES}{
153    \begin{Rules}{SliceExpr}    \begin{Rules}{SuffixExpr}
154      \RHS{\nt{AtomExp} \OPTGRP{\kw{[} \nt{Index} \LISTGRP{\kw{,} \nt{Index}} \kw{]}}}      \RHS{\nt{DerivExpr} \LIST{\nt{Suffix}}}
155      \end{Rules}}
156    \newcommand{\SuffixRULES}{
157      \begin{Rules}{Suffix}
158        \RHS{\kw{(} \nt{Arguments} \kw{)}}
159        \RHS{\kw{[} \nt{Index} \LISTGRP{\kw{,} \nt{Index}} \kw{]}}
160        \RHS{\kw{\{} Expr \kw{\}}}
161    \end{Rules}}    \end{Rules}}
162  \newcommand{\IndexRULES}{  \newcommand{\IndexRULES}{
163    \begin{Rules}{Index}    \begin{Rules}{Index}
164      \RHS{\kw{:}}      \RHS{\kw{:}}
165      \RHS{\nt{Expr}}      \RHS{\nt{Expr}}
166    \end{Rules}}    \end{Rules}}
167  \newcommand{\AtomExpRULES}{  \newcommand{\DerivExprRULES}{
168    \begin{Rules}{AtomExp}    \begin{Rules}{DerivExpr}
169      \RHS{\term{Id} \OPTGRP{\kw{(} \nt{Arguments} \kw{)}}}      \RHS{\nt{AtomExpr}}
170        \RHS{\nt{$\mathbf{\nabla}$} \nt{AtomExpr}}
171        \RHS{\nt{$\mathbf{\nabla\otimes}$} \nt{DerivExpr}}
172        \RHS{\nt{$\mathbf{\nabla\times}$} \nt{DerivExpr}}
173        \RHS{\nt{$\mathbf{\nabla\bullet}$} \nt{DerivExpr}}
174      \end{Rules}}
175    \newcommand{\AtomExprRULES}{
176      \begin{Rules}{AtomExpr}
177        \RHS{\term{Id}}
178        \RHS{\kw{identity} \kw{[} \term{Int} \kw{]}}
179        \RHS{\kw{zeros} \nt{Dimensions}}
180      \RHS{\kw{real} \kw{(} \nt{Expr} \kw{)}}      \RHS{\kw{real} \kw{(} \nt{Expr} \kw{)}}
181        \RHS{\kw{(} \nt{Expr} \LISTGRP{\kw{,} \nt{Expr}} \kw{)}}
182        \RHS{\kw{\{} \nt{Expr} \LISTGRP{\kw{,} \nt{Expr}} \kw{\}}}
183      \RHS{\kw{[} \nt{Expr} \LISTGRP{\kw{,} \nt{Expr}} \kw{]}}      \RHS{\kw{[} \nt{Expr} \LISTGRP{\kw{,} \nt{Expr}} \kw{]}}
184      \RHS{\term{Int}}      \RHS{\term{Int}}
185      \RHS{\term{Float}}      \RHS{\term{Float}}
186      \RHS{\term{String}}      \RHS{\term{String}}
     \RHS{\kw{(} \nt{Expr} \LISTGRP{\kw{,} \nt{Expr}} \kw{)}}  
187      \RHS{\kw{|} \nt{Expr} \kw{|}}      \RHS{\kw{|} \nt{Expr} \kw{|}}
188    \end{Rules}}    \end{Rules}}
189  \newcommand{\ArgumentsRULES}{  \newcommand{\ArgumentsRULES}{
# Line 187  Line 208 
208    \begin{Rules}{MulOp}    \begin{Rules}{MulOp}
209      \RHS{\kw{*}}      \RHS{\kw{*}}
210      \RHS{\kw{/}}      \RHS{\kw{/}}
211      \RHS{\kw{(*)}}      \RHS{$\mathbf{\circledast}$}
212        \RHS{$\mathbf{\otimes}$}
213        \RHS{$\mathbf{\bullet}$}
214    \end{Rules}}    \end{Rules}}

Legend:
Removed from v.386  
changed lines
  Added in v.1116

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0