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