SCM Repository
[diderot] Diff of /trunk/src/compiler/parser/diderot.grm
Diff of /trunk/src/compiler/parser/diderot.grm
Parent Directory
|
Revision Log
|
Patch
21 |
| KW_int ("int") |
| KW_int ("int") |
22 |
| KW_kernel ("kernel") |
| KW_kernel ("kernel") |
23 |
| KW_new ("new") |
| KW_new ("new") |
24 |
|
| KW_output ("output") |
25 |
| KW_real ("real") |
| KW_real ("real") |
26 |
| KW_stabilize ("stabilize") |
| KW_stabilize ("stabilize") |
27 |
| KW_string ("string") |
| KW_string ("string") |
28 |
| KW_tensor ("tensor") |
| KW_tensor ("tensor") |
29 |
|
| KW_update ("update") |
30 |
| KW_vec2 ("vec2") |
| KW_vec2 ("vec2") |
31 |
| KW_vec3 ("vec3") |
| KW_vec3 ("vec3") |
32 |
| KW_vec4 ("vec4") |
| KW_vec4 ("vec4") |
134 |
(***** Actors *****) |
(***** Actors *****) |
135 |
|
|
136 |
ActorDecl |
ActorDecl |
137 |
: "actor" ID "(" Params ")" "{" VarDecl* ActorMethod+ "}" |
: "actor" ID "(" Params ")" "{" ActorStateDecl* ActorMethod+ "}" |
138 |
=> (markDecl(FULL_SPAN, PT.D_Actor{ |
=> (markDecl(FULL_SPAN, PT.D_Actor{ |
139 |
name = ID, params = Params, state = VarDecl, |
name = ID, params = Params, state = ActorStateDecl, |
140 |
methods = ActorMethod |
methods = ActorMethod |
141 |
})) |
})) |
142 |
; |
; |
151 |
=> (mark PT.P_Mark (FULL_SPAN, PT.P_Param(ValueType, ID))) |
=> (mark PT.P_Mark (FULL_SPAN, PT.P_Param(ValueType, ID))) |
152 |
; |
; |
153 |
|
|
154 |
|
ActorStateDecl |
155 |
|
: "output" VarDecl |
156 |
|
=> (true, mark PT.VD_Mark (FULL_SPAN, VarDecl)) |
157 |
|
| VarDecl |
158 |
|
=> (false, VarDecl) |
159 |
|
; |
160 |
|
|
161 |
ActorMethod |
ActorMethod |
162 |
: ID Block |
: MethodId Block |
163 |
=> (mark PT.M_Mark (FULL_SPAN, PT.M_Method(ID, Block))) |
=> (mark PT.M_Mark (FULL_SPAN, PT.M_Method(MethodId, Block))) |
164 |
|
; |
165 |
|
|
166 |
|
MethodId |
167 |
|
: "update" => (Atom.atom "update") |
168 |
|
| "stabilize" => (Atom.atom "stabilize") |
169 |
|
| ID => (ID) |
170 |
; |
; |
171 |
|
|
172 |
Block |
Block |
|
Legend:
Removed from v.163 |
|
changed lines |
|
Added in v.164 |
|
|