9 [repeat java_lang_stmt]
14 | [java_variable_decl]
17 | [EX] '{ [IN] [NL] [java_statements] [EX] '} [IN] [NL]
20 define java_variable_decl
21 [java_type_decl] [id] [opt union] '; [NL]
34 [java_term] [repeat java_expr_extend]
37 define java_expr_extend
38 [al_expr_op] [java_term]
43 | [id] [repeat java_dot_id]
44 | [id] [repeat java_dot_id] '( [java_args] ')
45 | 'new [java_type_decl] [union]
61 'if '( [java_expr] ') [NL] [IN]
83 redefine al_host_block
84 '{ [NL] [IN] [al_statements] [EX] '} [NL]
85 | '{ [NL] [IN] [java_statements] [EX] '} [NL]
88 function clearUnion Type [java_type_decl] Id [id]
91 import ArrayInits [java_statements]
92 Stmts [repeat java_lang_stmt]
94 Id '= 'new Type Union '; Stmts
100 replace [java_type_decl]
107 replace [al_type_decl]
113 function alStmtToJava1 AlStmt [action_lang_stmt]
115 VarDecl [al_variable_decl]
117 Type [al_type_decl] Id [id] OptUnion [opt union] ';
118 construct JavaType [java_type_decl]
120 construct Result [java_variable_decl]
121 JavaType [boolTypes] [ptrTypes] Id OptUnion [clearUnion JavaType Id] ';
122 replace [repeat java_lang_stmt]
127 function alExprExtendToJava AlExprExtend [repeat al_expr_extend]
128 deconstruct AlExprExtend
129 Op [al_expr_op] Term [al_term] Rest [repeat al_expr_extend]
130 construct JavaRest [repeat java_expr_extend]
131 _ [alExprExtendToJava Rest]
132 replace [repeat java_expr_extend]
137 function alExprToJava AlExpr [al_expr]
139 ALTerm [al_term] AlExprExtend [repeat al_expr_extend]
140 construct JavaExprExtend [repeat java_expr_extend]
141 _ [alExprExtendToJava AlExprExtend]
142 construct Result [opt java_expr]
143 ALTerm JavaExprExtend
144 replace [opt java_expr]
149 function alStmtToJava2 AlStmt [action_lang_stmt]
152 construct OptJavaExpr [opt java_expr]
153 _ [alExprToJava AlExpr]
154 deconstruct OptJavaExpr
156 replace [repeat java_lang_stmt]
161 function alOptElseJava AlOptElse [opt al_else]
162 deconstruct AlOptElse
164 AlSubStmt [action_lang_stmt]
165 construct AlSubStmts [repeat action_lang_stmt]
167 construct JavaSubStmts [repeat java_lang_stmt]
168 _ [alToJava AlSubStmts]
169 deconstruct JavaSubStmts
170 JavaSubStmt [java_lang_stmt]
171 replace [opt java_else]
177 function alStmtToJava3 AlStmt [action_lang_stmt]
179 'if '( AlExpr [al_expr] ')
180 AlSubStmt [action_lang_stmt]
181 AlOptElse [opt al_else]
182 construct OptJavaExpr [opt java_expr]
183 _ [alExprToJava AlExpr]
184 deconstruct OptJavaExpr
186 construct AlSubStmts [repeat action_lang_stmt]
188 construct JavaSubStmts [repeat java_lang_stmt]
189 _ [alToJava AlSubStmts]
190 deconstruct JavaSubStmts
191 JavaSubStmt [java_lang_stmt]
192 construct OptJavaElse [opt java_else]
193 _ [alOptElseJava AlOptElse]
194 replace [repeat java_lang_stmt]
201 function alStmtToJava4a AlStmt [action_lang_stmt]
204 replace [repeat java_lang_stmt]
206 'System '. 'out '. 'print '( Id ');
209 function alStmtToJava4b AlStmt [action_lang_stmt]
211 'prints String [stringlit] ';
212 replace [repeat java_lang_stmt]
214 'System '. 'out '. 'print '( String ');
217 function alStmtToJava5 AlStmt [action_lang_stmt]
219 '{ AlSubStmts [repeat action_lang_stmt] '}
220 construct JavaSubStmts [repeat java_lang_stmt]
221 _ [alToJava AlSubStmts]
222 replace [repeat java_lang_stmt]
227 function alStmtToJava6 AlStmt [action_lang_stmt]
229 RagelStmt [al_ragel_stmt]
230 replace [repeat java_lang_stmt]
236 function alToJava AlStmts [repeat action_lang_stmt]
238 FirstStmt [action_lang_stmt] Rest [repeat action_lang_stmt]
239 construct JavaFirst [repeat java_lang_stmt]
241 [alStmtToJava1 FirstStmt]
242 [alStmtToJava2 FirstStmt]
243 [alStmtToJava3 FirstStmt]
244 [alStmtToJava4a FirstStmt]
245 [alStmtToJava4b FirstStmt]
246 [alStmtToJava5 FirstStmt]
247 [alStmtToJava6 FirstStmt]
248 construct JavaRest [repeat java_lang_stmt]
250 replace [repeat java_lang_stmt]
252 JavaFirst [. JavaRest]
256 replace [al_host_block]
257 '{ AlStmts [repeat action_lang_stmt] '}
258 construct JavaStmts [repeat java_lang_stmt]
265 replace $ [machine_stmt]
267 import TXLargs [repeat stringlit]
268 Arg1 [stringlit] _ [repeat stringlit]
269 construct ClassName [id]
272 'machine ClassName ';
275 function langTransJava
277 Definitions [repeat action_lang_stmt]
279 Initializations [repeat action_lang_stmt]
281 construct JavaDefinitions [repeat java_lang_stmt]
282 _ [alToJava Definitions]
283 construct JavaInitializations [repeat java_lang_stmt]
284 _ [alToJava Initializations]
285 construct NewRagelDef [ragel_def]
286 RagelDef [actionTransJava] [machineName]
287 import ArrayInits [java_statements]
288 ArrayInitStmts [repeat java_lang_stmt]
292 ArrayInitStmts [. JavaInitializations]
299 export ArrayInits [java_statements]