00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00030 #ifndef _PDL_H
00031 #define _PDL_H
00032
00033 #include <stdio.h>
00034
00041 #undef TRUE
00042 #undef FALSE
00043 #undef BOOL
00044 #define TRUE 1
00045 #define FALSE (!TRUE)
00046 typedef char BOOL;
00047
00048
00052 typedef enum {
00053 PDL_UNKNOWN,
00054 PDL_INFO,
00055 PDL_WARNING,
00056 PDL_ERROR,
00057 PDL_SAME
00058
00059 } pdl_error_t;
00060
00061
00065 typedef enum {
00066 EVALUATION_START,
00067 EVALUATION_SUCCESS,
00068 EVALUATION_FAILURE
00069 } plugin_status_t;
00070
00071
00083 typedef struct record_s {
00084 char* string;
00085 int lineno;
00086 } record_t;
00087
00088
00094 typedef struct plugin_s {
00095 char* name;
00096 char* args;
00097 unsigned int lineno;
00098 struct plugin_s* next;
00099 } plugin_t;
00100
00101
00102 extern FILE* yyin;
00103 extern unsigned int lineno;
00104
00105 extern int pdl_init(const char* name);
00106 extern const char *pdl_path(void);
00107 extern int yyparse_errors(void);
00108
00109 extern int yyparse(void);
00110 extern int yylex(void);
00111 extern int yyerror(const char*);
00112 extern const char* token_name(void);
00113 extern void set_yylval(record_t* r);
00114
00115 extern const char* pdl_next_plugin(plugin_status_t status);
00116 extern void set_path(record_t* _path);
00117 extern record_t* concat_strings(record_t* s1, record_t* s2);
00118 extern const plugin_t* get_plugins(void);
00119 extern void warning(pdl_error_t error, const char* s, ...);
00120
00121 #ifdef HAVE_FLEX
00122 extern void delete_lex_buffer(void);
00123 #endif
00124
00125 #endif