X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gedcom%2Fgedcom_hilo.lex;h=8d1997e524bdf45b06e9de49278e5ff770aeefd1;hb=1cb22adafb0696887c3a7544f81898d0685b42b7;hp=a5216bb7561343014e8a648a81844722c27c411a;hpb=e6cd9cd58e0e23f70e75b140d16354af665d7b43;p=gedcom-parse.git diff --git a/gedcom/gedcom_hilo.lex b/gedcom/gedcom_hilo.lex index a5216bb..8d1997e 100644 --- a/gedcom/gedcom_hilo.lex +++ b/gedcom/gedcom_hilo.lex @@ -25,7 +25,8 @@ /* i.e. this is utf-16-be */ %{ -#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_hilo_myinit #include "gedcom_lex_common.c" static size_t encoding_width = 2; @@ -51,12 +52,13 @@ alphanum {alpha}|{digit} gen_delim {delim}|{tab} escape \x00@\x00#{any_char}+\x00@ -pointer \x00@{alphanum}{non_at}+\x00@ +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 @@ -215,18 +217,14 @@ ACTION_BEFORE_REGEXPS {normal_at} ACTION_NORMAL_AT +{tab} ACTION_TAB + . ACTION_UNEXPECTED %% - -static int exitfuncregistered = 0; - -int yywrap() -{ - if (! exitfuncregistered && atexit(yylex_cleanup) == 0) - atexit(yylex_cleanup); - 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()