Return...

This commit is contained in:
Ognjen Milan Robovic 2024-04-03 11:05:36 -04:00
parent ef3a428bc9
commit dfd402721d

View File

@ -101,8 +101,31 @@ int main (void) {
--offset; --offset;
} else if (character_compare_array (buffer [offset], ",.;:=<>#&|!+*-/%()[]") == true) { } else if (character_compare_array (buffer [offset], ",.;:=<>#&|!+*-/%()[]") == true) {
char s [2] = ""; char s [2] = "";
int kind = 0;
s [0] = buffer [offset]; s [0] = buffer [offset];
add_coin (coin_range, 0, s); switch (buffer [offset]) {
case '+': kind = coin_add; break;
case '-': kind = coin_subtract; break;
case '*': kind = coin_multiply; break;
case '/': kind = coin_divide; break;
case '%': kind = coin_modulus; break;
case '=': kind = coin_equal; break;
case '>': kind = coin_above; break;
case '<': kind = coin_below; break;
case '(': kind = coin_open; break;
case ')': kind = coin_close; break;
case ',': kind = coin_next; break;
case ';': kind = coin_stop; break;
case ':': kind = coin_branch; break;
case '&': kind = coin_and; break;
case '|': kind = coin_or; break;
case '!': kind = coin_not; break;
case '.': kind = coin_range; break;
case '[': kind = coin_enrange; break;
case ']': kind = coin_derange; break;
case '#': kind = coin_machine; break;
}
add_coin (kind, (int) buffer [offset], s);
} else { } else {
if (character_is_blank (buffer [offset]) == false) { if (character_is_blank (buffer [offset]) == false) {
echo ("\033[1;31mCharacter set exception point: Segmentation\033[0m\n"); echo ("\033[1;31mCharacter set exception point: Segmentation\033[0m\n");
@ -132,11 +155,13 @@ int main (void) {
} }
printf ("\n"); printf ("\n");
/*
for (length = 0; length < coin_code; ++length) { for (length = 0; length < coin_code; ++length) {
if ((coin_enum [length] == coin_return) && (coin_enum [length + 1] == coin_stop)) {
printf ("; return;\nxor rax, rax\nret\n\n");
}
} }
/*
for (length = 0; length < coin_code; ++length) { for (length = 0; length < coin_code; ++length) {
if ((coin_enum [length] == coin_word) && (coin_data [length] == word_return)) { if ((coin_enum [length] == coin_word) && (coin_data [length] == word_return)) {
++length; ++length;