X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gedcom_lex_common.c;h=bc7387de4f8797aabaf61916c1fc6cd3437c3cd5;hb=471aa410dba0a5604cc40f4d23fc34efb098c778;hp=58296331b732313651202cf5042a1234097c3889;hpb=d38733b97417d5495142cf3a75d6e43d989a140a;p=gedcom-parse.git diff --git a/gedcom_lex_common.c b/gedcom_lex_common.c index 5829633..bc7387d 100644 --- a/gedcom_lex_common.c +++ b/gedcom_lex_common.c @@ -12,8 +12,9 @@ #ifndef IN_LEX -#include "gedcom.tab.h" +#include "external.h" #include "gedcom.h" +#include "gedcom.tab.h" #include "multilex.h" #include "encoding.h" @@ -265,6 +266,10 @@ int test_loop(ENCODING enc, char* code) return CLOSE; \ } \ else { \ + /* Reset our state */ \ + current_level = -1; \ + level_diff = MAXGEDCLEVEL; \ + /* ... then terminate lex */ \ yyterminate(); \ } \ }