| 30 |
#include <stack> |
#include <stack> |
| 31 |
#include <map> |
#include <map> |
| 32 |
#include <iostream> |
#include <iostream> |
| 33 |
|
#include <sstream> |
| 34 |
|
|
| 35 |
#include "GEDCOMParser/GEDCOMFactory.hh" |
#include "GEDCOMParser/GEDCOMFactory.hh" |
| 36 |
|
|
| 126 |
void init_event_details(int); |
void init_event_details(int); |
| 127 |
GEDCOMFactory const * _factory; |
GEDCOMFactory const * _factory; |
| 128 |
GEDCOMParser::LineageLinkageGedcom * lineage_linkage_gedcom = 0; |
GEDCOMParser::LineageLinkageGedcom * lineage_linkage_gedcom = 0; |
| 129 |
|
GEDCOMParser::ParseErrorManagement::ParseErrorManager * _parse_error_manager = 0; |
| 130 |
void yyerror(char * const s); |
void yyerror(char * const s); |
| 131 |
|
|
| 132 |
|
|
| 1974 |
return lineage_linkage_gedcom; |
return lineage_linkage_gedcom; |
| 1975 |
} |
} |
| 1976 |
|
|
| 1977 |
void GedcomParse(std::string const &filename, GEDCOMParser::LineageLinkageGedcom * const lineage, GEDCOMParser::GEDCOMFactory const * const factory, int debug) |
void GedcomParse(std::string const &filename, GEDCOMParser::LineageLinkageGedcom * const lineage, GEDCOMParser::GEDCOMFactory const * const factory, int debug, GEDCOMParser::ParseErrorManagement::ParseErrorManager * parse_error_manager) |
| 1978 |
{ |
{ |
| 1979 |
|
_parse_error_manager = parse_error_manager; |
| 1980 |
FILE * f = 0; |
FILE * f = 0; |
| 1981 |
if (filename == "") |
if (filename == "") |
| 1982 |
{ |
{ |
| 2002 |
} |
} |
| 2003 |
|
|
| 2004 |
void yyerror(char * const s) |
void yyerror(char * const s) |
| 2005 |
{ |
{ |
| 2006 |
std::cerr << s << " near line " << lineno << std::endl; |
std::string tmp(" near line "); |
| 2007 |
|
std::ostringstream s_lineno; |
| 2008 |
|
s_lineno << lineno; |
| 2009 |
|
tmp = s + tmp + s_lineno.str(); |
| 2010 |
|
if (_parse_error_manager != 0) |
| 2011 |
|
{ |
| 2012 |
|
_parse_error_manager->AddError(1, tmp); |
| 2013 |
|
} |
| 2014 |
return ; |
return ; |
| 2015 |
} |
} |
| 2016 |
|
|