Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

lispreader.hxx File Reference

#include <stdio.h>

Include dependency graph for lispreader.hxx:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Compounds

struct  _lisp_object_t
struct  lisp_stream_t

Defines

#define LISP_STREAM_FILE   1
#define LISP_STREAM_STRING   2
#define LISP_STREAM_ANY   3
#define LISP_TYPE_INTERNAL   -3
#define LISP_TYPE_PARSE_ERROR   -2
#define LISP_TYPE_EOF   -1
#define LISP_TYPE_NIL   0
#define LISP_TYPE_SYMBOL   1
#define LISP_TYPE_INTEGER   2
#define LISP_TYPE_STRING   3
#define LISP_TYPE_REAL   4
#define LISP_TYPE_CONS   5
#define LISP_TYPE_PATTERN_CONS   6
#define LISP_TYPE_BOOLEAN   7
#define LISP_TYPE_PATTERN_VAR   8
#define LISP_PATTERN_ANY   1
#define LISP_PATTERN_SYMBOL   2
#define LISP_PATTERN_STRING   3
#define LISP_PATTERN_INTEGER   4
#define LISP_PATTERN_REAL   5
#define LISP_PATTERN_BOOLEAN   6
#define LISP_PATTERN_LIST   7
#define LISP_PATTERN_OR   8
#define lisp_nil()   ((lisp_object_t*)0)
#define lisp_nil_p(obj)   (obj == 0)
#define lisp_integer_p(obj)   (lisp_type((obj)) == LISP_TYPE_INTEGER)
#define lisp_real_p(obj)   (lisp_type((obj)) == LISP_TYPE_REAL)
#define lisp_symbol_p(obj)   (lisp_type((obj)) == LISP_TYPE_SYMBOL)
#define lisp_string_p(obj)   (lisp_type((obj)) == LISP_TYPE_STRING)
#define lisp_cons_p(obj)   (lisp_type((obj)) == LISP_TYPE_CONS)
#define lisp_boolean_p(obj)   (lisp_type((obj)) == LISP_TYPE_BOOLEAN)

Typedefs

typedef _lisp_object_t lisp_object_t

Functions

lisp_stream_tlisp_stream_init_file (lisp_stream_t *stream, FILE *file)
lisp_stream_tlisp_stream_init_string (lisp_stream_t *stream, char *buf)
lisp_stream_tlisp_stream_init_any (lisp_stream_t *stream, void *data, int(*next_char)(void *data), void(*unget_char)(char c, void *data))
lisp_object_tlisp_read (lisp_stream_t *in)
void lisp_free (lisp_object_t *obj)
lisp_object_tlisp_read_from_string (const char *buf)
int lisp_compile_pattern (lisp_object_t **obj, int *num_subs)
int lisp_match_pattern (lisp_object_t *pattern, lisp_object_t *obj, lisp_object_t **vars, int num_subs)
int lisp_match_string (const char *pattern_string, lisp_object_t *obj, lisp_object_t **vars)
int lisp_type (lisp_object_t *obj)
int lisp_integer (lisp_object_t *obj)
float lisp_real (lisp_object_t *obj)
char * lisp_symbol (lisp_object_t *obj)
char * lisp_string (lisp_object_t *obj)
int lisp_boolean (lisp_object_t *obj)
lisp_object_tlisp_car (lisp_object_t *obj)
lisp_object_tlisp_cdr (lisp_object_t *obj)
lisp_object_tlisp_cxr (lisp_object_t *obj, const char *x)
lisp_object_tlisp_make_integer (int value)
lisp_object_tlisp_make_real (float value)
lisp_object_tlisp_make_symbol (const char *value)
lisp_object_tlisp_make_string (const char *value)
lisp_object_tlisp_make_cons (lisp_object_t *car, lisp_object_t *cdr)
lisp_object_tlisp_make_boolean (int value)
int lisp_list_length (lisp_object_t *obj)
lisp_object_tlisp_list_nth_cdr (lisp_object_t *obj, int index)
lisp_object_tlisp_list_nth (lisp_object_t *obj, int index)
void lisp_dump (lisp_object_t *obj, FILE *out)


Define Documentation

#define lisp_boolean_p obj       (lisp_type((obj)) == LISP_TYPE_BOOLEAN)
 

