This repository has been archived by the owner on Jul 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
various fixes to programming language
- Loading branch information
GeneralGuy4872
committed
Sep 29, 2019
1 parent
67553bb
commit c11e66e
Showing
5 changed files
with
50 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,4 +39,7 @@ pre { | |
.basic { | ||
background-color: mediumslateblue; | ||
color: snow; | ||
} | ||
.oxturn { | ||
transform: scale(-1, 1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,49 @@ | ||
#include "../dummy.c" | ||
|
||
struct runtime__args | ||
union runtime__union { | ||
bool boolean; | ||
int number; | ||
char* string; | ||
double dval; | ||
uintptr_t deadbeef; | ||
void* ptr; | ||
} | ||
|
||
enum runtime__type {boolean,number,string,dval,deadbeef,ptr} | ||
|
||
struct runtime__arg { | ||
runtime__union data; | ||
runtime__type type; | ||
} | ||
|
||
struct runtime__instruction { | ||
struct runtime__instruction *prev | ||
struct runtime__instruction *next | ||
|
||
runtime__OPCODES type | ||
|
||
void* left | ||
void* right | ||
void* foo | ||
void* bar | ||
runtime__arg left | ||
runtime__arg right | ||
runtime__arg foo | ||
runtime__arg bar | ||
} | ||
|
||
struct runtime__list { | ||
struct runtime__list *prev; | ||
struct runtime__list *next; | ||
intptr_t number; | ||
char* string; | ||
double dval; | ||
YYSTYPE data | ||
} | ||
|
||
enum runtime__OPCODES {OPCODE_FETCH,OPCODE_ASSIGN,OPCODE_VALUE,OPCODE_EXPRESSION, | ||
OPCODE_FUNCTION,OPCODE_IF,OPCODE_IF_ELSE,OPCODE_WHILE,OPCODE_UNTIL,OPCODE_FOREVER, | ||
OPCODE_FOR,OPCODE_FORNOT,OPCODE_PRE_INCR,OPCODE_POST_INCR,OPCODE_PRE_DECR, | ||
OPCODE_POST_DECR,OPCODE_ADD,OPCODE_SUB,OPCODE_MULT,OPCODE_DIV,OPCODE_MOD,OPCODE_LOGAND, | ||
OPCODE_LOGOR,OPCODE_LOGNAND,OPCODE_LOGNOR,OPCODE_LOGXOR,OPCODE_IFF,OPCODE_LOGNOT, | ||
OPCODE_AND,OPCODE_OR,OPCODE_NAND,OPCODE_NOR,OPCODE_XOR,OPCODE_EQ,OPCODE_NOT,OPCODE_GT, | ||
OPCODE_GE,OPCODE_EQUAL,OPCODE_NE,OPCODE_LT,OPCODE_LE,OPCODE_APPROX,OPCODE_EXP,OPCODE_TETRA, | ||
OPCODE_RETURN,OPCODE_BREAK,OPCODE_NPR,OPCODE_NCR,OPCODE_FACT, | ||
enum runtime__OPCODES {OPCODE_FETCH,OPCODE_ASSIGN,OPCODE_VALUE, | ||
OPCODE_CAST,OPCODE_DEREF,OPCODE_STRUCT,OPCODE_STRUCT_POINTER, | ||
OPCODE_ARRAYSUB,OPCODE_EXPRESSION,OPCODE_FUNCTION,OPCODE_IF,OPCODE_IF_ELSE, | ||
OPCODE_WHILE,OPCODE_UNTIL,OPCODE_FOREVER,OPCODE_FOR,OPCODE_FORNOT, | ||
OPCODE_PRE_INCR,OPCODE_POST_INCR,OPCODE_PRE_DECR,OPCODE_POST_DECR, | ||
OPCODE_ADD,OPCODE_SUB,OPCODE_MULT,OPCODE_DIV,OPCODE_MOD,OPCODE_LOGAND, | ||
OPCODE_LOGOR,OPCODE_LOGNAND,OPCODE_LOGNOR,OPCODE_LOGXOR,OPCODE_IFF, | ||
OPCODE_LOGNOT,OPCODE_AND,OPCODE_OR,OPCODE_NAND,OPCODE_NOR,OPCODE_XOR, | ||
OPCODE_EQ,OPCODE_NOT,OPCODE_GT,OPCODE_GE,OPCODE_EQUAL,OPCODE_NE,OPCODE_LT, | ||
OPCODE_LE,OPCODE_APPROX,OPCODE_EXP,OPCODE_TETRA,OPCODE_RETURN,OPCODE_BREAK, | ||
OPCODE_NPR,OPCODE_NCR,OPCODE_FACT,OPCODE_ROLL} | ||
/*each opcode defines what to do to the arguments*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters