comparison tests/agcl/parsifal/xml1.syn @ 0:13d2b8934445

Import AnaGram (near-)release tree into Mercurial.
author David A. Holland
date Sat, 22 Dec 2007 17:52:45 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:13d2b8934445
1 // [1]
2 document $
3 -> prolog, element, Misc?...
4
5 // [2]
6 Char = 0x9 + 0xA + 0x20..0xd7ff + 0xe000..0xfffd + 0x0000-0x10ffff
7
8 // [3]
9 S
10 -> 0x20 + 0x9 + 0xd + 0xa...
11
12 // [4]
13 NameChar = Letter + Digit + '.' + '-' + ':' + CombiningChar + Extender
14
15 // [5]
16 Name
17 -> Letter + '_' + ':', NameChar?...
18
19 // [6]
20 Names
21 -> Name, [S, Name]...
22
23 // [7]
24 Nmtoken
25 -> NameChar...
26
27 // [8]
28 Nmtokens
29 -> Nmtoken, [S, Nmtoken]...
30
31 // [9]
32 EntityValue
33 -> '"', [~(eof + '%' + '&' + '"') | PEReference | Reference]..., '"'
34 -> '\'', [~(eof + '%' + '&' + '\'') | PEReference | Reference]..., '\''
35
36 // [10]
37 AttValue
38 -> '"', [~(eof + '%' + '&' + '"') | Reference]..., '"'
39 -> '\'', [~(eof + '%' + '&' + '\'') | Reference]..., '\''
40
41 // [11]
42 SystemLiteral
43 -> '"', ~(eof + '"')?..., '"'
44 -> '\'', ~(eof + '\'')?..., '\''
45
46 // [12]
47 PubidLiteral
48 -> '"', PubidChar?..., '"'
49 -> '\'', PubidChar?..., '\''
50
51 // [13]
52 PubidChar = 0x20 + 0xd + 0xa + 'a-z' + 'A-Z' + '0-9' +
53 '-' + '\'' + '(' + ')' + '+' + ',' + '.' +
54 '/' + ':' + '?' + ';' + '!' + '*' + '#' +
55 '@' + '$' + '_' + '%'
56
57 // [14]
58 CharData
59 -> ~(eof + '<' + '&')?...
60 // Note that use of keyword "]]>" will take care of CDATA problem
61
62 // [15]
63 Comment
64 -> "<!--", Char?..., "--", '>'
65
66 // [16]
67 PI
68 -> "<?", PITarget, [S, char?...], "?>"
69
70 // [17]
71 PITarget
72 -> Name
73 // Name lookup mechanism should reject "xml"
74
75 // [18]
76 CDSect
77 -> CDStart, CData, CDEnd
78
79 // [19]
80 CDStart
81 -> "<![CDATA["
82
83 // [20]
84 CData
85 -> Char?...
86 // Keyword recognition logic overrides character recognition
87
88 // [21]
89 -> "]]>"
90
91 // [22]
92 prolog
93 -> XMLDecl?, Misc?..., [doctypedecl, Misc?...]
94
95 // [23]
96 XMLDecl
97 -> "<?xml", VersionInfo, EncodingDecl?, SDDecl?, S?, "?>"
98
99 // [24]
100 VersionInfo
101 -> S, "version", Eq, {'\'', VersionNum, '\'' | '"', VersionNum, '"'}
102
103 // [25]
104 Eq
105 -> S?, '=', S?
106
107 // [26]
108 VersionNum
109 -> 'a-z' + 'A-Z' + '0-9' + '_' + '.' + ':' + '-'...
110
111 // [27]
112 Misc
113 -> Comment | PI | S
114
115 // [28]
116 doctypedecl
117 -> "<!DOCTYPE", S, Name, [S, ExternalID], S?,
118 [ '[', [markupdecl | PEReference | S]..., ']', S?], '>'
119
120 // [29]
121 markupdecl
122 -> elementdecl
123 -> AttlistDecl
124 -> EntityDecl
125 -> NotationDecl
126 -> PI
127 -> Comment