Increment line number also for generating gedcom level error.
[gedcom-parse.git] / gedcom / gedcom_lohi.lex
index d6092a6d67d158c3bb2e9a8c7baf27b53dc72826..f656ba2ebb3cef72f5c9c26c4702c7dc9eb44841 100644 (file)
@@ -25,7 +25,8 @@
 /* i.e. this is utf-16-le */
 
 %{
-#undef IN_LEX    /* include only a specific part of the following file */
+#define LEX_SECTION 1  /* include only a specific part of the following file */
+#define yymyinit gedcom_lohi_myinit
 #include "gedcom_lex_common.c"
   
 static size_t encoding_width = 2;
@@ -56,7 +57,8 @@ pointer      @\x00{alphanum}{non_at}+@\x00
 %%
 
 %{
-#define IN_LEX    /* include only a specific part of the following file */
+#undef LEX_SECTION
+#define LEX_SECTION 2  /* include only a specific part of the following file */
 #include "gedcom_lex_common.c"
 
 ACTION_BEFORE_REGEXPS
@@ -218,11 +220,9 @@ ACTION_BEFORE_REGEXPS
 .                        ACTION_UNEXPECTED
 
 %%
-
-int yywrap()
-{
-  return 1;
-}
+#undef LEX_SECTION
+#define LEX_SECTION 3  /* include only a specific part of the following file */
+#include "gedcom_lex_common.c"
 
 #ifdef LEXER_TEST
 int gedcom_lex()