12 | [EX] '{ [IN] [NL] [d_statements] [EX] '} [IN] [NL]
15 define d_variable_decl
16 [d_type_decl] [id] [opt union] '; [NL]
29 [d_term] [repeat d_expr_extend]
50 'if '( [d_expr] ') [NL] [IN]
72 redefine al_host_block
73 '{ [NL] [IN] [al_statements] [EX] '} [NL]
74 | '{ [NL] [IN] [d_statements] [EX] '} [NL]
84 function alStmtToD1 AlStmt [action_lang_stmt]
86 VarDecl [al_variable_decl]
88 Type [al_type_decl] Id [id] OptUnion [opt union] ';
89 construct DType [d_type_decl]
91 construct Result [d_variable_decl]
92 DType [ptrTypes] Id OptUnion ';
93 replace [repeat d_lang_stmt]
105 function alExprExtendToD AlExprExtend [repeat al_expr_extend]
106 deconstruct AlExprExtend
107 Op [al_expr_op] Term [al_term] Rest [repeat al_expr_extend]
108 construct DRest [repeat d_expr_extend]
109 _ [alExprExtendToD Rest]
110 replace [repeat d_expr_extend]
112 Op Term [alTermToD] DRest
115 function alExprToD AlExpr [al_expr]
117 ALTerm [al_term] AlExprExtend [repeat al_expr_extend]
118 construct DExprExtend [repeat d_expr_extend]
119 _ [alExprExtendToD AlExprExtend]
120 construct Result [opt d_expr]
121 ALTerm [alTermToD] DExprExtend
127 function alStmtToD2 AlStmt [action_lang_stmt]
130 construct OptDExpr [opt d_expr]
134 replace [repeat d_lang_stmt]
139 function alOptElseD AlOptElse [opt al_else]
140 deconstruct AlOptElse
142 AlSubStmt [action_lang_stmt]
143 construct AlSubStmts [repeat action_lang_stmt]
145 construct DSubStmts [repeat d_lang_stmt]
147 deconstruct DSubStmts
148 DSubStmt [d_lang_stmt]
155 function alStmtToD3 AlStmt [action_lang_stmt]
157 'if '( AlExpr [al_expr] ')
158 AlSubStmt [action_lang_stmt]
159 AlOptElse [opt al_else]
160 construct OptDExpr [opt d_expr]
164 construct AlSubStmts [repeat action_lang_stmt]
166 construct DSubStmts [repeat d_lang_stmt]
168 deconstruct DSubStmts
169 DSubStmt [d_lang_stmt]
170 construct OptDElse [opt d_else]
171 _ [alOptElseD AlOptElse]
172 replace [repeat d_lang_stmt]
179 function alStmtToD4a AlStmt [action_lang_stmt]
182 replace [repeat d_lang_stmt]
184 'writef '( '"%d" ', Id ') ';
187 function alStmtToD4b AlStmt [action_lang_stmt]
189 'prints String [stringlit] ';
190 replace [repeat d_lang_stmt]
192 'writef '( '"%s" ', String ') ';
195 function alStmtToD4c AlStmt [action_lang_stmt]
198 replace [repeat d_lang_stmt]
200 '_s '= Id '[0..pos] ';
201 'writef '( '"%s" ', '_s ') ';
204 function alStmtToD4d AlStmt [action_lang_stmt]
207 replace [repeat d_lang_stmt]
209 '_s '= ts '[0..(te-ts)] ';
210 'writef '( '"%s" ', '_s ') ';
213 function alStmtToD5 AlStmt [action_lang_stmt]
215 '{ AlSubStmts [repeat action_lang_stmt] '}
216 construct DSubStmts [repeat d_lang_stmt]
218 replace [repeat d_lang_stmt]
223 function alStmtToD6 AlStmt [action_lang_stmt]
225 RagelStmt [al_ragel_stmt]
226 replace [repeat d_lang_stmt]
231 function alToD AlStmts [repeat action_lang_stmt]
233 FirstStmt [action_lang_stmt] Rest [repeat action_lang_stmt]
234 construct DFirst [repeat d_lang_stmt]
236 [alStmtToD1 FirstStmt]
237 [alStmtToD2 FirstStmt]
238 [alStmtToD3 FirstStmt]
239 [alStmtToD4a FirstStmt]
240 [alStmtToD4b FirstStmt]
241 [alStmtToD4c FirstStmt]
242 [alStmtToD4d FirstStmt]
243 [alStmtToD5 FirstStmt]
244 [alStmtToD6 FirstStmt]
245 construct DRest [repeat d_lang_stmt]
247 replace [repeat d_lang_stmt]
253 replace [al_host_block]
254 '{ AlStmts [repeat action_lang_stmt] '}
255 construct DStmts [repeat d_lang_stmt]
263 Definitions [repeat action_lang_stmt]
265 Initializations [repeat action_lang_stmt]
267 construct DDefinitions [repeat d_lang_stmt]
268 _ [alToD Definitions]
269 construct DInitializations [repeat d_lang_stmt]
270 _ [alToD Initializations]
275 RagelDef [actionTransD]