Skip to content

Commit

Permalink
Added a spec for the subset
Browse files Browse the repository at this point in the history
  • Loading branch information
eudisd committed Dec 26, 2011
1 parent a8a3b9f commit c403c8c
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 21 deletions.
Binary file added C-Documentation.pdf
Binary file not shown.
Empty file removed Documentation.md
Empty file.
1 change: 0 additions & 1 deletion src/compiler/scanner.c
Expand Up @@ -1416,7 +1416,6 @@ void stringlit(FILE *o, char *word)

void default_(FILE *o, char *word)
{

/* Try To See if it's a identifier, if not:
ERROR! Given token is not part of the lang def. */
parse_tokens(o, word);
Expand Down
20 changes: 0 additions & 20 deletions src/compiler/symbol.c
Expand Up @@ -59,23 +59,6 @@ symbol_table *create_stab(char* t_name, size_t max)

void stab_insert(char* filename, record *rec, symbol_table *stab)
{
/*
int addr;
char type;
char name[64];
char *value;
int slot;
char *scope;
*/

/* Before inserting anything into the table, we check that the
given identifier is NOT a reserved keyword */

//printf("Rect Name %s\n", rec->name);
//if( is_keyword(rec->name) ){
// fprintf(stderr, "%s: This keyword is reserved! Cannot be inserted into symbol table.", rec->name);
//}

size_t index = hash(rec->name, stab->size);
rec->slot = index;

Expand All @@ -87,13 +70,11 @@ void stab_insert(char* filename, record *rec, symbol_table *stab)

record *get_record(char *name, char*val, char type, int slot, char *scope)
{

record *rec = (record*)xmalloc(sizeof(record)*1);

/* NOTE: I have to purge all these allocations in the freeing of the records! */

rec->value = (char*)xmalloc(sizeof(char)*strlen(val));
//rec->scope = (char*)xmalloc(sizeof(char)*strlen(scope));

strcpy(rec->name, name);
strcpy(rec->value, val);
Expand All @@ -115,7 +96,6 @@ void purge_record(record *rec)

void destroy_stab(symbol_table *stab)
{

}

int is_keyword(char *lexeme)
Expand Down

0 comments on commit c403c8c

Please sign in to comment.