X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gedcom.y;h=98d36e2345e0fe2ee08e30b3b0232a2017cc72a9;hb=0c341b31ca4de86b12b8b98f724b4f746e98a5d2;hp=8aad4fd9f02ed3726ac82eaf78c800fbc3568f65;hpb=845f7ac49d5e63b96aca7a4cd1f60ac5e3230033;p=gedcom-parse.git diff --git a/gedcom.y b/gedcom.y index 8aad4fd..98d36e2 100644 --- a/gedcom.y +++ b/gedcom.y @@ -1,3 +1,12 @@ +/* This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + + (C) 2001 by The Genes Development Team + Original author: Peter Verthez (Peter.Verthez@advalvas.be) +*/ + /* $Id$ */ /* $Name$ */ @@ -123,6 +132,7 @@ %{ #include "gedcom.h" #include "multilex.h" +#include "encoding.h" int count_level = 0; int fail = 0; @@ -213,13 +223,14 @@ int compat_mode(int flags); %union { char *string; + int number; } %token_table %expect 300 %token BADTOKEN -%token OPEN +%token OPEN %token CLOSE %token ESCAPE %token DELIM @@ -568,7 +579,8 @@ head_gedc_form_sect : OPEN DELIM TAG_FORM mand_line_item /* HEAD.CHAR */ head_char_sect : OPEN DELIM TAG_CHAR mand_line_item - { START(CHAR) } + { if (open_conv_to_internal($4) == 0) YYERROR; + START(CHAR) } head_char_subs { CHECK0 } CLOSE