Added a function to check whether a string is a valid token.
[gedcom-parse.git] / gedcom / gedcom_internal.h
index 7804a419a98042423f917c3c3ce028371be9d853..ea2bd6ef76599e1c2af3db4d945ddbc76a9e3619 100644 (file)
@@ -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__)