00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #pragma once
00024 #ifndef SEXP_PARSE_H
00025 #define SEXP_PARSE_H
00026
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif
00030
00031 #include <stddef.h>
00032 #include <seap-debug.h>
00033 #include <sexp-types.h>
00034
00035 typedef struct SEXP_psetup SEXP_psetup_t;
00036
00037 SEXP_psetup_t *SEXP_psetup_new (void);
00038 void SEXP_psetup_free (SEXP_psetup_t *);
00039
00040 typedef uint8_t SEXP_pflags_t;
00041
00042 #define SEXP_PFLAG_EOFOK 0x01
00043 #define SEXP_PFLAG_FREEBUF 0x02
00044 #define SEXP_PFLAG_ALL 0x03
00045
00046 int SEXP_psetup_setflags (SEXP_psetup_t *psetup, SEXP_pflags_t flags);
00047 int SEXP_psetup_unsetflags (SEXP_psetup_t *psetup, SEXP_pflags_t flags);
00048
00049 typedef struct SEXP_pstate SEXP_pstate_t;
00050
00051 SEXP_pstate_t *SEXP_pstate_new (void);
00052 void SEXP_pstate_free (SEXP_pstate_t *);
00053 SEXP_pstate_t *SEXP_pstate_init (SEXP_pstate_t *);
00054
00055 SEXP_t *SEXP_parse (const SEXP_psetup_t *psetup, char *buffer, size_t buflen, SEXP_pstate_t **pstate);
00056
00057 bool SEXP_pstate_errorp(SEXP_pstate_t *pstate);
00058
00059 #ifdef __cplusplus
00060 }
00061 #endif
00062
00063 #endif