Definition at line 148 of file lispreader.hxx.

#define lisp_cons_p obj       (lisp_type((obj)) == LISP_TYPE_CONS)
 

Definition at line 147 of file lispreader.hxx.

#define lisp_integer_p obj       (lisp_type((obj)) == LISP_TYPE_INTEGER)
 

Definition at line 143 of file lispreader.hxx.

 
#define lisp_nil      ((lisp_object_t*)0)
 

Definition at line 140 of file lispreader.hxx.

Referenced by LispWriter::create_lisp(), and lisp_read().

#define lisp_nil_p obj       (obj == 0)
 

Definition at line 142 of file lispreader.hxx.

Referenced by lisp_read(), and ParticleFactory::ParticleFactory().

#define LISP_PATTERN_ANY   1
 

Definition at line 45 of file lispreader.hxx.

#define LISP_PATTERN_BOOLEAN   6
 

Definition at line 50 of file lispreader.hxx.

#define LISP_PATTERN_INTEGER   4
 

Definition at line 48 of file lispreader.hxx.

#define LISP_PATTERN_LIST   7
 

Definition at line 51 of file lispreader.hxx.

#define LISP_PATTERN_OR   8
 

Definition at line 52 of file lispreader.hxx.

#define LISP_PATTERN_REAL   5
 

Definition at line 49 of file lispreader.hxx.

#define LISP_PATTERN_STRING   3
 

Definition at line 47 of file lispreader.hxx.

#define LISP_PATTERN_SYMBOL   2
 

Definition at line 46 of file lispreader.hxx.

#define lisp_real_p obj       (lisp_type((obj)) == LISP_TYPE_REAL)
 

Definition at line 144 of file lispreader.hxx.

#define LISP_STREAM_ANY   3
 

Definition at line 30 of file lispreader.hxx.

Referenced by lisp_stream_init_any().

#define LISP_STREAM_FILE   1
 

Definition at line 28 of file lispreader.hxx.

Referenced by lisp_stream_init_file().

#define LISP_STREAM_STRING   2
 

Definition at line 29 of file lispreader.hxx.

Referenced by lisp_stream_init_string().

#define lisp_string_p obj       (lisp_type((obj)) == LISP_TYPE_STRING)
 

Definition at line 146 of file lispreader.hxx.

#define lisp_symbol_p obj       (lisp_type((obj)) == LISP_TYPE_SYMBOL)
 

Definition at line 145 of file lispreader.hxx.

Referenced by World::World().

#define LISP_TYPE_BOOLEAN   7
 

Definition at line 42 of file lispreader.hxx.

Referenced by lisp_dump().

#define LISP_TYPE_CONS   5
 

Definition at line 40 of file lispreader.hxx.

Referenced by lisp_car(), lisp_dump(), and lisp_free().

#define LISP_TYPE_EOF   -1
 

Definition at line 34 of file lispreader.hxx.

Referenced by lisp_dump(), lisp_free(), and World::World().

#define LISP_TYPE_INTEGER   2
 

Definition at line 37 of file lispreader.hxx.

Referenced by lisp_dump(), and lisp_real().

#define LISP_TYPE_INTERNAL   -3
 

Definition at line 32 of file lispreader.hxx.

Referenced by lisp_free().

#define LISP_TYPE_NIL   0
 

Definition at line 35 of file lispreader.hxx.

Referenced by lisp_type().

#define LISP_TYPE_PARSE_ERROR   -2
 

Definition at line 33 of file lispreader.hxx.

Referenced by lisp_dump(), lisp_free(), and World::World().

#define LISP_TYPE_PATTERN_CONS   6
 

Definition at line 41 of file lispreader.hxx.

Referenced by lisp_car(), lisp_dump(), and lisp_free().

#define LISP_TYPE_PATTERN_VAR   8
 

Definition at line 43 of file lispreader.hxx.

Referenced by lisp_free().

#define LISP_TYPE_REAL   4
 

Definition at line 39 of file lispreader.hxx.

Referenced by lisp_dump().

#define LISP_TYPE_STRING   3
 

Definition at line 38 of file lispreader.hxx.

Referenced by lisp_dump(), lisp_free(), and lisp_string().

