Mercurial > hg > index.cgi
comparison lwcc/cpp.h @ 306:b08787e5b9f3 ccdev
Add include search paths and command line macro definitions
Added command line macro definitions. Also implemented include paths. There
is no default include path; that will be supplied by the driver program.
author | William Astle <lost@l-w.ca> |
---|---|
date | Wed, 18 Sep 2013 20:41:41 -0600 |
parents | d85d173ba120 |
children | 670ea8f90212 |
comparison
equal
deleted
inserted
replaced
305:54f213c8fb81 | 306:b08787e5b9f3 |
---|---|
21 | 21 |
22 #ifndef cpp_h_seen___ | 22 #ifndef cpp_h_seen___ |
23 #define cpp_h_seen___ | 23 #define cpp_h_seen___ |
24 | 24 |
25 #include <stdio.h> | 25 #include <stdio.h> |
26 | |
27 #include <lw_stringlist.h> | |
26 | 28 |
27 //#include "symbol.h" | 29 //#include "symbol.h" |
28 #include "token.h" | 30 #include "token.h" |
29 | 31 |
30 #define TOKBUFSIZE 32 | 32 #define TOKBUFSIZE 32 |
66 char *lexstr; // for lexing a string (token pasting) | 68 char *lexstr; // for lexing a string (token pasting) |
67 int lexstrloc; // ditto | 69 int lexstrloc; // ditto |
68 struct preproc_info *n; // next in file stack | 70 struct preproc_info *n; // next in file stack |
69 struct preproc_info *filestack; // stack of saved files during include | 71 struct preproc_info *filestack; // stack of saved files during include |
70 struct strpool *strpool; | 72 struct strpool *strpool; |
73 lw_stringlist_t quotelist; | |
74 lw_stringlist_t inclist; | |
71 }; | 75 }; |
72 | 76 |
73 extern struct preproc_info *preproc_init(const char *); | 77 extern struct preproc_info *preproc_init(const char *); |
74 extern struct token *preproc_next_token(struct preproc_info *); | 78 extern struct token *preproc_next_token(struct preproc_info *); |
75 extern struct token *preproc_next_processed_token(struct preproc_info *); | 79 extern struct token *preproc_next_processed_token(struct preproc_info *); |
77 extern void preproc_register_error_callback(struct preproc_info *, void (*)(const char *)); | 81 extern void preproc_register_error_callback(struct preproc_info *, void (*)(const char *)); |
78 extern void preproc_register_warning_callback(struct preproc_info *, void (*)(const char *)); | 82 extern void preproc_register_warning_callback(struct preproc_info *, void (*)(const char *)); |
79 extern void preproc_throw_error(struct preproc_info *, const char *, ...); | 83 extern void preproc_throw_error(struct preproc_info *, const char *, ...); |
80 extern void preproc_throw_warning(struct preproc_info *, const char *, ...); | 84 extern void preproc_throw_warning(struct preproc_info *, const char *, ...); |
81 extern void preproc_unget_token(struct preproc_info *, struct token *); | 85 extern void preproc_unget_token(struct preproc_info *, struct token *); |
86 extern void preproc_add_include(struct preproc_info *, char *, int); | |
87 extern void preproc_add_macro(struct preproc_info *, char *); | |
82 extern struct token *preproc_next(struct preproc_info *); | 88 extern struct token *preproc_next(struct preproc_info *); |
83 | 89 |
84 #endif // cpp_h_seen___ | 90 #endif // cpp_h_seen___ |