Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
hmgle committed Jun 28, 2015
1 parent c6dd156 commit 5ed096b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
CFLAGS += -Wall

TARGET = yascm

all:: $(TARGET)

yascm: yascm_flex.l yascm_bison.y yascm.h yascm.c
bison -d yascm_bison.y
bison -d yascm_bison.y -o yascm_bison.tab.c
flex -o yascm_flex.lex.c yascm_flex.l
cc yascm_bison.tab.c yascm_flex.lex.c yascm.c -o $@

Expand Down
7 changes: 7 additions & 0 deletions yascm.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,19 @@ void object_print(const object *obj)
case FIXNUM:
printf("%ld\n", obj->int_val);
break;
case KEYWORD:
printf("<keywork>\n");
break;
case PRIM:
printf("<primitive>\n");
break;
case BOOL:
printf("#%c\n", obj->bool_val ? 't' : 'f');
break;
case CHAR:
printf("#\\%c\n", obj->char_val);
break;
case STRING:
case SYMBOL:
printf("%s\n", obj->string_val);
break;
Expand Down

0 comments on commit 5ed096b

Please sign in to comment.