00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00037 #ifndef _PDL_H
00038 #define _PDL_H
00039 
00040 #include <stdio.h>
00041 
00048 #undef TRUE
00049 #undef FALSE
00050 #undef BOOL
00051 #define TRUE 1
00052 #define FALSE (!TRUE)
00053 typedef char BOOL;
00054 
00055 
00059 typedef enum {
00060   PDL_UNKNOWN,  
00061   PDL_INFO,     
00062   PDL_WARNING,  
00063   PDL_ERROR,    
00064   PDL_SAME      
00065   
00066 } pdl_error_t;
00067 
00068 
00072 typedef enum {
00073   EVALUATION_START,        
00074   EVALUATION_SUCCESS,      
00075   EVALUATION_FAILURE       
00076 } plugin_status_t;
00077 
00078 
00090 typedef struct record_s {
00091   char* string;   
00092   int   lineno;   
00093 } record_t;
00094 
00095 
00101 typedef struct plugin_s {
00102   char* name;             
00103   char* args;             
00104   unsigned int lineno;    
00105   struct plugin_s* next;  
00106 } plugin_t;
00107 
00108 
00109 extern FILE* yyin;
00110 extern unsigned int lineno;
00111 
00112 extern int pdl_init(const char* name);
00113 extern const char *pdl_path(void);
00114 extern int yyparse_errors(void);
00115 
00116 extern int yyparse(void);
00117 extern int yylex(void);
00118 extern int yyerror(const char*);
00119 extern const char* token_name(void);
00120 extern void set_yylval(record_t* r);
00121 
00122 extern void set_path(record_t* _path);
00123 extern record_t* concat_strings(record_t* s1, record_t* s2);
00124 extern record_t* concat_strings_with_space(record_t* s1, record_t* s2);
00125 extern const plugin_t* get_plugins(void);
00126 extern void warning(pdl_error_t error, const char* s, ...);
00127 extern void free_resources(void);
00128 
00129 extern const char* pdl_next_plugin(plugin_status_t status);
00130 
00131 #ifdef HAVE_FLEX
00132 extern void delete_lex_buffer(void);
00133 #endif
00134 
00135 #endif