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]
98 function alExprExtendToD AlExprExtend [repeat al_expr_extend]
99 deconstruct AlExprExtend
100 Op [al_expr_op] Term [al_term] Rest [repeat al_expr_extend]
101 construct DRest [repeat d_expr_extend]
102 _ [alExprExtendToD Rest]
103 replace [repeat d_expr_extend]
108 function alExprToD AlExpr [al_expr]
110 ALTerm [al_term] AlExprExtend [repeat al_expr_extend]
111 construct DExprExtend [repeat d_expr_extend]
112 _ [alExprExtendToD AlExprExtend]
113 construct Result [opt d_expr]
120 function alStmtToD2 AlStmt [action_lang_stmt]
123 construct OptDExpr [opt d_expr]
127 replace [repeat d_lang_stmt]
132 function alOptElseD AlOptElse [opt al_else]
133 deconstruct AlOptElse
135 AlSubStmt [action_lang_stmt]
136 construct AlSubStmts [repeat action_lang_stmt]
138 construct DSubStmts [repeat d_lang_stmt]
140 deconstruct DSubStmts
141 DSubStmt [d_lang_stmt]
148 function alStmtToD3 AlStmt [action_lang_stmt]
150 'if '( AlExpr [al_expr] ')
151 AlSubStmt [action_lang_stmt]
152 AlOptElse [opt al_else]
153 construct OptDExpr [opt d_expr]
157 construct AlSubStmts [repeat action_lang_stmt]
159 construct DSubStmts [repeat d_lang_stmt]
161 deconstruct DSubStmts
162 DSubStmt [d_lang_stmt]
163 construct OptDElse [opt d_else]
164 _ [alOptElseD AlOptElse]
165 replace [repeat d_lang_stmt]
172 function alStmtToD4a AlStmt [action_lang_stmt]
175 replace [repeat d_lang_stmt]
177 'writef '( '"%d" ', Id ') ';
180 function alStmtToD4b AlStmt [action_lang_stmt]
182 'prints String [stringlit] ';
183 replace [repeat d_lang_stmt]
185 'writef '( '"%s" ', String ') ';
188 function alStmtToD4c AlStmt [action_lang_stmt]
191 replace [repeat d_lang_stmt]
193 '_s '= Id '[0..pos] ';
194 'writef '( '"%s" ', '_s ') ';
197 function alStmtToD5 AlStmt [action_lang_stmt]
199 '{ AlSubStmts [repeat action_lang_stmt] '}
200 construct DSubStmts [repeat d_lang_stmt]
202 replace [repeat d_lang_stmt]
207 function alStmtToD6 AlStmt [action_lang_stmt]
209 RagelStmt [al_ragel_stmt]
210 replace [repeat d_lang_stmt]
215 function alToD AlStmts [repeat action_lang_stmt]
217 FirstStmt [action_lang_stmt] Rest [repeat action_lang_stmt]
218 construct DFirst [repeat d_lang_stmt]
220 [alStmtToD1 FirstStmt]
221 [alStmtToD2 FirstStmt]
222 [alStmtToD3 FirstStmt]
223 [alStmtToD4a FirstStmt]
224 [alStmtToD4b FirstStmt]
225 [alStmtToD4c FirstStmt]
226 [alStmtToD5 FirstStmt]
227 [alStmtToD6 FirstStmt]
228 construct DRest [repeat d_lang_stmt]
230 replace [repeat d_lang_stmt]
236 replace [al_host_block]
237 '{ AlStmts [repeat action_lang_stmt] '}
238 construct DStmts [repeat d_lang_stmt]
246 Definitions [repeat action_lang_stmt]
248 Initializations [repeat action_lang_stmt]
250 construct DDefinitions [repeat d_lang_stmt]
251 _ [alToD Definitions]
252 construct DInitializations [repeat d_lang_stmt]
253 _ [alToD Initializations]
258 RagelDef [actionTransD]