home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
sa104os2.zip
/
SATHR104.ZIP
/
SATHER
/
BOOT
/
CS.COD
/
CODE1.C
< prev
next >
Wrap
C/C++ Source or Header
|
1995-02-15
|
226KB
|
8,720 lines
/* C code generated by Sather 1.0 compiler */
#include "sather.h"
#include "strings.h"
TUPSTRTUPSTRSTR TUPSTRTUPSTRSTR__1058(TUPSTRTUPSTRSTR self, TUPSTRSTR t2_1059) {
TUPSTRTUPSTRSTR local0;
local0 = self;
local0.t2 = t2_1059;
return local0;
}
TUPSTRTUPSTRSTR TUPSTRTUPSTRSTR__1060(TUPSTRTUPSTRSTR self, STR at1, TUPSTRSTR at2) {
TUPSTRTUPSTRSTR noname1061 = TUPSTRTUPSTRSTR_zero;
TUPSTRTUPSTRSTR local0;
local0 = TUPSTRTUPSTRSTR_(self, at1);
return TUPSTRTUPSTRSTR__1058(local0, at2);
}
FMAPSTRTUPSTRSTR FMAPSTRTUPSTRSTR_1062(FMAPSTRTUPSTRSTR self, INT n_1063) {
FMAPSTRTUPSTRSTR noname1064;
FMAPSTRTUPSTRSTR r_1065;
FMAPSTRTUPSTRSTR noname1066;
FMAPSTRTUPSTRSTR local0;
TUPSTRTUPSTRSTR local1;
STR local2;
local0 = ((FMAPSTRTUPSTRSTR) sbi_arr_alloc(sizeof(struct FMAPSTRTUPSTRSTR_struct), FMAPSTRTUPSTRSTR_tag, sizeof(TUPSTRTUPSTRSTR) , n_1063));
local0->asize = n_1063;
r_1065 = local0;
if ((!((FMAPSTRTUPSTRSTR_1055(self)==((STR) NULL))))) {
{
struct FMAPSTRTUPSTRSTR_1068_frame_struct temp1067_0;
FMAPSTRTUPSTRSTR_1068_frame
noname1069 = &temp1067_0;
noname1069->state = 0;
while (1) {
if (noname1069->state == 0) {
noname1066 = r_1065;
noname1069->arg0 = noname1066;
}
local1 = TUPSTRTUPSTRSTR_zero;
local2 = FMAPSTRTUPSTRSTR_1055(self);
noname1069->arg1 = TUPSTRTUPSTRSTR__1060(local1, local2, TUPSTRSTR_zero);
FMAPSTRTUPSTRSTR_1068(noname1069);
if (noname1069->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
}
return r_1065;
}
INT FMAPSTRTUPSTRSTR_1070(FMAPSTRTUPSTRSTR self) {
INT noname1071 = ((INT) 0);
return self->asize;
fprintf(stderr,"Last statement wasn't return ../Library/aref.sa:20:8\n");
exit(16);
}
FMAPSTRTUPSTRSTR FMAPSTRTUPSTRSTR_1072(FMAPSTRTUPSTRSTR self, TUPSTRTUPSTRSTR p) {
FMAPSTRTUPSTRSTR noname1073;
return FMAPSTRTUPSTRSTR_1074(self, p.t1, p.t2);
if (!FMAPSTRTUPSTRSTR_1035(self)) {
fprintf(stderr,"Failed invariant FMAP{STR,TUP{STR,STR}}::invariant:BOOL ../Library/fmap.sa:202:14\n");
exit(16);
}
}
FMAPSTRTUPSTRSTR FMAPSTRTUPSTRSTR_1075(FMAPSTRTUPSTRSTR self) {
FMAPSTRTUPSTRSTR noname1076;
INT ns = ((INT) 0);
FMAPSTRTUPSTRSTR r_1077;
FMAPSTRTUPSTRSTR noname1078;
INT local0;
INT local1;
INT local2;
TUPSTRTUPSTRSTR local3;
if (!((!((self==((FMAPSTRTUPSTRSTR) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/fmap.sa:172:22\n");
exit(16);
}
local0 = (self->asize);
local1 = (c_INT_minus_INT_INT_chk(local0,1));
local2 = (c_INT_times_INT_INT_chk(local1,2));
ns = (c_INT_plus_INT_INT_chk(local2,1));
r_1077 = FMAPSTRTUPSTRSTR_1062(self, ns);
{
struct FMAPSTRTUPSTRSTR_1080_frame_struct temp1079_0;
FMAPSTRTUPSTRSTR_1080_frame
noname1081 = &temp1079_0;
noname1081->state = 0;
while (1) {
if (noname1081->state == 0) {
noname1078 = self;
noname1081->arg0 = noname1078;
}
local3 = FMAPSTRTUPSTRSTR_1080(noname1081);
if (noname1081->state == -1) goto after_loop;
r_1077 = FMAPSTRTUPSTRSTR_1072(r_1077, local3);
}
}
after_loop: ;
return r_1077;
}
INT FMAPSTRTUPSTRSTR_1082(FMAPSTRTUPSTRSTR self, STR k) {
INT noname1083 = ((INT) 0);
return STR_hash_INT(k);
return (c_SYS_id_OB_INT(((SYS) NULL),((OB) k)));
if (!FMAPSTRTUPSTRSTR_1035(self)) {
fprintf(stderr,"Failed invariant FMAP{STR,TUP{STR,STR}}::invariant:BOOL ../Library/fmap.sa:64:11\n");
exit(16);
}
}
TUPSTRTUPSTRSTR FMAPSTRTUPSTRSTR_1084(FMAPSTRTUPSTRSTR self, INT ind_1085) {
TUPSTRTUPSTRSTR noname1086 = TUPSTRTUPSTRSTR_zero;
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FMAPSTRTUPSTRSTR) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_1085, local1, (c_INT_minus_INT_INT_chk(local2,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:33:7\n");
exit(16);
}
if (ind_1085<0||ind_1085>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:33:7\n");
exit(16);
}
return self->arr_part[ind_1085];
}
BOOL FMAPSTRTUPSTRSTR_1087(FMAPSTRTUPSTRSTR self, STR k1, STR k2) {
BOOL noname1088 = ((BOOL) 0);
return STR_is_eq_STR_BOOL(k1, k2);
return c_SYS_ob_eq_OB_OB_BOOL(((OB) k1),((OB) k2));
if (!FMAPSTRTUPSTRSTR_1035(self)) {
fprintf(stderr,"Failed invariant FMAP{STR,TUP{STR,STR}}::invariant:BOOL ../Library/fmap.sa:44:9\n");
exit(16);
}
}
void FMAPSTRTUPSTRSTR_1089(FMAPSTRTUPSTRSTR self, INT ind_1090, TUPSTRTUPSTRSTR val_1091) {
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FMAPSTRTUPSTRSTR) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_1090, local1, (c_INT_minus_INT_INT_chk(local2,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:38:7\n");
exit(16);
}
if (ind_1090<0||ind_1090>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:38:7\n");
exit(16);
}
self->arr_part[ind_1090] = val_1091;
}
FMAPSTRTUPSTRSTR FMAPSTRTUPSTRSTR_1074(FMAPSTRTUPSTRSTR self, STR k, TUPSTRSTR t_1092) {
FMAPSTRTUPSTRSTR noname1093;
FMAPSTRTUPSTRSTR r_1094;
INT h = ((INT) 0);
INT asm_1095 = ((INT) 0);
STR tk;
STR tk_1096;
INT local0;
INT local1;
INT local2;
INT local3;
INT local4;
r_1094 = self;
if ((r_1094==((FMAPSTRTUPSTRSTR) NULL))) {
r_1094 = FMAPSTRTUPSTRSTR_1062(self, 5);
}
else {
local0 = (c_INT_plus_INT_INT_chk(self->hsize,1));
local1 = (c_INT_times_INT_INT_chk(local0,2));
if ((local1>(self->asize))) {
r_1094 = FMAPSTRTUPSTRSTR_1075(self);
}
}
local2 = FMAPSTRTUPSTRSTR_1082(r_1094, k);
local3 = (r_1094->asize);
h = (local2&(c_INT_minus_INT_INT_chk(local3,2)));
local4 = (r_1094->asize);
asm_1095 = (c_INT_minus_INT_INT_chk(local4,1));
while (1) {
tk = (TUPSTRTUPSTRSTR_blob=FMAPSTRTUPSTRSTR_1084(r_1094, h)).t1;
if (FMAPSTRTUPSTRSTR_1087(self, tk, FMAPSTRTUPSTRSTR_1055(self))) {
goto after_loop;
}
if (FMAPSTRTUPSTRSTR_1087(self, tk, k)) {
FMAPSTRTUPSTRSTR_1089(r_1094, h, TUPSTRTUPSTRSTR__1060(TUPSTRTUPSTRSTR_zero, k, t_1092));
return r_1094;
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop: ;
if ((h==asm_1095)) {
h = 0;
while (1) {
tk_1096 = (TUPSTRTUPSTRSTR_blob=FMAPSTRTUPSTRSTR_1084(r_1094, h)).t1;
if (FMAPSTRTUPSTRSTR_1087(self, tk_1096, FMAPSTRTUPSTRSTR_1055(self))) {
goto after_loop_1098;
}
if (FMAPSTRTUPSTRSTR_1087(self, tk_1096, k)) {
FMAPSTRTUPSTRSTR_1089(r_1094, h, TUPSTRTUPSTRSTR__1060(TUPSTRTUPSTRSTR_zero, k, t_1092));
return r_1094;
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop_1098: ;
if (!((h!=asm_1095))) {
fprintf(stderr,"Violation of assertion ../Library/fmap.sa:199:15\n");
exit(16);
}
}
FMAPSTRTUPSTRSTR_1089(r_1094, h, TUPSTRTUPSTRSTR__1060(TUPSTRTUPSTRSTR_zero, k, t_1092));
r_1094->hsize = (c_INT_plus_INT_INT_chk(r_1094->hsize,1));
return r_1094;
if (!FMAPSTRTUPSTRSTR_1035(self)) {
fprintf(stderr,"Failed invariant FMAP{STR,TUP{STR,STR}}::invariant:BOOL ../Library/fmap.sa:180:9\n");
exit(16);
}
}
BOOL CHAR_is_alpha_BOOL(CHAR self) {
BOOL noname1100 = ((BOOL) 0);
CHAR noname1101 = ((CHAR) 0);
noname1101 = self;
switch (noname1101) {
case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
case 'g':
case 'h':
case 'i':
case 'j':
case 'k':
case 'l':
case 'm':
case 'n':
case 'o':
case 'p':
case 'q':
case 'r':
case 's':
case 't':
case 'u':
case 'v':
case 'w':
case 'x':
case 'y':
case 'z':
case 'A':
case 'B':
case 'C':
case 'D':
case 'E':
case 'F':
case 'G':
case 'H':
case 'I':
case 'J':
case 'K':
case 'L':
case 'M':
case 'N':
case 'O':
case 'P':
case 'Q':
case 'R':
case 'S':
case 'T':
case 'U':
case 'V':
case 'W':
case 'X':
case 'Y':
case 'Z':
return TRUE;
break;
default: ;
}
return FALSE;
}
BOOL CHAR_is_alphanum(CHAR self) {
BOOL noname1102 = ((BOOL) 0);
CHAR noname1103 = ((CHAR) 0);
noname1103 = self;
switch (noname1103) {
case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
case 'g':
case 'h':
case 'i':
case 'j':
case 'k':
case 'l':
case 'm':
case 'n':
case 'o':
case 'p':
case 'q':
case 'r':
case 's':
case 't':
case 'u':
case 'v':
case 'w':
case 'x':
case 'y':
case 'z':
case 'A':
case 'B':
case 'C':
case 'D':
case 'E':
case 'F':
case 'G':
case 'H':
case 'I':
case 'J':
case 'K':
case 'L':
case 'M':
case 'N':
case 'O':
case 'P':
case 'Q':
case 'R':
case 'S':
case 'T':
case 'U':
case 'V':
case 'W':
case 'X':
case 'Y':
case 'Z':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
return TRUE;
break;
default: ;
}
return FALSE;
}
STR STR_substring_IN(STR self, INT beg, INT num_1104) {
STR noname1105;
STR r_1106;
BOOL local0;
INT local1;
INT local2;
STR local3;
if ((num_1104>=0)) {
local1 = 0;
local2 = STR_size_INT(self);
local0 = INT_is_bet_INT_I(beg, local1, (c_INT_minus_INT_INT_chk(local2,num_1104)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/str.sa:433:12\n");
exit(16);
}
if ((self==((STR) NULL))) {
return ((STR) NULL);
}
local3 = ((STR) sbi_arr_alloc_atomic(sizeof(struct STR_struct), STR_tag, sizeof(CHAR) , num_1104));
local3->asize = num_1104;
r_1106 = local3;
STR_acopy_INT_IN(r_1106, 0, num_1104, beg, self);
return r_1106;
}
void BE_insert_built_(BE self) {
BE_LEX l;
STR ident1;
STR ident2;
STR ident3;
TUPSTRSTR pair = TUPSTRSTR_zero;
INT i = ((INT) 0);
INT noname1107 = ((INT) 0);
INT noname1108 = ((INT) 0);
INT i_1109 = ((INT) 0);
INT noname1110 = ((INT) 0);
INT noname1111 = ((INT) 0);
BE_LEX local0;
INT local1;
INT local2;
INT local3;
INT local4;
STR local5;
INT local6;
INT local7;
INT local8;
INT local9;
INT local10;
STR local11;
INT local12;
local0 = ((BE_LEX) NULL);
l = BE_LEX_create_ST(local0, STR_plus_STR_STR(self->prog->options_55->home, ((STR) &SystemMACROS)));
while (1) {
ident1 = BE_LEX_get_str_STR(l);
ident2 = BE_LEX_get_str_STR(l);
ident3 = BE_LEX_get_str_STR(l);
if ((ident1==((STR) NULL))) {
goto after_loop;
}
else {
if ((ident2==((STR) NULL))) {
BE_barf_STR(self, ((STR) &MalformedMACROSfile));
}
else {
if ((ident3==((STR) NULL))) {
BE_barf_STR(self, ((STR) &MalformedMACROSf_1113));
}
else {
if (STR_is_eq_STR_BOOL(ident3, ((STR) &same_1114))) {
pair = TUPSTRSTR_create(TUPSTRSTR_zero, ident2, ident2);
}
else {
pair = TUPSTRSTR_create(TUPSTRSTR_zero, ident2, ident3);
}
self->built_in_routines = FMAPSTRTUPSTRSTR_1074(self->built_in_routines, ident1, pair);
if (CHAR_is_alpha_BOOL(STR_aget_INT_CHAR(pair.t1, 0))) {
{
BOOL noname1117 = TRUE;
while (1) {
if (noname1117) {
noname1117 = FALSE;
noname1107 = 1;
local4 = STR_length_INT(pair.t1);
noname1108 = (c_INT_minus_INT_INT_chk(local4,1));
local2 = noname1107;
local3 = noname1108;
local1 = local2;
} else {
local1++;
}
if (local1>local3) goto after_loop_1115;
i = local1;
if ((!(CHAR_is_alphanum(STR_aget_INT_CHAR(pair.t1, i))))) {
goto after_loop_1115;
}
}
}
after_loop_1115: ;
local5 = pair.t1;
local6 = 0;
BE_forbid_STR(self, STR_substring_IN(local5, local6, (c_INT_minus_INT_INT_chk(i,1))));
}
if (CHAR_is_alpha_BOOL(STR_aget_INT_CHAR(pair.t2, 0))) {
{
BOOL noname1120 = TRUE;
while (1) {
if (noname1120) {
noname1120 = FALSE;
noname1110 = 1;
local10 = STR_length_INT(pair.t2);
noname1111 = (c_INT_minus_INT_INT_chk(local10,1));
local8 = noname1110;
local9 = noname1111;
local7 = local8;
} else {
local7++;
}
if (local7>local9) goto after_loop_1118;
i_1109 = local7;
if ((!(CHAR_is_alphanum(STR_aget_INT_CHAR(pair.t2, i_1109))))) {
goto after_loop_1118;
}
}
}
after_loop_1118: ;
local11 = pair.t2;
local12 = 0;
BE_forbid_STR(self, STR_substring_IN(local11, local12, (c_INT_minus_INT_INT_chk(i_1109,1))));
}
}
}
}
}
after_loop: ;
}
ITER_INLINE ITER_INLINE_crea(ITER_INLINE self, STR s1, STR s2, STR s3, STR s4) {
ITER_INLINE noname1121;
ITER_INLINE res;
ITER_INLINE local0;
local0 = ((ITER_INLINE) sbi_alloc(sizeof(struct ITER_INLINE_struct), ITER_INLINE_tag));
res = local0;
res->at_decs = s1;
res->when_first_seen = s2;
res->before_28 = s3;
res->after_29 = s4;
return res;
}
STR FMAPSTRITER_INLI_1122(FMAPSTRITER_INLINE self) {
STR noname1123;
STR k = ((STR) NULL);
return ((STR) NULL);
if (!FMAPSTRITER_INLI_1037(self)) {
fprintf(stderr,"Failed invariant FMAP{STR,ITER_INLINE}::invariant:BOOL ../Library/fmap.sa:54:10\n");
exit(16);
}
}
TUPSTRITER_INLINE TUPSTRITER_INLIN(TUPSTRITER_INLINE self, STR t1_1124) {
TUPSTRITER_INLINE local0;
local0 = self;
local0.t1 = t1_1124;
return local0;
}
TUPSTRITER_INLINE TUPSTRITER_INLIN_1125(TUPSTRITER_INLINE self, ITER_INLINE t2_1126) {
TUPSTRITER_INLINE local0;
local0 = self;
local0.t2 = t2_1126;
return local0;
}
TUPSTRITER_INLINE TUPSTRITER_INLIN_1127(TUPSTRITER_INLINE self, STR at1, ITER_INLINE at2) {
TUPSTRITER_INLINE noname1128 = TUPSTRITER_INLINE_zero;
TUPSTRITER_INLINE local0;
local0 = TUPSTRITER_INLIN(self, at1);
return TUPSTRITER_INLIN_1125(local0, at2);
}
FMAPSTRITER_INLINE FMAPSTRITER_INLI_1129(FMAPSTRITER_INLINE self, INT n_1130) {
FMAPSTRITER_INLINE noname1131;
FMAPSTRITER_INLINE r_1132;
FMAPSTRITER_INLINE noname1133;
FMAPSTRITER_INLINE local0;
TUPSTRITER_INLINE local1;
STR local2;
local0 = ((FMAPSTRITER_INLINE) sbi_arr_alloc(sizeof(struct FMAPSTRITER_INLINE_struct), FMAPSTRITER_INLINE_tag, sizeof(TUPSTRITER_INLINE) , n_1130));
local0->asize = n_1130;
r_1132 = local0;
if ((!((FMAPSTRITER_INLI_1122(self)==((STR) NULL))))) {
{
struct FMAPSTRITER_INLI_1135_frame_struct temp1134_0;
FMAPSTRITER_INLI_1135_frame
noname1136 = &temp1134_0;
noname1136->state = 0;
while (1) {
if (noname1136->state == 0) {
noname1133 = r_1132;
noname1136->arg0 = noname1133;
}
local1 = TUPSTRITER_INLINE_zero;
local2 = FMAPSTRITER_INLI_1122(self);
noname1136->arg1 = TUPSTRITER_INLIN_1127(local1, local2, ((ITER_INLINE) NULL));
FMAPSTRITER_INLI_1135(noname1136);
if (noname1136->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
}
return r_1132;
}
INT FMAPSTRITER_INLI_1137(FMAPSTRITER_INLINE self) {
INT noname1138 = ((INT) 0);
return self->asize;
fprintf(stderr,"Last statement wasn't return ../Library/aref.sa:20:8\n");
exit(16);
}
FMAPSTRITER_INLINE FMAPSTRITER_INLI_1139(FMAPSTRITER_INLINE self, TUPSTRITER_INLINE p) {
FMAPSTRITER_INLINE noname1140;
return FMAPSTRITER_INLI_1141(self, p.t1, p.t2);
if (!FMAPSTRITER_INLI_1037(self)) {
fprintf(stderr,"Failed invariant FMAP{STR,ITER_INLINE}::invariant:BOOL ../Library/fmap.sa:202:14\n");
exit(16);
}
}
FMAPSTRITER_INLINE FMAPSTRITER_INLI_1142(FMAPSTRITER_INLINE self) {
FMAPSTRITER_INLINE noname1143;
INT ns = ((INT) 0);
FMAPSTRITER_INLINE r_1144;
FMAPSTRITER_INLINE noname1145;
INT local0;
INT local1;
INT local2;
TUPSTRITER_INLINE local3;
if (!((!((self==((FMAPSTRITER_INLINE) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/fmap.sa:172:22\n");
exit(16);
}
local0 = (self->asize);
local1 = (c_INT_minus_INT_INT_chk(local0,1));
local2 = (c_INT_times_INT_INT_chk(local1,2));
ns = (c_INT_plus_INT_INT_chk(local2,1));
r_1144 = FMAPSTRITER_INLI_1129(self, ns);
{
struct FMAPSTRITER_INLI_1147_frame_struct temp1146_0;
FMAPSTRITER_INLI_1147_frame
noname1148 = &temp1146_0;
noname1148->state = 0;
while (1) {
if (noname1148->state == 0) {
noname1145 = self;
noname1148->arg0 = noname1145;
}
local3 = FMAPSTRITER_INLI_1147(noname1148);
if (noname1148->state == -1) goto after_loop;
r_1144 = FMAPSTRITER_INLI_1139(r_1144, local3);
}
}
after_loop: ;
return r_1144;
}
INT FMAPSTRITER_INLI_1149(FMAPSTRITER_INLINE self, STR k) {
INT noname1150 = ((INT) 0);
return STR_hash_INT(k);
return (c_SYS_id_OB_INT(((SYS) NULL),((OB) k)));
if (!FMAPSTRITER_INLI_1037(self)) {
fprintf(stderr,"Failed invariant FMAP{STR,ITER_INLINE}::invariant:BOOL ../Library/fmap.sa:64:11\n");
exit(16);
}
}
TUPSTRITER_INLINE FMAPSTRITER_INLI_1151(FMAPSTRITER_INLINE self, INT ind_1152) {
TUPSTRITER_INLINE noname1153 = TUPSTRITER_INLINE_zero;
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FMAPSTRITER_INLINE) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_1152, local1, (c_INT_minus_INT_INT_chk(local2,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:33:7\n");
exit(16);
}
if (ind_1152<0||ind_1152>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:33:7\n");
exit(16);
}
return self->arr_part[ind_1152];
}
BOOL FMAPSTRITER_INLI_1154(FMAPSTRITER_INLINE self, STR k1, STR k2) {
BOOL noname1155 = ((BOOL) 0);
return STR_is_eq_STR_BOOL(k1, k2);
return c_SYS_ob_eq_OB_OB_BOOL(((OB) k1),((OB) k2));
if (!FMAPSTRITER_INLI_1037(self)) {
fprintf(stderr,"Failed invariant FMAP{STR,ITER_INLINE}::invariant:BOOL ../Library/fmap.sa:44:9\n");
exit(16);
}
}
void FMAPSTRITER_INLI_1156(FMAPSTRITER_INLINE self, INT ind_1157, TUPSTRITER_INLINE val_1158) {
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FMAPSTRITER_INLINE) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_1157, local1, (c_INT_minus_INT_INT_chk(local2,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:38:7\n");
exit(16);
}
if (ind_1157<0||ind_1157>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:38:7\n");
exit(16);
}
self->arr_part[ind_1157] = val_1158;
}
FMAPSTRITER_INLINE FMAPSTRITER_INLI_1141(FMAPSTRITER_INLINE self, STR k, ITER_INLINE t_1159) {
FMAPSTRITER_INLINE noname1160;
FMAPSTRITER_INLINE r_1161;
INT h = ((INT) 0);
INT asm_1162 = ((INT) 0);
STR tk;
STR tk_1163;
INT local0;
INT local1;
INT local2;
INT local3;
INT local4;
r_1161 = self;
if ((r_1161==((FMAPSTRITER_INLINE) NULL))) {
r_1161 = FMAPSTRITER_INLI_1129(self, 5);
}
else {
local0 = (c_INT_plus_INT_INT_chk(self->hsize,1));
local1 = (c_INT_times_INT_INT_chk(local0,2));
if ((local1>(self->asize))) {
r_1161 = FMAPSTRITER_INLI_1142(self);
}
}
local2 = FMAPSTRITER_INLI_1149(r_1161, k);
local3 = (r_1161->asize);
h = (local2&(c_INT_minus_INT_INT_chk(local3,2)));
local4 = (r_1161->asize);
asm_1162 = (c_INT_minus_INT_INT_chk(local4,1));
while (1) {
tk = (TUPSTRITER_INLINE_blob=FMAPSTRITER_INLI_1151(r_1161, h)).t1;
if (FMAPSTRITER_INLI_1154(self, tk, FMAPSTRITER_INLI_1122(self))) {
goto after_loop;
}
if (FMAPSTRITER_INLI_1154(self, tk, k)) {
FMAPSTRITER_INLI_1156(r_1161, h, TUPSTRITER_INLIN_1127(TUPSTRITER_INLINE_zero, k, t_1159));
return r_1161;
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop: ;
if ((h==asm_1162)) {
h = 0;
while (1) {
tk_1163 = (TUPSTRITER_INLINE_blob=FMAPSTRITER_INLI_1151(r_1161, h)).t1;
if (FMAPSTRITER_INLI_1154(self, tk_1163, FMAPSTRITER_INLI_1122(self))) {
goto after_loop_1165;
}
if (FMAPSTRITER_INLI_1154(self, tk_1163, k)) {
FMAPSTRITER_INLI_1156(r_1161, h, TUPSTRITER_INLIN_1127(TUPSTRITER_INLINE_zero, k, t_1159));
return r_1161;
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop_1165: ;
if (!((h!=asm_1162))) {
fprintf(stderr,"Violation of assertion ../Library/fmap.sa:199:15\n");
exit(16);
}
}
FMAPSTRITER_INLI_1156(r_1161, h, TUPSTRITER_INLIN_1127(TUPSTRITER_INLINE_zero, k, t_1159));
r_1161->hsize = (c_INT_plus_INT_INT_chk(r_1161->hsize,1));
return r_1161;
if (!FMAPSTRITER_INLI_1037(self)) {
fprintf(stderr,"Failed invariant FMAP{STR,ITER_INLINE}::invariant:BOOL ../Library/fmap.sa:180:9\n");
exit(16);
}
}
void BE_insert_built__1167(BE self) {
BE_LEX l;
STR name_1168;
STR s1;
STR s2;
STR s3;
STR s4;
ITER_INLINE it;
BE_LEX local0;
BOOL local1;
BOOL local2;
BOOL local3;
local0 = ((BE_LEX) NULL);
l = BE_LEX_create_ST(local0, STR_plus_STR_STR(self->prog->options_55->home, ((STR) &SystemITERS)));
while (1) {
name_1168 = BE_LEX_get_str_STR(l);
s1 = BE_LEX_get_str_STR(l);
s2 = BE_LEX_get_str_STR(l);
s3 = BE_LEX_get_str_STR(l);
s4 = BE_LEX_get_str_STR(l);
if ((name_1168==((STR) NULL))) {
goto after_loop;
}
else {
if ((s1==((STR) NULL))) {
local3 = TRUE;
} else {
local3 = (s2==((STR) NULL));
}
if (local3) {
local2 = TRUE;
} else {
local2 = (s3==((STR) NULL));
}
if (local2) {
local1 = TRUE;
} else {
local1 = (s4==((STR) NULL));
}
if (local1) {
BE_barf_STR(self, ((STR) &MalformedITERSfile));
}
else {
it = ITER_INLINE_crea(((ITER_INLINE) NULL), s1, s2, s3, s4);
self->built_in_iters = FMAPSTRITER_INLI_1141(self->built_in_iters, name_1168, it);
}
}
}
after_loop: ;
}
TP FSETTP_elt_nil_TP(FSETTP self) {
TP noname1170;
TP t_1171 = ((TP) NULL);
if (t_1171==NULL) {
} else
switch (t_1171->header.tag) {
default: ;
}
return ((TP) NULL);
if (!FSETTP_invariant(self)) {
fprintf(stderr,"Failed invariant FSET{$TP}::invariant:BOOL ../Library/fset.sa:53:10\n");
exit(16);
}
}
FSETTP FSETTP_allocate_(FSETTP self, INT n_1172) {
FSETTP noname1173;
FSETTP r_1174;
FSETTP noname1175;
FSETTP local0;
local0 = ((FSETTP) sbi_arr_alloc(sizeof(struct FSETTP_struct), FSETTP_tag, sizeof(TP) , n_1172));
local0->asize = n_1172;
r_1174 = local0;
if ((!((FSETTP_elt_nil_TP(self)==((TP) NULL))))) {
{
struct FSETTP_aset_TP_frame_struct temp1176_0;
FSETTP_aset_TP_frame
noname1177 = &temp1176_0;
noname1177->state = 0;
while (1) {
if (noname1177->state == 0) {
noname1175 = r_1174;
noname1177->arg0 = noname1175;
}
noname1177->arg1 = FSETTP_elt_nil_TP(self);
FSETTP_aset_TP(noname1177);
if (noname1177->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
}
return r_1174;
}
INT FSETTP_asize_INT(FSETTP self) {
INT noname1178 = ((INT) 0);
return self->asize;
fprintf(stderr,"Last statement wasn't return ../Library/aref.sa:20:8\n");
exit(16);
}
FSETTP FSETTP_double_si(FSETTP self) {
FSETTP noname1179;
FSETTP r_1180;
FSETTP noname1181;
INT local0;
INT local1;
INT local2;
TP local3;
if (!((!((self==((FSETTP) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/fset.sa:150:22\n");
exit(16);
}
local0 = (self->asize);
local1 = (c_INT_minus_INT_INT_chk(local0,1));
local2 = (c_INT_times_INT_INT_chk(local1,2));
r_1180 = FSETTP_allocate_(self, (c_INT_plus_INT_INT_chk(local2,1)));
{
struct FSETTP_elt_TP_frame_struct temp1182_0;
FSETTP_elt_TP_frame
noname1183 = &temp1182_0;
noname1183->state = 0;
while (1) {
if (noname1183->state == 0) {
noname1181 = self;
noname1183->arg0 = noname1181;
}
local3 = FSETTP_elt_TP(noname1183);
if (noname1183->state == -1) goto after_loop;
r_1180 = FSETTP_insert_TP(r_1180, local3);
}
}
after_loop: ;
return r_1180;
}
INT FSETTP_elt_hash_(FSETTP self, TP e_1184) {
INT noname1185 = ((INT) 0);
HASH local0;
if (e_1184==NULL) {
} else
switch (e_1184->header.tag) {
case TUPIMPL_INCLUDEI_tag:
case TUPAM_BND_CREATE_tag:
case TUPIFCIFC_tag:
case TUPSTRITER_INLINE_tag:
case TUPAM_GLOBAL_EXP_tag:
case FSTR_tag:
case TUPSIGSIG_tag:
case CHAR_tag:
case INT_tag:
case TUPTP_CLASSFSETTP_tag:
case TUPSTRSTR_tag:
case TUPINTINTINT_tag:
case STR_tag:
case TUPSFILE_IDSFILE_ID_tag:
case TUPAM_ITER_CALL__tag:
case TUPTR_EXPRTR_EXPR_tag:
case TUPTPFMAPIDENTAM_tag:
case TUPARRAYTPTP_tag:
case TUPAM_CONSTAM_CONST_tag:
case TUPSTRTUPSTRSTR_tag:
case TUPTPIMPL_tag:
case TUPSIGAM_ROUT_DEF_tag:
case TUPARRAYTPARRAYB_tag:
case TUPIDENTAM_GLOBA_tag:
case TUPAM_BND_ITER_C_tag:
case TUPAM_LOCAL_EXPR_tag:
case TUPSTRFSETSTR_tag:
case TUPAM_ROUT_DEFAM_tag:
case TUPTPTP_tag:
case IDENT_tag:
case TUPTPINT_tag:
case TUPIDENTINT_tag:
case TUPIDENTIDENT_tag:
case TUPTP_CLASSFSETT_tag:
case TUPCHARCHAR_tag:
case TUPIDENTTP_tag:
case TUPIDENTARRAYTP_tag:
case TUPAM_EXPRAM_EXPR_tag:
case TUPTPIFC_tag:
case TUPTP_CLASSTP_CLASS_tag:
case TUPAM_STMTAM_STMT_tag:
case TUPINTINT_tag:
case TUPOBSTR_tag:
case TUPFLISTAM_CONST_tag:
case TUPAM_EXPRTP_tag:
case TUPBOOLINTIINTBOOL_tag:
local0 = ((HASH) e_1184);
return (*HASH_hash_INT[local0->header.tag+HASH_hash_INT_offset])(local0); break;
default: ;
}
return (c_SYS_id_OB_INT(((SYS) NULL),((OB) e_1184)));
if (!FSETTP_invariant(self)) {
fprintf(stderr,"Failed invariant FSET{$TP}::invariant:BOOL ../Library/fset.sa:63:11\n");
exit(16);
}
}
TP FSETTP_aget_INT_TP(FSETTP self, INT ind_1186) {
TP noname1187;
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FSETTP) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_1186, local1, (c_INT_minus_INT_INT_chk(local2,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:33:7\n");
exit(16);
}
if (ind_1186<0||ind_1186>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:33:7\n");
exit(16);
}
return self->arr_part[ind_1186];
if (!FSETTP_invariant(self)) {
fprintf(stderr,"Failed invariant FSET{$TP}::invariant:BOOL ../Library/aref.sa:33:7\n");
exit(16);
}
}
BOOL FSETTP_elt_eq_TP(FSETTP self, TP e1_1188, TP e2_1189) {
BOOL noname1190 = ((BOOL) 0);
if (e1_1188==NULL) {
} else
switch (e1_1188->header.tag) {
default: ;
}
return c_SYS_ob_eq_OB_OB_BOOL(((OB) e1_1188),((OB) e2_1189));
if (!FSETTP_invariant(self)) {
fprintf(stderr,"Failed invariant FSET{$TP}::invariant:BOOL ../Library/fset.sa:44:9\n");
exit(16);
}
}
void FSETTP_aset_INT_TP(FSETTP self, INT ind_1191, TP val_1192) {
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FSETTP) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_1191, local1, (c_INT_minus_INT_INT_chk(local2,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:38:7\n");
exit(16);
}
if (ind_1191<0||ind_1191>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:38:7\n");
exit(16);
}
self->arr_part[ind_1191] = val_1192;
if (!FSETTP_invariant(self)) {
fprintf(stderr,"Failed invariant FSET{$TP}::invariant:BOOL ../Library/aref.sa:38:7\n");
exit(16);
}
}
FSETTP FSETTP_insert_TP(FSETTP self, TP e_1193) {
FSETTP noname1194;
FSETTP r_1195;
INT asz_1196 = ((INT) 0);
INT h = ((INT) 0);
TP te;
TP te_1197;
INT local0;
INT local1;
INT local2;
r_1195 = self;
if ((r_1195==((FSETTP) NULL))) {
r_1195 = FSETTP_allocate_(self, 5);
}
else {
local0 = (c_INT_plus_INT_INT_chk(self->hsize,1));
local1 = (c_INT_times_INT_INT_chk(local0,2));
if ((local1>(self->asize))) {
r_1195 = FSETTP_double_si(self);
}
}
asz_1196 = (r_1195->asize);
local2 = FSETTP_elt_hash_(r_1195, e_1193);
h = (local2&(c_INT_minus_INT_INT_chk(asz_1196,2)));
while (1) {
te = FSETTP_aget_INT_TP(r_1195, h);
if (FSETTP_elt_eq_TP(self, te, FSETTP_elt_nil_TP(self))) {
goto after_loop;
}
else {
if (FSETTP_elt_eq_TP(self, te, e_1193)) {
FSETTP_aset_INT_TP(r_1195, h, e_1193);
return r_1195;
}
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop: ;
if ((h==(c_INT_minus_INT_INT_chk(asz_1196,1)))) {
h = 0;
while (1) {
te_1197 = FSETTP_aget_INT_TP(r_1195, h);
if (FSETTP_elt_eq_TP(self, te_1197, FSETTP_elt_nil_TP(self))) {
goto after_loop_1199;
}
else {
if (FSETTP_elt_eq_TP(self, te_1197, e_1193)) {
FSETTP_aset_INT_TP(r_1195, h, e_1193);
return r_1195;
}
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop_1199: ;
if (!((h!=(c_INT_minus_INT_INT_chk(asz_1196,1))))) {
fprintf(stderr,"Violation of assertion ../Library/fset.sa:177:15\n");
exit(16);
}
}
FSETTP_aset_INT_TP(r_1195, h, e_1193);
r_1195->hsize = (c_INT_plus_INT_INT_chk(r_1195->hsize,1));
return r_1195;
if (!FSETTP_invariant(self)) {
fprintf(stderr,"Failed invariant FSET{$TP}::invariant:BOOL ../Library/fset.sa:158:9\n");
exit(16);
}
}
INT FMAPOBSTR_key_ha(FMAPOBSTR self, OB k) {
INT noname1201 = ((INT) 0);
HASH local0;
if (k==NULL) {
} else
switch (k->header.tag) {
case TUPIMPL_INCLUDEI_tag:
case TUPAM_BND_CREATE_tag:
case TUPIFCIFC_tag:
case TUPSTRITER_INLINE_tag:
case TUPAM_GLOBAL_EXP_tag:
case FSTR_tag:
case TUPSIGSIG_tag:
case CHAR_tag:
case INT_tag:
case TUPTP_CLASSFSETTP_tag:
case TUPSTRSTR_tag:
case TUPINTINTINT_tag:
case STR_tag:
case TUPSFILE_IDSFILE_ID_tag:
case TUPAM_ITER_CALL__tag:
case TUPTR_EXPRTR_EXPR_tag:
case TUPTPFMAPIDENTAM_tag:
case TUPARRAYTPTP_tag:
case TUPAM_CONSTAM_CONST_tag:
case TUPSTRTUPSTRSTR_tag:
case TUPTPIMPL_tag:
case TUPSIGAM_ROUT_DEF_tag:
case TUPARRAYTPARRAYB_tag:
case TUPIDENTAM_GLOBA_tag:
case TUPAM_BND_ITER_C_tag:
case TUPAM_LOCAL_EXPR_tag:
case TUPSTRFSETSTR_tag:
case TUPAM_ROUT_DEFAM_tag:
case TUPTPTP_tag:
case IDENT_tag:
case TUPTPINT_tag:
case TUPIDENTINT_tag:
case TUPIDENTIDENT_tag:
case TUPTP_CLASSFSETT_tag:
case TUPCHARCHAR_tag:
case TUPIDENTTP_tag:
case TUPIDENTARRAYTP_tag:
case TUPAM_EXPRAM_EXPR_tag:
case TUPTPIFC_tag:
case TUPTP_CLASSTP_CLASS_tag:
case TUPAM_STMTAM_STMT_tag:
case TUPINTINT_tag:
case TUPOBSTR_tag:
case TUPFLISTAM_CONST_tag:
case TUPAM_EXPRTP_tag:
case TUPBOOLINTIINTBOOL_tag:
local0 = ((HASH) k);
return (*HASH_hash_INT[local0->header.tag+HASH_hash_INT_offset])(local0); break;
default: ;
}
return (c_SYS_id_OB_INT(((SYS) NULL),k));
if (!FMAPOBSTR_invari(self)) {
fprintf(stderr,"Failed invariant FMAP{$OB,STR}::invariant:BOOL ../Library/fmap.sa:64:11\n");
exit(16);
}
}
INT FMAPOBSTR_asize_INT(FMAPOBSTR self) {
INT noname1202 = ((INT) 0);
return self->asize;
fprintf(stderr,"Last statement wasn't return ../Library/aref.sa:20:8\n");
exit(16);
}
TUPOBSTR FMAPOBSTR_aget_I(FMAPOBSTR self, INT ind_1203) {
TUPOBSTR noname1204 = TUPOBSTR_zero;
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FMAPOBSTR) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_1203, local1, (c_INT_minus_INT_INT_chk(local2,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:33:7\n");
exit(16);
}
if (ind_1203<0||ind_1203>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:33:7\n");
exit(16);
}
return self->arr_part[ind_1203];
}
BOOL FMAPOBSTR_key_eq(FMAPOBSTR self, OB k1, OB k2) {
BOOL noname1205 = ((BOOL) 0);
if (k1==NULL) {
} else
switch (k1->header.tag) {
default: ;
}
return c_SYS_ob_eq_OB_OB_BOOL(k1,k2);
if (!FMAPOBSTR_invari(self)) {
fprintf(stderr,"Failed invariant FMAP{$OB,STR}::invariant:BOOL ../Library/fmap.sa:44:9\n");
exit(16);
}
}
OB FMAPOBSTR_key_nil_OB(FMAPOBSTR self) {
OB noname1206;
OB k = ((OB) NULL);
if (k==NULL) {
} else
switch (k->header.tag) {
default: ;
}
return ((OB) NULL);
if (!FMAPOBSTR_invari(self)) {
fprintf(stderr,"Failed invariant FMAP{$OB,STR}::invariant:BOOL ../Library/fmap.sa:54:10\n");
exit(16);
}
}
STR FMAPOBSTR_get_OB_STR(FMAPOBSTR self, OB k) {
STR noname1207;
INT h = ((INT) 0);
OB tk;
OB tk_1208;
INT local0;
INT local1;
INT local2;
INT local3;
if ((self==((FMAPOBSTR) NULL))) {
return ((STR) NULL);
}
local0 = FMAPOBSTR_key_ha(self, k);
local1 = (self->asize);
h = (local0&(c_INT_minus_INT_INT_chk(local1,2)));
while (1) {
tk = (TUPOBSTR_blob=FMAPOBSTR_aget_I(self, h)).t1;
if (FMAPOBSTR_key_eq(self, tk, k)) {
return (TUPOBSTR_blob=FMAPOBSTR_aget_I(self, h)).t2;
}
else {
if (FMAPOBSTR_key_eq(self, tk, FMAPOBSTR_key_nil_OB(self))) {
goto after_loop;
}
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop: ;
local2 = (self->asize);
if ((h==(c_INT_minus_INT_INT_chk(local2,1)))) {
h = 0;
while (1) {
tk_1208 = (TUPOBSTR_blob=FMAPOBSTR_aget_I(self, h)).t1;
if (FMAPOBSTR_key_eq(self, tk_1208, k)) {
return (TUPOBSTR_blob=FMAPOBSTR_aget_I(self, h)).t2;
}
else {
if (FMAPOBSTR_key_eq(self, tk_1208, FMAPOBSTR_key_nil_OB(self))) {
goto after_loop_1210;
}
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop_1210: ;
local3 = (self->asize);
if (!((h!=(c_INT_minus_INT_INT_chk(local3,1))))) {
fprintf(stderr,"Violation of assertion ../Library/fmap.sa:150:15\n");
exit(16);
}
}
return ((STR) NULL);
if (!FMAPOBSTR_invari(self)) {
fprintf(stderr,"Failed invariant FMAP{$OB,STR}::invariant:BOOL ../Library/fmap.sa:136:6\n");
exit(16);
}
}
TUPOBSTR TUPOBSTR_t1_OB_T(TUPOBSTR self, OB t1_1212) {
TUPOBSTR local0;
local0 = self;
local0.t1 = t1_1212;
return local0;
}
TUPOBSTR TUPOBSTR_t2_STR_(TUPOBSTR self, STR t2_1213) {
TUPOBSTR local0;
local0 = self;
local0.t2 = t2_1213;
return local0;
}
TUPOBSTR TUPOBSTR_create_(TUPOBSTR self, OB at1, STR at2) {
TUPOBSTR noname1214 = TUPOBSTR_zero;
TUPOBSTR local0;
local0 = TUPOBSTR_t1_OB_T(self, at1);
return TUPOBSTR_t2_STR_(local0, at2);
}
FMAPOBSTR FMAPOBSTR_alloca(FMAPOBSTR self, INT n_1215) {
FMAPOBSTR noname1216;
FMAPOBSTR r_1217;
FMAPOBSTR noname1218;
FMAPOBSTR local0;
TUPOBSTR local1;
OB local2;
local0 = ((FMAPOBSTR) sbi_arr_alloc(sizeof(struct FMAPOBSTR_struct), FMAPOBSTR_tag, sizeof(TUPOBSTR) , n_1215));
local0->asize = n_1215;
r_1217 = local0;
if ((!((FMAPOBSTR_key_nil_OB(self)==((OB) NULL))))) {
{
struct FMAPOBSTR_aset_T_frame_struct temp1219_0;
FMAPOBSTR_aset_T_frame
noname1220 = &temp1219_0;
noname1220->state = 0;
while (1) {
if (noname1220->state == 0) {
noname1218 = r_1217;
noname1220->arg0 = noname1218;
}
local1 = TUPOBSTR_zero;
local2 = FMAPOBSTR_key_nil_OB(self);
noname1220->arg1 = TUPOBSTR_create_(local1, local2, ((STR) NULL));
FMAPOBSTR_aset_T(noname1220);
if (noname1220->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
}
return r_1217;
}
FMAPOBSTR FMAPOBSTR_insert(FMAPOBSTR self, TUPOBSTR p) {
FMAPOBSTR noname1221;
return FMAPOBSTR_insert_1222(self, p.t1, p.t2);
if (!FMAPOBSTR_invari(self)) {
fprintf(stderr,"Failed invariant FMAP{$OB,STR}::invariant:BOOL ../Library/fmap.sa:202:14\n");
exit(16);
}
}
FMAPOBSTR FMAPOBSTR_double(FMAPOBSTR self) {
FMAPOBSTR noname1223;
INT ns = ((INT) 0);
FMAPOBSTR r_1224;
FMAPOBSTR noname1225;
INT local0;
INT local1;
INT local2;
TUPOBSTR local3;
if (!((!((self==((FMAPOBSTR) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/fmap.sa:172:22\n");
exit(16);
}
local0 = (self->asize);
local1 = (c_INT_minus_INT_INT_chk(local0,1));
local2 = (c_INT_times_INT_INT_chk(local1,2));
ns = (c_INT_plus_INT_INT_chk(local2,1));
r_1224 = FMAPOBSTR_alloca(self, ns);
{
struct FMAPOBSTR_pairs__frame_struct temp1226_0;
FMAPOBSTR_pairs__frame
noname1227 = &temp1226_0;
noname1227->state = 0;
while (1) {
if (noname1227->state == 0) {
noname1225 = self;
noname1227->arg0 = noname1225;
}
local3 = FMAPOBSTR_pairs_(noname1227);
if (noname1227->state == -1) goto after_loop;
r_1224 = FMAPOBSTR_insert(r_1224, local3);
}
}
after_loop: ;
return r_1224;
}
void FMAPOBSTR_aset_I(FMAPOBSTR self, INT ind_1228, TUPOBSTR val_1229) {
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FMAPOBSTR) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_1228, local1, (c_INT_minus_INT_INT_chk(local2,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:38:7\n");
exit(16);
}
if (ind_1228<0||ind_1228>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:38:7\n");
exit(16);
}
self->arr_part[ind_1228] = val_1229;
}
FMAPOBSTR FMAPOBSTR_insert_1222(FMAPOBSTR self, OB k, STR t_1230) {
FMAPOBSTR noname1231;
FMAPOBSTR r_1232;
INT h = ((INT) 0);
INT asm_1233 = ((INT) 0);
OB tk;
OB tk_1234;
INT local0;
INT local1;
INT local2;
INT local3;
INT local4;
r_1232 = self;
if ((r_1232==((FMAPOBSTR) NULL))) {
r_1232 = FMAPOBSTR_alloca(self, 5);
}
else {
local0 = (c_INT_plus_INT_INT_chk(self->hsize,1));
local1 = (c_INT_times_INT_INT_chk(local0,2));
if ((local1>(self->asize))) {
r_1232 = FMAPOBSTR_double(self);
}
}
local2 = FMAPOBSTR_key_ha(r_1232, k);
local3 = (r_1232->asize);
h = (local2&(c_INT_minus_INT_INT_chk(local3,2)));
local4 = (r_1232->asize);
asm_1233 = (c_INT_minus_INT_INT_chk(local4,1));
while (1) {
tk = (TUPOBSTR_blob=FMAPOBSTR_aget_I(r_1232, h)).t1;
if (FMAPOBSTR_key_eq(self, tk, FMAPOBSTR_key_nil_OB(self))) {
goto after_loop;
}
if (FMAPOBSTR_key_eq(self, tk, k)) {
FMAPOBSTR_aset_I(r_1232, h, TUPOBSTR_create_(TUPOBSTR_zero, k, t_1230));
return r_1232;
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop: ;
if ((h==asm_1233)) {
h = 0;
while (1) {
tk_1234 = (TUPOBSTR_blob=FMAPOBSTR_aget_I(r_1232, h)).t1;
if (FMAPOBSTR_key_eq(self, tk_1234, FMAPOBSTR_key_nil_OB(self))) {
goto after_loop_1236;
}
if (FMAPOBSTR_key_eq(self, tk_1234, k)) {
FMAPOBSTR_aset_I(r_1232, h, TUPOBSTR_create_(TUPOBSTR_zero, k, t_1230));
return r_1232;
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop_1236: ;
if (!((h!=asm_1233))) {
fprintf(stderr,"Violation of assertion ../Library/fmap.sa:199:15\n");
exit(16);
}
}
FMAPOBSTR_aset_I(r_1232, h, TUPOBSTR_create_(TUPOBSTR_zero, k, t_1230));
r_1232->hsize = (c_INT_plus_INT_INT_chk(r_1232->hsize,1));
return r_1232;
if (!FMAPOBSTR_invari(self)) {
fprintf(stderr,"Failed invariant FMAP{$OB,STR}::invariant:BOOL ../Library/fmap.sa:180:9\n");
exit(16);
}
}
void BE_force_mangle_(BE self, OB ob_1238, STR s_1239) {
STR x;
STR local0;
x = FMAPOBSTR_get_OB_STR(self->manglemap, ob_1238);
if ((x==((STR) NULL))) {
self->manglemap = FMAPOBSTR_insert_1222(self->manglemap, ob_1238, s_1239);
self->mangleset = FSETSTR_insert_S(self->mangleset, s_1239);
}
else {
if (STR_is_neq_STR_BOOL(x, s_1239)) {
local0 = STR_plus_STR_STR(((STR) &Name_1240), s_1239);
BE_barf_STR(self, STR_plus_STR_STR(local0, ((STR) &couldnotbeassign)));
}
}
}
void BE_insert_built__1241(BE self) {
self->built_in_classes = FSETTP_insert_TP(self->built_in_classes, ((TP) self->prog->tp_builtin->dollar_ob));
self->built_in_classes = FSETTP_insert_TP(self->built_in_classes, ((TP) self->prog->tp_builtin->bool_2));
self->built_in_classes = FSETTP_insert_TP(self->built_in_classes, ((TP) self->prog->tp_builtin->char_5));
self->built_in_classes = FSETTP_insert_TP(self->built_in_classes, ((TP) self->prog->tp_builtin->int_1));
self->built_in_classes = FSETTP_insert_TP(self->built_in_classes, ((TP) self->prog->tp_builtin->flt));
self->built_in_classes = FSETTP_insert_TP(self->built_in_classes, ((TP) self->prog->tp_builtin->fltd));
self->built_in_classes = FSETTP_insert_TP(self->built_in_classes, ((TP) self->prog->tp_builtin->fltx));
self->built_in_classes = FSETTP_insert_TP(self->built_in_classes, ((TP) self->prog->tp_builtin->fltdx));
self->built_in_classes = FSETTP_insert_TP(self->built_in_classes, ((TP) self->prog->tp_builtin->str_4));
self->built_in_classes = FSETTP_insert_TP(self->built_in_classes, ((TP) self->prog->tp_builtin->ext_ob));
self->built_in_classes = FSETTP_insert_TP(self->built_in_classes, ((TP) self->prog->tp_builtin->dollar_rehash));
BE_force_mangle_(self, ((OB) self->prog->tp_builtin->bool_2), ((STR) &BOOL_1242));
BE_force_mangle_(self, ((OB) self->prog->tp_builtin->char_5), ((STR) &CHAR_1243));
BE_force_mangle_(self, ((OB) self->prog->tp_builtin->int_1), ((STR) &INT_1244));
BE_force_mangle_(self, ((OB) self->prog->tp_builtin->flt), ((STR) &FLT_1245));
BE_force_mangle_(self, ((OB) self->prog->tp_builtin->fltd), ((STR) &FLTD_1246));
BE_force_mangle_(self, ((OB) self->prog->tp_builtin->fltx), ((STR) &FLTX_1247));
BE_force_mangle_(self, ((OB) self->prog->tp_builtin->fltdx), ((STR) &FLTDX_1248));
BE_force_mangle_(self, ((OB) self->prog->tp_builtin->str_4), ((STR) &STR_1249));
BE_force_mangle_(self, ((OB) self->prog->tp_builtin->dollar_ob), ((STR) &OB_1250));
BE_force_mangle_(self, ((OB) self->prog->tp_builtin->rout), ((STR) &ROUT_1251));
}
void BE_insert_specia(BE self) {
BE_LEX l;
STR ident1;
STR ident2;
BE_LEX local0;
local0 = ((BE_LEX) NULL);
l = BE_LEX_create_ST(local0, STR_plus_STR_STR(self->prog->options_55->home, ((STR) &SystemEXTERNS)));
while (1) {
ident1 = BE_LEX_get_str_STR(l);
ident2 = BE_LEX_get_str_STR(l);
if ((ident1==((STR) NULL))) {
goto after_loop;
}
else {
if ((ident2==((STR) NULL))) {
BE_barf_STR(self, ((STR) &MalformedEXTERNSfile));
}
else {
self->special_externs = FMAPSTRSTR_inser_586(self->special_externs, ident1, ident2);
}
}
}
after_loop: ;
}
BE BE_create_PROG_BE(BE self, PROG p) {
BE noname1253;
BE res;
BE local0;
local0 = ((BE) sbi_alloc(sizeof(struct BE_struct), BE_tag));
res = local0;
res->prog = p;
res->manglemap = FMAPOBSTR_create(((FMAPOBSTR) NULL));
res->mangleset = FSETSTR_create_F(((FSETSTR) NULL));
res->forbidden = FSETSTR_create_F(((FSETSTR) NULL));
res->special_externs = FMAPSTRSTR_creat(((FMAPSTRSTR) NULL));
res->counter_21 = 1;
res->built_in_routines = FMAPSTRTUPSTRSTR_1033(((FMAPSTRTUPSTRSTR) NULL));
res->built_in_iters = FMAPSTRITER_INLI(((FMAPSTRITER_INLINE) NULL));
res->built_in_classes = FSETTP_create_FSETTP(((FSETTP) NULL));
res->abstract_routs = FLISTAM_ROUT_DEF_1039(((FLISTAM_ROUT_DEF) NULL));
res->bnd_rout_creates = FLISTAM_BND_CREA_1042(((FLISTAM_BND_CREA) NULL));
res->str_count = 1;
res->inlined_sigs = FMAPSIGAM_ROUT_D(((FMAPSIGAM_ROUT_DEF) NULL));
BE_insert_forbid(res);
BE_insert_built_(res);
BE_insert_built__1167(res);
BE_insert_built__1241(res);
BE_insert_specia(res);
return res;
}
void PROG_create_back_end(PROG self) {
self->back_end = BE_create_PROG_BE(((BE) NULL), self);
}
void SFILE_ID_source_FSTR(SFILE_ID self, FSTR source_1254) {
shared_SFILE_ID__1255 = source_1254;
}
FLISTSTR FLISTSTR_create__1256(FLISTSTR self, INT n_1257) {
FLISTSTR noname1258;
FLISTSTR local0;
if (!((n_1257>=1))) {
fprintf(stderr,"Violation of precondition ../Library/flist.sa:57:9\n");
exit(16);
}
local0 = ((FLISTSTR) sbi_arr_alloc(sizeof(struct FLISTSTR_struct), FLISTSTR_tag, sizeof(STR) , n_1257));
local0->asize = n_1257;
return local0;
if (!FLISTSTR_invaria(self)) {
fprintf(stderr,"Failed invariant FLIST{STR}::invariant:BOOL ../Library/flist.sa:57:9\n");
exit(16);
}
}
void SFILE_ID_files_F(SFILE_ID self, FLISTSTR files_1259) {
shared_SFILE_ID__801 = files_1259;
}
FLISTINT FLISTINT_create_(FLISTINT self, INT n_1260) {
FLISTINT noname1261;
FLISTINT local0;
if (!((n_1260>=1))) {
fprintf(stderr,"Violation of precondition ../Library/flist.sa:57:9\n");
exit(16);
}
local0 = ((FLISTINT) sbi_arr_alloc_atomic(sizeof(struct FLISTINT_struct), FLISTINT_tag, sizeof(INT) , n_1260));
local0->asize = n_1260;
return local0;
if (!FLISTINT_invaria(self)) {
fprintf(stderr,"Failed invariant FLIST{INT}::invariant:BOOL ../Library/flist.sa:57:9\n");
exit(16);
}
}
void SFILE_ID_lines_F(SFILE_ID self, FLISTINT lines) {
shared_SFILE_ID_ = lines;
}
BOOL FLISTINT_is_empt(FLISTINT self) {
BOOL noname1262 = ((BOOL) 0);
INT local0;
local0 = FLISTINT_size_INT(self);
return (local0==0);
if (!FLISTINT_invaria(self)) {
fprintf(stderr,"Failed invariant FLIST{INT}::invariant:BOOL ../Library/flist.sa:113:11\n");
exit(16);
}
}
void FLISTINT_aclear(FLISTINT self) {
INT nil = ((INT) 0);
FLISTINT noname1263;
if (!((!((self==((FLISTINT) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:43:9\n");
exit(16);
}
{
struct FLISTINT_aset_INT_frame_struct temp1264_0;
FLISTINT_aset_INT_frame
noname1265 = &temp1264_0;
noname1265->state = 0;
while (1) {
if (noname1265->state == 0) {
noname1263 = self;
noname1265->arg0 = noname1263;
}
noname1265->arg1 = nil;
FLISTINT_aset_INT(noname1265);
if (noname1265->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
}
void FLISTINT_clear(FLISTINT self) {
if (FLISTINT_is_empt(self)) {
return;
}
else {
FLISTINT_aclear(self);
self->loc_17 = 0;
}
if (!FLISTINT_invaria(self)) {
fprintf(stderr,"Failed invariant FLIST{INT}::invariant:BOOL ../Library/flist.sa:117:8\n");
exit(16);
}
}
void FLISTINT_aref_as(FLISTINT self, INT ind_1266, INT val_1267) {
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FLISTINT) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_1266, local1, (c_INT_minus_INT_INT_chk(local2,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:38:7\n");
exit(16);
}
if (ind_1266<0||ind_1266>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:38:7\n");
exit(16);
}
self->arr_part[ind_1266] = val_1267;
}
void FLISTINT_aset_IN(FLISTINT self, INT ind_1268, INT val_1269) {
BOOL local0;
INT local1;
if ((!((self==((FLISTINT) NULL))))) {
local1 = 0;
local0 = INT_is_bet_INT_I(ind_1268, local1, (c_INT_minus_INT_INT_chk(self->loc_17,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/flist.sa:73:7\n");
exit(16);
}
FLISTINT_aref_as(self, ind_1268, val_1269);
if (!FLISTINT_invaria(self)) {
fprintf(stderr,"Failed invariant FLIST{INT}::invariant:BOOL ../Library/flist.sa:73:7\n");
exit(16);
}
}
FLISTINT FLISTINT_push_IN(FLISTINT self, INT e_1270) {
FLISTINT noname1271;
FLISTINT r_1272 = ((FLISTINT) NULL);
FLISTINT noname1273;
FLISTINT noname1274;
FLISTINT local0;
INT local1;
FLISTINT local2;
INT local3;
INT local4;
INT local5;
if ((self==((FLISTINT) NULL))) {
local0 = ((FLISTINT) sbi_arr_alloc_atomic(sizeof(struct FLISTINT_struct), FLISTINT_tag, sizeof(INT) , 5));
local0->asize = 5;
r_1272 = local0;
}
else {
local1 = self->loc_17;
if ((local1<(self->asize))) {
r_1272 = self;
}
else {
local3 = 2;
local2 = ((FLISTINT) sbi_arr_alloc_atomic(sizeof(struct FLISTINT_struct), FLISTINT_tag, sizeof(INT) , (c_INT_times_INT_INT_chk(local3,(self->asize)))));
local2->asize = (c_INT_times_INT_INT_chk(local3,(self->asize)));
r_1272 = local2;
r_1272->loc_17 = self->loc_17;
{
struct FLISTINT_elt_INT_frame_struct temp1275_0;
FLISTINT_elt_INT_frame
noname1276 = &temp1275_0;
struct FLISTINT_aset_INT_frame_struct temp1275_1;
FLISTINT_aset_INT_frame
noname1277 = &temp1275_1;
noname1276->state = 0;
noname1277->state = 0;
while (1) {
if (noname1277->state == 0) {
noname1274 = r_1272;
noname1277->arg0 = noname1274;
}
if (noname1276->state == 0) {
noname1273 = self;
noname1276->arg0 = noname1273;
}
local4 = FLISTINT_elt_INT(noname1276);
if (noname1276->state == -1) goto after_loop;
noname1277->arg1 = local4;
FLISTINT_aset_INT(noname1277);
if (noname1277->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
FLISTINT_clear(self);
}
}
r_1272->loc_17 = (c_INT_plus_INT_INT_chk(r_1272->loc_17,1));
local5 = (c_INT_minus_INT_INT_chk(r_1272->loc_17,1));
FLISTINT_aset_IN(r_1272, local5, e_1270);
return r_1272;
if (!FLISTINT_invaria(self)) {
fprintf(stderr,"Failed invariant FLIST{INT}::invariant:BOOL ../Library/flist.sa:79:7\n");
exit(16);
}
}
void SFILE_ID_pos_INT(SFILE_ID self, INT pos_1278) {
shared_SFILE_ID_pos = pos_1278;
}
void SFILE_ID_column_INT(SFILE_ID self, INT column) {
shared_SFILE_ID__1279 = column;
}
void SFILE_ID_newline(SFILE_ID self, BOOL newline) {
shared_SFILE_ID__1280 = newline;
}
SFILE_ID SFILE_ID_loc_INT(SFILE_ID self, INT loc_1281) {
SFILE_ID local0;
local0 = self;
local0.loc_17 = loc_1281;
return local0;
}
SFILE_ID SFILE_ID_create_(SFILE_ID self, INT loc_1282) {
SFILE_ID noname1283 = SFILE_ID_zero;
SFILE_ID r_1284 = SFILE_ID_zero;
r_1284 = SFILE_ID_loc_INT(r_1284, loc_1282);
return r_1284;
}
SFILE_ID SFILE_ID_no_loca(SFILE_ID self) {
SFILE_ID noname1285 = SFILE_ID_zero;
return SFILE_ID_create_(SFILE_ID_zero, -1);
}
void PROG_set_eloc_SF(PROG self, SFILE_ID l) {
self->eloc = l;
}
BOOL SFILE_ID_open_fi(SFILE_ID self, PROG p, STR name_1286) {
BOOL noname1287 = ((BOOL) 0);
FILE_20 file_1288;
file_1288 = FILE_open_for_re(file_1288, name_1286);
if ((!(FILE_error_BOOL(file_1288)))) {
SFILE_ID_source_FSTR(self, FILE_fstr_FSTR(file_1288));
FILE_close(file_1288);
}
else {
SFILE_ID_source_FSTR(self, ((FSTR) NULL));
}
if ((!((shared_SFILE_ID__1255==((FSTR) NULL))))) {
if ((shared_SFILE_ID__801==((FLISTSTR) NULL))) {
SFILE_ID_files_F(self, FLISTSTR_create__1256(((FLISTSTR) NULL), 64));
SFILE_ID_lines_F(self, FLISTINT_create_(((FLISTINT) NULL), 64));
}
SFILE_ID_files_F(self, FLISTSTR_push_ST(shared_SFILE_ID__801, name_1286));
SFILE_ID_lines_F(self, FLISTINT_push_IN(shared_SFILE_ID_, shared_SFILE_ID__1289));
SFILE_ID_pos_INT(self, 0);
SFILE_ID_column_INT(self, 1);
SFILE_ID_newline(self, TRUE);
return TRUE;
}
PROG_set_eloc_SF(p, SFILE_ID_no_loca(self));
PROG_err_STR(p, STR_plus_STR_STR(((STR) &couldntreadfile), name_1286));
return FALSE;
}
void SFILE_ID_line_INT(SFILE_ID self, INT line_1290) {
shared_SFILE_ID_line = line_1290;
}
void SFILE_ID_line_po(SFILE_ID self, INT line_pos) {
shared_SFILE_ID__1291 = line_pos;
}
CHAR SFILE_ID_next_CHAR(SFILE_ID self) {
CHAR noname1292 = ((CHAR) 0);
CHAR ch = ((CHAR) 0);
CHAR noname1293 = ((CHAR) 0);
INT local0;
INT local1;
INT local2;
local0 = shared_SFILE_ID_pos;
if ((local0<FSTR_size_INT(shared_SFILE_ID__1255))) {
if (shared_SFILE_ID__1280) {
SFILE_ID_line_INT(self, (c_INT_plus_INT_INT_chk(shared_SFILE_ID_line,1)));
SFILE_ID_line_po(self, shared_SFILE_ID_pos);
SFILE_ID_newline(self, FALSE);
SFILE_ID_column_INT(self, 1);
}
ch = FSTR_aget_INT_CHAR(shared_SFILE_ID__1255, shared_SFILE_ID_pos);
SFILE_ID_pos_INT(self, (c_INT_plus_INT_INT_chk(shared_SFILE_ID_pos,1)));
noname1293 = ch;
switch (noname1293) {
case '\t':
local1 = (c_INT_plus_INT_INT_chk(shared_SFILE_ID__1279,8));
local2 = (c_INT_minus_INT_INT_chk(shared_SFILE_ID__1279,1));
SFILE_ID_column_INT(self, (c_INT_minus_INT_INT_chk(local1,(c_INT_mod_INT_INT_chk(local2,8)))));
break;
case '\0':
ch = ' ';
break;
case '\n':
SFILE_ID_newline(self, TRUE);
break;
default: ;
SFILE_ID_newline(self, FALSE);
SFILE_ID_column_INT(self, (c_INT_plus_INT_INT_chk(shared_SFILE_ID__1279,1)));
}
return ch;
}
return shared_SFILE_ID__1294;
}
SCANNER SCANNER_create_P(SCANNER self, PROG p, STR file_1295, BOOL pSather_1296) {
SCANNER noname1297;
SCANNER res = ((SCANNER) NULL);
SCANNER local0;
if (SFILE_ID_open_fi(SFILE_ID_zero, p, file_1295)) {
local0 = ((SCANNER) sbi_alloc(sizeof(struct SCANNER_struct), SCANNER_tag));
res = local0;
res->prog = p;
res->next_8 = SFILE_ID_next_CHAR(SFILE_ID_zero);
res->buf_18 = FSTR_create_INT_FSTR(((FSTR) NULL), 256);
res->backed_up = FALSE;
res->pSather = pSather_1296;
}
else {
res = ((SCANNER) NULL);
}
return res;
}
void SCANNER_fetch(SCANNER self) {
CHAR c_1298 = ((CHAR) 0);
if (self->backed_up) {
c_1298 = self->next_8;
self->next_8 = self->last_char;
self->last_char = c_1298;
self->backed_up = FALSE;
}
else {
self->last_char = self->next_8;
self->next_8 = SFILE_ID_next_CHAR(SFILE_ID_zero);
}
}
void SCANNER_skip_whi(SCANNER self) {
while (1) {
if (CHAR_is_space_BOOL(self->next_8)) {
}
else {
goto after_loop;
}
SCANNER_fetch(self);
}
after_loop: ;
}
BOOL FSTR_is_eq_STR_BOOL(FSTR self, STR s_1300) {
BOOL noname1301 = ((BOOL) 0);
INT s1 = ((INT) 0);
INT s2 = ((INT) 0);
if ((self==((FSTR) NULL))) {
s1 = -1;
}
else {
s1 = self->loc_17;
}
if ((s_1300==((STR) NULL))) {
s2 = -1;
}
else {
s2 = STR_size_INT(s_1300);
}
if ((s1!=s2)) {
return FALSE;
}
return ((memcmp(self->arr_part,s_1300->arr_part,s1)==0 ? TRUE : FALSE));
if (!FSTR_invariant_BOOL(self)) {
fprintf(stderr,"Failed invariant FSTR::invariant:BOOL ../Library/fstr.sa:177:8\n");
exit(16);
}
}
void SCANNER_add_buf_(SCANNER self) {
PROG local0;
local0 = self->prog;
self->lex_value = PROG_ident_for_S(local0, FSTR_str_STR(self->buf_18));
}
TOKEN TOKEN_val_INT_TOKEN(TOKEN self, INT val_1302) {
TOKEN local0;
local0 = self;
local0.val_16 = val_1302;
return local0;
}
TOKEN TOKEN_create_INT(TOKEN self, INT val_1303) {
TOKEN noname1304 = TOKEN_zero;
TOKEN t_1305 = TOKEN_zero;
t_1305 = TOKEN_val_INT_TOKEN(t_1305, val_1303);
return t_1305;
}
TOKEN SCANNER_identifi(SCANNER self) {
TOKEN noname1306 = TOKEN_zero;
CHAR c_1307 = ((CHAR) 0);
INT res = ((INT) 0);
CHAR noname1308 = ((CHAR) 0);
FSTR noname1309;
FSTR noname1310;
FSTR noname1311;
FSTR noname1312;
FSTR noname1313;
FSTR noname1314;
FSTR noname1315;
FSTR noname1316;
FSTR noname1317;
FSTR noname1318;
FSTR noname1319;
FSTR noname1320;
FSTR noname1321;
FSTR noname1322;
FSTR noname1323;
BOOL local0;
BOOL local1;
BOOL local2;
FSTR_clear(self->buf_18);
while (1) {
c_1307 = self->next_8;
if (CHAR_is_alphanum(c_1307)) {
local0 = TRUE;
} else {
local0 = (c_1307=='_');
}
if (local0) {
}
else {
goto after_loop;
}
self->buf_18 = FSTR_plus_CHAR_FSTR(self->buf_18, c_1307);
SCANNER_fetch(self);
}
after_loop: ;
res = shared_SCANNER_i;
noname1308 = FSTR_aget_INT_CHAR(self->buf_18, 0);
switch (noname1308) {
case 'a':
noname1309 = self->buf_18;
if (FSTR_is_eq_STR_BOOL(noname1309, ((STR) &attr_1325))) {
res = shared_SCANNER_a;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1309, ((STR) &and_1326))) {
res = shared_SCANNER_a_1327;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1309, ((STR) &assert_1328))) {
res = shared_SCANNER_a_1329;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1309, ((STR) &as))) {
if (self->pSather) {
res = shared_SCANNER_a_1330;
}
}
}
}
}
break;
case 'b':
if (FSTR_is_eq_STR_BOOL(self->buf_18, ((STR) &break_1331))) {
local1 = (self->next_8=='!');
} else {
local1 = FALSE;
}
if (local1) {
SCANNER_fetch(self);
res = shared_SCANNER_b;
}
break;
case 'c':
noname1310 = self->buf_18;
if (FSTR_is_eq_STR_BOOL(noname1310, ((STR) &case_1332))) {
res = shared_SCANNER_c;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1310, ((STR) &class_1333))) {
res = shared_SCANNER_c_1334;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1310, ((STR) &const_1335))) {
res = shared_SCANNER_c_1336;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1310, ((STR) &cobegin))) {
if (self->pSather) {
res = shared_SCANNER_c_1337;
}
}
}
}
}
break;
case 'd':
if (self->pSather) {
noname1311 = self->buf_18;
if (FSTR_is_eq_STR_BOOL(noname1311, ((STR) &dist))) {
res = shared_SCANNER_d;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1311, ((STR) &do_1338))) {
res = shared_SCANNER_d_1339;
}
}
}
break;
case 'e':
noname1312 = self->buf_18;
if (FSTR_is_eq_STR_BOOL(noname1312, ((STR) &end_1340))) {
res = shared_SCANNER_e;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1312, ((STR) &elsif))) {
res = shared_SCANNER_e_1341;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1312, ((STR) &else_1342))) {
res = shared_SCANNER_e_1343;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1312, ((STR) &exception_1344))) {
res = shared_SCANNER_e_1345;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1312, ((STR) &external_1346))) {
res = shared_SCANNER_e_1347;
}
}
}
}
}
break;
case 'f':
noname1313 = self->buf_18;
if (FSTR_is_eq_STR_BOOL(noname1313, ((STR) &false_1348))) {
res = shared_SCANNER_f;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1313, ((STR) &far_1349))) {
if (self->pSather) {
res = shared_SCANNER_f_1350;
}
}
}
break;
case 'h':
if (FSTR_is_eq_STR_BOOL(self->buf_18, ((STR) &here_1351))) {
local2 = self->pSather;
} else {
local2 = FALSE;
}
if (local2) {
res = shared_SCANNER_h;
}
break;
case 'i':
noname1314 = self->buf_18;
if (FSTR_is_eq_STR_BOOL(noname1314, ((STR) &is))) {
res = shared_SCANNER_i_1352;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1314, ((STR) &if_1353))) {
res = shared_SCANNER_i_1354;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1314, ((STR) &initial_1355))) {
res = shared_SCANNER_i_1356;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1314, ((STR) &include_1357))) {
res = shared_SCANNER_i_1358;
}
}
}
}
break;
case 'I':
if (FSTR_is_eq_STR_BOOL(self->buf_18, ((STR) &ITER))) {
res = shared_SCANNER_I;
}
break;
case 'l':
noname1315 = self->buf_18;
if (FSTR_is_eq_STR_BOOL(noname1315, ((STR) &loop))) {
res = shared_SCANNER_l;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1315, ((STR) &lock_1359))) {
if (self->pSather) {
res = shared_SCANNER_l_1360;
}
}
}
break;
case 'n':
noname1316 = self->buf_18;
if (FSTR_is_eq_STR_BOOL(noname1316, ((STR) &new_1361))) {
res = shared_SCANNER_n;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1316, ((STR) &near))) {
if (self->pSather) {
res = shared_SCANNER_n_1362;
}
}
}
break;
case 'o':
if (FSTR_is_eq_STR_BOOL(self->buf_18, ((STR) &or))) {
res = shared_SCANNER_o;
}
break;
case 'p':
noname1317 = self->buf_18;
if (FSTR_is_eq_STR_BOOL(noname1317, ((STR) &pre_1363))) {
res = shared_SCANNER_p;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1317, ((STR) &post_1364))) {
res = shared_SCANNER_p_1365;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1317, ((STR) &private_1366))) {
res = shared_SCANNER_p_1367;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1317, ((STR) &protect))) {
res = shared_SCANNER_p_1368;
}
}
}
}
break;
case 'q':
if (FSTR_is_eq_STR_BOOL(self->buf_18, ((STR) &quit_1369))) {
res = shared_SCANNER_q;
}
break;
case 'r':
noname1318 = self->buf_18;
if (FSTR_is_eq_STR_BOOL(noname1318, ((STR) &return_1370))) {
res = shared_SCANNER_r;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1318, ((STR) &result_1371))) {
res = shared_SCANNER_r_1372;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1318, ((STR) &readonly))) {
res = shared_SCANNER_r_1373;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1318, ((STR) &raise_1374))) {
res = shared_SCANNER_r_1375;
}
}
}
}
break;
case 'R':
if (FSTR_is_eq_STR_BOOL(self->buf_18, ((STR) &ROUT_1376))) {
res = shared_SCANNER_R;
}
break;
case 's':
noname1319 = self->buf_18;
if (FSTR_is_eq_STR_BOOL(noname1319, ((STR) &self_1377))) {
res = shared_SCANNER_s;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1319, ((STR) &shared_1378))) {
res = shared_SCANNER_s_1379;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1319, ((STR) &spread))) {
if (self->pSather) {
res = shared_SCANNER_s_1380;
}
}
}
}
break;
case 'S':
if (FSTR_is_eq_STR_BOOL(self->buf_18, ((STR) &SAME))) {
res = shared_SCANNER_S;
}
break;
case 't':
noname1320 = self->buf_18;
if (FSTR_is_eq_STR_BOOL(noname1320, ((STR) &then_1381))) {
res = shared_SCANNER_t;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1320, ((STR) &true_1382))) {
res = shared_SCANNER_t_1383;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1320, ((STR) &type_1384))) {
res = shared_SCANNER_t_1385;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1320, ((STR) &typecase))) {
res = shared_SCANNER_t_1386;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1320, ((STR) &try_1387))) {
if (self->pSather) {
res = shared_SCANNER_t_1388;
}
}
}
}
}
}
break;
case 'u':
noname1321 = self->buf_18;
if (FSTR_is_eq_STR_BOOL(noname1321, ((STR) &until_1389))) {
if ((self->next_8=='!')) {
SCANNER_fetch(self);
res = shared_SCANNER_u;
}
}
else {
if (FSTR_is_eq_STR_BOOL(noname1321, ((STR) &unlock))) {
if (self->pSather) {
res = shared_SCANNER_u_1390;
}
}
}
break;
case 'v':
noname1322 = self->buf_18;
if (FSTR_is_eq_STR_BOOL(noname1322, ((STR) &void_1391))) {
res = shared_SCANNER_v;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1322, ((STR) &value_1392))) {
res = shared_SCANNER_v_1393;
}
}
break;
case 'w':
noname1323 = self->buf_18;
if (FSTR_is_eq_STR_BOOL(noname1323, ((STR) &when_1394))) {
res = shared_SCANNER_w;
}
else {
if (FSTR_is_eq_STR_BOOL(noname1323, ((STR) &while_1395))) {
if ((self->next_8=='!')) {
SCANNER_fetch(self);
res = shared_SCANNER_w_1396;
}
}
else {
if (FSTR_is_eq_STR_BOOL(noname1323, ((STR) &where_1397))) {
if (self->pSather) {
res = shared_SCANNER_w_1398;
}
}
else {
if (FSTR_is_eq_STR_BOOL(noname1323, ((STR) &with_1399))) {
if (self->pSather) {
res = shared_SCANNER_w_1400;
}
}
}
}
}
break;
case 'y':
if (FSTR_is_eq_STR_BOOL(self->buf_18, ((STR) &yield_1401))) {
res = shared_SCANNER_y;
}
break;
default: ;
}
if ((res==shared_SCANNER_i)) {
SCANNER_add_buf_(self);
}
return TOKEN_create_INT(TOKEN_zero, res);
}
void SCANNER_comment(SCANNER self) {
INT n_1402 = ((INT) 0);
BOOL local0;
n_1402 = 1;
while (1) {
if ((self->next_8!=shared_SFILE_ID__1294)) {
local0 = (n_1402>0);
} else {
local0 = FALSE;
}
if (local0) {
}
else {
goto after_loop;
}
if ((self->next_8=='(')) {
SCANNER_fetch(self);
if ((self->next_8=='*')) {
SCANNER_fetch(self);
n_1402 = (c_INT_plus_INT_INT_chk(n_1402,1));
}
}
else {
if ((self->next_8=='*')) {
SCANNER_fetch(self);
if ((self->next_8==')')) {
SCANNER_fetch(self);
n_1402 = (c_INT_minus_INT_INT_chk(n_1402,1));
}
}
else {
SCANNER_fetch(self);
}
}
}
after_loop: ;
}
BOOL CHAR_is_lower_BOOL(CHAR self) {
BOOL noname1404 = ((BOOL) 0);
CHAR noname1405 = ((CHAR) 0);
noname1405 = self;
switch (noname1405) {
case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
case 'g':
case 'h':
case 'i':
case 'j':
case 'k':
case 'l':
case 'm':
case 'n':
case 'o':
case 'p':
case 'q':
case 'r':
case 's':
case 't':
case 'u':
case 'v':
case 'w':
case 'x':
case 'y':
case 'z':
return TRUE;
break;
default: ;
}
return FALSE;
}
BOOL SCANNER_is_class(SCANNER self, STR s_1406) {
BOOL noname1407 = ((BOOL) 0);
STR noname1408;
CHAR local0;
STR local1;
CHAR *local0p; INT local0n;
{
BOOL noname1410 = TRUE;
while (1) {
if (noname1410) {
noname1410 = FALSE;
noname1408 = s_1406;
local1 = noname1408;
local0p = local1->arr_part; local0n = local1->asize;
} else {
local0p++; local0n--;
}
if (local0n<=0) goto after_loop; local0 = *local0p;
if (CHAR_is_lower_BOOL(local0)) {
return FALSE;
}
}
}
after_loop: ;
return TRUE;
}
INT INT_max_INT_INT(INT self, INT i) {
INT noname1411 = ((INT) 0);
if ((self>i)) {
return self;
}
return i;
}
SFILE_ID SFILE_ID_source_(SFILE_ID self) {
SFILE_ID noname1412 = SFILE_ID_zero;
INT c_1413 = ((INT) 0);
INT local0;
INT local1;
SFILE_ID local2;
INT local3;
if ((!((shared_SFILE_ID__1255==((FSTR) NULL))))) {
local0 = (c_INT_minus_INT_INT_chk(shared_SFILE_ID__1279,2));
local1 = INT_min_INT_INT(local0, (c_INT_minus_INT_INT_chk(shared_SFILE_ID_B,1)));
c_1413 = INT_max_INT_INT(local1, 1);
local2 = SFILE_ID_zero;
local3 = (c_INT_times_INT_INT_chk(shared_SFILE_ID_line,shared_SFILE_ID_B));
return SFILE_ID_create_(local2, (c_INT_plus_INT_INT_chk(local3,c_1413)));
}
return SFILE_ID_no_loca(self);
}
void SCANNER_error_STR(SCANNER self, STR msg_1414) {
PROG local0;
local0 = self->prog;
PROG_set_eloc_SF(local0, SFILE_ID_source_(SFILE_ID_zero));
PROG_err_STR(self->prog, msg_1414);
}
void SCANNER_backup(SCANNER self) {
CHAR c_1415 = ((CHAR) 0);
c_1415 = self->next_8;
self->next_8 = self->last_char;
self->last_char = c_1415;
self->backed_up = TRUE;
}
INT CHAR_hex_digit_v(CHAR self) {
INT noname1416 = ((INT) 0);
CHAR noname1417 = ((CHAR) 0);
noname1417 = self;
switch (noname1417) {
case '0':
return 0;
break;
case '1':
return 1;
break;
case '2':
return 2;
break;
case '3':
return 3;
break;
case '4':
return 4;
break;
case '5':
return 5;
break;
case '6':
return 6;
break;
case '7':
return 7;
break;
case '8':
return 8;
break;
case '9':
return 9;
break;
case 'a':
return 10;
break;
case 'A':
return 10;
break;
case 'b':
return 11;
break;
case 'B':
return 11;
break;
case 'c':
return 12;
break;
case 'C':
return 12;
break;
case 'd':
return 13;
break;
case 'D':
return 13;
break;
case 'e':
return 14;
break;
case 'E':
return 14;
break;
case 'f':
return 15;
break;
case 'F':
return 15;
break;
default: ;
}
return -1;
}
CHAR SCANNER_characte(SCANNER self) {
CHAR noname1418 = ((CHAR) 0);
CHAR res = ((CHAR) 0);
CHAR noname1419 = ((CHAR) 0);
INT v_1420 = ((INT) 0);
INT d = ((INT) 0);
BOOL local0;
INT local1;
SCANNER_fetch(self);
noname1419 = self->next_8;
switch (noname1419) {
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
v_1420 = 0;
while (1) {
d = CHAR_hex_digit_v(self->next_8);
if ((0<=d)) {
local0 = (d<8);
} else {
local0 = FALSE;
}
if (local0) {
}
else {
goto after_loop;
}
local1 = (c_INT_times_INT_INT_chk(v_1420,8));
v_1420 = (c_INT_plus_INT_INT_chk(local1,d));
SCANNER_fetch(self);
}
after_loop: ;
res = ((CHAR)v_1420);
break;
case 'a':
res = 'a';
SCANNER_fetch(self);
break;
case 'b':
res = '\b';
SCANNER_fetch(self);
break;
case 'f':
res = '\f';
SCANNER_fetch(self);
break;
case 'n':
res = '\n';
SCANNER_fetch(self);
break;
case 'r':
res = '\r';
SCANNER_fetch(self);
break;
case 't':
res = '\t';
SCANNER_fetch(self);
break;
case 'v':
res = '\v';
SCANNER_fetch(self);
break;
case '\\':
res = '\\';
SCANNER_fetch(self);
break;
case '\'':
res = '\'';
SCANNER_fetch(self);
break;
case '\"':
res = '\"';
SCANNER_fetch(self);
break;
default: ;
res = self->next_8;
SCANNER_fetch(self);
}
return res;
}
INTI INTI_u_plus_INTI(INTI self, INTI x, INTI y) {
INTI noname1422;
INT xl = ((INT) 0);
INT yl = ((INT) 0);
INT l = ((INT) 0);
INT i = ((INT) 0);
INT c_1423 = ((INT) 0);
INTI z = ((INTI) NULL);
INTI local0;
INT local1;
INT local2;
xl = INT_abs_INT(x->len_37);
yl = INT_abs_INT(y->len_37);
l = INT_min_INT_INT(xl, yl);
i = 0;
c_1423 = 0;
local1 = INT_max_INT_INT(xl, yl);
local0 = ((INTI) sbi_arr_alloc_atomic(sizeof(struct INTI_struct), INTI_tag, sizeof(INT) , (c_INT_plus_INT_INT_chk(local1,1))));
local0->asize = (c_INT_plus_INT_INT_chk(local1,1));
z = local0;
while (1) {
if ((i<l)) {
}
else {
goto after_loop;
}
local2 = (c_INT_plus_INT_INT_chk(c_1423,INTI_aget_INT_INT(x, i)));
c_1423 = (c_INT_plus_INT_INT_chk(local2,INTI_aget_INT_INT(y, i)));
INTI_aset_INT_INT(z, i, (c_INT_mod_INT_INT_chk(c_1423,shared_INTI_B)));
c_1423 = (c_INT_div_INT_INT_chk(c_1423,shared_INTI_B));
i = (c_INT_plus_INT_INT_chk(i,1));
}
after_loop: ;
while (1) {
if ((i<xl)) {
}
else {
goto after_loop_1425;
}
c_1423 = (c_INT_plus_INT_INT_chk(c_1423,INTI_aget_INT_INT(x, i)));
INTI_aset_INT_INT(z, i, (c_INT_mod_INT_INT_chk(c_1423,shared_INTI_B)));
c_1423 = (c_INT_div_INT_INT_chk(c_1423,shared_INTI_B));
i = (c_INT_plus_INT_INT_chk(i,1));
}
after_loop_1425: ;
while (1) {
if ((i<yl)) {
}
else {
goto after_loop_1427;
}
c_1423 = (c_INT_plus_INT_INT_chk(c_1423,INTI_aget_INT_INT(y, i)));
INTI_aset_INT_INT(z, i, (c_INT_mod_INT_INT_chk(c_1423,shared_INTI_B)));
c_1423 = (c_INT_div_INT_INT_chk(c_1423,shared_INTI_B));
i = (c_INT_plus_INT_INT_chk(i,1));
}
after_loop_1427: ;
if ((c_1423!=0)) {
INTI_aset_INT_INT(z, i, c_1423);
i = (c_INT_plus_INT_INT_chk(i,1));
}
z->len_37 = i;
return z;
}
INT INTI_u_cmp_INTI_(INTI self, INTI x, INTI y) {
INT noname1429 = ((INT) 0);
INT i = ((INT) 0);
INT j = ((INT) 0);
INT z = ((INT) 0);
BOOL local0;
BOOL local1;
INT local2;
INT local3;
i = INT_abs_INT(x->len_37);
j = INT_abs_INT(y->len_37);
if ((i==j)) {
local0 = (i!=0);
} else {
local0 = FALSE;
}
if (local0) {
i = (c_INT_minus_INT_INT_chk(i,1));
while (1) {
if ((i!=0)) {
local2 = INTI_aget_INT_INT(x, i);
local1 = (local2==INTI_aget_INT_INT(y, i));
} else {
local1 = FALSE;
}
if (local1) {
}
else {
goto after_loop;
}
i = (c_INT_minus_INT_INT_chk(i,1));
}
after_loop: ;
local3 = INTI_aget_INT_INT(x, i);
z = (c_INT_minus_INT_INT_chk(local3,INTI_aget_INT_INT(y, i)));
}
else {
z = (c_INT_minus_INT_INT_chk(i,j));
}
return z;
}
INTI INTI_u_minus_INT(INTI self, INTI x, INTI y) {
INTI noname1431;
INT xl = ((INT) 0);
INT yl = ((INT) 0);
INT i = ((INT) 0);
INT c_1432 = ((INT) 0);
INTI z = ((INTI) NULL);
INTI local0;
INT local1;
BOOL local2;
INT local3;
xl = INT_abs_INT(x->len_37);
yl = INT_abs_INT(y->len_37);
i = 0;
c_1432 = 0;
local0 = ((INTI) sbi_arr_alloc_atomic(sizeof(struct INTI_struct), INTI_tag, sizeof(INT) , xl));
local0->asize = xl;
z = local0;
while (1) {
if ((i<yl)) {
}
else {
goto after_loop;
}
local1 = (c_INT_plus_INT_INT_chk(c_1432,INTI_aget_INT_INT(x, i)));
c_1432 = (c_INT_minus_INT_INT_chk(local1,INTI_aget_INT_INT(y, i)));
INTI_aset_INT_INT(z, i, (c_INT_mod_INT_INT_chk(c_1432,shared_INTI_B)));
c_1432 = (c_INT_div_INT_INT_chk(c_1432,shared_INTI_B));
i = (c_INT_plus_INT_INT_chk(i,1));
}
after_loop: ;
while (1) {
if ((i<xl)) {
}
else {
goto after_loop_1434;
}
c_1432 = (c_INT_plus_INT_INT_chk(c_1432,INTI_aget_INT_INT(x, i)));
INTI_aset_INT_INT(z, i, (c_INT_mod_INT_INT_chk(c_1432,shared_INTI_B)));
c_1432 = (c_INT_div_INT_INT_chk(c_1432,shared_INTI_B));
i = (c_INT_plus_INT_INT_chk(i,1));
}
after_loop_1434: ;
while (1) {
if ((i>0)) {
local3 = INTI_aget_INT_INT(z, (c_INT_minus_INT_INT_chk(i,1)));
local2 = (local3==0);
} else {
local2 = FALSE;
}
if (local2) {
}
else {
goto after_loop_1436;
}
i = (c_INT_minus_INT_INT_chk(i,1));
}
after_loop_1436: ;
z->len_37 = i;
return z;
}
INTI INTI_plus_INTI_INTI(INTI self, INTI y) {
INTI noname1438;
INTI z = ((INTI) NULL);
BOOL local0;
INT local1;
local0 = (self->len_37<0);
if (((local0)==((y->len_37<0)))) {
z = INTI_u_plus_INTI(self, self, y);
}
else {
local1 = INTI_u_cmp_INTI_(self, self, y);
if ((local1<0)) {
z = INTI_u_minus_INT(self, y, self);
z->len_37 = INT_negate_INT(z->len_37);
}
else {
z = INTI_u_minus_INT(self, self, y);
}
}
if ((self->len_37<0)) {
z->len_37 = INT_negate_INT(z->len_37);
}
return z;
}
INTI SCANNER_int_lite(SCANNER self, INT base_1439) {
INTI noname1440;
INTI b_1441;
INTI x;
INT d = ((INT) 0);
BOOL local0;
INTI local1;
b_1441 = INTI_create_INT_INTI(((INTI) NULL), base_1439);
x = INTI_create_INT_INTI(((INTI) NULL), 0);
while (1) {
d = CHAR_hex_digit_v(self->next_8);
if ((self->next_8=='_')) {
SCANNER_fetch(self);
}
else {
if ((0<=d)) {
local0 = (d<base_1439);
} else {
local0 = FALSE;
}
if (local0) {
SCANNER_fetch(self);
local1 = INTI_times_INTI_INTI(x, b_1441);
x = INTI_plus_INTI_INTI(local1, INTI_create_INT_INTI(((INTI) NULL), d));
}
else {
goto after_loop;
}
}
}
after_loop: ;
return x;
}
INT CHAR_digit_value_INT(CHAR self) {
INT noname1443 = ((INT) 0);
CHAR noname1444 = ((CHAR) 0);
noname1444 = self;
switch (noname1444) {
case '0':
return 0;
break;
case '1':
return 1;
break;
case '2':
return 2;
break;
case '3':
return 3;
break;
case '4':
return 4;
break;
case '5':
return 5;
break;
case '6':
return 6;
break;
case '7':
return 7;
break;
case '8':
return 8;
break;
case '9':
return 9;
break;
default: ;
}
return -1;
}
INTI INTI_minus_INTI_INTI(INTI self, INTI y) {
INTI noname1445;
INTI z = ((INTI) NULL);
BOOL local0;
INT local1;
local0 = (self->len_37<0);
if (((local0)!=((y->len_37<0)))) {
z = INTI_u_plus_INTI(self, self, y);
}
else {
local1 = INTI_u_cmp_INTI_(self, self, y);
if ((local1<0)) {
z = INTI_u_minus_INT(self, y, self);
z->len_37 = INT_negate_INT(z->len_37);
}
else {
z = INTI_u_minus_INT(self, self, y);
}
}
if ((self->len_37<0)) {
z->len_37 = INT_negate_INT(z->len_37);
}
return z;
}
BOOL INTI_is_neg_BOOL(INTI self) {
BOOL noname1446 = ((BOOL) 0);
return (self->len_37<0);
}
INT INTI_int_INT(INTI self) {
INT noname1447 = ((INT) 0);
INT i = ((INT) 0);
INT z = ((INT) 0);
INT local0;
i = INT_abs_INT(self->len_37);
z = 0;
while (1) {
if ((i>0)) {
}
else {
goto after_loop;
}
i = (c_INT_minus_INT_INT_chk(i,1));
local0 = (c_INT_times_INT_INT_chk(z,shared_INTI_B));
z = (c_INT_plus_INT_INT_chk(local0,INTI_aget_INT_INT(self, i)));
}
after_loop: ;
if ((self->len_37<0)) {
z = INT_negate_INT(z);
}
return z;
}
BOOL INTI_is_zero_BOOL(INTI self) {
BOOL noname1449 = ((BOOL) 0);
return (self->len_37==0);
}
BOOL INTI_is_pos_BOOL(INTI self) {
BOOL noname1450 = ((BOOL) 0);
return (self->len_37>0);
}
INTI INTI_abs_INTI(INTI self) {
INTI noname1451;
INTI z;
if ((self->len_37<0)) {
z = INTI_copy_INTI(self);
z->len_37 = INT_negate_INT(self->len_37);
return z;
}
return self;
}
INTI INTI_u_div_mod_I(INTI self, INTI x, INTI y) {
INTI noname1452;
INT xl = ((INT) 0);
INT yl = ((INT) 0);
INT i = ((INT) 0);
INT j = ((INT) 0);
INT k = ((INT) 0);
INT c_1453 = ((INT) 0);
INT d = ((INT) 0);
INT q = ((INT) 0);
INT y1_1454 = ((INT) 0);
INT y2 = ((INT) 0);
INT local0;
INT local1;
INT local2;
INT local3;
INT local4;
INT local5;
INT local6;
INT local7;
INT local8;
INT local9;
INT local10;
INT local11;
INT local12;
INT local13;
INT local14;
INT local15;
INT local16;
INT local17;
INT local18;
xl = INT_abs_INT(x->len_37);
yl = INT_abs_INT(y->len_37);
x = INTI_copy_INTI(x);
if ((yl==1)) {
i = (c_INT_minus_INT_INT_chk(xl,1));
c_1453 = 0;
d = INTI_aget_INT_INT(y, 0);
while (1) {
if ((i>=0)) {
}
else {
goto after_loop;
}
local0 = (c_INT_times_INT_INT_chk(c_1453,shared_INTI_B));
c_1453 = (c_INT_plus_INT_INT_chk(local0,INTI_aget_INT_INT(x, i)));
local1 = (c_INT_plus_INT_INT_chk(i,1));
INTI_aset_INT_INT(x, local1, (c_INT_div_INT_INT_chk(c_1453,d)));
c_1453 = (c_INT_mod_INT_INT_chk(c_1453,d));
i = (c_INT_minus_INT_INT_chk(i,1));
}
after_loop: ;
INTI_aset_INT_INT(x, 0, c_1453);
}
else {
if ((xl>=yl)) {
INTI_aset_INT_INT(x, xl, 0);
local2 = (c_INT_div_INT_INT_chk(shared_INTI_B,2));
local3 = (c_INT_minus_INT_INT_chk(local2,1));
local4 = (c_INT_div_INT_INT_chk(local3,INTI_aget_INT_INT(y, (c_INT_minus_INT_INT_chk(yl,1)))));
d = (c_INT_plus_INT_INT_chk(local4,1));
if ((d!=1)) {
y = INTI_copy_INTI(y);
i = 0;
c_1453 = 0;
while (1) {
if ((i<xl)) {
}
else {
goto after_loop_1456;
}
c_1453 = (c_INT_plus_INT_INT_chk(c_1453,(c_INT_times_INT_INT_chk(d,INTI_aget_INT_INT(x, i)))));
INTI_aset_INT_INT(x, i, (c_INT_mod_INT_INT_chk(c_1453,shared_INTI_B)));
c_1453 = (c_INT_div_INT_INT_chk(c_1453,shared_INTI_B));
i = (c_INT_plus_INT_INT_chk(i,1));
}
after_loop_1456: ;
INTI_aset_INT_INT(x, i, c_1453);
i = 0;
c_1453 = 0;
while (1) {
if ((i<yl)) {
}
else {
goto after_loop_1458;
}
c_1453 = (c_INT_plus_INT_INT_chk(c_1453,(c_INT_times_INT_INT_chk(d,INTI_aget_INT_INT(y, i)))));
INTI_aset_INT_INT(y, i, (c_INT_mod_INT_INT_chk(c_1453,shared_INTI_B)));
c_1453 = (c_INT_div_INT_INT_chk(c_1453,shared_INTI_B));
i = (c_INT_plus_INT_INT_chk(i,1));
}
after_loop_1458: ;
if (!((c_1453==0))) {
fprintf(stderr,"Violation of assertion ../Library/inti.sa:126:18\n");
exit(16);
}
}
y1_1454 = INTI_aget_INT_INT(y, (c_INT_minus_INT_INT_chk(yl,1)));
y2 = INTI_aget_INT_INT(y, (c_INT_minus_INT_INT_chk(yl,2)));
i = xl;
while (1) {
if ((i>=yl)) {
}
else {
goto after_loop_1460;
}
local5 = INTI_aget_INT_INT(x, i);
if ((local5!=y1_1454)) {
local6 = INTI_aget_INT_INT(x, i);
local7 = (c_INT_times_INT_INT_chk(local6,shared_INTI_B));
local8 = (c_INT_plus_INT_INT_chk(local7,INTI_aget_INT_INT(x, (c_INT_minus_INT_INT_chk(i,1)))));
q = (c_INT_div_INT_INT_chk(local8,y1_1454));
}
else {
q = (c_INT_minus_INT_INT_chk(shared_INTI_B,1));
}
while (1) {
local9 = (c_INT_times_INT_INT_chk(y2,q));
local10 = INTI_aget_INT_INT(x, i);
local11 = (c_INT_times_INT_INT_chk(local10,shared_INTI_B));
local12 = (c_INT_plus_INT_INT_chk(local11,INTI_aget_INT_INT(x, (c_INT_minus_INT_INT_chk(i,1)))));
local13 = (c_INT_minus_INT_INT_chk(local12,(c_INT_times_INT_INT_chk(y1_1454,q))));
local14 = (c_INT_times_INT_INT_chk(local13,shared_INTI_B));
if ((local9>(c_INT_plus_INT_INT_chk(local14,INTI_aget_INT_INT(x, (c_INT_minus_INT_INT_chk(i,2))))))) {
}
else {
goto after_loop_1462;
}
q = (c_INT_minus_INT_INT_chk(q,1));
}
after_loop_1462: ;
j = (c_INT_minus_INT_INT_chk(i,yl));
k = 0;
c_1453 = 0;
while (1) {
if ((k<yl)) {
}
else {
goto after_loop_1464;
}
local15 = (c_INT_plus_INT_INT_chk(c_1453,INTI_aget_INT_INT(x, j)));
c_1453 = (c_INT_minus_INT_INT_chk(local15,(c_INT_times_INT_INT_chk(q,INTI_aget_INT_INT(y, k)))));
INTI_aset_INT_INT(x, j, (c_INT_mod_INT_INT_chk(c_1453,shared_INTI_B)));
c_1453 = (c_INT_div_INT_INT_chk(c_1453,shared_INTI_B));
j = (c_INT_plus_INT_INT_chk(j,1));
k = (c_INT_plus_INT_INT_chk(k,1));
}
after_loop_1464: ;
local16 = (c_INT_plus_INT_INT_chk(c_1453,INTI_aget_INT_INT(x, i)));
if ((local16!=0)) {
j = (c_INT_minus_INT_INT_chk(i,yl));
k = 0;
c_1453 = 0;
while (1) {
if ((k<yl)) {
}
else {
goto after_loop_1466;
}
local17 = (c_INT_plus_INT_INT_chk(c_1453,INTI_aget_INT_INT(x, j)));
c_1453 = (c_INT_plus_INT_INT_chk(local17,INTI_aget_INT_INT(y, k)));
INTI_aset_INT_INT(x, j, (c_INT_mod_INT_INT_chk(c_1453,shared_INTI_B)));
c_1453 = (c_INT_div_INT_INT_chk(c_1453,shared_INTI_B));
j = (c_INT_plus_INT_INT_chk(j,1));
k = (c_INT_plus_INT_INT_chk(k,1));
}
after_loop_1466: ;
INTI_aset_INT_INT(x, i, (c_INT_minus_INT_INT_chk(q,1)));
}
else {
INTI_aset_INT_INT(x, i, q);
}
i = (c_INT_minus_INT_INT_chk(i,1));
}
after_loop_1460: ;
if ((d!=1)) {
i = yl;
c_1453 = 0;
while (1) {
if ((i>0)) {
}
else {
goto after_loop_1468;
}
i = (c_INT_minus_INT_INT_chk(i,1));
local18 = (c_INT_times_INT_INT_chk(c_1453,shared_INTI_B));
c_1453 = (c_INT_plus_INT_INT_chk(local18,INTI_aget_INT_INT(x, i)));
INTI_aset_INT_INT(x, i, (c_INT_div_INT_INT_chk(c_1453,d)));
c_1453 = (c_INT_mod_INT_INT_chk(c_1453,d));
}
after_loop_1468: ;
}
}
}
return x;
}
INTI INTI_get_u_mod_I(INTI self, INTI x, INTI y, INTI q) {
INTI noname1470;
INT i = ((INT) 0);
INTI z;
INT local0;
INT local1;
BOOL local2;
INT local3;
INTI local4;
local0 = INT_abs_INT(x->len_37);
local1 = INT_min_INT_INT(local0, INT_abs_INT(y->len_37));
i = (c_INT_minus_INT_INT_chk(local1,1));
while (1) {
if ((i>=0)) {
local3 = INTI_aget_INT_INT(q, i);
local2 = (local3==0);
} else {
local2 = FALSE;
}
if (local2) {
}
else {
goto after_loop;
}
i = (c_INT_minus_INT_INT_chk(i,1));
}
after_loop: ;
local4 = ((INTI) sbi_arr_alloc_atomic(sizeof(struct INTI_struct), INTI_tag, sizeof(INT) , (c_INT_plus_INT_INT_chk(i,1))));
local4->asize = (c_INT_plus_INT_INT_chk(i,1));
z = local4;
z->len_37 = (c_INT_plus_INT_INT_chk(i,1));
while (1) {
if ((i>=0)) {
}
else {
goto after_loop_1472;
}
INTI_aset_INT_INT(z, i, INTI_aget_INT_INT(q, i));
i = (c_INT_minus_INT_INT_chk(i,1));
}
after_loop_1472: ;
return z;
}
INTI INTI_mod_INTI_INTI(INTI self, INTI y) {
INTI noname1474;
INTI z = ((INTI) NULL);
INT local0;
BOOL local1;
local0 = INT_abs_INT(self->len_37);
if ((local0<INT_abs_INT(y->len_37))) {
z = self;
}
else {
z = INTI_get_u_mod_I(self, self, y, INTI_u_div_mod_I(self, self, y));
if ((self->len_37<0)) {
local1 = (z->len_37!=0);
} else {
local1 = FALSE;
}
if (local1) {
z = INTI_u_minus_INT(self, y, z);
}
}
return z;
}
INTI INTI_gcd_INTI_INTI(INTI self, INTI y) {
INTI noname1475;
if ((y->len_37==0)) {
return INTI_abs_INTI(self);
}
return INTI_gcd_INTI_INTI(y, INTI_mod_INTI_INTI(self, y));
if (!(INTI_is_pos_BOOL(noname1475))) {
fprintf(stderr,"Violation of postcondition ../Library/inti.sa:354:6\n");
exit(16);
}
}
INTI INTI_get_u_div_I(INTI self, INTI x, INTI y, INTI q) {
INTI noname1476;
INT i = ((INT) 0);
INT yl = ((INT) 0);
INTI z;
BOOL local0;
INT local1;
INTI local2;
INT local3;
INT local4;
INT local5;
i = INT_abs_INT(x->len_37);
yl = INT_abs_INT(y->len_37);
while (1) {
if ((i>=yl)) {
local1 = INTI_aget_INT_INT(q, i);
local0 = (local1==0);
} else {
local0 = FALSE;
}
if (local0) {
}
else {
goto after_loop;
}
i = (c_INT_minus_INT_INT_chk(i,1));
}
after_loop: ;
local3 = (c_INT_minus_INT_INT_chk(i,yl));
local2 = ((INTI) sbi_arr_alloc_atomic(sizeof(struct INTI_struct), INTI_tag, sizeof(INT) , (c_INT_plus_INT_INT_chk(local3,1))));
local2->asize = (c_INT_plus_INT_INT_chk(local3,1));
z = local2;
local4 = (c_INT_minus_INT_INT_chk(i,yl));
z->len_37 = (c_INT_plus_INT_INT_chk(local4,1));
while (1) {
if ((i>=yl)) {
}
else {
goto after_loop_1478;
}
local5 = (c_INT_minus_INT_INT_chk(i,yl));
INTI_aset_INT_INT(z, local5, INTI_aget_INT_INT(q, i));
i = (c_INT_minus_INT_INT_chk(i,1));
}
after_loop_1478: ;
return z;
}
INTI INTI_u_times_plu(INTI self, INTI x, INT y, INT c_1480) {
INTI noname1481;
INT xl = ((INT) 0);
INT i = ((INT) 0);
INTI z;
BOOL local0;
BOOL local1;
BOOL local2;
INTI local3;
INT local4;
if ((0<=y)) {
local2 = (y<shared_INTI_B);
} else {
local2 = FALSE;
}
if (local2) {
local1 = (0<=c_1480);
} else {
local1 = FALSE;
}
if (local1) {
local0 = (c_1480<shared_INTI_B);
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/inti.sa:177:23\n");
exit(16);
}
xl = INT_abs_INT(x->len_37);
i = 0;
local3 = ((INTI) sbi_arr_alloc_atomic(sizeof(struct INTI_struct), INTI_tag, sizeof(INT) , (c_INT_plus_INT_INT_chk(xl,1))));
local3->asize = (c_INT_plus_INT_INT_chk(xl,1));
z = local3;
while (1) {
if ((i<xl)) {
}
else {
goto after_loop;
}
local4 = INTI_aget_INT_INT(x, i);
c_1480 = (c_INT_plus_INT_INT_chk(c_1480,(c_INT_times_INT_INT_chk(local4,y))));
INTI_aset_INT_INT(z, i, (c_INT_mod_INT_INT_chk(c_1480,shared_INTI_B)));
c_1480 = (c_INT_div_INT_INT_chk(c_1480,shared_INTI_B));
i = (c_INT_plus_INT_INT_chk(i,1));
}
after_loop: ;
if ((c_1480!=0)) {
INTI_aset_INT_INT(z, i, c_1480);
i = (c_INT_plus_INT_INT_chk(i,1));
}
z->len_37 = i;
return z;
}
INTI INTI_div_INTI_INTI(INTI self, INTI y) {
INTI noname1483;
INTI z = ((INTI) NULL);
INTI qr;
INT local0;
BOOL local1;
BOOL local2;
local0 = INT_abs_INT(self->len_37);
if ((local0<INT_abs_INT(y->len_37))) {
z = INTI_create_INT_INTI(((INTI) NULL), 0);
}
else {
qr = INTI_u_div_mod_I(self, self, y);
z = INTI_get_u_div_I(self, self, y, qr);
if ((self->len_37<0)) {
local1 = (INTI_get_u_mod_I(self, self, y, qr)->len_37!=0);
} else {
local1 = FALSE;
}
if (local1) {
z = INTI_u_times_plu(self, z, 1, 1);
}
local2 = (self->len_37<0);
if (((local2)!=((y->len_37<0)))) {
z->len_37 = INT_negate_INT(z->len_37);
}
}
return z;
}
RAT RAT_u_INTI_RAT(RAT self, INTI u_1484) {
RAT local0;
local0 = self;
local0.u = u_1484;
return local0;
}
RAT RAT_v_INTI_RAT(RAT self, INTI v_1485) {
RAT local0;
local0 = self;
local0.v = v_1485;
return local0;
}
RAT RAT_create_INTI_(RAT self, INTI u_1486, INTI v_1487) {
RAT noname1488 = RAT_zero;
INTI g_1489;
RAT r_1490 = RAT_zero;
RAT local0;
if (!((!(INTI_is_zero_BOOL(v_1487))))) {
fprintf(stderr,"Violation of assertion ../Library/rat.sa:28:12\n");
exit(16);
}
if (INTI_is_zero_BOOL(u_1486)) {
v_1487 = INTI_create_INT_INTI(((INTI) NULL), 1);
}
else {
g_1489 = INTI_gcd_INTI_INTI(u_1486, v_1487);
if (INTI_is_neg_BOOL(v_1487)) {
g_1489 = INTI_negate_INTI(g_1489);
}
u_1486 = INTI_div_INTI_INTI(u_1486, g_1489);
v_1487 = INTI_div_INTI_INTI(v_1487, g_1489);
}
if (!(INTI_is_pos_BOOL(v_1487))) {
fprintf(stderr,"Violation of assertion ../Library/rat.sa:34:12\n");
exit(16);
}
local0 = RAT_u_INTI_RAT(r_1490, u_1486);
return RAT_v_INTI_RAT(local0, v_1487);
}
RAT RAT_create_INTI_RAT(RAT self, INTI u_1491) {
RAT noname1492 = RAT_zero;
RAT r_1493 = RAT_zero;
RAT local0;
local0 = RAT_u_INTI_RAT(r_1493, u_1491);
return RAT_v_INTI_RAT(local0, INTI_create_INT_INTI(((INTI) NULL), 1));
}
TOKEN SCANNER_number_TOKEN(SCANNER self) {
TOKEN noname1494 = TOKEN_zero;
INT res = ((INT) 0);
INT d = ((INT) 0);
INTI m;
INTI e_1495;
INT ec = ((INT) 0);
INTI ten;
BOOL neg_1496 = ((BOOL) 0);
BOOL local0;
INTI local1;
RAT local2;
INTI local3;
RAT local4;
INTI local5;
res = shared_SCANNER_l_1497;
d = 10;
if ((self->next_8=='0')) {
SCANNER_fetch(self);
if ((self->next_8=='b')) {
SCANNER_fetch(self);
d = 2;
}
else {
if ((self->next_8=='o')) {
SCANNER_fetch(self);
d = 8;
}
else {
if ((self->next_8=='x')) {
SCANNER_fetch(self);
d = 16;
}
}
}
}
m = SCANNER_int_lite(self, d);
e_1495 = INTI_create_INT_INTI(((INTI) NULL), 0);
if ((self->next_8=='.')) {
local0 = (d==10);
} else {
local0 = FALSE;
}
if (local0) {
SCANNER_fetch(self);
d = CHAR_digit_value_INT(self->next_8);
if ((d>=0)) {
ec = 0;
ten = INTI_create_INT_INTI(((INTI) NULL), 10);
while (1) {
if ((self->next_8=='_')) {
SCANNER_fetch(self);
}
else {
if ((d>=0)) {
SCANNER_fetch(self);
local1 = INTI_times_INTI_INTI(m, ten);
m = INTI_plus_INTI_INTI(local1, INTI_create_INT_INTI(((INTI) NULL), d));
ec = (c_INT_minus_INT_INT_chk(ec,1));
}
else {
goto after_loop;
}
}
d = CHAR_digit_value_INT(self->next_8);
}
after_loop: ;
e_1495 = INTI_create_INT_INTI(((INTI) NULL), ec);
if ((self->next_8=='e')) {
SCANNER_fetch(self);
neg_1496 = FALSE;
if ((self->next_8=='-')) {
SCANNER_fetch(self);
neg_1496 = TRUE;
}
d = CHAR_digit_value_INT(self->next_8);
if ((d>=0)) {
if (neg_1496) {
e_1495 = INTI_minus_INTI_INTI(e_1495, SCANNER_int_lite(self, 10));
}
else {
e_1495 = INTI_plus_INTI_INTI(e_1495, SCANNER_int_lite(self, 10));
}
}
else {
SCANNER_error_STR(self, ((STR) &malformedfloatin));
}
}
res = shared_SCANNER_l_1499;
}
else {
SCANNER_backup(self);
}
}
if (INTI_is_neg_BOOL(e_1495)) {
local2 = RAT_zero;
local3 = INTI_create_INT_INTI(((INTI) NULL), 10);
self->num_value = RAT_create_INTI_(local2, m, INTI_pow_INT_INTI(local3, INT_negate_INT(INTI_int_INT(e_1495))));
}
else {
local4 = RAT_zero;
local5 = INTI_create_INT_INTI(((INTI) NULL), 10);
self->num_value = RAT_create_INTI_RAT(local4, INTI_times_INTI_INTI(m, INTI_pow_INT_INTI(local5, INTI_int_INT(e_1495))));
}
self->value_type = shared_TR_FLT_LI;
if ((self->next_8=='i')) {
SCANNER_fetch(self);
self->value_type = shared_TR_FLT_LI_1500;
}
else {
if ((res==shared_SCANNER_l_1499)) {
if ((self->next_8=='d')) {
SCANNER_fetch(self);
if ((self->next_8=='x')) {
SCANNER_fetch(self);
self->value_type = shared_TR_FLT_LI_1501;
}
else {
self->value_type = shared_TR_FLT_LI_1502;
}
}
else {
if ((self->next_8=='x')) {
SCANNER_fetch(self);
self->value_type = shared_TR_FLT_LI_1503;
}
}
}
}
return TOKEN_create_INT(TOKEN_zero, res);
}
TOKEN SCANNER_token_TOKEN(SCANNER self) {
TOKEN noname1504 = TOKEN_zero;
BOOL whitespace = ((BOOL) 0);
INT res = ((INT) 0);
CHAR noname1505 = ((CHAR) 0);
BOOL local0;
PROG local1;
BOOL local2;
BOOL local3;
BOOL local4;
FSTR local5;
STR local6;
STR local7;
whitespace = FALSE;
res = shared_SCANNER_n_1506;
while (1) {
noname1505 = self->next_8;
switch (noname1505) {
case '\0':
res = shared_SCANNER_e_1508;
break;
case '\n':
whitespace = TRUE;
SCANNER_skip_whi(self);
break;
case ' ':
whitespace = TRUE;
SCANNER_skip_whi(self);
break;
case '\t':
whitespace = TRUE;
SCANNER_skip_whi(self);
break;
case '\b':
whitespace = TRUE;
SCANNER_skip_whi(self);
break;
case '\r':
whitespace = TRUE;
SCANNER_skip_whi(self);
break;
case '\v':
whitespace = TRUE;
SCANNER_skip_whi(self);
break;
case 'a':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'b':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'c':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'd':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'e':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'f':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'g':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'h':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'i':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'j':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'k':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'l':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'm':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'n':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'o':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'p':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'q':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'r':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 's':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 't':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'u':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'v':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'w':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'x':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'y':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'z':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'A':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'B':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'C':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'D':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'E':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'F':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'G':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'H':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'I':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'J':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'K':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'L':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'M':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'N':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'O':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'P':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'Q':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'R':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'S':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'T':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'U':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'V':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'W':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'X':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'Y':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case 'Z':
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
break;
case '(':
SCANNER_fetch(self);
if ((self->next_8=='*')) {
SCANNER_fetch(self);
SCANNER_comment(self);
}
else {
res = shared_SCANNER_l_1509;
}
break;
case ')':
SCANNER_fetch(self);
res = shared_SCANNER_r_1510;
break;
case '[':
SCANNER_fetch(self);
res = shared_SCANNER_l_1511;
break;
case ']':
SCANNER_fetch(self);
res = shared_SCANNER_r_1512;
break;
case '{':
SCANNER_fetch(self);
res = shared_SCANNER_l_1513;
break;
case '}':
SCANNER_fetch(self);
res = shared_SCANNER_r_1514;
break;
case ',':
SCANNER_fetch(self);
res = shared_SCANNER_c_1515;
break;
case '.':
SCANNER_fetch(self);
res = shared_SCANNER_d_1516;
break;
case ';':
SCANNER_fetch(self);
res = shared_SCANNER_s_1517;
break;
case '$':
SCANNER_fetch(self);
if (CHAR_is_upper_BOOL(self->next_8)) {
res = (TOKEN_blob=SCANNER_identifi(self)).val_16;
if ((res==shared_SCANNER_i)) {
local0 = SCANNER_is_class(self, self->lex_value.str_4);
} else {
local0 = FALSE;
}
if (local0) {
local1 = self->prog;
self->lex_value = PROG_ident_for_S(local1, STR_plus_STR_STR(((STR) &name_1518), self->lex_value.str_4));
res = shared_SCANNER_t_1519;
}
}
if ((res!=shared_SCANNER_t_1519)) {
SCANNER_error_STR(self, ((STR) &withouttypename));
}
break;
case '+':
SCANNER_fetch(self);
res = shared_SCANNER_p_1520;
break;
case '-':
SCANNER_fetch(self);
if ((self->next_8=='-')) {
while (1) {
SCANNER_fetch(self);
if ((self->next_8=='\n')) {
local2 = TRUE;
} else {
local2 = (self->next_8==shared_SFILE_ID__1294);
}
if (local2) {
goto after_loop_1521;
}
}
after_loop_1521: ;
if ((self->next_8=='\n')) {
SCANNER_fetch(self);
}
else {
res = shared_SCANNER_e_1508;
}
}
else {
if ((self->next_8=='>')) {
SCANNER_fetch(self);
res = shared_SCANNER_t_1523;
}
else {
res = shared_SCANNER_m;
}
}
break;
case '*':
SCANNER_fetch(self);
res = shared_SCANNER_t_1524;
break;
case '#':
SCANNER_fetch(self);
res = shared_SCANNER_s_1525;
break;
case '^':
SCANNER_fetch(self);
res = shared_SCANNER_p_1526;
break;
case '%':
SCANNER_fetch(self);
res = shared_SCANNER_m_1527;
break;
case '|':
SCANNER_fetch(self);
res = shared_SCANNER_v_1528;
break;
case '!':
SCANNER_fetch(self);
if (whitespace) {
res = shared_SCANNER_b_1529;
}
else {
res = shared_SCANNER_i_1530;
}
break;
case '_':
SCANNER_fetch(self);
res = shared_SCANNER_u_1531;
break;
case '=':
SCANNER_fetch(self);
res = shared_SCANNER_i_1532;
break;
case ':':
SCANNER_fetch(self);
if ((self->next_8==':')) {
SCANNER_fetch(self);
if ((self->next_8=='=')) {
res = shared_SCANNER_c_1533;
SCANNER_backup(self);
}
else {
res = shared_SCANNER_d_1534;
}
}
else {
if ((self->next_8=='=')) {
SCANNER_fetch(self);
res = shared_SCANNER_a_1535;
}
else {
if ((self->next_8=='-')) {
local3 = self->pSather;
} else {
local3 = FALSE;
}
if (local3) {
res = shared_SCANNER_f_1536;
}
else {
res = shared_SCANNER_c_1533;
}
}
}
break;
case '/':
SCANNER_fetch(self);
if ((self->next_8=='=')) {
SCANNER_fetch(self);
res = shared_SCANNER_i_1537;
}
else {
res = shared_SCANNER_q_1538;
}
break;
case '<':
SCANNER_fetch(self);
if ((self->next_8=='=')) {
SCANNER_fetch(self);
res = shared_SCANNER_i_1539;
}
else {
res = shared_SCANNER_i_1540;
}
break;
case '>':
SCANNER_fetch(self);
if ((self->next_8=='=')) {
SCANNER_fetch(self);
res = shared_SCANNER_i_1541;
}
else {
res = shared_SCANNER_i_1542;
}
break;
case '~':
SCANNER_fetch(self);
res = shared_SCANNER_n_1543;
break;
case '\'':
SCANNER_fetch(self);
if ((self->next_8=='\\')) {
self->char_value = SCANNER_characte(self);
}
else {
self->char_value = self->next_8;
SCANNER_fetch(self);
}
if ((self->next_8!='\'')) {
SCANNER_error_STR(self, ((STR) &malformedcharact));
}
SCANNER_fetch(self);
res = shared_SCANNER_l_1544;
break;
case '\"':
SCANNER_fetch(self);
FSTR_clear(self->buf_18);
while (1) {
while (1) {
if ((self->next_8=='\"')) {
local4 = TRUE;
} else {
local4 = (self->next_8=='\n');
}
if (local4) {
goto after_loop_1547;
}
if ((self->next_8=='\\')) {
local5 = self->buf_18;
self->buf_18 = FSTR_plus_CHAR_FSTR(local5, SCANNER_characte(self));
}
else {
self->buf_18 = FSTR_plus_CHAR_FSTR(self->buf_18, self->next_8);
SCANNER_fetch(self);
}
}
after_loop_1547: ;
if ((self->next_8=='\n')) {
SCANNER_error_STR(self, ((STR) &unterminatedSTRl));
goto after_loop_1545;
}
SCANNER_fetch(self);
SCANNER_skip_whi(self);
if ((self->next_8!='\"')) {
goto after_loop_1545;
}
SCANNER_fetch(self);
}
after_loop_1545: ;
SCANNER_add_buf_(self);
res = shared_SCANNER_l_1549;
break;
case '0':
res = (TOKEN_blob=SCANNER_number_TOKEN(self)).val_16;
break;
case '1':
res = (TOKEN_blob=SCANNER_number_TOKEN(self)).val_16;
break;
case '2':
res = (TOKEN_blob=SCANNER_number_TOKEN(self)).val_16;
break;
case '3':
res = (TOKEN_blob=SCANNER_number_TOKEN(self)).val_16;
break;
case '4':
res = (TOKEN_blob=SCANNER_number_TOKEN(self)).val_16;
break;
case '5':
res = (TOKEN_blob=SCANNER_number_TOKEN(self)).val_16;
break;
case '6':
res = (TOKEN_blob=SCANNER_number_TOKEN(self)).val_16;
break;
case '7':
res = (TOKEN_blob=SCANNER_number_TOKEN(self)).val_16;
break;
case '8':
res = (TOKEN_blob=SCANNER_number_TOKEN(self)).val_16;
break;
case '9':
res = (TOKEN_blob=SCANNER_number_TOKEN(self)).val_16;
break;
case '@':
if (self->pSather) {
SCANNER_fetch(self);
res = shared_SCANNER_a_1550;
}
else {
local6 = STR_plus_CHAR_STR(((STR) &unknowncharacter), self->next_8);
SCANNER_error_STR(self, STR_plus_CHAR_STR(local6, '\''));
SCANNER_fetch(self);
}
break;
default: ;
local7 = STR_plus_CHAR_STR(((STR) &unknowncharacter_1551), self->next_8);
SCANNER_error_STR(self, STR_plus_CHAR_STR(local7, '\''));
SCANNER_fetch(self);
}
if ((res==shared_SCANNER_n_1506)) {
}
else {
goto after_loop;
}
}
after_loop: ;
return TOKEN_create_INT(TOKEN_zero, res);
}
PARSER PARSER_create_PR(PARSER self, PROG p, STR file_1552, BOOL pSather_1553) {
PARSER noname1554;
PARSER res = ((PARSER) NULL);
SCANNER s_1555;
PARSER local0;
s_1555 = SCANNER_create_P(((SCANNER) NULL), p, file_1552, pSather_1553);
if ((!((s_1555==((SCANNER) NULL))))) {
local0 = ((PARSER) sbi_alloc(sizeof(struct PARSER_struct), PARSER_tag));
res = local0;
res->prog = p;
res->scanner = s_1555;
res->next_8 = SCANNER_token_TOKEN(res->scanner);
res->entered = FLISTSTR_create__1256(((FLISTSTR) NULL), 64);
}
else {
res = ((PARSER) NULL);
}
return res;
}
void PARSER_enter_STR(PARSER self, STR s_1556) {
self->entered = FLISTSTR_push_ST(self->entered, s_1556);
}
BOOL PARSER_is_type_o(PARSER self, TOKEN t_1557) {
BOOL noname1558 = ((BOOL) 0);
INT noname1559 = ((INT) 0);
noname1559 = t_1557.val_16;
switch (noname1559) {
case 40:
case 94:
case 43:
case 15:
case 9:
return TRUE;
break;
default: ;
}
return FALSE;
}
BOOL TOKEN_is_eq_INT_BOOL(TOKEN self, INT y) {
BOOL noname1560 = ((BOOL) 0);
return (self.val_16==y);
}
TR_CLASS_DEF TR_CLASS_DEF_cre(TR_CLASS_DEF self) {
TR_CLASS_DEF noname1561;
TR_CLASS_DEF local0;
local0 = ((TR_CLASS_DEF) sbi_alloc(sizeof(struct TR_CLASS_DEF_struct), TR_CLASS_DEF_tag));
return local0;
}
SFILE_ID PARSER_source_lo(PARSER self) {
SFILE_ID noname1562 = SFILE_ID_zero;
return SFILE_ID_source_(SFILE_ID_zero);
}
BOOL TOKEN_is_neq_INT(TOKEN self, INT y) {
BOOL noname1563 = ((BOOL) 0);
return (self.val_16!=y);
}
STR TOKEN_str_STR(TOKEN self) {
STR noname1564;
STR res = ((STR) NULL);
INT noname1565 = ((INT) 0);
noname1565 = self.val_16;
switch (noname1565) {
case 0:
res = ((STR) &endoffile);
break;
case 1:
res = ((STR) &nullcharacter);
break;
case 2:
res = ((STR) &anidentifier);
break;
case 3:
res = ((STR) &anabstracttypename);
break;
case 4:
res = ((STR) &and_1566);
break;
case 5:
res = ((STR) &assert_1567);
break;
case 6:
res = ((STR) &attr_1568);
break;
case 7:
res = ((STR) &break_1569);
break;
case 8:
res = ((STR) &case_1570);
break;
case 9:
res = ((STR) &class_1571);
break;
case 10:
res = ((STR) &const_1572);
break;
case 11:
res = ((STR) &else_1573);
break;
case 12:
res = ((STR) &elsif_1574);
break;
case 13:
res = ((STR) &end_1575);
break;
case 14:
res = ((STR) &exception_1576);
break;
case 15:
res = ((STR) &external_1577);
break;
case 16:
res = ((STR) &false_1578);
break;
case 17:
res = ((STR) &if_1579);
break;
case 18:
res = ((STR) &include_1580);
break;
case 19:
res = ((STR) &initial_1581);
break;
case 20:
res = ((STR) &is_1582);
break;
case 21:
res = ((STR) &ITER_1583);
break;
case 22:
res = ((STR) &loop_1584);
break;
case 23:
res = ((STR) &new_1585);
break;
case 24:
res = ((STR) &or_1586);
break;
case 25:
res = ((STR) &post_1587);
break;
case 26:
res = ((STR) &pre_1588);
break;
case 27:
res = ((STR) &private_1589);
break;
case 28:
res = ((STR) &protect_1590);
break;
case 29:
res = ((STR) &quit_1591);
break;
case 30:
res = ((STR) &raise_1592);
break;
case 31:
res = ((STR) &readonly_1593);
break;
case 33:
res = ((STR) &return_1594);
break;
case 34:
res = ((STR) &ROUT_1595);
break;
case 35:
res = ((STR) &SAME_1596);
break;
case 36:
res = ((STR) &self_1597);
break;
case 37:
res = ((STR) &shared_1598);
break;
case 38:
res = ((STR) &then_1599);
break;
case 39:
res = ((STR) &true_1600);
break;
case 40:
res = ((STR) &type_1601);
break;
case 41:
res = ((STR) &typecase_1602);
break;
case 43:
res = ((STR) &value_1603);
break;
case 44:
res = ((STR) &void_1604);
break;
case 45:
res = ((STR) &when_1605);
break;
case 46:
res = ((STR) &while_1606);
break;
case 47:
res = ((STR) &yield_1607);
break;
case 48:
res = ((STR) &anintegerliteral);
break;
case 49:
res = ((STR) &afloatingpointli);
break;
case 50:
res = ((STR) &astringliteral);
break;
case 51:
res = ((STR) &acharacterliteral);
break;
case 52:
res = ((STR) &aleftparenthesis);
break;
case 53:
res = ((STR) &arightparenthesis);
break;
case 54:
res = ((STR) &aleftbracket);
break;
case 55:
res = ((STR) &arightbracket);
break;
case 56:
res = ((STR) &aleftbrace);
break;
case 57:
res = ((STR) &arightbrace);
break;
case 58:
res = ((STR) &acomma);
break;
case 59:
res = ((STR) &adot);
break;
case 60:
res = ((STR) &asemicolon);
break;
case 61:
res = ((STR) &acolon);
break;
case 62:
res = ((STR) &anunderscore_);
break;
case 63:
res = ((STR) &aplus);
break;
case 64:
res = ((STR) &aminus);
break;
case 65:
res = ((STR) &anasterisk);
break;
case 66:
res = ((STR) &aslash);
break;
case 67:
res = ((STR) &alessthan);
break;
case 68:
res = ((STR) &agreaterthan);
break;
case 69:
res = ((STR) &asharp);
break;
case 70:
res = ((STR) &anexclamationmark);
break;
case 71:
res = ((STR) &anexclamationmar_1608);
break;
case 72:
res = ((STR) &acarat);
break;
case 73:
res = ((STR) &apercent);
break;
case 74:
res = ((STR) &averticalbar);
break;
case 75:
res = ((STR) &anotequals);
break;
case 76:
res = ((STR) &alessthanorequals);
break;
case 77:
res = ((STR) &agreaterthanorequals);
break;
case 78:
res = ((STR) &anassignoperator);
break;
case 80:
res = ((STR) &atransform);
break;
case 81:
res = ((STR) &aequals);
break;
case 82:
res = ((STR) &anot);
break;
case 83:
res = ((STR) &afork);
break;
case 84:
res = ((STR) &lock_1609);
break;
case 85:
res = ((STR) &unlock_1610);
break;
case 86:
res = ((STR) &try_1611);
break;
case 87:
res = ((STR) &cobegin_1612);
break;
case 88:
res = ((STR) &with_1613);
break;
case 89:
res = ((STR) &aat);
break;
case 90:
res = ((STR) &here_1614);
break;
case 91:
res = ((STR) &where_1615);
break;
case 92:
res = ((STR) &near_1616);
break;
case 93:
res = ((STR) &far_1617);
break;
case 94:
res = ((STR) &spread_1618);
break;
case 95:
res = ((STR) &dist_1619);
break;
case 96:
res = ((STR) &do_1620);
break;
case 97:
res = ((STR) &as_1621);
break;
default: ;
res = ((STR) &unknowntoken);
}
return res;
}
STR FLISTSTR_top_STR(FLISTSTR self) {
STR noname1622;
INT local0;
local0 = FLISTSTR_size_INT(self);
if ((local0==0)) {
return ((STR) NULL);
}
return FLISTSTR_aget_IN(self, (c_INT_minus_INT_INT_chk(self->loc_17,1)));
if (!FLISTSTR_invaria(self)) {
fprintf(stderr,"Failed invariant FLIST{STR}::invariant:BOOL ../Library/flist.sa:96:6\n");
exit(16);
}
}
void PARSER_error_STR(PARSER self, STR msg_1623) {
PROG local0;
PROG local1;
STR local2;
STR local3;
local0 = self->prog;
PROG_set_eloc_SF(local0, PARSER_source_lo(self));
local1 = self->prog;
local2 = STR_plus_STR_STR(msg_1623, ((STR) &in_1624));
local3 = STR_plus_STR_STR(local2, FLISTSTR_top_STR(self->entered));
PROG_err_STR(local1, STR_plus_CHAR_STR(local3, ')'));
}
void PARSER_exp_error_STR(PARSER self, STR msg_1625) {
STR local0;
local0 = STR_plus_STR_STR(msg_1625, ((STR) &expectedbutfound));
PARSER_error_STR(self, STR_plus_STR_STR(local0, TOKEN_str_STR(self->next_8)));
}
void PARSER_fetch(PARSER self) {
self->next_8 = SCANNER_token_TOKEN(self->scanner);
}
void PARSER_match_INT(PARSER self, INT t_1626) {
if (TOKEN_is_neq_INT(self->next_8, t_1626)) {
PARSER_exp_error_STR(self, TOKEN_str_STR(TOKEN_create_INT(TOKEN_zero, t_1626)));
}
PARSER_fetch(self);
}
BOOL PARSER_check_INT(PARSER self, INT t_1627) {
BOOL noname1628 = ((BOOL) 0);
if (TOKEN_is_eq_INT_BOOL(self->next_8, t_1627)) {
PARSER_fetch(self);
return TRUE;
}
return FALSE;
}
IDENT PARSER_ident_IDENT(PARSER self) {
IDENT noname1629 = IDENT_zero;
return self->scanner->lex_value;
}
TR_PARAM_DEC TR_PARAM_DEC_cre(TR_PARAM_DEC self) {
TR_PARAM_DEC noname1630;
TR_PARAM_DEC local0;
local0 = ((TR_PARAM_DEC) sbi_alloc(sizeof(struct TR_PARAM_DEC_struct), TR_PARAM_DEC_tag));
return local0;
}
BOOL PARSER_is_class_(PARSER self, IDENT x) {
BOOL noname1631 = ((BOOL) 0);
return SCANNER_is_class(((SCANNER) NULL), x.str_4);
}
TR_TYPE_SPEC TR_TYPE_SPEC_cre(TR_TYPE_SPEC self) {
TR_TYPE_SPEC noname1632;
TR_TYPE_SPEC local0;
local0 = ((TR_TYPE_SPEC) sbi_alloc(sizeof(struct TR_TYPE_SPEC_struct), TR_TYPE_SPEC_tag));
return local0;
}
void TR_TYPE_SPEC_app(TR_TYPE_SPEC self, TR_TYPE_SPEC l) {
TR_TYPE_SPEC last_1633;
if (!((!((self==((TR_TYPE_SPEC) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/next.sa:50:9\n");
exit(16);
}
if ((self->next_8==((TR_TYPE_SPEC) NULL))) {
self->next_8 = l;
return;
}
last_1633 = self->next_8;
while (1) {
if ((last_1633->next_8==((TR_TYPE_SPEC) NULL))) {
goto after_loop;
}
last_1633 = last_1633->next_8;
}
after_loop: ;
last_1633->next_8 = l;
}
STR FLISTSTR_pop_STR(FLISTSTR self) {
STR noname1635;
STR r_1636;
INT local0;
INT local1;
local0 = FLISTSTR_size_INT(self);
if ((local0==0)) {
return ((STR) NULL);
}
r_1636 = FLISTSTR_aget_IN(self, (c_INT_minus_INT_INT_chk(self->loc_17,1)));
local1 = (c_INT_minus_INT_INT_chk(self->loc_17,1));
FLISTSTR_aset_IN(self, local1, ((STR) NULL));
self->loc_17 = (c_INT_minus_INT_INT_chk(self->loc_17,1));
return r_1636;
if (!FLISTSTR_invaria(self)) {
fprintf(stderr,"Failed invariant FLIST{STR}::invariant:BOOL ../Library/flist.sa:90:6\n");
exit(16);
}
}
void PARSER_exit(PARSER self) {
STR s_1637;
s_1637 = FLISTSTR_pop_STR(self->entered);
}
TR_TYPE_SPEC PARSER_type_spec(PARSER self) {
TR_TYPE_SPEC noname1638;
TR_TYPE_SPEC res;
PARSER_enter_STR(self, ((STR) &listoftypespecif));
res = PARSER_type_spec_1639(self);
while (1) {
if (TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_co)) {
}
else {
goto after_loop;
}
PARSER_fetch(self);
TR_TYPE_SPEC_app(res, PARSER_type_spec_1639(self));
}
after_loop: ;
PARSER_exit(self);
return res;
}
TR_TYPE_SPEC PARSER_type_spec_1639(PARSER self) {
TR_TYPE_SPEC noname1641;
TR_TYPE_SPEC res;
TR_TYPE_SPEC tp_1642;
BOOL local0;
BOOL local1;
BOOL local2;
PARSER_enter_STR(self, ((STR) &typespecification));
res = TR_TYPE_SPEC_cre(((TR_TYPE_SPEC) NULL));
res->source_38 = PARSER_source_lo(self);
if (PARSER_check_INT(self, shared_PARSER_SA)) {
res->kind = shared_TR_TYPE_S;
}
else {
if (TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_ty)) {
local0 = TRUE;
} else {
local0 = TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_id);
}
if (local0) {
if (TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_id)) {
local1 = (!(PARSER_is_class_(self, PARSER_ident_IDENT(self))));
} else {
local1 = FALSE;
}
if (local1) {
PARSER_error_STR(self, ((STR) &classnamemustbea));
}
res->kind = shared_TR_TYPE_S_1643;
res->name_19 = PARSER_ident_IDENT(self);
PARSER_fetch(self);
if (PARSER_check_INT(self, shared_PARSER_lb)) {
res->params = PARSER_type_spec(self);
PARSER_match_INT(self, shared_PARSER_rb);
}
}
else {
if (PARSER_check_INT(self, shared_PARSER_RO)) {
res->kind = shared_TR_TYPE_S_1644;
}
else {
if (PARSER_check_INT(self, shared_PARSER_IT)) {
res->kind = shared_TR_TYPE_S_1645;
}
else {
PARSER_exp_error_STR(self, ((STR) &typespecifier));
}
}
if (PARSER_check_INT(self, shared_PARSER_lb)) {
while (1) {
tp_1642 = PARSER_type_spec_1639(self);
if (PARSER_check_INT(self, shared_PARSER_ba)) {
local2 = TRUE;
} else {
local2 = PARSER_check_INT(self, shared_PARSER_it);
}
if (local2) {
if ((res->kind==shared_TR_TYPE_S_1645)) {
tp_1642->is_hot = TRUE;
}
else {
PARSER_error_STR(self, ((STR) &nohotargumentsin));
}
}
if ((res->params==((TR_TYPE_SPEC) NULL))) {
res->params = tp_1642;
}
else {
TR_TYPE_SPEC_app(res->params, tp_1642);
}
if (PARSER_check_INT(self, shared_PARSER_co)) {
}
else {
goto after_loop;
}
}
after_loop: ;
PARSER_match_INT(self, shared_PARSER_rb);
}
if (PARSER_check_INT(self, shared_PARSER_co_1647)) {
res->ret = PARSER_type_spec_1639(self);
}
}
}
PARSER_exit(self);
return res;
}
TR_PARAM_DEC PARSER_param_dec(PARSER self) {
TR_PARAM_DEC noname1648;
TR_PARAM_DEC res;
PARSER_enter_STR(self, ((STR) ¶meterdeclaration));
res = TR_PARAM_DEC_cre(((TR_PARAM_DEC) NULL));
res->source_38 = PARSER_source_lo(self);
PARSER_match_INT(self, shared_PARSER_id);
res->name_19 = PARSER_ident_IDENT(self);
if ((!(PARSER_is_class_(self, res->name_19)))) {
PARSER_exp_error_STR(self, ((STR) &classname));
}
if (PARSER_check_INT(self, shared_PARSER_is)) {
res->type_constraint = PARSER_type_spec_1639(self);
}
PARSER_exit(self);
return res;
}
void TR_PARAM_DEC_app(TR_PARAM_DEC self, TR_PARAM_DEC l) {
TR_PARAM_DEC last_1649;
if (!((!((self==((TR_PARAM_DEC) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/next.sa:50:9\n");
exit(16);
}
if ((self->next_8==((TR_PARAM_DEC) NULL))) {
self->next_8 = l;
return;
}
last_1649 = self->next_8;
while (1) {
if ((last_1649->next_8==((TR_PARAM_DEC) NULL))) {
goto after_loop;
}
last_1649 = last_1649->next_8;
}
after_loop: ;
last_1649->next_8 = l;
}
TR_ROUT_DEF TR_ROUT_DEF_crea(TR_ROUT_DEF self) {
TR_ROUT_DEF noname1651;
TR_ROUT_DEF local0;
local0 = ((TR_ROUT_DEF) sbi_alloc(sizeof(struct TR_ROUT_DEF_struct), TR_ROUT_DEF_tag));
return local0;
}
IDENT PARSER_append_ba(PARSER self, IDENT arg_1652) {
IDENT noname1653 = IDENT_zero;
PROG local0;
local0 = self->prog;
return PROG_ident_for_S(local0, STR_plus_STR_STR(arg_1652.str_4, ((STR) &name_1654)));
}
IDENT PARSER_rout_or_i(PARSER self) {
IDENT noname1655 = IDENT_zero;
IDENT res = IDENT_zero;
BOOL local0;
if (TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_id)) {
res = PARSER_ident_IDENT(self);
PARSER_fetch(self);
if (TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_it)) {
PARSER_fetch(self);
res = PARSER_append_ba(self, res);
}
else {
if (TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_ba)) {
PARSER_fetch(self);
res = PARSER_append_ba(self, res);
PARSER_error_STR(self, ((STR) ¬acorrectiter_name));
}
}
}
else {
if (TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_ba)) {
local0 = TRUE;
} else {
local0 = TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_it);
}
if (local0) {
PARSER_fetch(self);
res = PROG_ident_for_S(self->prog, ((STR) &name_1656));
}
else {
PARSER_exp_error_STR(self, ((STR) &routineoritername));
res = PROG_ident_for_S(self->prog, ((STR) &a_1657));
}
}
return res;
}
BOOL IDENT_is_iter_BOOL(IDENT self) {
BOOL noname1658 = ((BOOL) 0);
BOOL local0;
STR local1;
INT local2;
CHAR local3;
if ((!((self.str_4==((STR) NULL))))) {
local1 = self.str_4;
local2 = STR_size_INT(self.str_4);
local3 = STR_aget_INT_CHAR(local1, (c_INT_minus_INT_INT_chk(local2,1)));
local0 = (local3=='!');
} else {
local0 = FALSE;
}
return local0;
}
TR_ARG_DEC TR_ARG_DEC_creat(TR_ARG_DEC self) {
TR_ARG_DEC noname1659;
TR_ARG_DEC local0;
local0 = ((TR_ARG_DEC) sbi_alloc(sizeof(struct TR_ARG_DEC_struct), TR_ARG_DEC_tag));
return local0;
}
void TR_ARG_DEC_appen(TR_ARG_DEC self, TR_ARG_DEC l) {
TR_ARG_DEC last_1660;
if (!((!((self==((TR_ARG_DEC) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/next.sa:50:9\n");
exit(16);
}
if ((self->next_8==((TR_ARG_DEC) NULL))) {
self->next_8 = l;
return;
}
last_1660 = self->next_8;
while (1) {
if ((last_1660->next_8==((TR_ARG_DEC) NULL))) {
goto after_loop;
}
last_1660 = last_1660->next_8;
}
after_loop: ;
last_1660->next_8 = l;
}
TR_ARG_DEC PARSER_abstract_(PARSER self, BOOL is_iter_1662) {
TR_ARG_DEC noname1663;
TR_ARG_DEC res = ((TR_ARG_DEC) NULL);
TR_ARG_DEC newa;
TR_TYPE_SPEC tp_1664;
BOOL hot_1665 = ((BOOL) 0);
TR_ARG_DEC p;
BOOL local0;
BOOL local1;
PARSER_enter_STR(self, ((STR) &abstractargument));
while (1) {
newa = TR_ARG_DEC_creat(((TR_ARG_DEC) NULL));
newa->source_38 = PARSER_source_lo(self);
PARSER_match_INT(self, shared_PARSER_id);
newa->name_19 = PARSER_ident_IDENT(self);
if ((res==((TR_ARG_DEC) NULL))) {
res = newa;
}
else {
TR_ARG_DEC_appen(res, newa);
}
if (PARSER_check_INT(self, shared_PARSER_co)) {
}
else {
goto after_loop;
}
}
after_loop: ;
PARSER_match_INT(self, shared_PARSER_co_1647);
tp_1664 = PARSER_type_spec_1639(self);
if (PARSER_check_INT(self, shared_PARSER_ba)) {
local0 = TRUE;
} else {
local0 = PARSER_check_INT(self, shared_PARSER_it);
}
hot_1665 = local0;
if (hot_1665) {
local1 = (!(is_iter_1662));
} else {
local1 = FALSE;
}
if (local1) {
PARSER_error_STR(self, ((STR) &hotargumentsnota));
}
p = res;
while (1) {
if ((p==((TR_ARG_DEC) NULL))) {
goto after_loop_1667;
}
p->tp = tp_1664;
p->is_hot = hot_1665;
p = p->next_8;
}
after_loop_1667: ;
PARSER_exit(self);
return res;
}
TR_ROUT_DEF PARSER_abstract__1669(PARSER self) {
TR_ROUT_DEF noname1670;
TR_ROUT_DEF res;
TR_ARG_DEC local0;
PARSER_enter_STR(self, ((STR) &abstractsignature));
res = TR_ROUT_DEF_crea(((TR_ROUT_DEF) NULL));
res->source_38 = PARSER_source_lo(self);
res->is_abstract = TRUE;
res->name_19 = PARSER_rout_or_i(self);
if (PARSER_check_INT(self, shared_PARSER_lp)) {
PARSER_enter_STR(self, ((STR) &abstractarguments));
while (1) {
if ((res->args_dec==((TR_ARG_DEC) NULL))) {
res->args_dec = PARSER_abstract_(self, IDENT_is_iter_BOOL(res->name_19));
}
else {
local0 = res->args_dec;
TR_ARG_DEC_appen(local0, PARSER_abstract_(self, IDENT_is_iter_BOOL(res->name_19)));
}
if (PARSER_check_INT(self, shared_PARSER_co)) {
}
else {
goto after_loop;
}
}
after_loop: ;
PARSER_match_INT(self, shared_PARSER_rp);
PARSER_exit(self);
}
if (PARSER_check_INT(self, shared_PARSER_co_1647)) {
PARSER_enter_STR(self, ((STR) &returntypespecif));
res->ret_dec = PARSER_type_spec_1639(self);
PARSER_exit(self);
}
PARSER_exit(self);
return res;
}
TR_CLASS_ELT PARSER_abstract__1672(PARSER self) {
TR_CLASS_ELT noname1673;
TR_CLASS_ELT res = ((TR_CLASS_ELT) NULL);
BOOL local0;
BOOL local1;
TR_CLASS_ELT local2;
BOOL local3;
PARSER_enter_STR(self, ((STR) &listofabstractsi));
while (1) {
if (TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_id)) {
local1 = TRUE;
} else {
local1 = TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_ba);
}
if (local1) {
local0 = TRUE;
} else {
local0 = TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_it);
}
if (local0) {
if ((res==((TR_CLASS_ELT) NULL))) {
res = ((TR_CLASS_ELT) PARSER_abstract__1669(self));
}
else {
local2 = res;
(*TR_CLASS_ELT_app[local2->header.tag+TR_CLASS_ELT_app_offset])(local2, ((TR_CLASS_ELT) PARSER_abstract__1669(self)));
}
}
if (PARSER_check_INT(self, shared_PARSER_se)) {
}
else {
if (TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_id)) {
PARSER_exp_error_STR(self, ((STR) &semicolon));
}
else {
goto after_loop;
}
}
}
after_loop: ;
if (TOKEN_is_neq_INT(self->next_8, shared_PARSER_en)) {
PARSER_exp_error_STR(self, ((STR) &semicolon_1675));
while (1) {
if (TOKEN_is_neq_INT(self->next_8, shared_PARSER_en)) {
local3 = TOKEN_is_neq_INT(self->next_8, shared_PARSER_eo);
} else {
local3 = FALSE;
}
if (local3) {
}
else {
goto after_loop_1676;
}
PARSER_fetch(self);
}
after_loop_1676: ;
}
PARSER_exit(self);
return res;
}
TR_CLASS_DEF PARSER_abstract__1678(PARSER self) {
TR_CLASS_DEF noname1679;
TR_CLASS_DEF res;
TR_PARAM_DEC local0;
PARSER_enter_STR(self, ((STR) &abstracttypedefi));
res = TR_CLASS_DEF_cre(((TR_CLASS_DEF) NULL));
res->source_38 = PARSER_source_lo(self);
res->kind = shared_TR_CLASS_;
PARSER_match_INT(self, shared_PARSER_ty_1680);
if (PARSER_check_INT(self, shared_PARSER_ty)) {
}
else {
PARSER_exp_error_STR(self, ((STR) &abstracttypename));
if (TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_id)) {
PARSER_fetch(self);
}
}
res->name_19 = PARSER_ident_IDENT(self);
if (PARSER_check_INT(self, shared_PARSER_lb)) {
while (1) {
if (TOKEN_is_neq_INT(self->next_8, shared_PARSER_id)) {
goto after_loop;
}
if ((res->params==((TR_PARAM_DEC) NULL))) {
res->params = PARSER_param_dec(self);
}
else {
local0 = res->params;
TR_PARAM_DEC_app(local0, PARSER_param_dec(self));
}
if ((!(PARSER_check_INT(self, shared_PARSER_co)))) {
goto after_loop;
}
}
after_loop: ;
PARSER_match_INT(self, shared_PARSER_rb);
}
if (PARSER_check_INT(self, shared_PARSER_is)) {
res->under = PARSER_type_spec(self);
}
if (PARSER_check_INT(self, shared_PARSER_is_1682)) {
res->over = PARSER_type_spec(self);
}
PARSER_match_INT(self, shared_PARSER_is_tok);
res->body = PARSER_abstract__1672(self);
PARSER_match_INT(self, shared_PARSER_en);
PARSER_exit(self);
return res;
}
void TR_CLASS_DEF_app(TR_CLASS_DEF self, TR_CLASS_DEF l) {
TR_CLASS_DEF last_1683;
if (!((!((self==((TR_CLASS_DEF) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/next.sa:50:9\n");
exit(16);
}
if ((self->next_8==((TR_CLASS_DEF) NULL))) {
self->next_8 = l;
return;
}
last_1683 = self->next_8;
while (1) {
if ((last_1683->next_8==((TR_CLASS_DEF) NULL))) {
goto after_loop;
}
last_1683 = last_1683->next_8;
}
after_loop: ;
last_1683->next_8 = l;
}
BOOL PARSER_is_class__1685(PARSER self, TOKEN t_1686) {
BOOL noname1687 = ((BOOL) 0);
INT noname1688 = ((INT) 0);
noname1688 = t_1686.val_16;
switch (noname1688) {
case 27:
case 31:
case 10:
case 37:
case 6:
case 18:
case 2:
case 70:
case 71:
return TRUE;
break;
default: ;
}
return FALSE;
}
TR_INCLUDE_CLAUSE TR_INCLUDE_CLAUS(TR_INCLUDE_CLAUSE self) {
TR_INCLUDE_CLAUSE noname1689;
TR_INCLUDE_CLAUSE local0;
local0 = ((TR_INCLUDE_CLAUSE) sbi_alloc(sizeof(struct TR_INCLUDE_CLAUSE_struct), TR_INCLUDE_CLAUSE_tag));
return local0;
}
TR_FEAT_MOD TR_FEAT_MOD_crea(TR_FEAT_MOD self) {
TR_FEAT_MOD noname1690;
TR_FEAT_MOD local0;
local0 = ((TR_FEAT_MOD) sbi_alloc(sizeof(struct TR_FEAT_MOD_struct), TR_FEAT_MOD_tag));
return local0;
}
void TR_FEAT_MOD_appe(TR_FEAT_MOD self, TR_FEAT_MOD l) {
TR_FEAT_MOD last_1691;
if (!((!((self==((TR_FEAT_MOD) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/next.sa:50:9\n");
exit(16);
}
if ((self->next_8==((TR_FEAT_MOD) NULL))) {
self->next_8 = l;
return;
}
last_1691 = self->next_8;
while (1) {
if ((last_1691->next_8==((TR_FEAT_MOD) NULL))) {
goto after_loop;
}
last_1691 = last_1691->next_8;
}
after_loop: ;
last_1691->next_8 = l;
}
TR_CLASS_ELT PARSER_include_c(PARSER self, TOKEN mode_1693) {
TR_CLASS_ELT noname1694;
TR_CLASS_ELT res = ((TR_CLASS_ELT) NULL);
TR_INCLUDE_CLAUSE incl;
TR_FEAT_MOD newm;
INT noname1695 = ((INT) 0);
BOOL local0;
BOOL local1;
BOOL local2;
PARSER_enter_STR(self, ((STR) &includeclause));
if (TOKEN_is_eq_INT_BOOL(mode_1693, shared_PARSER_re)) {
PARSER_error_STR(self, ((STR) &readonlynotallow));
}
PARSER_match_INT(self, shared_PARSER_in);
incl = TR_INCLUDE_CLAUS(((TR_INCLUDE_CLAUSE) NULL));
incl->source_38 = PARSER_source_lo(self);
incl->is_private = TOKEN_is_eq_INT_BOOL(mode_1693, shared_PARSER_pr);
incl->tp = PARSER_type_spec_1639(self);
res = ((TR_CLASS_ELT) incl);
if (TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_id)) {
local1 = TRUE;
} else {
local1 = TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_ba);
}
if (local1) {
local0 = TRUE;
} else {
local0 = TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_it);
}
if (local0) {
while (1) {
newm = TR_FEAT_MOD_crea(((TR_FEAT_MOD) NULL));
newm->source_38 = PARSER_source_lo(self);
newm->name_19 = PARSER_rout_or_i(self);
PARSER_match_INT(self, shared_PARSER_tr);
noname1695 = self->next_8.val_16;
switch (noname1695) {
case 27:
PARSER_fetch(self);
newm->is_private = TRUE;
newm->new_name = PARSER_rout_or_i(self);
break;
case 31:
PARSER_fetch(self);
newm->is_readonly = TRUE;
newm->new_name = PARSER_rout_or_i(self);
break;
case 2:
newm->new_name = PARSER_rout_or_i(self);
break;
case 70:
newm->new_name = PARSER_rout_or_i(self);
break;
case 71:
newm->new_name = PARSER_rout_or_i(self);
break;
default: ;
}
if ((!((newm->new_name.str_4==(STR)0)))) {
local2 = IDENT_is_iter_BOOL(newm->name_19);
if (((local2)!=(IDENT_is_iter_BOOL(newm->new_name)))) {
PARSER_error_STR(self, ((STR) &routinecantbecom));
}
}
if ((incl->mods==((TR_FEAT_MOD) NULL))) {
incl->mods = newm;
}
else {
TR_FEAT_MOD_appe(incl->mods, newm);
}
if (PARSER_check_INT(self, shared_PARSER_co)) {
}
else {
goto after_loop;
}
}
after_loop: ;
}
PARSER_exit(self);
return res;
}
TR_CONST_DEF TR_CONST_DEF_cre(TR_CONST_DEF self) {
TR_CONST_DEF noname1697;
TR_CONST_DEF local0;
local0 = ((TR_CONST_DEF) sbi_alloc(sizeof(struct TR_CONST_DEF_struct), TR_CONST_DEF_tag));
return local0;
}
TR_INT_LIT_EXPR TR_INT_LIT_EXPR_(TR_INT_LIT_EXPR self) {
TR_INT_LIT_EXPR noname1698;
TR_INT_LIT_EXPR local0;
local0 = ((TR_INT_LIT_EXPR) sbi_alloc(sizeof(struct TR_INT_LIT_EXPR_struct), TR_INT_LIT_EXPR_tag));
return local0;
}
TR_FLT_LIT_EXPR TR_FLT_LIT_EXPR_(TR_FLT_LIT_EXPR self) {
TR_FLT_LIT_EXPR noname1699;
TR_FLT_LIT_EXPR local0;
local0 = ((TR_FLT_LIT_EXPR) sbi_alloc(sizeof(struct TR_FLT_LIT_EXPR_struct), TR_FLT_LIT_EXPR_tag));
return local0;
}
RAT RAT_negate_RAT(RAT self) {
RAT noname1700 = RAT_zero;
RAT r_1701 = RAT_zero;
RAT local0;
local0 = RAT_u_INTI_RAT(r_1701, INTI_negate_INTI(self.u));
return RAT_v_INTI_RAT(local0, self.v);
}
TR_CALL_EXPR TR_CALL_EXPR_cre(TR_CALL_EXPR self) {
TR_CALL_EXPR noname1702;
TR_CALL_EXPR local0;
local0 = ((TR_CALL_EXPR) sbi_alloc(sizeof(struct TR_CALL_EXPR_struct), TR_CALL_EXPR_tag));
return local0;
}
TR_SELF_EXPR TR_SELF_EXPR_cre(TR_SELF_EXPR self) {
TR_SELF_EXPR noname1703;
TR_SELF_EXPR local0;
local0 = ((TR_SELF_EXPR) sbi_alloc(sizeof(struct TR_SELF_EXPR_struct), TR_SELF_EXPR_tag));
return local0;
}
TR_IS_VOID_EXPR TR_IS_VOID_EXPR_(TR_IS_VOID_EXPR self) {
TR_IS_VOID_EXPR noname1704;
TR_IS_VOID_EXPR local0;
local0 = ((TR_IS_VOID_EXPR) sbi_alloc(sizeof(struct TR_IS_VOID_EXPR_struct), TR_IS_VOID_EXPR_tag));
return local0;
}
TR_VOID_EXPR TR_VOID_EXPR_cre(TR_VOID_EXPR self) {
TR_VOID_EXPR noname1705;
TR_VOID_EXPR local0;
local0 = ((TR_VOID_EXPR) sbi_alloc(sizeof(struct TR_VOID_EXPR_struct), TR_VOID_EXPR_tag));
return local0;
}
TR_NEW_EXPR TR_NEW_EXPR_crea(TR_NEW_EXPR self) {
TR_NEW_EXPR noname1706;
TR_NEW_EXPR local0;
local0 = ((TR_NEW_EXPR) sbi_alloc(sizeof(struct TR_NEW_EXPR_struct), TR_NEW_EXPR_tag));
return local0;
}
TR_BOUND_CREATE_EXPR TR_BOUND_CREATE_(TR_BOUND_CREATE_EXPR self) {
TR_BOUND_CREATE_EXPR noname1707;
TR_BOUND_CREATE_EXPR local0;
local0 = ((TR_BOUND_CREATE_EXPR) sbi_alloc(sizeof(struct TR_BOUND_CREATE_EXPR_struct), TR_BOUND_CREATE_EXPR_tag));
return local0;
}
TR_UNDERSCORE_ARG TR_UNDERSCORE_AR(TR_UNDERSCORE_ARG self) {
TR_UNDERSCORE_ARG noname1708;
TR_UNDERSCORE_ARG local0;
local0 = ((TR_UNDERSCORE_ARG) sbi_alloc(sizeof(struct TR_UNDERSCORE_ARG_struct), TR_UNDERSCORE_ARG_tag));
return local0;
}
TR_EXPR PARSER_expr_list(PARSER self, BOOL underscore_args) {
TR_EXPR noname1709;
TR_EXPR res = ((TR_EXPR) NULL);
TR_EXPR x = ((TR_EXPR) NULL);
TR_UNDERSCORE_ARG u_1710;
TR_EXPR local0;
if (underscore_args) {
PARSER_enter_STR(self, ((STR) &listofboundarguments));
}
else {
PARSER_enter_STR(self, ((STR) &listofexpressions));
}
while (1) {
if (PARSER_check_INT(self, shared_PARSER_un)) {
u_1710 = TR_UNDERSCORE_AR(((TR_UNDERSCORE_ARG) NULL));
u_1710->source_38 = PARSER_source_lo(self);
u_1710->source_38 = PARSER_source_lo(self);
x = ((TR_EXPR) u_1710);
if (PARSER_check_INT(self, shared_PARSER_co_1647)) {
u_1710->tp = PARSER_type_spec_1639(self);
}
if ((!(underscore_args))) {
PARSER_error_STR(self, ((STR) &nounderscoreargu));
}
}
else {
x = PARSER_expr_TR_EXPR(self);
}
if ((res==((TR_EXPR) NULL))) {
res = x;
}
else {
local0 = res;
(*TR_EXPR_append_T[local0->header.tag+TR_EXPR_append_T_offset])(local0, x);
}
if (PARSER_check_INT(self, shared_PARSER_co)) {
}
else {
goto after_loop;
}
}
after_loop: ;
PARSER_exit(self);
return res;
}
TR_CALL_EXPR PARSER_call_expr(PARSER self, TR_EXPR ob_1712, TR_TYPE_SPEC tp_1713, BOOL underscore_args) {
TR_CALL_EXPR noname1714;
TR_CALL_EXPR res = ((TR_CALL_EXPR) NULL);
PARSER_enter_STR(self, ((STR) &callexpressions));
res = TR_CALL_EXPR_cre(((TR_CALL_EXPR) NULL));
res->source_38 = PARSER_source_lo(self);
res->ob = ob_1712;
res->tp = tp_1713;
res->name_19 = PARSER_rout_or_i(self);
if (PARSER_check_INT(self, shared_PARSER_lp)) {
res->args_7 = PARSER_expr_list(self, underscore_args);
PARSER_match_INT(self, shared_PARSER_rp);
}
PARSER_exit(self);
return res;
}
void PARSER_check_und(PARSER self, TR_CALL_EXPR call_1715, BOOL is_iter_1716) {
TR_EXPR ob_1717;
TR_EXPR this_1718;
TR_EXPR arg_1719;
BOOL local0;
TR_EXPR local1;
local0 = IDENT_is_iter_BOOL(call_1715->name_19);
if (((local0)!=(is_iter_1716))) {
if (is_iter_1716) {
PARSER_error_STR(self, ((STR) &boundroutinemust));
}
else {
PARSER_error_STR(self, ((STR) &boundroutinemust_1720));
}
}
if (call_1715->is_array) {
PARSER_error_STR(self, ((STR) &onlycallexpressi));
}
ob_1717 = call_1715->ob;
while (1) {
if ((ob_1717==((TR_EXPR) NULL))) {
goto after_loop;
}
this_1718 = ob_1717;
if (this_1718==NULL) {
if (ob_1717==NULL) {
} else
switch (ob_1717->header.tag) {
case TR_UNDERSCORE_ARG_tag:
if ((!(c_SYS_ob_eq_OB_OB_BOOL(((OB) ob_1717),((OB) call_1715->ob))))) {
PARSER_error_STR(self, ((STR) &illegalunderscor));
} break;
default: ;
}
return;
} else
switch (this_1718->header.tag) {
case TR_CALL_EXPR_tag:
ob_1717 = ((TR_CALL_EXPR) this_1718)->ob;
arg_1719 = ((TR_CALL_EXPR) this_1718)->args_7;
while (1) {
if ((arg_1719==((TR_EXPR) NULL))) {
goto after_loop_1722;
}
if (arg_1719==NULL) {
} else
switch (arg_1719->header.tag) {
case TR_UNDERSCORE_ARG_tag:
PARSER_error_STR(self, ((STR) &illegalunderscor_1724));
return; break;
default: ;
}
local1 = arg_1719;
arg_1719 = (*TR_EXPR_next_TR_EXPR[local1->header.tag+TR_EXPR_next_TR_EXPR_offset])(local1);
}
after_loop_1722: ; break;
default: ;
if (ob_1717==NULL) {
} else
switch (ob_1717->header.tag) {
case TR_UNDERSCORE_ARG_tag:
if ((!(c_SYS_ob_eq_OB_OB_BOOL(((OB) ob_1717),((OB) call_1715->ob))))) {
PARSER_error_STR(self, ((STR) &illegalunderscor_1725));
} break;
default: ;
}
return;
}
}
after_loop: ;
}
TR_BOUND_CREATE_EXPR PARSER_bound_cre(PARSER self) {
TR_BOUND_CREATE_EXPR noname1726;
TR_BOUND_CREATE_EXPR res;
TR_UNDERSCORE_ARG u_1727;
TR_EXPR x;
PARSER_enter_STR(self, ((STR) &boundcreateexpre));
res = TR_BOUND_CREATE_(((TR_BOUND_CREATE_EXPR) NULL));
res->source_38 = PARSER_source_lo(self);
res->is_iter = TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_IT);
PARSER_fetch(self);
PARSER_match_INT(self, shared_PARSER_lp);
if (PARSER_check_INT(self, shared_PARSER_un)) {
u_1727 = TR_UNDERSCORE_AR(((TR_UNDERSCORE_ARG) NULL));
u_1727->source_38 = PARSER_source_lo(self);
if (PARSER_check_INT(self, shared_PARSER_co_1647)) {
u_1727->tp = PARSER_type_spec_1639(self);
}
PARSER_match_INT(self, shared_PARSER_do);
res->call_43 = PARSER_call_expr(self, ((TR_EXPR) u_1727), ((TR_TYPE_SPEC) NULL), TRUE);
}
else {
x = PARSER_expr1_BOO(self, TRUE);
if (x==NULL) {
} else
switch (x->header.tag) {
case TR_CALL_EXPR_tag:
res->call_43 = ((TR_CALL_EXPR) x); break;
default: ;
fprintf(stderr,"No applicable type in typecase ./parse.sa:2292:17\n");
exit(16);
}
}
PARSER_check_und(self, res->call_43, res->is_iter);
if (PARSER_check_INT(self, shared_PARSER_co_1647)) {
res->ret = PARSER_type_spec_1639(self);
}
PARSER_match_INT(self, shared_PARSER_rp);
PARSER_exit(self);
return res;
}
TR_CREATE_EXPR TR_CREATE_EXPR_c(TR_CREATE_EXPR self) {
TR_CREATE_EXPR noname1728;
TR_CREATE_EXPR local0;
local0 = ((TR_CREATE_EXPR) sbi_alloc(sizeof(struct TR_CREATE_EXPR_struct), TR_CREATE_EXPR_tag));
return local0;
}
TR_CREATE_EXPR PARSER_create_ex(PARSER self) {
TR_CREATE_EXPR noname1729;
TR_CREATE_EXPR res;
BOOL local0;
PARSER_enter_STR(self, ((STR) &createexpression));
res = TR_CREATE_EXPR_c(((TR_CREATE_EXPR) NULL));
res->source_38 = PARSER_source_lo(self);
if (TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_id)) {
local0 = TRUE;
} else {
local0 = TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_SA);
}
if (local0) {
res->tp = PARSER_type_spec_1639(self);
}
else {
if (TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_ty)) {
res->tp = PARSER_type_spec_1639(self);
PARSER_error_STR(self, ((STR) &noabstracttypesa));
}
}
if (PARSER_check_INT(self, shared_PARSER_lp)) {
res->elts = PARSER_expr_list(self, FALSE);
PARSER_match_INT(self, shared_PARSER_rp);
}
PARSER_exit(self);
return res;
}
TR_ARRAY_EXPR TR_ARRAY_EXPR_cr(TR_ARRAY_EXPR self) {
TR_ARRAY_EXPR noname1730;
TR_ARRAY_EXPR local0;
local0 = ((TR_ARRAY_EXPR) sbi_alloc(sizeof(struct TR_ARRAY_EXPR_struct), TR_ARRAY_EXPR_tag));
return local0;
}
TR_EXCEPT_EXPR TR_EXCEPT_EXPR_c(TR_EXCEPT_EXPR self) {
TR_EXCEPT_EXPR noname1731;
TR_EXCEPT_EXPR local0;
local0 = ((TR_EXCEPT_EXPR) sbi_alloc(sizeof(struct TR_EXCEPT_EXPR_struct), TR_EXCEPT_EXPR_tag));
return local0;
}
TR_INITIAL_EXPR TR_INITIAL_EXPR_(TR_INITIAL_EXPR self) {
TR_INITIAL_EXPR noname1732;
TR_INITIAL_EXPR local0;
local0 = ((TR_INITIAL_EXPR) sbi_alloc(sizeof(struct TR_INITIAL_EXPR_struct), TR_INITIAL_EXPR_tag));
return local0;
}
TR_RESULT_EXPR TR_RESULT_EXPR_c(TR_RESULT_EXPR self) {
TR_RESULT_EXPR noname1733;
TR_RESULT_EXPR local0;
local0 = ((TR_RESULT_EXPR) sbi_alloc(sizeof(struct TR_RESULT_EXPR_struct), TR_RESULT_EXPR_tag));
return local0;
}
TR_BOOL_LIT_EXPR TR_BOOL_LIT_EXPR_1734(TR_BOOL_LIT_EXPR self) {
TR_BOOL_LIT_EXPR noname1735;
TR_BOOL_LIT_EXPR local0;
local0 = ((TR_BOOL_LIT_EXPR) sbi_alloc(sizeof(struct TR_BOOL_LIT_EXPR_struct), TR_BOOL_LIT_EXPR_tag));
return local0;
}
TR_CHAR_LIT_EXPR TR_CHAR_LIT_EXPR_1736(TR_CHAR_LIT_EXPR self) {
TR_CHAR_LIT_EXPR noname1737;
TR_CHAR_LIT_EXPR local0;
local0 = ((TR_CHAR_LIT_EXPR) sbi_alloc(sizeof(struct TR_CHAR_LIT_EXPR_struct), TR_CHAR_LIT_EXPR_tag));
return local0;
}
TR_STR_LIT_EXPR TR_STR_LIT_EXPR_(TR_STR_LIT_EXPR self) {
TR_STR_LIT_EXPR noname1738;
TR_STR_LIT_EXPR local0;
local0 = ((TR_STR_LIT_EXPR) sbi_alloc(sizeof(struct TR_STR_LIT_EXPR_struct), TR_STR_LIT_EXPR_tag));
return local0;
}
INT INTI_cmp_INTI_INT(INTI self, INTI y) {
INT noname1739 = ((INT) 0);
BOOL local0;
local0 = (self->len_37<0);
if (((local0)!=((y->len_37<0)))) {
return self->len_37;
}
else {
if ((self->len_37<0)) {
return INTI_u_cmp_INTI_(self, y, self);
}
}
return INTI_u_cmp_INTI_(self, self, y);
}
BOOL INTI_is_eq_INTI_BOOL(INTI self, INTI y) {
BOOL noname1740 = ((BOOL) 0);
BOOL local0;
INT local1;
if (c_SYS_ob_eq_OB_OB_BOOL(((OB) self),((OB) y))) {
local0 = TRUE;
} else {
local1 = INTI_cmp_INTI_INT(self, y);
local0 = (local1==0);
}
return local0;
}
BOOL RAT_is_int_BOOL(RAT self) {
BOOL noname1741 = ((BOOL) 0);
INTI local0;
local0 = self.v;
return INTI_is_eq_INTI_BOOL(local0, INTI_create_INT_INTI(((INTI) NULL), 1));
}
INTI RAT_floor_INTI(RAT self) {
INTI noname1742;
return INTI_div_INTI_INTI(self.u, self.v);
}
TR_HERE_EXPR TR_HERE_EXPR_cre(TR_HERE_EXPR self) {
TR_HERE_EXPR noname1743;
TR_HERE_EXPR local0;
local0 = ((TR_HERE_EXPR) sbi_alloc(sizeof(struct TR_HERE_EXPR_struct), TR_HERE_EXPR_tag));
return local0;
}
TR_WHERE_EXPR TR_WHERE_EXPR_cr(TR_WHERE_EXPR self) {
TR_WHERE_EXPR noname1744;
TR_WHERE_EXPR local0;
local0 = ((TR_WHERE_EXPR) sbi_alloc(sizeof(struct TR_WHERE_EXPR_struct), TR_WHERE_EXPR_tag));
return local0;
}
TR_NEAR_EXPR TR_NEAR_EXPR_cre(TR_NEAR_EXPR self) {
TR_NEAR_EXPR noname1745;
TR_NEAR_EXPR local0;
local0 = ((TR_NEAR_EXPR) sbi_alloc(sizeof(struct TR_NEAR_EXPR_struct), TR_NEAR_EXPR_tag));
return local0;
}
TR_FAR_EXPR TR_FAR_EXPR_crea(TR_FAR_EXPR self) {
TR_FAR_EXPR noname1746;
TR_FAR_EXPR local0;
local0 = ((TR_FAR_EXPR) sbi_alloc(sizeof(struct TR_FAR_EXPR_struct), TR_FAR_EXPR_tag));
return local0;
}
TR_EXPR PARSER_expr0_TR_EXPR(PARSER self) {
TR_EXPR noname1747;
TR_EXPR res = ((TR_EXPR) NULL);
INT noname1748 = ((INT) 0);
TR_CALL_EXPR call_exp;
TR_CALL_EXPR r_1749;
TR_CALL_EXPR r_1750;
TR_CALL_EXPR r_1751;
TR_IS_VOID_EXPR vtest;
TR_NEW_EXPR new_ex;
TR_ARRAY_EXPR arr_ex;
TR_INITIAL_EXPR init_ex;
TR_BOOL_LIT_EXPR r_1752;
TR_BOOL_LIT_EXPR r_1753;
TR_CHAR_LIT_EXPR c_1754;
TR_STR_LIT_EXPR s_1755;
TR_INT_LIT_EXPR i;
TR_FLT_LIT_EXPR f_1756;
TR_CALL_EXPR a_1757;
TR_WHERE_EXPR r_1758;
TR_NEAR_EXPR r_1759;
TR_FAR_EXPR r_1760;
TR_EXPR local0;
TR_EXPR local1;
BOOL local2;
TR_EXPR local3;
TR_EXPR local4;
TR_EXPR local5;
TR_EXPR local6;
TR_EXPR local7;
PARSER_enter_STR(self, ((STR) &expressionprec0));
noname1748 = self->next_8.val_16;
switch (noname1748) {
case 36:
PARSER_fetch(self);
res = ((TR_EXPR) TR_SELF_EXPR_cre(((TR_SELF_EXPR) NULL)));
local0 = res;
(*TR_EXPR_source_S[local0->header.tag+TR_EXPR_source_S_offset])(local0, PARSER_source_lo(self));
break;
case 2:
call_exp = TR_CALL_EXPR_cre(((TR_CALL_EXPR) NULL));
call_exp->source_38 = PARSER_source_lo(self);
if (PARSER_is_class_(self, PARSER_ident_IDENT(self))) {
call_exp->tp = PARSER_type_spec_1639(self);
if ((call_exp->tp->kind==shared_TR_TYPE_S_1643)) {
if ((call_exp->tp->params==((TR_TYPE_SPEC) NULL))) {
call_exp->name_19 = call_exp->tp->name_19;
call_exp->tp = ((TR_TYPE_SPEC) NULL);
}
else {
if (TOKEN_is_neq_INT(self->next_8, shared_PARSER_dc)) {
PARSER_error_STR(self, ((STR) &Thistypespecneit));
}
}
}
}
else {
call_exp->name_19 = PARSER_ident_IDENT(self);
PARSER_fetch(self);
}
res = ((TR_EXPR) call_exp);
break;
case 70:
r_1749 = TR_CALL_EXPR_cre(((TR_CALL_EXPR) NULL));
r_1749->source_38 = PARSER_source_lo(self);
r_1749->name_19 = PROG_ident_for_S(self->prog, ((STR) &name_1761));
PARSER_fetch(self);
res = ((TR_EXPR) r_1749);
break;
case 71:
r_1750 = TR_CALL_EXPR_cre(((TR_CALL_EXPR) NULL));
r_1750->source_38 = PARSER_source_lo(self);
r_1750->name_19 = PROG_ident_for_S(self->prog, ((STR) &name_1762));
PARSER_fetch(self);
res = ((TR_EXPR) r_1750);
break;
case 35:
r_1751 = TR_CALL_EXPR_cre(((TR_CALL_EXPR) NULL));
r_1751->source_38 = PARSER_source_lo(self);
r_1751->tp = PARSER_type_spec_1639(self);
res = ((TR_EXPR) r_1751);
break;
case 44:
PARSER_enter_STR(self, ((STR) &voidexpressions));
PARSER_fetch(self);
if (TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_lp)) {
PARSER_fetch(self);
vtest = TR_IS_VOID_EXPR_(((TR_IS_VOID_EXPR) NULL));
vtest->source_38 = PARSER_source_lo(self);
vtest->arg_51 = PARSER_expr_TR_EXPR(self);
res = ((TR_EXPR) vtest);
PARSER_match_INT(self, shared_PARSER_rp);
}
else {
res = ((TR_EXPR) TR_VOID_EXPR_cre(((TR_VOID_EXPR) NULL)));
local1 = res;
(*TR_EXPR_source_S[local1->header.tag+TR_EXPR_source_S_offset])(local1, PARSER_source_lo(self));
}
PARSER_exit(self);
break;
case 23:
PARSER_enter_STR(self, ((STR) &newexpression));
PARSER_fetch(self);
new_ex = TR_NEW_EXPR_crea(((TR_NEW_EXPR) NULL));
new_ex->source_38 = PARSER_source_lo(self);
res = ((TR_EXPR) new_ex);
if (PARSER_check_INT(self, shared_PARSER_lp)) {
new_ex->arg_51 = PARSER_expr_TR_EXPR(self);
PARSER_match_INT(self, shared_PARSER_rp);
}
PARSER_exit(self);
break;
case 69:
PARSER_fetch(self);
if (TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_RO)) {
local2 = TRUE;
} else {
local2 = TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_IT);
}
if (local2) {
res = ((TR_EXPR) PARSER_bound_cre(self));
}
else {
res = ((TR_EXPR) PARSER_create_ex(self));
}
break;
case 74:
PARSER_enter_STR(self, ((STR) &arrayexpression));
PARSER_fetch(self);
arr_ex = TR_ARRAY_EXPR_cr(((TR_ARRAY_EXPR) NULL));
arr_ex->source_38 = PARSER_source_lo(self);
res = ((TR_EXPR) arr_ex);
arr_ex->elts = PARSER_expr_list(self, FALSE);
PARSER_match_INT(self, shared_PARSER_vb);
PARSER_exit(self);
break;
case 14:
PARSER_fetch(self);
res = ((TR_EXPR) TR_EXCEPT_EXPR_c(((TR_EXCEPT_EXPR) NULL)));
local3 = res;
(*TR_EXPR_source_S[local3->header.tag+TR_EXPR_source_S_offset])(local3, PARSER_source_lo(self));
break;
case 19:
PARSER_enter_STR(self, ((STR) &initialexpression));
PARSER_fetch(self);
PARSER_match_INT(self, shared_PARSER_lp);
init_ex = TR_INITIAL_EXPR_(((TR_INITIAL_EXPR) NULL));
init_ex->source_38 = PARSER_source_lo(self);
res = ((TR_EXPR) init_ex);
init_ex->e = PARSER_expr_TR_EXPR(self);
PARSER_match_INT(self, shared_PARSER_rp);
PARSER_exit(self);
break;
case 32:
PARSER_fetch(self);
res = ((TR_EXPR) TR_RESULT_EXPR_c(((TR_RESULT_EXPR) NULL)));
local4 = res;
(*TR_EXPR_source_S[local4->header.tag+TR_EXPR_source_S_offset])(local4, PARSER_source_lo(self));
break;
case 46:
PARSER_enter_STR(self, ((STR) &whileexpression));
PARSER_fetch(self);
PARSER_match_INT(self, shared_PARSER_lp);
res = PARSER_expr_TR_EXPR(self);
PARSER_match_INT(self, shared_PARSER_rp);
PARSER_error_STR(self, ((STR) &whileexpressionm));
PARSER_exit(self);
break;
case 42:
PARSER_enter_STR(self, ((STR) &untilexpression));
PARSER_fetch(self);
PARSER_match_INT(self, shared_PARSER_lp);
res = PARSER_expr_TR_EXPR(self);
PARSER_match_INT(self, shared_PARSER_rp);
PARSER_error_STR(self, ((STR) &untilexpressionm));
PARSER_exit(self);
break;
case 7:
PARSER_fetch(self);
res = ((TR_EXPR) TR_BOOL_LIT_EXPR_1734(((TR_BOOL_LIT_EXPR) NULL)));
local5 = res;
(*TR_EXPR_source_S[local5->header.tag+TR_EXPR_source_S_offset])(local5, PARSER_source_lo(self));
PARSER_error_STR(self, ((STR) &breakexpressionm));
break;
case 39:
r_1752 = TR_BOOL_LIT_EXPR_1734(((TR_BOOL_LIT_EXPR) NULL));
r_1752->source_38 = PARSER_source_lo(self);
r_1752->val_16 = TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_tr_1763);
res = ((TR_EXPR) r_1752);
PARSER_fetch(self);
break;
case 16:
r_1753 = TR_BOOL_LIT_EXPR_1734(((TR_BOOL_LIT_EXPR) NULL));
r_1753->source_38 = PARSER_source_lo(self);
r_1753->val_16 = TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_tr_1763);
res = ((TR_EXPR) r_1753);
PARSER_fetch(self);
break;
case 51:
c_1754 = TR_CHAR_LIT_EXPR_1736(((TR_CHAR_LIT_EXPR) NULL));
c_1754->source_38 = PARSER_source_lo(self);
c_1754->val_16 = ((INT)self->scanner->char_value);
res = ((TR_EXPR) c_1754);
PARSER_fetch(self);
break;
case 50:
s_1755 = TR_STR_LIT_EXPR_(((TR_STR_LIT_EXPR) NULL));
s_1755->source_38 = PARSER_source_lo(self);
s_1755->s = (IDENT_blob=PARSER_ident_IDENT(self)).str_4;
res = ((TR_EXPR) s_1755);
PARSER_fetch(self);
break;
case 48:
if (!(RAT_is_int_BOOL(self->scanner->num_value))) {
fprintf(stderr,"Violation of assertion ./parse.sa:2203:15\n");
exit(16);
}
i = TR_INT_LIT_EXPR_(((TR_INT_LIT_EXPR) NULL));
i->source_38 = PARSER_source_lo(self);
i->val_16 = RAT_floor_INTI(self->scanner->num_value);
i->is_inti = (self->scanner->value_type==shared_TR_FLT_LI_1500);
res = ((TR_EXPR) i);
PARSER_fetch(self);
break;
case 49:
f_1756 = TR_FLT_LIT_EXPR_(((TR_FLT_LIT_EXPR) NULL));
f_1756->source_38 = PARSER_source_lo(self);
f_1756->val_16 = self->scanner->num_value;
f_1756->tp = self->scanner->value_type;
res = ((TR_EXPR) f_1756);
PARSER_fetch(self);
break;
case 52:
PARSER_fetch(self);
res = PARSER_expr_TR_EXPR(self);
PARSER_match_INT(self, shared_PARSER_rp);
break;
case 54:
PARSER_fetch(self);
a_1757 = TR_CALL_EXPR_cre(((TR_CALL_EXPR) NULL));
a_1757->source_38 = PARSER_source_lo(self);
a_1757->args_7 = PARSER_expr_list(self, FALSE);
a_1757->is_array = TRUE;
res = ((TR_EXPR) a_1757);
PARSER_match_INT(self, shared_PARSER_rb_1764);
break;
case 90:
PARSER_fetch(self);
res = ((TR_EXPR) TR_HERE_EXPR_cre(((TR_HERE_EXPR) NULL)));
local6 = res;
(*TR_EXPR_source_S[local6->header.tag+TR_EXPR_source_S_offset])(local6, PARSER_source_lo(self));
break;
case 91:
PARSER_enter_STR(self, ((STR) &whereexpression));
r_1758 = TR_WHERE_EXPR_cr(((TR_WHERE_EXPR) NULL));
r_1758->source_38 = PARSER_source_lo(self);
res = ((TR_EXPR) r_1758);
PARSER_fetch(self);
PARSER_match_INT(self, shared_PARSER_lp);
r_1758->e = PARSER_expr_TR_EXPR(self);
PARSER_match_INT(self, shared_PARSER_rp);
PARSER_exit(self);
break;
case 92:
PARSER_enter_STR(self, ((STR) &nearexpression));
r_1759 = TR_NEAR_EXPR_cre(((TR_NEAR_EXPR) NULL));
r_1759->source_38 = PARSER_source_lo(self);
res = ((TR_EXPR) r_1759);
PARSER_fetch(self);
PARSER_match_INT(self, shared_PARSER_lp);
r_1759->e = PARSER_expr_TR_EXPR(self);
PARSER_match_INT(self, shared_PARSER_rp);
PARSER_exit(self);
break;
case 93:
PARSER_enter_STR(self, ((STR) &farexpression));
r_1760 = TR_FAR_EXPR_crea(((TR_FAR_EXPR) NULL));
r_1760->source_38 = PARSER_source_lo(self);
res = ((TR_EXPR) r_1760);
PARSER_fetch(self);
PARSER_match_INT(self, shared_PARSER_lp);
r_1760->e = PARSER_expr_TR_EXPR(self);
PARSER_match_INT(self, shared_PARSER_rp);
PARSER_exit(self);
break;
default: ;
PARSER_exp_error_STR(self, ((STR) &expression));
res = ((TR_EXPR) TR_VOID_EXPR_cre(((TR_VOID_EXPR) NULL)));
local7 = res;
(*TR_EXPR_source_S[local7->header.tag+TR_EXPR_source_S_offset])(local7, PARSER_source_lo(self));
}
PARSER_exit(self);
return res;
}
TR_TYPE_SPEC PARSER_type_of_T(PARSER self, TR_EXPR x) {
TR_TYPE_SPEC noname1765;
TR_TYPE_SPEC tp_1766;
if (x==NULL) {
} else
switch (x->header.tag) {
case TR_CALL_EXPR_tag:
if ((((TR_CALL_EXPR) x)->ob==((TR_EXPR) NULL))) {
if ((((TR_CALL_EXPR) x)->tp==((TR_TYPE_SPEC) NULL))) {
if (PARSER_is_class_(self, ((TR_CALL_EXPR) x)->name_19)) {
tp_1766 = TR_TYPE_SPEC_cre(((TR_TYPE_SPEC) NULL));
tp_1766->source_38 = ((TR_CALL_EXPR) x)->source_38;
tp_1766->kind = shared_TR_TYPE_S_1643;
tp_1766->is_hot = FALSE;
tp_1766->name_19 = ((TR_CALL_EXPR) x)->name_19;
tp_1766->params = ((TR_TYPE_SPEC) NULL);
tp_1766->ret = ((TR_TYPE_SPEC) NULL);
return tp_1766;
}
}
else {
return ((TR_CALL_EXPR) x)->tp;
}
} break;
default: ;
}
PARSER_error_STR(self, ((STR) &typespecifierexp));
return ((TR_TYPE_SPEC) NULL);
}
IDENT PARSER_ident_of_(PARSER self, TR_EXPR x) {
IDENT noname1767 = IDENT_zero;
BOOL local0;
BOOL local1;
if (x==NULL) {
} else
switch (x->header.tag) {
case TR_CALL_EXPR_tag:
if ((((TR_CALL_EXPR) x)->ob==((TR_EXPR) NULL))) {
local1 = (!((((TR_CALL_EXPR) x)->name_19.str_4==(STR)0)));
} else {
local1 = FALSE;
}
if (local1) {
local0 = (((TR_CALL_EXPR) x)->args_7==((TR_EXPR) NULL));
} else {
local0 = FALSE;
}
if (local0) {
return ((TR_CALL_EXPR) x)->name_19;
} break;
default: ;
}
PARSER_error_STR(self, ((STR) &identifieronlyex));
return IDENT_zero;
}
TR_EXPR PARSER_expr1_BOO(PARSER self, BOOL underscore_args) {
TR_EXPR noname1768;
TR_EXPR res;
TR_CALL_EXPR c_1769 = ((TR_CALL_EXPR) NULL);
TR_EXPR local0;
TR_TYPE_SPEC local1;
PARSER_enter_STR(self, ((STR) &expressionprec1));
res = PARSER_expr0_TR_EXPR(self);
if (PARSER_check_INT(self, shared_PARSER_do)) {
res = ((TR_EXPR) PARSER_call_expr(self, res, ((TR_TYPE_SPEC) NULL), underscore_args));
}
else {
if (PARSER_check_INT(self, shared_PARSER_dc)) {
local0 = ((TR_EXPR) NULL);
local1 = PARSER_type_of_T(self, res);
res = ((TR_EXPR) PARSER_call_expr(self, local0, local1, underscore_args));
}
else {
if (PARSER_check_INT(self, shared_PARSER_it)) {
c_1769 = TR_CALL_EXPR_cre(((TR_CALL_EXPR) NULL));
c_1769->source_38 = PARSER_source_lo(self);
c_1769->name_19 = PARSER_append_ba(self, PARSER_ident_of_(self, res));
if (PARSER_check_INT(self, shared_PARSER_lp)) {
c_1769->args_7 = PARSER_expr_list(self, underscore_args);
PARSER_match_INT(self, shared_PARSER_rp);
}
res = ((TR_EXPR) c_1769);
}
else {
if (PARSER_check_INT(self, shared_PARSER_lp)) {
c_1769 = TR_CALL_EXPR_cre(((TR_CALL_EXPR) NULL));
c_1769->source_38 = PARSER_source_lo(self);
c_1769->name_19 = PARSER_ident_of_(self, res);
c_1769->args_7 = PARSER_expr_list(self, underscore_args);
PARSER_match_INT(self, shared_PARSER_rp);
res = ((TR_EXPR) c_1769);
}
else {
if (PARSER_check_INT(self, shared_PARSER_lb_1770)) {
c_1769 = TR_CALL_EXPR_cre(((TR_CALL_EXPR) NULL));
c_1769->source_38 = PARSER_source_lo(self);
c_1769->ob = res;
c_1769->args_7 = PARSER_expr_list(self, FALSE);
c_1769->is_array = TRUE;
PARSER_match_INT(self, shared_PARSER_rb_1764);
res = ((TR_EXPR) c_1769);
}
}
}
}
}
while (1) {
if (PARSER_check_INT(self, shared_PARSER_do)) {
res = ((TR_EXPR) PARSER_call_expr(self, res, ((TR_TYPE_SPEC) NULL), underscore_args));
}
else {
if (PARSER_check_INT(self, shared_PARSER_lb_1770)) {
c_1769 = TR_CALL_EXPR_cre(((TR_CALL_EXPR) NULL));
c_1769->source_38 = PARSER_source_lo(self);
c_1769->ob = res;
c_1769->args_7 = PARSER_expr_list(self, FALSE);
c_1769->is_array = TRUE;
PARSER_match_INT(self, shared_PARSER_rb_1764);
res = ((TR_EXPR) c_1769);
}
else {
goto after_loop;
}
}
}
after_loop: ;
PARSER_exit(self);
return res;
}
TR_EXPR PARSER_expr2_TR_EXPR(PARSER self) {
TR_EXPR noname1772;
TR_EXPR res;
TR_CALL_EXPR c_1773;
PARSER_enter_STR(self, ((STR) &expressionprec2));
res = PARSER_expr1_BOO(self, FALSE);
if (PARSER_check_INT(self, shared_PARSER_po)) {
c_1773 = TR_CALL_EXPR_cre(((TR_CALL_EXPR) NULL));
c_1773->source_38 = PARSER_source_lo(self);
c_1773->name_19 = self->prog->ident_builtin->pow_ident;
c_1773->ob = res;
c_1773->args_7 = PARSER_expr2_TR_EXPR(self);
res = ((TR_EXPR) c_1773);
}
PARSER_exit(self);
return res;
}
TR_EXPR PARSER_expr3_TR_EXPR(PARSER self) {
TR_EXPR noname1774;
TR_EXPR x = ((TR_EXPR) NULL);
TR_CALL_EXPR c_1775 = ((TR_CALL_EXPR) NULL);
TR_EXPR res = ((TR_EXPR) NULL);
TR_INT_LIT_EXPR i;
TR_FLT_LIT_EXPR f_1776;
PARSER_enter_STR(self, ((STR) &expressionprec3));
if (TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_mi)) {
PARSER_fetch(self);
x = PARSER_expr3_TR_EXPR(self);
if (x==NULL) {
c_1775 = TR_CALL_EXPR_cre(((TR_CALL_EXPR) NULL));
c_1775->source_38 = PARSER_source_lo(self);
c_1775->name_19 = self->prog->ident_builtin->negate_ident;
c_1775->ob = x;
res = ((TR_EXPR) c_1775);
} else
switch (x->header.tag) {
case TR_INT_LIT_EXPR_tag:
i = TR_INT_LIT_EXPR_(((TR_INT_LIT_EXPR) NULL));
i->source_38 = PARSER_source_lo(self);
i->val_16 = INTI_negate_INTI(((TR_INT_LIT_EXPR) x)->val_16);
res = ((TR_EXPR) i); break;
case TR_FLT_LIT_EXPR_tag:
f_1776 = TR_FLT_LIT_EXPR_(((TR_FLT_LIT_EXPR) NULL));
f_1776->source_38 = PARSER_source_lo(self);
f_1776->val_16 = RAT_negate_RAT(((TR_FLT_LIT_EXPR) x)->val_16);
f_1776->tp = ((TR_FLT_LIT_EXPR) x)->tp;
res = ((TR_EXPR) f_1776); break;
default: ;
c_1775 = TR_CALL_EXPR_cre(((TR_CALL_EXPR) NULL));
c_1775->source_38 = PARSER_source_lo(self);
c_1775->name_19 = self->prog->ident_builtin->negate_ident;
c_1775->ob = x;
res = ((TR_EXPR) c_1775);
}
}
else {
if (TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_no)) {
PARSER_fetch(self);
x = PARSER_expr3_TR_EXPR(self);
c_1775 = TR_CALL_EXPR_cre(((TR_CALL_EXPR) NULL));
c_1775->source_38 = PARSER_source_lo(self);
c_1775->name_19 = self->prog->ident_builtin->not_ident;
c_1775->ob = x;
res = ((TR_EXPR) c_1775);
}
else {
res = PARSER_expr2_TR_EXPR(self);
}
}
PARSER_exit(self);
return res;
}
TR_EXPR PARSER_expr4_TR_EXPR(PARSER self) {
TR_EXPR noname1777;
TR_EXPR res;
IDENT name_1778 = IDENT_zero;
TR_CALL_EXPR c_1779;
PARSER_enter_STR(self, ((STR) &expressionprec4));
res = PARSER_expr3_TR_EXPR(self);
while (1) {
if (PARSER_check_INT(self, shared_PARSER_ti)) {
name_1778 = self->prog->ident_builtin->times_ident;
}
else {
if (PARSER_check_INT(self, shared_PARSER_qu)) {
name_1778 = self->prog->ident_builtin->div_ident;
}
else {
if (PARSER_check_INT(self, shared_PARSER_mo)) {
name_1778 = self->prog->ident_builtin->mod_ident;
}
else {
goto after_loop;
}
}
}
c_1779 = TR_CALL_EXPR_cre(((TR_CALL_EXPR) NULL));
c_1779->source_38 = PARSER_source_lo(self);
c_1779->name_19 = name_1778;
c_1779->ob = res;
c_1779->args_7 = PARSER_expr3_TR_EXPR(self);
res = ((TR_EXPR) c_1779);
}
after_loop: ;
PARSER_exit(self);
return res;
}
TR_EXPR PARSER_expr5_TR_EXPR(PARSER self) {
TR_EXPR noname1781;
TR_EXPR res;
IDENT name_1782 = IDENT_zero;
TR_CALL_EXPR c_1783;
PARSER_enter_STR(self, ((STR) &expressionprec5));
res = PARSER_expr4_TR_EXPR(self);
while (1) {
if (PARSER_check_INT(self, shared_PARSER_pl)) {
name_1782 = self->prog->ident_builtin->plus_ident;
}
else {
if (PARSER_check_INT(self, shared_PARSER_mi)) {
name_1782 = self->prog->ident_builtin->minus_ident;
}
else {
goto after_loop;
}
}
c_1783 = TR_CALL_EXPR_cre(((TR_CALL_EXPR) NULL));
c_1783->source_38 = PARSER_source_lo(self);
c_1783->name_19 = name_1782;
c_1783->ob = res;
c_1783->args_7 = PARSER_expr4_TR_EXPR(self);
res = ((TR_EXPR) c_1783);
}
after_loop: ;
PARSER_exit(self);
return res;
}
TR_EXPR PARSER_expr6_TR_EXPR(PARSER self) {
TR_EXPR noname1785;
TR_EXPR res;
IDENT name_1786 = IDENT_zero;
TR_CALL_EXPR c_1787;
PARSER_enter_STR(self, ((STR) &expressionprec6));
res = PARSER_expr5_TR_EXPR(self);
while (1) {
if (PARSER_check_INT(self, shared_PARSER_is_1789)) {
name_1786 = self->prog->ident_builtin->is_eq_ident;
}
else {
if (PARSER_check_INT(self, shared_PARSER_is_1790)) {
name_1786 = self->prog->ident_builtin->is_neq_ident;
}
else {
if (PARSER_check_INT(self, shared_PARSER_is)) {
name_1786 = self->prog->ident_builtin->is_lt_ident;
}
else {
if (PARSER_check_INT(self, shared_PARSER_is_1791)) {
name_1786 = self->prog->ident_builtin->is_leq_ident;
}
else {
if (PARSER_check_INT(self, shared_PARSER_is_1792)) {
name_1786 = self->prog->ident_builtin->is_geq_ident;
}
else {
if (PARSER_check_INT(self, shared_PARSER_is_1682)) {
name_1786 = self->prog->ident_builtin->is_gt_ident;
}
else {
goto after_loop;
}
}
}
}
}
}
c_1787 = TR_CALL_EXPR_cre(((TR_CALL_EXPR) NULL));
c_1787->source_38 = PARSER_source_lo(self);
c_1787->name_19 = name_1786;
c_1787->ob = res;
c_1787->args_7 = PARSER_expr5_TR_EXPR(self);
res = ((TR_EXPR) c_1787);
}
after_loop: ;
PARSER_exit(self);
return res;
}
TR_AND_EXPR TR_AND_EXPR_crea(TR_AND_EXPR self) {
TR_AND_EXPR noname1793;
TR_AND_EXPR local0;
local0 = ((TR_AND_EXPR) sbi_alloc(sizeof(struct TR_AND_EXPR_struct), TR_AND_EXPR_tag));
return local0;
}
TR_OR_EXPR TR_OR_EXPR_creat(TR_OR_EXPR self) {
TR_OR_EXPR noname1794;
TR_OR_EXPR local0;
local0 = ((TR_OR_EXPR) sbi_alloc(sizeof(struct TR_OR_EXPR_struct), TR_OR_EXPR_tag));
return local0;
}
TR_EXPR PARSER_expr7_TR_EXPR(PARSER self) {
TR_EXPR noname1795;
TR_EXPR res;
TR_AND_EXPR a_1796;
TR_OR_EXPR o_1797;
PARSER_enter_STR(self, ((STR) &expressionprec7));
res = PARSER_expr6_TR_EXPR(self);
while (1) {
if (PARSER_check_INT(self, shared_PARSER_an)) {
a_1796 = TR_AND_EXPR_crea(((TR_AND_EXPR) NULL));
a_1796->source_38 = PARSER_source_lo(self);
a_1796->e1 = res;
a_1796->e2 = PARSER_expr6_TR_EXPR(self);
res = ((TR_EXPR) a_1796);
}
else {
if (PARSER_check_INT(self, shared_PARSER_or_tok)) {
o_1797 = TR_OR_EXPR_creat(((TR_OR_EXPR) NULL));
o_1797->source_38 = PARSER_source_lo(self);
o_1797->e1 = res;
o_1797->e2 = PARSER_expr6_TR_EXPR(self);
res = ((TR_EXPR) o_1797);
}
else {
goto after_loop;
}
}
}
after_loop: ;
PARSER_exit(self);
return res;
}
TR_AT_EXPR TR_AT_EXPR_creat(TR_AT_EXPR self) {
TR_AT_EXPR noname1799;
TR_AT_EXPR local0;
local0 = ((TR_AT_EXPR) sbi_alloc(sizeof(struct TR_AT_EXPR_struct), TR_AT_EXPR_tag));
return local0;
}
TR_EXPR PARSER_expr_TR_EXPR(PARSER self) {
TR_EXPR noname1800;
TR_EXPR res;
TR_AT_EXPR h;
PARSER_enter_STR(self, ((STR) &expressionprec8));
res = PARSER_expr7_TR_EXPR(self);
while (1) {
if (TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_at_tok)) {
}
else {
goto after_loop;
}
PARSER_fetch(self);
h = TR_AT_EXPR_creat(((TR_AT_EXPR) NULL));
h->source_38 = PARSER_source_lo(self);
h->e = res;
h->at = PARSER_expr7_TR_EXPR(self);
res = ((TR_EXPR) h);
}
after_loop: ;
PARSER_exit(self);
return res;
}
TR_CLASS_ELT PARSER_const_def(PARSER self, TOKEN mode_1802) {
TR_CLASS_ELT noname1803;
TR_CLASS_ELT res = ((TR_CLASS_ELT) NULL);
TR_CONST_DEF con_1804;
TR_INT_LIT_EXPR zero_1805;
INT counter_1806 = ((INT) 0);
TR_CONST_DEF newc;
TR_INT_LIT_EXPR arg_1807;
TR_CALL_EXPR ex;
TR_CLASS_ELT local0;
PARSER_enter_STR(self, ((STR) &constdefinition));
if (TOKEN_is_eq_INT_BOOL(mode_1802, shared_PARSER_re)) {
PARSER_error_STR(self, ((STR) &readonlynotallow_1808));
}
PARSER_match_INT(self, shared_PARSER_co_1809);
con_1804 = TR_CONST_DEF_cre(((TR_CONST_DEF) NULL));
con_1804->source_38 = PARSER_source_lo(self);
con_1804->is_private = TOKEN_is_eq_INT_BOOL(mode_1802, shared_PARSER_pr);
res = ((TR_CLASS_ELT) con_1804);
PARSER_match_INT(self, shared_PARSER_id);
con_1804->name_19 = PARSER_ident_IDENT(self);
if (PARSER_check_INT(self, shared_PARSER_co_1647)) {
con_1804->tp = PARSER_type_spec_1639(self);
PARSER_match_INT(self, shared_PARSER_as);
con_1804->init = PARSER_expr_TR_EXPR(self);
}
else {
if (PARSER_check_INT(self, shared_PARSER_as)) {
con_1804->init = PARSER_expr_TR_EXPR(self);
}
else {
zero_1805 = TR_INT_LIT_EXPR_(((TR_INT_LIT_EXPR) NULL));
zero_1805->source_38 = PARSER_source_lo(self);
zero_1805->val_16 = INTI_create_INT_INTI(((INTI) NULL), 0);
con_1804->init = ((TR_EXPR) zero_1805);
}
counter_1806 = 1;
while (1) {
if (PARSER_check_INT(self, shared_PARSER_co)) {
}
else {
goto after_loop;
}
newc = TR_CONST_DEF_cre(((TR_CONST_DEF) NULL));
newc->source_38 = PARSER_source_lo(self);
newc->is_private = TOKEN_is_eq_INT_BOOL(mode_1802, shared_PARSER_pr);
PARSER_match_INT(self, shared_PARSER_id);
newc->name_19 = PARSER_ident_IDENT(self);
arg_1807 = TR_INT_LIT_EXPR_(((TR_INT_LIT_EXPR) NULL));
arg_1807->source_38 = PARSER_source_lo(self);
arg_1807->val_16 = INTI_create_INT_INTI(((INTI) NULL), counter_1806);
ex = TR_CALL_EXPR_cre(((TR_CALL_EXPR) NULL));
ex->source_38 = PARSER_source_lo(self);
ex->ob = con_1804->init;
ex->name_19 = self->prog->ident_builtin->plus_ident;
ex->args_7 = ((TR_EXPR) arg_1807);
newc->init = ((TR_EXPR) ex);
if ((res==((TR_CLASS_ELT) NULL))) {
res = ((TR_CLASS_ELT) newc);
}
else {
local0 = res;
(*TR_CLASS_ELT_app[local0->header.tag+TR_CLASS_ELT_app_offset])(local0, ((TR_CLASS_ELT) newc));
}
counter_1806 = (c_INT_plus_INT_INT_chk(counter_1806,1));
}
after_loop: ;
}
PARSER_exit(self);
return res;
}
TR_SHARED_DEF TR_SHARED_DEF_cr(TR_SHARED_DEF self) {
TR_SHARED_DEF noname1811;
TR_SHARED_DEF local0;
local0 = ((TR_SHARED_DEF) sbi_alloc(sizeof(struct TR_SHARED_DEF_struct), TR_SHARED_DEF_tag));
return local0;
}
TR_CLASS_ELT PARSER_shared_de(PARSER self, TOKEN mode_1812) {
TR_CLASS_ELT noname1813;
TR_CLASS_ELT res = ((TR_CLASS_ELT) NULL);
TR_SHARED_DEF newid;
TR_TYPE_SPEC tp_1814;
TR_CLASS_ELT p;
TR_CLASS_ELT local0;
TR_CLASS_ELT local1;
TR_CLASS_ELT local2;
PARSER_enter_STR(self, ((STR) &shareddefinition));
PARSER_match_INT(self, shared_PARSER_sh);
while (1) {
newid = TR_SHARED_DEF_cr(((TR_SHARED_DEF) NULL));
newid->source_38 = PARSER_source_lo(self);
newid->is_private = TOKEN_is_eq_INT_BOOL(mode_1812, shared_PARSER_pr);
newid->is_readonly = TOKEN_is_eq_INT_BOOL(mode_1812, shared_PARSER_re);
PARSER_match_INT(self, shared_PARSER_id);
newid->name_19 = PARSER_ident_IDENT(self);
if ((res==((TR_CLASS_ELT) NULL))) {
res = ((TR_CLASS_ELT) newid);
}
else {
local0 = res;
(*TR_CLASS_ELT_app[local0->header.tag+TR_CLASS_ELT_app_offset])(local0, ((TR_CLASS_ELT) newid));
}
if (PARSER_check_INT(self, shared_PARSER_co)) {
}
else {
goto after_loop;
}
}
after_loop: ;
PARSER_match_INT(self, shared_PARSER_co_1647);
tp_1814 = PARSER_type_spec_1639(self);
p = res;
while (1) {
if ((p==((TR_CLASS_ELT) NULL))) {
goto after_loop_1816;
}
if (p==NULL) {
} else
switch (p->header.tag) {
case TR_SHARED_DEF_tag:
((TR_SHARED_DEF) p)->tp = tp_1814; break;
default: ;
fprintf(stderr,"No applicable type in typecase ./parse.sa:1213:17\n");
exit(16);
}
local1 = p;
p = (*TR_CLASS_ELT_nex[local1->header.tag+TR_CLASS_ELT_nex_offset])(local1);
}
after_loop_1816: ;
if (PARSER_check_INT(self, shared_PARSER_as)) {
if (res==NULL) {
} else
switch (res->header.tag) {
case TR_SHARED_DEF_tag:
((TR_SHARED_DEF) res)->init = PARSER_expr_TR_EXPR(self); break;
default: ;
fprintf(stderr,"No applicable type in typecase ./parse.sa:1217:17\n");
exit(16);
}
local2 = res;
if ((!(((*TR_CLASS_ELT_nex[local2->header.tag+TR_CLASS_ELT_nex_offset])(local2)==((TR_CLASS_ELT) NULL))))) {
PARSER_error_STR(self, ((STR) &onlysingleshared));
}
}
PARSER_exit(self);
return res;
}
TR_ATTR_DEF TR_ATTR_DEF_crea(TR_ATTR_DEF self) {
TR_ATTR_DEF noname1818;
TR_ATTR_DEF local0;
local0 = ((TR_ATTR_DEF) sbi_alloc(sizeof(struct TR_ATTR_DEF_struct), TR_ATTR_DEF_tag));
return local0;
}
TR_CLASS_ELT PARSER_attr_def_(PARSER self, TOKEN mode_1819) {
TR_CLASS_ELT noname1820;
TR_CLASS_ELT res = ((TR_CLASS_ELT) NULL);
TR_ATTR_DEF newid;
TR_TYPE_SPEC tp_1821;
TR_CLASS_ELT p;
TR_CLASS_ELT local0;
TR_CLASS_ELT local1;
PARSER_enter_STR(self, ((STR) &attributedefinition));
PARSER_match_INT(self, shared_PARSER_at);
while (1) {
newid = TR_ATTR_DEF_crea(((TR_ATTR_DEF) NULL));
newid->source_38 = PARSER_source_lo(self);
newid->is_private = TOKEN_is_eq_INT_BOOL(mode_1819, shared_PARSER_pr);
newid->is_readonly = TOKEN_is_eq_INT_BOOL(mode_1819, shared_PARSER_re);
PARSER_match_INT(self, shared_PARSER_id);
newid->name_19 = PARSER_ident_IDENT(self);
if ((res==((TR_CLASS_ELT) NULL))) {
res = ((TR_CLASS_ELT) newid);
}
else {
local0 = res;
(*TR_CLASS_ELT_app[local0->header.tag+TR_CLASS_ELT_app_offset])(local0, ((TR_CLASS_ELT) newid));
}
if (PARSER_check_INT(self, shared_PARSER_co)) {
}
else {
goto after_loop;
}
}
after_loop: ;
PARSER_match_INT(self, shared_PARSER_co_1647);
tp_1821 = PARSER_type_spec_1639(self);
p = res;
while (1) {
if ((p==((TR_CLASS_ELT) NULL))) {
goto after_loop_1823;
}
if (p==NULL) {
} else
switch (p->header.tag) {
case TR_ATTR_DEF_tag:
((TR_ATTR_DEF) p)->tp = tp_1821; break;
default: ;
fprintf(stderr,"No applicable type in typecase ./parse.sa:1246:17\n");
exit(16);
}
local1 = p;
p = (*TR_CLASS_ELT_nex[local1->header.tag+TR_CLASS_ELT_nex_offset])(local1);
}
after_loop_1823: ;
PARSER_exit(self);
return res;
}
TR_ARG_DEC PARSER_arg_dec_B(PARSER self, BOOL is_iter_1825) {
TR_ARG_DEC noname1826;
TR_ARG_DEC res = ((TR_ARG_DEC) NULL);
TR_ARG_DEC newa;
TR_TYPE_SPEC tp_1827;
BOOL hot_1828 = ((BOOL) 0);
TR_ARG_DEC p;
BOOL local0;
BOOL local1;
PARSER_enter_STR(self, ((STR) &routineiterargum));
while (1) {
newa = TR_ARG_DEC_creat(((TR_ARG_DEC) NULL));
newa->source_38 = PARSER_source_lo(self);
PARSER_match_INT(self, shared_PARSER_id);
newa->name_19 = PARSER_ident_IDENT(self);
if ((res==((TR_ARG_DEC) NULL))) {
res = newa;
}
else {
TR_ARG_DEC_appen(res, newa);
}
if (PARSER_check_INT(self, shared_PARSER_co)) {
}
else {
goto after_loop;
}
}
after_loop: ;
PARSER_match_INT(self, shared_PARSER_co_1647);
tp_1827 = PARSER_type_spec_1639(self);
if (PARSER_check_INT(self, shared_PARSER_ba)) {
local0 = TRUE;
} else {
local0 = PARSER_check_INT(self, shared_PARSER_it);
}
hot_1828 = local0;
if (hot_1828) {
local1 = (!(is_iter_1825));
} else {
local1 = FALSE;
}
if (local1) {
PARSER_error_STR(self, ((STR) &hotargumentsnota_1830));
}
p = res;
while (1) {
if ((p==((TR_ARG_DEC) NULL))) {
goto after_loop_1831;
}
p->tp = tp_1827;
p->is_hot = hot_1828;
p = p->next_8;
}
after_loop_1831: ;
PARSER_exit(self);
return res;
}
BOOL PARSER_is_expr_s(PARSER self, TOKEN t_1833) {
BOOL noname1834 = ((BOOL) 0);
INT noname1835 = ((INT) 0);
noname1835 = t_1833.val_16;
switch (noname1835) {
case 36:
case 2:
case 70:
case 71:
case 35:
case 44:
case 64:
case 82:
case 23:
case 69:
case 74:
case 14:
case 19:
case 32:
case 46:
case 42:
case 7:
case 39:
case 16:
case 51:
case 50:
case 48:
case 49:
case 52:
case 54:
case 90:
case 91:
case 92:
case 93:
return TRUE;
break;
default: ;
}
return FALSE;
}
BOOL PARSER_is_stmt_s(PARSER self, TOKEN t_1836) {
BOOL noname1837 = ((BOOL) 0);
INT noname1838 = ((INT) 0);
noname1838 = t_1836.val_16;
switch (noname1838) {
case 2:
case 17:
case 22:
case 47:
case 29:
case 33:
case 8:
case 41:
case 5:
case 28:
case 30:
case 46:
case 42:
case 7:
case 83:
case 84:
case 85:
case 86:
case 87:
case 88:
case 95:
return TRUE;
break;
default: ;
}
return PARSER_is_expr_s(self, t_1836);
}
TR_IF_STMT TR_IF_STMT_creat(TR_IF_STMT self) {
TR_IF_STMT noname1839;
TR_IF_STMT local0;
local0 = ((TR_IF_STMT) sbi_alloc(sizeof(struct TR_IF_STMT_struct), TR_IF_STMT_tag));
return local0;
}
TR_IF_STMT PARSER_if_stmt_T(PARSER self) {
TR_IF_STMT noname1840;
TR_IF_STMT res;
PARSER_enter_STR(self, ((STR) &ifstatement));
res = TR_IF_STMT_creat(((TR_IF_STMT) NULL));
res->source_38 = PARSER_source_lo(self);
res->test_40 = PARSER_expr_TR_EXPR(self);
PARSER_match_INT(self, shared_PARSER_th);
res->then_part = PARSER_stmt_list(self);
if (PARSER_check_INT(self, shared_PARSER_el)) {
res->else_part = ((TR_STMT) PARSER_if_stmt_T(self));
}
else {
if (PARSER_check_INT(self, shared_PARSER_el_1841)) {
res->else_part = PARSER_stmt_list(self);
}
PARSER_match_INT(self, shared_PARSER_en);
}
PARSER_exit(self);
return res;
}
TR_LOOP_STMT TR_LOOP_STMT_cre(TR_LOOP_STMT self) {
TR_LOOP_STMT noname1842;
TR_LOOP_STMT local0;
local0 = ((TR_LOOP_STMT) sbi_alloc(sizeof(struct TR_LOOP_STMT_struct), TR_LOOP_STMT_tag));
return local0;
}
TR_LOOP_STMT PARSER_loop_stmt(PARSER self) {
TR_LOOP_STMT noname1843;
TR_LOOP_STMT res;
PARSER_enter_STR(self, ((STR) &loopstatement));
PARSER_match_INT(self, shared_PARSER_lo);
res = TR_LOOP_STMT_cre(((TR_LOOP_STMT) NULL));
res->source_38 = PARSER_source_lo(self);
res->body = PARSER_stmt_list(self);
PARSER_match_INT(self, shared_PARSER_en);
PARSER_exit(self);
return res;
}
TR_RETURN_STMT TR_RETURN_STMT_c(TR_RETURN_STMT self) {
TR_RETURN_STMT noname1844;
TR_RETURN_STMT local0;
local0 = ((TR_RETURN_STMT) sbi_alloc(sizeof(struct TR_RETURN_STMT_struct), TR_RETURN_STMT_tag));
return local0;
}
TR_RETURN_STMT PARSER_return_st(PARSER self) {
TR_RETURN_STMT noname1845;
TR_RETURN_STMT res;
PARSER_enter_STR(self, ((STR) &returnstatement));
res = TR_RETURN_STMT_c(((TR_RETURN_STMT) NULL));
res->source_38 = PARSER_source_lo(self);
PARSER_match_INT(self, shared_PARSER_re_1846);
if (PARSER_is_expr_s(self, self->next_8)) {
res->val_16 = PARSER_expr_TR_EXPR(self);
}
PARSER_exit(self);
return res;
}
TR_YIELD_STMT TR_YIELD_STMT_cr(TR_YIELD_STMT self) {
TR_YIELD_STMT noname1847;
TR_YIELD_STMT local0;
local0 = ((TR_YIELD_STMT) sbi_alloc(sizeof(struct TR_YIELD_STMT_struct), TR_YIELD_STMT_tag));
return local0;
}
TR_YIELD_STMT PARSER_yield_stm(PARSER self) {
TR_YIELD_STMT noname1848;
TR_YIELD_STMT res;
PARSER_enter_STR(self, ((STR) &yieldstatement));
res = TR_YIELD_STMT_cr(((TR_YIELD_STMT) NULL));
res->source_38 = PARSER_source_lo(self);
PARSER_match_INT(self, shared_PARSER_yi);
if (PARSER_is_expr_s(self, self->next_8)) {
res->val_16 = PARSER_expr_TR_EXPR(self);
}
PARSER_exit(self);
return res;
}
TR_QUIT_STMT TR_QUIT_STMT_cre(TR_QUIT_STMT self) {
TR_QUIT_STMT noname1849;
TR_QUIT_STMT local0;
local0 = ((TR_QUIT_STMT) sbi_alloc(sizeof(struct TR_QUIT_STMT_struct), TR_QUIT_STMT_tag));
return local0;
}
TR_CASE_STMT TR_CASE_STMT_cre(TR_CASE_STMT self) {
TR_CASE_STMT noname1850;
TR_CASE_STMT local0;
local0 = ((TR_CASE_STMT) sbi_alloc(sizeof(struct TR_CASE_STMT_struct), TR_CASE_STMT_tag));
return local0;
}
TR_CASE_WHEN TR_CASE_WHEN_cre(TR_CASE_WHEN self) {
TR_CASE_WHEN noname1851;
TR_CASE_WHEN local0;
local0 = ((TR_CASE_WHEN) sbi_alloc(sizeof(struct TR_CASE_WHEN_struct), TR_CASE_WHEN_tag));
return local0;
}
void TR_CASE_WHEN_app(TR_CASE_WHEN self, TR_CASE_WHEN l) {
TR_CASE_WHEN last_1852;
if (!((!((self==((TR_CASE_WHEN) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/next.sa:50:9\n");
exit(16);
}
if ((self->next_8==((TR_CASE_WHEN) NULL))) {
self->next_8 = l;
return;
}
last_1852 = self->next_8;
while (1) {
if ((last_1852->next_8==((TR_CASE_WHEN) NULL))) {
goto after_loop;
}
last_1852 = last_1852->next_8;
}
after_loop: ;
last_1852->next_8 = l;
}
TR_CASE_STMT PARSER_case_stmt(PARSER self) {
TR_CASE_STMT noname1854;
TR_CASE_STMT res;
TR_CASE_WHEN first_1855 = ((TR_CASE_WHEN) NULL);
TR_CASE_WHEN this_1856 = ((TR_CASE_WHEN) NULL);
TR_STMT st;
PARSER_enter_STR(self, ((STR) &casestatement));
PARSER_match_INT(self, shared_PARSER_ca);
res = TR_CASE_STMT_cre(((TR_CASE_STMT) NULL));
res->source_38 = PARSER_source_lo(self);
res->test_40 = PARSER_expr_TR_EXPR(self);
while (1) {
if (PARSER_check_INT(self, shared_PARSER_wh)) {
}
else {
goto after_loop;
}
first_1855 = ((TR_CASE_WHEN) NULL);
while (1) {
this_1856 = TR_CASE_WHEN_cre(((TR_CASE_WHEN) NULL));
this_1856->source_38 = PARSER_source_lo(self);
if ((first_1855==((TR_CASE_WHEN) NULL))) {
first_1855 = this_1856;
}
this_1856->val_16 = PARSER_expr_TR_EXPR(self);
if ((res->when_part==((TR_CASE_WHEN) NULL))) {
res->when_part = this_1856;
}
else {
TR_CASE_WHEN_app(res->when_part, this_1856);
}
if (PARSER_check_INT(self, shared_PARSER_co)) {
}
else {
goto after_loop_1858;
}
}
after_loop_1858: ;
PARSER_match_INT(self, shared_PARSER_th);
st = PARSER_stmt_list(self);
this_1856 = first_1855;
while (1) {
if ((this_1856==((TR_CASE_WHEN) NULL))) {
goto after_loop_1860;
}
this_1856->then_part = st;
this_1856 = this_1856->next_8;
}
after_loop_1860: ;
}
after_loop: ;
if (PARSER_check_INT(self, shared_PARSER_el_1841)) {
res->else_part = PARSER_stmt_list(self);
res->no_else = FALSE;
}
else {
res->no_else = TRUE;
}
PARSER_match_INT(self, shared_PARSER_en);
PARSER_exit(self);
return res;
}
TR_TYPECASE_STMT TR_TYPECASE_STMT_1862(TR_TYPECASE_STMT self) {
TR_TYPECASE_STMT noname1863;
TR_TYPECASE_STMT local0;
local0 = ((TR_TYPECASE_STMT) sbi_alloc(sizeof(struct TR_TYPECASE_STMT_struct), TR_TYPECASE_STMT_tag));
return local0;
}
TR_TYPECASE_WHEN TR_TYPECASE_WHEN_1864(TR_TYPECASE_WHEN self) {
TR_TYPECASE_WHEN noname1865;
TR_TYPECASE_WHEN local0;
local0 = ((TR_TYPECASE_WHEN) sbi_alloc(sizeof(struct TR_TYPECASE_WHEN_struct), TR_TYPECASE_WHEN_tag));
return local0;
}
void TR_TYPECASE_WHEN_1866(TR_TYPECASE_WHEN self, TR_TYPECASE_WHEN l) {
TR_TYPECASE_WHEN last_1867;
if (!((!((self==((TR_TYPECASE_WHEN) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/next.sa:50:9\n");
exit(16);
}
if ((self->next_8==((TR_TYPECASE_WHEN) NULL))) {
self->next_8 = l;
return;
}
last_1867 = self->next_8;
while (1) {
if ((last_1867->next_8==((TR_TYPECASE_WHEN) NULL))) {
goto after_loop;
}
last_1867 = last_1867->next_8;
}
after_loop: ;
last_1867->next_8 = l;
}
TR_TYPECASE_STMT PARSER_typecase_(PARSER self) {
TR_TYPECASE_STMT noname1869;
TR_TYPECASE_STMT res;
TR_TYPECASE_WHEN this_1870;
PARSER_enter_STR(self, ((STR) &typecasestatement));
PARSER_match_INT(self, shared_PARSER_ty_1871);
res = TR_TYPECASE_STMT_1862(((TR_TYPECASE_STMT) NULL));
res->source_38 = PARSER_source_lo(self);
PARSER_match_INT(self, shared_PARSER_id);
res->name_19 = PARSER_ident_IDENT(self);
while (1) {
if (PARSER_check_INT(self, shared_PARSER_wh)) {
}
else {
goto after_loop;
}
this_1870 = TR_TYPECASE_WHEN_1864(((TR_TYPECASE_WHEN) NULL));
this_1870->source_38 = PARSER_source_lo(self);
this_1870->tp = PARSER_type_spec_1639(self);
PARSER_match_INT(self, shared_PARSER_th);
this_1870->then_part = PARSER_stmt_list(self);
if ((res->when_part==((TR_TYPECASE_WHEN) NULL))) {
res->when_part = this_1870;
}
else {
TR_TYPECASE_WHEN_1866(res->when_part, this_1870);
}
}
after_loop: ;
if (PARSER_check_INT(self, shared_PARSER_el_1841)) {
res->else_part = PARSER_stmt_list(self);
res->no_else = FALSE;
}
else {
res->no_else = TRUE;
}
PARSER_match_INT(self, shared_PARSER_en);
PARSER_exit(self);
return res;
}
TR_ASSERT_STMT TR_ASSERT_STMT_c(TR_ASSERT_STMT self) {
TR_ASSERT_STMT noname1873;
TR_ASSERT_STMT local0;
local0 = ((TR_ASSERT_STMT) sbi_alloc(sizeof(struct TR_ASSERT_STMT_struct), TR_ASSERT_STMT_tag));
return local0;
}
TR_ASSERT_STMT PARSER_assert_st(PARSER self) {
TR_ASSERT_STMT noname1874;
TR_ASSERT_STMT res;
PARSER_enter_STR(self, ((STR) &assertstatement));
res = TR_ASSERT_STMT_c(((TR_ASSERT_STMT) NULL));
res->source_38 = PARSER_source_lo(self);
PARSER_match_INT(self, shared_PARSER_as_1875);
res->test_40 = PARSER_expr_TR_EXPR(self);
PARSER_exit(self);
return res;
}
TR_PROTECT_STMT TR_PROTECT_STMT_(TR_PROTECT_STMT self) {
TR_PROTECT_STMT noname1876;
TR_PROTECT_STMT local0;
local0 = ((TR_PROTECT_STMT) sbi_alloc(sizeof(struct TR_PROTECT_STMT_struct), TR_PROTECT_STMT_tag));
return local0;
}
TR_PROTECT_WHEN TR_PROTECT_WHEN_(TR_PROTECT_WHEN self) {
TR_PROTECT_WHEN noname1877;
TR_PROTECT_WHEN local0;
local0 = ((TR_PROTECT_WHEN) sbi_alloc(sizeof(struct TR_PROTECT_WHEN_struct), TR_PROTECT_WHEN_tag));
return local0;
}
void TR_PROTECT_WHEN__1878(TR_PROTECT_WHEN self, TR_PROTECT_WHEN l) {
TR_PROTECT_WHEN last_1879;
if (!((!((self==((TR_PROTECT_WHEN) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/next.sa:50:9\n");
exit(16);
}
if ((self->next_8==((TR_PROTECT_WHEN) NULL))) {
self->next_8 = l;
return;
}
last_1879 = self->next_8;
while (1) {
if ((last_1879->next_8==((TR_PROTECT_WHEN) NULL))) {
goto after_loop;
}
last_1879 = last_1879->next_8;
}
after_loop: ;
last_1879->next_8 = l;
}
TR_PROTECT_STMT PARSER_protect_s(PARSER self) {
TR_PROTECT_STMT noname1881;
TR_PROTECT_STMT res;
TR_PROTECT_WHEN first_1882 = ((TR_PROTECT_WHEN) NULL);
TR_PROTECT_WHEN this_1883 = ((TR_PROTECT_WHEN) NULL);
TR_STMT st;
PARSER_enter_STR(self, ((STR) &protectstatement));
PARSER_match_INT(self, shared_PARSER_pr_1884);
res = TR_PROTECT_STMT_(((TR_PROTECT_STMT) NULL));
res->source_38 = PARSER_source_lo(self);
res->stmts = PARSER_stmt_list(self);
while (1) {
if (PARSER_check_INT(self, shared_PARSER_wh)) {
}
else {
goto after_loop;
}
first_1882 = ((TR_PROTECT_WHEN) NULL);
while (1) {
this_1883 = TR_PROTECT_WHEN_(((TR_PROTECT_WHEN) NULL));
this_1883->source_38 = PARSER_source_lo(self);
if ((first_1882==((TR_PROTECT_WHEN) NULL))) {
first_1882 = this_1883;
}
this_1883->tp = PARSER_type_spec_1639(self);
if ((res->when_part==((TR_PROTECT_WHEN) NULL))) {
res->when_part = this_1883;
}
else {
TR_PROTECT_WHEN__1878(res->when_part, this_1883);
}
if (PARSER_check_INT(self, shared_PARSER_co)) {
}
else {
goto after_loop_1886;
}
}
after_loop_1886: ;
PARSER_match_INT(self, shared_PARSER_th);
st = PARSER_stmt_list(self);
this_1883 = first_1882;
while (1) {
if ((this_1883==((TR_PROTECT_WHEN) NULL))) {
goto after_loop_1888;
}
this_1883->then_part = st;
this_1883 = this_1883->next_8;
}
after_loop_1888: ;
}
after_loop: ;
if (PARSER_check_INT(self, shared_PARSER_el_1841)) {
res->else_part = PARSER_stmt_list(self);
res->no_else = FALSE;
}
else {
res->no_else = TRUE;
}
PARSER_match_INT(self, shared_PARSER_en);
PARSER_exit(self);
return res;
}
TR_RAISE_STMT TR_RAISE_STMT_cr(TR_RAISE_STMT self) {
TR_RAISE_STMT noname1890;
TR_RAISE_STMT local0;
local0 = ((TR_RAISE_STMT) sbi_alloc(sizeof(struct TR_RAISE_STMT_struct), TR_RAISE_STMT_tag));
return local0;
}
TR_RAISE_STMT PARSER_raise_stm(PARSER self) {
TR_RAISE_STMT noname1891;
TR_RAISE_STMT res;
PARSER_enter_STR(self, ((STR) &raisestatement));
res = TR_RAISE_STMT_cr(((TR_RAISE_STMT) NULL));
res->source_38 = PARSER_source_lo(self);
PARSER_match_INT(self, shared_PARSER_ra);
res->val_16 = PARSER_expr_TR_EXPR(self);
PARSER_exit(self);
return res;
}
TR_COBEGIN_STMT TR_COBEGIN_STMT_(TR_COBEGIN_STMT self) {
TR_COBEGIN_STMT noname1892;
TR_COBEGIN_STMT local0;
local0 = ((TR_COBEGIN_STMT) sbi_alloc(sizeof(struct TR_COBEGIN_STMT_struct), TR_COBEGIN_STMT_tag));
return local0;
}
TR_COBEGIN_STMT PARSER_cobegin_s(PARSER self) {
TR_COBEGIN_STMT noname1893;
TR_COBEGIN_STMT res;
PARSER_enter_STR(self, ((STR) &cobeginstatement));
PARSER_match_INT(self, shared_PARSER_co_1894);
res = TR_COBEGIN_STMT_(((TR_COBEGIN_STMT) NULL));
res->source_38 = PARSER_source_lo(self);
res->stmts = PARSER_stmt_list(self);
PARSER_match_INT(self, shared_PARSER_en);
PARSER_exit(self);
return res;
}
TR_LOCK_STMT TR_LOCK_STMT_cre(TR_LOCK_STMT self) {
TR_LOCK_STMT noname1895;
TR_LOCK_STMT local0;
local0 = ((TR_LOCK_STMT) sbi_alloc(sizeof(struct TR_LOCK_STMT_struct), TR_LOCK_STMT_tag));
return local0;
}
TR_LOCK_STMT PARSER_lock_stmt(PARSER self) {
TR_LOCK_STMT noname1896;
TR_LOCK_STMT res;
PARSER_enter_STR(self, ((STR) &lockstatement));
res = TR_LOCK_STMT_cre(((TR_LOCK_STMT) NULL));
res->source_38 = PARSER_source_lo(self);
PARSER_match_INT(self, shared_PARSER_lo_1897);
res->e_list = PARSER_expr_list(self, FALSE);
PARSER_match_INT(self, shared_PARSER_th);
res->then_part = PARSER_stmt_list(self);
PARSER_match_INT(self, shared_PARSER_en);
PARSER_exit(self);
return res;
}
TR_UNLOCK_STMT TR_UNLOCK_STMT_c(TR_UNLOCK_STMT self) {
TR_UNLOCK_STMT noname1898;
TR_UNLOCK_STMT local0;
local0 = ((TR_UNLOCK_STMT) sbi_alloc(sizeof(struct TR_UNLOCK_STMT_struct), TR_UNLOCK_STMT_tag));
return local0;
}
TR_UNLOCK_STMT PARSER_unlock_st(PARSER self) {
TR_UNLOCK_STMT noname1899;
TR_UNLOCK_STMT res;
PARSER_enter_STR(self, ((STR) &unlockstatement));
res = TR_UNLOCK_STMT_c(((TR_UNLOCK_STMT) NULL));
res->source_38 = PARSER_source_lo(self);
PARSER_match_INT(self, shared_PARSER_un_1900);
res->e = PARSER_expr_TR_EXPR(self);
PARSER_exit(self);
return res;
}
TR_TRY_STMT TR_TRY_STMT_crea(TR_TRY_STMT self) {
TR_TRY_STMT noname1901;
TR_TRY_STMT local0;
local0 = ((TR_TRY_STMT) sbi_alloc(sizeof(struct TR_TRY_STMT_struct), TR_TRY_STMT_tag));
return local0;
}
TR_TRY_STMT PARSER_try_stmt_(PARSER self) {
TR_TRY_STMT noname1902;
TR_TRY_STMT res;
PARSER_enter_STR(self, ((STR) &trystatement));
res = TR_TRY_STMT_crea(((TR_TRY_STMT) NULL));
res->source_38 = PARSER_source_lo(self);
PARSER_match_INT(self, shared_PARSER_tr_1903);
res->e_list = PARSER_expr_list(self, FALSE);
PARSER_match_INT(self, shared_PARSER_th);
res->then_part = PARSER_stmt_list(self);
if (PARSER_check_INT(self, shared_PARSER_el_1841)) {
res->else_part = PARSER_stmt_list(self);
}
PARSER_match_INT(self, shared_PARSER_en);
PARSER_exit(self);
return res;
}
TR_WITH_NEAR_STMT TR_WITH_NEAR_STM(TR_WITH_NEAR_STMT self) {
TR_WITH_NEAR_STMT noname1904;
TR_WITH_NEAR_STMT local0;
local0 = ((TR_WITH_NEAR_STMT) sbi_alloc(sizeof(struct TR_WITH_NEAR_STMT_struct), TR_WITH_NEAR_STMT_tag));
return local0;
}
TR_IDENT_LIST TR_IDENT_LIST_cr(TR_IDENT_LIST self) {
TR_IDENT_LIST noname1905;
TR_IDENT_LIST local0;
local0 = ((TR_IDENT_LIST) sbi_alloc(sizeof(struct TR_IDENT_LIST_struct), TR_IDENT_LIST_tag));
return local0;
}
void TR_IDENT_LIST_ap(TR_IDENT_LIST self, TR_IDENT_LIST l) {
TR_IDENT_LIST last_1906;
if (!((!((self==((TR_IDENT_LIST) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/next.sa:50:9\n");
exit(16);
}
if ((self->next_8==((TR_IDENT_LIST) NULL))) {
self->next_8 = l;
return;
}
last_1906 = self->next_8;
while (1) {
if ((last_1906->next_8==((TR_IDENT_LIST) NULL))) {
goto after_loop;
}
last_1906 = last_1906->next_8;
}
after_loop: ;
last_1906->next_8 = l;
}
TR_IDENT_LIST PARSER_ident_lis(PARSER self) {
TR_IDENT_LIST noname1908;
TR_IDENT_LIST res = ((TR_IDENT_LIST) NULL);
TR_IDENT_LIST id = ((TR_IDENT_LIST) NULL);
PARSER_enter_STR(self, ((STR) &identifierlist));
while (1) {
if (TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_id)) {
id = TR_IDENT_LIST_cr(((TR_IDENT_LIST) NULL));
id->name_19 = PARSER_ident_IDENT(self);
}
else {
PARSER_exp_error_STR(self, ((STR) &identifier));
}
PARSER_fetch(self);
if ((res==((TR_IDENT_LIST) NULL))) {
res = id;
}
else {
TR_IDENT_LIST_ap(res, id);
}
if (PARSER_check_INT(self, shared_PARSER_co)) {
}
else {
goto after_loop;
}
}
after_loop: ;
PARSER_exit(self);
return res;
}
TR_WITH_NEAR_STMT PARSER_with_near(PARSER self) {
TR_WITH_NEAR_STMT noname1910;
TR_WITH_NEAR_STMT res;
PARSER_enter_STR(self, ((STR) &with_nearstatement));
res = TR_WITH_NEAR_STM(((TR_WITH_NEAR_STMT) NULL));
res->source_38 = PARSER_source_lo(self);
PARSER_match_INT(self, shared_PARSER_wi);
res->idents = PARSER_ident_lis(self);
PARSER_match_INT(self, shared_PARSER_ne);
res->near_part = PARSER_stmt_list(self);
if (PARSER_check_INT(self, shared_PARSER_el_1841)) {
res->else_part = PARSER_stmt_list(self);
}
PARSER_match_INT(self, shared_PARSER_en);
PARSER_exit(self);
return res;
}
TR_DIST_STMT TR_DIST_STMT_cre(TR_DIST_STMT self) {
TR_DIST_STMT noname1911;
TR_DIST_STMT local0;
local0 = ((TR_DIST_STMT) sbi_alloc(sizeof(struct TR_DIST_STMT_struct), TR_DIST_STMT_tag));
return local0;
}
INT FLISTTR_EXPR_asi(FLISTTR_EXPR self) {
INT noname1912 = ((INT) 0);
return self->asize;
fprintf(stderr,"Last statement wasn't return ../Library/aref.sa:20:8\n");
exit(16);
}
INT FLISTTR_EXPR_siz(FLISTTR_EXPR self) {
INT noname1913 = ((INT) 0);
if ((self==((FLISTTR_EXPR) NULL))) {
return 0;
}
return self->loc_17;
if (!FLISTTR_EXPR_inv(self)) {
fprintf(stderr,"Failed invariant FLIST{$TR_EXPR}::invariant:BOOL ../Library/flist.sa:50:7\n");
exit(16);
}
}
BOOL FLISTTR_EXPR_is_(FLISTTR_EXPR self) {
BOOL noname1914 = ((BOOL) 0);
INT local0;
local0 = FLISTTR_EXPR_siz(self);
return (local0==0);
if (!FLISTTR_EXPR_inv(self)) {
fprintf(stderr,"Failed invariant FLIST{$TR_EXPR}::invariant:BOOL ../Library/flist.sa:113:11\n");
exit(16);
}
}
void FLISTTR_EXPR_aclear(FLISTTR_EXPR self) {
TR_EXPR nil = ((TR_EXPR) NULL);
FLISTTR_EXPR noname1915;
if (!((!((self==((FLISTTR_EXPR) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:43:9\n");
exit(16);
}
{
struct FLISTTR_EXPR_ase_frame_struct temp1916_0;
FLISTTR_EXPR_ase_frame
noname1917 = &temp1916_0;
noname1917->state = 0;
while (1) {
if (noname1917->state == 0) {
noname1915 = self;
noname1917->arg0 = noname1915;
}
noname1917->arg1 = nil;
FLISTTR_EXPR_ase(noname1917);
if (noname1917->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
}
void FLISTTR_EXPR_clear(FLISTTR_EXPR self) {
if (FLISTTR_EXPR_is_(self)) {
return;
}
else {
FLISTTR_EXPR_aclear(self);
self->loc_17 = 0;
}
if (!FLISTTR_EXPR_inv(self)) {
fprintf(stderr,"Failed invariant FLIST{$TR_EXPR}::invariant:BOOL ../Library/flist.sa:117:8\n");
exit(16);
}
}
void FLISTTR_EXPR_are(FLISTTR_EXPR self, INT ind_1918, TR_EXPR val_1919) {
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FLISTTR_EXPR) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_1918, local1, (c_INT_minus_INT_INT_chk(local2,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:38:7\n");
exit(16);
}
if (ind_1918<0||ind_1918>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:38:7\n");
exit(16);
}
self->arr_part[ind_1918] = val_1919;
}
void FLISTTR_EXPR_ase_1920(FLISTTR_EXPR self, INT ind_1921, TR_EXPR val_1922) {
BOOL local0;
INT local1;
if ((!((self==((FLISTTR_EXPR) NULL))))) {
local1 = 0;
local0 = INT_is_bet_INT_I(ind_1921, local1, (c_INT_minus_INT_INT_chk(self->loc_17,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/flist.sa:73:7\n");
exit(16);
}
FLISTTR_EXPR_are(self, ind_1921, val_1922);
if (!FLISTTR_EXPR_inv(self)) {
fprintf(stderr,"Failed invariant FLIST{$TR_EXPR}::invariant:BOOL ../Library/flist.sa:73:7\n");
exit(16);
}
}
FLISTTR_EXPR FLISTTR_EXPR_pus(FLISTTR_EXPR self, TR_EXPR e_1923) {
FLISTTR_EXPR noname1924;
FLISTTR_EXPR r_1925 = ((FLISTTR_EXPR) NULL);
FLISTTR_EXPR noname1926;
FLISTTR_EXPR noname1927;
FLISTTR_EXPR local0;
INT local1;
FLISTTR_EXPR local2;
INT local3;
TR_EXPR local4;
INT local5;
if ((self==((FLISTTR_EXPR) NULL))) {
local0 = ((FLISTTR_EXPR) sbi_arr_alloc(sizeof(struct FLISTTR_EXPR_struct), FLISTTR_EXPR_tag, sizeof(TR_EXPR) , 5));
local0->asize = 5;
r_1925 = local0;
}
else {
local1 = self->loc_17;
if ((local1<(self->asize))) {
r_1925 = self;
}
else {
local3 = 2;
local2 = ((FLISTTR_EXPR) sbi_arr_alloc(sizeof(struct FLISTTR_EXPR_struct), FLISTTR_EXPR_tag, sizeof(TR_EXPR) , (c_INT_times_INT_INT_chk(local3,(self->asize)))));
local2->asize = (c_INT_times_INT_INT_chk(local3,(self->asize)));
r_1925 = local2;
r_1925->loc_17 = self->loc_17;
{
struct FLISTTR_EXPR_elt_frame_struct temp1928_0;
FLISTTR_EXPR_elt_frame
noname1929 = &temp1928_0;
struct FLISTTR_EXPR_ase_frame_struct temp1928_1;
FLISTTR_EXPR_ase_frame
noname1930 = &temp1928_1;
noname1929->state = 0;
noname1930->state = 0;
while (1) {
if (noname1930->state == 0) {
noname1927 = r_1925;
noname1930->arg0 = noname1927;
}
if (noname1929->state == 0) {
noname1926 = self;
noname1929->arg0 = noname1926;
}
local4 = FLISTTR_EXPR_elt(noname1929);
if (noname1929->state == -1) goto after_loop;
noname1930->arg1 = local4;
FLISTTR_EXPR_ase(noname1930);
if (noname1930->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
FLISTTR_EXPR_clear(self);
}
}
r_1925->loc_17 = (c_INT_plus_INT_INT_chk(r_1925->loc_17,1));
local5 = (c_INT_minus_INT_INT_chk(r_1925->loc_17,1));
FLISTTR_EXPR_ase_1920(r_1925, local5, e_1923);
return r_1925;
if (!FLISTTR_EXPR_inv(self)) {
fprintf(stderr,"Failed invariant FLIST{$TR_EXPR}::invariant:BOOL ../Library/flist.sa:79:7\n");
exit(16);
}
}
INT FLISTIDENT_asize_INT(FLISTIDENT self) {
INT noname1931 = ((INT) 0);
return self->asize;
fprintf(stderr,"Last statement wasn't return ../Library/aref.sa:20:8\n");
exit(16);
}
INT FLISTIDENT_size_INT(FLISTIDENT self) {
INT noname1932 = ((INT) 0);
if ((self==((FLISTIDENT) NULL))) {
return 0;
}
return self->loc_17;
if (!FLISTIDENT_invar(self)) {
fprintf(stderr,"Failed invariant FLIST{IDENT}::invariant:BOOL ../Library/flist.sa:50:7\n");
exit(16);
}
}
BOOL FLISTIDENT_is_em(FLISTIDENT self) {
BOOL noname1933 = ((BOOL) 0);
INT local0;
local0 = FLISTIDENT_size_INT(self);
return (local0==0);
if (!FLISTIDENT_invar(self)) {
fprintf(stderr,"Failed invariant FLIST{IDENT}::invariant:BOOL ../Library/flist.sa:113:11\n");
exit(16);
}
}
void FLISTIDENT_aclear(FLISTIDENT self) {
IDENT nil = IDENT_zero;
FLISTIDENT noname1934;
if (!((!((self==((FLISTIDENT) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:43:9\n");
exit(16);
}
{
struct FLISTIDENT_aset__frame_struct temp1935_0;
FLISTIDENT_aset__frame
noname1936 = &temp1935_0;
noname1936->state = 0;
while (1) {
if (noname1936->state == 0) {
noname1934 = self;
noname1936->arg0 = noname1934;
}
noname1936->arg1 = nil;
FLISTIDENT_aset_(noname1936);
if (noname1936->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
}
void FLISTIDENT_clear(FLISTIDENT self) {
if (FLISTIDENT_is_em(self)) {
return;
}
else {
FLISTIDENT_aclear(self);
self->loc_17 = 0;
}
if (!FLISTIDENT_invar(self)) {
fprintf(stderr,"Failed invariant FLIST{IDENT}::invariant:BOOL ../Library/flist.sa:117:8\n");
exit(16);
}
}
void FLISTIDENT_aref_(FLISTIDENT self, INT ind_1937, IDENT val_1938) {
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FLISTIDENT) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_1937, local1, (c_INT_minus_INT_INT_chk(local2,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:38:7\n");
exit(16);
}
if (ind_1937<0||ind_1937>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:38:7\n");
exit(16);
}
self->arr_part[ind_1937] = val_1938;
}
void FLISTIDENT_aset__1939(FLISTIDENT self, INT ind_1940, IDENT val_1941) {
BOOL local0;
INT local1;
if ((!((self==((FLISTIDENT) NULL))))) {
local1 = 0;
local0 = INT_is_bet_INT_I(ind_1940, local1, (c_INT_minus_INT_INT_chk(self->loc_17,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/flist.sa:73:7\n");
exit(16);
}
FLISTIDENT_aref_(self, ind_1940, val_1941);
if (!FLISTIDENT_invar(self)) {
fprintf(stderr,"Failed invariant FLIST{IDENT}::invariant:BOOL ../Library/flist.sa:73:7\n");
exit(16);
}
}
FLISTIDENT FLISTIDENT_push_(FLISTIDENT self, IDENT e_1942) {
FLISTIDENT noname1943;
FLISTIDENT r_1944 = ((FLISTIDENT) NULL);
FLISTIDENT noname1945;
FLISTIDENT noname1946;
FLISTIDENT local0;
INT local1;
FLISTIDENT local2;
INT local3;
IDENT local4;
INT local5;
if ((self==((FLISTIDENT) NULL))) {
local0 = ((FLISTIDENT) sbi_arr_alloc(sizeof(struct FLISTIDENT_struct), FLISTIDENT_tag, sizeof(IDENT) , 5));
local0->asize = 5;
r_1944 = local0;
}
else {
local1 = self->loc_17;
if ((local1<(self->asize))) {
r_1944 = self;
}
else {
local3 = 2;
local2 = ((FLISTIDENT) sbi_arr_alloc(sizeof(struct FLISTIDENT_struct), FLISTIDENT_tag, sizeof(IDENT) , (c_INT_times_INT_INT_chk(local3,(self->asize)))));
local2->asize = (c_INT_times_INT_INT_chk(local3,(self->asize)));
r_1944 = local2;
r_1944->loc_17 = self->loc_17;
{
struct FLISTIDENT_elt_IDENT_frame_struct temp1947_0;
FLISTIDENT_elt_IDENT_frame
noname1948 = &temp1947_0;
struct FLISTIDENT_aset__frame_struct temp1947_1;
FLISTIDENT_aset__frame
noname1949 = &temp1947_1;
noname1948->state = 0;
noname1949->state = 0;
while (1) {
if (noname1949->state == 0) {
noname1946 = r_1944;
noname1949->arg0 = noname1946;
}
if (noname1948->state == 0) {
noname1945 = self;
noname1948->arg0 = noname1945;
}
local4 = FLISTIDENT_elt_IDENT(noname1948);
if (noname1948->state == -1) goto after_loop;
noname1949->arg1 = local4;
FLISTIDENT_aset_(noname1949);
if (noname1949->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
FLISTIDENT_clear(self);
}
}
r_1944->loc_17 = (c_INT_plus_INT_INT_chk(r_1944->loc_17,1));
local5 = (c_INT_minus_INT_INT_chk(r_1944->loc_17,1));
FLISTIDENT_aset__1939(r_1944, local5, e_1942);
return r_1944;
if (!FLISTIDENT_invar(self)) {
fprintf(stderr,"Failed invariant FLIST{IDENT}::invariant:BOOL ../Library/flist.sa:79:7\n");
exit(16);
}
}
TR_DIST_STMT PARSER_dist_stmt(PARSER self) {
TR_DIST_STMT noname1950;
TR_DIST_STMT res;
FLISTTR_EXPR local0;
FLISTIDENT local1;
FLISTTR_EXPR local2;
FLISTIDENT local3;
PARSER_enter_STR(self, ((STR) &diststatement));
res = TR_DIST_STMT_cre(((TR_DIST_STMT) NULL));
res->source_38 = PARSER_source_lo(self);
PARSER_match_INT(self, shared_PARSER_di);
if ((!(PARSER_check_INT(self, shared_PARSER_do_tok)))) {
local0 = res->exprs;
res->exprs = FLISTTR_EXPR_pus(local0, PARSER_expr_TR_EXPR(self));
PARSER_match_INT(self, shared_PARSER_as_tok);
PARSER_match_INT(self, shared_PARSER_id);
local1 = res->ids;
res->ids = FLISTIDENT_push_(local1, PARSER_ident_IDENT(self));
while (1) {
if (PARSER_check_INT(self, shared_PARSER_do_tok)) {
goto after_loop;
}
PARSER_match_INT(self, shared_PARSER_co);
local2 = res->exprs;
res->exprs = FLISTTR_EXPR_pus(local2, PARSER_expr_TR_EXPR(self));
PARSER_match_INT(self, shared_PARSER_as_tok);
PARSER_match_INT(self, shared_PARSER_id);
local3 = res->ids;
res->ids = FLISTIDENT_push_(local3, PARSER_ident_IDENT(self));
}
after_loop: ;
}
res->stmts = PARSER_stmt_list(self);
PARSER_match_INT(self, shared_PARSER_en);
return res;
}
TR_FORK_STMT TR_FORK_STMT_cre(TR_FORK_STMT self) {
TR_FORK_STMT noname1952;
TR_FORK_STMT local0;
local0 = ((TR_FORK_STMT) sbi_alloc(sizeof(struct TR_FORK_STMT_struct), TR_FORK_STMT_tag));
return local0;
}
TR_EXPR_STMT TR_EXPR_STMT_cre(TR_EXPR_STMT self) {
TR_EXPR_STMT noname1953;
TR_EXPR_STMT local0;
local0 = ((TR_EXPR_STMT) sbi_alloc(sizeof(struct TR_EXPR_STMT_struct), TR_EXPR_STMT_tag));
return local0;
}
TR_BREAK_EXPR TR_BREAK_EXPR_cr(TR_BREAK_EXPR self) {
TR_BREAK_EXPR noname1954;
TR_BREAK_EXPR local0;
local0 = ((TR_BREAK_EXPR) sbi_alloc(sizeof(struct TR_BREAK_EXPR_struct), TR_BREAK_EXPR_tag));
return local0;
}
TR_EXPR_STMT PARSER_break_stm(PARSER self) {
TR_EXPR_STMT noname1955;
TR_EXPR_STMT res;
res = TR_EXPR_STMT_cre(((TR_EXPR_STMT) NULL));
res->source_38 = PARSER_source_lo(self);
res->e = ((TR_EXPR) TR_BREAK_EXPR_cr(((TR_BREAK_EXPR) NULL)));
return res;
}
TR_IF_STMT PARSER_make_if_s(PARSER self, TR_EXPR test_1956, TR_STMT then_part_1957, TR_STMT else_part_1958) {
TR_IF_STMT noname1959;
TR_IF_STMT res;
res = TR_IF_STMT_creat(((TR_IF_STMT) NULL));
res->source_38 = PARSER_source_lo(self);
res->test_40 = test_1956;
res->then_part = then_part_1957;
res->else_part = else_part_1958;
return res;
}
TR_ASSIGN_STMT TR_ASSIGN_STMT_c(TR_ASSIGN_STMT self) {
TR_ASSIGN_STMT noname1960;
TR_ASSIGN_STMT local0;
local0 = ((TR_ASSIGN_STMT) sbi_alloc(sizeof(struct TR_ASSIGN_STMT_struct), TR_ASSIGN_STMT_tag));
return local0;
}
TR_DEC_STMT TR_DEC_STMT_crea(TR_DEC_STMT self) {
TR_DEC_STMT noname1961;
TR_DEC_STMT local0;
local0 = ((TR_DEC_STMT) sbi_alloc(sizeof(struct TR_DEC_STMT_struct), TR_DEC_STMT_tag));
return local0;
}
TR_STMT PARSER_stmt_TR_STMT(PARSER self) {
TR_STMT noname1962;
TR_STMT res = ((TR_STMT) NULL);
SFILE_ID was_at = SFILE_ID_zero;
INT noname1963 = ((INT) 0);
TR_FORK_STMT r_1964;
TR_EXPR x;
TR_TYPE_SPEC tp_1965 = ((TR_TYPE_SPEC) NULL);
TR_ASSIGN_STMT r_1966;
TR_DEC_STMT sdecl_res;
TR_ASSIGN_STMT r_1967;
TR_FORK_STMT r_1968;
TR_DEC_STMT decl_res;
TR_DEC_STMT newdec;
TR_TYPE_SPEC tp2;
TR_STMT p;
TR_EXPR_STMT r_1969;
TR_STMT local0;
TR_EXPR local1;
TR_STMT local2;
TR_EXPR local3;
TR_EXPR_STMT local4;
TR_STMT local5;
TR_STMT local6;
TR_STMT local7;
PARSER_enter_STR(self, ((STR) &statement));
was_at = PARSER_source_lo(self);
noname1963 = self->next_8.val_16;
switch (noname1963) {
case 17:
PARSER_fetch(self);
res = ((TR_STMT) PARSER_if_stmt_T(self));
break;
case 22:
res = ((TR_STMT) PARSER_loop_stmt(self));
break;
case 33:
res = ((TR_STMT) PARSER_return_st(self));
break;
case 47:
res = ((TR_STMT) PARSER_yield_stm(self));
break;
case 29:
PARSER_fetch(self);
res = ((TR_STMT) TR_QUIT_STMT_cre(((TR_QUIT_STMT) NULL)));
local0 = res;
(*TR_STMT_source_S[local0->header.tag+TR_STMT_source_S_offset])(local0, PARSER_source_lo(self));
break;
case 8:
res = ((TR_STMT) PARSER_case_stmt(self));
break;
case 41:
res = ((TR_STMT) PARSER_typecase_(self));
break;
case 5:
res = ((TR_STMT) PARSER_assert_st(self));
break;
case 28:
res = ((TR_STMT) PARSER_protect_s(self));
break;
case 30:
res = ((TR_STMT) PARSER_raise_stm(self));
break;
case 87:
res = ((TR_STMT) PARSER_cobegin_s(self));
break;
case 84:
res = ((TR_STMT) PARSER_lock_stmt(self));
break;
case 85:
res = ((TR_STMT) PARSER_unlock_st(self));
break;
case 86:
res = ((TR_STMT) PARSER_try_stmt_(self));
break;
case 88:
res = ((TR_STMT) PARSER_with_near(self));
break;
case 95:
res = ((TR_STMT) PARSER_dist_stmt(self));
break;
case 83:
PARSER_enter_STR(self, ((STR) &forkstatementwit));
PARSER_fetch(self);
r_1964 = TR_FORK_STMT_cre(((TR_FORK_STMT) NULL));
r_1964->source_38 = PARSER_source_lo(self);
r_1964->lhs = ((TR_EXPR) NULL);
r_1964->rhs = PARSER_expr_TR_EXPR(self);
res = ((TR_STMT) r_1964);
PARSER_exit(self);
break;
case 46:
PARSER_enter_STR(self, ((STR) &whileexpression_1970));
PARSER_fetch(self);
PARSER_match_INT(self, shared_PARSER_lp);
local1 = PARSER_expr_TR_EXPR(self);
local2 = ((TR_STMT) NULL);
res = ((TR_STMT) PARSER_make_if_s(self, local1, local2, ((TR_STMT) PARSER_break_stm(self))));
PARSER_match_INT(self, shared_PARSER_rp);
PARSER_exit(self);
break;
case 42:
PARSER_enter_STR(self, ((STR) &untilexpression_1971));
PARSER_fetch(self);
PARSER_match_INT(self, shared_PARSER_lp);
local3 = PARSER_expr_TR_EXPR(self);
local4 = PARSER_break_stm(self);
res = ((TR_STMT) PARSER_make_if_s(self, local3, ((TR_STMT) local4), ((TR_STMT) NULL)));
PARSER_match_INT(self, shared_PARSER_rp);
PARSER_exit(self);
break;
case 7:
PARSER_fetch(self);
res = ((TR_STMT) PARSER_break_stm(self));
break;
default: ;
x = PARSER_expr_TR_EXPR(self);
if (PARSER_check_INT(self, shared_PARSER_co_1647)) {
if (TOKEN_is_neq_INT(self->next_8, shared_PARSER_as)) {
tp_1965 = PARSER_type_spec_1639(self);
}
if (PARSER_check_INT(self, shared_PARSER_as)) {
PARSER_enter_STR(self, ((STR) &assignmentwithde));
r_1966 = TR_ASSIGN_STMT_c(((TR_ASSIGN_STMT) NULL));
r_1966->source_38 = PARSER_source_lo(self);
r_1966->name_19 = PARSER_ident_of_(self, x);
r_1966->tp = tp_1965;
r_1966->rhs = PARSER_expr_TR_EXPR(self);
res = ((TR_STMT) r_1966);
PARSER_exit(self);
}
else {
PARSER_enter_STR(self, ((STR) &singlevariablede));
sdecl_res = TR_DEC_STMT_crea(((TR_DEC_STMT) NULL));
sdecl_res->source_38 = PARSER_source_lo(self);
sdecl_res->name_19 = PARSER_ident_of_(self, x);
sdecl_res->tp = tp_1965;
res = ((TR_STMT) sdecl_res);
PARSER_exit(self);
}
}
else {
if (PARSER_check_INT(self, shared_PARSER_as)) {
PARSER_enter_STR(self, ((STR) &assignment));
r_1967 = TR_ASSIGN_STMT_c(((TR_ASSIGN_STMT) NULL));
r_1967->source_38 = PARSER_source_lo(self);
r_1967->lhs_expr = x;
r_1967->rhs = PARSER_expr_TR_EXPR(self);
res = ((TR_STMT) r_1967);
PARSER_exit(self);
}
else {
if (PARSER_check_INT(self, shared_PARSER_fo)) {
PARSER_enter_STR(self, ((STR) &forkstatementwithLHS));
r_1968 = TR_FORK_STMT_cre(((TR_FORK_STMT) NULL));
r_1968->source_38 = PARSER_source_lo(self);
r_1968->lhs = x;
r_1968->rhs = PARSER_expr_TR_EXPR(self);
res = ((TR_STMT) r_1968);
PARSER_exit(self);
}
else {
if (TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_co)) {
PARSER_enter_STR(self, ((STR) &declaration_1972));
decl_res = TR_DEC_STMT_crea(((TR_DEC_STMT) NULL));
decl_res->source_38 = PARSER_source_lo(self);
decl_res->name_19 = PARSER_ident_of_(self, x);
res = ((TR_STMT) decl_res);
while (1) {
if (PARSER_check_INT(self, shared_PARSER_co)) {
}
else {
goto after_loop;
}
newdec = TR_DEC_STMT_crea(((TR_DEC_STMT) NULL));
newdec->source_38 = PARSER_source_lo(self);
PARSER_match_INT(self, shared_PARSER_id);
newdec->name_19 = PARSER_ident_IDENT(self);
if ((res==((TR_STMT) NULL))) {
res = ((TR_STMT) newdec);
}
else {
local5 = res;
(*TR_STMT_append_T[local5->header.tag+TR_STMT_append_T_offset])(local5, ((TR_STMT) newdec));
}
}
after_loop: ;
PARSER_match_INT(self, shared_PARSER_co_1647);
tp2 = PARSER_type_spec_1639(self);
p = ((TR_STMT) decl_res);
while (1) {
if ((p==((TR_STMT) NULL))) {
goto after_loop_1974;
}
if (p==NULL) {
} else
switch (p->header.tag) {
case TR_DEC_STMT_tag:
((TR_DEC_STMT) p)->tp = tp2; break;
default: ;
fprintf(stderr,"No applicable type in typecase ./parse.sa:1517:23\n");
exit(16);
}
local6 = p;
p = (*TR_STMT_next_TR_STMT[local6->header.tag+TR_STMT_next_TR_STMT_offset])(local6);
}
after_loop_1974: ;
PARSER_exit(self);
}
else {
r_1969 = TR_EXPR_STMT_cre(((TR_EXPR_STMT) NULL));
r_1969->source_38 = PARSER_source_lo(self);
r_1969->e = x;
res = ((TR_STMT) r_1969);
}
}
}
}
}
local7 = res;
(*TR_STMT_source_S[local7->header.tag+TR_STMT_source_S_offset])(local7, was_at);
PARSER_exit(self);
return res;
}
TR_STMT PARSER_stmt_list(PARSER self) {
TR_STMT noname1976;
TR_STMT res = ((TR_STMT) NULL);
TR_STMT local0;
PARSER_enter_STR(self, ((STR) &listofstatements));
while (1) {
if (PARSER_is_stmt_s(self, self->next_8)) {
if ((res==((TR_STMT) NULL))) {
res = PARSER_stmt_TR_STMT(self);
}
else {
local0 = res;
(*TR_STMT_append_T[local0->header.tag+TR_STMT_append_T_offset])(local0, PARSER_stmt_TR_STMT(self));
}
}
if (PARSER_check_INT(self, shared_PARSER_se)) {
}
else {
if (PARSER_is_stmt_s(self, self->next_8)) {
PARSER_exp_error_STR(self, ((STR) &semicolon_1978));
}
else {
goto after_loop;
}
}
}
after_loop: ;
PARSER_exit(self);
return res;
}
TR_ROUT_DEF PARSER_rout_def_(PARSER self, TOKEN mode_1979) {
TR_ROUT_DEF noname1980;
TR_ROUT_DEF res = ((TR_ROUT_DEF) NULL);
TR_ARG_DEC local0;
PARSER_enter_STR(self, ((STR) &routineoriterdef));
if (TOKEN_is_eq_INT_BOOL(mode_1979, shared_PARSER_re)) {
PARSER_error_STR(self, ((STR) &readonlynotallow_1981));
}
res = TR_ROUT_DEF_crea(((TR_ROUT_DEF) NULL));
res->source_38 = PARSER_source_lo(self);
res->name_19 = PARSER_rout_or_i(self);
res->is_private = TOKEN_is_eq_INT_BOOL(mode_1979, shared_PARSER_pr);
if (PARSER_check_INT(self, shared_PARSER_lp)) {
PARSER_enter_STR(self, ((STR) &arguments_1982));
while (1) {
if ((res->args_dec==((TR_ARG_DEC) NULL))) {
res->args_dec = PARSER_arg_dec_B(self, IDENT_is_iter_BOOL(res->name_19));
}
else {
local0 = res->args_dec;
TR_ARG_DEC_appen(local0, PARSER_arg_dec_B(self, IDENT_is_iter_BOOL(res->name_19)));
}
if (PARSER_check_INT(self, shared_PARSER_co)) {
}
else {
goto after_loop;
}
}
after_loop: ;
PARSER_match_INT(self, shared_PARSER_rp);
PARSER_exit(self);
}
if (PARSER_check_INT(self, shared_PARSER_co_1647)) {
PARSER_enter_STR(self, ((STR) &returntypespecif_1984));
res->ret_dec = PARSER_type_spec_1639(self);
PARSER_exit(self);
}
if (PARSER_check_INT(self, shared_PARSER_pr_1985)) {
PARSER_enter_STR(self, ((STR) &preconditiondecl));
res->pre_e = PARSER_expr_TR_EXPR(self);
PARSER_exit(self);
}
if (PARSER_check_INT(self, shared_PARSER_po_1986)) {
PARSER_enter_STR(self, ((STR) &postconditiondec));
res->post_e = PARSER_expr_TR_EXPR(self);
PARSER_exit(self);
}
if (PARSER_check_INT(self, shared_PARSER_is_tok)) {
PARSER_enter_STR(self, ((STR) &routineiterbody));
res->stmts = PARSER_stmt_list(self);
res->is_abstract = FALSE;
PARSER_match_INT(self, shared_PARSER_en);
PARSER_exit(self);
}
else {
res->is_abstract = TRUE;
}
PARSER_exit(self);
return res;
}
TR_CLASS_ELT PARSER_class_elt(PARSER self) {
TR_CLASS_ELT noname1987;
TR_CLASS_ELT res = ((TR_CLASS_ELT) NULL);
TOKEN mode_1988 = TOKEN_zero;
INT noname1989 = ((INT) 0);
BOOL local0;
PARSER_enter_STR(self, ((STR) &classelement));
mode_1988 = TOKEN_create_INT(TOKEN_zero, shared_PARSER_nu);
if (TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_pr)) {
local0 = TRUE;
} else {
local0 = TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_re);
}
if (local0) {
mode_1988 = self->next_8;
PARSER_fetch(self);
}
noname1989 = self->next_8.val_16;
switch (noname1989) {
case 18:
res = PARSER_include_c(self, mode_1988);
break;
case 10:
res = PARSER_const_def(self, mode_1988);
break;
case 37:
res = PARSER_shared_de(self, mode_1988);
break;
case 6:
res = PARSER_attr_def_(self, mode_1988);
break;
default: ;
res = ((TR_CLASS_ELT) PARSER_rout_def_(self, mode_1988));
}
PARSER_exit(self);
return res;
}
TR_CLASS_ELT PARSER_class_elt_1990(PARSER self) {
TR_CLASS_ELT noname1991;
TR_CLASS_ELT res = ((TR_CLASS_ELT) NULL);
TR_CLASS_ELT local0;
BOOL local1;
PARSER_enter_STR(self, ((STR) &listofclasselements));
while (1) {
if (PARSER_is_class__1685(self, self->next_8)) {
if ((res==((TR_CLASS_ELT) NULL))) {
res = PARSER_class_elt(self);
}
else {
local0 = res;
(*TR_CLASS_ELT_app[local0->header.tag+TR_CLASS_ELT_app_offset])(local0, PARSER_class_elt(self));
}
}
if (PARSER_check_INT(self, shared_PARSER_se)) {
}
else {
if (PARSER_is_class__1685(self, self->next_8)) {
PARSER_exp_error_STR(self, ((STR) &semicolon_1993));
}
else {
goto after_loop;
}
}
}
after_loop: ;
if (TOKEN_is_neq_INT(self->next_8, shared_PARSER_en)) {
PARSER_exp_error_STR(self, ((STR) &semicolon_1994));
while (1) {
if (TOKEN_is_neq_INT(self->next_8, shared_PARSER_en)) {
local1 = TOKEN_is_neq_INT(self->next_8, shared_PARSER_eo);
} else {
local1 = FALSE;
}
if (local1) {
}
else {
goto after_loop_1995;
}
PARSER_fetch(self);
}
after_loop_1995: ;
}
PARSER_exit(self);
return res;
}
TR_CLASS_DEF PARSER_class_def(PARSER self) {
TR_CLASS_DEF noname1997;
TR_CLASS_DEF res;
INT noname1998 = ((INT) 0);
TR_PARAM_DEC local0;
PARSER_enter_STR(self, ((STR) &class_1999));
res = TR_CLASS_DEF_cre(((TR_CLASS_DEF) NULL));
res->source_38 = PARSER_source_lo(self);
noname1998 = self->next_8.val_16;
switch (noname1998) {
case 94:
PARSER_fetch(self);
res->kind = shared_TR_CLASS__2000;
break;
case 43:
PARSER_fetch(self);
res->kind = shared_TR_CLASS__2001;
break;
case 15:
PARSER_fetch(self);
res->kind = shared_TR_CLASS__2002;
break;
default: ;
res->kind = shared_TR_CLASS__2003;
}
PARSER_match_INT(self, shared_PARSER_cl);
if (PARSER_check_INT(self, shared_PARSER_id)) {
if ((!(PARSER_is_class_(self, PARSER_ident_IDENT(self))))) {
PARSER_exp_error_STR(self, ((STR) &classname_2004));
}
}
else {
PARSER_exp_error_STR(self, ((STR) &concreteclassname));
if (TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_ty)) {
PARSER_fetch(self);
}
}
res->name_19 = PARSER_ident_IDENT(self);
if (PARSER_check_INT(self, shared_PARSER_lb)) {
while (1) {
if (TOKEN_is_neq_INT(self->next_8, shared_PARSER_id)) {
goto after_loop;
}
if ((res->params==((TR_PARAM_DEC) NULL))) {
res->params = PARSER_param_dec(self);
}
else {
local0 = res->params;
TR_PARAM_DEC_app(local0, PARSER_param_dec(self));
}
if ((!(PARSER_check_INT(self, shared_PARSER_co)))) {
goto after_loop;
}
}
after_loop: ;
PARSER_match_INT(self, shared_PARSER_rb);
}
if (PARSER_check_INT(self, shared_PARSER_is)) {
res->under = PARSER_type_spec(self);
}
PARSER_match_INT(self, shared_PARSER_is_tok);
res->body = PARSER_class_elt_1990(self);
PARSER_match_INT(self, shared_PARSER_en);
PARSER_exit(self);
return res;
}
void SFILE_ID_close_file(SFILE_ID self) {
FLISTINT local0;
INT local1;
INT local2;
if ((!((shared_SFILE_ID__1255==((FSTR) NULL))))) {
local0 = shared_SFILE_ID_;
local1 = FLISTINT_size_INT(shared_SFILE_ID_);
local2 = (c_INT_minus_INT_INT_chk(local1,1));
FLISTINT_aset_IN(local0, local2, shared_SFILE_ID_line);
SFILE_ID_source_FSTR(self, ((FSTR) NULL));
}
}
void SCANNER_close_file(SCANNER self) {
SFILE_ID_close_file(SFILE_ID_zero);
}
void PARSER_close_file(PARSER self) {
SCANNER_close_file(self->scanner);
}
TR_CLASS_DEF PARSER_source_fi(PARSER self) {
TR_CLASS_DEF noname2006;
TR_CLASS_DEF res = ((TR_CLASS_DEF) NULL);
PARSER_enter_STR(self, ((STR) &sourcefile));
while (1) {
if (PARSER_is_type_o(self, self->next_8)) {
if (TOKEN_is_eq_INT_BOOL(self->next_8, shared_PARSER_ty_1680)) {
if ((res==((TR_CLASS_DEF) NULL))) {
res = PARSER_abstract__1678(self);
}
else {
TR_CLASS_DEF_app(res, PARSER_abstract__1678(self));
}
}
else {
if ((res==((TR_CLASS_DEF) NULL))) {
res = PARSER_class_def(self);
}
else {
TR_CLASS_DEF_app(res, PARSER_class_def(self));
}
}
}
if (PARSER_check_INT(self, shared_PARSER_se)) {
}
else {
if (PARSER_is_type_o(self, self->next_8)) {
PARSER_exp_error_STR(self, ((STR) &semicolon_2008));
}
else {
if (TOKEN_is_neq_INT(self->next_8, shared_PARSER_eo)) {
PARSER_exp_error_STR(self, ((STR) &endoffile_2009));
}
goto after_loop;
}
}
}
after_loop: ;
PARSER_close_file(self);
PARSER_exit(self);
return res;
}
STR FMAPSTRSTR_get_S(FMAPSTRSTR self, STR k) {
STR noname2010;
INT h = ((INT) 0);
STR tk;
STR tk_2011;
INT local0;
INT local1;
INT local2;
INT local3;
if ((self==((FMAPSTRSTR) NULL))) {
return ((STR) NULL);
}
local0 = FMAPSTRSTR_key_h(self, k);
local1 = (self->asize);
h = (local0&(c_INT_minus_INT_INT_chk(local1,2)));
while (1) {
tk = (TUPSTRSTR_blob=FMAPSTRSTR_aget_(self, h)).t1;
if (FMAPSTRSTR_key_e(self, tk, k)) {
return (TUPSTRSTR_blob=FMAPSTRSTR_aget_(self, h)).t2;
}
else {
if (FMAPSTRSTR_key_e(self, tk, FMAPSTRSTR_key_n(self))) {
goto after_loop;
}
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop: ;
local2 = (self->asize);
if ((h==(c_INT_minus_INT_INT_chk(local2,1)))) {
h = 0;
while (1) {
tk_2011 = (TUPSTRSTR_blob=FMAPSTRSTR_aget_(self, h)).t1;
if (FMAPSTRSTR_key_e(self, tk_2011, k)) {
return (TUPSTRSTR_blob=FMAPSTRSTR_aget_(self, h)).t2;
}
else {
if (FMAPSTRSTR_key_e(self, tk_2011, FMAPSTRSTR_key_n(self))) {
goto after_loop_2013;
}
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop_2013: ;
local3 = (self->asize);
if (!((h!=(c_INT_minus_INT_INT_chk(local3,1))))) {
fprintf(stderr,"Violation of assertion ../Library/fmap.sa:150:15\n");
exit(16);
}
}
return ((STR) NULL);
if (!FMAPSTRSTR_invar(self)) {
fprintf(stderr,"Failed invariant FMAP{STR,STR}::invariant:BOOL ../Library/fmap.sa:136:6\n");
exit(16);
}
}
INT TR_PARAM_DEC_siz(TR_PARAM_DEC self) {
INT noname2015 = ((INT) 0);
INT r_2016 = ((INT) 0);
TR_PARAM_DEC n_2017;
if ((self==((TR_PARAM_DEC) NULL))) {
return 0;
}
r_2016 = 1;
n_2017 = self->next_8;
while (1) {
if ((n_2017==((TR_PARAM_DEC) NULL))) {
goto after_loop;
}
r_2016 = (c_INT_plus_INT_INT_chk(r_2016,1));
n_2017 = n_2017->next_8;
}
after_loop: ;
return r_2016;
}
TUPIDENTINT TUPIDENTINT_t1_I(TUPIDENTINT self, IDENT t1_2019) {
TUPIDENTINT local0;
local0 = self;
local0.t1 = t1_2019;
return local0;
}
TUPIDENTINT TUPIDENTINT_t2_I(TUPIDENTINT self, INT t2_2020) {
TUPIDENTINT local0;
local0 = self;
local0.t2 = t2_2020;
return local0;
}
TUPIDENTINT TUPIDENTINT_crea(TUPIDENTINT self, IDENT at1, INT at2) {
TUPIDENTINT noname2021 = TUPIDENTINT_zero;
TUPIDENTINT local0;
local0 = TUPIDENTINT_t1_I(self, at1);
return TUPIDENTINT_t2_I(local0, at2);
}
INT PROG_TR_TBL_quer(PROG_TR_TBL self, TUPIDENTINT q) {
INT noname2022 = ((INT) 0);
INT local0;
local0 = IDENT_hash_INT(q.t1);
return (c_INT_plus_INT_INT_chk(local0,(c_INT_times_INT_INT_chk(1111,q.t2))));
if (!PROG_TR_TBL_inva(self)) {
fprintf(stderr,"Failed invariant PROG_TR_TBL::invariant:BOOL ./prog.sa:286:13\n");
exit(16);
}
}
INT PROG_TR_TBL_asiz(PROG_TR_TBL self) {
INT noname2023 = ((INT) 0);
return self->asize;
fprintf(stderr,"Last statement wasn't return ../Library/aref.sa:20:8\n");
exit(16);
}
TR_CLASS_DEF PROG_TR_TBL_aget(PROG_TR_TBL self, INT ind_2024) {
TR_CLASS_DEF noname2025;
BOOL local0;
INT local1;
INT local2;
if ((!((self==((PROG_TR_TBL) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_2024, local1, (c_INT_minus_INT_INT_chk(local2,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:33:7\n");
exit(16);
}
if (ind_2024<0||ind_2024>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:33:7\n");
exit(16);
}
return self->arr_part[ind_2024];
}
BOOL PROG_TR_TBL_quer_2026(PROG_TR_TBL self, TUPIDENTINT q, TR_CLASS_DEF t_2027) {
BOOL noname2028 = ((BOOL) 0);
INT local0;
if ((t_2027==((TR_CLASS_DEF) NULL))) {
return FALSE;
}
if (IDENT_is_neq_IDE(q.t1, t_2027->name_19)) {
return FALSE;
}
local0 = q.t2;
if ((local0!=TR_PARAM_DEC_siz(t_2027->params))) {
return FALSE;
}
return TRUE;
if (!PROG_TR_TBL_inva(self)) {
fprintf(stderr,"Failed invariant PROG_TR_TBL::invariant:BOOL ./prog.sa:279:13\n");
exit(16);
}
}
TR_CLASS_DEF PROG_TR_TBL_elt_(PROG_TR_TBL self) {
TR_CLASS_DEF noname2029;
TR_CLASS_DEF t_2030 = ((TR_CLASS_DEF) NULL);
return ((TR_CLASS_DEF) NULL);
if (!PROG_TR_TBL_inva(self)) {
fprintf(stderr,"Failed invariant PROG_TR_TBL::invariant:BOOL ../Library/fqset.sa:69:10\n");
exit(16);
}
}
BOOL PROG_TR_TBL_elt__2031(PROG_TR_TBL self, TR_CLASS_DEF e1_2032, TR_CLASS_DEF e2_2033) {
BOOL noname2034 = ((BOOL) 0);
return c_SYS_ob_eq_OB_OB_BOOL(((OB) e1_2032),((OB) e2_2033));
if (!PROG_TR_TBL_inva(self)) {
fprintf(stderr,"Failed invariant PROG_TR_TBL::invariant:BOOL ../Library/fqset.sa:62:9\n");
exit(16);
}
}