#define LISP_TYPE_SYMBOL   1
 

Definition at line 36 of file lispreader.hxx.

Referenced by lisp_dump(), and lisp_free().


Typedef Documentation

typedef struct _lisp_object_t lisp_object_t
 

Definition at line 75 of file lispreader.hxx.


Function Documentation

int lisp_boolean lisp_object_t   obj
 

Definition at line 557 of file lispreader.cxx.

References _lisp_object_t::type, and _lisp_object_t::v.

Referenced by lisp_dump(), and LispReader::read_bool().

lisp_object_t* lisp_car lisp_object_t   obj
 

Definition at line 575 of file lispreader.cxx.

References LISP_TYPE_CONS, LISP_TYPE_PATTERN_CONS, ConstruoError::raise(), _lisp_object_t::type, and _lisp_object_t::v.

Referenced by lisp_cxr(), lisp_dump(), ParticleFactory::ParticleFactory(), LispReader::read_bool(), LispReader::read_float(), LispReader::read_int(), LispReader::read_vector(), and World::World().

lisp_object_t* lisp_cdr lisp_object_t   obj
 

Definition at line 584 of file lispreader.cxx.

References _lisp_object_t::type, and _lisp_object_t::v.

Referenced by lisp_cxr(), lisp_dump(), ParticleFactory::ParticleFactory(), LispReader::read_vector(), Spring::Spring(), and World::World().

int lisp_compile_pattern lisp_object_t **    obj,
int *    num_subs
 

lisp_object_t* lisp_cxr lisp_object_t   obj,
const char *    x
 

Definition at line 592 of file lispreader.cxx.

References lisp_car(), and lisp_cdr().

void lisp_dump lisp_object_t   obj,
FILE *    out
 

Definition at line 649 of file lispreader.cxx.

References lisp_boolean(), lisp_car(), lisp_cdr(), lisp_integer(), lisp_real(), lisp_string(), lisp_symbol(), lisp_type(), LISP_TYPE_BOOLEAN, LISP_TYPE_CONS, LISP_TYPE_EOF, LISP_TYPE_INTEGER, LISP_TYPE_PARSE_ERROR, LISP_TYPE_PATTERN_CONS, LISP_TYPE_REAL, LISP_TYPE_STRING, and LISP_TYPE_SYMBOL.

Referenced by World::write_lisp(), and ParticleFactory::write_lisp().

void lisp_free lisp_object_t   obj
 

Definition at line 483 of file lispreader.cxx.

References LISP_TYPE_CONS, LISP_TYPE_EOF, LISP_TYPE_INTERNAL, LISP_TYPE_PARSE_ERROR, LISP_TYPE_PATTERN_CONS, LISP_TYPE_PATTERN_VAR, LISP_TYPE_STRING, LISP_TYPE_SYMBOL, _lisp_object_t::type, and _lisp_object_t::v.

Referenced by lisp_read(), World::World(), World::write_lisp(), and ParticleFactory::write_lisp().

int lisp_integer lisp_object_t   obj
 

Definition at line 532 of file lispreader.cxx.

References _lisp_object_t::type, and _lisp_object_t::v.

Referenced by lisp_dump(), and LispReader::read_int().

int lisp_list_length lisp_object_t   obj
 

Definition at line 608 of file lispreader.cxx.

References _lisp_object_t::type, and _lisp_object_t::v.

lisp_object_t* lisp_list_nth lisp_object_t   obj,
int    index
 

Definition at line 639 of file lispreader.cxx.

References lisp_list_nth_cdr(), and _lisp_object_t::v.

lisp_object_t* lisp_list_nth_cdr lisp_object_t   obj,
int    index
 

Definition at line 624 of file lispreader.cxx.

References _lisp_object_t::type, and _lisp_object_t::v.

Referenced by lisp_list_nth().

lisp_object_t* lisp_make_boolean int    value
 

Definition at line 365 of file lispreader.cxx.

References _lisp_object_t::v.

Referenced by lisp_read(), and LispWriter::write_boolean().

lisp_object_t* lisp_make_cons lisp_object_t   car,
lisp_object_t   cdr
 

Definition at line 354 of file lispreader.cxx.

References _lisp_object_t::v.

Referenced by LispWriter::create_lisp(), and lisp_read().

