1 martin 1.11 //%LICENSE////////////////////////////////////////////////////////////////
|
2 martin 1.12 //
|
3 martin 1.11 // Licensed to The Open Group (TOG) under one or more contributor license
4 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
5 // this work for additional information regarding copyright ownership.
6 // Each contributor licenses this file to you under the OpenPegasus Open
7 // Source License; you may not use this file except in compliance with the
8 // License.
|
9 martin 1.12 //
|
10 martin 1.11 // Permission is hereby granted, free of charge, to any person obtaining a
11 // copy of this software and associated documentation files (the "Software"),
12 // to deal in the Software without restriction, including without limitation
13 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 // and/or sell copies of the Software, and to permit persons to whom the
15 // Software is furnished to do so, subject to the following conditions:
|
16 martin 1.12 //
|
17 martin 1.11 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
|
19 martin 1.12 //
|
20 martin 1.11 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
21 martin 1.12 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22 martin 1.11 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27 martin 1.12 //
|
28 martin 1.11 //////////////////////////////////////////////////////////////////////////
|
29 mike 1.2 //
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 */
|