char *line_item_buf_ptr;
/* These are defined at the bottom of the file */
-void push_countarray();
+void push_countarray(int level);
void set_parenttag(const char* tag);
char* get_parenttag(int offset);
void set_parentctxt(Gedcom_ctxt ctxt);
void pop_countarray();
int count_tag(int tag);
int check_occurrence(int tag);
+void clean_up();
#define CLEAR_BUFFER(BUF) \
memset(BUF, 0, sizeof(BUF));
#define HANDLE_ERROR \
{ if (error_mechanism == IMMED_FAIL) { \
- YYABORT; \
+ clean_up(); YYABORT; \
} \
else if (error_mechanism == DEFER_FAIL) { \
yyerrok; fail = 1; \
#define START1(PARENTTAG) \
{ set_parenttag(#PARENTTAG); \
}
-#define START2(PARENTCTXT) \
+#define START2(LEVEL,PARENTCTXT) \
{ set_parentctxt(PARENTCTXT); \
++count_level; \
- push_countarray(); \
+ push_countarray(LEVEL); \
}
-#define START(PARENTTAG,PARENTCTXT) \
+#define START(PARENTTAG,LEVEL,PARENTCTXT) \
{ START1(PARENTTAG); \
- START2(PARENTCTXT); \
+ START2(LEVEL,PARENTCTXT); \
}
#define PARENT \
get_parentctxt(0)
file : head_sect records trlr_sect
{ if (fail == 1) YYABORT; }
| error
- { }
+ { clean_up(); }
;
records : /* empty */
{ $<ctxt>$ = start_record(REC_HEAD, $1, GEDCOM_MAKE_NULL(val1),
$3,
NULL, GEDCOM_MAKE_NULL(val2));
- START(HEAD, $<ctxt>$) }
+ START(HEAD, $1, $<ctxt>$) }
head_subs
{ if (compat_mode(C_FTREE)) {
CHECK3(SOUR, GEDC, CHAR);
CHECK1(SOUR);
compat_generate_submitter_link($<ctxt>4);
compat_generate_gedcom($<ctxt>4);
- if (compat_generate_char($<ctxt>4)) YYABORT;
+ if (compat_generate_char($<ctxt>4)) HANDLE_ERROR;
}
else
CHECK4(SOUR, SUBM, GEDC, CHAR)
$<ctxt>$ = start_element(ELT_HEAD_SOUR, PARENT,
$1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(SOUR, $<ctxt>$)
+ START(SOUR, $1, $<ctxt>$)
}
head_sour_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_HEAD_SOUR_VERS, PARENT,
$1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(VERS, $<ctxt>$)
+ START(VERS, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_HEAD_SOUR_NAME, PARENT,
$1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(NAME, $<ctxt>$)
+ START(NAME, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_HEAD_SOUR_CORP, PARENT,
$1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(CORP, $<ctxt>$)
+ START(CORP, $1, $<ctxt>$)
}
head_sour_corp_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_HEAD_SOUR_DATA, PARENT,
$1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(DATA, $<ctxt>$)
+ START(DATA, $1, $<ctxt>$)
}
head_sour_data_subs
{ CHECK0 }
= start_element(ELT_HEAD_SOUR_DATA_DATE,
PARENT, $1, $3, $4,
GEDCOM_MAKE_DATE(val1, dv));
- START(DATE, $<ctxt>$)
+ START(DATE, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
= start_element(ELT_HEAD_SOUR_DATA_COPR,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(COPR, $<ctxt>$)
+ START(COPR, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_HEAD_DEST,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(DEST, $<ctxt>$)
+ START(DEST, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
$<ctxt>$ = start_element(ELT_HEAD_DATE,
PARENT, $1, $3, $4,
GEDCOM_MAKE_DATE(val1, dv));
- START(DATE, $<ctxt>$)
+ START(DATE, $1, $<ctxt>$)
}
head_date_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_HEAD_DATE_TIME,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(TIME, $<ctxt>$)
+ START(TIME, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
$<ctxt>$ = start_element(ELT_HEAD_SUBM,
PARENT, $1, $3, $4,
GEDCOM_MAKE_XREF_PTR(val1, xr));
- START(SUBM, $<ctxt>$)
+ START(SUBM, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
$<ctxt>$ = start_element(ELT_HEAD_SUBN,
PARENT, $1, $3, $4,
GEDCOM_MAKE_XREF_PTR(val1, xr));
- START(SUBN, $<ctxt>$)
+ START(SUBN, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_HEAD_FILE,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(FILE, $<ctxt>$)
+ START(FILE, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_HEAD_COPR,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(COPR, $<ctxt>$)
+ START(COPR, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_HEAD_GEDC,
PARENT, $1, $3, NULL,
GEDCOM_MAKE_NULL(val1));
- START(GEDC, $<ctxt>$)
+ START(GEDC, $1, $<ctxt>$)
}
head_gedc_subs
{ CHECK2(VERS, FORM) }
{ $<ctxt>$ = start_element(ELT_HEAD_GEDC_VERS,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(VERS, $<ctxt>$)
+ START(VERS, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_HEAD_GEDC_FORM,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(FORM, $<ctxt>$)
+ START(FORM, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
head_char_sect : OPEN DELIM TAG_CHAR mand_line_item
{ /* Don't allow to continue if conversion context couldn't
be opened */
- if (open_conv_to_internal($4) == 0) YYABORT;
+ if (open_conv_to_internal($4) == 0) HANDLE_ERROR;
$<ctxt>$ = start_element(ELT_HEAD_CHAR,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(CHAR, $<ctxt>$)
+ START(CHAR, $1, $<ctxt>$)
}
head_char_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_HEAD_CHAR_VERS,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(VERS, $<ctxt>$)
+ START(VERS, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_HEAD_LANG,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(LANG, $<ctxt>$)
+ START(LANG, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_HEAD_PLAC,
PARENT, $1, $3, NULL,
GEDCOM_MAKE_NULL(val1));
- START(PLAC, $<ctxt>$)
+ START(PLAC, $1, $<ctxt>$)
}
head_plac_subs
{ CHECK1(FORM) }
{ $<ctxt>$ = start_element(ELT_HEAD_PLAC_FORM,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(FORM, $<ctxt>$)
+ START(FORM, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_HEAD_NOTE,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(NOTE, $<ctxt>$)
+ START(NOTE, $1, $<ctxt>$)
}
head_note_subs
{ CHECK0 }
$1, GEDCOM_MAKE_XREF_PTR(val1, xr),
$5,
NULL, GEDCOM_MAKE_NULL(val2));
- START(FAM, $<ctxt>$) }
+ START(FAM, $1, $<ctxt>$) }
fam_subs
{ CHECK0 }
CLOSE
$<ctxt>$ = start_element(ELT_FAM_HUSB,
PARENT, $1, $3, $4,
GEDCOM_MAKE_XREF_PTR(val1, xr));
- START(HUSB, $<ctxt>$)
+ START(HUSB, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
$<ctxt>$ = start_element(ELT_FAM_WIFE,
PARENT, $1, $3, $4,
GEDCOM_MAKE_XREF_PTR(val1, xr));
- START(WIFE, $<ctxt>$)
+ START(WIFE, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
$<ctxt>$ = start_element(ELT_FAM_CHIL,
PARENT, $1, $3, $4,
GEDCOM_MAKE_XREF_PTR(val1, xr));
- START(CHIL, $<ctxt>$)
+ START(CHIL, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_FAM_NCHI,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(NCHI, $<ctxt>$)
+ START(NCHI, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
$<ctxt>$ = start_element(ELT_FAM_SUBM,
PARENT, $1, $3, $4,
GEDCOM_MAKE_XREF_PTR(val1, xr));
- START(SUBM, $<ctxt>$)
+ START(SUBM, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
$<ctxt>$ = start_record(REC_INDI,
$1, GEDCOM_MAKE_XREF_PTR(val1, xr), $5,
NULL, GEDCOM_MAKE_NULL(val2));
- START(INDI, $<ctxt>$) }
+ START(INDI, $1, $<ctxt>$) }
indi_subs
{ CHECK0 }
CLOSE
{ $<ctxt>$ = start_element(ELT_INDI_RESN,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(RESN, $<ctxt>$)
+ START(RESN, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_INDI_SEX,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(SEX, $<ctxt>$)
+ START(SEX, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
$<ctxt>$ = start_element(ELT_INDI_SUBM,
PARENT, $1, $3, $4,
GEDCOM_MAKE_XREF_PTR(val1, xr));
- START(SUBM, $<ctxt>$)
+ START(SUBM, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
$<ctxt>$ = start_element(ELT_INDI_ALIA,
PARENT, $1, $3, $4,
GEDCOM_MAKE_XREF_PTR(val1, xr));
- START(ALIA, $<ctxt>$)
+ START(ALIA, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
$<ctxt>$ = start_element(ELT_INDI_ANCI,
PARENT, $1, $3, $4,
GEDCOM_MAKE_XREF_PTR(val1, xr));
- START(ANCI, $<ctxt>$)
+ START(ANCI, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
$<ctxt>$ = start_element(ELT_INDI_DESI,
PARENT, $1, $3, $4,
GEDCOM_MAKE_XREF_PTR(val1, xr));
- START(DESI, $<ctxt>$)
+ START(DESI, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_INDI_RFN,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(RFN, $<ctxt>$)
+ START(RFN, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_INDI_AFN,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(AFN, $<ctxt>$)
+ START(AFN, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
ftree_addr_sect : OPEN DELIM TAG_ADDR opt_line_item
{ if (compat_mode(C_FTREE)) {
Gedcom_ctxt par = compat_generate_resi_start(PARENT);
- START(RESI, par);
+ START(RESI, $1, par);
$<ctxt>$
= start_element(ELT_SUB_ADDR,
par, $1 + 1, $3, $4,
GEDCOM_MAKE_NULL_OR_STRING(val2, $4));
- START(ADDR, $<ctxt>$);
+ START(ADDR, $1, $<ctxt>$);
}
- else { START(ADDR, NULL) }
+ else { START(ADDR, $1, NULL) }
}
ftree_addr_subs
{ CHECK0 }
= start_element(ELT_SUB_PHON,
GRANDPARENT(1), $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(PHON, $<ctxt>$)
+ START(PHON, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
$<ctxt>$ = start_record(REC_OBJE,
$1, GEDCOM_MAKE_XREF_PTR(val1, xr), $5,
NULL, GEDCOM_MAKE_NULL(val2));
- START(OBJE, $<ctxt>$) }
+ START(OBJE, $1, $<ctxt>$) }
obje_subs
{ CHECK2(FORM, BLOB) }
CLOSE
{ $<ctxt>$ = start_element(ELT_OBJE_FORM,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(FORM, $<ctxt>$)
+ START(FORM, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_OBJE_TITL,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(TITL, $<ctxt>$)
+ START(TITL, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_OBJE_BLOB,
PARENT, $1, $3, NULL,
GEDCOM_MAKE_NULL(val1));
- START(BLOB, $<ctxt>$)
+ START(BLOB, $1, $<ctxt>$)
}
obje_blob_subs
{ CHECK1(CONT) }
{ $<ctxt>$ = start_element(ELT_OBJE_BLOB_CONT,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(CONT, $<ctxt>$)
+ START(CONT, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
$<ctxt>$ = start_element(ELT_OBJE_OBJE,
PARENT, $1, $3, $4,
GEDCOM_MAKE_XREF_PTR(val1, xr));
- START(OBJE, $<ctxt>$)
+ START(OBJE, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
$<ctxt>$ = start_record(REC_NOTE,
$1, GEDCOM_MAKE_XREF_PTR(val1, xr), $5,
$6, GEDCOM_MAKE_STRING(val2, $6));
- START(NOTE, $<ctxt>$) }
+ START(NOTE, $1, $<ctxt>$) }
note_subs
{ CHECK0 }
CLOSE
$<ctxt>$ = start_record(REC_REPO,
$1, GEDCOM_MAKE_XREF_PTR(val1, xr), $5,
NULL, GEDCOM_MAKE_NULL(val2));
- START(REPO, $<ctxt>$) }
+ START(REPO, $1, $<ctxt>$) }
repo_subs
{ CHECK0 }
CLOSE
{ $<ctxt>$ = start_element(ELT_REPO_NAME,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(NAME, $<ctxt>$)
+ START(NAME, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
$<ctxt>$ = start_record(REC_SOUR,
$1, GEDCOM_MAKE_XREF_PTR(val1, xr), $5,
NULL, GEDCOM_MAKE_NULL(val2));
- START(SOUR, $<ctxt>$) }
+ START(SOUR, $1, $<ctxt>$) }
sour_subs
{ CHECK0 }
CLOSE
{ $<ctxt>$ = start_element(ELT_SOUR_DATA,
PARENT, $1, $3, NULL,
GEDCOM_MAKE_NULL(val1));
- START(DATA, $<ctxt>$)
+ START(DATA, $1, $<ctxt>$)
}
sour_data_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SOUR_DATA_EVEN,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(EVEN, $<ctxt>$)
+ START(EVEN, $1, $<ctxt>$)
}
sour_data_even_subs
{ CHECK0 }
= start_element(ELT_SOUR_DATA_EVEN_DATE,
PARENT, $1, $3, $4,
GEDCOM_MAKE_DATE(val1, dv));
- START(DATE, $<ctxt>$)
+ START(DATE, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
= start_element(ELT_SOUR_DATA_EVEN_PLAC,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(PLAC, $<ctxt>$)
+ START(PLAC, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SOUR_DATA_AGNC,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(AGNC, $<ctxt>$)
+ START(AGNC, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SOUR_AUTH,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(AUTH, $<ctxt>$)
+ START(AUTH, $1, $<ctxt>$)
}
sour_auth_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SOUR_TITL,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(TITL, $<ctxt>$)
+ START(TITL, $1, $<ctxt>$)
}
sour_titl_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SOUR_ABBR,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(ABBR, $<ctxt>$)
+ START(ABBR, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SOUR_PUBL,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(PUBL, $<ctxt>$)
+ START(PUBL, $1, $<ctxt>$)
}
sour_publ_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SOUR_TEXT,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(TEXT, $<ctxt>$)
+ START(TEXT, $1, $<ctxt>$)
}
sour_text_subs
{ CHECK0 }
$<ctxt>$ = start_record(REC_SUBN,
$1, GEDCOM_MAKE_XREF_PTR(val1, xr), $5,
NULL, GEDCOM_MAKE_NULL(val2));
- START(SUBN, $<ctxt>$) }
+ START(SUBN, $1, $<ctxt>$) }
subn_subs
{ CHECK0 }
CLOSE
$<ctxt>$ = start_element(ELT_SUBN_SUBM,
PARENT, $1, $3, $4,
GEDCOM_MAKE_XREF_PTR(val1, xr));
- START(SUBM, $<ctxt>$)
+ START(SUBM, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUBN_FAMF,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(FAMF, $<ctxt>$)
+ START(FAMF, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUBN_TEMP,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(TEMP, $<ctxt>$)
+ START(TEMP, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUBN_ANCE,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(ANCE, $<ctxt>$)
+ START(ANCE, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUBN_DESC,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(DESC, $<ctxt>$)
+ START(DESC, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUBN_ORDI,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(ORDI, $<ctxt>$)
+ START(ORDI, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUBN_RIN,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(RIN, $<ctxt>$)
+ START(RIN, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
$<ctxt>$ = start_record(REC_SUBM,
$1, GEDCOM_MAKE_XREF_PTR(val1, xr), $5,
NULL, GEDCOM_MAKE_NULL(val2));
- START(SUBM, $<ctxt>$) }
+ START(SUBM, $1, $<ctxt>$) }
subm_subs
{ CHECK1(NAME) }
CLOSE
{ $<ctxt>$ = start_element(ELT_SUBM_NAME,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(NAME, $<ctxt>$)
+ START(NAME, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUBM_LANG,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(LANG, $<ctxt>$)
+ START(LANG, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUBM_RFN,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(RFN, $<ctxt>$)
+ START(RFN, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUBM_RIN,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(RIN, $<ctxt>$)
+ START(RIN, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_ADDR,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(ADDR, $<ctxt>$)
+ START(ADDR, $1, $<ctxt>$)
}
addr_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_ADDR_CONT,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(CONT, $<ctxt>$)
+ START(CONT, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_ADDR_ADR1,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(ADR1, $<ctxt>$)
+ START(ADR1, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_ADDR_ADR2,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(ADR2, $<ctxt>$)
+ START(ADR2, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_ADDR_CITY,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(CITY, $<ctxt>$)
+ START(CITY, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_ADDR_STAE,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(STAE, $<ctxt>$)
+ START(STAE, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_ADDR_POST,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(POST, $<ctxt>$)
+ START(POST, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_ADDR_CTRY,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(CTRY, $<ctxt>$)
+ START(CTRY, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_PHON,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(PHON, $<ctxt>$)
+ START(PHON, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
$<ctxt>$ = start_element(ELT_SUB_ASSO,
PARENT, $1, $3, $4,
GEDCOM_MAKE_XREF_PTR(val1, xr));
- START(ASSO, $<ctxt>$)
+ START(ASSO, $1, $<ctxt>$)
}
asso_subs
{ CHECK2(TYPE,RELA) }
{ $<ctxt>$ = start_element(ELT_SUB_ASSO_TYPE,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(TYPE, $<ctxt>$)
+ START(TYPE, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_ASSO_RELA,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(RELA, $<ctxt>$)
+ START(RELA, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_CHAN,
PARENT, $1, $3, NULL,
GEDCOM_MAKE_NULL(val1));
- START(CHAN, $<ctxt>$)
+ START(CHAN, $1, $<ctxt>$)
}
change_date_chan_subs
{ CHECK1(DATE) }
$<ctxt>$ = start_element(ELT_SUB_CHAN_DATE,
PARENT, $1, $3, $4,
GEDCOM_MAKE_DATE(val1, dv));
- START(DATE, $<ctxt>$) }
+ START(DATE, $1, $<ctxt>$) }
change_date_date_subs
{ CHECK0 }
CLOSE
= start_element(ELT_SUB_CHAN_TIME,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(TIME, $<ctxt>$)
+ START(TIME, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
$<ctxt>$ = start_element(ELT_SUB_FAMC,
PARENT, $1, $3, $4,
GEDCOM_MAKE_XREF_PTR(val1, xr));
- START(FAMC, $<ctxt>$)
+ START(FAMC, $1, $<ctxt>$)
}
famc_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_FAMC_PEDI,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(PEDI, $<ctxt>$)
+ START(PEDI, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_CONT,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(CONT, $<ctxt>$)
+ START(CONT, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_CONC,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(CONC, $<ctxt>$)
+ START(CONC, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
= start_element(ELT_SUB_EVT_TYPE,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(TYPE, $<ctxt>$)
+ START(TYPE, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
= start_element(ELT_SUB_EVT_DATE,
PARENT, $1, $3, $4,
GEDCOM_MAKE_DATE(val1, dv));
- START(DATE, $<ctxt>$)
+ START(DATE, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
= start_element(ELT_SUB_EVT_AGE,
PARENT, $1, $3, $4,
GEDCOM_MAKE_AGE(val1, age));
- START(AGE, $<ctxt>$)
+ START(AGE, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
= start_element(ELT_SUB_EVT_AGNC,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(AGNC, $<ctxt>$)
+ START(AGNC, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
= start_element(ELT_SUB_EVT_CAUS,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(CAUS, $<ctxt>$)
+ START(CAUS, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
= start_element(ELT_SUB_FAM_EVT,
PARENT, $1, $3, $4,
GEDCOM_MAKE_NULL_OR_STRING(val1, $4));
- START2($<ctxt>$);
+ START2($1, $<ctxt>$);
}
fam_event_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_FAM_EVT_HUSB,
PARENT, $1, $3, NULL,
GEDCOM_MAKE_NULL(val1));
- START(HUSB, $<ctxt>$)
+ START(HUSB, $1, $<ctxt>$)
}
fam_even_husb_subs
{ CHECK1(AGE) }
$<ctxt>$ = start_element(ELT_SUB_FAM_EVT_AGE,
PARENT, $1, $3, $4,
GEDCOM_MAKE_AGE(val1, age));
- START(AGE, $<ctxt>$)
+ START(AGE, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_FAM_EVT_WIFE,
PARENT, $1, $3, NULL,
GEDCOM_MAKE_NULL(val1));
- START(WIFE, $<ctxt>$)
+ START(WIFE, $1, $<ctxt>$)
}
fam_even_husb_subs
{ CHECK1(AGE) }
{ $<ctxt>$ = start_element(ELT_SUB_FAM_EVT_EVEN,
PARENT, $1, $3, NULL,
GEDCOM_MAKE_NULL(val1));
- START(EVEN, $<ctxt>$)
+ START(EVEN, $1, $<ctxt>$)
}
fam_gen_even_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_IDENT_REFN,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(REFN, $<ctxt>$)
+ START(REFN, $1, $<ctxt>$)
}
ident_refn_subs
{ CHECK0 }
= start_element(ELT_SUB_IDENT_REFN_TYPE,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(TYPE, $<ctxt>$)
+ START(TYPE, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_IDENT_RIN,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(RIN, $<ctxt>$)
+ START(RIN, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_INDIV_ATTR,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START2($<ctxt>$);
+ START2($1, $<ctxt>$);
}
indiv_attr_event_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_INDIV_RESI,
PARENT, $1, $3, NULL,
GEDCOM_MAKE_NULL(val1));
- START(RESI, $<ctxt>$)
+ START(RESI, $1, $<ctxt>$)
}
indiv_attr_event_subs
{ CHECK0 }
= start_element(ELT_SUB_INDIV_BIRT,
PARENT, $1, $3, $4,
GEDCOM_MAKE_NULL_OR_STRING(val1, $4));
- START2($<ctxt>$);
+ START2($1, $<ctxt>$);
}
indiv_birt_subs
{ CHECK0 }
= start_element(ELT_SUB_INDIV_BIRT_FAMC,
PARENT, $1, $3, $4,
GEDCOM_MAKE_XREF_PTR(val1, xr));
- START(FAMC, $<ctxt>$)
+ START(FAMC, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
= start_element(ELT_SUB_INDIV_GEN,
PARENT, $1, $3, $4,
GEDCOM_MAKE_NULL_OR_STRING(val1, $4));
- START2($<ctxt>$);
+ START2($1, $<ctxt>$);
}
indiv_gen_subs
{ CHECK0 }
= start_element(ELT_SUB_INDIV_ADOP,
PARENT, $1, $3, $4,
GEDCOM_MAKE_NULL_OR_STRING(val1, $4));
- START(ADOP, $<ctxt>$) }
+ START(ADOP, $1, $<ctxt>$) }
indiv_adop_subs
{ CHECK0 }
CLOSE
= start_element(ELT_SUB_INDIV_ADOP_FAMC,
PARENT, $1, $3, $4,
GEDCOM_MAKE_XREF_PTR(val1, xr));
- START(FAMC, $<ctxt>$) }
+ START(FAMC, $1, $<ctxt>$) }
indiv_adop_famc_subs
{ CHECK0 }
CLOSE
= start_element(ELT_SUB_INDIV_ADOP_FAMC_ADOP,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(ADOP, $<ctxt>$) }
+ START(ADOP, $1, $<ctxt>$) }
no_std_subs
{ CHECK0 }
CLOSE
{ $<ctxt>$ = start_element(ELT_SUB_INDIV_EVEN,
PARENT, $1, $3, NULL,
GEDCOM_MAKE_NULL(val1));
- START(EVEN, $<ctxt>$) }
+ START(EVEN, $1, $<ctxt>$) }
indiv_gen_subs
{ CHECK0 }
CLOSE
{ $<ctxt>$ = start_element(ELT_SUB_LIO_BAPL,
PARENT, $1, $3, NULL,
GEDCOM_MAKE_NULL(val1));
- START2($<ctxt>$);
+ START2($1, $<ctxt>$);
}
lio_bapl_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_LIO_BAPL_STAT,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(STAT, $<ctxt>$)
+ START(STAT, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
$<ctxt>$ = start_element(ELT_SUB_LIO_BAPL_DATE,
PARENT, $1, $3, $4,
GEDCOM_MAKE_DATE(val1, dv));
- START(DATE, $<ctxt>$)
+ START(DATE, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_LIO_BAPL_TEMP,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(TEMP, $<ctxt>$)
+ START(TEMP, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_LIO_BAPL_PLAC,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(PLAC, $<ctxt>$)
+ START(PLAC, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_LIO_SLGC,
PARENT, $1, $3, NULL,
GEDCOM_MAKE_NULL(val1));
- START(SLGC, $<ctxt>$)
+ START(SLGC, $1, $<ctxt>$)
}
lio_slgc_subs
{ CHECK1(FAMC) }
= start_element(ELT_SUB_LIO_SLGC_FAMC,
PARENT, $1, $3, $4,
GEDCOM_MAKE_XREF_PTR(val1, xr));
- START(FAMC, $<ctxt>$)
+ START(FAMC, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_LSS_SLGS,
PARENT, $1, $3, NULL,
GEDCOM_MAKE_NULL(val1));
- START(SLGS, $<ctxt>$) }
+ START(SLGS, $1, $<ctxt>$) }
lss_slgs_subs
{ CHECK0 }
CLOSE
{ $<ctxt>$ = start_element(ELT_SUB_LSS_SLGS_STAT,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(STAT, $<ctxt>$)
+ START(STAT, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
$<ctxt>$ = start_element(ELT_SUB_LSS_SLGS_DATE,
PARENT, $1, $3, $4,
GEDCOM_MAKE_DATE(val1, dv));
- START(DATE, $<ctxt>$)
+ START(DATE, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_LSS_SLGS_TEMP,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(TEMP, $<ctxt>$)
+ START(TEMP, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_LSS_SLGS_PLAC,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(PLAC, $<ctxt>$)
+ START(PLAC, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
= start_element(ELT_SUB_MULTIM_OBJE,
PARENT, $1, $3, $5,
GEDCOM_MAKE_XREF_PTR(val1, xr));
- START(OBJE, $<ctxt>$)
+ START(OBJE, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_MULTIM_OBJE,
PARENT, $1, $3, NULL,
GEDCOM_MAKE_NULL(val1));
- START(OBJE, $<ctxt>$)
+ START(OBJE, $1, $<ctxt>$)
}
multim_obje_emb_subs
{ CHECK2(FORM,FILE) }
= start_element(ELT_SUB_MULTIM_OBJE_FORM,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(FORM, $<ctxt>$)
+ START(FORM, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
= start_element(ELT_SUB_MULTIM_OBJE_TITL,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(TITL, $<ctxt>$)
+ START(TITL, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
= start_element(ELT_SUB_MULTIM_OBJE_FILE,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(FILE, $<ctxt>$)
+ START(FILE, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
= start_element(ELT_SUB_NOTE,
PARENT, $1, $3, $5,
GEDCOM_MAKE_XREF_PTR(val1, xr));
- START(NOTE, $<ctxt>$)
+ START(NOTE, $1, $<ctxt>$)
}
note_struc_link_subs
{ CHECK0 }
= start_element(ELT_SUB_NOTE,
PARENT, $1, $3, $4,
GEDCOM_MAKE_NULL_OR_STRING(val1, $4));
- START(NOTE, $<ctxt>$)
+ START(NOTE, $1, $<ctxt>$)
}
note_struc_emb_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_PERS_NAME,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(NAME, $<ctxt>$)
+ START(NAME, $1, $<ctxt>$)
}
pers_name_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_PERS_NAME_NPFX,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(NPFX, $<ctxt>$)
+ START(NPFX, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_PERS_NAME_GIVN,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(GIVN, $<ctxt>$)
+ START(GIVN, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_PERS_NAME_NICK,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(NICK, $<ctxt>$)
+ START(NICK, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_PERS_NAME_SPFX,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(SPFX, $<ctxt>$)
+ START(SPFX, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_PERS_NAME_SURN,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(SURN, $<ctxt>$)
+ START(SURN, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_PERS_NAME_NSFX,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(NSFX, $<ctxt>$)
+ START(NSFX, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
= start_element(ELT_SUB_PLAC,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(PLAC, $<ctxt>$)
+ START(PLAC, $1, $<ctxt>$)
}
place_struc_plac_subs
{ CHECK0 }
= start_element(ELT_SUB_PLAC_FORM,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(FORM, $<ctxt>$)
+ START(FORM, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
= start_element(ELT_SUB_SOUR,
PARENT, $1, $3, $5,
GEDCOM_MAKE_XREF_PTR(val1, xr));
- START(SOUR, $<ctxt>$)
+ START(SOUR, $1, $<ctxt>$)
}
source_cit_link_subs
{ CHECK0 }
= start_element(ELT_SUB_SOUR_PAGE,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(PAGE, $<ctxt>$)
+ START(PAGE, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
= start_element(ELT_SUB_SOUR_EVEN,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(EVEN, $<ctxt>$)
+ START(EVEN, $1, $<ctxt>$)
}
source_cit_even_subs
{ CHECK0 }
= start_element(ELT_SUB_SOUR_EVEN_ROLE,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(ROLE, $<ctxt>$)
+ START(ROLE, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_SOUR_DATA,
PARENT, $1, $3, NULL,
GEDCOM_MAKE_NULL(val1));
- START(DATA, $<ctxt>$)
+ START(DATA, $1, $<ctxt>$)
}
source_cit_data_subs
{ CHECK0 }
= start_element(ELT_SUB_SOUR_DATA_DATE,
PARENT, $1, $3, $4,
GEDCOM_MAKE_DATE(val1, dv));
- START(DATE, $<ctxt>$)
+ START(DATE, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
= start_element(ELT_SUB_SOUR_TEXT,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(TEXT, $<ctxt>$)
+ START(TEXT, $1, $<ctxt>$)
}
source_cit_text_subs
{ CHECK0 }
= start_element(ELT_SUB_SOUR_QUAY,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(QUAY, $<ctxt>$)
+ START(QUAY, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_SOUR,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(SOUR, $<ctxt>$)
+ START(SOUR, $1, $<ctxt>$)
}
source_cit_emb_subs
{ CHECK0 }
= start_element(ELT_SUB_REPO,
PARENT, $1, $3, $4,
GEDCOM_MAKE_XREF_PTR(val1, xr));
- START(REPO, $<ctxt>$)
+ START(REPO, $1, $<ctxt>$)
}
source_repos_repo_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_REPO_CALN,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(CALN, $<ctxt>$)
+ START(CALN, $1, $<ctxt>$)
}
caln_subs
{ CHECK0 }
{ $<ctxt>$ = start_element(ELT_SUB_REPO_CALN_MEDI,
PARENT, $1, $3, $4,
GEDCOM_MAKE_STRING(val1, $4));
- START(MEDI, $<ctxt>$)
+ START(MEDI, $1, $<ctxt>$)
}
no_std_subs
{ CHECK0 }
= start_element(ELT_SUB_FAMS,
PARENT, $1, $3, $4,
GEDCOM_MAKE_XREF_PTR(val1, xr));
- START(FAMS, $<ctxt>$)
+ START(FAMS, $1, $<ctxt>$)
}
spou_fam_fams_subs
{ CHECK0 }
no_std_sub : user_sect /* 0:M */
| gen_sect
- | error error_subs CLOSE { HANDLE_ERROR }
+ | error error_subs
+ CLOSE { HANDLE_ERROR }
;
no_std_rec : user_rec /* 0:M */
| gen_rec
- | error error_subs CLOSE { HANDLE_ERROR }
+ | error error_subs
+ CLOSE { HANDLE_ERROR }
;
user_rec : OPEN DELIM opt_xref USERTAG
$1,
GEDCOM_MAKE_NULL_OR_XREF_PTR(val1, xr),
$4, $6, &val2);
- START($4, $<ctxt>$)
+ START($4, $1, $<ctxt>$)
}
user_sects
{ CHECK0 }
}
opt_value
{ $<ctxt>$ = start_element(ELT_USER, PARENT, $1, $4, $6, &val2);
- START($4, $<ctxt>$);
+ START($4, $1, $<ctxt>$);
}
user_sects
{ CHECK0 }
*line_item_buf_ptr++ = $2[i];
$$ = line_item_buf;
}
+ | line_item error anychar { HANDLE_ERROR; }
+ | line_item error ESCAPE { HANDLE_ERROR; }
;
anychar : ANYCHAR { }
char tag_stack[MAXGEDCLEVEL+1][MAXSTDTAGLEN+1];
Gedcom_ctxt ctxt_stack[MAXGEDCLEVEL+1];
-void push_countarray()
+void push_countarray(int level)
{
int *count = NULL;
+ gedcom_debug_print("Push Count level: %d, level: %d\n", count_level, level);
+ if (count_level != level + 1) {
+ gedcom_error(_("Internal error: count level mismatch"));
+ exit(1);
+ }
if (count_level > MAXGEDCLEVEL) {
gedcom_error(_("Internal error: count array overflow"));
exit(1);
}
else {
+ gedcom_debug_print("calloc countarray %d\n", count_level);
count = (int *)calloc(YYNTOKENS, sizeof(int));
if (count == NULL) {
gedcom_error(_("Internal error: count array calloc error"));
void pop_countarray()
{
int *count;
+ gedcom_debug_print("Pop Count level: %d\n", count_level);
if (count_level < 0) {
gedcom_error(_("Internal error: count array underflow"));
exit(1);
}
else {
count = count_arrays[count_level];
+ gedcom_debug_print("free countarray %d\n", count_level);
free(count);
count_arrays[count_level] = NULL;
}
}
+void clean_up()
+{
+ gedcom_debug_print("Cleanup countarrays\n");
+ while (count_level > 0) {
+ pop_countarray();
+ --count_level;
+ }
+}
+
/* Enabling debug mode */
/* level 0: no debugging */
/* level 1: only internal */