Fixed -tok, spacings in -st, and validation tests

This commit is contained in:
Scarlett
2025-04-16 11:44:02 -04:00
parent b023ac0133
commit 5a23ef2756
26 changed files with 677 additions and 477 deletions

View File

@ -111,6 +111,13 @@ int run(FILE *alpha) {
yyin = alpha; yyin = alpha;
yyparse(); yyparse();
if (tok_flag != NULL) {
while (0 != (token = yylex())) {
// Don't delete me 🥺
}
fclose(tok_flag);
}
if (st_flag != NULL) { if (st_flag != NULL) {
print_symbol_table(top, st_flag); print_symbol_table(top, st_flag);
fclose(st_flag); fclose(st_flag);
@ -136,8 +143,6 @@ int run(FILE *alpha) {
fclose(cg_flag); fclose(cg_flag);
} }
//yyparse();
if (yyin != NULL) { if (yyin != NULL) {
fclose(yyin); fclose(yyin);
} }

View File

@ -5,11 +5,11 @@
#define TOK_LEN 3 #define TOK_LEN 3
#define ST_LEN 2 #define ST_LEN 2
#define TC_LEN 2 #define TC_LEN 2
#define HELP \ #define HELP \
"HELP:\n" \ "HELP:\n" \
" How to run the alpha compiler:\n" \ " How to run the alpha compiler:\n" \
" ./alpha [options] program\n" \ " ./alpha [options] program\n" \
"Valid options:\n" \ "Valid options:\n" \
" -tok output the token number, token, line number, and column number for each of the tokens to the .tok file\n" \ " -tok output the token number, token, line number, and column number for each of the tokens to the .tok file\n" \
" -st output the symbol table for the program to the .st file\n" \ " -st output the symbol table for the program to the .st file\n" \
" -asc output the annotated source code for the program to the .asc file, including syntax errors\n" \ " -asc output the annotated source code for the program to the .asc file, including syntax errors\n" \

View File

@ -92,9 +92,9 @@ int getNumArrDim(TableNode *definition) {
"function. Invalid."); "function. Invalid.");
return -1; return -1;
} }
if(getAdInfoType(definition) != TYPE_ARRAY_TYPE){ if (getAdInfoType(definition) != TYPE_ARRAY_TYPE) {
printdebug( printdebug(
"passed an invalid node to getNumArrDim. Seeing tag %d in getNumArrDim. Invalid.",getAdInfoType(definition)); "passed an invalid node to getNumArrDim. Seeing tag %d in getNumArrDim. Invalid.", getAdInfoType(definition));
return -1; return -1;
} }
return definition->additionalinfo->ArrayAdInfo->numofdimensions; return definition->additionalinfo->ArrayAdInfo->numofdimensions;
@ -114,9 +114,9 @@ TableNode *getArrType(TableNode *definition) {
"function. Invalid."); "function. Invalid.");
return undefined; return undefined;
} }
if(getAdInfoType(definition) != TYPE_ARRAY_TYPE){ if (getAdInfoType(definition) != TYPE_ARRAY_TYPE) {
printdebug( printdebug(
"passed an invalid node to getArrType. Seeing tag %d. Invalid.",getAdInfoType(definition)); "passed an invalid node to getArrType. Seeing tag %d. Invalid.", getAdInfoType(definition));
return undefined; return undefined;
} }
return definition->additionalinfo->ArrayAdInfo->typeofarray; return definition->additionalinfo->ArrayAdInfo->typeofarray;
@ -138,25 +138,25 @@ AdInfo *CreateRecordInfo(int length, SymbolTable *recordScope) {
// Perhaps this may not be needed since we need to iterate over all elements // Perhaps this may not be needed since we need to iterate over all elements
// anyways. // anyways.
int getRecTotal(TableNode* node){ int getRecTotal(TableNode *node) {
if(node == NULL){ if (node == NULL) {
printdebug( printdebug(
"passed a NULL node to getRecTotal. Invalid."); "passed a NULL node to getRecTotal. Invalid.");
return -1; return -1;
} }
if(getAdInfoType(node) != TYPE_RECORD_TYPE){ if (getAdInfoType(node) != TYPE_RECORD_TYPE) {
printdebug( printdebug(
"passed an invalid node to getRecTotal. Invalid."); "passed an invalid node to getRecTotal. Invalid.");
return -1; return -1;
} }
if(node->additionalinfo == NULL){ if (node->additionalinfo == NULL) {
printdebug( printdebug(
"node has NULL additionalinfo. Invalid."); "node has NULL additionalinfo. Invalid.");
return -1; return -1;
} }
return node->additionalinfo->RecAdInfo->total_size; return node->additionalinfo->RecAdInfo->total_size;
} }
TableNode *setRecOffsetInfo(SymbolTable* scope, TableNode *node) { TableNode *setRecOffsetInfo(SymbolTable *scope, TableNode *node) {
if (node == NULL) { if (node == NULL) {
printdebug( printdebug(
"passed a NULL node to setRecOffsetInfo. Invalid."); "passed a NULL node to setRecOffsetInfo. Invalid.");
@ -167,51 +167,47 @@ TableNode *setRecOffsetInfo(SymbolTable* scope, TableNode *node) {
"passed an NULL scope to setRecOffsetInfo. Invalid."); "passed an NULL scope to setRecOffsetInfo. Invalid.");
return undefined; return undefined;
} }
if(getFirstEntry(scope) == NULL){ if (getFirstEntry(scope) == NULL) {
printdebug( printdebug(
"passed an empty scope to setRecOffsetInfo. Invalid."); "passed an empty scope to setRecOffsetInfo. Invalid.");
return undefined; return undefined;
} }
TableNode* this = getFirstEntry(scope); TableNode *this = getFirstEntry(scope);
int largest = 0; int largest = 0;
int k = getRecLength(node); int k = getRecLength(node);
int total_size = 0; int total_size = 0;
int counter = 0; int counter = 0;
int *offsets = (int *)calloc(2 * k, sizeof(int)); int *offsets = (int *)calloc(2 * k, sizeof(int));
if(getAdInfoType(this) == TYPE_FUNCTION_DECLARATION){ if (getAdInfoType(this) == TYPE_FUNCTION_DECLARATION) {
offsets[counter] = 8; offsets[counter] = 8;
total_size = total_size + offsets[counter]; total_size = total_size + offsets[counter];
largest = 8; largest = 8;
counter++; counter++;
} } else if ((getAdInfoType(this) == TYPE_RECORD)) {
else if((getAdInfoType(this) == TYPE_RECORD)){
offsets[counter] = 8; offsets[counter] = 8;
printf("hitting record and adding to largest"); printf("hitting record and adding to largest");
total_size = total_size + offsets[counter]; total_size = total_size + offsets[counter];
largest = offsets[counter]; largest = offsets[counter];
counter++; counter++;
} } else if (getAdInfoType(this) == TYPE_PRIMITIVE) {
else if(getAdInfoType(this)==TYPE_PRIMITIVE){
offsets[counter] = getPrimSize(getTypeEntry(this)); offsets[counter] = getPrimSize(getTypeEntry(this));
total_size = total_size + offsets[counter]; total_size = total_size + offsets[counter];
largest = offsets[counter]; largest = offsets[counter];
counter++; counter++;
} } else if (getAdInfoType(this) == TYPE_ARRAY) {
else if(getAdInfoType(this)==TYPE_ARRAY){
offsets[counter] = 8; offsets[counter] = 8;
total_size = total_size + offsets[counter]; total_size = total_size + offsets[counter];
largest = offsets[counter]; largest = offsets[counter];
counter++; counter++;
} } else {
else {
printdebug( printdebug(
"[TYPE CHECK] passed an invalid (first) parameter to a function definition. seeing %d. Type of entry is %s. Name attempted to pass is %s.",getAdInfoType(this),getType(this),getName(this)); "[TYPE CHECK] passed an invalid (first) parameter to a function definition. seeing %d. Type of entry is %s. Name attempted to pass is %s.", getAdInfoType(this), getType(this), getName(this));
return undefined; return undefined;
} }
this = getNextEntry(this); this = getNextEntry(this);
while(this != NULL){ while (this != NULL) {
if(getAdInfoType(this) == TYPE_FUNCTION_DECLARATION){ if (getAdInfoType(this) == TYPE_FUNCTION_DECLARATION) {
int s = 8; int s = 8;
if (s > largest) { if (s > largest) {
largest = s; largest = s;
@ -225,8 +221,7 @@ TableNode *setRecOffsetInfo(SymbolTable* scope, TableNode *node) {
total_size = total_size + offsets[counter]; total_size = total_size + offsets[counter];
counter++; counter++;
this = getNextEntry(this); this = getNextEntry(this);
} } else if (getAdInfoType(this) == TYPE_ARRAY) {
else if(getAdInfoType(this) == TYPE_ARRAY){
int s = 8; int s = 8;
if (s > largest) { if (s > largest) {
largest = s; largest = s;
@ -240,8 +235,7 @@ TableNode *setRecOffsetInfo(SymbolTable* scope, TableNode *node) {
total_size = total_size + offsets[counter]; total_size = total_size + offsets[counter];
counter++; counter++;
this = getNextEntry(this); this = getNextEntry(this);
} } else if ((getAdInfoType(this) == TYPE_RECORD)) {
else if((getAdInfoType(this) == TYPE_RECORD)){
int s = 8; int s = 8;
if (s > largest) { if (s > largest) {
largest = s; largest = s;
@ -257,8 +251,7 @@ TableNode *setRecOffsetInfo(SymbolTable* scope, TableNode *node) {
total_size = total_size + offsets[counter]; total_size = total_size + offsets[counter];
counter++; counter++;
this = getNextEntry(this); this = getNextEntry(this);
} } else if (getAdInfoType(this) == TYPE_PRIMITIVE) {
else if(getAdInfoType(this) == TYPE_PRIMITIVE){
int s = getPrimSize(getTypeEntry(this)); int s = getPrimSize(getTypeEntry(this));
if (s > largest) { if (s > largest) {
largest = s; largest = s;
@ -272,9 +265,9 @@ TableNode *setRecOffsetInfo(SymbolTable* scope, TableNode *node) {
total_size = total_size + offsets[counter]; total_size = total_size + offsets[counter];
counter++; counter++;
this = getNextEntry(this); this = getNextEntry(this);
}else{ } else {
printdebug( printdebug(
"[TYPE CHECK] passed an invalid parameter at position %d in record.",((counter+1)/2)); "[TYPE CHECK] passed an invalid parameter at position %d in record.", ((counter + 1) / 2));
return undefined; return undefined;
} }
} }
@ -286,18 +279,18 @@ TableNode *setRecOffsetInfo(SymbolTable* scope, TableNode *node) {
return node; return node;
} }
int* getRecOffsets(TableNode* node){ int *getRecOffsets(TableNode *node) {
if(node == NULL){ if (node == NULL) {
printdebug( printdebug(
"passed a NULL node to getRecTotal. Invalid."); "passed a NULL node to getRecTotal. Invalid.");
return NULL; return NULL;
} }
if(getAdInfoType(node) != TYPE_RECORD_TYPE){ if (getAdInfoType(node) != TYPE_RECORD_TYPE) {
printdebug( printdebug(
"passed an invalid node to getRecTotal. Invalid."); "passed an invalid node to getRecTotal. Invalid.");
return NULL; return NULL;
} }
if(node->additionalinfo == NULL){ if (node->additionalinfo == NULL) {
printdebug( printdebug(
"node has NULL additionalinfo. Invalid."); "node has NULL additionalinfo. Invalid.");
return NULL; return NULL;
@ -341,7 +334,8 @@ SymbolTable *getRecList(TableNode *definition) {
if (strcmp(getType(definition), "record") != 0) { if (strcmp(getType(definition), "record") != 0) {
printdebug( printdebug(
"not checking the list of types of a record -- invalid " "not checking the list of types of a record -- invalid "
"op of type %s", getType(definition)); "op of type %s",
getType(definition));
return NULL; return NULL;
} }
return definition->additionalinfo->RecAdInfo->recordScope; return definition->additionalinfo->RecAdInfo->recordScope;
@ -521,7 +515,7 @@ TableNode *getParameter(TableNode *definition) {
"function. Invalid."); "function. Invalid.");
return undefined; return undefined;
} }
if(definition->additionalinfo == NULL){ if (definition->additionalinfo == NULL) {
printdebug( printdebug(
"node has NULL additionalinfo. Invalid."); "node has NULL additionalinfo. Invalid.");
return undefined; return undefined;
@ -552,7 +546,7 @@ TableNode *getReturn(TableNode *definition) {
"not checking the return of a function -- invalid op"); "not checking the return of a function -- invalid op");
return undefined; return undefined;
} }
if(definition->additionalinfo == NULL){ if (definition->additionalinfo == NULL) {
printdebug( printdebug(
"node has NULL additionalinfo. Invalid."); "node has NULL additionalinfo. Invalid.");
return undefined; return undefined;
@ -605,10 +599,10 @@ SymbolTable *init(SymbolTable *start) {
chara = (TableNode *)calloc(1, sizeof(TableNode)); chara = (TableNode *)calloc(1, sizeof(TableNode));
stri = (TableNode *)calloc(1, sizeof(TableNode)); stri = (TableNode *)calloc(1, sizeof(TableNode));
boo = (TableNode *)calloc(1, sizeof(TableNode)); boo = (TableNode *)calloc(1, sizeof(TableNode));
TableNode* reservetype = (TableNode *)calloc(1, sizeof(TableNode)); TableNode *reservetype = (TableNode *)calloc(1, sizeof(TableNode));
TableNode* reserve = (TableNode *)calloc(1, sizeof(TableNode)); TableNode *reserve = (TableNode *)calloc(1, sizeof(TableNode));
TableNode* releasetype = (TableNode *)calloc(1, sizeof(TableNode)); TableNode *releasetype = (TableNode *)calloc(1, sizeof(TableNode));
TableNode* release = (TableNode *)calloc(1, sizeof(TableNode)); TableNode *release = (TableNode *)calloc(1, sizeof(TableNode));
// TableNode* arr = (TableNode*)malloc(sizeof(SymbolTable)); // TableNode* arr = (TableNode*)malloc(sizeof(SymbolTable));
start->entries = integ; start->entries = integ;
integ->next = addr; integ->next = addr;
@ -721,7 +715,7 @@ SymbolTable *init(SymbolTable *start) {
integ->tag = TYPE_PRIMITIVE_TYPE; // explicitly set the type for integ integ->tag = TYPE_PRIMITIVE_TYPE; // explicitly set the type for integ
addr->tag = TYPE_PRIMITIVE_TYPE; // explicitly set the type for addr addr->tag = TYPE_PRIMITIVE_TYPE; // explicitly set the type for addr
chara->tag = TYPE_PRIMITIVE_TYPE; // explicitly set the type for chara chara->tag = TYPE_PRIMITIVE_TYPE; // explicitly set the type for chara
stri->tag = TYPE_ARRAY_TYPE; // explicitly set the type for stri stri->tag = TYPE_ARRAY_TYPE; // explicitly set the type for stri
boo->tag = TYPE_PRIMITIVE_TYPE; // explicitly set the type for boo boo->tag = TYPE_PRIMITIVE_TYPE; // explicitly set the type for boo
reserve->tag = TYPE_FUNCTION_DECLARATION; reserve->tag = TYPE_FUNCTION_DECLARATION;
reservetype->tag = TYPE_FUNCTION_TYPE; reservetype->tag = TYPE_FUNCTION_TYPE;
@ -1064,7 +1058,7 @@ TableNode *table_lookup(SymbolTable *table, char *x) {
// check current table and all parents // check current table and all parents
TableNode *look_up(SymbolTable *table, char *x) { TableNode *look_up(SymbolTable *table, char *x) {
if (table == NULL) { if (table == NULL) {
printdebug("Could not find %s in any scope using lookup",x); printdebug("Could not find %s in any scope using lookup", x);
return undefined; return undefined;
} }
TableNode *ret = table_lookup(table, x); TableNode *ret = table_lookup(table, x);
@ -1157,33 +1151,33 @@ void print_symbol_table(SymbolTable *table, FILE *file_ptr) {
} }
} }
if (getAdInfoType(entry) == TYPE_ARRAY) { if (getAdInfoType(entry) == TYPE_ARRAY) {
char *arrayType = (char *)malloc(100); char *arrayType = (char *)malloc(sizeof(getType(entry) + 1));
//sprintf(arrayType, " %d -> %s", getNumArrDim(entry), sprintf(arrayType, " %s", getType(entry));
// getName(getArrType(entry)));
if (parentScopeNum == 0) { if (parentScopeNum == 0) {
st_fprint(file_ptr, getName(entry), currentScopeNum, -100, getType(entry), " Array Instance"); st_fprint(file_ptr, getName(entry), currentScopeNum, -100, arrayType, " Array Instance");
} else { } else {
st_fprint(file_ptr, getName(entry), currentScopeNum, parentScopeNum, getType(entry), " Array Instance"); st_fprint(file_ptr, getName(entry), currentScopeNum, parentScopeNum, arrayType, " Array Instance");
} }
} }
if (getAdInfoType(entry) == TYPE_RECORD_TYPE) { if (getAdInfoType(entry) == TYPE_RECORD_TYPE) {
char *recordAdInfo = (char *)malloc(100); char *recordAdInfo = (char *)malloc(100);
sprintf(recordAdInfo, " elements-%d size-%d bytes", getRecLength(entry), getRecTotal(entry)); sprintf(recordAdInfo, " elements-%d size-%d bytes", getRecLength(entry), getRecTotal(entry));
if (parentScopeNum == 0) { if (parentScopeNum == 0) {
st_fprint(file_ptr, getName(entry), currentScopeNum, -100, " record type", recordAdInfo); st_fprint(file_ptr, getName(entry), currentScopeNum, -100, " Record Type", recordAdInfo);
} else { } else {
st_fprint(file_ptr, getName(entry), currentScopeNum, parentScopeNum, " record type", recordAdInfo); st_fprint(file_ptr, getName(entry), currentScopeNum, parentScopeNum, " Record Type", recordAdInfo);
} }
} }
if (getAdInfoType(entry) == TYPE_RECORD) { if (getAdInfoType(entry) == TYPE_RECORD) {
char *recordAdInfo = (char *)malloc(100); char *recordAdInfo = (char *)malloc(100);
sprintf(recordAdInfo, " elements-%d", getRecLength(entry)); sprintf(recordAdInfo, " elements-%d", getRecLength(entry));
char *recordType = (char *)malloc(sizeof(getType(entry) + 1));
sprintf(recordType, " %s", getType(entry));
if (parentScopeNum == 0) { if (parentScopeNum == 0) {
st_fprint(file_ptr, getName(entry), currentScopeNum, -100, getType(entry), "record instance"); st_fprint(file_ptr, getName(entry), currentScopeNum, -100, recordType, " Record Instance");
} else { } else {
st_fprint(file_ptr, getName(entry), currentScopeNum, parentScopeNum, getType(entry), "record instance"); st_fprint(file_ptr, getName(entry), currentScopeNum, parentScopeNum, recordType, " Record Instance");
} }
} }
@ -1193,8 +1187,6 @@ void print_symbol_table(SymbolTable *table, FILE *file_ptr) {
if (parentScopeNum == 0) { if (parentScopeNum == 0) {
st_fprint(file_ptr, getName(entry), currentScopeNum, -100, " Primitive Type", primAdInfo); st_fprint(file_ptr, getName(entry), currentScopeNum, -100, " Primitive Type", primAdInfo);
} else { } else {
//printdebug("%sTHIS ONE", COLOR_RED);
printTableNode(entry);
char *primType = (char *)malloc(sizeof(getType(entry) + 1)); char *primType = (char *)malloc(sizeof(getType(entry) + 1));
sprintf(primType, " %s", getType(entry)); sprintf(primType, " %s", getType(entry));
st_fprint(file_ptr, getName(entry), currentScopeNum, parentScopeNum, primType, primAdInfo); st_fprint(file_ptr, getName(entry), currentScopeNum, parentScopeNum, primType, primAdInfo);
@ -1206,11 +1198,9 @@ void print_symbol_table(SymbolTable *table, FILE *file_ptr) {
if (parentScopeNum == 0) { if (parentScopeNum == 0) {
st_fprint(file_ptr, getName(entry), currentScopeNum, -100, " Primitive", primAdInfo); st_fprint(file_ptr, getName(entry), currentScopeNum, -100, " Primitive", primAdInfo);
} else { } else {
printdebug("%sTHIS ONE", COLOR_RED);
printTableNode(entry);
char *primType = (char *)malloc(sizeof(getType(entry) + 1)); char *primType = (char *)malloc(sizeof(getType(entry) + 1));
sprintf(primType, " %s", getType(entry)); sprintf(primType, " %s", getType(entry));
st_fprint(file_ptr, getName(entry), currentScopeNum, parentScopeNum, getType(entry), "Primitive Instance"); st_fprint(file_ptr, getName(entry), currentScopeNum, parentScopeNum, primType, " Primitive Instance");
} }
} }
@ -1226,10 +1216,12 @@ void print_symbol_table(SymbolTable *table, FILE *file_ptr) {
} }
if (getAdInfoType(entry) == TYPE_FUNCTION_DECLARATION) { if (getAdInfoType(entry) == TYPE_FUNCTION_DECLARATION) {
char *functiontype = (char *)malloc(100);
sprintf(functiontype, " %s", getName(getReturn(entry)));
if (parentScopeNum == 0) { if (parentScopeNum == 0) {
st_fprint(file_ptr, getName(entry), currentScopeNum, -100, getType(entry), " Function Definition"); st_fprint(file_ptr, getName(entry), currentScopeNum, -100, functiontype, " Function Definition");
} else { } else {
st_fprint(file_ptr, getName(entry), currentScopeNum, parentScopeNum, getType(entry), " Function Definition"); st_fprint(file_ptr, getName(entry), currentScopeNum, parentScopeNum, functiontype, " Function Definition");
} }
} }
@ -1393,7 +1385,7 @@ TableNode *getNextEntry(TableNode *tn) {
// Uses pointers to the table node to print the info // Uses pointers to the table node to print the info
TableNode *printTableNode(TableNode *tn) { TableNode *printTableNode(TableNode *tn) {
if (DEBUG == 0) { if (DEBUG == 0) {
return tn; return tn;
} }
if (tn == NULL) { if (tn == NULL) {

View File

@ -7,80 +7,79 @@
#define SIZE_INT 4 #define SIZE_INT 4
#define SIZE_ADDR 8 #define SIZE_ADDR 8
#define SIZE_CHAR 1 #define SIZE_CHAR 1
#define SIZE_BOOL 4 //TODO: Ask Carl what this size should be #define SIZE_BOOL 4 //TODO: Ask Carl what this size should be
struct TableNode; struct TableNode;
typedef struct { typedef struct {
int size; int size;
} primitive_info; } primitive_info;
typedef struct { typedef struct {
int numofdimensions; int numofdimensions;
struct TableNode *typeofarray; struct TableNode *typeofarray;
} array_info; } array_info;
typedef struct { typedef struct {
int numofelements; int numofelements;
struct SymbolTable *recordScope; struct SymbolTable *recordScope;
int total_size; int total_size;
int* offsets; int *offsets;
} record_info; } record_info;
typedef struct { typedef struct {
int startlinenumber; int startlinenumber;
bool regularoras; bool regularoras;
} function_declaration_info; } function_declaration_info;
typedef struct { typedef struct {
struct TableNode *parameter; struct TableNode *parameter;
struct TableNode *returntype; struct TableNode *returntype;
} function_type_info; } function_type_info;
typedef union { typedef union {
primitive_info *PrimAdInfo; primitive_info *PrimAdInfo;
array_info *ArrayAdInfo; array_info *ArrayAdInfo;
record_info *RecAdInfo; record_info *RecAdInfo;
function_declaration_info *FunDecAdInfo; function_declaration_info *FunDecAdInfo;
function_type_info *FunTypeAdInfo; function_type_info *FunTypeAdInfo;
} AdInfo; } AdInfo;
typedef struct ListOfTable { typedef struct ListOfTable {
struct SymbolTable *table; struct SymbolTable *table;
struct ListOfTable *next; struct ListOfTable *next;
} ListOfTable; } ListOfTable;
//Table node to store //Table node to store
typedef struct TableNode { typedef struct TableNode {
struct TableNode *theType; struct TableNode *theType;
int tag; int tag;
char *theName; char *theName;
AdInfo *additionalinfo; AdInfo *additionalinfo;
struct TableNode *next; struct TableNode *next;
} TableNode; } TableNode;
typedef struct SymbolTable { typedef struct SymbolTable {
TableNode *entries; TableNode *entries;
struct SymbolTable *Parent_Scope; struct SymbolTable *Parent_Scope;
struct ListOfTable *Children_Scope; struct ListOfTable *Children_Scope;
int Line_Number; int Line_Number;
int Column_Number; int Column_Number;
} SymbolTable; } SymbolTable;
typedef enum { typedef enum {
TYPE_STRING = 1, TYPE_STRING = 1,
TYPE_ARRAY_TYPE = 2, TYPE_ARRAY_TYPE = 2,
TYPE_RECORD_TYPE = 3, TYPE_RECORD_TYPE = 3,
TYPE_FUNCTION_DECLARATION = 4, TYPE_FUNCTION_DECLARATION = 4,
TYPE_FUNCTION_TYPE = 5, TYPE_FUNCTION_TYPE = 5,
TYPE_PRIMITIVE = 6, TYPE_PRIMITIVE = 6,
TYPE_ALL_ELSE = 7, TYPE_ALL_ELSE = 7,
TYPE_UNDEFINED = 8, TYPE_UNDEFINED = 8,
TYPE_RECORD = 9, TYPE_RECORD = 9,
TYPE_ARRAY = 10, TYPE_ARRAY = 10,
TYPE_SYSTEM_DEFINED = 11, TYPE_SYSTEM_DEFINED = 11,
TYPE_PRIMITIVE_TYPE = 12 TYPE_PRIMITIVE_TYPE = 12
} types; } types;
AdInfo *CreatePrimitiveInfo(int size); AdInfo *CreatePrimitiveInfo(int size);
@ -128,10 +127,10 @@ ListOfTable *getRestOfChildren(ListOfTable *lt);
TableNode *getFirstEntry(SymbolTable *st); TableNode *getFirstEntry(SymbolTable *st);
TableNode *getNextEntry(TableNode *tn); TableNode *getNextEntry(TableNode *tn);
TableNode * printTableNode(TableNode * tn); TableNode *printTableNode(TableNode *tn);
void printdebug_impl(char *file, int line, const char *format, ...); void printdebug_impl(char *file, int line, const char *format, ...);
#define printdebug(format, ...) \ #define printdebug(format, ...) \
printdebug_impl(__FILE__, __LINE__, format, ##__VA_ARGS__) printdebug_impl(__FILE__, __LINE__, format, ##__VA_ARGS__)
extern int yylex(void); extern int yylex(void);
extern char *yytext; extern char *yytext;

View File

@ -1,31 +1,35 @@
NAME : SCOPE : PARENT : TYPE : Extra annotation NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
-------------------------:--------:--------:--------------------------:------------------------------ ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
bar2 : 001001 : : T2 : User Defined bar2 : 001001 : : undefined : Function Definition
bar1 : 001001 : : T2 : User Defined bar1 : 001001 : : undefined : Function Definition
foo : 001001 : : T1 : User Defined foo : 001001 : : undefined : Function Definition
arr : 001001 : : 1 -> integer : Type of Array entry : 001001 : : undefined : Function Definition
T2 : 001001 : : primitive function type : User Defined main : 001001 : : string -> integer : Type of Function
T1 : 001001 : : primitive function type : User Defined arr : 001001 : : 1 -> integer : Type of Array
rec : 001001 : : record : elements-2 T2 : 001001 : : rec -> integer : Type of Function
entry : 001001 : : main : User Defined T1 : 001001 : : integer -> integer : Type of Function
main : 001001 : : primitive function type : User Defined rec : 001001 : : Record Type : elements-2 size-8 bytes
integer : 001001 : : Primitive : size-4 bytes integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive : size-8 bytes address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive : size-1 bytes character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive : size-1 bytes Boolean : 001001 : : Primitive Type : size-4 bytes
-------------------------:--------:--------:--------------------------:------------------------------ reserve type : 001001 : : integer -> address : Type of Function
w : 026000 : 001001 : rec : User Defined reserve : 001001 : : undefined : Function Definition
result : 026000 : 001001 : integer : User Defined release type : 001001 : : address -> integer : Type of Function
arg : 026000 : 001001 : string : User Defined release : 001001 : : undefined : Function Definition
-------------------------:--------:--------:--------------------------:------------------------------ ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
r : 021000 : 001001 : integer : User Defined w : 025000 : 001001 : rec : Record Instance
s : 021000 : 001001 : integer : User Defined result : 025000 : 001001 : integer : Primitive Instance
-------------------------:--------:--------:--------------------------:------------------------------ arg : 025000 : 001001 : string : Array Instance
a : 017000 : 001001 : rec : User Defined ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
-------------------------:--------:--------:--------------------------:------------------------------ r : 021000 : 001001 : integer : Primitive Instance
x : 013000 : 001001 : integer : User Defined s : 021000 : 001001 : integer : Primitive Instance
-------------------------:--------:--------:--------------------------:------------------------------ ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
y : 004000 : 001001 : integer : User Defined x : 017000 : 001001 : integer : Primitive Instance
x : 004000 : 001001 : integer : User Defined y : 017000 : 001001 : integer : Primitive Instance
-------------------------:--------:--------:--------------------------:------------------------------ ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
x : 013000 : 001001 : integer : Primitive Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
y : 001000 : 001001 : integer : Primitive Instance
x : 001000 : 001001 : integer : Primitive Instance

View File

@ -1,26 +1,29 @@
NAME : SCOPE : PARENT : TYPE : Extra annotation NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
-------------------------:--------:--------:--------------------------:------------------------------ ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
entry : 001001 : : string2integer : User Defined entry : 001001 : : undefined : Function Definition
integer2integer2integerFunc: 001001 : : integer2integer2integer : User Defined integer2integer2integerFunc : 001001 : : undefined : Function Definition
released : 001001 : : address2integer : User Defined released : 001001 : : undefined : Function Definition
reserved : 001001 : : integer2address : User Defined reserved : 001001 : : undefined : Function Definition
printBoolean : 001001 : : Boolean2integer : User Defined printBoolean : 001001 : : undefined : Function Definition
printCharacter : 001001 : : character2integer : User Defined printCharacter : 001001 : : undefined : Function Definition
printInteger : 001001 : : integer2integer : User Defined printInteger : 001001 : : undefined : Function Definition
integer2integer2integer : 001001 : : primitive function type : User Defined integer2integer2integer : 001001 : : integer2integer -> integer : Type of Function
address2integer : 001001 : : primitive function type : User Defined address2integer : 001001 : : address -> integer : Type of Function
integer2address : 001001 : : primitive function type : User Defined integer2address : 001001 : : integer -> address : Type of Function
Boolean2Boolean2Boolean : 001001 : : primitive function type : User Defined Boolean2Boolean2Boolean : 001001 : : Boolean2Boolean -> Boolean : Type of Function
character2character2Boolean: 001001 : : primitive function type : User Defined character2character2Boolean : 001001 : : undefined -> undefined : Type of Function
integer2integer2Boolean : 001001 : : primitive function type : User Defined integer2integer2Boolean : 001001 : : integer2integer -> Boolean : Type of Function
string2integer : 001001 : : primitive function type : User Defined string2integer : 001001 : : string -> integer : Type of Function
Boolean2integer : 001001 : : primitive function type : User Defined Boolean2integer : 001001 : : Boolean -> integer : Type of Function
character2integer : 001001 : : primitive function type : User Defined character2integer : 001001 : : character -> integer : Type of Function
integer2integer : 001001 : : primitive function type : User Defined integer2integer : 001001 : : integer -> integer : Type of Function
Boolean2Boolean : 001001 : : primitive function type : User Defined Boolean2Boolean : 001001 : : Boolean -> Boolean : Type of Function
integer : 001001 : : Primitive : size-4 bytes integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive : size-8 bytes address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive : size-1 bytes character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive : size-1 bytes Boolean : 001001 : : Primitive Type : size-4 bytes
-------------------------:--------:--------:--------------------------:------------------------------ reserve type : 001001 : : integer -> address : Type of Function
reserve : 001001 : : undefined : Function Definition
release type : 001001 : : address -> integer : Type of Function
release : 001001 : : undefined : Function Definition

View File

@ -1,17 +1,21 @@
NAME : SCOPE : PARENT : TYPE : Extra annotation NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
-------------------------:--------:--------:--------------------------:------------------------------ ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
entry : 001001 : : main : User Defined testarr : 001001 : : 1 -> integer : Type of Array
main : 001001 : : primitive function type : User Defined entry : 001001 : : undefined : Function Definition
integer : 001001 : : Primitive : size-4 bytes main : 001001 : : string -> integer : Type of Function
address : 001001 : : Primitive : size-8 bytes integer : 001001 : : Primitive Type : size-4 bytes
character : 001001 : : Primitive : size-1 bytes address : 001001 : : Primitive Type : size-8 bytes
string : 001001 : : 1 -> character : Type of Array character : 001001 : : Primitive Type : size-1 bytes
Boolean : 001001 : : Primitive : size-1 bytes string : 001001 : : 1 -> character : Type of Array
-------------------------:--------:--------:--------------------------:------------------------------ Boolean : 001001 : : Primitive Type : size-4 bytes
b1 : 005000 : 001001 : Boolean : User Defined reserve type : 001001 : : integer -> address : Type of Function
b2 : 005000 : 001001 : Boolean : User Defined reserve : 001001 : : undefined : Function Definition
arr2 : 005000 : 001001 : address : User Defined release type : 001001 : : address -> integer : Type of Function
arr : 005000 : 001001 : address : User Defined release : 001001 : : undefined : Function Definition
x : 005000 : 001001 : integer : User Defined ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
arg : 005000 : 001001 : string : User Defined b1 : 005000 : 001001 : Boolean : Primitive Instance
-------------------------:--------:--------:--------------------------:------------------------------ b2 : 005000 : 001001 : Boolean : Primitive Instance
arr2 : 005000 : 001001 : testarr : Array Instance
arr : 005000 : 001001 : testarr : Array Instance
x : 005000 : 001001 : integer : Primitive Instance
arg : 005000 : 001001 : string : Array Instance

View File

@ -0,0 +1,20 @@
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
test : 001001 : : undefined : Function Definition
main : 001001 : : rec -> integer : Type of Function
rec : 001001 : : Record Type : elements-2 size-8 bytes
integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive Type : size-4 bytes
reserve type : 001001 : : integer -> address : Type of Function
reserve : 001001 : : undefined : Function Definition
release type : 001001 : : address -> integer : Type of Function
release : 001001 : : undefined : Function Definition
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
arg : 005000 : 001001 : integer : Primitive Instance
arg2 : 005000 : 001001 : integer : Primitive Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
y : 001000 : 001001 : integer : Primitive Instance
x : 001000 : 001001 : integer : Primitive Instance

View File

@ -1,17 +1,20 @@
NAME : SCOPE : PARENT : TYPE : Extra annotation NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
-------------------------:--------:--------:--------------------------:------------------------------ ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
rec : 001001 : : record : elements-2 rec : 001001 : : Record Type : elements-2 size-8 bytes
entry : 001001 : : main : User Defined entry : 001001 : : undefined : Function Definition
main : 001001 : : primitive function type : User Defined main : 001001 : : string -> integer : Type of Function
integer : 001001 : : Primitive : size-4 bytes integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive : size-8 bytes address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive : size-1 bytes character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive : size-1 bytes Boolean : 001001 : : Primitive Type : size-4 bytes
-------------------------:--------:--------:--------------------------:------------------------------ reserve type : 001001 : : integer -> address : Type of Function
w : 007000 : 001001 : rec : User Defined reserve : 001001 : : undefined : Function Definition
arg : 007000 : 001001 : string : User Defined release type : 001001 : : address -> integer : Type of Function
-------------------------:--------:--------:--------------------------:------------------------------ release : 001001 : : undefined : Function Definition
y : 004000 : 001001 : integer : User Defined ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
x : 004000 : 001001 : integer : User Defined w : 006000 : 001001 : rec : Record Instance
-------------------------:--------:--------:--------------------------:------------------------------ arg : 006000 : 001001 : string : Array Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
y : 004000 : 001001 : integer : Primitive Instance
x : 004000 : 001001 : integer : Primitive Instance

View File

@ -1,14 +1,17 @@
NAME : SCOPE : PARENT : TYPE : Extra annotation NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
-------------------------:--------:--------:--------------------------:------------------------------ ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
rec : 001001 : : record : elements-2 rec : 001001 : : Record Type : elements-2 size-8 bytes
integer : 001001 : : Primitive : size-4 bytes integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive : size-8 bytes address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive : size-1 bytes character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive : size-1 bytes Boolean : 001001 : : Primitive Type : size-4 bytes
-------------------------:--------:--------:--------------------------:------------------------------ reserve type : 001001 : : integer -> address : Type of Function
w : 004000 : 001001 : rec : User Defined reserve : 001001 : : undefined : Function Definition
-------------------------:--------:--------:--------------------------:------------------------------ release type : 001001 : : address -> integer : Type of Function
y : 001000 : 001001 : integer : User Defined release : 001001 : : undefined : Function Definition
x : 001000 : 001001 : integer : User Defined ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
-------------------------:--------:--------:--------------------------:------------------------------ w : 003000 : 001001 : rec : Record Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
y : 001000 : 001001 : integer : Primitive Instance
x : 001000 : 001001 : integer : Primitive Instance

View File

@ -1,36 +1,39 @@
NAME : SCOPE : PARENT : TYPE : Extra annotation NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
-------------------------:--------:--------:--------------------------:------------------------------ ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
entry : 001001 : : string2integer : User Defined entry : 001001 : : undefined : Function Definition
printBoolean : 001001 : : Boolean2integer : User Defined printBoolean : 001001 : : undefined : Function Definition
printCharacter : 001001 : : character2integer : User Defined printCharacter : 001001 : : undefined : Function Definition
printInteger : 001001 : : integer2integer : User Defined printInteger : 001001 : : undefined : Function Definition
address2integer : 001001 : : primitive function type : User Defined address2integer : 001001 : : address -> integer : Type of Function
integer2address : 001001 : : primitive function type : User Defined integer2address : 001001 : : integer -> address : Type of Function
BooleanXBoolean2Boolean : 001001 : : primitive function type : User Defined BooleanXBoolean2Boolean : 001001 : : BooleanXBoolean -> Boolean : Type of Function
characterXcharacter2Boolean: 001001 : : primitive function type : User Defined characterXcharacter2Boolean : 001001 : : characterXcharacter -> Boolean : Type of Function
integerXinteger2Boolean : 001001 : : primitive function type : User Defined integerXinteger2Boolean : 001001 : : integerXinteger -> Boolean : Type of Function
integerXinteger2integer : 001001 : : primitive function type : User Defined integerXinteger2integer : 001001 : : integerXinteger -> integer : Type of Function
string2integer : 001001 : : primitive function type : User Defined string2integer : 001001 : : string -> integer : Type of Function
Boolean2integer : 001001 : : primitive function type : User Defined Boolean2integer : 001001 : : Boolean -> integer : Type of Function
character2integer : 001001 : : primitive function type : User Defined character2integer : 001001 : : character -> integer : Type of Function
integer2integer : 001001 : : primitive function type : User Defined integer2integer : 001001 : : integer -> integer : Type of Function
Boolean2Boolean : 001001 : : primitive function type : User Defined Boolean2Boolean : 001001 : : Boolean -> Boolean : Type of Function
integerXinteger : 001001 : : record : elements-2 integerXinteger : 001001 : : Record Type : elements-2 size-8 bytes
characterXcharacter : 001001 : : record : elements-2 characterXcharacter : 001001 : : Record Type : elements-2 size-2 bytes
BooleanXBoolean : 001001 : : record : elements-2 BooleanXBoolean : 001001 : : Record Type : elements-2 size-8 bytes
string : 001001 : : 1 -> character : Type of Array string : 001001 : : 1 -> character : Type of Array
integer : 001001 : : Primitive : size-4 bytes integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive : size-8 bytes address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive : size-1 bytes character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive : size-1 bytes Boolean : 001001 : : Primitive Type : size-4 bytes
-------------------------:--------:--------:--------------------------:------------------------------ reserve type : 001001 : : integer -> address : Type of Function
y : 015000 : 001001 : integer : User Defined reserve : 001001 : : undefined : Function Definition
x : 015000 : 001001 : integer : User Defined release type : 001001 : : address -> integer : Type of Function
-------------------------:--------:--------:--------------------------:------------------------------ release : 001001 : : undefined : Function Definition
y : 014000 : 001001 : character : User Defined ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
x : 014000 : 001001 : character : User Defined y : 015000 : 001001 : integer : Primitive Instance
-------------------------:--------:--------:--------------------------:------------------------------ x : 015000 : 001001 : integer : Primitive Instance
y : 013000 : 001001 : Boolean : User Defined ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
x : 013000 : 001001 : Boolean : User Defined y : 014000 : 001001 : character : Primitive Instance
-------------------------:--------:--------:--------------------------:------------------------------ x : 014000 : 001001 : character : Primitive Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
y : 013000 : 001001 : Boolean : Primitive Instance
x : 013000 : 001001 : Boolean : Primitive Instance

View File

@ -1,62 +1,66 @@
NAME : SCOPE : PARENT : TYPE : Extra annotation NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
-------------------------:--------:--------:--------------------------:------------------------------ ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
make_list : 001001 : : list : User Defined make_list : 001001 : : undefined : Function Definition
bar2 : 001001 : : T2 : User Defined bar2 : 001001 : : undefined : Function Definition
bar1 : 001001 : : T2 : User Defined bar1 : 001001 : : undefined : Function Definition
foo : 001001 : : T1 : User Defined foo : 001001 : : undefined : Function Definition
list : 001001 : : primitive function type : User Defined list : 001001 : : integer -> llnode : Type of Function
llnode : 001001 : : record : elements-3 llnode : 001001 : : Record Type : elements-3 size-24 bytes
T2 : 001001 : : primitive function type : User Defined T2 : 001001 : : rec -> integer : Type of Function
T1 : 001001 : : primitive function type : User Defined T1 : 001001 : : integer -> integer : Type of Function
rec : 001001 : : record : elements-2 rec : 001001 : : Record Type : elements-2 size-8 bytes
entry : 001001 : : main : User Defined entry : 001001 : : undefined : Function Definition
main : 001001 : : primitive function type : User Defined main : 001001 : : string -> integer : Type of Function
integer : 001001 : : Primitive : size-4 bytes integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive : size-8 bytes address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive : size-1 bytes character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive : size-1 bytes Boolean : 001001 : : Primitive Type : size-4 bytes
-------------------------:--------:--------:--------------------------:------------------------------ reserve type : 001001 : : integer -> address : Type of Function
li : 070000 : 001001 : llnode : User Defined reserve : 001001 : : undefined : Function Definition
w : 070000 : 001001 : rec : User Defined release type : 001001 : : address -> integer : Type of Function
result : 070000 : 001001 : integer : User Defined release : 001001 : : undefined : Function Definition
arg : 070000 : 001001 : string : User Defined ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
-------------------------:--------:--------:--------------------------:------------------------------ li : 069000 : 001001 : llnode : Record Instance
r : 054000 : 001001 : integer : User Defined w : 069000 : 001001 : rec : Record Instance
s : 054000 : 001001 : integer : User Defined result : 069000 : 001001 : integer : Primitive Instance
-------------------------:--------:--------:--------------------------:------------------------------ arg : 069000 : 001001 : string : Array Instance
x : 060009 : 054000 : integer : User Defined ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
-------------------------:--------:--------:--------------------------:------------------------------ r : 054000 : 001001 : integer : Primitive Instance
: 062028 : 060009 : : Empty Scope s : 054000 : 001001 : integer : Primitive Instance
-------------------------:--------:--------:--------------------------:------------------------------ ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
: 055021 : 054000 : : Empty Scope x : 059012 : 054000 : integer : Primitive Instance
-------------------------:--------:--------:--------------------------:------------------------------ ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
: 056026 : 055021 : : Empty Scope : 062028 : 059012 : : Empty Scope
-------------------------:--------:--------:--------------------------:------------------------------ ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
a : 050000 : 001001 : rec : User Defined : 055021 : 054000 : : Empty Scope
-------------------------:--------:--------:--------------------------:------------------------------ ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
x : 046000 : 001001 : integer : User Defined : 056026 : 055021 : : Empty Scope
-------------------------:--------:--------:--------------------------:------------------------------ ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
temp : 017000 : 001001 : address : User Defined a : 050000 : 001001 : integer : Primitive Instance
curr : 017000 : 001001 : address : User Defined b : 050000 : 001001 : integer : Primitive Instance
ret : 017000 : 001001 : address : User Defined ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
orig_a : 017000 : 001001 : integer : User Defined x : 046000 : 001001 : integer : Primitive Instance
a : 017000 : 001001 : integer : User Defined ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
-------------------------:--------:--------:--------------------------:------------------------------ temp : 016000 : 001001 : address : Primitive Instance
: 021012 : 017000 : : Empty Scope curr : 016000 : 001001 : address : Primitive Instance
-------------------------:--------:--------:--------------------------:------------------------------ ret : 016000 : 001001 : address : Primitive Instance
: 026023 : 021012 : : Empty Scope orig_a : 016000 : 001001 : integer : Primitive Instance
-------------------------:--------:--------:--------------------------:------------------------------ a : 016000 : 001001 : integer : Primitive Instance
: 035020 : 026023 : : Empty Scope ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
-------------------------:--------:--------:--------------------------:------------------------------ : 021012 : 016000 : : Empty Scope
: 031034 : 026023 : : Empty Scope ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
-------------------------:--------:--------:--------------------------:------------------------------ : 026023 : 021012 : : Empty Scope
: 019029 : 017000 : : Empty Scope ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
-------------------------:--------:--------:--------------------------:------------------------------ : 035020 : 026023 : : Empty Scope
next : 008000 : 001001 : llnode : User Defined ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
val : 008000 : 001001 : integer : User Defined : 031034 : 026023 : : Empty Scope
prev : 008000 : 001001 : llnode : User Defined ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
-------------------------:--------:--------:--------------------------:------------------------------ : 019029 : 016000 : : Empty Scope
y : 004000 : 001001 : integer : User Defined ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
x : 004000 : 001001 : integer : User Defined next : 008000 : 001001 : llnode : Record Instance
-------------------------:--------:--------:--------------------------:------------------------------ val : 008000 : 001001 : integer : Primitive Instance
prev : 008000 : 001001 : llnode : Record Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
y : 004000 : 001001 : integer : Primitive Instance
x : 004000 : 001001 : integer : Primitive Instance

View File

@ -1,30 +1,29 @@
NAME : SCOPE : PARENT : TYPE : Extra annotation NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
-------------------------:--------:--------:--------------------------:------------------------------ ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
bar2 : 001001 : : T2 : User Defined bar2 : 001001 : : undefined : Function Definition
bar1 : 001001 : : T2 : User Defined bar1 : 001001 : : undefined : Function Definition
foo : 001001 : : T1 : User Defined foo : 001001 : : undefined : Function Definition
T2 : 001001 : : primitive function type : User Defined T2 : 001001 : : rec -> integer : Type of Function
T1 : 001001 : : primitive function type : User Defined T1 : 001001 : : integer -> integer : Type of Function
rec : 001001 : : record : elements-2 rec : 001001 : : Record Type : elements-2 size-8 bytes
entry : 001001 : : main : User Defined entry : 001001 : : undefined : Function Definition
main : 001001 : : primitive function type : User Defined main : 001001 : : string -> integer : Type of Function
integer : 001001 : : Primitive : size-4 bytes integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive : size-8 bytes address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive : size-1 bytes character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive : size-1 bytes Boolean : 001001 : : Primitive Type : size-4 bytes
-------------------------:--------:--------:--------------------------:------------------------------ reserve type : 001001 : : integer -> address : Type of Function
w : 001000 : 001001 : rec : User Defined reserve : 001001 : : undefined : Function Definition
result : 001000 : 001001 : integer : User Defined release type : 001001 : : address -> integer : Type of Function
arg : 001000 : 001001 : string : User Defined release : 001001 : : undefined : Function Definition
-------------------------:--------:--------:--------------------------:------------------------------ ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
r : 001000 : 001001 : integer : User Defined : 000000 : 001001 : : Empty Scope
s : 001000 : 001001 : integer : User Defined ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
-------------------------:--------:--------:--------------------------:------------------------------ a : 001000 : 001001 : integer : Primitive Instance
a : 001000 : 001001 : rec : User Defined undefined : 001000 : 001001 : integer : Primitive Instance
-------------------------:--------:--------:--------------------------:------------------------------ ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
x : 001000 : 001001 : integer : User Defined x : 001000 : 001001 : integer : Primitive Instance
-------------------------:--------:--------:--------------------------:------------------------------ ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
y : 001000 : 001001 : integer : User Defined y : 001000 : 001001 : integer : Primitive Instance
x : 001000 : 001001 : integer : User Defined x : 001000 : 001001 : integer : Primitive Instance
-------------------------:--------:--------:--------------------------:------------------------------

View File

@ -1,13 +1,23 @@
NAME : SCOPE : PARENT : TYPE : Extra annotation NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
-------------------------:--------:--------:--------------------------:------------------------------ ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
entry : 001001 : : main : User Defined entry : 001001 : : undefined : Function Definition
main : 001001 : : primitive function type : User Defined rec : 001001 : : Record Type : elements-2 size-8 bytes
integer : 001001 : : Primitive : size-4 bytes main : 001001 : : string -> integer : Type of Function
address : 001001 : : Primitive : size-8 bytes integer : 001001 : : Primitive Type : size-4 bytes
character : 001001 : : Primitive : size-1 bytes address : 001001 : : Primitive Type : size-8 bytes
string : 001001 : : 1 -> character : Type of Array character : 001001 : : Primitive Type : size-1 bytes
Boolean : 001001 : : Primitive : size-1 bytes string : 001001 : : 1 -> character : Type of Array
-------------------------:--------:--------:--------------------------:------------------------------ Boolean : 001001 : : Primitive Type : size-4 bytes
x : 005000 : 001001 : integer : User Defined reserve type : 001001 : : integer -> address : Type of Function
arg : 005000 : 001001 : string : User Defined reserve : 001001 : : undefined : Function Definition
-------------------------:--------:--------:--------------------------:------------------------------ release type : 001001 : : address -> integer : Type of Function
release : 001001 : : undefined : Function Definition
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
arg_bool : 006000 : 001001 : Boolean : Primitive Instance
arg_record : 006000 : 001001 : rec : Record Instance
arg_y : 006000 : 001001 : integer : Primitive Instance
arg_x : 006000 : 001001 : integer : Primitive Instance
arg : 006000 : 001001 : string : Array Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
rec_y : 002000 : 001001 : integer : Primitive Instance
rec_x : 002000 : 001001 : integer : Primitive Instance

View File

@ -1,12 +1,16 @@
NAME : SCOPE : PARENT : TYPE : Extra annotation NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
-------------------------:--------:--------:--------------------------:------------------------------ ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
entry : 001001 : : main : User Defined entry : 001001 : : undefined : Function Definition
main : 001001 : : primitive function type : User Defined main : 001001 : : string -> integer : Type of Function
integer : 001001 : : Primitive : size-4 bytes integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive : size-8 bytes address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive : size-1 bytes character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive : size-1 bytes Boolean : 001001 : : Primitive Type : size-4 bytes
-------------------------:--------:--------:--------------------------:------------------------------ reserve type : 001001 : : integer -> address : Type of Function
arg : 005000 : 001001 : string : User Defined reserve : 001001 : : undefined : Function Definition
-------------------------:--------:--------:--------------------------:------------------------------ release type : 001001 : : address -> integer : Type of Function
release : 001001 : : undefined : Function Definition
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
x : 004000 : 001001 : integer : Primitive Instance
arg : 004000 : 001001 : string : Array Instance

View File

@ -0,0 +1,17 @@
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
a_of_s : 001001 : : 1 -> string : Type of Array
string : 001001 : : 1 -> character : Type of Array
integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive Type : size-4 bytes
reserve type : 001001 : : integer -> address : Type of Function
reserve : 001001 : : undefined : Function Definition
release type : 001001 : : address -> integer : Type of Function
release : 001001 : : undefined : Function Definition
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
many_names : 006000 : 001001 : a_of_s : Array Instance
another_name : 006000 : 001001 : string : Array Instance
one_name : 006000 : 001001 : string : Array Instance

View File

@ -1,18 +1,21 @@
NAME : SCOPE : PARENT : TYPE : Extra annotation NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
-------------------------:--------:--------:--------------------------:------------------------------ ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
T2 : 001001 : : primitive function type : User Defined T2 : 001001 : : rec -> integer : Type of Function
rec : 001001 : : record : elements-2 rec : 001001 : : Record Type : elements-2 size-8 bytes
entry : 001001 : : main : User Defined entry : 001001 : : undefined : Function Definition
main : 001001 : : primitive function type : User Defined main : 001001 : : string -> integer : Type of Function
integer : 001001 : : Primitive : size-4 bytes integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive : size-8 bytes address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive : size-1 bytes character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive : size-1 bytes Boolean : 001001 : : Primitive Type : size-4 bytes
-------------------------:--------:--------:--------------------------:------------------------------ reserve type : 001001 : : integer -> address : Type of Function
w : 008000 : 001001 : rec : User Defined reserve : 001001 : : undefined : Function Definition
arg : 008000 : 001001 : string : User Defined release type : 001001 : : address -> integer : Type of Function
-------------------------:--------:--------:--------------------------:------------------------------ release : 001001 : : undefined : Function Definition
y : 004000 : 001001 : integer : User Defined ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
x : 004000 : 001001 : integer : User Defined w : 007000 : 001001 : rec : Record Instance
-------------------------:--------:--------:--------------------------:------------------------------ arg : 007000 : 001001 : string : Array Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
y : 004000 : 001001 : integer : Primitive Instance
x : 004000 : 001001 : integer : Primitive Instance

View File

@ -0,0 +1,34 @@
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
test : 001001 : : undefined : Function Definition
main : 001001 : : rec -> integer : Type of Function
rec : 001001 : : Record Type : elements-2 size-8 bytes
integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive Type : size-4 bytes
reserve type : 001001 : : integer -> address : Type of Function
reserve : 001001 : : undefined : Function Definition
release type : 001001 : : address -> integer : Type of Function
release : 001001 : : undefined : Function Definition
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
b : 005000 : 001001 : Boolean : Primitive Instance
x : 005000 : 001001 : integer : Primitive Instance
arg : 005000 : 001001 : integer : Primitive Instance
undefined : 005000 : 001001 : integer : Primitive Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
: 023009 : 005000 : : Empty Scope
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
: 021014 : 005000 : : Empty Scope
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
: 017009 : 005000 : : Empty Scope
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
: 015017 : 005000 : : Empty Scope
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
: 011012 : 005000 : : Empty Scope
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
: 007015 : 005000 : : Empty Scope
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
y : 001000 : 001001 : integer : Primitive Instance
x : 001000 : 001001 : integer : Primitive Instance

View File

@ -1,17 +1,20 @@
NAME : SCOPE : PARENT : TYPE : Extra annotation NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
-------------------------:--------:--------:--------------------------:------------------------------ ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
entry : 001001 : : main : User Defined entry : 001001 : : undefined : Function Definition
main : 001001 : : primitive function type : User Defined main : 001001 : : string -> integer : Type of Function
integer : 001001 : : Primitive : size-4 bytes integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive : size-8 bytes address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive : size-1 bytes character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive : size-1 bytes Boolean : 001001 : : Primitive Type : size-4 bytes
-------------------------:--------:--------:--------------------------:------------------------------ reserve type : 001001 : : integer -> address : Type of Function
b1 : 005000 : 001001 : Boolean : User Defined reserve : 001001 : : undefined : Function Definition
b2 : 005000 : 001001 : Boolean : User Defined release type : 001001 : : address -> integer : Type of Function
arr2 : 005000 : 001001 : address : User Defined release : 001001 : : undefined : Function Definition
arr : 005000 : 001001 : address : User Defined ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
x : 005000 : 001001 : integer : User Defined b1 : 004000 : 001001 : Boolean : Primitive Instance
arg : 005000 : 001001 : string : User Defined b2 : 004000 : 001001 : Boolean : Primitive Instance
-------------------------:--------:--------:--------------------------:------------------------------ arr2 : 004000 : 001001 : address : Primitive Instance
arr : 004000 : 001001 : address : Primitive Instance
x : 004000 : 001001 : integer : Primitive Instance
arg : 004000 : 001001 : string : Array Instance

View File

@ -1,17 +1,20 @@
NAME : SCOPE : PARENT : TYPE : Extra annotation NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
-------------------------:--------:--------:--------------------------:------------------------------ ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
entry : 001001 : : main : User Defined entry : 001001 : : undefined : Function Definition
main : 001001 : : primitive function type : User Defined main : 001001 : : string -> integer : Type of Function
integer : 001001 : : Primitive : size-4 bytes integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive : size-8 bytes address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive : size-1 bytes character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive : size-1 bytes Boolean : 001001 : : Primitive Type : size-4 bytes
-------------------------:--------:--------:--------------------------:------------------------------ reserve type : 001001 : : integer -> address : Type of Function
b1 : 005000 : 001001 : Boolean : User Defined reserve : 001001 : : undefined : Function Definition
b2 : 005000 : 001001 : Boolean : User Defined release type : 001001 : : address -> integer : Type of Function
arr2 : 005000 : 001001 : address : User Defined release : 001001 : : undefined : Function Definition
arr : 005000 : 001001 : address : User Defined ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
x : 005000 : 001001 : integer : User Defined b1 : 004000 : 001001 : Boolean : Primitive Instance
arg : 005000 : 001001 : string : User Defined b2 : 004000 : 001001 : Boolean : Primitive Instance
-------------------------:--------:--------:--------------------------:------------------------------ arr2 : 004000 : 001001 : address : Primitive Instance
arr : 004000 : 001001 : address : Primitive Instance
x : 004000 : 001001 : integer : Primitive Instance
arg : 004000 : 001001 : string : Array Instance

View File

@ -1,17 +1,20 @@
NAME : SCOPE : PARENT : TYPE : Extra annotation NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
-------------------------:--------:--------:--------------------------:------------------------------ ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
a_of_s : 001001 : : 1 -> string : Type of Array a_of_s : 001001 : : 1 -> string : Type of Array
string : 001001 : : 1 -> character : Type of Array string : 001001 : : 1 -> character : Type of Array
entry : 001001 : : main : User Defined entry : 001001 : : undefined : Function Definition
main : 001001 : : primitive function type : User Defined main : 001001 : : string -> integer : Type of Function
integer : 001001 : : Primitive : size-4 bytes integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive : size-8 bytes address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive : size-1 bytes character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive : size-1 bytes Boolean : 001001 : : Primitive Type : size-4 bytes
-------------------------:--------:--------:--------------------------:------------------------------ reserve type : 001001 : : integer -> address : Type of Function
many_names : 010000 : 001001 : a_of_s : User Defined reserve : 001001 : : undefined : Function Definition
another_name : 010000 : 001001 : string : User Defined release type : 001001 : : address -> integer : Type of Function
one_name : 010000 : 001001 : string : User Defined release : 001001 : : undefined : Function Definition
arg : 010000 : 001001 : string : User Defined ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
-------------------------:--------:--------:--------------------------:------------------------------ many_names : 009000 : 001001 : a_of_s : Array Instance
another_name : 009000 : 001001 : string : Array Instance
one_name : 009000 : 001001 : string : Array Instance
arg : 009000 : 001001 : string : Array Instance

View File

@ -1,18 +1,26 @@
NAME : SCOPE : PARENT : TYPE : Extra annotation NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
-------------------------:--------:--------:--------------------------:------------------------------ ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
entry : 001001 : : main : User Defined entry : 001001 : : undefined : Function Definition
main : 001001 : : primitive function type : User Defined rec : 001001 : : Record Type : elements-2 size-8 bytes
integer : 001001 : : Primitive : size-4 bytes main : 001001 : : string -> integer : Type of Function
address : 001001 : : Primitive : size-8 bytes integer : 001001 : : Primitive Type : size-4 bytes
character : 001001 : : Primitive : size-1 bytes address : 001001 : : Primitive Type : size-8 bytes
string : 001001 : : 1 -> character : Type of Array character : 001001 : : Primitive Type : size-1 bytes
Boolean : 001001 : : Primitive : size-1 bytes string : 001001 : : 1 -> character : Type of Array
-------------------------:--------:--------:--------------------------:------------------------------ Boolean : 001001 : : Primitive Type : size-4 bytes
a : 005000 : 001001 : character : User Defined reserve type : 001001 : : integer -> address : Type of Function
b1 : 005000 : 001001 : Boolean : User Defined reserve : 001001 : : undefined : Function Definition
b2 : 005000 : 001001 : Boolean : User Defined release type : 001001 : : address -> integer : Type of Function
arr2 : 005000 : 001001 : address : User Defined release : 001001 : : undefined : Function Definition
arr : 005000 : 001001 : address : User Defined ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
x : 005000 : 001001 : integer : User Defined r : 006000 : 001001 : rec : Record Instance
arg : 005000 : 001001 : string : User Defined a : 006000 : 001001 : character : Primitive Instance
-------------------------:--------:--------:--------------------------:------------------------------ b1 : 006000 : 001001 : Boolean : Primitive Instance
b2 : 006000 : 001001 : Boolean : Primitive Instance
arr2 : 006000 : 001001 : address : Primitive Instance
arr : 006000 : 001001 : address : Primitive Instance
x : 006000 : 001001 : integer : Primitive Instance
arg : 006000 : 001001 : string : Array Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
y : 003000 : 001001 : integer : Primitive Instance
x : 003000 : 001001 : integer : Primitive Instance

View File

@ -1,17 +1,20 @@
NAME : SCOPE : PARENT : TYPE : Extra annotation NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
-------------------------:--------:--------:--------------------------:------------------------------ ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
entry : 001001 : : main : User Defined entry : 001001 : : undefined : Function Definition
main : 001001 : : primitive function type : User Defined main : 001001 : : string -> integer : Type of Function
integer : 001001 : : Primitive : size-4 bytes integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive : size-8 bytes address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive : size-1 bytes character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive : size-1 bytes Boolean : 001001 : : Primitive Type : size-4 bytes
-------------------------:--------:--------:--------------------------:------------------------------ reserve type : 001001 : : integer -> address : Type of Function
b1 : 005000 : 001001 : Boolean : User Defined reserve : 001001 : : undefined : Function Definition
b2 : 005000 : 001001 : Boolean : User Defined release type : 001001 : : address -> integer : Type of Function
arr2 : 005000 : 001001 : address : User Defined release : 001001 : : undefined : Function Definition
arr : 005000 : 001001 : address : User Defined ------------------------------:--------:--------:-----------------------------------:-----------------------------------:
x : 005000 : 001001 : integer : User Defined b1 : 004000 : 001001 : Boolean : Primitive Instance
arg : 005000 : 001001 : string : User Defined b2 : 004000 : 001001 : Boolean : Primitive Instance
-------------------------:--------:--------:--------------------------:------------------------------ arr2 : 004000 : 001001 : address : Primitive Instance
arr : 004000 : 001001 : address : Primitive Instance
x : 004000 : 001001 : integer : Primitive Instance
arg : 004000 : 001001 : string : Array Instance

View File

@ -0,0 +1,25 @@
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
bar : 001001 : : undefined : Function Definition
entry : 001001 : : undefined : Function Definition
main : 001001 : : string -> integer : Type of Function
T2 : 001001 : : rec -> integer : Type of Function
rec : 001001 : : Record Type : elements-2 size-6 bytes
integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive Type : size-4 bytes
reserve type : 001001 : : integer -> address : Type of Function
reserve : 001001 : : undefined : Function Definition
release type : 001001 : : address -> integer : Type of Function
release : 001001 : : undefined : Function Definition
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
w : 013000 : 001001 : rec : Record Instance
result : 013000 : 001001 : integer : Primitive Instance
arg : 013000 : 001001 : string : Array Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
: 009000 : 001001 : : Empty Scope
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
y : 001000 : 001001 : integer : Primitive Instance
x : 001000 : 001001 : character : Primitive Instance

View File

@ -0,0 +1,19 @@
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
entry : 001001 : : undefined : Function Definition
main : 001001 : : string -> integer : Type of Function
integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive Type : size-4 bytes
reserve type : 001001 : : integer -> address : Type of Function
reserve : 001001 : : undefined : Function Definition
release type : 001001 : : address -> integer : Type of Function
release : 001001 : : undefined : Function Definition
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
bool : 015000 : 001001 : Boolean : Primitive Instance
char : 015000 : 001001 : character : Primitive Instance
add : 015000 : 001001 : address : Primitive Instance
i : 015000 : 001001 : integer : Primitive Instance
arg : 015000 : 001001 : string : Array Instance

View File

@ -0,0 +1,29 @@
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
tricky : 001001 : : Record Type : elements-4 size-16 bytes
rec : 001001 : : Record Type : elements-6 size-24 bytes
tom : 001001 : : Record Type : elements-2 size-8 bytes
integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive Type : size-4 bytes
reserve type : 001001 : : integer -> address : Type of Function
reserve : 001001 : : undefined : Function Definition
release type : 001001 : : address -> integer : Type of Function
release : 001001 : : undefined : Function Definition
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
k2 : 003000 : 001001 : integer : Primitive Instance
b2 : 003000 : 001001 : Boolean : Primitive Instance
k1 : 003000 : 001001 : integer : Primitive Instance
b1 : 003000 : 001001 : Boolean : Primitive Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
y : 002000 : 001001 : integer : Primitive Instance
b : 002000 : 001001 : Boolean : Primitive Instance
d : 002000 : 001001 : character : Primitive Instance
c : 002000 : 001001 : character : Primitive Instance
prev : 002000 : 001001 : tom : Record Instance
x : 002000 : 001001 : integer : Primitive Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
y : 001000 : 001001 : integer : Primitive Instance
x : 001000 : 001001 : integer : Primitive Instance