Commit bc59f08a authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Added support for closed ranges in decision answers

parent 50e6c9c5
......@@ -1374,9 +1374,22 @@ def _decision(dec):
code.extend(stmt)
local_decl.extend(tr_decl)
sep = 'elsif '
elif a.kind == 'close_range':
elif a.kind == 'closed_range':
cl0_stmts, cl0_str, cl0_decl = expression(a.closedRange[0])
cl1_stmts, cl1_str, cl1_decl = expression(a.closedRange[1])
code.extend(cl0_stmts)
local_decl.extend(cl0_decl)
code.extend(cl1_stmts)
local_decl.extend(cl1_decl)
code.append('{sep} {dec} >= {cl0} and {dec} <= {cl1} then'
.format(sep=sep, dec=q_str, cl0=cl0_str, cl1=cl1_str))
if a.transition:
stmt, tr_decl = generate(a.transition)
else:
stmt, tr_decl = ['null;'], []
code.extend(stmt)
local_decl.extend(tr_decl)
sep = 'elsif '
# TODO support close_range
elif a.kind == 'informal_text':
continue
elif a.kind == 'else':
......
......@@ -2794,8 +2794,13 @@ def alternative_part(root, parent, context):
coord = True
elif child.type == lexer.CLOSED_RANGE:
ans.kind = 'closed_range'
ans.closedRange = [float(child.getChild(0).toString()),
float(child.getChild(1).toString())]
cl0, err0, warn0 = expression(child.getChild(0), context)
cl1, err1, warn1 = expression(child.getChild(1), context)
errors.extend(err0)
errors.extend(err1)
warnings.extend(warn0)
warnings.extend(warn1)
ans.closedRange = [cl0, cl1]
elif child.type == lexer.CONSTANT:
ans.kind = 'constant'
ans.constant, err, warn = expression(
......@@ -2896,23 +2901,43 @@ def decision(root, parent, context):
else:
warnings.append(['Unsupported DECISION child type: ' +
str(child.type), [dec.pos_x, dec.pos_y]])
# Make type checks to be sure that question and answers are compatible
for ans in dec.answers:
if ans.kind in ('constant', 'open_range'):
expr = ans.openRangeOp()
# Make type checks to be sure that question and answers are compatible
for ans in dec.answers:
if ans.kind in ('constant', 'open_range'):
expr = ans.openRangeOp()
expr.left = dec.question
expr.right = ans.constant
try:
fix_expression_types(expr, context)
if dec.question.exprType == UNKNOWN_TYPE:
dec.question = expr.left
ans.constant = expr.right
except (AttributeError, TypeError) as err:
errors.append('Types are incompatible in DECISION: '
'question (' + expr.left.inputString + ', type= ' +
type_name(expr.left.exprType) + '), answer (' +
expr.right.inputString + ', type= ' +
type_name(expr.right.exprType) + ') ' + str(err))
elif ans.kind == 'closed_range':
if not is_numeric(dec.question.exprType):
errors.append('Closed range are only for numerical types')
continue
for ast_type, idx in zip((ogAST.ExprGe, ogAST.ExprLe), (0, 1)):
expr = ast_type()
expr.left = dec.question
expr.right = ans.constant
expr.right = ans.closedRange[idx]
try:
fix_expression_types(expr, context)
if dec.question.exprType == UNKNOWN_TYPE:
dec.question = expr.left
ans.constant = expr.right
ans.closedRange[idx] = expr.right
except (AttributeError, TypeError) as err:
errors.append('Types are incompatible in DECISION: '
'question (' + expr.left.inputString + ', type= ' +
type_name(expr.left.exprType) + '), answer (' +
expr.right.inputString + ', type= ' +
type_name(expr.right.exprType) + ') ' + str(err))
return dec, errors, warnings
......
......@@ -670,7 +670,7 @@ range_condition
closed_range
: a=INT ':' b=INT
: a=expression ':' b=expression
-> ^(CLOSED_RANGE $a $b);
......
# $ANTLR 3.1.3 Mar 17, 2009 19:23:44 sdl92.g 2014-07-17 20:45:59
# $ANTLR 3.1.3 Mar 17, 2009 19:23:44 sdl92.g 2014-07-21 13:25:47
import sys
from antlr3 import *
......
# $ANTLR 3.1.3 Mar 17, 2009 19:23:44 sdl92.g 2014-07-17 20:45:58
# $ANTLR 3.1.3 Mar 17, 2009 19:23:44 sdl92.g 2014-07-21 13:25:45
 
import sys
from antlr3 import *
......@@ -510,6 +510,17 @@ class sdl92Parser(Parser):
transition = self.DFA113_transition
)
 
