11 *PCB test_pcbstruct SYNONYM P
18 ALL_STATES = [STATE_A, STATE_B, STATE_C]
20 *EVENTS { int ev_all; } SYNONYM E
22 EV_1 { char *ev1_char; }
23 EV_2 { int ev2_int; char ev2_char; }
25 EV_4 { struct blah *ev4_blahptr;
26 unsigned int ev4_uint;
32 SAME <== [ STATE_A, STATE_B ] [ EV_1, EV_2, EV_3 ]
35 if( $P.test_state == STATE_A )
36 printf("state is STATE_A\n");
38 printf("state is STATE_B\n");
39 printf("action first transition\n");
43 STATE_C <== [ STATE_A, STATE_B ] [ EV_1, EV_2, EV_3 ]
46 printf("default - transition 2\n");
47 MACRO1( $P.test_pcbfield );
51 STATE_C <== [ STATE_A, STATE_B ] EV_4
52 ( $$.ev4_blahptr->blahfield & 0x1 )
56 STATE_C <== ALL_STATES EV_4
59 printf("default - transition 4\n");
60 printf("pcb is 0x%x, event is 0x%x \n", $P, $E);
61 printf("ev4 values are : blahptr 0x%x uint 0x%x int 0x%x\n",
62 $$.ev4_blahptr, $$.ev4_uint, $$.ev4_int);