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

SCM Repository

[diderot] Diff of /trunk/src/parser/diderot.grm
ViewVC logotype

Diff of /trunk/src/parser/diderot.grm

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

revision 23, Mon Feb 1 03:29:06 2010 UTC revision 24, Mon Feb 1 22:43:55 2010 UTC
# Line 82  Line 82 
82          ;          ;
83    
84  ActorMethod  ActorMethod
85          : ID "{" "}"          : ID Block
86            ;
87    
88    Block
89            : "{" Statement* "}"
90            ;
91    
92    Statement
93            : Type ID "=" Expr ";"
94            | ID "=" Expr ";"
95            | "if" "(" Expr ")" Statement ("else" Statement)?
96            | Block
97            | "stable"
98            | "die"
99            | "new" ID "(" Arguments ")"
100            ;
101    
102    Arguments
103            : ( Expr ("," Expr)* )?
104          ;          ;
105    
106    
107  (***** Types *****)  (***** Types *****)
108    
109  Type    : "image" "<" Dimension "," Dimension ">"  Type    : "image" "<" Dimensions ">"
110          | "tensor" "<" Dimension "," Dimension ">"          | "tensor" "<" Dimensions ">"
111          | "field" "#" Dimension "<" Dimension "," Dimension ">"          | "field" "#" Dimension "<" Dimensions ">"
112          | "kernel" "#" Dimension          | "kernel" "#" Dimension
113          | "vec" "<" Dimension ">"          | "vec" "<" Dimension ">"
114          | "bool"          | "bool"
115          | "int"          | "int"
116          | "real"          | "real"
117            | "string"
118            ;
119    
120    Dimensions
121            : ( Dimension ("," Dimension)* )?
122          ;          ;
123    
124  Dimension  Dimension
# Line 137  Line 160 
160          ;          ;
161    
162  Expr5  Expr5
163          : Expr6 ("@" Expr6)?          : Expr6 ( "@" Expr6 | "[" Expr "]" )*
164          ;          ;
165    
166  AtomExp  AtomExp

Legend:
Removed from v.23  
changed lines
  Added in v.24

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