self.dfa119 = self.DFA119(
self, 119,
eot = self.DFA119_eot,
eof = self.DFA119_eof,
min = self.DFA119_min,
max = self.DFA119_max,
accept = self.DFA119_accept,
special = self.DFA119_special,
transition = self.DFA119_transition
)
self.dfa152 = self.DFA152(
self, 152,
eot = self.DFA152_eot,
......@@ -626,10 +637,10 @@ class sdl92Parser(Parser):
if LA1 == 217:
LA1_2 = self.input.LA(2)
 
if (LA1_2 == ANSWER or LA1_2 == COMMENT or LA1_2 == CONNECT or LA1_2 == DECISION or LA1_2 == INPUT or (JOIN <= LA1_2 <= LABEL) or LA1_2 == NEXTSTATE or LA1_2 == OUTPUT or (PROCEDURE <= LA1_2 <= PROCEDURE_CALL) or (PROCESS <= LA1_2 <= PROVIDED) or LA1_2 == RETURN or LA1_2 == STATE or LA1_2 == STOP or LA1_2 == TASK or LA1_2 == TEXT or LA1_2 == START) :
alt1 = 3
elif (LA1_2 == KEEP) :
if (LA1_2 == KEEP) :
alt1 = 1
elif (LA1_2 == ANSWER or LA1_2 == COMMENT or LA1_2 == CONNECT or LA1_2 == DECISION or LA1_2 == INPUT or (JOIN <= LA1_2 <= LABEL) or LA1_2 == NEXTSTATE or LA1_2 == OUTPUT or (PROCEDURE <= LA1_2 <= PROCEDURE_CALL) or (PROCESS <= LA1_2 <= PROVIDED) or LA1_2 == RETURN or LA1_2 == STATE or LA1_2 == STOP or LA1_2 == TASK or LA1_2 == TEXT or LA1_2 == START) :
alt1 = 3
 
 
elif LA1 == USE:
......@@ -814,7 +825,7 @@ class sdl92Parser(Parser):
stream_end.add(end10.tree)
 
# AST Rewrite
# elements: system_name, entity_in_system, SYSTEM
# elements: SYSTEM, system_name, entity_in_system
# token labels:
# rule labels: retval
# token list labels:
......@@ -942,7 +953,7 @@ class sdl92Parser(Parser):
stream_end.add(end14.tree)
 
# AST Rewrite
# elements: package_name, use_asn1, USE
# elements: USE, use_asn1, package_name
# token labels:
# rule labels: retval
# token list labels:
......@@ -1035,10 +1046,10 @@ class sdl92Parser(Parser):
if LA5 == 217:
LA5_1 = self.input.LA(2)
 
if (LA5_1 == ANSWER or LA5_1 == COMMENT or LA5_1 == CONNECT or LA5_1 == DECISION or LA5_1 == INPUT or (JOIN <= LA5_1 <= LABEL) or LA5_1 == NEXTSTATE or LA5_1 == OUTPUT or (PROCEDURE <= LA5_1 <= PROCEDURE_CALL) or (PROCESS <= LA5_1 <= PROVIDED) or LA5_1 == RETURN or LA5_1 == STATE or LA5_1 == STOP or LA5_1 == TASK or LA5_1 == TEXT or LA5_1 == START) :
alt5 = 2
elif (LA5_1 == KEEP) :
if (LA5_1 == KEEP) :
alt5 = 1
elif (LA5_1 == ANSWER or LA5_1 == COMMENT or LA5_1 == CONNECT or LA5_1 == DECISION or LA5_1 == INPUT or (JOIN <= LA5_1 <= LABEL) or LA5_1 == NEXTSTATE or LA5_1 == OUTPUT or (PROCEDURE <= LA5_1 <= PROCEDURE_CALL) or (PROCESS <= LA5_1 <= PROVIDED) or LA5_1 == RETURN or LA5_1 == STATE or LA5_1 == STOP or LA5_1 == TASK or LA5_1 == TEXT or LA5_1 == START) :
alt5 = 2
else:
if self._state.backtracking > 0:
raise BacktrackingFailed
......@@ -1226,7 +1237,7 @@ class sdl92Parser(Parser):
stream_end.add(end23.tree)
 
# AST Rewrite
# elements: SIGNAL, input_params, signal_id, paramnames
# elements: input_params, SIGNAL, signal_id, paramnames
# token labels:
# rule labels: retval
# token list labels:
......@@ -1380,7 +1391,7 @@ class sdl92Parser(Parser):
stream_end.add(end28.tree)
 
# AST Rewrite
# elements: route, CHANNEL, channel_id
# elements: channel_id, route, CHANNEL
# token labels:
# rule labels: retval
# token list labels:
......@@ -1550,7 +1561,7 @@ class sdl92Parser(Parser):
stream_end.add(end37.tree)
 
# AST Rewrite
# elements: dest_id, signal_id, source_id
# elements: signal_id, source_id, dest_id
# token labels:
# rule labels: retval
# token list labels:
......@@ -1700,7 +1711,7 @@ class sdl92Parser(Parser):
stream_end.add(end43.tree)
 
# AST Rewrite
# elements: entity_in_block, BLOCK, block_id
# elements: block_id, BLOCK, entity_in_block
# token labels:
# rule labels: retval
# token list labels:
......@@ -2272,7 +2283,7 @@ class sdl92Parser(Parser):
stream_end.add(end61.tree)
 
# AST Rewrite
# elements: process_id, number_of_instances, PROCESS, REFERENCED
# elements: PROCESS, REFERENCED, process_id, number_of_instances
# token labels:
# rule labels: retval
# token list labels:
......@@ -2474,7 +2485,7 @@ class sdl92Parser(Parser):
stream_end.add(end73.tree)
 
# AST Rewrite
# elements: PROCESS, text_area, process_id, cif, composite_state, number_of_instances, end, procedure, processBody
# elements: cif, end, PROCESS, process_id, composite_state, text_area, number_of_instances, procedure, processBody
# token labels:
# rule labels: retval
# token list labels:
......@@ -2805,7 +2816,7 @@ class sdl92Parser(Parser):
stream_end.add(end85.tree)
 
# AST Rewrite
# elements: end, PROCEDURE, EXTERNAL, procedure, text_area, processBody, fpar, procedure_id, cif
# elements: text_area, processBody, end, procedure, procedure_id, PROCEDURE, EXTERNAL, fpar, cif
# token labels:
# rule labels: retval
# token list labels:
......@@ -2978,7 +2989,7 @@ class sdl92Parser(Parser):
stream_end.add(end90.tree)
 
# AST Rewrite
# elements: formal_variable_param, FPAR
# elements: FPAR, formal_variable_param
# token labels:
# rule labels: retval
# token list labels:
......@@ -3142,7 +3153,7 @@ class sdl92Parser(Parser):
stream_sort.add(sort96.tree)
 
# AST Rewrite
# elements: variable_id, sort, INOUT, IN
# elements: sort, IN, variable_id, INOUT
# token labels:
# rule labels: retval
# token list labels:
......@@ -3284,7 +3295,7 @@ class sdl92Parser(Parser):
stream_cif_end_text.add(cif_end_text99.tree)
 
# AST Rewrite
# elements: content, cif, cif_end_text
# elements: cif, content, cif_end_text
# token labels:
# rule labels: retval
# token list labels:
......@@ -3472,7 +3483,7 @@ class sdl92Parser(Parser):
break #loop30
 
# AST Rewrite
# elements: synonym_definition, fpar, timer_declaration, newtype_definition, variable_definition, procedure, syntype_definition
# elements: procedure, variable_definition, syntype_definition, fpar, synonym_definition, timer_declaration, newtype_definition
# token labels:
# rule labels: retval
# token list labels:
......@@ -3857,7 +3868,7 @@ class sdl92Parser(Parser):
stream_end.add(end122.tree)
 
# AST Rewrite
# elements: syntype_name, SYNTYPE, range_condition, parent_sort
# elements: range_condition, SYNTYPE, parent_sort, syntype_name
# token labels:
# rule labels: retval
# token list labels:
......@@ -4142,7 +4153,7 @@ class sdl92Parser(Parser):
stream_end.add(end131.tree)
 
# AST Rewrite
# elements: array_definition, NEWTYPE, structure_definition, type_name
# elements: array_definition, type_name, structure_definition, NEWTYPE
# token labels:
# rule labels: retval
# token list labels:
......@@ -4431,7 +4442,7 @@ class sdl92Parser(Parser):
stream_end.add(end141.tree)
 
# AST Rewrite
# elements: field_list, STRUCT
# elements: STRUCT, field_list
# token labels:
# rule labels: retval
# token list labels:
......@@ -4678,7 +4689,7 @@ class sdl92Parser(Parser):
stream_sort.add(sort148.tree)
 
# AST Rewrite
# elements: field_name, sort
# elements: sort, field_name
# token labels:
# rule labels: retval
# token list labels:
......@@ -4818,7 +4829,7 @@ class sdl92Parser(Parser):
stream_end.add(end153.tree)
 
# AST Rewrite
# elements: DCL, variables_of_sort
# elements: variables_of_sort, DCL
# token labels:
# rule labels: retval
# token list labels:
......@@ -5131,7 +5142,7 @@ class sdl92Parser(Parser):
stream_ground_expression.add(ground_expression163.tree)
 
# AST Rewrite
# elements: sort, ground_expression, sort
# elements: ground_expression, sort, sort
# token labels:
# rule labels: retval
# token list labels:
......@@ -5285,7 +5296,7 @@ class sdl92Parser(Parser):
 
 
# AST Rewrite
# elements: variable_id, ground_expression, sort
# elements: ground_expression, sort, variable_id
# token labels:
# rule labels: retval
# token list labels:
......@@ -5770,7 +5781,7 @@ class sdl92Parser(Parser):
 
 
# AST Rewrite
# elements: cif, transition, name, hyperlink, START, end
# elements: end, transition, START, cif, name, hyperlink
# token labels:
# rule labels: retval, name
# token list labels:
......@@ -6007,7 +6018,7 @@ class sdl92Parser(Parser):
stream_SEMI.add(SEMI190)
 
# AST Rewrite
# elements: transition, hyperlink, cif, connector_name
# elements: connector_name, cif, transition, hyperlink
# token labels:
# rule labels: retval
# token list labels:
......@@ -6231,7 +6242,7 @@ class sdl92Parser(Parser):
stream_end.add(f.tree)
 
# AST Rewrite
# elements: state_part, hyperlink, STATE, cif, statelist, e
# elements: hyperlink, statelist, cif, state_part, e, STATE
# token labels:
# rule labels: retval, e
# token list labels:
......@@ -6476,7 +6487,7 @@ class sdl92Parser(Parser):
 
 
# AST Rewrite
# elements: exception_state, ASTERISK
# elements: ASTERISK, exception_state
# token labels:
# rule labels: retval
# token list labels:
......@@ -6785,7 +6796,7 @@ class sdl92Parser(Parser):
stream_end.add(f.tree)
 
# AST Rewrite
# elements: statename, e, connection_points, body
# elements: e, statename, connection_points, body
# token labels:
# rule labels: body, retval, e
# token list labels:
......@@ -6934,7 +6945,7 @@ class sdl92Parser(Parser):
stream_end.add(end216.tree)
 
# AST Rewrite
# elements: IN, end, state_entry_exit_points
# elements: state_entry_exit_points, IN, end
# token labels:
# rule labels: retval
# token list labels:
......@@ -6991,7 +7002,7 @@ class sdl92Parser(Parser):
stream_end.add(end219.tree)
 
# AST Rewrite
# elements: state_entry_exit_points, end, OUT
# elements: OUT, state_entry_exit_points, end
# token labels:
# rule labels: retval
# token list labels:
......@@ -7585,7 +7596,7 @@ class sdl92Parser(Parser):
 
 
# AST Rewrite
# elements: end, CONNECT, transition, hyperlink, connect_list, cif
# elements: transition, end, connect_list, CONNECT, hyperlink, cif
# token labels:
# rule labels: retval
# token list labels:
......@@ -7935,7 +7946,7 @@ class sdl92Parser(Parser):
stream_transition.add(transition252.tree)
 
# AST Rewrite
# elements: transition, cif, hyperlink
# elements: transition, hyperlink, cif
# token labels:
# rule labels: retval
# token list labels:
......@@ -8048,7 +8059,7 @@ class sdl92Parser(Parser):
stream_end.add(end255.tree)
 
# AST Rewrite
# elements: expression, PROVIDED
# elements: PROVIDED, expression
# token labels:
# rule labels: retval
# token list labels:
......@@ -8190,7 +8201,7 @@ class sdl92Parser(Parser):
stream_transition.add(transition261.tree)
 
# AST Rewrite
# elements: integer_literal_name, transition, PROVIDED, expression
# elements: PROVIDED, transition, expression, integer_literal_name
# token labels: integer_literal_name
# rule labels: retval
# token list labels:
......@@ -8806,7 +8817,7 @@ class sdl92Parser(Parser):
 
 
# AST Rewrite
# elements: INPUT, end, inputlist, hyperlink, enabling_condition, cif, transition
# elements: transition, enabling_condition, cif, inputlist, end, hyperlink, INPUT
# token labels:
# rule labels: retval
# token list labels:
......@@ -9357,7 +9368,7 @@ class sdl92Parser(Parser):
 
 
# AST Rewrite
# elements: label, terminator_statement, action
# elements: action, label, terminator_statement
# token labels:
# rule labels: retval
# token list labels:
......@@ -9915,7 +9926,7 @@ class sdl92Parser(Parser):
stream_end.add(end316.tree)
 
# AST Rewrite
# elements: end, cif, procedure_call_body, hyperlink
# elements: cif, end, procedure_call_body, hyperlink
# token labels:
# rule labels: retval
# token list labels:
......@@ -10309,7 +10320,7 @@ class sdl92Parser(Parser):
stream_R_PAREN.add(R_PAREN328)
 
# AST Rewrite
# elements: timer_id, expression
# elements: expression, timer_id
# token labels:
# rule labels: retval
# token list labels:
......@@ -10706,7 +10717,7 @@ class sdl92Parser(Parser):
stream_end.add(f.tree)
 
# AST Rewrite
# elements: ALTERNATIVE, answer_part, alternative_part
# elements: alternative_part, ALTERNATIVE, answer_part
# token labels:
# rule labels: retval
# token list labels:
......@@ -10846,7 +10857,7 @@ class sdl92Parser(Parser):
 
 
# AST Rewrite
# elements: answer_part, else_part
# elements: else_part, answer_part
# token labels:
# rule labels: retval
# token list labels:
......@@ -11199,7 +11210,7 @@ class sdl92Parser(Parser):
stream_end.add(f.tree)
 
# AST Rewrite
# elements: hyperlink, cif, DECISION, alternative_part, answer_part, question, e
# elements: e, alternative_part, cif, DECISION, hyperlink, answer_part, question
# token labels:
# rule labels: retval, e
# token list labels:
......@@ -11402,7 +11413,7 @@ class sdl92Parser(Parser):
 
 
# AST Rewrite
# elements: answer, cif, transition, hyperlink
# elements: answer, transition, cif, hyperlink
# token labels:
# rule labels: retval
# token list labels:
......@@ -11675,7 +11686,7 @@ class sdl92Parser(Parser):
 
 
# AST Rewrite
# elements: hyperlink, transition, cif, ELSE
# elements: ELSE, transition, hyperlink, cif
# token labels:
# rule labels: retval
# token list labels:
......@@ -11970,33 +11981,7 @@ class sdl92Parser(Parser):
 
# sdl92.g:668:17: ( closed_range | open_range )
alt119 = 2
LA119_0 = self.input.LA(1)
if (LA119_0 == INT) :
LA119_1 = self.input.LA(2)
if (LA119_1 == 212) :
alt119 = 1
elif (LA119_1 == EOF or LA119_1 == ENDSYNTYPE or LA119_1 == IN or LA119_1 == AND or LA119_1 == ASTERISK or (R_PAREN <= LA119_1 <= COMMA) or (EQ <= LA119_1 <= GE) or (IMPLIES <= LA119_1 <= REM)) :
alt119 = 2
else:
if self._state.backtracking > 0:
raise BacktrackingFailed
nvae = NoViableAltException("", 119, 1, self.input)
raise nvae
elif (LA119_0 == BITSTR or LA119_0 == FLOAT or LA119_0 == IF or LA119_0 == OCTSTR or LA119_0 == STRING or LA119_0 == L_PAREN or (EQ <= LA119_0 <= GE) or LA119_0 == ID or LA119_0 == DASH or (NOT <= LA119_0 <= MINUS_INFINITY) or LA119_0 == L_BRACKET) :
alt119 = 2
else:
if self._state.backtracking > 0:
raise BacktrackingFailed
nvae = NoViableAltException("", 119, 0, self.input)
raise nvae
alt119 = self.dfa119.predict(self.input)
if alt119 == 1:
# sdl92.g:668:18: closed_range
pass
......@@ -12052,7 +12037,7 @@ class sdl92Parser(Parser):
 
 
# $ANTLR start "closed_range"
# sdl92.g:672:1: closed_range : a= INT ':' b= INT -> ^( CLOSED_RANGE $a $b) ;
# sdl92.g:672:1: closed_range : a= expression ':' b= expression -> ^( CLOSED_RANGE $a $b) ;
def closed_range(self, ):
 
retval = self.closed_range_return()
......@@ -12060,43 +12045,46 @@ class sdl92Parser(Parser):
 
root_0 = None
 
char_literal374 = None
a = None
b = None
char_literal374 = None
 
a_tree = None
b_tree = None
char_literal374_tree = None
stream_212 = RewriteRuleTokenStream(self._adaptor, "token 212")
stream_INT = RewriteRuleTokenStream(self._adaptor, "token INT")
stream_expression = RewriteRuleSubtreeStream(self._adaptor, "rule expression")
try:
try:
# sdl92.g:673:9: (a= INT ':' b= INT -> ^( CLOSED_RANGE $a $b) )
# sdl92.g:673:17: a= INT ':' b= INT
# sdl92.g:673:9: (a= expression ':' b= expression -> ^( CLOSED_RANGE $a $b) )
# sdl92.g:673:17: a= expression ':' b= expression
pass
a=self.match(self.input, INT, self.FOLLOW_INT_in_closed_range7759)
self._state.following.append(self.FOLLOW_expression_in_closed_range7759)
a = self.expression()
self._state.following.pop()
if self._state.backtracking == 0:
stream_INT.add(a)
stream_expression.add(a.tree)
char_literal374=self.match(self.input, 212, self.FOLLOW_212_in_closed_range7761)
if self._state.backtracking == 0:
stream_212.add(char_literal374)
b=self.match(self.input, INT, self.FOLLOW_INT_in_closed_range7765)
self._state.following.append(self.FOLLOW_expression_in_closed_range7765)
b = self.expression()
self._state.following.pop()
if self._state.backtracking == 0:
stream_INT.add(b)
stream_expression.add(b.tree)
 
# AST Rewrite
# elements: b, a
# token labels: b, a
# rule labels: retval
# token labels:
# rule labels: retval, b, a
# token list labels:
# rule list labels:
# wildcard labels:
if self._state.backtracking == 0:
 
retval.tree = root_0
stream_b = RewriteRuleTokenStream(self._adaptor, "token b", b)
stream_a = RewriteRuleTokenStream(self._adaptor, "token a", a)
 
if retval is not None:
stream_retval = RewriteRuleSubtreeStream(self._adaptor, "rule retval", retval.tree)
......@@ -12104,14 +12092,26 @@ class sdl92Parser(Parser):
stream_retval = RewriteRuleSubtreeStream(self._adaptor, "token retval", None)
 
 
if b is not None:
stream_b = RewriteRuleSubtreeStream(self._adaptor, "rule b", b.tree)
else:
stream_b = RewriteRuleSubtreeStream(self._adaptor, "token b", None)
if a is not None:
stream_a = RewriteRuleSubtreeStream(self._adaptor, "rule a", a.tree)
else:
stream_a = RewriteRuleSubtreeStream(self._adaptor, "token a", None)
root_0 = self._adaptor.nil()
# 674:9: -> ^( CLOSED_RANGE $a $b)
# sdl92.g:674:17: ^( CLOSED_RANGE $a $b)
root_1 = self._adaptor.nil()
root_1 = self._adaptor.becomeRoot(self._adaptor.createFromType(CLOSED_RANGE, "CLOSED_RANGE"), root_1)
 
self._adaptor.addChild(root_1, stream_a.nextNode())
self._adaptor.addChild(root_1, stream_b.nextNode())
self._adaptor.addChild(root_1, stream_a.nextTree())
self._adaptor.addChild(root_1, stream_b.nextTree())
 
self._adaptor.addChild(root_0, root_1)
 
......@@ -12325,7 +12325,7 @@ class sdl92Parser(Parser):
 
 
# AST Rewrite
# elements: GE, LE, LT, constant, EQ, GT, NEQ
# elements: LE, constant, GE, NEQ, LT, GT, EQ
# token labels:
# rule labels: retval
# token list labels:
......@@ -12568,7 +12568,7 @@ class sdl92Parser(Parser):
stream_end.add(end387.tree)
 
# AST Rewrite
# elements: CREATE, actual_parameters, createbody
# elements: createbody, CREATE, actual_parameters
# token labels:
# rule labels: retval
# token list labels:
......@@ -12807,7 +12807,7 @@ class sdl92Parser(Parser):
stream_end.add(end394.tree)
 
# AST Rewrite
# elements: OUTPUT, end, hyperlink, cif, outputbody
# elements: cif, hyperlink, end, OUTPUT, outputbody
# token labels:
# rule labels: retval
# token list labels:
......@@ -12962,7 +12962,7 @@ class sdl92Parser(Parser):
 
 
# AST Rewrite
# elements: to_part, outputstmt
# elements: outputstmt, to_part
# token labels: