summaryrefslogtreecommitdiff
path: root/libjava/gnu/xml/aelfred2/XmlParser.h
blob: baf73193b6dfb2d2ad9a90c2f9f9cc7b7e96d46d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-

#ifndef __gnu_xml_aelfred2_XmlParser__
#define __gnu_xml_aelfred2_XmlParser__

#pragma interface

#include <java/lang/Object.h>
#include <gcj/array.h>

extern "Java"
{
  namespace gnu
  {
    namespace xml
    {
      namespace aelfred2
      {
          class SAXDriver;
          class XmlParser;
          class XmlParser$AttributeDecl;
          class XmlParser$ElementDecl;
          class XmlParser$ExternalIdentifiers;
      }
    }
  }
  namespace java
  {
    namespace net
    {
        class URLConnection;
    }
  }
  namespace org
  {
    namespace xml
    {
      namespace sax
      {
          class InputSource;
      }
    }
  }
}

class gnu::xml::aelfred2::XmlParser : public ::java::lang::Object
{

public: // actually package-private
  XmlParser();
  void setHandler(::gnu::xml::aelfred2::SAXDriver *);
  void doParse(::java::lang::String *, ::java::lang::String *, ::java::io::Reader *, ::java::io::InputStream *, ::java::lang::String *);
private:
  void error(::java::lang::String *, ::java::lang::String *, ::java::lang::String *);
  void error(::java::lang::String *, jchar, ::java::lang::String *);
  void error(::java::lang::String *);
  void parseDocument();
  void parseComment();
  void parsePI();
  void parseCDSect();
  jboolean parseProlog();
  void checkLegalVersion(::java::lang::String *);
  ::java::lang::String * parseXMLDecl(jboolean);
  ::java::lang::String * parseTextDecl(jboolean);
  void setupDecoding(::java::lang::String *);
  void parseMisc();
  void parseDoctypedecl();
  void parseMarkupdecl();
  void parseElement(jboolean);
  void parseAttribute(::java::lang::String *);
  void parseEq();
  void parseETag();
  void parseContent();
  void parseElementDecl();
  void parseContentspec(::java::lang::String *);
  void parseElements(JArray< jchar > *);
  void parseCp();
  void parseMixed(JArray< jchar > *);
  void parseAttlistDecl();
  void parseAttDef(::java::lang::String *);
  ::java::lang::String * readAttType();
  void parseEnumeration(jboolean);
  void parseNotationType();
  void parseDefault(::java::lang::String *, ::java::lang::String *, ::java::lang::String *, ::java::lang::String *);
  void parseConditionalSect(JArray< jchar > *);
  void parseCharRef();
  void tryReadCharRef();
  void parseCharRef(jboolean);
  void parseEntityRef(jboolean);
  void parsePEReference();
  void parseEntityDecl();
  void parseNotationDecl();
  void parseCharData();
  void requireWhitespace();
  void skipWhitespace();
  ::java::lang::String * readNmtoken(jboolean);
  static jboolean isExtender(jchar);
  ::java::lang::String * readLiteral(jint);
  ::gnu::xml::aelfred2::XmlParser$ExternalIdentifiers * readExternalIds(jboolean, jboolean);
  jboolean isWhitespace(jchar);
  void dataBufferAppend(jchar);
  void dataBufferAppend(::java::lang::String *);
  void dataBufferAppend(JArray< jchar > *, jint, jint);
  void dataBufferNormalize();
  ::java::lang::String * dataBufferToString();
  void dataBufferFlush();
  void require(::java::lang::String *);
  void require(jchar);
public:
  ::java::lang::String * intern(JArray< jchar > *, jint, jint);
private:
  ::java::lang::Object * extendArray(::java::lang::Object *, jint, jint);
public: // actually package-private
  jboolean isStandalone();
private:
  jint getContentType(::gnu::xml::aelfred2::XmlParser$ElementDecl *, jint);
public:
  jint getElementContentType(::java::lang::String *);
private:
  void setElement(::java::lang::String *, jint, ::java::lang::String *, ::java::util::HashMap *);
  ::java::util::HashMap * getElementAttributes(::java::lang::String *);
  ::java::util::Iterator * declaredAttributes(::gnu::xml::aelfred2::XmlParser$ElementDecl *);
public:
  ::java::util::Iterator * declaredAttributes(::java::lang::String *);
  ::java::lang::String * getAttributeType(::java::lang::String *, ::java::lang::String *);
  ::java::lang::String * getAttributeEnumeration(::java::lang::String *, ::java::lang::String *);
  ::java::lang::String * getAttributeDefaultValue(::java::lang::String *, ::java::lang::String *);
  jint getAttributeDefaultValueType(::java::lang::String *, ::java::lang::String *);
private:
  void setAttribute(::java::lang::String *, ::java::lang::String *, ::java::lang::String *, ::java::lang::String *, ::java::lang::String *, jint);
  ::gnu::xml::aelfred2::XmlParser$AttributeDecl * getAttribute(::java::lang::String *, ::java::lang::String *);
public:
  jint getEntityType(::java::lang::String *);
  ::gnu::xml::aelfred2::XmlParser$ExternalIdentifiers * getEntityIds(::java::lang::String *);
  ::java::lang::String * getEntityValue(::java::lang::String *);
private:
  void setInternalEntity(::java::lang::String *, ::java::lang::String *);
  void setExternalEntity(::java::lang::String *, jint, ::gnu::xml::aelfred2::XmlParser$ExternalIdentifiers *, ::java::lang::String *);
  void setNotation(::java::lang::String *, ::gnu::xml::aelfred2::XmlParser$ExternalIdentifiers *);
public:
  jint getLineNumber();
  jint getColumnNumber();
private:
  jchar readCh();
  void unread(jchar);
  void unread(JArray< jchar > *, jint);
  void pushURL(jboolean, ::java::lang::String *, ::gnu::xml::aelfred2::XmlParser$ExternalIdentifiers *, ::java::io::Reader *, ::java::io::InputStream *, ::java::lang::String *, jboolean);
  ::java::lang::String * tryEncodingDecl(jboolean);
  void detectEncoding();
  static jboolean tryEncoding(JArray< jbyte > *, jbyte, jbyte, jbyte, jbyte);
  static jboolean tryEncoding(JArray< jbyte > *, jbyte, jbyte);
  void pushString(::java::lang::String *, ::java::lang::String *);
  void pushCharArray(::java::lang::String *, JArray< jchar > *, jint, jint);
  void pushInput(::java::lang::String *);
  void popInput();
  jboolean tryRead(jchar);
  jboolean tryRead(::java::lang::String *);
  jboolean tryRead(JArray< jchar > *);
  jboolean tryWhitespace();
  void parseUntil(::java::lang::String *);
  void parseUntil(JArray< jchar > *);
  void prefetchASCIIEncodingDecl();
  void readDataChunk();
  void filterCR(jboolean);
  void copyUtf8ReadBuffer(jint);
  jint getNextUtf8Byte(jint, jint);
  void copyIso8859_1ReadBuffer(jint, jchar);
  void copyUcs2ReadBuffer(jint, jint, jint);
  void copyUcs4ReadBuffer(jint, jint, jint, jint, jint);
  void encodingError(::java::lang::String *, jint, jint);
  void initializeVariables();
  static const jboolean USE_CHEATS = 1;
public:
  static const jint CONTENT_UNDECLARED = 0;
  static const jint CONTENT_ANY = 1;
  static const jint CONTENT_EMPTY = 2;
  static const jint CONTENT_MIXED = 3;
  static const jint CONTENT_ELEMENTS = 4;
  static const jint ENTITY_UNDECLARED = 0;
  static const jint ENTITY_INTERNAL = 1;
  static const jint ENTITY_NDATA = 2;
  static const jint ENTITY_TEXT = 3;
private:
  static const jint ENCODING_EXTERNAL = 0;
  static const jint ENCODING_UTF_8 = 1;
  static const jint ENCODING_ISO_8859_1 = 2;
  static const jint ENCODING_UCS_2_12 = 3;
  static const jint ENCODING_UCS_2_21 = 4;
  static const jint ENCODING_UCS_4_1234 = 5;
  static const jint ENCODING_UCS_4_4321 = 6;
  static const jint ENCODING_UCS_4_2143 = 7;
  static const jint ENCODING_UCS_4_3412 = 8;
  static const jint ENCODING_ASCII = 9;
public:
  static const jint ATTRIBUTE_DEFAULT_UNDECLARED = 30;
  static const jint ATTRIBUTE_DEFAULT_SPECIFIED = 31;
  static const jint ATTRIBUTE_DEFAULT_IMPLIED = 32;
  static const jint ATTRIBUTE_DEFAULT_REQUIRED = 33;
  static const jint ATTRIBUTE_DEFAULT_FIXED = 34;
private:
  static const jint INPUT_NONE = 0;
  static const jint INPUT_INTERNAL = 1;
  static const jint INPUT_STREAM = 3;
  static const jint INPUT_READER = 5;
  static const jint LIT_ENTITY_REF = 2;
  static const jint LIT_NORMALIZE = 4;
  static const jint LIT_ATTRIBUTE = 8;
  static const jint LIT_DISABLE_PE = 16;
  static const jint LIT_DISABLE_CREF = 32;
  static const jint LIT_DISABLE_EREF = 64;
  static const jint LIT_PUBID = 256;
  static const jint CONTEXT_NORMAL = 0;
  static const jint CONTEXT_LITERAL = 1;
public: // actually package-private
  static jboolean uriWarnings;
private:
  ::gnu::xml::aelfred2::SAXDriver * __attribute__((aligned(__alignof__( ::java::lang::Object)))) handler;
  ::java::io::Reader * reader;
  ::java::io::InputStream * is;
  jint line;
  jint column;
  jint sourceType;
  ::java::util::LinkedList * inputStack;
  ::java::net::URLConnection * externalEntity;
  jint encoding;
  jint currentByteCount;
  ::org::xml::sax::InputSource * scratch;
  JArray< jchar > * readBuffer;
  jint readBufferPos;
  jint readBufferLength;
  jint readBufferOverflow;
  static const jint READ_BUFFER_MAX = 16384;
  JArray< jbyte > * rawReadBuffer;
  static jint DATA_BUFFER_INITIAL;
  JArray< jchar > * dataBuffer;
  jint dataBufferPos;
  static jint NAME_BUFFER_INITIAL;
  JArray< jchar > * nameBuffer;
  jint nameBufferPos;
  jboolean docIsStandalone;
  ::java::util::HashMap * elementInfo;
  ::java::util::HashMap * entityInfo;
  ::java::util::HashMap * notationInfo;
  jboolean skippedPE;
  ::java::lang::String * currentElement;
  jint currentElementContent;
  ::java::util::LinkedList * entityStack;
  jboolean inLiteral;
  jboolean expandPE;
  jboolean peIsError;
  jboolean doReport;
  static const jint SYMBOL_TABLE_LENGTH = 2039;
  JArray< JArray< ::java::lang::Object * > * > * symbolTable;
  JArray< ::java::lang::String * > * tagAttributes;
  jint tagAttributePos;
  jboolean sawCR;
  jboolean inCDATA;
  static const jint XML_10 = 0;
  static const jint XML_11 = 1;
  jint xmlVersion;
public: // actually package-private
  static JArray< jchar > * startDelimComment;
  static JArray< jchar > * endDelimComment;
  static JArray< jchar > * startDelimPI;
  static JArray< jchar > * endDelimPI;
  static JArray< jchar > * endDelimCDATA;
private:
  jboolean isDirtyCurrentElement;
public:
  static ::java::lang::Class class$;
};

#endif // __gnu_xml_aelfred2_XmlParser__