From 4169a47bd9daba2eb03d6c435722f1bb0bb6f52c Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Wed, 12 Sep 2007 01:29:43 +0000 Subject: Use a perfect hash to look up preprocessor directives Use a perfect hash to look up preprocessor directives, and generate the preprocessor directive list automatically. --- preproc.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'preproc.h') diff --git a/preproc.h b/preproc.h index b571732..13d70cd 100644 --- a/preproc.h +++ b/preproc.h @@ -9,6 +9,11 @@ #ifndef NASM_PREPROC_H #define NASM_PREPROC_H +#include "pptok.h" + +extern const char * const pp_directives[]; + +enum preproc_token pp_token_hash(const char *token); void pp_include_path(char *); char **pp_get_include_path_ptr(char **pPrevPath); void pp_pre_include(char *); @@ -17,6 +22,4 @@ void pp_pre_undefine(char *); void pp_runtime(char *); void pp_extra_stdmac(const char **); -extern Preproc nasmpp; - #endif -- cgit v1.2.3