Commit 46c55074 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Change type names

parent 8fa9325a
......@@ -13,8 +13,8 @@ SeqBoolFix ::= SEQUENCE (SIZE(2)) OF BOOLEAN
SeqEnum ::= SEQUENCE (SIZE(1..5)) OF ENUMERATED { hello, world }
SeqEnumFix ::= SEQUENCE (SIZE(2)) OF ENUMERATED { hello, world }
Enum ::= ENUMERATED {a, b, c, d, eE}
Choice ::= CHOICE {c1 BOOLEAN, cDe2 BOOLEAN}
MyEnum ::= ENUMERATED {a, b, c, d, eE}
MyChoice ::= CHOICE {c1 BOOLEAN, cDe2 BOOLEAN}
SeqOpt ::= SEQUENCE { a BOOLEAN OPTIONAL , b BOOLEAN, c SEQUENCE { a BOOLEAN } OPTIONAL, d OCTET STRING (SIZE (0..10)) OPTIONAL}
SeqNonOpt ::= SEQUENCE { a BOOLEAN }
......
......@@ -15,11 +15,11 @@ dcl seqen SeqEnum := { hello, world };
dcl seqen2 SeqEnumFix := { hello, world };
dcl myenum Enum := a;
dcl myenum MyEnum := a;
dcl check tasTE_Peek_id;
dcl choice choice;
dcl choice Mychoice;
dcl opt SeqOpt := { A TRUE, b FALSE }; -- test optional fields
/* CIF ENDTEXT */
......@@ -34,10 +34,10 @@ dcl opt SeqOpt := { A TRUE, b FALSE }; -- test optional fields
ENDDECISION;
/* CIF DECISION (135, 240), (122, 50) */
DECISION num(myenum);
/* CIF ANSWER (163, 310), (70, 23) */
/* CIF ANSWER (163, 280), (70, 23) */
else:
ENDDECISION;
/* CIF RETURN (178, 348), (35, 35) */
/* CIF RETURN (178, 318), (35, 35) */
RETURN ;
ENDPROCEDURE;
/* CIF PROCEDURE (727, 175), (106, 35) */
......@@ -58,98 +58,98 @@ dcl opt SeqOpt := { A TRUE, b FALSE }; -- test optional fields
ENDDECISION;
/* CIF DECISION (481, 433), (122, 50) */
DECISION num(myenum);
/* CIF ANSWER (460, 503), (70, 23) */
/* CIF ANSWER (460, 473), (70, 23) */
(0):
/* CIF ANSWER (550, 503), (70, 23) */
/* CIF ANSWER (550, 473), (70, 23) */
else:
ENDDECISION;
/* CIF DECISION (492, 541), (99, 50) */
/* CIF DECISION (492, 511), (99, 50) */
DECISION 'informal'
/* CIF COMMENT (611, 533), (179, 53) */
/* CIF COMMENT (611, 473), (179, 53) */
COMMENT 'Informal decision -
check that it is ignored
by the code generator';
/* CIF ANSWER (462, 611), (70, 33) */
/* CIF ANSWER (462, 551), (70, 33) */
('a'):
/* CIF ANSWER (550, 611), (70, 33) */
/* CIF ANSWER (550, 551), (70, 33) */
('2'):
ENDDECISION;
/* CIF TASK (430, 659), (223, 38) */
/* CIF TASK (430, 599), (223, 38) */
TASK seqboolean := {true, false},
seqboolean := not {true, false};
/* CIF TASK (438, 712), (208, 83) */
/* CIF TASK (438, 652), (208, 83) */
TASK for x in seqen:
call writeln(num(x));
call writeln(num(myenum));
call writeln(num(myenum));
endfor
/* CIF COMMENT (666, 736), (174, 38) */
/* CIF COMMENT (666, 676), (174, 38) */
COMMENT 'Check that num is not
declared twice';
/* CIF TASK (460, 810), (164, 53) */
/* CIF TASK (460, 750), (164, 53) */
TASK for x in seqen2:
call writeln(num(x));
endfor;
/* CIF TASK (461, 878), (162, 53) */
/* CIF TASK (461, 818), (162, 53) */
TASK for x in seqboolean:
call writeln(x);
endfor
/* CIF COMMENT (643, 887), (168, 38) */
/* CIF COMMENT (643, 827), (168, 38) */
COMMENT 'FOR with a basic type';
/* CIF TASK (431, 946), (222, 35) */
/* CIF TASK (431, 886), (222, 35) */
TASK seqboolean := not seqboolean
/* CIF COMMENT (673, 946), (279, 35) */
/* CIF COMMENT (673, 886), (279, 35) */
COMMENT 'check NOT on a SEQUENCE of BOOLEAN';
/* CIF TASK (461, 996), (162, 53) */
/* CIF TASK (461, 936), (162, 53) */
TASK for x in seqboolean:
call writeln(x);
endfor;
/* CIF TASK (479, 1064), (126, 38) */
/* CIF TASK (479, 1004), (126, 38) */
TASK fixed := 'hello';
/* CIF TASK (467, 1117), (149, 35) */
/* CIF TASK (467, 1057), (149, 35) */
TASK variable := 'HELLO';
/* CIF PROCEDURECALL (454, 1167), (176, 35) */
/* CIF PROCEDURECALL (454, 1107), (176, 35) */
CALL writeln(variable // '!!!');
/* CIF PROCEDURECALL (406, 1217), (272, 35) */
/* CIF PROCEDURECALL (406, 1157), (272, 35) */
CALL writeln(variable // variable // variable);
/* CIF TASK (496, 1267), (91, 35) */
/* CIF TASK (496, 1207), (91, 35) */
TASK seq := {1};
/* CIF TASK (465, 1317), (153, 35) */
/* CIF TASK (465, 1257), (153, 35) */
TASK seq := {1} // {2} // {3};
/* CIF TASK (456, 1367), (172, 35) */
/* CIF TASK (456, 1307), (172, 35) */
TASK seq := seq // {2} // {1};
/* CIF DECISION (507, 1417), (70, 50) */
/* CIF DECISION (507, 1357), (70, 50) */
DECISION any;
/* CIF ANSWER (462, 1487), (70, 23) */
/* CIF ANSWER (462, 1427), (70, 23) */
('a'):
/* CIF ANSWER (552, 1487), (70, 23) */
/* CIF ANSWER (552, 1427), (70, 23) */
('b'):
ENDDECISION;
/* CIF DECISION (497, 1525), (89, 50) */
/* CIF DECISION (497, 1465), (89, 50) */
DECISION myenum
/* CIF COMMENT (606, 1532), (183, 35) */
/* CIF COMMENT (606, 1472), (183, 35) */
COMMENT 'Check case insensitivity';
/* CIF ANSWER (314, 1595), (70, 23) */
/* CIF ANSWER (314, 1535), (70, 23) */
(a):
/* CIF ANSWER (394, 1595), (70, 23) */
/* CIF ANSWER (394, 1535), (70, 23) */
(B):
/* CIF ANSWER (474, 1595), (70, 23) */
/* CIF ANSWER (474, 1535), (70, 23) */
(c):
/* CIF ANSWER (552, 1595), (70, 23) */
/* CIF ANSWER (552, 1535), (70, 23) */
(d):
/* CIF ANSWER (640, 1595), (70, 23) */
/* CIF ANSWER (640, 1535), (70, 23) */
(Ee):
ENDDECISION;
/* CIF DECISION (473, 1633), (138, 50) */
/* CIF DECISION (473, 1573), (138, 50) */
DECISION present(choice)
/* CIF COMMENT (630, 1640), (183, 35) */
/* CIF COMMENT (630, 1580), (183, 35) */
COMMENT 'Check case insensitivity';
/* CIF ANSWER (425, 1703), (70, 23) */
/* CIF ANSWER (425, 1643), (70, 23) */
(cde2):
/* CIF ANSWER (596, 1703), (70, 23) */
/* CIF ANSWER (596, 1643), (70, 23) */
ELSE:
ENDDECISION;
/* CIF NEXTSTATE (483, 1741), (116, 33) */
/* CIF NEXTSTATE (483, 1681), (116, 33) */
NEXTSTATE Wait_for_GUI;
/* CIF STATE (438, 163), (116, 33) */
STATE Wait_for_GUI;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment