Panda3D
 All Classes Functions Variables Enumerations
xFileParseData.cxx
1 // Filename: xFileParseData.cxx
2 // Created by: drose (07Oct04)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "xFileParseData.h"
16 #include "xLexerDefs.h"
17 
18 
19 ////////////////////////////////////////////////////////////////////
20 // Function: XFileParseData::Constructor
21 // Access: Public
22 // Description:
23 ////////////////////////////////////////////////////////////////////
24 XFileParseData::
25 XFileParseData() :
26  _parse_flags(0)
27 {
28  // Save the line number, column number, and line text in case we
29  // detect an error later and want to report a meaningful message to
30  // the user.
31  _line_number = x_line_number;
32  _col_number = x_col_number;
33  _current_line = x_current_line;
34 }
35 
36 ////////////////////////////////////////////////////////////////////
37 // Function: XFileParseData::yyerror
38 // Access: Public
39 // Description: Reports a parsing error message to the user, showing
40 // the line and column from which this object was
41 // originally parsed.
42 ////////////////////////////////////////////////////////////////////
44 yyerror(const string &message) const {
45  xyyerror(message, _line_number, _col_number, _current_line);
46 }
void yyerror(const string &message) const
Reports a parsing error message to the user, showing the line and column from which this object was o...