extern.h 1.01 KB
Newer Older
Marc G. Fournier's avatar
Marc G. Fournier committed
1
#include "parser/keywords.h"
2
#include <errno.h>
Marc G. Fournier's avatar
Marc G. Fournier committed
3

Marc G. Fournier's avatar
Marc G. Fournier committed
4 5
/* variables */

6
extern int  braces_open;
7 8 9 10 11
extern char *yytext;
extern int	yylineno,
			yyleng;
extern FILE *yyin,
		   *yyout;
Marc G. Fournier's avatar
Marc G. Fournier committed
12

13 14 15 16 17
struct _include_path {  char * path;
                        struct _include_path * next;
                     };

extern struct _include_path *include_paths;
Marc G. Fournier's avatar
Marc G. Fournier committed
18

19 20 21 22 23 24 25 26 27 28 29 30
/* This is a linked list of the variable names and types. */
struct variable
{
    char * name;
    struct ECPGtype * type;
    int brace_level;
    struct variable * next;
};
                
extern struct ECPGtype ecpg_no_indicator;
extern struct variable no_indicator;

Marc G. Fournier's avatar
Marc G. Fournier committed
31 32 33
/* functions */

extern void lex_init(void);
34 35
extern char *input_filename;
extern int	yyparse(void);
36
extern void *mm_alloc(size_t), *mm_realloc(void *, size_t);
Marc G. Fournier's avatar
Marc G. Fournier committed
37 38 39
ScanKeyword * ScanECPGKeywordLookup(char *);
ScanKeyword * ScanCKeywordLookup(char *);
extern void yyerror(char *);
40 41 42 43

/* return codes */

#define OK		0
44 45 46 47 48
#define PARSE_ERROR	-1
#define ILLEGAL_OPTION	-2

#define NO_INCLUDE_FILE	ENOENT
#define OUT_OF_MEMORY	ENOMEM