From: Peter Verthez Date: Sun, 22 Sep 2002 18:43:41 +0000 (+0000) Subject: Added a function to check whether a string is a valid token. X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=010eebaa1591d24995ec2856db2041693e10701f;p=gedcom-parse.git Added a function to check whether a string is a valid token. --- diff --git a/gedcom/gedcom_internal.h b/gedcom/gedcom_internal.h index 7804a41..ea2bd6e 100644 --- a/gedcom/gedcom_internal.h +++ b/gedcom/gedcom_internal.h @@ -54,10 +54,17 @@ struct tag_struct { int value; }; -int gedcom_parse(); -int gedcom_lex(); +typedef enum _PARSE_STATE { + STATE_NORMAL, + STATE_INITIAL, + STATE_EXPECT_TAG +} ParseState; -void gedcom_mem_error(const char *filename, int line); +int gedcom_parse(); +int gedcom_lex(); +int gedcom_check_token(const char* str, ParseState state, int check_token); + +void gedcom_mem_error(const char *filename, int line); #define MEMORY_ERROR gedcom_mem_error(__FILE__, __LINE__)