#ifndef LEXER_H
#define LEXER_H
-/*
- * The PyObject Token. Likely to be
- * a bb.data implementation
- */
-struct PyObject;
-
-
-/**
- * This is used by the Parser and Scanner
- * of BitBake.
- * The implementation and creation is done
- * in the scanner.
- */
+#include "Python.h"
+
+extern "C" {
+
struct lex_t {
- void *parser;
- void *scanner;
- FILE *file;
+ void* parser;
+ void* scanner;
+ FILE* file;
+ char *name;
PyObject *data;
+ int config;
+
void* (*parse)(void*, int, token_t, lex_t*);
- void accept(int token, const char* string = 0);
+ void accept(int token, const char* sz = NULL);
void input(char *buf, int *result, int max_size);
int line()const;
};
+}
#endif