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

Add types test cases

parent 89bd5a4a
Subproject commit b1f0cd80a6e68b98cc31c74958d30ddb2c27dd70
Subproject commit 59a971440f0b96144d4910abefcfd6f698186c92
......@@ -2,7 +2,7 @@
 
# Resource object code
#
# Created: Fri Dec 18 13:38:02 2015
# Created: Mon Jan 4 10:55:39 2016
# by: The Resource Compiler for PySide (Qt v4.8.6)
#
# WARNING! All changes made in this file will be lost!
# $ANTLR 3.1.3 Mar 17, 2009 19:23:44 sdl92.g 2015-12-18 13:38:04
# $ANTLR 3.1.3 Mar 17, 2009 19:23:44 sdl92.g 2016-01-04 10:55:40
import sys
from antlr3 import *
......
# $ANTLR 3.1.3 Mar 17, 2009 19:23:44 sdl92.g 2015-12-18 13:38:03
# $ANTLR 3.1.3 Mar 17, 2009 19:23:44 sdl92.g 2016-01-04 10:55:40
 
import sys
from antlr3 import *
......@@ -31,6 +31,16 @@ MyOctStr ::= OCTET STRING (SIZE (3))
-- You can also declare variables (they will be visible in C, Ada and SDL)
myVar MySeqOf ::= { hello, world }
T1 ::= CHOICE {
replyToCommand CHOICE { cmd1 BOOLEAN, cmd2 SEQUENCE(SIZE(0..10)) OF BOOLEAN }
}
hello-t1 T1 ::= replyToCommand: cmd2: {}
T2 ::= SEQUENCE {
outputData T1
}
END
TASTE-BasicTypes DEFINITIONS ::=
......
/* CIF PROCESS (250, 150), (150, 75) */
PROCESS function1;
/* CIF TEXT (671, 54), (375, 197) */
/* CIF TEXT (785, 54), (375, 268) */
-- Declare your variables
-- Syntax: DCL <variable name> <type name>;
......@@ -10,26 +10,34 @@ DCL test MyInteger;
DCL c1 MyChoice;
DCL c2 MyChoice2;
dcl c3 T1 := replyToCommand: cmd2: {};
dcl c4 T2;
/* CIF ENDTEXT */
/* CIF START (320, 10), (70, 35) */
START;
/* CIF NEXTSTATE (319, 60), (72, 35) */
/* CIF TASK (209, 60), (291, 35) */
TASK c3 := replyToCommand: cmd2: {};
/* CIF TASK (161, 110), (387, 35) */
TASK c4!outputData := replyToCommand: cmd2: {};
/* CIF NEXTSTATE (319, 160), (72, 35) */
NEXTSTATE Wait;
/* CIF STATE (449, 10), (72, 35) */
/* CIF STATE (631, 10), (72, 35) */
STATE Wait;
/* CIF INPUT (432, 65), (105, 35) */
/* CIF INPUT (614, 65), (105, 35) */
INPUT pi1(test);
/* CIF PROCEDURECALL (411, 115), (146, 35) */
/* CIF PROCEDURECALL (594, 115), (146, 35) */
CALL Writeln(test);
/* CIF TASK (376, 165), (217, 35) */
/* CIF TASK (558, 165), (217, 35) */
TASK c1 := b:{a 1, b taste};
/* CIF PROCEDURECALL (396, 215), (176, 35) */
/* CIF PROCEDURECALL (579, 215), (176, 35) */
CALL Writeln(c1!b!a);
/* CIF TASK (380, 265), (209, 35) */
/* CIF TASK (562, 265), (209, 35) */
TASK c1 := c:{a 1, b taste};
/* CIF PROCEDURECALL (396, 315), (176, 35) */
/* CIF PROCEDURECALL (579, 315), (176, 35) */
CALL Writeln(c1!c!a);
/* CIF NEXTSTATE (448, 365), (72, 35) */
/* CIF NEXTSTATE (631, 365), (72, 35) */
NEXTSTATE Wait;
ENDSTATE;
ENDPROCESS function1;
\ No newline at end of file
Markdown is supported
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