Make the main compiler call the preprocessor.

By using a single function, the main compiler doesn't need to include
glcpp.h, which currently has a lot of details about the preprocessor
internals.  In particular, this prevents the two yacc grammars from
seeing each other, which would be rather messy to sort out.
This commit is contained in:
Kenneth Graunke
2010-06-16 12:18:00 -07:00
parent 2848c4c183
commit 04ba86a536
4 changed files with 60 additions and 3 deletions

View File

@@ -101,6 +101,10 @@ extern void _mesa_glsl_warning(const YYLTYPE *locp,
_mesa_glsl_parse_state *state,
const char *fmt, ...);
extern "C" {
extern int preprocess(void *ctx, const char **shader, size_t *shader_len);
}
extern void _mesa_glsl_lexer_ctor(struct _mesa_glsl_parse_state *state,
const char *string, size_t len);