13 //allchars = [0 .. 0xFFFF];
15 lowercase = ['a' .. 'z'];
17 uppercase = ['A' .. 'Z'];
21 hex_digit = [ digit+ [['a' .. 'f'] + ['A' .. 'F']] ];
31 eol = cr lf | cr | lf; // This takes care of different platforms
35 ws = (' ' | tab | eol);
51 lsquare_bracketz = '[';
53 rsquare_bracketz = ']';
67 //exclamation = exclamationz;
69 underscore = underscorez;
75 lsquare_bracket = lsquare_bracketz;
77 rsquare_bracket = rsquare_bracketz;
99 quote = ( '"' | ''' );
103 word = ( lowercase | uppercase | dash | underscorez | digit )+;
107 xml_opencomment = lparenz exclamationz dash dash;
109 xml_closecomment = dash dash rparenz;
131 xmltag = lparen word rparen;
137 fulltag = {fulltag} opentag fulltag* word* closetag |
139 {emptytag} emptytag |
141 {comment} xmlcomment;
147 opentag = lparen nsprefix? word attribute* rparen;
149 emptytag = lparen nsprefix? word attribute* fslash rparen;
151 closetag = lparen fslash nsprefix? word rparen;
155 attribute = nsprefix? attributelhs equals attributerhs;
159 attributerhs = [left]:quote word* [right]:quote;
163 xmlcomment = xml_opencomment word* xml_closecomment;
167 nsprefix = word colon;
171 //xml_decl_schem = lparen [left]:question decl_xml attribute+ [right]:question rparen;
173 //xml_decl_dtd = lparen exclamation decl_dtd word+ rparen;
183 // 6. include document declaration ( DTD & schema )
185 // <?xml version="1.0" encoding="iso8859-1" **allow any and all characters between** ?>
187 // <!DOCTYPE greeting SYSTEM "hello.dtd" **allow any and all characters between** >
193 // [OK] multiple attributes
195 // [OK] include 2 tokens in a production rule
199 // [OK] include xml comments
205 // [OK] include namespace declarations; namespace usage in tags and attributes
207 // xmlns='' xmlns:ans='' <ans:tagname att='' />
211 // [OK] text in open/close tags