Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added a spec for the subset

  • Loading branch information...
commit c403c8c714504d73607a4768cd59e67b3b17b2f1 1 parent a8a3b9f
@eudisd authored
View
BIN  C-Documentation.pdf
Binary file not shown
View
0  Documentation.md
No changes.
View
1  src/compiler/scanner.c
@@ -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);
View
20 src/compiler/symbol.c
@@ -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;
@@ -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);
@@ -115,7 +96,6 @@ void purge_record(record *rec)
void destroy_stab(symbol_table *stab)
{
-
}
int is_keyword(char *lexeme)
Please sign in to comment.
Something went wrong with that request. Please try again.