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