klisp

an open source interpreter for the Kernel Programming Language.
git clone http://git.hanabi.in/repos/klisp.git
Log | Files | Refs | README

commit eceadc1056f0cab7828802df93c75e0c8d65803e
parent a61758ad6528817e5e2f674a9b0ac7b54fe6caa0
Author: Andres Navarro <canavarro82@gmail.com>
Date:   Sun, 13 Mar 2011 01:37:13 -0300

Extracted out the symbol features from kground.c to a new file kgsymbols.c (and .h).

Diffstat:
Msrc/Makefile | 7+++++--
Msrc/kghelpers.h | 4+++-
Msrc/kground.c | 7-------
Asrc/kgsymbols.c | 26++++++++++++++++++++++++++
Asrc/kgsymbols.h | 24++++++++++++++++++++++++
5 files changed, 58 insertions(+), 10 deletions(-)

diff --git a/src/Makefile b/src/Makefile @@ -10,7 +10,8 @@ MYLIBS= CORE_O= kobject.o ktoken.o kpair.o kstring.o ksymbol.o kread.o \ kwrite.o kstate.o kmem.o kerror.o kauxlib.o kenvironment.o \ kcontinuation.o koperative.o kapplicative.o keval.o krepl.o \ - kground.o kghelpers.o kgbooleans.o kgeqp.o kgequalp.o + kground.o kghelpers.o kgbooleans.o kgeqp.o kgequalp.o \ + kgsymbols.o KRN_T= klisp KRN_O= klisp.o @@ -67,7 +68,7 @@ krepl.o: krepl.c krepl.h kcontinuation.h kstate.h kobject.h keval.h klisp.h \ kread.h kwrite.h kenvironment.h kground.o: kground.c kground.h kstate.h kobject.h klisp.h kenvironment.h \ kpair.h kapplicative.h koperative.h ksymbol.h kerror.h kghelpers.h \ - kgbooleans.h kgeqp.h kgequalp.h + kgbooleans.h kgeqp.h kgequalp.h kgsymbols.h kghelpers.o: kghelpers.c kghelpers.h kstate.h kstate.h klisp.h kpair.h \ kapplicative.h koperative.h kerror.h kobject.h ksymbol.h kgbooleans.o: kgbooleans.c kgbooleans.c kghelpers.h kstate.h klisp.h \ @@ -76,3 +77,5 @@ kgeqp.o: kgeqp.c kgeqp.c kghelpers.h kstate.h klisp.h \ kobject.h kerror.h kpair.h kcontinuation.h kgequalp.o: kgequalp.c kgequalp.c kghelpers.h kstate.h klisp.h \ kobject.h kerror.h kpair.h kcontinuation.h kgeqp.h kstring.h +kgsymbols.o: kgsymbols.c kgsymbols.c kghelpers.h kstate.h klisp.h \ + kobject.h kerror.h kpair.h kcontinuation.h kstring.h diff --git a/src/kghelpers.h b/src/kghelpers.h @@ -126,7 +126,8 @@ #define ST_CDR ((char) 2) /* -** Unmarking structures. +** Unmarking structures. +** MAYBE: These shouldn't be inline really. ** These two stop at the first object that is not a marked pair */ inline void unmark_list(klisp_State *K, TValue obj) @@ -157,6 +158,7 @@ inline void unmark_tree(klisp_State *K, TValue obj) /* ** Structure checking and copying +** MAYBE: These shouldn't be inline really. */ /* check that obj is a list, returns the number of pairs */ diff --git a/src/kground.c b/src/kground.c @@ -34,13 +34,6 @@ /* TODO: split in different files for each module */ /* -** 4.4 Symbols -*/ - -/* 4.4.1 symbol? */ -/* uses typep */ - -/* ** 4.5 Control */ diff --git a/src/kgsymbols.c b/src/kgsymbols.c @@ -0,0 +1,26 @@ +/* +** kgsymbols.c +** Symbol features for the ground environment +** See Copyright Notice in klisp.h +*/ + +#include <assert.h> +#include <stdio.h> +#include <stdlib.h> +#include <stdbool.h> +#include <stdint.h> + +#include "kstate.h" +#include "kobject.h" +#include "klisp.h" +#include "kcontinuation.h" +#include "kpair.h" +#include "kstring.h" +#include "ksymbol.h" +#include "kerror.h" + +#include "kghelpers.h" +#include "kgsymbols.h" + +/* 4.4.1 symbol? */ +/* uses typep */ diff --git a/src/kgsymbols.h b/src/kgsymbols.h @@ -0,0 +1,24 @@ +/* +** kgsymbols.h +** Symbol features for the ground environment +** See Copyright Notice in klisp.h +*/ + +#ifndef kgsymbols_h +#define kgsymbols_h + +#include <assert.h> +#include <stdio.h> +#include <stdlib.h> +#include <stdbool.h> +#include <stdint.h> + +#include "kobject.h" +#include "klisp.h" +#include "kstate.h" +#include "kghelpers.h" + +/* 4.4.1 symbol? */ +/* uses typep */ + +#endif