#include <stdio.h>#include <stdlib.h>#include <string.h>#include <ctype.h>#include "lsp.h"Go to the source code of this file.
Defines | |
| #define | ALLOC(X) (pLSP->memory_allocating_function((X),pLSP->pMemorySegment)) |
| #define | FREE(X) (pLSP->memory_releasing_function((X),pLSP->pMemorySegment)) |
| #define | BUFFER (pLSP->buffer) |
| #define | TABPOS (pLSP->tabpos) |
| #define | SCRSIZE (pLSP->scrsize) |
| #define | getnode() (LVAL)malloc(sizeof(struct NODE)) |
| #define | SRC_WIDTH 80 |
| #define | WSPACE "\t \f\r\n" |
| #define | CONST1 "!$%&*-+./0123456789:<=>?@[]^_{}~" |
| #define | CONST2 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" |
| #define | NUMSET "0123456789" |
| #define | NUMSET1 "0123456789-+" |
| #define | numeral1(x) (isinset((x),NUMSET1)) |
| #define | space_p(x) isinset((x),WSPACE) |
| #define | const_p(x) (isinset((x),CONST1)||isinset((x),CONST2)) |
| #define | const_p1(x) ((const_p(x))&&(!numeral1(x))) |
| #define | numeral(x) (isinset((x),NUMSET)) |
| #define | spaceat(x, f) while(space_p(((x)=getC(pLSP,(f))))) |
| #define | StrDup(x) c_StrDup(pLSP,(x)) |
| #define | GETC(x) __GETC((int (*)(void *))getc,(x),pLSP->UngetBuffer,&(pLSP->UngetCounter)) |
| #define | UNGETC(x) __UNGETC(pLSP->UngetBuffer,&(pLSP->UngetCounter),x) |
| #define | SYMBOLLENGTH (pLSP->SymbolLength) |
| #define | CASEFLAG (pLSP->CaseFlag) |
| #define | _pprint(x) __pprint(pLSP,(x),1) |
Functions | |
| static | isinset (int ch, char *string) |
| static char * | c_StrDup (tpLspObject pLSP, char *s) |
| static double | pow10 (double a) |
| static void | cnumeric (char *string, int *whatis, double *dres, long *lres) |
| static int | __GETC (int(*pfGetCharacter)(void *), void *pvInput, int *UngetBuffer, int *UngetCounter) |
| static void | __UNGETC (int *UngetBuffer, int *UngetCounter, int ch) |
| static int | getC (tpLspObject pLSP, FILE *f) |
| static void * | _mya (size_t x, void *y) |
| static void | _myf (void *x, void *y) |
| LVAL | lsp_init (tpLspObject pLSP, int SymLen, int CaseFlg, void *(*memory_allocating_function)(size_t, void *), void(*memory_releasing_function)(void *, void *), void *pMemorySegment) |
| LVAL | c_cons (tpLspObject pLSP) |
| LVAL | c_newnode (tpLspObject pLSP, unsigned char type) |
| LVAL | c_symcmp (tpLspObject pLSP, LVAL p, char *s) |
| LVAL | c_nthsassoc (tpLspObject pLSP, LVAL p, char *s, int n) |
| LVAL | c_freelist (tpLspObject pLSP, LVAL p) |
| int | c_flatc (tpLspObject pLSP, LVAL p) |
| static LVAL | __pprint (tpLspObject pLSP, LVAL p, int k) |
| LVAL | c_pprint (tpLspObject pLSP, LVAL p, FILE *file) |
| static LVAL | readcons (tpLspObject pLSP, FILE *f) |
| static int | storech (tpLspObject pLSP, int i, int ch) |
| static LVAL | _readexpr (tpLspObject pLSP, FILE *f) |
| LVAL | c_readlist (tpLspObject pLSP, FILE *f) |
| LVAL | c_readexpr (tpLspObject pLSP, FILE *f) |
| LVAL | c_skipexpr (tpLspObject pLSP, FILE *f) |
| int | c_llength (tpLspObject pLSP, LVAL p) |
| LVAL | c_nth (tpLspObject pLSP, int n, LVAL p) |
| LVAL | c_nthcdr (tpLspObject pLSP, int n, LVAL p) |
| LVAL | c_char_code (tpLspObject pLSP, LVAL p) |
| LVAL | c_code_char (tpLspObject pLSP, LVAL p) |
| LVAL | c_char_downcase (tpLspObject pLSP, LVAL p) |
| LVAL | c_char_upcase (tpLspObject pLSP, LVAL p) |
| int | c_equal (tpLspObject pLSP, LVAL p, LVAL q) |
| LVAL | c_car (tpLspObject pLSP, LVAL x) |
| LVAL | c_cdr (tpLspObject pLSP, LVAL x) |
| int | c_consp (tpLspObject pLSP, LVAL x) |
| int | c_floatp (tpLspObject pLSP, LVAL x) |
| int | c_integerp (tpLspObject pLSP, LVAL x) |
| int | c_stringp (tpLspObject pLSP, LVAL x) |
| int | c_symbolp (tpLspObject pLSP, LVAL x) |
| int | c_characterp (tpLspObject pLSP, LVAL x) |
| int | c_atom (tpLspObject pLSP, LVAL x) |
Variables | |
| static char | escapers [] = "t\tn\nr\r" |
|
|
Referenced by c_pprint(). |
|
|
|
|
|
Definition at line 165 of file lsp.c. Referenced by _readexpr(), and c_flatc(). |
|
|
Definition at line 316 of file lsp.c. Referenced by c_symcmp(), and lsp_init(). |
|
|
|
|
|
|
|
|
Definition at line 189 of file lsp.c. Referenced by _readexpr(). |
|
|
Definition at line 190 of file lsp.c. Referenced by _readexpr(). |
|
|
|
|
|
|
|
|
Definition at line 180 of file lsp.c. Referenced by c_cons(), and c_newnode(). |
|
|
Definition at line 191 of file lsp.c. Referenced by cnumeric(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 167 of file lsp.c. Referenced by __pprint(), and c_pprint(). |
|
|
|
|
|
Definition at line 192 of file lsp.c. Referenced by _readexpr(), c_readexpr(), c_readlist(), and readcons(). |
|
|
|
|
|
Definition at line 197 of file lsp.c. Referenced by _readexpr(). |
|
|
Definition at line 315 of file lsp.c. Referenced by c_symcmp(), and lsp_init(). |
|
|
Definition at line 166 of file lsp.c. Referenced by __pprint(), and c_pprint(). |
|
|
|
|
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
Definition at line 321 of file lsp.c. References free(). |
|
||||||||||||
|
Definition at line 785 of file lsp.c. References BUFFER, ch, const_p, const_p1, getC(), i, NULL, readcons(), spaceat, storech(), StrDup, and UNGETC. Referenced by c_readexpr(), and c_readlist(). |
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
Definition at line 1077 of file lsp.c. References q. |
|
||||||||||||
|
Definition at line 1119 of file lsp.c. References q. |
|
||||||||||||
|
Definition at line 1141 of file lsp.c. References q. |
|
||||||||||||
|
|
|
||||||||||||
|
Definition at line 1098 of file lsp.c. References q. |
|
|
|
|
||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
Definition at line 500 of file lsp.c. References FREE. |
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||||||
|
Definition at line 1035 of file lsp.c. References q. |
|
||||||||||||||||
|
Definition at line 1056 of file lsp.c. References q. |
|
||||||||||||||||||||
|
Definition at line 473 of file lsp.c. References fp. |
|
||||||||||||||||
|
|
|
||||||||||||
|
Definition at line 974 of file lsp.c. References _readexpr(), ch, spaceat, and UNGETC. |
|
||||||||||||
|
Definition at line 943 of file lsp.c. References _readexpr(), ch, q, spaceat, and UNGETC. |
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||||||
|
Definition at line 439 of file lsp.c. References CASEFLAG, i, SYMBOLLENGTH, and w. |
|
||||||||||||||||||||
|
|
|
||||||||||||
|
Definition at line 305 of file lsp.c. Referenced by _readexpr(). |
|
||||||||||||
|
|
|
||||||||||||||||||||||||||||
|
Definition at line 329 of file lsp.c. References _mya(), _myf(), CASEFLAG, NULL, and SYMBOLLENGTH. Referenced by cft_ReadTextConfig(). |
|
|
|
|
||||||||||||
|
Definition at line 752 of file lsp.c. References ch, spaceat, and UNGETC. Referenced by _readexpr(). |
|
||||||||||||||||
|
Definition at line 765 of file lsp.c. References ALLOC, FREE, memcpy(), and NULL. Referenced by _readexpr(). |
|
|
|
1.4.6-NO