16 |
| KW_if ("if") |
| KW_if ("if") |
17 |
| KW_image ("image") |
| KW_image ("image") |
18 |
| KW_input ("input") |
| KW_input ("input") |
19 |
|
| KW_in ("in") |
20 |
|
| KW_initially ("initially") |
21 |
| KW_int ("int") |
| KW_int ("int") |
22 |
| KW_kernel ("kernel") |
| KW_kernel ("kernel") |
23 |
| KW_new ("new") |
| KW_new ("new") |
50 |
| SEMI (";") |
| SEMI (";") |
51 |
| HASH ("#") |
| HASH ("#") |
52 |
| BANG ("!") |
| BANG ("!") |
53 |
| POSINT of IntInf.int |
| BAR ("|") |
54 |
| NEGINT of IntInf.int |
| DOTDOT ("..") |
55 |
|
| INT of IntInf.int |
56 |
| FLOAT of FloatLit.float |
| FLOAT of FloatLit.float |
57 |
| STRING of string |
| STRING of string |
58 |
| ID of Atom.atom |
| ID of Atom.atom |
100 |
: InputDecl |
: InputDecl |
101 |
| VarDecl => (PT.D_Var VarDecl) |
| VarDecl => (PT.D_Var VarDecl) |
102 |
| ActorDecl |
| ActorDecl |
103 |
|
| CoordinationDecl |
104 |
; |
; |
105 |
|
|
106 |
|
|
179 |
; |
; |
180 |
|
|
181 |
|
|
182 |
|
(***** Coordination declaration *****) |
183 |
|
|
184 |
|
CoordinationDecl |
185 |
|
: "initially" (Array | Collection) ";" |
186 |
|
=> (markDecl(FULL_SPAN, SR)) |
187 |
|
; |
188 |
|
|
189 |
|
Array |
190 |
|
: "[" Create "|" Iterations "]" |
191 |
|
=> (PT.D_InitialArray(Create, Iterations)) |
192 |
|
; |
193 |
|
|
194 |
|
Create |
195 |
|
: ID "(" Arguments ")" |
196 |
|
=> (mark PT.C_Mark (FULL_SPAN, PT.C_Create(ID, Arguments))) |
197 |
|
; |
198 |
|
|
199 |
|
Iterations |
200 |
|
: Iteration ( "," Iteration )+ |
201 |
|
=> (Iteration :: SR) |
202 |
|
; |
203 |
|
|
204 |
|
Iteration |
205 |
|
: ID "in" Expr ".." Expr |
206 |
|
=> (mark PT.I_Mark (FULL_SPAN, PT.I_Range(ID, Expr1, Expr2))) |
207 |
|
; |
208 |
|
|
209 |
|
Collection |
210 |
|
: "{" Create "|" Iterations "]" |
211 |
|
=> (PT.D_InitialCollection(Create, Iterations)) |
212 |
|
; |
213 |
|
|
214 |
(***** Types *****) |
(***** Types *****) |
215 |
|
|
216 |
Type : "image" Dimensions "[" Dimension "]" |
Type : "image" Dimensions "[" Dimension "]" |
255 |
; |
; |
256 |
|
|
257 |
Dimension |
Dimension |
258 |
: POSINT |
: INT |
259 |
=> (POSINT) |
=> (INT) |
260 |
; |
; |
261 |
|
|
262 |
(***** Expressions *****) |
(***** Expressions *****) |
324 |
(* end case *)) |
(* end case *)) |
325 |
| ValueType "(" Arguments ")" |
| ValueType "(" Arguments ")" |
326 |
=> (markExpr(FULL_SPAN, PT.E_Cons(ValueType, Arguments))) |
=> (markExpr(FULL_SPAN, PT.E_Cons(ValueType, Arguments))) |
327 |
| POSINT |
| INT |
328 |
=> (markExpr(FULL_SPAN, PT.E_Lit(L.Int POSINT))) |
=> (markExpr(FULL_SPAN, PT.E_Lit(L.Int INT))) |
|
| NEGINT |
|
|
=> (markExpr(FULL_SPAN, PT.E_Lit(L.Int NEGINT))) |
|
329 |
| FLOAT |
| FLOAT |
330 |
=> (markExpr(FULL_SPAN, PT.E_Lit(L.Float FLOAT))) |
=> (markExpr(FULL_SPAN, PT.E_Lit(L.Float FLOAT))) |
331 |
| STRING |
| STRING |