123456789101112131415161718192021222324252627282930 |
- /helpers
- / e exclusive
- slice: {[l;s;e] s_(e-1)#l};
- listize: {1_(,/(";",)'{"(",x,")"}'x)};
- iscl: {i: `i$x; ((i>64) & (i<91))}; // is capital letter
- isdig: {i: `i$x; ((i>47) & (i<58))}; // is digit
- / :`i$"A"; // 65
- / :`i$"Z"; // 90
- / :`i$"0"; // 48
- / :`i$"9"; // 57
- tstkey: "States/Events"; / key indicating start of transition section
- cstkey: "Events"; / key indicating start of events condition section
- astkey: "Actions"; / key indicating start of actions section
- sectionkeys: (tstkey;cstkey;astkey);
- lines: 0: "SS.csv";
- /csv parser
- parsel: {[l] comi: &l=",";comi+:1;r: 2':!#comi;r: comi@r;r: (1 2#(0;r[0;0])),r;slice[l].'r};
- csv: parsel'lines;
- :letters: &''(iscl'''csv);
- :digits: &''(isdig'''csv);
- csv@''letters
- / initialize data
- / f:<`"compiled_ss.k";
- / f 0: kcode;
|