00001 #pragma once
00002 #ifndef _SEXP_PARSE_H
00003 #define _SEXP_PARSE_H
00004
00005 #include <stddef.h>
00006 #include <stdint.h>
00007 #include "public/sexp-parse.h"
00008 #include "_sexp-manip.h"
00009
00010
00011 #define NUMCLASS_INV 0
00012 #define NUMCLASS_INT 1
00013 #define NUMCLASS_FLT 2
00014 #define NUMCLASS_FRA 3
00015 #define NUMCLASS_EXP 4
00016
00017 typedef uint8_t SEXP_pflags_t;
00018
00019 #define PF_EOFOK 0x01
00020 #define PF_ALL 0xff
00021
00022
00023 struct SEXP_pstate {
00024 char *buffer;
00025 size_t buffer_data_len;
00026 size_t buffer_fail_off;
00027
00028 SEXP_pflags_t pflags;
00029
00030 SEXP_t *p_list;
00031 size_t l_size;
00032 size_t l_real;
00033 SEXP_t **l_sref;
00034 };
00035
00036 struct SEXP_psetup {
00037 SEXP_format_t fmt;
00038 SEXP_pflags_t pflags;
00039 };
00040
00041 void SEXP_psetup_init (SEXP_psetup_t *psetup);
00042
00043 struct SEXP_pext_dsc {
00044 SEXP_t *s_exp;
00045 const char *t_beg;
00046 size_t t_len;
00047 size_t b_len;
00048 uint8_t flags;
00049 };
00050
00051 #define SEXP_EXT_SUCCESS 0
00052 #define SEXP_EXT_EUNFIN 1
00053 #define SEXP_EXT_EINVAL 2
00054
00055 #endif