broken code, but added attempt at writing grammar
This commit is contained in:
parent
fb95e5d026
commit
20e3757f44
18 changed files with 1145 additions and 142 deletions
|
@ -1,28 +1,31 @@
|
|||
#ifndef _SPHO_CTX_H
|
||||
#define _SPHO_CTX_H
|
||||
|
||||
#include "spho/data.h"
|
||||
#include "spho/err.h"
|
||||
#include "spho/scope.h"
|
||||
|
||||
#define SPHO_ERR_BUF_LEN 2048
|
||||
#define SPHO_ERR_FILEBUF_LEN 128
|
||||
|
||||
struct spho_ctx {
|
||||
struct spho_scope glob;
|
||||
|
||||
int err;
|
||||
int err_info;
|
||||
|
||||
struct spho_nom_l noms;
|
||||
struct spho_const_l cnsts;
|
||||
char errbuf[SPHO_ERR_BUF_LEN];
|
||||
|
||||
#ifdef SPHO_DEBUG
|
||||
char filebuf[SPHO_ERR_FILEBUF_LEN];
|
||||
int errline;
|
||||
#else
|
||||
char errbuf[SPHO_ERR_BUF_LEN];
|
||||
char filebuf[SPHO_ERR_FILEBUF_LEN];
|
||||
int errline;
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
struct spho_ctx *spho_ctx_create(void);
|
||||
void spho_ctx_destroy(struct spho_ctx *);
|
||||
const char *spho_ctx_strerror(struct spho_ctx *);
|
||||
|
||||
|
||||
struct spho_nom *spho_nom_add(struct spho_ctx *, char *, size_t);
|
||||
struct spho_nom *spho_nom_get(struct spho_ctx *, char *, size_t);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue