From d684e944c444d0406c26e7b5c2e1573c62a34afd Mon Sep 17 00:00:00 2001 From: Josef 'Jeff' Sipek Date: Fri, 25 Nov 2011 23:17:09 -0500 Subject: [PATCH] cp/include: a generic parser state control block From: Josef 'Jeff' Sipek Signed-off-by: Josef 'Jeff' Sipek --- cp/include/parser.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 cp/include/parser.h diff --git a/cp/include/parser.h b/cp/include/parser.h new file mode 100644 index 0000000..95f9c09 --- /dev/null +++ b/cp/include/parser.h @@ -0,0 +1,16 @@ +#ifndef __PARSER_H +#define __PARSER_H + +struct parser { + /* memory related function for stack management */ + void*(*malloc)(size_t); + void*(*realloc)(void*, size_t); + void(*free)(void*); + + void(*error)(struct parser *, char*); + + int(*lex)(void *, void *); + void *lex_data; +}; + +#endif -- 2.11.4.GIT