1 mike 1.2 //%/////////////////////////////////////////////////////////////////////////////
2 //
|
3 kumpf 1.4 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,
|
4 mike 1.2 // The Open Group, Tivoli Systems
5 //
6 // Permission is hereby granted, free of charge, to any person obtaining a copy
|
7 kumpf 1.4 // of this software and associated documentation files (the "Software"), to
8 // deal in the Software without restriction, including without limitation the
9 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
10 mike 1.2 // sell copies of the Software, and to permit persons to whom the Software is
11 // furnished to do so, subject to the following conditions:
12 //
|
13 kumpf 1.4 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
|
14 mike 1.2 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
15 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
16 kumpf 1.4 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
17 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
18 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
19 mike 1.2 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 //
22 //==============================================================================
23 //
24 // Author: Mike Brasher (mbrasher@bmc.com)
25 //
26 // Modified By:
27 //
28 //%/////////////////////////////////////////////////////////////////////////////
29
30 #ifndef Pegasus_WQLParserState_h
31 #define Pegasus_WQLParserState_h
32
33 #include <Pegasus/Common/Config.h>
|
34 kumpf 1.5 #include <Pegasus/Common/ArrayInternal.h>
|
35 mike 1.2 #include <Pegasus/WQL/WQLSelectStatement.h>
36
37 PEGASUS_NAMESPACE_BEGIN
38
39 /** This is an internal structure used for holding parser state information
40 during parsing (while inside the WQLParser::parse() method). Instances
41 of this class are created and destroyed by WQLParser::parse().
42 */
43 struct WQLParserState
44 {
45 //
46 // Text containing SELECT statement (must be null-terminated).
47 //
48
|
49 mike 1.3 const char* text;
50
51 //
52 // Size in bytes (including null terminator) of the text.
53 //
54
55 Uint32 textSize;
|
56 mike 1.2
57 //
58 // Offset to current parser position in the above text.
59 //
60
61 Uint32 offset;
62
63 //
64 // The output object being initialized during parsing. This object is
|
65 kumpf 1.6 // set to point to the statement argument passed to the WQLParser::parse()
|
66 mike 1.2 // method.
67 //
68
69 WQLSelectStatement* statement;
70
71 //
72 // Set to true when there is an error (set by WQL_error()).
73 //
74
75 Boolean error;
76
77 //
78 // Error message if any (set by WQL_error()).
79 //
80
81 String errorMessage;
82
83 //
84 // A list of strings created by lexer. These are deleted by the
85 // WQLParser when cleaning up in the parse() method. It is not possible
86 // to reliably clean them up anywhere else due to potential parse errors
87 mike 1.2 // which prevent YACC actions (which might attempt to free them) from
88 // being reached. These strings are outstanding in the sense that they
89 // need to be cleaned up (not in the sense that they are excellent examples
90 // of strings).
91 //
92
93 Array<char*> outstandingStrings;
94 };
95
96 PEGASUS_NAMESPACE_END
97
98 #endif /* Pegasus_WQLParserState_h */
|