CKeywords.c 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695
  1. #include <stdlib.h>
  2. #include <string.h>
  3. #include "sc_types.h"
  4. #include "CKeywords.h"
  5. /*! \file Implementation of the state machine 'CKeywords'
  6. */
  7. /* prototypes of all internal functions */
  8. static sc_boolean cKeywords_check_auto_char_tr0_tr0(const CKeywords* handle);
  9. static void cKeywords_effect_auto_char_tr0(CKeywords* handle);
  10. static void cKeywords_enact_auto_char(CKeywords* handle);
  11. static void cKeywords_enact_auto_loop_switch_case_enum_asm(CKeywords* handle);
  12. static void cKeywords_enseq_auto_char_default(CKeywords* handle);
  13. static void cKeywords_enseq_auto_loop_default(CKeywords* handle);
  14. static void cKeywords_enseq_auto_loop_switch_case_default(CKeywords* handle);
  15. static void cKeywords_enseq_auto_loop_switch_case_enum_asm_default(CKeywords* handle);
  16. static void cKeywords_enseq_auto_default(CKeywords* handle);
  17. static void cKeywords_enseq_auto_loop_switch_default(CKeywords* handle);
  18. static void cKeywords_shenseq_auto_loop_switch(CKeywords* handle);
  19. static void cKeywords_enseq_auto_loop_switch_case_enum_default(CKeywords* handle);
  20. static void cKeywords_dhenseq_auto_loop_switch_case_enum(CKeywords* handle);
  21. static void cKeywords_exseq_auto_char(CKeywords* handle);
  22. static void cKeywords_exseq_auto_loop_switch_case_enum_asm(CKeywords* handle);
  23. static void cKeywords_exseq_auto(CKeywords* handle);
  24. static void cKeywords_exseq_auto_loop_switch(CKeywords* handle);
  25. static void cKeywords_exseq_auto_loop_switch_case_enum(CKeywords* handle);
  26. static void cKeywords_react_auto_char(CKeywords* handle);
  27. static void cKeywords_react_auto_loop_switch_case_enum_asm(CKeywords* handle);
  28. static void cKeywords_react_auto__entry_Default(CKeywords* handle);
  29. static void cKeywords_react_auto_loop_switch__entry_Default(CKeywords* handle);
  30. static void cKeywords_react_auto_loop_switch_case_enum__entry_Default(CKeywords* handle);
  31. static void cKeywords_clearInEvents(CKeywords* handle);
  32. static void cKeywords_clearOutEvents(CKeywords* handle);
  33. void cKeywords_init(CKeywords* handle)
  34. {
  35. sc_integer i;
  36. for (i = 0; i < CKEYWORDS_MAX_ORTHOGONAL_STATES; ++i)
  37. {
  38. handle->stateConfVector[i] = CKeywords_last_state;
  39. }
  40. for (i = 0; i < CKEYWORDS_MAX_HISTORY_STATES; ++i)
  41. {
  42. handle->historyVector[i] = CKeywords_last_state;
  43. }
  44. handle->stateConfVectorPosition = 0;
  45. cKeywords_clearInEvents(handle);
  46. cKeywords_clearOutEvents(handle);
  47. /* Default init sequence for statechart CKeywords */
  48. handle->iface.case_ID = bool_false;
  49. handle->iface.do_ID = 0;
  50. handle->iface.continue_ID = bool_false;
  51. handle->iface.double_ID = bool_false;
  52. handle->iface.enum_ID = bool_false;
  53. handle->iface.extern_ID = bool_false;
  54. handle->iface.float_ID = bool_false;
  55. handle->iface.for_ID = bool_false;
  56. handle->iface.goto_ID = bool_false;
  57. handle->iface.if_ID = bool_false;
  58. handle->iface.int_ID = bool_false;
  59. handle->iface.long_ID = bool_false;
  60. handle->iface.register_ID = bool_false;
  61. handle->iface.return_ID = bool_false;
  62. handle->iface.short_ID = bool_false;
  63. handle->iface.signed_ID = bool_false;
  64. handle->iface.sizeof_ID = bool_false;
  65. handle->iface.static_ID = bool_false;
  66. handle->iface.struct_ID = bool_false;
  67. handle->iface.switch_ID = bool_false;
  68. handle->iface.typedef_ID = bool_false;
  69. handle->iface.union_ID = bool_false;
  70. handle->iface.unsigned_ID = bool_false;
  71. handle->iface.void_ID = bool_false;
  72. handle->iface.volatile_ID = bool_false;
  73. handle->iface.while_ID = bool_false;
  74. }
  75. void cKeywords_enter(CKeywords* handle)
  76. {
  77. /* Default enter sequence for statechart CKeywords */
  78. cKeywords_enseq_auto_default(handle);
  79. }
  80. void cKeywords_exit(CKeywords* handle)
  81. {
  82. /* Default exit sequence for statechart CKeywords */
  83. cKeywords_exseq_auto(handle);
  84. }
  85. sc_boolean cKeywords_isActive(const CKeywords* handle)
  86. {
  87. sc_boolean result;
  88. if (handle->stateConfVector[0] != CKeywords_last_state)
  89. {
  90. result = bool_true;
  91. }
  92. else
  93. {
  94. result = bool_false;
  95. }
  96. return result;
  97. }
  98. /*
  99. * Always returns 'false' since this state machine can never become final.
  100. */
  101. sc_boolean cKeywords_isFinal(const CKeywords* handle)
  102. {
  103. return bool_false;
  104. }
  105. static void cKeywords_clearInEvents(CKeywords* handle)
  106. {
  107. handle->iface.auto_raised = bool_false;
  108. handle->iface.break_raised = bool_false;
  109. }
  110. static void cKeywords_clearOutEvents(CKeywords* handle)
  111. {
  112. }
  113. void cKeywords_runCycle(CKeywords* handle)
  114. {
  115. cKeywords_clearOutEvents(handle);
  116. for (handle->stateConfVectorPosition = 0;
  117. handle->stateConfVectorPosition < CKEYWORDS_MAX_ORTHOGONAL_STATES;
  118. handle->stateConfVectorPosition++)
  119. {
  120. switch (handle->stateConfVector[handle->stateConfVectorPosition])
  121. {
  122. case CKeywords_auto_char :
  123. {
  124. cKeywords_react_auto_char(handle);
  125. break;
  126. }
  127. case CKeywords_auto_loop_switch_case_enum_asm :
  128. {
  129. cKeywords_react_auto_loop_switch_case_enum_asm(handle);
  130. break;
  131. }
  132. default:
  133. break;
  134. }
  135. }
  136. cKeywords_clearInEvents(handle);
  137. }
  138. sc_boolean cKeywords_isStateActive(const CKeywords* handle, CKeywordsStates state)
  139. {
  140. sc_boolean result = bool_false;
  141. switch (state)
  142. {
  143. case CKeywords_auto_char :
  144. result = (sc_boolean) (handle->stateConfVector[0] == CKeywords_auto_char
  145. );
  146. break;
  147. case CKeywords_auto_loop :
  148. result = (sc_boolean) (handle->stateConfVector[0] >= CKeywords_auto_loop
  149. && handle->stateConfVector[0] <= CKeywords_auto_loop_switch_case_enum_asm);
  150. break;
  151. case CKeywords_auto_loop_switch_case :
  152. result = (sc_boolean) (handle->stateConfVector[0] >= CKeywords_auto_loop_switch_case
  153. && handle->stateConfVector[0] <= CKeywords_auto_loop_switch_case_enum_asm);
  154. break;
  155. case CKeywords_auto_loop_switch_case_enum_asm :
  156. result = (sc_boolean) (handle->stateConfVector[0] == CKeywords_auto_loop_switch_case_enum_asm
  157. );
  158. break;
  159. default:
  160. result = bool_false;
  161. break;
  162. }
  163. return result;
  164. }
  165. void cKeywordsIface_raise_auto(CKeywords* handle)
  166. {
  167. handle->iface.auto_raised = bool_true;
  168. }
  169. void cKeywordsIface_raise_break(CKeywords* handle)
  170. {
  171. handle->iface.break_raised = bool_true;
  172. }
  173. sc_boolean cKeywordsIface_get_case(const CKeywords* handle)
  174. {
  175. return handle->iface.case_ID;
  176. }
  177. void cKeywordsIface_set_case(CKeywords* handle, sc_boolean value)
  178. {
  179. handle->iface.case_ID = value;
  180. }
  181. sc_integer cKeywordsIface_get_do(const CKeywords* handle)
  182. {
  183. return handle->iface.do_ID;
  184. }
  185. void cKeywordsIface_set_do(CKeywords* handle, sc_integer value)
  186. {
  187. handle->iface.do_ID = value;
  188. }
  189. sc_boolean cKeywordsIface_get_continue(const CKeywords* handle)
  190. {
  191. return handle->iface.continue_ID;
  192. }
  193. void cKeywordsIface_set_continue(CKeywords* handle, sc_boolean value)
  194. {
  195. handle->iface.continue_ID = value;
  196. }
  197. sc_boolean cKeywordsIface_get_double(const CKeywords* handle)
  198. {
  199. return handle->iface.double_ID;
  200. }
  201. void cKeywordsIface_set_double(CKeywords* handle, sc_boolean value)
  202. {
  203. handle->iface.double_ID = value;
  204. }
  205. sc_boolean cKeywordsIface_get_enum(const CKeywords* handle)
  206. {
  207. return handle->iface.enum_ID;
  208. }
  209. void cKeywordsIface_set_enum(CKeywords* handle, sc_boolean value)
  210. {
  211. handle->iface.enum_ID = value;
  212. }
  213. sc_boolean cKeywordsIface_get_extern(const CKeywords* handle)
  214. {
  215. return handle->iface.extern_ID;
  216. }
  217. void cKeywordsIface_set_extern(CKeywords* handle, sc_boolean value)
  218. {
  219. handle->iface.extern_ID = value;
  220. }
  221. sc_boolean cKeywordsIface_get_float(const CKeywords* handle)
  222. {
  223. return handle->iface.float_ID;
  224. }
  225. void cKeywordsIface_set_float(CKeywords* handle, sc_boolean value)
  226. {
  227. handle->iface.float_ID = value;
  228. }
  229. sc_boolean cKeywordsIface_get_for(const CKeywords* handle)
  230. {
  231. return handle->iface.for_ID;
  232. }
  233. void cKeywordsIface_set_for(CKeywords* handle, sc_boolean value)
  234. {
  235. handle->iface.for_ID = value;
  236. }
  237. sc_boolean cKeywordsIface_get_goto(const CKeywords* handle)
  238. {
  239. return handle->iface.goto_ID;
  240. }
  241. void cKeywordsIface_set_goto(CKeywords* handle, sc_boolean value)
  242. {
  243. handle->iface.goto_ID = value;
  244. }
  245. sc_boolean cKeywordsIface_get_if(const CKeywords* handle)
  246. {
  247. return handle->iface.if_ID;
  248. }
  249. void cKeywordsIface_set_if(CKeywords* handle, sc_boolean value)
  250. {
  251. handle->iface.if_ID = value;
  252. }
  253. sc_boolean cKeywordsIface_get_int(const CKeywords* handle)
  254. {
  255. return handle->iface.int_ID;
  256. }
  257. void cKeywordsIface_set_int(CKeywords* handle, sc_boolean value)
  258. {
  259. handle->iface.int_ID = value;
  260. }
  261. sc_boolean cKeywordsIface_get_long(const CKeywords* handle)
  262. {
  263. return handle->iface.long_ID;
  264. }
  265. void cKeywordsIface_set_long(CKeywords* handle, sc_boolean value)
  266. {
  267. handle->iface.long_ID = value;
  268. }
  269. sc_boolean cKeywordsIface_get_register(const CKeywords* handle)
  270. {
  271. return handle->iface.register_ID;
  272. }
  273. void cKeywordsIface_set_register(CKeywords* handle, sc_boolean value)
  274. {
  275. handle->iface.register_ID = value;
  276. }
  277. sc_boolean cKeywordsIface_get_return(const CKeywords* handle)
  278. {
  279. return handle->iface.return_ID;
  280. }
  281. void cKeywordsIface_set_return(CKeywords* handle, sc_boolean value)
  282. {
  283. handle->iface.return_ID = value;
  284. }
  285. sc_boolean cKeywordsIface_get_short(const CKeywords* handle)
  286. {
  287. return handle->iface.short_ID;
  288. }
  289. void cKeywordsIface_set_short(CKeywords* handle, sc_boolean value)
  290. {
  291. handle->iface.short_ID = value;
  292. }
  293. sc_boolean cKeywordsIface_get_signed(const CKeywords* handle)
  294. {
  295. return handle->iface.signed_ID;
  296. }
  297. void cKeywordsIface_set_signed(CKeywords* handle, sc_boolean value)
  298. {
  299. handle->iface.signed_ID = value;
  300. }
  301. sc_boolean cKeywordsIface_get_sizeof(const CKeywords* handle)
  302. {
  303. return handle->iface.sizeof_ID;
  304. }
  305. void cKeywordsIface_set_sizeof(CKeywords* handle, sc_boolean value)
  306. {
  307. handle->iface.sizeof_ID = value;
  308. }
  309. sc_boolean cKeywordsIface_get_static(const CKeywords* handle)
  310. {
  311. return handle->iface.static_ID;
  312. }
  313. void cKeywordsIface_set_static(CKeywords* handle, sc_boolean value)
  314. {
  315. handle->iface.static_ID = value;
  316. }
  317. sc_boolean cKeywordsIface_get_struct(const CKeywords* handle)
  318. {
  319. return handle->iface.struct_ID;
  320. }
  321. void cKeywordsIface_set_struct(CKeywords* handle, sc_boolean value)
  322. {
  323. handle->iface.struct_ID = value;
  324. }
  325. sc_boolean cKeywordsIface_get_switch(const CKeywords* handle)
  326. {
  327. return handle->iface.switch_ID;
  328. }
  329. void cKeywordsIface_set_switch(CKeywords* handle, sc_boolean value)
  330. {
  331. handle->iface.switch_ID = value;
  332. }
  333. sc_boolean cKeywordsIface_get_typedef(const CKeywords* handle)
  334. {
  335. return handle->iface.typedef_ID;
  336. }
  337. void cKeywordsIface_set_typedef(CKeywords* handle, sc_boolean value)
  338. {
  339. handle->iface.typedef_ID = value;
  340. }
  341. sc_boolean cKeywordsIface_get_union(const CKeywords* handle)
  342. {
  343. return handle->iface.union_ID;
  344. }
  345. void cKeywordsIface_set_union(CKeywords* handle, sc_boolean value)
  346. {
  347. handle->iface.union_ID = value;
  348. }
  349. sc_boolean cKeywordsIface_get_unsigned(const CKeywords* handle)
  350. {
  351. return handle->iface.unsigned_ID;
  352. }
  353. void cKeywordsIface_set_unsigned(CKeywords* handle, sc_boolean value)
  354. {
  355. handle->iface.unsigned_ID = value;
  356. }
  357. sc_boolean cKeywordsIface_get_void(const CKeywords* handle)
  358. {
  359. return handle->iface.void_ID;
  360. }
  361. void cKeywordsIface_set_void(CKeywords* handle, sc_boolean value)
  362. {
  363. handle->iface.void_ID = value;
  364. }
  365. sc_boolean cKeywordsIface_get_volatile(const CKeywords* handle)
  366. {
  367. return handle->iface.volatile_ID;
  368. }
  369. void cKeywordsIface_set_volatile(CKeywords* handle, sc_boolean value)
  370. {
  371. handle->iface.volatile_ID = value;
  372. }
  373. sc_boolean cKeywordsIface_get_while(const CKeywords* handle)
  374. {
  375. return handle->iface.while_ID;
  376. }
  377. void cKeywordsIface_set_while(CKeywords* handle, sc_boolean value)
  378. {
  379. handle->iface.while_ID = value;
  380. }
  381. /* implementations of all internal functions */
  382. static sc_boolean cKeywords_check_auto_char_tr0_tr0(const CKeywords* handle)
  383. {
  384. return ((handle->iface.auto_raised) && (handle->iface.case_ID)) ? bool_true : bool_false;
  385. }
  386. static void cKeywords_effect_auto_char_tr0(CKeywords* handle)
  387. {
  388. cKeywords_exseq_auto_char(handle);
  389. handle->iface.do_ID += 1;
  390. cKeywords_enseq_auto_loop_default(handle);
  391. }
  392. /* Entry action for state 'char'. */
  393. static void cKeywords_enact_auto_char(CKeywords* handle)
  394. {
  395. /* Entry action for state 'char'. */
  396. handle->iface.case_ID = bool_true;
  397. handle->iface.do_ID = 0;
  398. handle->iface.continue_ID = bool_true;
  399. handle->iface.double_ID = bool_true;
  400. handle->iface.enum_ID = bool_true;
  401. handle->iface.extern_ID = bool_true;
  402. handle->iface.float_ID = bool_true;
  403. handle->iface.for_ID = bool_true;
  404. handle->iface.goto_ID = bool_true;
  405. handle->iface.if_ID = bool_true;
  406. handle->iface.int_ID = bool_true;
  407. handle->iface.long_ID = bool_true;
  408. handle->iface.register_ID = bool_true;
  409. handle->iface.return_ID = bool_true;
  410. handle->iface.short_ID = bool_true;
  411. handle->iface.signed_ID = bool_true;
  412. handle->iface.sizeof_ID = bool_true;
  413. handle->iface.static_ID = bool_true;
  414. handle->iface.struct_ID = bool_true;
  415. handle->iface.switch_ID = bool_true;
  416. handle->iface.typedef_ID = bool_true;
  417. handle->iface.union_ID = bool_true;
  418. handle->iface.unsigned_ID = bool_true;
  419. handle->iface.void_ID = bool_true;
  420. handle->iface.volatile_ID = bool_true;
  421. handle->iface.while_ID = bool_true;
  422. }
  423. /* Entry action for state 'asm'. */
  424. static void cKeywords_enact_auto_loop_switch_case_enum_asm(CKeywords* handle)
  425. {
  426. /* Entry action for state 'asm'. */
  427. handle->iface.case_ID = bool_false;
  428. handle->iface.do_ID = 0;
  429. handle->iface.continue_ID = bool_false;
  430. handle->iface.double_ID = bool_false;
  431. handle->iface.enum_ID = bool_false;
  432. handle->iface.extern_ID = bool_false;
  433. handle->iface.float_ID = bool_false;
  434. handle->iface.for_ID = bool_false;
  435. handle->iface.goto_ID = bool_false;
  436. handle->iface.if_ID = bool_false;
  437. handle->iface.int_ID = bool_false;
  438. handle->iface.long_ID = bool_false;
  439. handle->iface.register_ID = bool_false;
  440. handle->iface.return_ID = bool_false;
  441. handle->iface.short_ID = bool_false;
  442. handle->iface.signed_ID = bool_false;
  443. handle->iface.sizeof_ID = bool_false;
  444. handle->iface.static_ID = bool_false;
  445. handle->iface.struct_ID = bool_false;
  446. handle->iface.switch_ID = bool_false;
  447. handle->iface.typedef_ID = bool_false;
  448. handle->iface.union_ID = bool_false;
  449. handle->iface.unsigned_ID = bool_false;
  450. handle->iface.void_ID = bool_false;
  451. handle->iface.volatile_ID = bool_false;
  452. handle->iface.while_ID = bool_false;
  453. }
  454. /* 'default' enter sequence for state char */
  455. static void cKeywords_enseq_auto_char_default(CKeywords* handle)
  456. {
  457. /* 'default' enter sequence for state char */
  458. cKeywords_enact_auto_char(handle);
  459. handle->stateConfVector[0] = CKeywords_auto_char;
  460. handle->stateConfVectorPosition = 0;
  461. }
  462. /* 'default' enter sequence for state loop */
  463. static void cKeywords_enseq_auto_loop_default(CKeywords* handle)
  464. {
  465. /* 'default' enter sequence for state loop */
  466. cKeywords_enseq_auto_loop_switch_default(handle);
  467. }
  468. /* 'default' enter sequence for state case */
  469. static void cKeywords_enseq_auto_loop_switch_case_default(CKeywords* handle)
  470. {
  471. /* 'default' enter sequence for state case */
  472. cKeywords_enseq_auto_loop_switch_case_enum_default(handle);
  473. handle->historyVector[0] = handle->stateConfVector[0];
  474. }
  475. /* 'default' enter sequence for state asm */
  476. static void cKeywords_enseq_auto_loop_switch_case_enum_asm_default(CKeywords* handle)
  477. {
  478. /* 'default' enter sequence for state asm */
  479. cKeywords_enact_auto_loop_switch_case_enum_asm(handle);
  480. handle->stateConfVector[0] = CKeywords_auto_loop_switch_case_enum_asm;
  481. handle->stateConfVectorPosition = 0;
  482. handle->historyVector[1] = handle->stateConfVector[0];
  483. }
  484. /* 'default' enter sequence for region auto */
  485. static void cKeywords_enseq_auto_default(CKeywords* handle)
  486. {
  487. /* 'default' enter sequence for region auto */
  488. cKeywords_react_auto__entry_Default(handle);
  489. }
  490. /* 'default' enter sequence for region switch */
  491. static void cKeywords_enseq_auto_loop_switch_default(CKeywords* handle)
  492. {
  493. /* 'default' enter sequence for region switch */
  494. cKeywords_react_auto_loop_switch__entry_Default(handle);
  495. }
  496. /* shallow enterSequence with history in child switch */
  497. static void cKeywords_shenseq_auto_loop_switch(CKeywords* handle)
  498. {
  499. /* shallow enterSequence with history in child switch */
  500. /* Handle shallow history entry of switch */
  501. switch(handle->historyVector[ 0 ])
  502. {
  503. case CKeywords_auto_loop_switch_case_enum_asm :
  504. {
  505. cKeywords_enseq_auto_loop_switch_case_default(handle);
  506. break;
  507. }
  508. default: break;
  509. }
  510. }
  511. /* 'default' enter sequence for region enum */
  512. static void cKeywords_enseq_auto_loop_switch_case_enum_default(CKeywords* handle)
  513. {
  514. /* 'default' enter sequence for region enum */
  515. cKeywords_react_auto_loop_switch_case_enum__entry_Default(handle);
  516. }
  517. /* deep enterSequence with history in child enum */
  518. static void cKeywords_dhenseq_auto_loop_switch_case_enum(CKeywords* handle)
  519. {
  520. /* deep enterSequence with history in child enum */
  521. /* Handle deep history entry of enum */
  522. switch(handle->historyVector[ 1 ])
  523. {
  524. case CKeywords_auto_loop_switch_case_enum_asm :
  525. {
  526. /* enterSequence with history in child asm for leaf asm */
  527. cKeywords_enseq_auto_loop_switch_case_enum_asm_default(handle);
  528. break;
  529. }
  530. default: break;
  531. }
  532. }
  533. /* Default exit sequence for state char */
  534. static void cKeywords_exseq_auto_char(CKeywords* handle)
  535. {
  536. /* Default exit sequence for state char */
  537. handle->stateConfVector[0] = CKeywords_last_state;
  538. handle->stateConfVectorPosition = 0;
  539. }
  540. /* Default exit sequence for state asm */
  541. static void cKeywords_exseq_auto_loop_switch_case_enum_asm(CKeywords* handle)
  542. {
  543. /* Default exit sequence for state asm */
  544. handle->stateConfVector[0] = CKeywords_last_state;
  545. handle->stateConfVectorPosition = 0;
  546. }
  547. /* Default exit sequence for region auto */
  548. static void cKeywords_exseq_auto(CKeywords* handle)
  549. {
  550. /* Default exit sequence for region auto */
  551. /* Handle exit of all possible states (of CKeywords.auto) at position 0... */
  552. switch(handle->stateConfVector[ 0 ])
  553. {
  554. case CKeywords_auto_char :
  555. {
  556. cKeywords_exseq_auto_char(handle);
  557. break;
  558. }
  559. case CKeywords_auto_loop_switch_case_enum_asm :
  560. {
  561. cKeywords_exseq_auto_loop_switch_case_enum_asm(handle);
  562. break;
  563. }
  564. default: break;
  565. }
  566. }
  567. /* Default exit sequence for region switch */
  568. static void cKeywords_exseq_auto_loop_switch(CKeywords* handle)
  569. {
  570. /* Default exit sequence for region switch */
  571. /* Handle exit of all possible states (of CKeywords.auto.loop.switch) at position 0... */
  572. switch(handle->stateConfVector[ 0 ])
  573. {
  574. case CKeywords_auto_loop_switch_case_enum_asm :
  575. {
  576. cKeywords_exseq_auto_loop_switch_case_enum_asm(handle);
  577. break;
  578. }
  579. default: break;
  580. }
  581. }
  582. /* Default exit sequence for region enum */
  583. static void cKeywords_exseq_auto_loop_switch_case_enum(CKeywords* handle)
  584. {
  585. /* Default exit sequence for region enum */
  586. /* Handle exit of all possible states (of CKeywords.auto.loop.switch.case.enum) at position 0... */
  587. switch(handle->stateConfVector[ 0 ])
  588. {
  589. case CKeywords_auto_loop_switch_case_enum_asm :
  590. {
  591. cKeywords_exseq_auto_loop_switch_case_enum_asm(handle);
  592. break;
  593. }
  594. default: break;
  595. }
  596. }
  597. /* The reactions of state char. */
  598. static void cKeywords_react_auto_char(CKeywords* handle)
  599. {
  600. /* The reactions of state char. */
  601. if (cKeywords_check_auto_char_tr0_tr0(handle) == bool_true)
  602. {
  603. cKeywords_effect_auto_char_tr0(handle);
  604. }
  605. }
  606. /* The reactions of state asm. */
  607. static void cKeywords_react_auto_loop_switch_case_enum_asm(CKeywords* handle)
  608. {
  609. /* The reactions of state asm. */
  610. }
  611. /* Default react sequence for initial entry */
  612. static void cKeywords_react_auto__entry_Default(CKeywords* handle)
  613. {
  614. /* Default react sequence for initial entry */
  615. cKeywords_enseq_auto_char_default(handle);
  616. }
  617. /* Default react sequence for shallow history entry */
  618. static void cKeywords_react_auto_loop_switch__entry_Default(CKeywords* handle)
  619. {
  620. /* Default react sequence for shallow history entry */
  621. /* Enter the region with shallow history */
  622. if (handle->historyVector[0] != CKeywords_last_state)
  623. {
  624. cKeywords_shenseq_auto_loop_switch(handle);
  625. } else
  626. {
  627. cKeywords_enseq_auto_loop_switch_case_default(handle);
  628. }
  629. }
  630. /* Default react sequence for deep history entry */
  631. static void cKeywords_react_auto_loop_switch_case_enum__entry_Default(CKeywords* handle)
  632. {
  633. /* Default react sequence for deep history entry */
  634. /* Enter the region with deep history */
  635. if (handle->historyVector[1] != CKeywords_last_state)
  636. {
  637. cKeywords_dhenseq_auto_loop_switch_case_enum(handle);
  638. } else
  639. {
  640. cKeywords_enseq_auto_loop_switch_case_enum_asm_default(handle);
  641. }
  642. }