summaryrefslogtreecommitdiff
path: root/src/xmlreader.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-05-09 15:01:03 +0000
committerMike Buland <eichlan@xagasoft.com>2007-05-09 15:01:03 +0000
commit2e035fee36768e3c765b7f5dc10bf0a3b7d2448b (patch)
treefde606c514a9321cd4bf0d8c075b3b1c22d3a960 /src/xmlreader.h
parent6e7e30b5fd87766566620d48e785072e0b5c52cd (diff)
downloadlibbu++-2e035fee36768e3c765b7f5dc10bf0a3b7d2448b.tar.gz
libbu++-2e035fee36768e3c765b7f5dc10bf0a3b7d2448b.tar.bz2
libbu++-2e035fee36768e3c765b7f5dc10bf0a3b7d2448b.tar.xz
libbu++-2e035fee36768e3c765b7f5dc10bf0a3b7d2448b.zip
Minor changes to both the taf and xml readers. I'm thinking I'm going to
archive these for now and resurect/fix the old xml reader, just to have something working.
Diffstat (limited to 'src/xmlreader.h')
-rw-r--r--src/xmlreader.h53
1 files changed, 52 insertions, 1 deletions
diff --git a/src/xmlreader.h b/src/xmlreader.h
index 19791c4..708a386 100644
--- a/src/xmlreader.h
+++ b/src/xmlreader.h
@@ -9,7 +9,24 @@
9namespace Bu 9namespace Bu
10{ 10{
11 /** 11 /**
12 * An Xml 1.1 reader. I've decided to write this, this time, based on the
13 * official W3C reccomendation, now included with the source code. I've
14 * named the productions in the parser states the same as in that document,
15 * which may make them easier to find, etc, although possibly slightly less
16 * optimized than writing my own reduced grammer.
12 * 17 *
18 * Below I will list differences between my parser and the official standard
19 * as I come up with them.
20 * - Encoding and Standalone headings are ignored for the moment. (4.3.3,
21 * 2.9)
22 * - The standalone heading attribute can have any standard whitespace
23 * before it (the specs say only spaces, no newlines). (2.9)
24 * - Since standalone is ignored, it is currently allowed to have any
25 * value (should be restricted to "yes" or "no"). (2.9)
26 * - Currently only UTF-8 / ascii are parsed.
27 * - [optional] The content of comments is thrown away. (2.5)
28 * - The content of processing instruction blocks is parsed properly, but
29 * thrown away. (2.6)
13 */ 30 */
14 class XmlReader 31 class XmlReader
15 { 32 {
@@ -40,11 +57,21 @@ namespace Bu
40 void XMLDecl(); 57 void XMLDecl();
41 58
42 /** 59 /**
43 * Misc things...? 60 * Misc things, Includes Comments and PIData (Processing Instructions).
44 */ 61 */
45 void Misc(); 62 void Misc();
46 63
47 /** 64 /**
65 * Comments
66 */
67 void Comment();
68
69 /**
70 * Processing Instructions
71 */
72 void PI();
73
74 /**
48 * Whitespace eater. 75 * Whitespace eater.
49 */ 76 */
50 void S(); 77 void S();
@@ -64,6 +91,30 @@ namespace Bu
64 */ 91 */
65 void Eq(); 92 void Eq();
66 93
94 /**
95 * Read in an attribute value.
96 */
97 FString AttValue();
98
99 /**
100 * Read in the name of something.
101 */
102 FString Name();
103
104 /**
105 * Encoding decleration in the header
106 */
107 void EncodingDecl();
108
109 /**
110 * Standalone decleration in the header
111 */
112 void SDDecl();
113
114 bool isS( unsigned char c )
115 {
116 return ( c == 0x20 || c == 0x9 || c == 0xD || c == 0xA );
117 }
67 }; 118 };
68} 119}
69 120