/[ghosts]/ghosts/gedcomparser/src/GEDCOMParser/yaccparser.yxx
ViewVC logotype

Diff of /ghosts/gedcomparser/src/GEDCOMParser/yaccparser.yxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by cpcp, Mon Sep 23 13:36:56 2002 UTC revision 1.3 by cpcp, Tue Nov 12 21:25:21 2002 UTC
# Line 30  int yylex(void); Line 30  int yylex(void);
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    
# Line 125  int yylex(void); Line 126  int yylex(void);
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                    
# Line 1973  GEDCOMParser::LineageLinkageGedcom * get Line 1974  GEDCOMParser::LineageLinkageGedcom * get
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      {      {
# Line 2000  void GedcomParse(std::string const &file Line 2002  void GedcomParse(std::string const &file
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    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26