CKeywords.c 20 KB

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