12 | [EX] '{ [IN] [NL] [c_statements] [EX] '} [IN] [NL]
15 define c_variable_decl
16 [c_type_decl] [id] [opt union] '; [NL]
29 [c_term] [repeat c_expr_extend]
50 'if '( [c_expr] ') [NL] [IN]
72 redefine al_host_block
73 '{ [NL] [IN] [al_statements] [EX] '} [NL]
74 | '{ [NL] [IN] [c_statements] [EX] '} [NL]
78 replace [al_type_decl]
105 function alStmtToC1 AlStmt [action_lang_stmt]
107 VarDecl [al_variable_decl]
109 Type [al_type_decl] Id [id] OptUnion [opt union]';
110 construct CType [c_type_decl]
112 construct Result [c_variable_decl]
113 CType [boolTypes] [ptrTypes] Id OptUnion ';
114 replace [repeat c_lang_stmt]
119 function alExprExtendToC AlExprExtend [repeat al_expr_extend]
120 deconstruct AlExprExtend
121 Op [al_expr_op] Term [al_term] Rest [repeat al_expr_extend]
122 construct RestC [repeat c_expr_extend]
123 _ [alExprExtendToC Rest]
124 replace [repeat c_expr_extend]
129 function alExprToC AlExpr [al_expr]
131 ALTerm [al_term] AlExprExtend [repeat al_expr_extend]
132 construct CExprExtend [repeat c_expr_extend]
133 _ [alExprExtendToC AlExprExtend]
134 construct Result [opt c_expr]
138 Result [boolVals1] [boolVals2]
141 function alStmtToC2 AlStmt [action_lang_stmt]
144 construct OptCExpr [opt c_expr]
148 replace [repeat c_lang_stmt]
153 function alOptElseC AlOptElse [opt al_else]
154 deconstruct AlOptElse
156 AlSubStmt [action_lang_stmt]
157 construct AlSubStmts [repeat action_lang_stmt]
159 construct CSubStmts [repeat c_lang_stmt]
161 deconstruct CSubStmts
162 CSubStmt [c_lang_stmt]
169 function alStmtToC3 AlStmt [action_lang_stmt]
171 'if '( AlExpr [al_expr] ')
172 AlSubStmt [action_lang_stmt]
173 AlOptElse [opt al_else]
174 construct OptCExpr [opt c_expr]
178 construct AlSubStmts [repeat action_lang_stmt]
180 construct CSubStmts [repeat c_lang_stmt]
182 deconstruct CSubStmts
183 CSubStmt [c_lang_stmt]
184 construct OptCElse [opt c_else]
185 _ [alOptElseC AlOptElse]
186 replace [repeat c_lang_stmt]
193 function alStmtToC4a AlStmt [action_lang_stmt]
196 replace [repeat c_lang_stmt]
198 'printf '( '"%i" ', Id ');
201 function alStmtToC4b AlStmt [action_lang_stmt]
203 'prints String [stringlit] ';
204 replace [repeat c_lang_stmt]
206 'fputs '( String , 'stdout ');
209 function alStmtToC5 AlStmt [action_lang_stmt]
211 '{ AlSubStmts [repeat action_lang_stmt] '}
212 construct CSubStmts [repeat c_lang_stmt]
214 replace [repeat c_lang_stmt]
219 function alStmtToC6 AlStmt [action_lang_stmt]
221 RagelStmt [al_ragel_stmt]
222 replace [repeat c_lang_stmt]
227 function alToC AlStmts [repeat action_lang_stmt]
229 FirstStmt [action_lang_stmt] Rest [repeat action_lang_stmt]
230 construct FirstC [repeat c_lang_stmt]
232 [alStmtToC1 FirstStmt]
233 [alStmtToC2 FirstStmt]
234 [alStmtToC3 FirstStmt]
235 [alStmtToC4a FirstStmt]
236 [alStmtToC4b FirstStmt]
237 [alStmtToC5 FirstStmt]
238 [alStmtToC6 FirstStmt]
239 construct RestC [repeat c_lang_stmt]
241 replace [repeat c_lang_stmt]
247 replace [al_host_block]
248 '{ AlStmts [repeat action_lang_stmt] '}
249 construct CStmts [repeat c_lang_stmt]
257 Definitions [repeat action_lang_stmt]
259 Initializations [repeat action_lang_stmt]
261 construct CDefinitions [repeat c_lang_stmt]
262 _ [alToC Definitions]
263 construct CInitializations [repeat c_lang_stmt]
264 _ [alToC Initializations]
269 RagelDef [actionTransC]