[d636ad] | 1 | #ifndef LIBPARSE_H |
---|
| 2 | #define LIBPARSE_H |
---|
| 3 | /**************************************** |
---|
| 4 | * Computer Algebra System SINGULAR * |
---|
| 5 | ****************************************/ |
---|
[f51b9c] | 6 | /* $Id: libparse.h,v 1.15 2003-12-16 11:25:34 Singular Exp $ */ |
---|
[d636ad] | 7 | /* |
---|
| 8 | * ABSTRACT: lib parsing |
---|
| 9 | */ |
---|
[c2da0a] | 10 | #ifndef STANDALONE_PARSER |
---|
[f51b9c] | 11 | # include "structs.h" |
---|
[c2da0a] | 12 | # include "subexpr.h" |
---|
| 13 | #endif |
---|
[5480da] | 14 | typedef enum { LOAD_LIB, GET_INFO } lp_modes; |
---|
| 15 | typedef enum { OLD_LIBSTYLE, NEW_LIBSTYLE } lib_style_types; |
---|
| 16 | |
---|
[d636ad] | 17 | procinfo *iiInitSingularProcinfo(procinfov pi, char *libname, |
---|
| 18 | char *procname, int line, long pos, |
---|
[a3bc95e] | 19 | BOOLEAN pstatic = FALSE); |
---|
| 20 | #ifdef HAVE_NS |
---|
[e9ad8a6] | 21 | int yylplex(char *libname, char *libfile, lib_style_types *lib_style, |
---|
[a3bc95e] | 22 | idhdl pl, BOOLEAN autoexport=FALSE, lp_modes=LOAD_LIB); |
---|
| 23 | #else |
---|
| 24 | int yylplex(char *libname, char *libfile, lib_style_types *lib_style, |
---|
| 25 | lp_modes=LOAD_LIB); |
---|
| 26 | #endif /* HAVE_NS */ |
---|
[46d09b] | 27 | |
---|
[5480da] | 28 | void reinit_yylp(); |
---|
| 29 | |
---|
| 30 | extern char * text_buffer; |
---|
| 31 | |
---|
[60a3add] | 32 | # define YYLP_ERR_NONE 0 |
---|
| 33 | # define YYLP_DEF_BR2 1 |
---|
| 34 | # define YYLP_BODY_BR2 2 |
---|
| 35 | # define YYLP_BODY_BR3 3 |
---|
| 36 | # define YYLP_BODY_TMBR2 4 |
---|
| 37 | # define YYLP_BODY_TMBR3 5 |
---|
| 38 | # define YYLP_EX_BR2 6 |
---|
| 39 | # define YYLP_EX_BR3 7 |
---|
| 40 | # define YYLP_BAD_CHAR 8 |
---|
| 41 | # define YYLP_MISSQUOT 9 |
---|
| 42 | # define YYLP_MISS_BR1 10 |
---|
| 43 | # define YYLP_MISS_BR2 11 |
---|
| 44 | # define YYLP_MISS_BR3 12 |
---|
| 45 | |
---|
| 46 | # ifdef STANDALONE_PARSER |
---|
[a70441f] | 47 | #ifndef unix |
---|
| 48 | extern FILE* myfopen(char *path, char *mode); |
---|
| 49 | extern size_t myfread(void *ptr, size_t size, size_t nmemb, FILE *stream); |
---|
| 50 | #else |
---|
| 51 | #define myfopen fopen |
---|
| 52 | #define myfread fread |
---|
| 53 | #endif |
---|
[60a3add] | 54 | # endif |
---|
[c1e2b1] | 55 | |
---|
[e9ad8a6] | 56 | #endif /* LIBPARSE_H */ |
---|
[d636ad] | 57 | |
---|
| 58 | |
---|