lisp_object_t* lisp_make_integer int    value
 

Definition at line 314 of file lispreader.cxx.

References _lisp_object_t::v.

Referenced by lisp_read(), and LispWriter::write_int().

lisp_object_t* lisp_make_real float    value
 

Definition at line 324 of file lispreader.cxx.

References _lisp_object_t::v.

Referenced by lisp_read(), LispWriter::write_float(), and LispWriter::write_vector().

lisp_object_t* lisp_make_string const char *    value
 

Definition at line 344 of file lispreader.cxx.

References _lisp_object_t::v.

Referenced by lisp_read(), and LispWriter::write_string().

lisp_object_t* lisp_make_symbol const char *    value
 

Definition at line 334 of file lispreader.cxx.

References _lisp_object_t::v.

Referenced by lisp_read(), and LispWriter::write_symbol().

int lisp_match_pattern lisp_object_t   pattern,
lisp_object_t   obj,
lisp_object_t **    vars,
int    num_subs
 

int lisp_match_string const char *    pattern_string,
lisp_object_t   obj,
lisp_object_t **    vars
 

lisp_object_t* lisp_read lisp_stream_t   in
 

Definition at line 386 of file lispreader.cxx.

References lisp_free(), lisp_make_boolean(), lisp_make_cons(), lisp_make_integer(), lisp_make_real(), lisp_make_string(), lisp_make_symbol(), lisp_nil, lisp_nil_p, TOKEN_CLOSE_PAREN, TOKEN_DOT, TOKEN_EOF, TOKEN_ERROR, TOKEN_FALSE, TOKEN_INTEGER, TOKEN_OPEN_PAREN, TOKEN_PATTERN_OPEN_PAREN, TOKEN_REAL, TOKEN_STRING, TOKEN_SYMBOL, TOKEN_TRUE, and _lisp_object_t::v.

Referenced by lisp_read_from_string(), and World::World().

lisp_object_t* lisp_read_from_string const char *    buf
 

Definition at line 515 of file lispreader.cxx.

References lisp_read(), and lisp_stream_init_string().

float lisp_real lisp_object_t   obj
 

Definition at line 565 of file lispreader.cxx.

References LISP_TYPE_INTEGER, _lisp_object_t::type, and _lisp_object_t::v.

Referenced by lisp_dump(), LispReader::read_float(), and LispReader::read_vector().

lisp_stream_t* lisp_stream_init_any lisp_stream_t   stream,
void *    data,
int(*    next_char)(void *data),
void(*    unget_char)(char c, void *data)
 

Definition at line 299 of file lispreader.cxx.

References LISP_STREAM_ANY, lisp_stream_t::type, and lisp_stream_t::v.

lisp_stream_t* lisp_stream_init_file lisp_stream_t   stream,
FILE *    file
 

Definition at line 280 of file lispreader.cxx.

References LISP_STREAM_FILE, lisp_stream_t::type, and lisp_stream_t::v.

Referenced by World::World().

lisp_stream_t* lisp_stream_init_string lisp_stream_t   stream,
char *    buf
 

Definition at line 289 of file lispreader.cxx.

References LISP_STREAM_STRING, lisp_stream_t::type, and lisp_stream_t::v.

Referenced by lisp_read_from_string(), and World::World().

char* lisp_string lisp_object_t   obj
 

Definition at line 548 of file lispreader.cxx.

References LISP_TYPE_STRING, ConstruoError::raise(), _lisp_object_t::type, and _lisp_object_t::v.

Referenced by lisp_dump().

char* lisp_symbol lisp_object_t   obj
 

Definition at line 540 of file lispreader.cxx.

References _lisp_object_t::type, and _lisp_object_t::v.

Referenced by lisp_dump(), and World::World().

int lisp_type lisp_object_t   obj
 

Definition at line 524 of file lispreader.cxx.

References LISP_TYPE_NIL, and _lisp_object_t::type.

Referenced by lisp_dump().


Generated on Thu Jul 24 10:24:52 2003 for Construo by doxygen1.3-rc3

Rabisu Mirror Service We provide mirrors to support Open source communities. Our mirror server is located in Istanbul/Turkey region.

Please do not hesitate to contact mirror@rabisu.com for new open source mirror submissions.