0001: /* The following code was generated by JFlex 1.3.5 on 7/11/04 2:35 PM */
0002:
0003: package com.bluecast.xml;
0004:
0005: import org.xml.sax.*;
0006: import org.xml.sax.helpers.*;
0007: import com.bluecast.util.*;
0008: import com.bluecast.io.*;
0009: import java.util.*;
0010: import java.io.*;
0011:
0012: /*
0013: * $Id: PiccoloLexer.flex,v 1.7 2004/07/11 09:38:00 yuvalo Exp $
0014: *
0015: * 2003-06-10 - MODIFIED to provide access to <?xml?> definition
0016: * and better track line numbers.
0017: *
0018: * (C) Copyright 2002-2004 by Yuval Oren. All rights reserved.
0019: *
0020: * Licensed under the Apache License, Version 2.0 (the "License");
0021: * you may not use this file except in compliance with the License.
0022: * You may obtain a copy of the License at
0023: *
0024: * http://www.apache.org/licenses/LICENSE-2.0
0025: *
0026: * Unless required by applicable law or agreed to in writing, software
0027: * distributed under the License is distributed on an "AS IS" BASIS,
0028: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0029: * See the License for the specific language governing permissions and
0030: * limitations under the License.
0031: */
0032:
0033: /**
0034: * This class is a scanner generated by
0035: * <a href="http://www.jflex.de/">JFlex</a> 1.3.5
0036: * on 7/11/04 2:35 PM from the specification file
0037: * <tt>file:/C:/Library/Projects/piccolo/src/com/bluecast/xml/PiccoloLexer.flex</tt>
0038: */
0039: final class PiccoloLexer {
0040: /* This jflex-skeleton MODIFIED 2003-06-10 to fix several piccolo bugs. */
0041:
0042: /** This character denotes the end of file */
0043: final public static int YYEOF = -1;
0044:
0045: /** initial size of the lookahead buffer */
0046: final private static int YY_BUFFERSIZE = 16384;
0047:
0048: /** lexical states */
0049: final public static int DTD_TAG_START = 31;
0050: final public static int CLOSE_TAG_NS = 20;
0051: final public static int DTD_IGNORE = 28;
0052: final public static int PI = 4;
0053: final public static int DTD_TAG_SQSTRING_BUFFERED = 35;
0054: final public static int TAG_VALUE_ENTITY = 11;
0055: final public static int ENTITYREF = 3;
0056: final public static int DTD_ATT_NAME = 23;
0057: final public static int DTD_TAG = 30;
0058: final public static int DTD_TAG_VALUE_EXTERNAL_ENTITY = 33;
0059: final public static int TAG = 6;
0060: final public static int TAG_VALUE_ENTITYREF = 12;
0061: final public static int YYINITIAL = 0;
0062: final public static int DTD_TAG_VALUE_PARAM_ENTITYREF = 37;
0063: final public static int TAG_NS = 8;
0064: final public static int DTD_NMTOKENS = 26;
0065: final public static int TAG_SQSTRING_NORMALIZE = 16;
0066: final public static int DTD_PUBLIC_ID = 29;
0067: final public static int XML_TAG = 1;
0068: final public static int TAG_QSTRING_NORMALIZE = 15;
0069: final public static int TAG_START = 7;
0070: final public static int DTD_COMMENT = 27;
0071: final public static int DTD_TAG_VALUE_ENTITY = 32;
0072: final public static int TAG_QSTRING_CDATA_BUFFERED = 13;
0073: final public static int TAG_SQSTRING_CDATA_BUFFERED = 14;
0074: final public static int DTD_TAG_VALUE_STD_ENTITYREF = 36;
0075: final public static int PI_WS = 5;
0076: final public static int DTD_TAG_QSTRING_BUFFERED = 34;
0077: final public static int TAG_START_NS = 9;
0078: final public static int DTD_ATTLIST_ELEMENT = 22;
0079: final public static int DTD_ATT_TYPE = 24;
0080: final public static int DTD_ENTITY_DECL = 25;
0081: final public static int TAG_QSTRING_NORMALIZE_BUFFERED = 17;
0082: final public static int TAG_SQSTRING_NORMALIZE_BUFFERED = 18;
0083: final public static int TAG_VALUE = 10;
0084: final public static int CLOSE_TAG = 19;
0085: final public static int YYINITIAL_DIRECT = 2;
0086: final public static int DTD = 21;
0087:
0088: /**
0089: * Translates characters to character classes
0090: */
0091: final private static String yycmap_packed = "\11\0\1\1\1\72\2\0\1\6\22\0\1\20\1\30\1\64\1\54"
0092: + "\1\5\1\25\1\13\1\65\1\50\1\57\1\60\1\61\1\62\1\41"
0093: + "\1\2\1\66\12\11\1\3\1\26\1\12\1\71\1\24\1\14\1\5"
0094: + "\1\36\1\53\1\43\1\44\1\31\1\46\1\56\1\4\1\34\1\4"
0095: + "\1\47\1\23\1\22\1\32\1\40\1\51\1\55\1\45\1\37\1\33"
0096: + "\1\52\2\4\1\21\1\35\1\4\1\42\1\0\1\27\1\0\1\4"
0097: + "\1\0\1\73\5\102\1\101\4\4\1\17\1\16\1\67\1\77\1\74"
0098: + "\1\75\1\4\1\70\1\100\1\76\2\4\1\15\2\4\1\0\1\63"
0099: + "\72\0\1\10\10\0\27\7\1\0\37\7\1\0\72\7\2\0\13\7"
0100: + "\2\0\10\7\1\0\65\7\1\0\104\7\11\0\44\7\3\0\2\7"
0101: + "\4\0\36\7\70\0\131\7\22\0\7\7\16\0\2\10\56\0\106\10"
0102: + "\32\0\2\10\44\0\1\7\1\10\3\7\1\0\1\7\1\0\24\7"
0103: + "\1\0\54\7\1\0\7\7\3\0\1\7\1\0\1\7\1\0\1\7"
0104: + "\1\0\1\7\1\0\22\7\15\0\14\7\1\0\102\7\1\0\14\7"
0105: + "\1\0\44\7\1\0\4\10\11\0\65\7\2\0\2\7\2\0\2\7"
0106: + "\3\0\34\7\2\0\10\7\2\0\2\7\67\0\46\7\2\0\1\7"
0107: + "\7\0\46\7\12\0\21\10\1\0\27\10\1\0\3\10\1\0\1\10"
0108: + "\1\0\2\10\1\0\1\10\13\0\33\7\5\0\3\7\56\0\32\7"
0109: + "\5\0\1\10\12\7\10\10\15\0\12\10\6\0\1\10\107\7\2\0"
0110: + "\5\7\1\0\17\7\1\0\4\7\1\0\1\7\17\10\2\7\2\10"
0111: + "\1\0\4\10\2\0\12\10\u0207\0\3\10\1\0\65\7\2\0\1\10"
0112: + "\1\7\20\10\3\0\4\10\3\0\12\7\2\10\2\0\12\10\21\0"
0113: + "\3\10\1\0\10\7\2\0\2\7\2\0\26\7\1\0\7\7\1\0"
0114: + "\1\7\3\0\4\7\2\0\1\10\1\0\7\10\2\0\2\10\2\0"
0115: + "\3\10\11\0\1\10\4\0\2\7\1\0\3\7\2\10\2\0\12\10"
0116: + "\2\7\20\0\1\10\2\0\6\7\4\0\2\7\2\0\26\7\1\0"
0117: + "\7\7\1\0\2\7\1\0\2\7\1\0\2\7\2\0\1\10\1\0"
0118: + "\5\10\4\0\2\10\2\0\3\10\13\0\4\7\1\0\1\7\7\0"
0119: + "\12\10\2\10\3\7\14\0\3\10\1\0\7\7\1\0\1\7\1\0"
0120: + "\3\7\1\0\26\7\1\0\7\7\1\0\2\7\1\0\5\7\2\0"
0121: + "\1\10\1\7\10\10\1\0\3\10\1\0\3\10\22\0\1\7\5\0"
0122: + "\12\10\21\0\3\10\1\0\10\7\2\0\2\7\2\0\26\7\1\0"
0123: + "\7\7\1\0\2\7\2\0\4\7\2\0\1\10\1\7\6\10\3\0"
0124: + "\2\10\2\0\3\10\10\0\2\10\4\0\2\7\1\0\3\7\4\0"
0125: + "\12\10\22\0\2\10\1\0\6\7\3\0\3\7\1\0\4\7\3\0"
0126: + "\2\7\1\0\1\7\1\0\2\7\3\0\2\7\3\0\3\7\3\0"
0127: + "\10\7\1\0\3\7\4\0\5\10\3\0\3\10\1\0\4\10\11\0"
0128: + "\1\10\17\0\11\10\21\0\3\10\1\0\10\7\1\0\3\7\1\0"
0129: + "\27\7\1\0\12\7\1\0\5\7\4\0\7\10\1\0\3\10\1\0"
0130: + "\4\10\7\0\2\10\11\0\2\7\4\0\12\10\22\0\2\10\1\0"
0131: + "\10\7\1\0\3\7\1\0\27\7\1\0\12\7\1\0\5\7\4\0"
0132: + "\7\10\1\0\3\10\1\0\4\10\7\0\2\10\7\0\1\7\1\0"
0133: + "\2\7\4\0\12\10\22\0\2\10\1\0\10\7\1\0\3\7\1\0"
0134: + "\27\7\1\0\20\7\4\0\6\10\2\0\3\10\1\0\4\10\11\0"
0135: + "\1\10\10\0\2\7\4\0\12\10\221\0\56\7\1\0\1\7\1\10"
0136: + "\2\7\7\10\5\0\6\7\1\10\10\10\1\0\12\10\47\0\2\7"
0137: + "\1\0\1\7\2\0\2\7\1\0\1\7\2\0\1\7\6\0\4\7"
0138: + "\1\0\7\7\1\0\3\7\1\0\1\7\1\0\1\7\2\0\2\7"
0139: + "\1\0\2\7\1\0\1\7\1\10\2\7\6\10\1\0\2\10\1\7"
0140: + "\2\0\5\7\1\0\1\10\1\0\6\10\2\0\12\10\76\0\2\10"
0141: + "\6\0\12\10\13\0\1\10\1\0\1\10\1\0\1\10\4\0\2\10"
0142: + "\10\7\1\0\41\7\7\0\24\10\1\0\6\10\4\0\6\10\1\0"
0143: + "\1\10\1\0\25\10\3\0\7\10\1\0\1\10\346\0\46\7\12\0"
0144: + "\47\7\11\0\1\7\1\0\2\7\1\0\3\7\1\0\1\7\1\0"
0145: + "\2\7\1\0\5\7\51\0\1\7\1\0\1\7\1\0\1\7\13\0"
0146: + "\1\7\1\0\1\7\1\0\1\7\3\0\2\7\3\0\1\7\5\0"
0147: + "\3\7\1\0\1\7\1\0\1\7\1\0\1\7\1\0\1\7\3\0"
0148: + "\2\7\3\0\2\7\1\0\1\7\50\0\1\7\11\0\1\7\2\0"
0149: + "\1\7\2\0\2\7\7\0\2\7\1\0\1\7\1\0\7\7\50\0"
0150: + "\1\7\4\0\1\7\10\0\1\7\u0c06\0\234\7\4\0\132\7\6\0"
0151: + "\26\7\2\0\6\7\2\0\46\7\2\0\6\7\2\0\10\7\1\0"
0152: + "\1\7\1\0\1\7\1\0\1\7\1\0\37\7\2\0\65\7\1\0"
0153: + "\7\7\1\0\1\7\3\0\3\7\1\0\7\7\3\0\4\7\2\0"
0154: + "\6\7\4\0\15\7\5\0\3\7\1\0\7\7\323\0\15\10\4\0"
0155: + "\1\10\104\0\1\7\3\0\2\7\2\0\1\7\121\0\3\7\u0e82\0"
0156: + "\1\10\1\0\1\7\31\0\11\7\6\10\1\0\5\10\13\0\124\7"
0157: + "\4\0\2\10\2\0\2\10\2\0\132\7\1\0\3\10\6\0\50\7"
0158: + "\u1cd3\0\u51a6\7\u0c5a\0\u2ba4\7\u285c\0";
0159:
0160: /**
0161: * Translates characters to character classes
0162: */
0163: final private static char[] yycmap = yy_unpack_cmap(yycmap_packed);
0164:
0165: /**
0166: * Translates a state to a row index in the transition table
0167: */
0168: final private static int yy_rowMap[] = { 0, 67, 134, 201, 268, 335,
0169: 402, 469, 536, 603, 670, 737, 804, 871, 938, 1005, 1072,
0170: 1139, 1206, 1273, 1340, 1407, 1474, 1541, 1608, 1675, 1742,
0171: 1809, 1876, 1943, 2010, 2077, 2144, 2211, 2278, 2345, 2412,
0172: 2479, 2546, 2546, 2546, 2546, 2613, 2680, 2546, 2546, 2747,
0173: 2814, 2881, 2948, 3015, 3082, 3149, 3216, 3283, 3350, 3417,
0174: 3484, 2546, 3551, 3618, 3685, 3752, 3819, 3886, 3953, 4020,
0175: 2546, 4087, 4154, 4221, 4288, 4355, 4422, 4489, 2546, 2546,
0176: 4556, 4623, 4690, 4757, 4824, 4891, 4958, 5025, 2546, 5092,
0177: 5159, 5226, 5293, 2546, 5360, 5427, 5494, 2546, 5561, 5628,
0178: 2546, 5695, 5762, 5829, 5896, 2546, 5963, 2546, 6030, 2546,
0179: 6097, 6164, 6231, 6298, 6365, 6432, 2546, 6499, 6566, 6633,
0180: 6700, 2546, 6767, 6834, 6901, 2546, 2546, 6968, 7035, 7102,
0181: 7169, 7236, 7303, 7370, 7437, 2546, 7504, 7571, 7638, 7705,
0182: 7772, 7839, 2546, 7906, 7973, 2546, 2546, 2546, 2546, 8040,
0183: 8107, 8174, 8241, 8308, 2546, 2546, 8375, 8442, 8509, 8576,
0184: 2546, 2546, 2546, 8643, 8710, 8777, 2613, 2680, 2546, 2747,
0185: 2546, 8844, 8911, 8978, 9045, 9112, 9179, 9246, 3149, 3216,
0186: 2546, 2546, 2546, 9313, 9380, 9447, 9514, 9581, 9648, 9715,
0187: 9782, 9849, 2546, 9916, 9983, 10050, 4355, 4422, 2546,
0188: 2546, 4556, 2546, 10117, 10184, 10251, 10318, 10385, 10452,
0189: 10519, 2546, 5360, 2546, 5695, 2546, 5896, 5963, 10586,
0190: 10653, 2546, 10720, 10787, 10854, 10921, 10988, 11055,
0191: 11122, 11189, 11256, 6968, 7035, 11323, 11390, 7303, 2546,
0192: 7370, 11457, 11524, 11591, 11658, 11725, 11792, 11859,
0193: 11926, 11993, 12060, 12127, 12194, 2546, 12261, 12328,
0194: 12395, 12462, 12529, 12596, 12663, 2546, 8710, 2546, 8777,
0195: 2546, 2546, 2546, 12730, 12797, 12864, 12931, 2546, 12998,
0196: 13065, 13132, 13199, 13266, 13333, 13400, 13467, 13534,
0197: 2546, 2546, 13601, 13668, 13735, 13802, 2546, 2546, 2546,
0198: 2546, 13869, 13936, 14003, 14070, 14137, 14204, 2546, 2546,
0199: 14271, 14338, 14405, 14472, 14539, 6901, 14606, 14673,
0200: 14740, 14807, 14874, 14941, 15008, 15075, 15142, 15209,
0201: 15276, 15343, 2546, 2546, 2546, 15410, 15477, 15544, 15611,
0202: 15678, 15745, 15812, 15879, 15946, 2546, 2546, 16013,
0203: 16080, 16147, 16214, 16281, 16348, 16415, 16482, 16549,
0204: 16616, 16683, 16750, 16817, 16884, 16951, 17018, 17085,
0205: 17152, 17219, 17286, 17353, 17420, 17487, 17554, 2546,
0206: 2546, 2546, 2546, 17621, 17688, 17755, 17822, 2546, 2546,
0207: 17889, 17956, 18023, 18090, 2546, 6901, 18157, 6901, 18224,
0208: 18291, 18358, 18425, 18492, 18559, 18626, 18693, 2546,
0209: 18760, 18827, 18894, 18961, 2546, 19028, 19095, 19162,
0210: 19229, 19296, 19363, 2546, 19430, 19497, 2546, 19564,
0211: 19631, 6901, 6901, 6901, 19698, 19765, 2546, 19832, 19899,
0212: 19966, 20033, 20100, 20167, 20234, 20301, 2546, 2546,
0213: 20368, 20435, 20502, 20569, 6901, 20636, 20703, 2546,
0214: 20770, 2546, 20837, 20904, 2546, 20971, 2546, 2546, 2546,
0215: 6901, 2546, 21038, 2546, 21105, 2546, 20971, 2546, 2546 };
0216:
0217: /**
0218: * The packed transition table of the DFA (part 0)
0219: */
0220: final private static String yy_packed0 = "\1\47\1\50\4\47\1\50\3\47\1\51\1\52\4\47"
0221: + "\1\50\51\47\1\50\10\47\14\53\1\54\66\53\12\55"
0222: + "\1\51\1\52\67\55\3\56\2\57\2\56\1\57\5\56"
0223: + "\2\57\1\60\1\56\3\57\5\56\10\57\2\56\5\57"
0224: + "\1\56\3\57\1\61\2\57\10\56\2\57\2\56\1\62"
0225: + "\1\57\1\63\3\57\1\64\1\57\14\65\1\66\66\65"
0226: + "\1\56\1\67\4\56\1\67\5\56\1\70\3\56\1\67"
0227: + "\51\56\1\67\11\56\1\71\1\56\2\72\1\56\1\71"
0228: + "\1\72\5\56\3\72\1\71\3\72\1\73\4\56\10\72"
0229: + "\2\56\5\72\1\56\3\72\1\56\2\72\7\56\1\74"
0230: + "\2\72\1\56\1\71\10\72\3\56\2\75\2\56\1\75"
0231: + "\4\56\1\76\3\75\1\56\3\75\4\56\1\77\10\75"
0232: + "\2\56\5\75\1\56\3\75\1\56\2\75\7\56\1\100"
0233: + "\2\75\2\56\10\75\1\56\1\71\1\56\1\101\1\102"
0234: + "\1\56\1\71\1\102\5\56\1\103\2\102\1\71\3\102"
0235: + "\1\104\4\56\10\102\2\56\5\102\1\56\3\102\1\56"
0236: + "\2\102\7\56\1\105\2\102\1\56\1\71\10\102\3\56"
0237: + "\1\106\1\107\2\56\1\107\4\56\1\76\3\107\1\56"
0238: + "\3\107\4\56\1\77\10\107\2\56\5\107\1\56\3\107"
0239: + "\1\56\2\107\7\56\1\110\2\107\2\56\10\107\1\56"
0240: + "\1\111\4\56\1\111\11\56\1\111\50\56\1\112\1\111"
0241: + "\10\56\1\113\1\114\4\113\1\114\3\113\1\56\1\115"
0242: + "\56\113\1\114\10\113\3\56\2\116\2\56\1\116\5\56"
0243: + "\2\116\1\117\1\56\3\116\5\56\10\116\2\56\5\116"
0244: + "\1\56\3\116\1\120\2\116\10\56\2\116\2\56\1\121"
0245: + "\1\116\1\122\3\116\1\123\1\116\1\124\1\125\4\124"
0246: + "\1\125\3\124\1\56\1\126\50\124\1\127\5\124\1\125"
0247: + "\10\124\1\130\1\125\4\130\1\125\3\130\1\56\1\126"
0248: + "\51\130\1\127\4\130\1\125\10\130\1\131\1\132\4\131"
0249: + "\1\132\3\131\1\56\1\133\4\131\1\132\43\131\1\134"
0250: + "\5\131\1\132\10\131\1\135\1\136\4\135\1\136\3\135"
0251: + "\1\56\1\137\4\135\1\136\44\135\1\134\4\135\1\136"
0252: + "\10\135\1\140\1\141\4\140\1\141\3\140\1\56\1\142"
0253: + "\4\140\1\141\43\140\1\143\5\140\1\141\10\140\1\144"
0254: + "\1\145\4\144\1\145\3\144\1\56\1\142\4\144\1\145"
0255: + "\44\144\1\143\4\144\1\145\10\144\1\56\1\146\4\56"
0256: + "\1\146\11\56\1\146\3\56\1\147\45\56\1\146\11\56"
0257: + "\1\150\4\56\1\150\11\56\1\150\3\56\1\151\45\56"
0258: + "\1\150\11\56\1\152\4\56\1\152\3\56\1\153\5\56"
0259: + "\1\152\4\56\1\154\1\56\1\155\42\56\1\152\11\56"
0260: + "\1\152\1\56\2\156\1\56\1\152\1\156\5\56\3\156"
0261: + "\1\152\3\156\1\56\1\157\3\56\10\156\2\56\5\156"
0262: + "\1\56\3\156\1\56\2\156\10\56\2\156\1\56\1\152"
0263: + "\10\156\1\56\1\152\1\56\1\160\1\161\1\56\1\152"
0264: + "\1\161\5\56\3\161\1\152\3\161\1\162\1\157\3\56"
0265: + "\10\161\2\56\5\161\1\56\3\161\1\56\2\161\10\56"
0266: + "\2\161\1\56\1\152\10\161\1\56\1\152\4\56\1\152"
0267: + "\11\56\1\152\4\56\1\157\3\56\1\163\1\164\1\56"
0268: + "\1\165\6\56\1\166\4\56\1\167\21\56\1\152\11\56"
0269: + "\1\152\1\56\2\170\1\56\1\152\1\170\5\56\3\170"
0270: + "\1\152\3\170\1\56\1\171\3\56\10\170\2\56\5\170"
0271: + "\1\56\3\170\1\56\2\170\10\56\2\170\1\56\1\152"
0272: + "\10\170\1\56\1\152\3\172\1\56\1\152\3\172\3\56"
0273: + "\3\172\1\152\3\172\1\56\1\157\3\56\11\172\1\56"
0274: + "\5\172\1\56\3\172\1\56\2\172\1\173\3\56\1\174"
0275: + "\3\56\2\172\1\56\1\152\10\172\41\175\1\176\41\175"
0276: + "\12\177\1\200\14\177\1\201\53\177\1\56\1\152\4\56"
0277: + "\1\152\11\56\1\152\43\56\1\202\1\203\4\56\1\152"
0278: + "\11\56\1\204\1\56\2\172\1\56\1\204\1\172\4\56"
0279: + "\1\205\3\172\1\204\3\172\1\162\1\157\3\56\1\206"
0280: + "\1\207\1\172\1\210\1\172\1\211\1\212\1\172\1\56"
0281: + "\1\213\5\172\1\214\1\215\2\172\1\216\2\172\1\217"
0282: + "\1\220\1\221\1\222\1\174\1\223\1\224\1\56\2\172"
0283: + "\1\56\1\204\10\172\14\56\1\225\13\56\1\226\52\56"
0284: + "\13\227\1\230\11\227\1\231\55\227\1\232\1\233\4\232"
0285: + "\1\234\11\232\1\233\51\232\1\233\10\232\13\235\1\236"
0286: + "\11\235\1\237\36\235\1\240\16\235\13\241\1\236\11\241"
0287: + "\1\237\37\241\1\240\15\241\3\56\2\242\2\56\1\242"
0288: + "\5\56\3\242\1\56\3\242\5\56\10\242\2\56\5\242"
0289: + "\1\56\3\242\1\120\2\242\10\56\2\242\2\56\10\242"
0290: + "\3\56\2\243\2\56\1\243\5\56\3\243\1\56\3\243"
0291: + "\5\56\10\243\2\56\5\243\1\56\3\243\1\56\2\243"
0292: + "\10\56\2\243\2\56\10\243\103\0\14\244\1\245\102\244"
0293: + "\1\245\7\244\1\246\56\244\2\0\3\247\2\0\3\247"
0294: + "\3\0\3\247\1\0\3\247\2\0\1\250\2\0\11\247"
0295: + "\1\0\5\247\1\0\3\247\1\0\2\247\10\0\2\247"
0296: + "\2\0\10\247\2\0\3\247\2\0\3\247\3\0\3\247"
0297: + "\1\0\3\247\2\0\1\250\2\0\11\247\1\0\5\247"
0298: + "\1\0\3\247\1\0\2\247\10\0\2\247\2\0\5\247"
0299: + "\1\251\2\247\11\0\1\252\3\0\1\253\67\0\3\247"
0300: + "\2\0\3\247\3\0\1\247\1\254\1\247\1\0\3\247"
0301: + "\2\0\1\250\2\0\11\247\1\0\5\247\1\0\3\247"
0302: + "\1\0\2\247\10\0\2\247\2\0\1\247\1\255\6\247"
0303: + "\2\0\3\247\2\0\3\247\3\0\3\247\1\0\3\247"
0304: + "\2\0\1\250\2\0\11\247\1\0\5\247\1\0\3\247"
0305: + "\1\0\2\247\10\0\2\247\2\0\3\247\1\256\4\247"
0306: + "\2\0\3\247\2\0\3\247\3\0\3\247\1\0\3\247"
0307: + "\2\0\1\250\2\0\11\247\1\0\5\247\1\0\3\247"
0308: + "\1\0\2\247\10\0\2\247\2\0\5\247\1\257\2\247"
0309: + "\14\260\1\261\102\260\1\261\7\260\1\262\56\260\1\0"
0310: + "\1\67\4\0\1\67\11\0\1\67\51\0\1\67\34\0"
0311: + "\1\263\57\0\1\71\4\0\1\71\11\0\1\71\51\0"
0312: + "\1\71\12\0\3\72\2\0\3\72\3\0\3\72\1\0"
0313: + "\3\72\5\0\11\72\1\0\5\72\1\0\3\72\1\0"
0314: + "\2\72\10\0\2\72\2\0\10\72\24\0\1\264\60\0"
0315: + "\3\75\2\0\3\75\3\0\3\75\1\0\3\75\5\0"
0316: + "\11\75\1\0\5\75\1\0\3\75\1\0\2\75\10\0"
0317: + "\2\75\2\0\10\75\3\0\2\265\2\0\1\265\5\0"
0318: + "\1\266\2\265\1\0\1\267\2\265\5\0\10\265\2\0"
0319: + "\5\265\1\0\3\265\1\0\2\265\10\0\2\265\2\0"
0320: + "\10\265\41\0\1\270\1\271\1\0\1\272\41\0\2\273"
0321: + "\2\0\1\273\5\0\3\273\1\0\3\273\5\0\10\273"
0322: + "\2\0\5\273\1\0\3\273\1\0\2\273\10\0\2\273"
0323: + "\2\0\10\273\2\0\3\101\2\0\3\101\3\0\3\101"
0324: + "\1\0\3\101\5\0\11\101\1\0\5\101\1\0\3\101"
0325: + "\1\0\2\101\10\0\2\101\2\0\10\101\2\0\1\102"
0326: + "\1\274\1\102\2\0\3\102\3\0\3\102\1\0\3\102"
0327: + "\5\0\11\102\1\0\5\102\1\0\3\102\1\0\2\102"
0328: + "\10\0\2\102\2\0\10\102\2\0\1\102\1\274\1\102"
0329: + "\2\0\3\102\3\0\1\102\1\275\1\102\1\0\3\102"
0330: + "\5\0\11\102\1\0\5\102\1\0\3\102\1\0\2\102"
0331: + "\10\0\2\102\2\0\10\102\24\0\1\276\60\0\3\106"
0332: + "\2\0\3\106\3\0\3\106\1\0\3\106\5\0\11\106"
0333: + "\1\0\5\106\1\0\3\106\1\0\2\106\10\0\2\106"
0334: + "\2\0\10\106\2\0\1\107\1\277\1\107\2\0\3\107"
0335: + "\3\0\3\107\1\0\3\107\5\0\11\107\1\0\5\107"
0336: + "\1\0\3\107\1\0\2\107\10\0\2\107\2\0\10\107"
0337: + "\3\0\1\300\1\301\2\0\1\301\5\0\3\301\1\0"
0338: + "\3\301\5\0\10\301\2\0\5\301\1\0\3\301\1\0"
0339: + "\2\301\10\0\2\301\2\0\10\301\1\0\1\302\4\0"
0340: + "\1\302\11\0\1\302\50\0\1\303\1\302\11\0\1\303"
0341: + "\4\0\1\303\11\0\1\303\43\0\1\304\1\305\4\0"
0342: + "\1\303\10\0\1\113\1\0\4\113\1\0\3\113\2\0"
0343: + "\56\113\1\0\10\113\2\0\3\306\2\0\3\306\3\0"
0344: + "\3\306\1\0\3\306\2\0\1\307\2\0\11\306\1\0"
0345: + "\5\306\1\0\3\306\1\0\2\306\10\0\2\306\2\0"
0346: + "\10\306\2\0\3\306\2\0\3\306\3\0\3\306\1\0"
0347: + "\3\306\2\0\1\307\2\0\11\306\1\0\5\306\1\0"
0348: + "\3\306\1\0\2\306\10\0\2\306\2\0\5\306\1\310"
0349: + "\2\306\11\0\1\311\3\0\1\312\67\0\3\306\2\0"
0350: + "\3\306\3\0\1\306\1\313\1\306\1\0\3\306\2\0"
0351: + "\1\307\2\0\11\306\1\0\5\306\1\0\3\306\1\0"
0352: + "\2\306\10\0\2\306\2\0\1\306\1\314\6\306\2\0"
0353: + "\3\306\2\0\3\306\3\0\3\306\1\0\3\306\2\0"
0354: + "\1\307\2\0\11\306\1\0\5\306\1\0\3\306\1\0"
0355: + "\2\306\10\0\2\306\2\0\3\306\1\315\4\306\2\0"
0356: + "\3\306\2\0\3\306\3\0\3\306\1\0\3\306\2\0"
0357: + "\1\307\2\0\11\306\1\0\5\306\1\0\3\306\1\0"
0358: + "\2\306\10\0\2\306\2\0\5\306\1\316\2\306\1\124"
0359: + "\1\0\4\124\1\0\3\124\2\0\50\124\1\0\5\124"
0360: + "\1\0\10\124\1\0\1\125\4\0\1\125\63\0\1\125"
0361: + "\11\0\1\317\4\0\1\317\11\0\1\317\3\0\1\317"
0362: + "\41\0\1\317\3\0\1\317\10\0\1\130\1\0\4\130"
0363: + "\1\0\3\130\2\0\51\130\1\0\4\130\1\0\10\130"
0364: + "\1\131\1\0\4\131\1\0\3\131\2\0\4\131\1\0"
0365: + "\43\131\1\0\5\131\1\0\10\131\1\0\1\132\4\0"
0366: + "\1\132\11\0\1\132\43\0\1\320\5\0\1\132\11\0"
0367: + "\1\321\4\0\1\321\11\0\1\321\3\0\1\321\41\0"
0368: + "\1\321\3\0\1\321\10\0\1\135\1\0\4\135\1\0"
0369: + "\3\135\2\0\4\135\1\0\44\135\1\0\4\135\1\0"
0370: + "\10\135\1\0\1\136\4\0\1\136\11\0\1\136\44\0"
0371: + "\1\320\4\0\1\136\10\0\1\140\1\0\4\140\1\0"
0372: + "\3\140\2\0\4\140\1\0\43\140\1\0\5\140\1\0"
0373: + "\10\140\1\0\1\141\4\0\1\141\11\0\1\141\43\0"
0374: + "\1\322\5\0\1\141\11\0\1\323\4\0\1\323\11\0"
0375: + "\1\323\3\0\1\323\41\0\1\323\3\0\1\323\10\0"
0376: + "\1\144\1\0\4\144\1\0\3\144\2\0\4\144\1\0"
0377: + "\44\144\1\0\4\144\1\0\10\144\1\0\1\145\4\0"
0378: + "\1\145\11\0\1\145\44\0\1\322\4\0\1\145\11\0"
0379: + "\1\324\4\0\1\324\11\0\1\324\3\0\1\147\45\0"
0380: + "\1\324\11\0\1\325\4\0\1\325\11\0\1\325\3\0"
0381: + "\1\151\45\0\1\325\11\0\1\152\4\0\1\152\11\0"
0382: + "\1\152\51\0\1\152\13\0\2\326\2\0\1\326\5\0"
0383: + "\3\326\1\0\3\326\5\0\10\326\2\0\5\326\1\0"
0384: + "\3\326\1\0\2\326\10\0\2\326\2\0\10\326\1\0"
0385: + "\1\327\4\0\1\327\11\0\1\327\3\0\1\330\2\0"
0386: + "\1\331\42\0\1\327\12\0\3\156\2\0\3\156\3\0"
0387: + "\3\156\1\0\3\156\5\0\11\156\1\0\5\156\1\0"
0388: + "\3\156\1\0\2\156\10\0\2\156\2\0\10\156\3\0"
0389: + "\2\332\2\0\1\332\5\0\3\332\1\0\3\332\5\0"
0390: + "\10\332\2\0\5\332\1\0\3\332\1\0\2\332\10\0"
0391: + "\2\332\2\0\10\332\2\0\3\160\2\0\3\160\3\0"
0392: + "\3\160\1\0\3\160\5\0\11\160\1\0\5\160\1\0"
0393: + "\3\160\1\0\2\160\10\0\2\160\2\0\10\160\2\0"
0394: + "\1\161\1\333\1\161\2\0\3\161\3\0\3\161\1\0"
0395: + "\3\161\5\0\11\161\1\0\5\161\1\0\3\161\1\0"
0396: + "\2\161\10\0\2\161\2\0\10\161\32\0\1\334\72\0"
0397: + "\1\335\15\0\1\336\106\0\1\337\102\0\1\340\40\0"
0398: + "\3\170\2\0\3\170\3\0\3\170\1\0\3\170\5\0"
0399: + "\11\170\1\0\5\170\1\0\3\170\1\0\2\170\10\0"
0400: + "\2\170\2\0\10\170\1\0\1\341\1\0\2\332\2\0"
0401: + "\1\332\5\0\3\332\1\341\3\332\5\0\10\332\2\0"
0402: + "\5\332\1\0\3\332\1\0\2\332\10\0\2\332\1\0"
0403: + "\1\341\10\332\2\0\3\172\2\0\3\172\3\0\3\172"
0404: + "\1\0\3\172\5\0\11\172\1\0\5\172\1\0\3\172"
0405: + "\1\0\2\172\10\0\2\172\2\0\10\172\41\342\1\343"
0406: + "\102\342\1\344\41\342\12\177\1\0\14\177\1\0\53\177"
0407: + "\30\0\1\345\101\0\1\331\55\0\5\346\2\0\1\346"
0408: + "\2\0\10\346\1\0\2\346\1\0\12\346\1\0\20\346"
0409: + "\1\0\1\347\16\346\2\0\5\350\2\0\1\350\2\0"
0410: + "\10\350\1\0\2\350\1\0\12\350\1\0\20\350\2\0"
0411: + "\1\347\15\350\1\0\1\204\4\0\1\204\11\0\1\204"
0412: + "\21\0\1\213\27\0\1\204\12\0\3\172\2\0\3\172"
0413: + "\3\0\3\172\1\0\1\172\1\351\1\172\5\0\11\172"
0414: + "\1\0\5\172\1\0\3\172\1\0\2\172\10\0\2\172"
0415: + "\2\0\10\172\2\0\3\172\2\0\3\172\3\0\3\172"
0416: + "\1\0\3\172\5\0\7\172\1\352\1\172\1\0\1\172"
0417: + "\1\353\3\172\1\0\3\172\1\0\2\172\10\0\2\172"
0418: + "\2\0\10\172\2\0\3\172\2\0\3\172\3\0\3\172"
0419: + "\1\0\3\172\5\0\1\172\1\354\7\172\1\0\5\172"
0420: + "\1\0\3\172\1\0\1\172\1\355\10\0\2\172\2\0"
0421: + "\10\172\2\0\3\172\2\0\3\172\3\0\3\172\1\0"
0422: + "\3\172\5\0\1\172\1\356\7\172\1\0\5\172\1\0"
0423: + "\3\172\1\0\2\172\10\0\2\172\2\0\10\172\2\0"
0424: + "\3\172\2\0\3\172\3\0\3\172\1\0\3\172\5\0"
0425: + "\4\172\1\357\4\172\1\0\5\172\1\0\3\172\1\0"
0426: + "\2\172\10\0\2\172\2\0\10\172\1\0\1\213\4\0"
0427: + "\1\213\11\0\1\213\51\0\1\213\12\0\3\172\2\0"
0428: + "\3\172\3\0\3\172\1\0\3\172\5\0\11\172\1\0"
0429: + "\5\172\1\0\1\172\1\360\1\172\1\0\2\172\10\0"
0430: + "\2\172\2\0\10\172\34\0\1\361\10\0\1\362\1\363"
0431: + "\2\0\1\364\31\0\13\223\1\0\11\223\1\0\36\223"
0432: + "\1\365\16\223\13\224\1\0\11\224\1\0\37\224\1\365"
0433: + "\15\224\3\0\2\366\2\0\1\366\5\0\1\367\2\366"
0434: + "\1\0\1\370\2\366\5\0\10\366\2\0\5\366\1\0"
0435: + "\3\366\1\0\2\366\10\0\2\366\2\0\10\366\31\0"
0436: + "\1\371\1\372\3\0\1\373\2\0\1\374\1\375\40\0"
0437: + "\13\227\1\0\11\227\1\0\55\227\13\232\1\0\11\232"
0438: + "\1\0\55\232\1\0\1\233\4\0\1\233\11\0\1\233"
0439: + "\51\0\1\233\10\0\1\232\1\234\4\232\1\234\4\232"
0440: + "\1\0\4\232\1\234\4\232\1\0\44\232\1\234\10\232"
0441: + "\13\235\1\0\11\235\1\0\36\235\1\0\16\235\13\241"
0442: + "\1\0\11\241\1\0\37\241\1\0\15\241\2\0\3\376"
0443: + "\2\0\3\376\3\0\3\376\1\0\3\376\2\0\1\377"
0444: + "\2\0\11\376\1\0\5\376\1\0\3\376\1\0\2\376"
0445: + "\10\0\2\376\2\0\10\376\2\0\3\u0100\2\0\3\u0100"
0446: + "\3\0\3\u0100\1\0\3\u0100\2\0\1\u0101\2\0\11\u0100"
0447: + "\1\0\5\u0100\1\0\3\u0100\1\0\2\u0100\10\0\2\u0100"
0448: + "\2\0\10\u0100\2\0\3\247\2\0\3\247\3\0\3\247"
0449: + "\1\0\3\247\2\0\1\u0102\2\0\11\247\1\0\5\247"
0450: + "\1\0\3\247\1\0\2\247\10\0\2\247\2\0\10\247"
0451: + "\11\0\1\252\14\0\1\u0103\65\0\1\u0104\17\0\1\u0104"
0452: + "\4\0\1\u0104\4\0\2\u0104\1\0\1\u0104\4\0\1\u0104"
0453: + "\17\0\1\u0104\6\0\1\u0104\2\0\3\247\2\0\3\247"
0454: + "\3\0\3\247\1\0\3\247\2\0\1\250\2\0\11\247"
0455: + "\1\0\5\247\1\0\3\247\1\0\2\247\10\0\2\247"
0456: + "\2\0\1\247\1\u0105\6\247\2\0\3\247\2\0\3\247"
0457: + "\3\0\3\247\1\0\3\247\2\0\1\250\2\0\11\247"
0458: + "\1\0\5\247\1\0\3\247\1\0\2\247\10\0\2\247"
0459: + "\2\0\4\247\1\u0106\3\247\2\0\3\247\2\0\3\247"
0460: + "\3\0\3\247\1\0\3\247\2\0\1\250\2\0\11\247"
0461: + "\1\0\5\247\1\0\3\247\1\0\2\247\10\0\2\247"
0462: + "\2\0\4\247\1\u0107\3\247\2\0\3\247\2\0\3\247"
0463: + "\3\0\3\247\1\0\3\247\2\0\1\u0108\2\0\11\247"
0464: + "\1\0\5\247\1\0\3\247\1\0\2\247\10\0\2\247"
0465: + "\2\0\10\247\2\0\3\265\2\0\3\265\3\0\3\265"
0466: + "\1\0\3\265\5\0\11\265\1\0\5\265\1\0\3\265"
0467: + "\1\0\2\265\10\0\2\265\2\0\10\265\2\0\3\265"
0468: + "\2\0\3\265\3\0\1\265\1\u0109\1\265\1\0\1\265"
0469: + "\1\u010a\1\265\5\0\11\265\1\0\5\265\1\0\3\265"
0470: + "\1\0\2\265\10\0\2\265\2\0\10\265\2\0\3\265"
0471: + "\2\0\3\265\3\0\1\265\1\u010a\1\265\1\0\1\265"
0472: + "\1\u010a\1\265\5\0\11\265\1\0\5\265\1\0\3\265"
0473: + "\1\0\2\265\10\0\2\265\2\0\10\265\41\0\1\u010b"
0474: + "\104\0\1\u010c\77\0\1\u010d\44\0\3\273\2\0\3\273"
0475: + "\3\0\3\273\1\0\3\273\5\0\11\273\1\0\5\273"
0476: + "\1\0\3\273\1\0\2\273\10\0\2\273\2\0\10\273"
0477: + "\2\0\2\101\1\u010e\2\0\1\u010e\2\101\3\0\3\u010e"
0478: + "\1\0\3\u010e\5\0\10\u010e\1\101\1\0\5\u010e\1\0"
0479: + "\3\u010e\1\0\2\u010e\10\0\2\u010e\2\0\10\u010e\2\0"
0480: + "\1\102\1\274\1\102\2\0\3\102\3\0\2\102\1\u010f"
0481: + "\1\0\3\102\5\0\11\102\1\0\5\102\1\0\3\102"
0482: + "\1\0\2\102\10\0\2\102\2\0\10\102\2\0\2\106"
0483: + "\1\u0110\2\0\1\u0110\2\106\3\0\3\u0110\1\0\3\u0110"
0484: + "\5\0\10\u0110\1\106\1\0\5\u0110\1\0\3\u0110\1\0"
0485: + "\2\u0110\10\0\2\u0110\2\0\10\u0110\2\0\3\300\2\0"
0486: + "\3\300\3\0\3\300\1\0\3\300\5\0\11\300\1\0"
0487: + "\5\300\1\0\3\300\1\0\2\300\10\0\2\300\2\0"
0488: + "\10\300\2\0\1\301\1\u0111\1\301\2\0\3\301\3\0"
0489: + "\3\301\1\0\3\301\5\0\11\301\1\0\5\301\1\0"
0490: + "\3\301\1\0\2\301\10\0\2\301\2\0\10\301\2\0"
0491: + "\3\306\2\0\3\306\3\0\3\306\1\0\3\306\2\0"
0492: + "\1\u0112\2\0\11\306\1\0\5\306\1\0\3\306\1\0"
0493: + "\2\306\10\0\2\306\2\0\10\306\11\0\1\311\14\0"
0494: + "\1\u0113\65\0\1\u0114\17\0\1\u0114\4\0\1\u0114\4\0"
0495: + "\2\u0114\1\0\1\u0114\4\0\1\u0114\17\0\1\u0114\6\0"
0496: + "\1\u0114\2\0\3\306\2\0\3\306\3\0\3\306\1\0"
0497: + "\3\306\2\0\1\307\2\0\11\306\1\0\5\306\1\0"
0498: + "\3\306\1\0\2\306\10\0\2\306\2\0\1\306\1\u0115"
0499: + "\6\306\2\0\3\306\2\0\3\306\3\0\3\306\1\0"
0500: + "\3\306\2\0\1\307\2\0\11\306\1\0\5\306\1\0"
0501: + "\3\306\1\0\2\306\10\0\2\306\2\0\4\306\1\u0116"
0502: + "\3\306\2\0\3\306\2\0\3\306\3\0\3\306\1\0"
0503: + "\3\306\2\0\1\307\2\0\11\306\1\0\5\306\1\0"
0504: + "\3\306\1\0\2\306\10\0\2\306\2\0\4\306\1\u0117"
0505: + "\3\306\2\0\3\306\2\0\3\306\3\0\3\306\1\0"
0506: + "\3\306\2\0\1\u0118\2\0\11\306\1\0\5\306\1\0"
0507: + "\3\306\1\0\2\306\10\0\2\306\2\0\10\306\2\0"
0508: + "\3\326\2\0\3\326\3\0\3\326\1\0\3\326\2\0"
0509: + "\1\u0119\2\0\11\326\1\0\5\326\1\0\3\326\1\0"
0510: + "\2\326\10\0\2\326\2\0\10\326\1\0\1\327\4\0"
0511: + "\1\327\11\0\1\327\3\0\1\330\45\0\1\327\34\0"
0512: + "\1\u011a\60\0\3\332\2\0\3\332\3\0\3\332\1\0"
0513: + "\3\332\2\0\1\u011b\2\0\11\332\1\0\5\332\1\0"
0514: + "\3\332\1\0\2\332\10\0\2\332\2\0\10\332\2\0"
0515: + "\2\160\1\u011c\2\0\1\u011c\2\160\3\0\3\u011c\1\0"
0516: + "\3\u011c\5\0\10\u011c\1\160\1\0\5\u011c\1\0\3\u011c"
0517: + "\1\0\2\u011c\10\0\2\u011c\2\0\10\u011c\33\0\1\u011d"
0518: + "\102\0\1\u011e\102\0\1\u011f\114\0\1\u0120\73\0\1\u0121"
0519: + "\45\0\1\341\16\0\1\341\51\0\1\341\34\0\1\u0122"
0520: + "\120\0\1\u0123\42\0\3\172\2\0\3\172\3\0\3\172"
0521: + "\1\0\3\172\5\0\11\172\1\0\5\172\1\0\1\u0124"
0522: + "\2\172\1\0\2\172\10\0\2\172\2\0\10\172\2\0"
0523: + "\3\172\2\0\3\172\3\0\3\172\1\0\3\172\5\0"
0524: + "\2\172\1\u0125\6\172\1\0\5\172\1\0\3\172\1\0"
0525: + "\2\172\10\0\2\172\2\0\10\172\2\0\3\172\2\0"
0526: + "\3\172\3\0\3\172\1\0\3\172\5\0\5\172\1\u0126"
0527: + "\3\172\1\0\5\172\1\0\3\172\1\0\2\172\10\0"
0528: + "\2\172\2\0\10\172\2\0\3\172\2\0\3\172\3\0"
0529: + "\3\172\1\0\3\172\5\0\11\172\1\0\1\u0127\4\172"
0530: + "\1\0\3\172\1\0\2\172\10\0\2\172\2\0\10\172"
0531: + "\2\0\3\172\2\0\3\172\3\0\3\172\1\0\3\172"
0532: + "\5\0\1\172\1\u0128\7\172\1\0\5\172\1\0\3\172"
0533: + "\1\0\2\172\10\0\2\172\2\0\10\172\2\0\3\172"
0534: + "\2\0\3\172\3\0\3\172\1\0\3\172\5\0\4\172"
0535: + "\1\u0129\4\172\1\0\5\172\1\0\3\172\1\0\2\172"
0536: + "\10\0\2\172\2\0\10\172\2\0\3\172\2\0\3\172"
0537: + "\3\0\3\172\1\0\3\172\5\0\6\172\1\u012a\2\172"
0538: + "\1\0\5\172\1\0\3\172\1\0\2\172\10\0\2\172"
0539: + "\2\0\10\172\2\0\3\172\2\0\3\172\3\0\3\172"
0540: + "\1\0\3\172\5\0\11\172\1\0\5\172\1\0\2\172"
0541: + "\1\u012b\1\0\2\172\10\0\2\172\2\0\10\172\22\0"
0542: + "\1\u012c\111\0\1\u012d\105\0\1\u012e\111\0\1\u012f\41\0"
0543: + "\3\366\2\0\3\366\3\0\3\366\1\0\3\366\5\0"
0544: + "\11\366\1\0\5\366\1\0\3\366\1\0\2\366\10\0"
0545: + "\2\366\2\0\10\366\2\0\3\366\2\0\3\366\3\0"
0546: + "\1\366\1\u0130\1\366\1\0\1\366\1\u0131\1\366\5\0"
0547: + "\11\366\1\0\5\366\1\0\3\366\1\0\2\366\10\0"
0548: + "\2\366\2\0\10\366\2\0\3\366\2\0\3\366\3\0"
0549: + "\1\366\1\u0131\1\366\1\0\1\366\1\u0131\1\366\5\0"
0550: + "\11\366\1\0\5\366\1\0\3\366\1\0\2\366\10\0"
0551: + "\2\366\2\0\10\366\23\0\1\u0132\6\0\1\u0133\110\0"
0552: + "\1\u0134\75\0\1\u0135\110\0\1\u0136\52\0\1\u0104\14\0"
0553: + "\1\u0137\2\0\1\u0104\4\0\1\u0104\4\0\2\u0104\1\0"
0554: + "\1\u0104\4\0\1\u0104\17\0\1\u0104\6\0\1\u0104\2\0"
0555: + "\3\247\2\0\3\247\3\0\3\247\1\0\3\247\2\0"
0556: + "\1\u0138\2\0\11\247\1\0\5\247\1\0\3\247\1\0"
0557: + "\2\247\10\0\2\247\2\0\10\247\2\0\3\247\2\0"
0558: + "\3\247\3\0\3\247\1\0\3\247\2\0\1\250\2\0"
0559: + "\11\247\1\0\5\247\1\0\3\247\1\0\2\247\10\0"
0560: + "\1\247\1\u0139\2\0\10\247\2\0\3\247\2\0\3\247"
0561: + "\3\0\3\247\1\0\3\247\2\0\1\250\2\0\11\247"
0562: + "\1\0\5\247\1\0\3\247\1\0\2\247\10\0\2\247"
0563: + "\2\0\5\247\1\u013a\2\247\2\0\3\265\2\0\3\265"
0564: + "\3\0\2\265\1\u013b\1\0\2\265\1\u013c\5\0\11\265"
0565: + "\1\0\5\265\1\0\3\265\1\0\2\265\10\0\2\265"
0566: + "\2\0\10\265\2\0\3\265\2\0\3\265\3\0\2\265"
0567: + "\1\u013c\1\0\2\265\1\u013c\5\0\11\265\1\0\5\265"
0568: + "\1\0\3\265\1\0\2\265\10\0\2\265\2\0\10\265"
0569: + "\41\u010b\1\u013d\41\u010b\44\0\1\u013e\101\0\1\u013f\41\0"
0570: + "\1\u010e\1\101\1\u010e\2\0\3\u010e\3\0\3\u010e\1\0"
0571: + "\3\u010e\5\0\11\u010e\1\0\5\u010e\1\0\3\u010e\1\0"
0572: + "\2\u010e\10\0\2\u010e\2\0\10\u010e\2\0\1\102\1\274"
0573: + "\1\102\2\0\3\102\3\0\3\102\1\0\3\102\5\0"
0574: + "\11\102\1\0\5\102\1\0\3\102\1\0\2\102\10\0"
0575: + "\1\u0140\1\102\2\0\10\102\2\0\1\u0110\1\106\1\u0110"
0576: + "\2\0\3\u0110\3\0\3\u0110\1\0\3\u0110\5\0\11\u0110"
0577: + "\1\0\5\u0110\1\0\3\u0110\1\0\2\u0110\10\0\2\u0110"
0578: + "\2\0\10\u0110\2\0\2\300\1\u0141\2\0\1\u0141\2\300"
0579: + "\3\0\3\u0141\1\0\3\u0141\5\0\10\u0141\1\300\1\0"
0580: + "\5\u0141\1\0\3\u0141\1\0\2\u0141\10\0\2\u0141\2\0"
0581: + "\10\u0141\11\0\1\u0114\14\0\1\u0142\2\0\1\u0114\4\0"
0582: + "\1\u0114\4\0\2\u0114\1\0\1\u0114\4\0\1\u0114\17\0"
0583: + "\1\u0114\6\0\1\u0114\2\0\3\306\2\0\3\306\3\0"
0584: + "\3\306\1\0\3\306\2\0\1\u0143\2\0\11\306\1\0"
0585: + "\5\306\1\0\3\306\1\0\2\306\10\0\2\306\2\0"
0586: + "\10\306\2\0\3\306\2\0\3\306\3\0\3\306\1\0"
0587: + "\3\306\2\0\1\307\2\0\11\306\1\0\5\306\1\0"
0588: + "\3\306\1\0\2\306\10\0\1\306\1\u0144\2\0\10\306"
0589: + "\2\0\3\306\2\0\3\306\3\0\3\306\1\0\3\306"
0590: + "\2\0\1\307\2\0\11\306\1\0\5\306\1\0\3\306"
0591: + "\1\0\2\306\10\0\2\306\2\0\5\306\1\u0145\2\306"
0592: + "\2\0\1\u011c\1\160\1\u011c\2\0\3\u011c\3\0\3\u011c"
0593: + "\1\0\3\u011c\5\0\11\u011c\1\0\5\u011c\1\0\3\u011c"
0594: + "\1\0\2\u011c\10\0\2\u011c\2\0\10\u011c\34\0\1\u0146"
0595: + "\106\0\1\u0147\100\0\1\u0148\75\0\1\u0149\104\0\1\u014a"
0596: + "\51\0\3\172\2\0\3\172\3\0\3\172\1\0\3\172"
0597: + "\5\0\2\172\1\u014b\6\172\1\0\5\172\1\0\3\172"
0598: + "\1\0\2\172\10\0\2\172\2\0\10\172\2\0\3\172"
0599: + "\2\0\3\172\3\0\3\172\1\0\3\172\5\0\5\172"
0600: + "\1\u014c\3\172\1\0\5\172\1\0\3\172\1\0\2\172"
0601: + "\10\0\2\172\2\0\10\172\2\0\3\172\2\0\3\172"
0602: + "\3\0\3\172\1\0\3\172\5\0\2\172\1\u014d\6\172"
0603: + "\1\0\5\172\1\0\3\172\1\0\2\172\10\0\2\172"
0604: + "\2\0\10\172\2\0\3\172\2\0\3\172\3\0\3\172"
0605: + "\1\0\2\172\1\u014e\5\0\11\172\1\0\5\172\1\0"
0606: + "\3\172\1\0\2\172\10\0\2\172\2\0\10\172\2\0"
0607: + "\3\172\2\0\3\172\3\0\3\172\1\0\3\172\5\0"
0608: + "\7\172\1\u014f\1\172\1\0\5\172\1\0\3\172\1\0"
0609: + "\2\172\10\0\2\172\2\0\10\172\2\0\3\172\2\0"
0610: + "\3\172\3\0\3\172\1\0\3\172\5\0\2\172\1\u0150"
0611: + "\6\172\1\0\5\172\1\0\3\172\1\0\2\172\10\0"
0612: + "\2\172\2\0\10\172\2\0\3\172\2\0\3\172\3\0"
0613: + "\3\172\1\0\2\172\1\u0151\5\0\11\172\1\0\5\172"
0614: + "\1\0\3\172\1\0\2\172\10\0\2\172\2\0\10\172"
0615: + "\51\0\1\u0152\106\0\1\u0153\46\0\1\u0154\125\0\1\u0155"
0616: + "\40\0\3\366\2\0\3\366\3\0\2\366\1\u0156\1\0"
0617: + "\2\366\1\u0157\5\0\11\366\1\0\5\366\1\0\3\366"
0618: + "\1\0\2\366\10\0\2\366\2\0\10\366\2\0\3\366"
0619: + "\2\0\3\366\3\0\2\366\1\u0157\1\0\2\366\1\u0157"
0620: + "\5\0\11\366\1\0\5\366\1\0\3\366\1\0\2\366"
0621: + "\10\0\2\366\2\0\10\366\31\0\1\u0158\104\0\1\u0159"
0622: + "\102\0\1\u015a\102\0\1\u015b\51\0\3\247\2\0\3\247"
0623: + "\3\0\3\247\1\0\3\247\2\0\1\u015c\2\0\11\247"
0624: + "\1\0\5\247\1\0\3\247\1\0\2\247\10\0\2\247"
0625: + "\2\0\10\247\2\0\3\247\2\0\3\247\3\0\3\247"
0626: + "\1\0\3\247\2\0\1\u015d\2\0\11\247\1\0\5\247"
0627: + "\1\0\3\247\1\0\2\247\10\0\2\247\2\0\10\247"
0628: + "\1\0\1\u015e\3\265\1\0\1\u015f\3\265\2\0\1\u015e"
0629: + "\3\265\1\u015e\3\265\5\0\11\265\1\0\5\265\1\0"
0630: + "\3\265\1\0\2\265\10\0\2\265\1\0\1\u015e\10\265"
0631: + "\1\0\1\u015f\3\265\1\0\1\u015f\3\265\2\0\1\u015f"
0632: + "\3\265\1\u015f\3\265\5\0\11\265\1\0\5\265\1\0"
0633: + "\3\265\1\0\2\265\10\0\2\265\1\0\1\u015f\10\265"
0634: + "\41\u010b\1\u0160\41\u010b\36\0\1\u0161\77\0\1\u0162\51\0"
0635: + "\1\102\1\274\1\102\2\0\3\102\3\0\3\102\1\0"
0636: + "\3\102\5\0\11\102\1\0\5\102\1\0\3\102\1\0"
0637: + "\2\102\10\0\1\102\1\u0163\2\0\10\102\2\0\1\u0141"
0638: + "\1\300\1\u0141\2\0\3\u0141\3\0\3\u0141\1\0\3\u0141"
0639: + "\5\0\11\u0141\1\0\5\u0141\1\0\3\u0141\1\0\2\u0141"
0640: + "\10\0\2\u0141\2\0\10\u0141\2\0\3\306\2\0\3\306"
0641: + "\3\0\3\306\1\0\3\306\2\0\1\u0164\2\0\11\306"
0642: + "\1\0\5\306\1\0\3\306\1\0\2\306\10\0\2\306"
0643: + "\2\0\10\306\2\0\3\306\2\0\3\306\3\0\3\306"
0644: + "\1\0\3\306\2\0\1\u0165\2\0\11\306\1\0\5\306"
0645: + "\1\0\3\306\1\0\2\306\10\0\2\306\2\0\10\306"
0646: + "\33\0\1\u0166\116\0\1\u0167\66\0\1\u0168\115\0\1\u0169"
0647: + "\72\0\1\u016a\46\0\3\172\2\0\3\172\3\0\3\172"
0648: + "\1\0\3\172\5\0\4\172\1\u016b\4\172\1\0\5\172"
0649: + "\1\0\3\172\1\0\2\172\10\0\2\172\2\0\10\172"
0650: + "\2\0\3\172\2\0\3\172\3\0\3\172\1\0\3\172"
0651: + "\5\0\2\172\1\u016c\6\172\1\0\5\172\1\0\3\172"
0652: + "\1\0\2\172\10\0\2\172\2\0\10\172\2\0\3\172"
0653: + "\2\0\3\172\3\0\3\172\1\0\3\172\5\0\5\172"
0654: + "\1\u016d\3\172\1\0\5\172\1\0\3\172\1\0\2\172"
0655: + "\10\0\2\172\2\0\10\172\2\0\3\172\2\0\3\172"
0656: + "\3\0\3\172\1\0\3\172\5\0\11\172\1\0\5\172"
0657: + "\1\0\1\172\1\u016e\1\172\1\0\2\172\10\0\2\172"
0658: + "\2\0\10\172\2\0\3\172\2\0\3\172\3\0\3\172"
0659: + "\1\0\3\172\5\0\11\172\1\0\2\172\1\u016f\2\172"
0660: + "\1\0\3\172\1\0\2\172\10\0\2\172\2\0\10\172"
0661: + "\2\0\3\172\2\0\3\172\3\0\3\172\1\0\3\172"
0662: + "\5\0\1\u0170\10\172\1\0\5\172\1\0\3\172\1\0"
0663: + "\2\172\10\0\2\172\2\0\10\172\2\0\3\172\2\0"
0664: + "\3\172\3\0\3\172\1\0\3\172\5\0\3\172\1\u0171"
0665: + "\5\172\1\0\5\172\1\0\3\172\1\0\2\172\10\0"
0666: + "\2\172\2\0\10\172\23\0\1\u0172\131\0\1\u0173\61\0"
0667: + "\1\u0174\107\0\1\u0175\45\0\1\u0176\3\366\1\0\1\u015f"
0668: + "\3\366\2\0\1\u0176\3\366\1\u0176\3\366\5\0\11\366"
0669: + "\1\0\5\366\1\0\3\366\1\0\2\366\10\0\2\366"
0670: + "\1\0\1\u0176\10\366\1\0\1\u015f\3\366\1\0\1\u015f"
0671: + "\3\366\2\0\1\u015f\3\366\1\u015f\3\366\5\0\11\366"
0672: + "\1\0\5\366\1\0\3\366\1\0\2\366\10\0\2\366"
0673: + "\1\0\1\u015f\10\366\22\0\1\u0177\114\0\1\u0178\104\0"
0674: + "\1\u0179\67\0\1\u017a\103\0\1\u017b\111\0\1\u017c\104\0"
0675: + "\1\u017d\46\0\1\u017e\1\102\1\u017f\1\102\1\0\1\u017e"
0676: + "\3\102\3\0\3\102\1\u017e\3\102\5\0\11\102\1\0"
0677: + "\5\102\1\0\3\102\1\0\2\102\10\0\2\102\1\u0180"
0678: + "\1\u017e\10\102\34\0\1\u0181\1\u0182\76\0\1\u0183\105\0"
0679: + "\1\u0184\105\0\1\u0185\45\0\3\172\2\0\3\172\3\0"
0680: + "\3\172\1\0\3\172\5\0\3\172\1\u0186\5\172\1\0"
0681: + "\5\172\1\0\3\172\1\0\2\172\10\0\2\172\2\0"
0682: + "\10\172\2\0\3\172\2\0\3\172\3\0\3\172\1\0"
0683: + "\3\172\5\0\11\172\1\0\1\172\1\u0187\3\172\1\0"
0684: + "\3\172\1\0\2\172\10\0\2\172\2\0\10\172\2\0"
0685: + "\3\172\2\0\3\172\3\0\3\172\1\0\3\172\5\0"
0686: + "\1\u0188\10\172\1\0\5\172\1\0\3\172\1\0\2\172"
0687: + "\10\0\2\172\2\0\10\172\2\0\3\172\2\0\3\172"
0688: + "\3\0\3\172\1\0\1\172\1\u0189\1\172\5\0\11\172"
0689: + "\1\0\5\172\1\0\3\172\1\0\2\172\10\0\2\172"
0690: + "\2\0\10\172\2\0\3\172\2\0\3\172\3\0\3\172"
0691: + "\1\0\3\172\5\0\11\172\1\0\1\u018a\4\172\1\0"
0692: + "\3\172\1\0\2\172\10\0\2\172\2\0\10\172\34\0"
0693: + "\1\u018b\102\0\1\u018c\112\0\1\u018d\71\0\1\u018e\100\0"
0694: + "\1\u018f\104\0\1\u0190\102\0\1\u0191\103\0\1\u0192\104\0"
0695: + "\1\u0193\115\0\1\u0194\32\0\1\u017e\4\0\1\u017e\11\0"
0696: + "\1\u017e\50\0\1\u0180\1\u017e\12\0\2\101\1\u0195\2\0"
0697: + "\1\u0195\2\101\3\0\3\u0195\1\0\3\u0195\5\0\10\u0195"
0698: + "\1\101\1\0\5\u0195\1\0\3\u0195\1\0\2\u0195\10\0"
0699: + "\2\u0195\2\0\10\u0195\1\0\1\u0180\4\0\1\u0180\11\0"
0700: + "\1\u0180\43\0\1\u0196\1\u0197\4\0\1\u0180\41\0\1\u0198"
0701: + "\103\0\1\u0199\110\0\1\u019a\44\0\3\172\2\0\3\172"
0702: + "\3\0\3\172\1\0\3\172\5\0\7\172\1\u019b\1\172"
0703: + "\1\0\5\172\1\0\3\172\1\0\2\172\10\0\2\172"
0704: + "\2\0\10\172\2\0\3\172\2\0\3\172\3\0\3\172"
0705: + "\1\0\3\172\5\0\1\u019c\10\172\1\0\5\172\1\0"
0706: + "\3\172\1\0\2\172\10\0\2\172\2\0\10\172\31\0"
0707: + "\1\u019d\116\0\1\u019e\73\0\1\u019f\76\0\1\u01a0\105\0"
0708: + "\1\u01a1\101\0\1\u01a2\105\0\1\u01a3\105\0\1\u01a4\71\0"
0709: + "\1\u01a5\53\0\1\u0195\1\101\1\u0195\2\0\3\u0195\3\0"
0710: + "\3\u0195\1\0\3\u0195\5\0\11\u0195\1\0\5\u0195\1\0"
0711: + "\3\u0195\1\0\2\u0195\10\0\2\u0195\2\0\10\u0195\37\0"
0712: + "\1\u01a6\102\0\1\u01a7\75\0\1\u01a8\52\0\3\172\2\0"
0713: + "\3\172\3\0\3\172\1\0\3\172\5\0\1\172\1\u01a9"
0714: + "\7\172\1\0\5\172\1\0\3\172\1\0\2\172\10\0"
0715: + "\2\172\2\0\10\172\44\0\1\u01aa\67\0\1\u01ab\104\0"
0716: + "\1\u01ac\107\0\1\u01ad\75\0\1\u01ae\50\0\1\u01af\16\0"
0717: + "\1\u01af\51\0\1\u01af\54\0\1\u01b0\70\0\1\u01b1\50\0";
0718:
0719: /**
0720: * The transition table of the DFA
0721: */
0722: final private static int yytrans[] = yy_unpack();
0723:
0724: /* error codes */
0725: final private static int YY_UNKNOWN_ERROR = 0;
0726: final private static int YY_ILLEGAL_STATE = 1;
0727: final private static int YY_NO_MATCH = 2;
0728: final private static int YY_PUSHBACK_2BIG = 3;
0729: final private static int YY_SKIP_2BIG = 4;
0730:
0731: /* error messages for the codes above */
0732: final private static String YY_ERROR_MSG[] = {
0733: "Unkown internal scanner error",
0734: "Internal error: unknown state",
0735: "Error: could not match input",
0736: "Error: pushback value was too large",
0737: "Error: skip value was too large" };
0738:
0739: /**
0740: * YY_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
0741: */
0742: private final static byte YY_ATTRIBUTE[] = { 0, 0, 0, 0, 0, 1, 1,
0743: 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1,
0744: 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 9, 9, 9, 9, 1, 1, 9, 9, 1,
0745: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 1, 1,
0746: 9, 1, 1, 1, 1, 1, 1, 1, 9, 9, 1, 1, 1, 1, 1, 1, 1, 1, 9, 3,
0747: 1, 1, 1, 9, 3, 1, 1, 9, 1, 1, 9, 3, 1, 1, 1, 9, 1, 9, 1, 9,
0748: 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 9, 1, 1, 1, 9, 9, 1, 1, 1,
0749: 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 9, 1, 1, 9, 9, 9, 9, 1,
0750: 1, 1, 1, 1, 9, 9, 1, 1, 1, 1, 9, 9, 9, 1, 1, 1, 0, 0, 9, 0,
0751: 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 1, 1, 1, 0, 0, 0, 1,
0752: 1, 1, 9, 1, 1, 1, 0, 0, 9, 9, 0, 9, 0, 0, 0, 0, 0, 0, 0,
0753: 13, 2, 13, 2, 13, 0, 0, 0, 0, 9, 0, 0, 1, 0, 0, 0, 1, 0, 1,
0754: 0, 0, 0, 0, 0, 9, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 9,
0755: 1, 1, 1, 0, 0, 0, 0, 9, 0, 9, 0, 9, 9, 9, 0, 0, 0, 0, 9, 1,
0756: 1, 0, 0, 0, 1, 1, 1, 1, 9, 9, 0, 0, 0, 0, 9, 9, 9, 9, 1, 0,
0757: 0, 0, 0, 0, 9, 9, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1,
0758: 0, 0, 0, 0, 9, 9, 9, 0, 0, 3, 3, 0, 0, 0, 1, 1, 9, 9, 0, 0,
0759: 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 3, 3, 0, 0,
0760: 0, 0, 9, 9, 13, 13, 0, 0, 0, 1, 9, 9, 0, 0, 0, 1, 9, 1, 1,
0761: 1, 1, 1, 1, 1, 0, 0, 0, 0, 13, 0, 0, 0, 0, 9, 0, 0, 0, 1,
0762: 0, 0, 9, 0, 0, 9, 1, 1, 1, 1, 1, 0, 0, 9, 0, 0, 0, 0, 0, 0,
0763: 0, 1, 9, 9, 0, 1, 0, 1, 1, 0, 0, 9, 0, 9, 0, 0, 9, 0, 9, 9,
0764: 9, 1, 9, 0, 9, 0, 9, 1, 9, 9 };
0765:
0766: /** the input device */
0767: private java.io.Reader yy_reader;
0768:
0769: /** the current state of the DFA */
0770: private int yy_state;
0771:
0772: /** the current lexical state */
0773: private int yy_lexical_state = YYINITIAL;
0774:
0775: /** this buffer contains the current text to be matched and is
0776: the source of the yytext() string */
0777: private char yy_buffer[] = new char[YY_BUFFERSIZE];
0778:
0779: /** a pointer to the internal buffer, used to restore it when yyreset() changes
0780: the buffer to an externally created one. */
0781: private char yy_saved_buffer[] = yy_buffer;
0782:
0783: /** the textposition at the last accepting state */
0784: private int yy_markedPos;
0785:
0786: /** the textposition to keep text */
0787: private int yy_savePos = -1;
0788:
0789: /** the textposition at the last state to be included in yytext */
0790: private int yy_pushbackPos;
0791:
0792: /** the current text position in the buffer */
0793: private int yy_currentPos;
0794:
0795: /** startRead marks the beginning of the yytext() string in the buffer */
0796: private int yy_startRead;
0797:
0798: /** endRead marks the last character in the buffer, that has been read
0799: from input */
0800: private int yy_endRead;
0801:
0802: /** number of newlines encountered up to the start of the matched text */
0803: private int yyline;
0804:
0805: /** the number of characters up to the start of the matched text */
0806: private int yychar;
0807:
0808: /**
0809: * the number of characters from the last newline up to the start of the
0810: * matched text
0811: */
0812: private int yycolumn;
0813:
0814: /**
0815: * yy_atBOL == true <=> the scanner is currently at the beginning of a line
0816: */
0817: private boolean yy_atBOL = true;
0818:
0819: /** yy_atEOF == true <=> the scanner is at the EOF */
0820: private boolean yy_atEOF;
0821:
0822: /** the stack of open (nested) input streams to read from */
0823: private java.util.Stack yy_streams = new java.util.Stack();
0824:
0825: /**
0826: * inner class used to store info for nested
0827: * input streams
0828: */
0829: final static private class YY_StreamInfo {
0830: java.io.Reader yy_reader;
0831: int yy_endRead;
0832: int yy_startRead;
0833: int yy_savePos;
0834: int yy_currentPos;
0835: int yy_markedPos;
0836: int yy_pushbackPos;
0837: int yyline;
0838: int yycolumn;
0839: char[] yy_buffer;
0840: boolean yy_atEOF;
0841:
0842: /** sets all values stored in this class */
0843: YY_StreamInfo(java.io.Reader yy_reader, int yy_endRead,
0844: int yy_startRead, int yy_savePos, int yy_currentPos,
0845: int yy_markedPos, int yy_pushbackPos, char[] yy_buffer,
0846: boolean yy_atEOF, int yyline, int yycolumn) {
0847: this .yy_reader = yy_reader;
0848: this .yy_endRead = yy_endRead;
0849: this .yy_startRead = yy_startRead;
0850: this .yy_savePos = yy_savePos;
0851: this .yy_currentPos = yy_currentPos;
0852: this .yy_markedPos = yy_markedPos;
0853: this .yy_pushbackPos = yy_pushbackPos;
0854: this .yy_buffer = yy_buffer;
0855: this .yy_atEOF = yy_atEOF;
0856: this .yyline = yyline;
0857: this .yycolumn = yycolumn;
0858: }
0859: }
0860:
0861: /** denotes if the user-EOF-code has already been executed */
0862: private boolean yy_eof_done;
0863:
0864: /* user code: */
0865:
0866: // Variables accessible to parser class
0867: Piccolo parser = null;
0868: Entity currentEntity = null;
0869: CharStringConverter stringConverter = new CharStringConverter(200);
0870: EntityManager entityManager = new EntityManager();
0871: Stack entityStack = new Stack();
0872: AttributesHolder attribs = new AttributesHolder();
0873:
0874: // Generic character buffer, usually for attribute values
0875: char[] cbuf = new char[1024];
0876: int cbuflen;
0877:
0878: // Variables used to hold token values for the parser
0879: String stringValue;
0880: char[] oneCharBuffer = new char[1];
0881: char[] cdataBuffer;
0882: int cdataStart, cdataLength;
0883:
0884: // Variables used to maintain lexing and parsing states
0885: private LongStack entityStateStack = new LongStack(5);
0886: private StringStack entityNameStack = new StringStack(2);
0887: private String currentEntityName;
0888: private int prevEntityLexState;
0889: private boolean returnEntityEndToken;
0890: private boolean isParamEntity;
0891: private int entityBaseDepth;
0892: private boolean isEntityBeingParsed;
0893: private boolean inCdataSection;
0894:
0895: private int baseState; // Used for reporting CDATA directly from lexer
0896: private int prevState, piPrevState;
0897: private boolean isNamespaceDeclaration;
0898: private boolean entityWasSkipped;
0899: private int tagState;
0900: private int tagStartState;
0901:
0902: private boolean tokenizeInput;
0903: private StringStack tagStack = new StringStack(20);
0904: private boolean bypassPERefs;
0905: private boolean bypassGERefs;
0906: private boolean needsNormalization;
0907: private int tagType; // Piccolo.OPEN_TAG,EMPTY_TAG,CLOSE_TAG
0908: private boolean endOfTag;
0909:
0910: private HashMap elementMap = new HashMap();
0911:
0912: // Variables to hold element and attribute name components
0913: private ElementDefinition elementDefinition = null;
0914: private String elementURI;
0915: private String elementLocalName;
0916: private String elementQName;
0917: private String attributeURI;
0918: private String attributeLocalName;
0919: private String attributeQName;
0920: private String attributeValueType;
0921:
0922: // this is used for tracking the start line of the first character of a token
0923: // only works for start element for now
0924: //
0925: int tokenStartLine;
0926:
0927: // An array for marking whether we've seen an attribute as we parse the tag.
0928: // This is used to "fill in the holes" with default values specified in the DTD.
0929: private boolean[] defaultAttributeSpecified = new boolean[4];
0930: private int numAttributesDefined;
0931:
0932: private FastNamespaceSupport nsSupport = new FastNamespaceSupport();
0933:
0934: static private boolean[] asciiNameStartChars;
0935: static private boolean[] asciiNameStartCharsNS;
0936: static private boolean[] asciiNameChars;
0937: static private boolean[] asciiNameCharsNS;
0938:
0939: /************************************************************************
0940: * Initialization code
0941: ************************************************************************/
0942:
0943: static {
0944: calcAsciiTables();
0945: }
0946:
0947: public PiccoloLexer(Piccolo parser) {
0948: this .parser = parser;
0949: enableNamespaces(true);
0950: }
0951:
0952: /* Prepare the lexer to parse the given Entity. */
0953: public void reset(Entity entity) throws IOException, SAXException {
0954: try {
0955: setTokenize(true);
0956: tagStack.clear();
0957:
0958: // clear out any residual attributes from last parse
0959: attribs.clear();
0960:
0961: entityStack.clear();
0962: clearEntityState();
0963: elementMap.clear();
0964: currentEntity = entity;
0965:
0966: entityManager.clear();
0967: elementDefinition = null;
0968: if (!entity.isOpen())
0969: entity.open();
0970:
0971: if (parser.fNamespaces) {
0972: nsSupport.reset();
0973: }
0974: isNamespaceDeclaration = false;
0975:
0976: bypassPERefs = bypassGERefs = false;
0977: needsNormalization = false;
0978: entityWasSkipped = false;
0979: inCdataSection = false;
0980: cbuflen = cdataStart = cdataLength = 0;
0981: tagType = 0;
0982: prevState = piPrevState = 0;
0983: endOfTag = false;
0984: tokenStartLine = 0;
0985: numAttributesDefined = 0;
0986:
0987: yy_reader = null; // Don't close the reader as we reuse it.
0988: yyreset(entity.getReader());
0989: } catch (RecursionException e) {
0990: }
0991: }
0992:
0993: /************************************************************************
0994: * End Initialization code
0995: ************************************************************************/
0996:
0997: /************************************************************************
0998: * Methods providing service to Piccolo
0999: ************************************************************************/
1000:
1001: void enableNamespaces(boolean value) {
1002: if (value) {
1003: tagState = TAG_NS;
1004: tagStartState = TAG_START_NS;
1005: } else {
1006: tagState = TAG;
1007: tagStartState = TAG_START;
1008: elementURI = elementLocalName = "";
1009: attributeURI = attributeLocalName = "";
1010: }
1011: }
1012:
1013: /* Define an element as specified within a DTD */
1014: void defineElement(String name, ElementDefinition elem) {
1015: elementMap.put(name, elem);
1016: }
1017:
1018: ElementDefinition getElement(String name) {
1019: return (ElementDefinition) elementMap.get(name);
1020: }
1021:
1022: public int getLineNumber() {
1023: return yyline + 1;
1024: }
1025:
1026: public int getColumnNumber() {
1027: // return yycolumn + 1;
1028: return -1;
1029: }
1030:
1031: /* Returns the public identified of the current entity */
1032: String getPublicID() {
1033: if (currentEntity != null)
1034: return currentEntity.getPublicID();
1035: else
1036: return null;
1037: }
1038:
1039: /* Returns the system identifier of the current entity */
1040: String getSystemID() {
1041: if (currentEntity != null)
1042: return currentEntity.getSystemID();
1043: else
1044: return null;
1045: }
1046:
1047: // give access to the info in the XML declaration
1048: String getVersion() {
1049: if (currentEntity != null)
1050: return currentEntity.getXMLVersion();
1051: else
1052: return null;
1053: }
1054:
1055: String getEncoding() {
1056: if (currentEntity != null)
1057: return currentEntity.getDeclaredEncoding();
1058: else
1059: return null;
1060: }
1061:
1062: /* Whether or not text and tags should be returned as tokens to
1063: * Piccolo or directly reported.
1064: * Note: when tokenization is on, tags are still reported to the
1065: * content handler, while text is left to the Piccolo class.
1066: */
1067: void setTokenize(boolean tokenize) {
1068: tokenizeInput = tokenize;
1069: baseState = (tokenize ? YYINITIAL : YYINITIAL_DIRECT);
1070: int state = yystate();
1071: if (state == YYINITIAL || state == YYINITIAL_DIRECT)
1072: yybegin(baseState);
1073: }
1074:
1075: String normalizeValue(String s) {
1076: if (s == null || s.length() == 0)
1077: return s;
1078:
1079: char[] inbuf = s.toCharArray();
1080: int in_len = inbuf.length;
1081: int inpos = 0;
1082:
1083: char[] outbuf = new char[in_len];
1084: int outpos = 0;
1085:
1086: // Eliminate the leading whitespace
1087: while (inpos < in_len) {
1088: switch (inbuf[inpos]) {
1089: case ' ':
1090: case '\t':
1091: case '\n':
1092: case '\r':
1093: inpos++;
1094: continue;
1095: default:
1096: break;
1097: }
1098: break;
1099: }
1100:
1101: while (inpos < in_len) {
1102: // Read a name token
1103: do {
1104: char c = inbuf[inpos++];
1105: switch (c) {
1106: case ' ':
1107: case '\t':
1108: case '\n':
1109: case '\r':
1110: break;
1111:
1112: default:
1113: outbuf[outpos++] = c;
1114: continue;
1115: }
1116: break;
1117: } while (inpos < in_len);
1118:
1119: // Condense the whitespace
1120: while (inpos < in_len) {
1121: char c = inbuf[inpos++];
1122: switch (c) {
1123: case ' ':
1124: case '\t':
1125: case '\n':
1126: case '\r':
1127: continue;
1128:
1129: default:
1130: outbuf[outpos++] = ' ';
1131: outbuf[outpos++] = c;
1132: break;
1133: }
1134: break;
1135: }
1136: }
1137:
1138: return new String(outbuf, 0, outpos);
1139: }
1140:
1141: void startCdata() throws SAXException {
1142: if (parser.lexHandler != null) {
1143: parser.lexHandler.startCDATA();
1144: inCdataSection = true;
1145: }
1146: }
1147:
1148: void endCdata() throws SAXException {
1149: if (parser.lexHandler != null) {
1150: parser.lexHandler.endCDATA();
1151: inCdataSection = false;
1152: }
1153: }
1154:
1155: /************************************************************************
1156: * End Methods providing service to Piccolo
1157: ************************************************************************/
1158:
1159: /************************************************************************
1160: * Methods used to return text and tokens to Piccolo
1161: ************************************************************************/
1162:
1163: // Append a character to our character buffer
1164: private void appendToCbuf(char c) {
1165: if (cbuf.length - cbuflen < 1) {
1166: char[] newcbuf = new char[2 * (cbuf.length + 1)];
1167: System.arraycopy(cbuf, 0, newcbuf, 0, cbuflen);
1168: cbuf = newcbuf;
1169: }
1170: cbuf[cbuflen++] = c;
1171: }
1172:
1173: // Append a character array to our character buffer
1174: private void appendToCbuf(char[] ch, int start, int length) {
1175: if (length > 0) {
1176: if (cbuf.length - cbuflen < length) {
1177: char[] newcbuf = new char[2 * (cbuf.length + length)];
1178: System.arraycopy(cbuf, 0, newcbuf, 0, cbuflen);
1179: cbuf = newcbuf;
1180: }
1181: System.arraycopy(ch, start, cbuf, cbuflen, length);
1182: cbuflen += length;
1183: }
1184: }
1185:
1186: // Clear the character buffer
1187: private void clearCbuf() {
1188: cbuflen = 0;
1189: }
1190:
1191: // Return a token with a String value to Piccolo
1192: private int stringToken(int token, String value) {
1193: stringValue = value;
1194: return token;
1195: }
1196:
1197: // Return a token with a char[] value to Piccolo
1198: private int cdataToken(char[] buf, int start, int length) {
1199: return cdataToken(Piccolo.CDATA, buf, start, length);
1200: }
1201:
1202: private int cdataToken(int token, char[] buf, int start, int length) {
1203: cdataBuffer = buf;
1204: cdataStart = start;
1205: cdataLength = length;
1206: return token;
1207: }
1208:
1209: private int cdataToken(char c) {
1210: oneCharBuffer[0] = c;
1211: cdataBuffer = oneCharBuffer;
1212: cdataStart = 0;
1213: cdataLength = 1;
1214: return Piccolo.CDATA;
1215: }
1216:
1217: /************************************************************************
1218: * End Methods used to return text and tokens to Piccolo
1219: ************************************************************************/
1220:
1221: /************************************************************************
1222: * Code used to parse XML without JFlex's help. We use this code to
1223: * parse the non-DTD portion of an XML document when namespaces is
1224: * turned off, because that parsing is simple enough that it is faster
1225: * to use hand-crafted switch statements than JFlex's transition tables.
1226: ************************************************************************/
1227:
1228: /* The driver for our non-JFlex XML parsing.
1229: * Return values:
1230: * 0 = break out of non-JFlex mode but do not return a token to
1231: * Piccolo.
1232: * non-zero = return this token value to Piccolo
1233: */
1234: private int parseXML() throws SAXException, IOException {
1235:
1236: if (parser.fNamespaces)
1237: return parseXMLNS();
1238:
1239: while (true) {
1240: parseCdata();
1241: parser.reportCdata(cdataBuffer, cdataStart, cdataLength);
1242: yynextAction();
1243: if (yystate() == tagStartState) {
1244: int token = parseTag();
1245: switch (token) {
1246: case -1:
1247: return 0;
1248: case 0:
1249: yynextAction();
1250: break;
1251: default:
1252: return token;
1253: }
1254: } else
1255: return 0;
1256: }
1257: }
1258:
1259: // Same as parseXML but with namespaces
1260: private int parseXMLNS() throws SAXException, IOException {
1261:
1262: while (true) {
1263: parseCdata();
1264: parser.reportCdata(cdataBuffer, cdataStart, cdataLength);
1265: yynextAction();
1266: if (yystate() == tagStartState) { // No namespaces!
1267: int token = parseTagNS();
1268: switch (token) {
1269: case -1:
1270: return 0;
1271: case 0:
1272: yynextAction();
1273: break;
1274: default:
1275: return token;
1276: }
1277: } else
1278: return 0;
1279: }
1280: }
1281:
1282: /* Parses an XML element when namespace processing is turned off.
1283: * Return values:
1284: * -1 = we can't handle this tag. Break out of non-JFlex mode.
1285: * 0 = we finished processing this tag.
1286: * Piccolo.CLOSE_TAG = this is the last ending tag. Return
1287: * this token value to Piccolo.
1288: */
1289: private int parseTag() throws SAXException, IOException {
1290:
1291: int token;
1292:
1293: // Check the first character
1294: if ((yy_endRead - yy_markedPos) > 0) {
1295: int c = yy_buffer[yy_markedPos];
1296: switch (c) {
1297: case '?':
1298: case '!':
1299: yybegin(tagStartState);
1300: return -1; // Leave special tags for lex
1301:
1302: case '/':
1303: return parseCloseTag();
1304:
1305: default:
1306: return parseOpenTag();
1307: }
1308: } else
1309: return -1;
1310: }
1311:
1312: // Same as parseTag but with namespaces
1313: private int parseTagNS() throws SAXException, IOException {
1314:
1315: int token;
1316:
1317: // Check the first character
1318: if ((yy_endRead - yy_markedPos) > 0) {
1319: int c = yy_buffer[yy_markedPos];
1320: switch (c) {
1321: case '?':
1322: case '!':
1323: yybegin(tagStartState);
1324: return -1; // Leave special tags for lex
1325:
1326: case '/':
1327: return parseCloseTagNS();
1328:
1329: default:
1330: return parseOpenTagNS();
1331: }
1332: } else
1333: return -1;
1334: }
1335:
1336: private int parseOpenTag() throws SAXException, IOException {
1337: // Get the element name first
1338: stringValue = parseElementName();
1339: if (stringValue == null) {
1340: yybegin(tagStartState);
1341: return -1;
1342: }
1343:
1344: for (int c = yy_buffer[yy_markedPos++]; true; c = yynextChar()) {
1345: while (true) {
1346:
1347: if (c == '>') {
1348: // yycolumn_next++;
1349: // if (parser.fNamespaces) {
1350: // nsSupport.pushContext();
1351: // elementURI = nsSupport.getURI(elementURI);
1352: // }
1353: yybegin(baseState);
1354: processSimpleElement(stringValue);
1355: parser.reportStartTag(elementURI, elementLocalName,
1356: stringValue);
1357: attribs.clear();
1358: tagStack.push(stringValue);
1359: tagType = Piccolo.OPEN_TAG;
1360: if (tokenizeInput)
1361: return Piccolo.OPEN_TAG;
1362: else
1363: return 0;
1364: } else if (c == '/') {
1365: // yycolumn_next++;
1366: c = yynextChar();
1367: if (c != '>')
1368: throw fatalError("'/' should be followed by '>'");
1369:
1370: // yycolumn_next++;
1371: yybegin(baseState);
1372:
1373: // if (parser.fNamespaces)
1374: // elementURI = nsSupport.getURI(elementURI);
1375:
1376: processSimpleElement(stringValue);
1377: parser.reportStartTag(elementURI, elementLocalName,
1378: stringValue);
1379: parser.reportEndTag(elementURI, elementLocalName,
1380: stringValue);
1381: attribs.clear();
1382:
1383: tagType = Piccolo.EMPTY_TAG;
1384: if (tokenizeInput)
1385: return Piccolo.EMPTY_TAG;
1386: else
1387: return 0;
1388: } else if (c == ' ' || c == '\t') {
1389: // yycolumn_next++;
1390: } else if (c == '\n') {
1391: yyline_next++;
1392: // yycolumn_next = 0;
1393: } else {
1394: yy_markedPos--;
1395: prepareComplexElement(stringValue);
1396:
1397: // if (parser.fNamespaces)
1398: // nsSupport.pushContext();
1399:
1400: return parseAttributes();
1401: }
1402:
1403: if ((yy_endRead - yy_markedPos) > 0)
1404: c = yy_buffer[yy_markedPos++];
1405: else
1406: break;
1407: }
1408: }
1409: }
1410:
1411: // Same as parseOpenTag but with namespaces
1412: private int parseOpenTagNS() throws SAXException, IOException {
1413: // Get the element name first
1414: stringValue = parseElementNameNS();
1415: if (stringValue == null) {
1416: yybegin(tagStartState);
1417: return -1;
1418: }
1419:
1420: for (int c = yy_buffer[yy_markedPos++]; true; c = yynextChar()) {
1421: while (true) {
1422:
1423: if (c == '>') {
1424: // yycolumn_next++;
1425: // if (parser.fNamespaces) {
1426: nsSupport.pushContext();
1427: elementURI = nsSupport.getURI(elementURI);
1428: // }
1429: yybegin(baseState);
1430: processSimpleElement(stringValue);
1431: parser.reportStartTag(elementURI, elementLocalName,
1432: stringValue);
1433: attribs.clear();
1434: tagStack.push(stringValue);
1435: tagType = Piccolo.OPEN_TAG;
1436: if (tokenizeInput)
1437: return Piccolo.OPEN_TAG;
1438: else
1439: return 0;
1440: } else if (c == '/') {
1441: // yycolumn_next++;
1442: c = yynextChar();
1443: if (c != '>')
1444: throw fatalError("'/' should be followed by '>'");
1445:
1446: // yycolumn_next++;
1447: yybegin(baseState);
1448:
1449: // if (parser.fNamespaces)
1450: elementURI = nsSupport.getURI(elementURI);
1451:
1452: processSimpleElement(stringValue);
1453: parser.reportStartTag(elementURI, elementLocalName,
1454: stringValue);
1455: parser.reportEndTag(elementURI, elementLocalName,
1456: stringValue);
1457: attribs.clear();
1458: tagType = Piccolo.EMPTY_TAG;
1459: if (tokenizeInput)
1460: return Piccolo.EMPTY_TAG;
1461: else
1462: return 0;
1463: } else if (c == ' ' || c == '\t') {
1464: // yycolumn_next++;
1465: } else if (c == '\n') {
1466: yyline_next++;
1467: // yycolumn_next = 0;
1468: } else {
1469: yy_markedPos--;
1470: prepareComplexElement(stringValue);
1471:
1472: // if (parser.fNamespaces)
1473: nsSupport.pushContext();
1474:
1475: return parseAttributesNS();
1476: }
1477:
1478: if ((yy_endRead - yy_markedPos) > 0)
1479: c = yy_buffer[yy_markedPos++];
1480: else
1481: break;
1482: }
1483: }
1484: }
1485:
1486: /* Parse the attributes and remainder of an open (or empty) tag.
1487: * Return values:
1488: * -1 = we can't handle this tag. Break out of non-JFlex mode.
1489: * 0 = we finished processing this tag.
1490: * Piccolo.CLOSE_TAG = this is the last ending tag. Return
1491: * this token value to Piccolo.
1492: */
1493: private int parseAttributes() throws SAXException, IOException {
1494: String name, value;
1495: yybegin(tagState);
1496:
1497: // loop through sets of Name, '=', Value
1498: int c = 0;
1499:
1500: endOfTag = false; // set to true when [/>] is hit after a literal
1501: while (!endOfTag) {
1502: if ((yy_endRead - yy_markedPos) > 0) {
1503: // Name
1504: parseAttributeName();
1505: if (attributeQName == null)
1506: break;
1507:
1508: // '='
1509: int bufferLeft = (yy_endRead - yy_markedPos);
1510: loop_eq: while (bufferLeft-- > 0) {
1511: switch (yy_buffer[yy_markedPos++]) {
1512: case '=':
1513: break loop_eq;
1514:
1515: case ' ':
1516: case '\t':
1517: // yycolumn_next++;
1518: break;
1519:
1520: case '\n':
1521: yyline_next++;
1522: // yycolumn_next = 0;
1523: break;
1524:
1525: default:
1526: // hit something weird; kick back to lex
1527: yy_markedPos--;
1528: yybegin(TAG_VALUE);
1529: return -1;
1530: }
1531: }
1532: if (bufferLeft < 0) {
1533: yybegin(TAG_VALUE);
1534: return -1;
1535: }
1536:
1537: // Whitespace, ' or " (to begin the value)
1538: value_loop: for (c = yynextChar(); c != YYEOF; c = yynextChar()) {
1539: switch (c) {
1540: case '"':
1541: // yycolumn_next++;
1542: parseQuotedTagValue();
1543: if (yystate() != tagState)
1544: return -1;
1545: break value_loop;
1546:
1547: case '\'':
1548: // yycolumn_next++;
1549: parseSingleQuotedTagValue();
1550: if (yystate() != tagState)
1551: return -1;
1552: break value_loop;
1553:
1554: case ' ':
1555: case '\t':
1556: // yycolumn_next++;
1557: break;
1558:
1559: case '\n':
1560: yyline_next++;
1561: // yycolumn_next = 0;
1562: break;
1563:
1564: default:
1565: throw fatalError("Unexpected character encountered: '"
1566: + (char) c + "'");
1567: }
1568: }
1569: if (c == YYEOF)
1570: throw fatalError("Unexpected end of file");
1571: } else {
1572: // ran out of buffer; kick back to lex
1573: return -1;
1574: }
1575: }
1576:
1577: // No more attributes; parse the end of the tag
1578: while ((yy_endRead - yy_markedPos) > 0) {
1579: switch (yy_buffer[yy_markedPos++]) {
1580: case '>':
1581: // yycolumn_next++;
1582: yybegin(baseState);
1583: processComplexElement();
1584:
1585: // if (parser.fNamespaces) {
1586: // resolveNamespacePrefixes();
1587: // }
1588:
1589: parser.reportStartTag(elementURI, elementLocalName,
1590: stringValue);
1591: tagStack.push(stringValue);
1592: attribs.clear();
1593: tagType = Piccolo.OPEN_TAG;
1594: if (tokenizeInput)
1595: return Piccolo.OPEN_TAG;
1596: else
1597: return 0;
1598:
1599: case '/':
1600: // yycolumn_next++;
1601: if ((yynextChar()) != '>')
1602: throw fatalError("'/' should be followed by '>'");
1603: // yycolumn_next++;
1604:
1605: yybegin(baseState);
1606: processComplexElement();
1607:
1608: // if (parser.fNamespaces) {
1609: // resolveNamespacePrefixes();
1610: // parser.reportStartTag(elementURI,elementLocalName,stringValue);
1611: // parser.reportEndTag(elementURI,elementLocalName,stringValue);
1612: // processNSContextEnd();
1613: // }
1614: // else {
1615: parser.reportStartTag(elementURI, elementLocalName,
1616: stringValue);
1617: parser.reportEndTag(elementURI, elementLocalName,
1618: stringValue);
1619: // }
1620:
1621: attribs.clear();
1622: tagType = Piccolo.EMPTY_TAG;
1623: if (tokenizeInput)
1624: return Piccolo.EMPTY_TAG;
1625: else
1626: return 0;
1627:
1628: case ' ':
1629: case '\t':
1630: // yycolumn_next++;
1631: break;
1632:
1633: case '\n':
1634: yyline_next++;
1635: // yycolumn_next = 0;
1636: break;
1637:
1638: default:
1639: throw fatalError("Unexpected character: " + (char) c);
1640: }
1641: }
1642: // hit the end of the buffer
1643: return -1;
1644: }
1645:
1646: // Same as parseAttributes but with namespaces
1647: private int parseAttributesNS() throws SAXException, IOException {
1648: String name, value;
1649: yybegin(tagState);
1650:
1651: // loop through sets of Name, '=', Value
1652: int c = 0;
1653:
1654: endOfTag = false; // set to true when [/>] is hit after a literal
1655: while (!endOfTag) {
1656: if ((yy_endRead - yy_markedPos) > 0) {
1657: // Name
1658: parseAttributeNameNS();
1659: if (attributeQName == null)
1660: break;
1661:
1662: // '='
1663: int bufferLeft = (yy_endRead - yy_markedPos);
1664: loop_eq: while (bufferLeft-- > 0) {
1665: switch (yy_buffer[yy_markedPos++]) {
1666: case '=':
1667: break loop_eq;
1668:
1669: case ' ':
1670: case '\t':
1671: // yycolumn_next++;
1672: break;
1673:
1674: case '\n':
1675: yyline_next++;
1676: // yycolumn_next = 0;
1677: break;
1678:
1679: default:
1680: // hit something weird; kick back to lex
1681: yy_markedPos--;
1682: yybegin(TAG_VALUE);
1683: return -1;
1684: }
1685: }
1686: if (bufferLeft < 0) {
1687: yybegin(TAG_VALUE);
1688: return -1;
1689: }
1690:
1691: // Whitespace, ' or " (to begin the value)
1692: value_loop: for (c = yynextChar(); c != YYEOF; c = yynextChar()) {
1693: switch (c) {
1694: case '"':
1695: // yycolumn_next++;
1696: parseQuotedTagValue();
1697: if (yystate() != tagState)
1698: return -1;
1699: break value_loop;
1700:
1701: case '\'':
1702: // yycolumn_next++;
1703: parseSingleQuotedTagValue();
1704: if (yystate() != tagState)
1705: return -1;
1706: break value_loop;
1707:
1708: case ' ':
1709: case '\t':
1710: // yycolumn_next++;
1711: break;
1712:
1713: case '\n':
1714: yyline_next++;
1715: // yycolumn_next = 0;
1716: break;
1717:
1718: default:
1719: throw fatalError("Unexpected character encountered: '"
1720: + (char) c + "'");
1721: }
1722: }
1723: if (c == YYEOF)
1724: throw fatalError("Unexpected end of file");
1725: } else {
1726: // ran out of buffer; kick back to lex
1727: return -1;
1728: }
1729: }
1730:
1731: // No more attributes; parse the end of the tag
1732: while ((yy_endRead - yy_markedPos) > 0) {
1733: switch (yy_buffer[yy_markedPos++]) {
1734: case '>':
1735: // yycolumn_next++;
1736: yybegin(baseState);
1737: processComplexElement();
1738:
1739: // if (parser.fNamespaces) {
1740: resolveNamespacePrefixes();
1741: // }
1742:
1743: parser.reportStartTag(elementURI, elementLocalName,
1744: stringValue);
1745: tagStack.push(stringValue);
1746: attribs.clear();
1747: tagType = Piccolo.OPEN_TAG;
1748: if (tokenizeInput)
1749: return Piccolo.OPEN_TAG;
1750: else
1751: return 0;
1752:
1753: case '/':
1754: // yycolumn_next++;
1755: if ((yynextChar()) != '>')
1756: throw fatalError("'/' should be followed by '>'");
1757: // yycolumn_next++;
1758:
1759: yybegin(baseState);
1760: processComplexElement();
1761:
1762: // if (parser.fNamespaces) {
1763: resolveNamespacePrefixes();
1764: parser.reportStartTag(elementURI, elementLocalName,
1765: stringValue);
1766: parser.reportEndTag(elementURI, elementLocalName,
1767: stringValue);
1768: processNSContextEnd();
1769: // }
1770: // else {
1771: // parser.reportStartTag(elementURI,elementLocalName,stringValue);
1772: // parser.reportEndTag(elementURI,elementLocalName,stringValue);
1773: // }
1774:
1775: attribs.clear();
1776: tagType = Piccolo.EMPTY_TAG;
1777: if (tokenizeInput)
1778: return Piccolo.EMPTY_TAG;
1779: else
1780: return 0;
1781:
1782: case ' ':
1783: case '\t':
1784: // yycolumn_next++;
1785: break;
1786:
1787: case '\n':
1788: yyline_next++;
1789: // yycolumn_next = 0;
1790: break;
1791:
1792: default:
1793: throw fatalError("Unexpected character: " + (char) c);
1794: }
1795: }
1796: // hit the end of the buffer
1797: return -1;
1798: }
1799:
1800: private void parseAttributeName() throws SAXException, IOException {
1801:
1802: // if (parser.fNamespaces) {
1803: // attributeURI = null;
1804: // isNamespaceDeclaration = false;
1805: // }
1806:
1807: // Skip leading whitespace and get the first char
1808: int c = yy_buffer[yy_markedPos++];
1809: // int localNameOffset=0;
1810: ws_loop: for (; true; c = yynextChar()) {
1811:
1812: while (true) {
1813: if (c == ' ' || c == '\t') {
1814: // yycolumn_next++;
1815: } else if (c == '\n') {
1816: yyline_next++;
1817: // yycolumn_next = 0;
1818: } else if (c == '/') {
1819: yy_markedPos--;
1820: attributeQName = null;
1821: return;
1822: } else if (c == '>') {
1823: yy_markedPos--;
1824: attributeQName = null;
1825: return;
1826: } else if (isASCIINameStartChar(c)) {
1827: // yycolumn_next++;
1828: yy_startRead = yy_markedPos - 1;
1829: break ws_loop;
1830: }
1831: // else
1832: // if (c == ':') {
1833: // if (parser.fNamespaces) {
1834: // localNameOffset = yy_markedPos - yy_startRead;
1835: // attributeURI = "";
1836: // }
1837: // break ws_loop;
1838: // }
1839: else {
1840: // Something weird. unread the char and return
1841: yy_markedPos--;
1842: attributeQName = "";
1843: return;
1844: }
1845:
1846: if ((yy_endRead - yy_markedPos) > 0)
1847: c = yy_buffer[yy_markedPos++];
1848: else
1849: break;
1850: }
1851: }
1852:
1853: // Read attribute name
1854: for (; true; c = yynextChar()) {
1855:
1856: while (true) {
1857: if (isASCIINameChar(c)) {
1858: // yycolumn_next++;
1859: }
1860: /*
1861: else
1862: if (c == ':') {
1863: // yycolumn_next++;
1864: if (parser.fNamespaces && attributeURI == null) {
1865: // only the first ':' separates
1866: attributeURI = stringConverter.convert(yy_buffer,
1867: yy_startRead,
1868: (yy_markedPos-1)-yy_startRead);
1869: localNameOffset = yy_markedPos-yy_startRead;
1870: }
1871: }
1872: */
1873: else {
1874: yy_markedPos--;
1875:
1876: /*
1877: if (parser.fNamespaces) {
1878: if (attributeURI == null)
1879: attributeURI = "";
1880:
1881: attributeLocalName
1882: = yytext2(localNameOffset,
1883: yy_markedPos-(yy_startRead+localNameOffset));
1884: if (attributeURI == "xmlns" ||
1885: attributeLocalName == "xmlns")
1886: isNamespaceDeclaration = true;
1887: }
1888: */
1889: attributeQName = yytext2();
1890: return;
1891: }
1892:
1893: if ((yy_endRead - yy_markedPos) > 0)
1894: c = yy_buffer[yy_markedPos++];
1895: else
1896: break;
1897: }
1898: }
1899: }
1900:
1901: // Same as parseAttributeName but with namespaces
1902: private void parseAttributeNameNS() throws SAXException,
1903: IOException {
1904:
1905: // if (parser.fNamespaces) {
1906: attributeURI = null;
1907: isNamespaceDeclaration = false;
1908: // }
1909:
1910: // Skip leading whitespace and get the first char
1911: int c = yy_buffer[yy_markedPos++];
1912: int localNameOffset = 0;
1913: int bufferLeft = (yy_endRead - yy_markedPos);
1914: ws_loop: for (; true; c = yynextChar()) {
1915:
1916: while (true) {
1917: if (c == ' ' || c == '\t') {
1918: // yycolumn_next++;
1919: } else if (c == '\n') {
1920: yyline_next++;
1921: // yycolumn_next = 0;
1922: } else if (c == '/') {
1923: yy_markedPos--;
1924: attributeQName = null;
1925: return;
1926: } else if (c == '>') {
1927: yy_markedPos--;
1928: attributeQName = null;
1929: return;
1930: } else if (isASCIINameStartChar(c)) {
1931: // yycolumn_next++;
1932: yy_startRead = yy_markedPos - 1;
1933: break ws_loop;
1934: } else if (c == ':') {
1935: // if (parser.fNamespaces) {
1936: localNameOffset = yy_markedPos - yy_startRead;
1937: attributeURI = "";
1938: // }
1939: break ws_loop;
1940: } else {
1941: // Something weird. unread the char and return
1942: yy_markedPos--;
1943: attributeQName = "";
1944: return;
1945: }
1946:
1947: if ((yy_endRead - yy_markedPos) > 0)
1948: c = yy_buffer[yy_markedPos++];
1949: else
1950: break;
1951: }
1952: }
1953:
1954: // Read attribute name
1955: for (; true; c = yynextChar()) {
1956:
1957: while (true) {
1958: if (isASCIINameCharNS(c)) {
1959: // yycolumn_next++;
1960: } else if (c == ':') {
1961: // yycolumn_next++;
1962: // if (parser.fNamespaces && attributeURI == null) {
1963: if (attributeURI == null) {
1964: // only the first ':' separates
1965: attributeURI = stringConverter.convert(
1966: yy_buffer, yy_startRead,
1967: (yy_markedPos - 1) - yy_startRead);
1968: localNameOffset = yy_markedPos - yy_startRead;
1969: }
1970: } else {
1971: yy_markedPos--;
1972:
1973: // if (parser.fNamespaces) {
1974: if (attributeURI == null)
1975: attributeURI = "";
1976:
1977: attributeLocalName = yytext2(localNameOffset,
1978: yy_markedPos
1979: - (yy_startRead + localNameOffset));
1980: if (attributeURI == "xmlns"
1981: || attributeLocalName == "xmlns")
1982: isNamespaceDeclaration = true;
1983: // }
1984:
1985: attributeQName = yytext2();
1986: return;
1987: }
1988:
1989: if ((yy_endRead - yy_markedPos) > 0)
1990: c = yy_buffer[yy_markedPos++];
1991: else
1992: break;
1993: }
1994: }
1995: }
1996:
1997: /* Parse a close tag. The element name starts at yy_buffer[yy_markedPos].
1998: * Return values:
1999: * -1 = we can't handle this tag. Break out of non-JFlex mode.
2000: * 0 = we finished processing this tag.
2001: * Piccolo.CLOSE_TAG = this is the last ending tag. Return
2002: * this token value to Piccolo.
2003: */
2004: private int parseCloseTag() throws SAXException, IOException {
2005: yy_markedPos++; // skip the "/"
2006: // yycolumn_next++;
2007:
2008: stringValue = parseElementName();
2009: if (stringValue == null) {
2010: // We ran into trouble; kick it back to lex
2011: yybegin(tagStartState);
2012: yy_markedPos--; // unread the "/"
2013: // yycolumn_next--;
2014: return -1;
2015: }
2016:
2017: while ((yy_endRead - yy_markedPos) > 0) {
2018: char c = yy_buffer[yy_markedPos++];
2019:
2020: switch (c) {
2021: case '>':
2022: // yycolumn_next++;
2023: checkEndTag(stringValue);
2024:
2025: // if (parser.fNamespaces) {
2026: // parser.reportEndTag(elementURI,elementLocalName,stringValue);
2027: // processNSContextEnd();
2028: // }
2029: // else {
2030: parser.reportEndTag(elementURI, elementLocalName,
2031: stringValue);
2032: // }
2033:
2034: yybegin(baseState);
2035: tagType = Piccolo.CLOSE_TAG;
2036: if (tokenizeInput)
2037: return Piccolo.CLOSE_TAG;
2038: else
2039: return 0;
2040:
2041: case ' ':
2042: case '\t':
2043: // yycolumn_next++;
2044: break;
2045:
2046: case '\n':
2047: yyline_next++;
2048: // yycolumn_next = 0;
2049: break;
2050:
2051: default:
2052: // Something that shouldn't be here
2053: throw fatalError("Unexpected character encountered while in a closing tag: '"
2054: + c + "'");
2055: }
2056: }
2057:
2058: // We hit the end of the buffer; let lex continue
2059: yybegin(parser.fNamespaces ? CLOSE_TAG_NS : CLOSE_TAG);
2060: return -1;
2061: }
2062:
2063: // Same as parseCloseTag but with namespaces
2064: private int parseCloseTagNS() throws SAXException, IOException {
2065: yy_markedPos++; // skip the "/"
2066: // yycolumn_next++;
2067:
2068: stringValue = parseElementNameNS();
2069: if (stringValue == null) {
2070: // We ran into trouble; kick it back to lex
2071: yybegin(tagStartState);
2072: yy_markedPos--; // unread the "/"
2073: // yycolumn_next--;
2074: return -1;
2075: }
2076:
2077: while ((yy_endRead - yy_markedPos) > 0) {
2078: char c = yy_buffer[yy_markedPos++];
2079:
2080: switch (c) {
2081: case '>':
2082: // yycolumn_next++;
2083: checkEndTag(stringValue);
2084:
2085: // if (parser.fNamespaces) {
2086: elementURI = nsSupport.getURI(elementURI);
2087: parser.reportEndTag(elementURI, elementLocalName,
2088: stringValue);
2089: processNSContextEnd();
2090: // }
2091: // else {
2092: // parser.reportEndTag(elementURI,elementLocalName,stringValue);
2093: // }
2094:
2095: yybegin(baseState);
2096: tagType = Piccolo.CLOSE_TAG;
2097: if (tokenizeInput)
2098: return Piccolo.CLOSE_TAG;
2099: else
2100: return 0;
2101:
2102: case ' ':
2103: case '\t':
2104: // yycolumn_next++;
2105: break;
2106:
2107: case '\n':
2108: yyline_next++;
2109: // yycolumn_next = 0;
2110: break;
2111:
2112: default:
2113: // Something that shouldn't be here
2114: throw fatalError("Unexpected character encountered while in a closing tag: '"
2115: + c + "'");
2116: }
2117: }
2118:
2119: // We hit the end of the buffer; let lex continue
2120: yybegin(parser.fNamespaces ? CLOSE_TAG_NS : CLOSE_TAG);
2121: return -1;
2122: }
2123:
2124: private String parseElementName() throws SAXException, IOException {
2125: yy_startRead = yy_markedPos;
2126: // int localNameOffset = 0;
2127:
2128: // if (parser.fNamespaces)
2129: // elementURI = null;
2130:
2131: // First character
2132: int c = yynextChar();
2133:
2134: if (isASCIINameStartChar(c)) {
2135: // yycolumn_next++;
2136: }
2137: /*
2138: else
2139: if (c == ':') {
2140: // yycolumn_next++;
2141: if (parser.fNamespaces) {
2142: localNameOffset = 1;
2143: elementURI = "";
2144: }
2145: }
2146: */
2147: else {
2148: yybegin(tagStartState);
2149: yy_markedPos--;
2150: return null;
2151: }
2152:
2153: // The rest of the element name
2154: element_loop: while (true) {
2155:
2156: while ((yy_endRead - yy_markedPos) > 0) {
2157: c = yy_buffer[yy_markedPos++];
2158:
2159: if (isASCIINameChar(c)) {
2160: // yycolumn_next++;
2161: } else if (c == '>' || c == ' ' || c == '/')
2162: break element_loop;
2163: /*
2164: else
2165: if (c == ':') {
2166: if (parser.fNamespaces && elementURI == null) { // only the first ':' separates
2167: elementURI = stringConverter.convert(yy_buffer,
2168: yy_startRead,(yy_markedPos-yy_startRead)-1);
2169: localNameOffset = (yy_markedPos-yy_startRead);
2170: }
2171: }
2172: */
2173: else if (c == '\n' || c == '\t')
2174: break element_loop;
2175: else {
2176: yy_markedPos = yy_startRead;
2177: return null;
2178: }
2179: }
2180:
2181: c = yynextChar();
2182: if (c < 0)
2183: throw fatalError("Unexpected end of file");
2184: yy_markedPos--;
2185: }
2186: yy_markedPos--;
2187:
2188: // if (parser.fNamespaces) {
2189: // elementLocalName = yytext2(localNameOffset,
2190: // yy_markedPos-(yy_startRead+localNameOffset));
2191: // }
2192:
2193: return yytext2();
2194: }
2195:
2196: // Same as parseElementName but with namespaces enabled
2197: private String parseElementNameNS() throws SAXException,
2198: IOException {
2199: yy_startRead = yy_markedPos;
2200: int localNameOffset = 0;
2201:
2202: // if (parser.fNamespaces)
2203: elementURI = null;
2204:
2205: // First character
2206: int c = yynextChar();
2207:
2208: if (isASCIINameStartCharNS(c)) {
2209: // yycolumn_next++;
2210: } else if (c == ':') {
2211: // yycolumn_next++;
2212: // if (parser.fNamespaces) {
2213: localNameOffset = 1;
2214: elementURI = "";
2215: // }
2216: } else {
2217: yybegin(tagStartState);
2218: yy_markedPos--;
2219: return null;
2220: }
2221:
2222: // The rest of the element name
2223: element_loop: while (true) {
2224:
2225: while ((yy_endRead - yy_markedPos) > 0) {
2226: c = yy_buffer[yy_markedPos++];
2227:
2228: if (isASCIINameCharNS(c)) {
2229: // yycolumn_next++;
2230: } else if (c == '>' || c == ' ' || c == '/')
2231: break element_loop;
2232: else if (c == ':') {
2233: // if (parser.fNamespaces && elementURI == null) { // only the first ':' separates
2234: if (elementURI == null) {
2235: elementURI = stringConverter.convert(yy_buffer,
2236: yy_startRead,
2237: (yy_markedPos - yy_startRead) - 1);
2238: localNameOffset = (yy_markedPos - yy_startRead);
2239: }
2240: } else if (c == '\n' || c == '\t')
2241: break element_loop;
2242: else {
2243: yy_markedPos = yy_startRead;
2244: return null;
2245: }
2246: }
2247: c = yynextChar();
2248: if (c < 0)
2249: throw fatalError("Unexpected end of file");
2250: yy_markedPos--;
2251:
2252: }
2253: yy_markedPos--;
2254:
2255: // if (parser.fNamespaces) {
2256: elementLocalName = yytext2(localNameOffset, yy_markedPos
2257: - (yy_startRead + localNameOffset));
2258: // }
2259:
2260: // TEMP
2261: if (localNameOffset == 0)
2262: return elementLocalName;
2263: else
2264: return yytext2();
2265: }
2266:
2267: // Build an array of booleans to tell us quickly if characters are valid "name" characters
2268: static private void calcAsciiTables() {
2269: asciiNameStartChars = new boolean[0x100];
2270: asciiNameStartCharsNS = new boolean[0x100];
2271: asciiNameChars = new boolean[0x100];
2272: asciiNameCharsNS = new boolean[0x100];
2273:
2274: for (int c = 0; c < 0x100; c++) {
2275: asciiNameStartChars[c] = ((c >= 0x61 && c <= 0x7A)
2276: || (c == ':') || (c >= 0x41 && c <= 0x5A)
2277: || (c == '_') || (c >= 0xC0 && c <= 0xD6)
2278: || (c >= 0xD8 && c <= 0xF6) || (c >= 0xF8 && c <= 0xFF));
2279:
2280: asciiNameStartCharsNS[c] = (c != ':' && asciiNameStartChars[c]);
2281:
2282: asciiNameChars[c] = ((c >= 0x61 && c <= 0x7A) || (c == ':')
2283: || (c >= 0x41 && c <= 0x5A) || (c == '.')
2284: || (c == '-') || (c == '_') || (c == 0xB7)
2285: || (c >= 0x30 && c <= 0x39)
2286: || (c >= 0xC0 && c <= 0xD6)
2287: || (c >= 0xD8 && c <= 0xF6) || (c >= 0xF8 && c <= 0xFF));
2288:
2289: asciiNameCharsNS[c] = (c != ':' && asciiNameChars[c]);
2290: }
2291: }
2292:
2293: // Is this a valid name start character when not in namespace mode
2294: static private boolean isASCIINameStartChar(int c) {
2295: return (c <= 0xFF && asciiNameStartChars[c]);
2296: }
2297:
2298: // Same but excludes the colon
2299: static private boolean isASCIINameStartCharNS(int c) {
2300: return (c <= 0xFF && asciiNameStartCharsNS[c]);
2301: }
2302:
2303: // Is this a valid name character when not in namespace mode
2304: static private boolean isASCIINameChar(int c) {
2305: return (c <= 0xFF && asciiNameChars[c]);
2306: }
2307:
2308: // Same but excludes the colon
2309: static private boolean isASCIINameCharNS(int c) {
2310: return (c <= 0xFF && asciiNameCharsNS[c]);
2311: }
2312:
2313: /* Parses what may be whitespace.
2314: * Returns the token Piccolo.CDATA or Piccolo.WHITESPACE
2315: */
2316: private int parseWhitespace() throws SAXException, IOException {
2317:
2318: cdataBuffer = yy_buffer;
2319: cdataStart = yy_startRead;
2320: while ((yy_endRead - yy_markedPos) > 0) {
2321:
2322: int c = yy_buffer[yy_markedPos++];
2323:
2324: switch (c) {
2325: case ' ':
2326: case '\t':
2327: //yycolumn_next++;
2328: break;
2329:
2330: case '<':
2331: tokenStartLine = yyline_next + 1;
2332: // Report the CDATA and begin the tag
2333: //yycolumn_next++;
2334: yybegin(tagStartState);
2335: cdataLength = (yy_markedPos - 1) - yy_startRead;
2336: yybegin(tagStartState);
2337: return Piccolo.WHITESPACE;
2338:
2339: case '\n':
2340: yyline_next++;
2341: //yycolumn_next = 0;
2342: break;
2343:
2344: case '&':
2345: // An entity is not whitespace. Report as
2346: // CDATA and go parse the entity reference.
2347: //yycolumn_next++;
2348: yybegin(ENTITYREF);
2349: cdataLength = (yy_markedPos - 1) - yy_startRead;
2350: return Piccolo.CDATA;
2351:
2352: default:
2353: // Got a character. Continue parsing as CDATA
2354: //yycolumn_next++;
2355: parseCdata();
2356: return Piccolo.CDATA;
2357: }
2358: }
2359:
2360: // Getting here means we hit the end of the character buffer
2361: cdataLength = yy_markedPos - yy_startRead;
2362: return Piccolo.WHITESPACE;
2363: }
2364:
2365: /* Parses some CDATA (text content) */
2366: private void parseCdata() throws SAXException, IOException {
2367:
2368: cdataBuffer = yy_buffer;
2369: cdataStart = yy_startRead;
2370: while (yy_endRead > yy_markedPos) {
2371:
2372: int c = yy_buffer[yy_markedPos++];
2373:
2374: switch (c) {
2375: case '<':
2376: // Report the CDATA and begin the tag
2377: //yycolumn_next++;
2378: yybegin(tagStartState);
2379: cdataLength = (yy_markedPos - 1) - yy_startRead;
2380: tokenStartLine = yyline_next + 1;
2381: return;
2382:
2383: case '\n':
2384: yyline_next++;
2385: //yycolumn_next = 0;
2386: break;
2387:
2388: case '&':
2389: // Report the CDATA and go parse the entity reference.
2390: //yycolumn_next++;
2391: yybegin(ENTITYREF);
2392: cdataLength = (yy_markedPos - 1) - yy_startRead;
2393: return;
2394:
2395: case ']':
2396: for (int numBrackets = 1; true;) {
2397: if ((yy_endRead - yy_markedPos) >= 1)
2398: c = yy_buffer[yy_markedPos++];
2399: else {
2400: parser.reportCdata(cdataBuffer, cdataStart,
2401: yy_markedPos - yy_startRead);
2402: yynextAction();
2403: c = yynextChar();
2404: cdataBuffer = yy_buffer;
2405: cdataStart = yy_startRead;
2406: }
2407:
2408: if (c == ']')
2409: numBrackets++;
2410: else if (c == '>' && numBrackets >= 2)
2411: throw fatalError("Illegal ']]>' construct in character data");
2412: else {
2413: if (c != YYEOF) {
2414: yy_markedPos--;
2415: }
2416: break;
2417: }
2418: }
2419: break;
2420:
2421: default:
2422: //yycolumn_next++;
2423: break;
2424: }
2425: }
2426:
2427: // Getting here means we hit the end of the character buffer
2428: cdataLength = yy_markedPos - yy_startRead;
2429: }
2430:
2431: /* Parses a <![CDATA[...]]> section */
2432: private void parseCdataSection() throws SAXException, IOException {
2433:
2434: yynextAction();
2435:
2436: while (true) {
2437: while (yy_endRead > yy_markedPos) {
2438: int c = yy_buffer[yy_markedPos++];
2439:
2440: switch (c) {
2441: case ']':
2442: bracket_loop: for (int numBrackets = 1; true;) {
2443: if (yy_endRead > yy_markedPos)
2444: c = yy_buffer[yy_markedPos++];
2445: else {
2446: // Report everything up to the last 2 brackets, because they could be
2447: // the end marker
2448: int bracketsToKeep = Math.min(2,
2449: numBrackets);
2450: yy_markedPos -= bracketsToKeep;
2451: parser.reportCdata(yy_buffer, yy_startRead,
2452: yy_markedPos - yy_startRead);
2453: yynextAction();
2454: yy_markedPos += bracketsToKeep;
2455: c = yynextChar();
2456: }
2457:
2458: if (c == ']')
2459: numBrackets++;
2460: else if (c == '>' && numBrackets >= 2) {
2461: int len = (yy_markedPos - 3) - yy_startRead;
2462: if (len > 0)
2463: parser.reportCdata(yy_buffer,
2464: yy_startRead, len);
2465: return;
2466: } else if (c == YYEOF)
2467: throw fatalError("Unexpected end of file in CDATA section");
2468: else {
2469: // this wasn't a closing CDATA marker
2470: yy_markedPos--; // rescan the last character for linefeeds
2471: break bracket_loop;
2472: }
2473: }
2474: break;
2475:
2476: case '\n':
2477: yyline_next++;
2478: //yycolumn_next = 0;
2479: break;
2480:
2481: default:
2482: //yycolumn_next++;
2483: break;
2484: }
2485: }
2486: if (yynextChar() == YYEOF)
2487: throw fatalError("Unexpected end of file in CDATA section");
2488: yy_markedPos--;
2489: }
2490: }
2491:
2492: /************************************************************************
2493: * End Code used to parse XML without JFlex's help.
2494: ************************************************************************/
2495:
2496: /************************************************************************
2497: * Methods to handle the parsing of parsed entities
2498: ************************************************************************/
2499:
2500: /*
2501: * Starts parsing the given external entity. When
2502: * the entity is fully parsed, the ENTITY_END token
2503: * will be returned, and parsing of the current entity will continue.
2504: */
2505:
2506: void pushEntity(String name, Entity entity, boolean isParamEntity,
2507: boolean returnEndToken) throws SAXException, IOException {
2508: pushEntity(name, entity, isParamEntity, returnEndToken, 0);
2509: }
2510:
2511: void pushEntity(String name, Entity entity, boolean isParamEntity,
2512: boolean returnEndToken, int resumeLexState)
2513: throws SAXException, IOException {
2514: try {
2515: if (name != null)
2516: parser.reportStartEntity(name);
2517:
2518: entity.open();
2519:
2520: if (entity.isInternal()) {
2521: char[] valueBuffer = entity.charArrayValue();
2522: yypushBuffer(valueBuffer, 0, valueBuffer.length);
2523: } else {
2524: yypushStream(entity.getReader());
2525: }
2526:
2527: entityStack.push(currentEntity);
2528: currentEntity = entity;
2529: pushEntityState(name, isParamEntity, returnEndToken,
2530: resumeLexState);
2531:
2532: } catch (RecursionException e) {
2533: throw fatalError("Recursive reference to entity '"
2534: + entity.getSystemID() + "'");
2535: }
2536: }
2537:
2538: void pushEntity(String name, String pubID, String sysID,
2539: boolean isParamEntity, boolean returnEndToken)
2540: throws SAXException, IOException {
2541: pushEntity(name, pubID, sysID, isParamEntity, returnEndToken, 0);
2542: }
2543:
2544: void pushEntity(String name, String pubID, String sysID,
2545: boolean isParamEntity, boolean returnEndToken,
2546: int resumeLexState) throws SAXException, IOException {
2547: Entity en = entityManager.getByID(currentEntity, pubID, sysID);
2548: pushEntity(name, en, isParamEntity, returnEndToken,
2549: resumeLexState);
2550: }
2551:
2552: // Should we parse external entities of type entityType?
2553: boolean parseExternalEntities(int entityType) {
2554: if (currentEntity.isStandalone()) {
2555: return false;
2556: }
2557: switch (entityType) {
2558: case EntityManager.PARAMETER:
2559: return parser.fExternalParameterEntities;
2560:
2561: case EntityManager.GENERAL:
2562: default:
2563: return parser.fExternalGeneralEntities;
2564: }
2565: }
2566:
2567: private void pushEntityState(String entityName,
2568: boolean newIsParamEntity, boolean newReturnEndToken)
2569: throws SAXException {
2570: pushEntityState(entityName, newIsParamEntity,
2571: newReturnEndToken, 0);
2572: }
2573:
2574: private void pushEntityState(String entityName,
2575: boolean newIsParamEntity, boolean newReturnEndToken,
2576: int newReturnLexState) throws SAXException {
2577: long entityState = (entityBaseDepth << 11)
2578: | ((prevEntityLexState & 0xFF) << 3)
2579: | (returnEntityEndToken ? 4 : 0)
2580: | (isParamEntity ? 2 : 0)
2581: | (isEntityBeingParsed ? 1 : 0);
2582:
2583: entityStateStack.push(entityState);
2584: entityBaseDepth = tagStack.size();
2585:
2586: entityNameStack.push(currentEntityName);
2587: currentEntityName = entityName;
2588:
2589: isParamEntity = newIsParamEntity;
2590: returnEntityEndToken = newReturnEndToken;
2591: isEntityBeingParsed = true;
2592: prevEntityLexState = newReturnLexState;
2593: }
2594:
2595: private void popEntityState() throws SAXException {
2596: if (prevEntityLexState != 0)
2597: yybegin(prevEntityLexState);
2598:
2599: long entityState = entityStateStack.pop();
2600: returnEntityEndToken = ((entityState & 4) == 4);
2601: isParamEntity = ((entityState & 2) == 2);
2602: isEntityBeingParsed = ((entityState & 1) == 1);
2603: entityBaseDepth = (int) ((entityState >> 11) & 0xFFFF);
2604: prevEntityLexState = (int) ((entityState >> 3) & 0xFF);
2605:
2606: if (currentEntityName != null)
2607: parser.reportEndEntity(currentEntityName);
2608:
2609: currentEntityName = entityNameStack.pop();
2610:
2611: if (tagStack.size() > entityBaseDepth)
2612: setTokenize(false);
2613: }
2614:
2615: private void clearEntityState() {
2616: entityStateStack.clear();
2617: entityNameStack.clear();
2618: returnEntityEndToken = true;
2619: isParamEntity = false;
2620: entityBaseDepth = 0;
2621: isEntityBeingParsed = true;
2622: prevEntityLexState = 0;
2623: currentEntityName = null;
2624: }
2625:
2626: /* Handles an entity reference, either general or paramter.
2627: * Returns a token which should be passed on to Piccolo,
2628: * or zero if no token should be returned.
2629: */
2630: private int handleEntityRef(String name, int entityType)
2631: throws IOException, SAXException {
2632: Entity entity = entityManager.getByName(name, entityType);
2633:
2634: if (entity == null) {
2635: handleUnknownEntityRef(name, entityType);
2636: return 0;
2637: }
2638:
2639: boolean isParam = (entityType == EntityManager.PARAMETER);
2640: String entityReportedName;
2641:
2642: // We only report the start/end of parameter entities
2643: // if they're at the "top level" and not within a declaration
2644: if (isParam) {
2645: if (yystate() == DTD)
2646: entityReportedName = "%" + name;
2647: else
2648: entityReportedName = null;
2649: } else
2650: entityReportedName = name;
2651:
2652: if (entity.isInternal()) {
2653: pushEntity(entityReportedName, entity, isParam, true);
2654: setTokenize(true);
2655: return Piccolo.INTERNAL_ENTITY_REF;
2656: } else if (name == "[dtd]" || parseExternalEntities(entityType)) {
2657: pushEntity(entityReportedName, entity, isParam, true);
2658: setTokenize(true);
2659: return Piccolo.EXTERNAL_ENTITY_REF;
2660: } else {
2661: entityWasSkipped = true;
2662: parser.reportSkippedEntity(entityReportedName);
2663: return 0;
2664: }
2665: }
2666:
2667: /* Handles an entity reference within a quoted string.
2668: * Returns true if the entity was replaced, or false if the
2669: * entity was skipped.
2670: */
2671: private boolean handleLiteralEntityRef(String name, int entityType)
2672: throws IOException, SAXException {
2673: Entity entity = entityManager.getByName(name, entityType);
2674: boolean isParam = false;
2675: if (entityType == EntityManager.PARAMETER)
2676: isParam = true;
2677:
2678: if (entity == null) {
2679: if (!(isParam || (!currentEntity.isStandalone() && entityWasSkipped)))
2680: throw fatalError("Reference to undefined entity: "
2681: + name);
2682: else
2683: return false;
2684: } else if (entity.isInternal()) {
2685: pushEntity(null, entity, isParam, false, prevState);
2686: yybegin((isParam ? DTD_TAG_VALUE_ENTITY : TAG_VALUE_ENTITY));
2687: return true;
2688: } else if (!isParam) {
2689: throw fatalError("Referencing an external entity within an "
2690: + "attribute value is illegal");
2691: } else if (parseExternalEntities(entityType)) {
2692: // Reference to external entity within DTD literal
2693: yybegin(DTD_TAG_VALUE_EXTERNAL_ENTITY);
2694: pushEntity(null, entity, isParam, false, prevState);
2695: return true;
2696: } else {
2697: entityWasSkipped = true;
2698: return false;
2699: }
2700: }
2701:
2702: private void handleUnknownEntityRef(String name, int type)
2703: throws SAXException {
2704: boolean isParam = (type == EntityManager.PARAMETER);
2705: String reportedName = (isParam ? "%" : "") + name;
2706:
2707: if (!currentEntity.isStandalone() && entityWasSkipped)
2708: parser.reportSkippedEntity(reportedName);
2709: else
2710: throw fatalError("Reference to undefined entity: "
2711: + reportedName);
2712: }
2713:
2714: private boolean isTopEntity() {
2715: return !(yymoreStreams());
2716: }
2717:
2718: /************************************************************************
2719: * End Methods to handle the parsing of parsed entities
2720: ************************************************************************/
2721:
2722: /************************************************************************
2723: * Methods used by this class for parsing, both by the JFlex-based
2724: * code and by parseXML().
2725: ************************************************************************/
2726:
2727: /* Parse the attribute value of a double-quoted string and add the
2728: * attribute.
2729: */
2730: private void parseQuotedTagValue() throws SAXException, IOException {
2731: if (elementDefinition == null) {
2732: parseCdataLiteral('\"', TAG_QSTRING_CDATA_BUFFERED);
2733: } else {
2734: IndexedObject o = elementDefinition
2735: .getIndexedAttribute(attributeQName);
2736: if (o == null) {
2737: attributeValueType = "CDATA";
2738: parseCdataLiteral('\"', TAG_QSTRING_CDATA_BUFFERED);
2739: } else {
2740: defaultAttributeSpecified[o.getIndex()] = true;
2741: int type = ((AttributeDefinition) o.getObject())
2742: .getValueType();
2743: if (type == AttributeDefinition.CDATA) {
2744: attributeValueType = "CDATA";
2745: parseCdataLiteral('\"', TAG_QSTRING_CDATA_BUFFERED);
2746: } else {
2747: attributeValueType = AttributeDefinition
2748: .getValueTypeString(type);
2749: yybegin(TAG_QSTRING_NORMALIZE);
2750: }
2751: }
2752: }
2753: }
2754:
2755: /* Same, but for a single-quoted value */
2756: private void parseSingleQuotedTagValue() throws SAXException,
2757: IOException {
2758: if (elementDefinition == null) {
2759: parseCdataLiteral('\'', TAG_SQSTRING_CDATA_BUFFERED);
2760: } else {
2761: IndexedObject o = elementDefinition
2762: .getIndexedAttribute(attributeQName);
2763: if (o == null) {
2764: attributeValueType = "CDATA";
2765: parseCdataLiteral('\'', TAG_SQSTRING_CDATA_BUFFERED);
2766: } else {
2767: defaultAttributeSpecified[o.getIndex()] = true;
2768: int type = ((AttributeDefinition) o.getObject())
2769: .getValueType();
2770: if (type == AttributeDefinition.CDATA) {
2771: attributeValueType = "CDATA";
2772: parseCdataLiteral('\'', TAG_SQSTRING_CDATA_BUFFERED);
2773: } else {
2774: attributeValueType = AttributeDefinition
2775: .getValueTypeString(type);
2776: yybegin(TAG_SQSTRING_NORMALIZE);
2777: }
2778: }
2779: }
2780: }
2781:
2782: /*
2783: * Parses a double- or single-quoted string. If we hit the end of the
2784: * input buffer or encounter an entity reference, put JFlex into
2785: * the state supplied in "bufferedState".
2786: */
2787: private void parseCdataLiteral(char closingQuote, int bufferedState)
2788: throws SAXException, IOException {
2789: // We parse this ourselves so we can translate whitespace
2790: // inline without copying to a buffer
2791: int startPos = yy_markedPos;
2792:
2793: while ((yy_endRead - yy_markedPos) > 0) {
2794: char c = yy_buffer[yy_markedPos++];
2795:
2796: if (c == '&') {
2797: //yycolumn_next++;
2798: clearCbuf();
2799: appendToCbuf(yy_buffer, startPos, (yy_markedPos - 1)
2800: - startPos);
2801: prevState = bufferedState;
2802: yybegin(TAG_VALUE_ENTITYREF);
2803: return;
2804: } else if (c == '<') {
2805: throw fatalError("Illegal '<' found in attribute value. Use '<' instead.");
2806: }
2807:
2808: // Check common characters as early as possible
2809: else if (c > '\'') {
2810: //yycolumn_next++;
2811: }
2812:
2813: else if (c == closingQuote) {
2814: //yycolumn_next++;
2815: String value;
2816: int valueLen = (yy_markedPos - 1) - startPos;
2817:
2818: // Cache and intern short strings and all URIs
2819: if (valueLen < 4 || isNamespaceDeclaration)
2820: value = stringConverter.convert(yy_buffer,
2821: startPos, valueLen);
2822: else
2823: value = new String(yy_buffer, startPos, valueLen);
2824:
2825: addAttribute(attributeURI, attributeLocalName,
2826: attributeQName, attributeValueType, value);
2827:
2828: // Next character must be a space, ">" or "/"
2829: int n;
2830: if ((yy_endRead - yy_markedPos) <= 0) {
2831: n = yynextChar();
2832: } else {
2833: n = yy_buffer[yy_markedPos++];
2834: }
2835:
2836: switch (n) {
2837: case ' ':
2838: case '\t':
2839: //yycolumn_next++;
2840: break;
2841:
2842: case '\n':
2843: yyline_next++;
2844: //yycolumn_next = 0;
2845: break;
2846:
2847: case '/':
2848: case '>':
2849: yy_markedPos--;
2850: endOfTag = true;
2851: return;
2852:
2853: default:
2854: throw fatalError("Whitespace missing after attribute value");
2855: }
2856:
2857: // Discard any trailing whitespace
2858: while ((yy_endRead - yy_markedPos) > 0) {
2859: switch (yy_buffer[yy_markedPos]) {
2860: case ' ':
2861: case '\t':
2862: yy_markedPos++;
2863: //yycolumn_next++;
2864: break;
2865:
2866: case '\n':
2867: yy_markedPos++;
2868: yyline_next++;
2869: //yycolumn_next = 0;
2870: break;
2871:
2872: default:
2873: return;
2874: }
2875: }
2876:
2877: return;
2878: }
2879:
2880: else if (c == '\t') {
2881: //yycolumn_next++;
2882: yy_buffer[yy_markedPos - 1] = ' ';
2883: } else if (c == '\n') {
2884: yyline_next++;
2885: //yycolumn_next = 0;
2886: yy_buffer[yy_markedPos - 1] = ' ';
2887: } else {
2888: //yycolumn_next++;
2889: }
2890: }
2891:
2892: // we hit the end of the read buffer and so need to buffer this string
2893: clearCbuf();
2894: appendToCbuf(yy_buffer, startPos, yy_markedPos - startPos);
2895: prevState = bufferedState;
2896: yybegin(bufferedState);
2897: }
2898:
2899: // Parses a character entity and appends it to the character buffer.
2900: // A character entity reference can produce 1 or 2 characters.
2901: private void parseEncodedChar(char[] buf, int off, int len,
2902: int radix) throws CharConversionException {
2903: try {
2904: int result = 0;
2905: for (int i = 0; i < len; i++)
2906: result = (result * radix)
2907: + Character.digit(buf[off + i], radix);
2908:
2909: if (result >= 0x110000)
2910: throw new IllegalCharException(
2911: "Character reference to illegal XML character");
2912:
2913: if (result >= 0x10000) { // This is a 2-character entity
2914: result -= 0x10000;
2915:
2916: appendToCbuf((char) ((result >> 10) + 0xD800));
2917: appendToCbuf((char) ((result & ((1 << 10) - 1)) + 0xDC00));
2918: } else if ((result < 0x20 && result != '\t'
2919: && result != '\r' && result != '\n')
2920: || (result >= 0xD800 && result < 0xE000)
2921: || result >= 0xFFFE)
2922: throw new IllegalCharException(
2923: "Character reference to illegal XML character");
2924: else
2925: appendToCbuf((char) result);
2926: } catch (ClassCastException e) {
2927: throw new CharConversionException();
2928: }
2929: }
2930:
2931: // Prepare an element that may have attributes
2932: // Call this before any attributes are read for the current element
2933: private void prepareComplexElement(String elementQName) {
2934:
2935: isNamespaceDeclaration = false;
2936:
2937: elementDefinition = getElement(elementQName);
2938: // if necessary, resize the array of attribute default specified flags
2939: if (elementDefinition != null) {
2940: numAttributesDefined = elementDefinition
2941: .getAttributeCount();
2942: int currentSize = defaultAttributeSpecified.length;
2943: if (currentSize < numAttributesDefined) {
2944: defaultAttributeSpecified = new boolean[Math.max(
2945: 2 * currentSize, numAttributesDefined)];
2946: }
2947:
2948: for (int i = 0; i < numAttributesDefined; i++) {
2949: defaultAttributeSpecified[i] = false;
2950: }
2951: } else {
2952: attributeValueType = "CDATA";
2953: }
2954: }
2955:
2956: // Call this after completing the parsing of an element with attributes
2957: private void processComplexElement() throws SAXException,
2958: IOException {
2959: if (elementDefinition != null) {
2960: AttributeDefinition[] attributes = elementDefinition
2961: .getAttributes();
2962: for (int i = 0; i < numAttributesDefined; i++) {
2963: if (!defaultAttributeSpecified[i]) {
2964: AttributeDefinition ad = attributes[i];
2965: String defaultValue = ad.getDefaultValue();
2966: if (defaultValue != null) {
2967: attribs.addAttribute(ad.getPrefix(), ad
2968: .getLocalName(), ad.getQName(), ad
2969: .getValueTypeString(), defaultValue);
2970: }
2971: }
2972: }
2973: }
2974: }
2975:
2976: private void processNSContextEnd() throws SAXException {
2977: int mappings = nsSupport.getContextSize();
2978: for (int i = 0; i < mappings; i++) {
2979: parser
2980: .reportEndPrefixMapping(nsSupport
2981: .getContextPrefix(i));
2982: }
2983: nsSupport.popContext();
2984: }
2985:
2986: // Add an attribute to the current element
2987: private void addAttribute(String prefix, String localName,
2988: String qName, String type, String value)
2989: throws SAXException {
2990:
2991: // If we saw an entity within a non-CDATA value, we need to normalize
2992: // it again.
2993: if (needsNormalization) {
2994: value = normalizeValue(value);
2995: needsNormalization = false;
2996: }
2997:
2998: if (isNamespaceDeclaration && parser.fNamespaces) {
2999: if (parser.fNamespacePrefixes)
3000: attribs.addAndCheckAttribute(prefix, localName, qName,
3001: type, value);
3002:
3003: if (prefix == "") {
3004: if (localName == "xmlns")
3005: localName = "";
3006: nsSupport.declarePrefix(localName, value);
3007: parser.reportStartPrefixMapping(localName, value);
3008: } else if (prefix != "xml") {
3009: nsSupport.declarePrefix(localName, value);
3010: parser.reportStartPrefixMapping(localName, value);
3011: }
3012: } else
3013: attribs.addAndCheckAttribute(prefix, localName, qName,
3014: type, value);
3015: }
3016:
3017: // Call this after parsing an element with no attributes
3018: private void processSimpleElement(String elementQName)
3019: throws SAXException, IOException {
3020: elementDefinition = getElement(elementQName);
3021:
3022: if (elementDefinition != null) {
3023: AttributeDefinition[] defaults = elementDefinition
3024: .getAttributes();
3025: int numDefaults = elementDefinition.getAttributeCount();
3026: for (int i = 0; i < numDefaults; i++) {
3027: AttributeDefinition ad = defaults[i];
3028: String defaultValue = ad.getDefaultValue();
3029:
3030: if (defaultValue != null) {
3031: attribs.addAttribute(ad.getPrefix(), ad
3032: .getLocalName(), ad.getQName(), ad
3033: .getValueTypeString(), defaultValue);
3034: }
3035: }
3036: }
3037: }
3038:
3039: String rescanAttributeValue(String defaultValue)
3040: throws SAXException, IOException {
3041: clearCbuf();
3042: char[] valbuf = defaultValue.toCharArray();
3043: yypushBuffer(valbuf, 0, valbuf.length);
3044: pushEntityState(null, false, true, yystate());
3045: yybegin(TAG_VALUE_ENTITY);
3046: isEntityBeingParsed = false;
3047: if (yylex() != Piccolo.ENTITY_END)
3048: throw fatalError("Unexpected element while parsing attribute default value");
3049: isEntityBeingParsed = true;
3050:
3051: // We need to internalize values for namespace declarations. Not much
3052: // harm in just internalizing all attribute defaults.
3053: return stringConverter.convert(cbuf, 0, cbuflen);
3054: }
3055:
3056: // Resolves the element and attribute prefixes for the element we just parsed
3057: // into URIs
3058: private void resolveNamespacePrefixes() {
3059: elementURI = nsSupport.getURI(elementURI);
3060: int numAttributes = attribs.getLength();
3061: for (int i = 0; i < numAttributes; i++) {
3062: String prefix = attribs.getURI(i);
3063: if (prefix != "") {
3064: String uri = nsSupport.getURI(prefix);
3065: if (uri != "")
3066: attribs.setURI(i, uri);
3067: }
3068:
3069: }
3070: }
3071:
3072: // Ensures that the end tag we just parsed properly closes a start tag.
3073: // If we've just hit the top-level end tag, turn tokenization back on
3074: // so we return a token to Piccolo.
3075: private void checkEndTag(String endQName) throws SAXException {
3076: String properEnd = tagStack.pop();
3077: if (tagStack.size() == entityBaseDepth) {
3078: setTokenize(true);
3079: }
3080:
3081: if (properEnd != endQName)
3082: throw fatalError("</" + endQName + "> does not close tag <"
3083: + properEnd + ">.");
3084: }
3085:
3086: /************************************************************************
3087: * End Methods used by this class for parsing.
3088: ************************************************************************/
3089:
3090: /************************************************************************
3091: * Miscellaneous methods used internally to this class
3092: ************************************************************************/
3093:
3094: // Like JFlex's yytext(), but the String returned is internalized.
3095: private String yytext2() {
3096: return stringConverter.convert(yy_buffer, yy_startRead,
3097: yy_markedPos - yy_startRead);
3098: }
3099:
3100: // Like yytext(int start, int length), but the String returned is internalized
3101: private String yytext2(int start, int length) {
3102: return stringConverter.convert(yy_buffer, yy_startRead + start,
3103: length);
3104: }
3105:
3106: // Throws a fatal SAXException
3107: private FatalParsingException fatalError(String msg) {
3108: return new FatalParsingException(msg);
3109: }
3110:
3111: // Same but with an embedded exception
3112: private FatalParsingException fatalError(String msg, Exception e) {
3113: return new FatalParsingException(msg, e);
3114: }
3115:
3116: // backup one character mentaining the corect line number
3117: private void safeBacktrack() {
3118: if (yy_buffer[--yy_markedPos] == '\n')
3119: yyline_next--;
3120: // todo: have to reset yycolumn_next to previous line's value as well?
3121: }
3122:
3123: /************************************************************************
3124: * End Miscellaneous methods
3125: ************************************************************************/
3126:
3127: /**
3128: * Creates a new scanner
3129: * There is also a java.io.InputStream version of this constructor.
3130: *
3131: * @param in the java.io.Reader to read input from.
3132: */
3133: PiccoloLexer(java.io.Reader in) {
3134: this .yy_reader = in;
3135: }
3136:
3137: /**
3138: * Creates a new scanner.
3139: * There is also java.io.Reader version of this constructor.
3140: *
3141: * @param in the java.io.Inputstream to read input from.
3142: */
3143: PiccoloLexer(java.io.InputStream in) {
3144: this (new java.io.InputStreamReader(in));
3145: }
3146:
3147: /**
3148: * Unpacks the split, compressed DFA transition table.
3149: *
3150: * @return the unpacked transition table
3151: */
3152: private static int[] yy_unpack() {
3153: int[] trans = new int[21172];
3154: int offset = 0;
3155: offset = yy_unpack(yy_packed0, offset, trans);
3156: return trans;
3157: }
3158:
3159: /**
3160: * Unpacks the compressed DFA transition table.
3161: *
3162: * @param packed the packed transition table
3163: * @return the index of the last entry
3164: */
3165: private static int yy_unpack(String packed, int offset, int[] trans) {
3166: int i = 0; /* index in packed string */
3167: int j = offset; /* index in unpacked array */
3168: int l = packed.length();
3169: while (i < l) {
3170: int count = packed.charAt(i++);
3171: int value = packed.charAt(i++);
3172: value--;
3173: do
3174: trans[j++] = value;
3175: while (--count > 0);
3176: }
3177: return j;
3178: }
3179:
3180: /**
3181: * Unpacks the compressed character translation table.
3182: *
3183: * @param packed the packed character translation table
3184: * @return the unpacked character translation table
3185: */
3186: private static char[] yy_unpack_cmap(String packed) {
3187: char[] map = new char[0x10000];
3188: int i = 0; /* index in packed string */
3189: int j = 0; /* index in unpacked array */
3190: while (i < 1350) {
3191: int count = packed.charAt(i++);
3192: char value = packed.charAt(i++);
3193: do
3194: map[j++] = value;
3195: while (--count > 0);
3196: }
3197: return map;
3198: }
3199:
3200: /**
3201: * Refills the input buffer.
3202: *
3203: * @return <code>false</code>, iff there was new input.
3204: *
3205: * @exception IOException if any I/O-Error occurs
3206: */
3207: private boolean yy_refill() throws java.io.IOException {
3208:
3209: /* first: make room (if you can) */
3210: int save_at = yy_savePos < 0 ? yy_startRead : yy_savePos;
3211: if (save_at > 0) {
3212: System.arraycopy(yy_buffer, save_at, yy_buffer, 0,
3213: yy_endRead - save_at);
3214:
3215: /* translate stored positions */
3216: yy_endRead -= save_at;
3217: yy_currentPos -= save_at;
3218: yy_markedPos -= save_at;
3219: yy_pushbackPos -= save_at;
3220: yy_startRead -= save_at;
3221: if (yy_savePos >= 0)
3222: yy_savePos = 0;
3223: }
3224:
3225: /* is the buffer big enough? */
3226: if (yy_markedPos >= yy_buffer.length
3227: || yy_currentPos >= yy_buffer.length) {
3228: /* if not: blow it up */
3229: char newBuffer[] = new char[yy_buffer.length * 2];
3230: System.arraycopy(yy_buffer, 0, newBuffer, 0,
3231: yy_buffer.length);
3232: yy_buffer = newBuffer;
3233:
3234: // Always save the largest buffer for future parsing
3235: if (yy_buffer.length > yy_saved_buffer.length) {
3236: yy_saved_buffer = yy_buffer;
3237: }
3238: }
3239:
3240: /* finally: fill the buffer with new input */
3241: int numRead = yy_reader.read(yy_buffer, yy_endRead,
3242: yy_buffer.length - yy_endRead);
3243:
3244: if (numRead < 0) {
3245: return true;
3246: } else {
3247: yy_endRead += numRead;
3248: return false;
3249: }
3250: }
3251:
3252: /**
3253: * Closes the input stream.
3254: */
3255: final public void yyclose() throws java.io.IOException {
3256: yy_atEOF = true; /* indicate end of file */
3257: yy_endRead = yy_startRead; /* invalidate buffer */
3258:
3259: if (yy_reader != null)
3260: yy_reader.close();
3261: }
3262:
3263: /**
3264: * Stores the current input stream on a stack, and
3265: * reads from a new stream. Lexical state, line,
3266: * char, and column counting remain untouched.
3267: *
3268: * The current input stream can be restored with
3269: * yypopstream (usually in an <<EOF>> action).
3270: *
3271: * @param reader the new input stream to read from
3272: *
3273: * @see #yypopStream()
3274: */
3275: final public void yypushStream(java.io.Reader reader) {
3276: yy_streams.push(new YY_StreamInfo(yy_reader, yy_endRead,
3277: yy_startRead, yy_savePos, yy_currentPos, yy_markedPos,
3278: yy_pushbackPos, yy_buffer, yy_atEOF, yyline_next,
3279: yycolumn_next));
3280: yy_atEOF = false;
3281: yy_buffer = new char[YY_BUFFERSIZE];
3282: yy_reader = reader;
3283: yy_endRead = yy_startRead = 0;
3284: yy_savePos = -1;
3285: yy_currentPos = yy_markedPos = yy_pushbackPos = 0;
3286: yyline = yycolumn = yyline_next = yycolumn_next = 0;
3287:
3288: // Yuval Oren 2002-01-09 added to correct the case in which you pushStream() and don't "return"
3289: yy_endRead_l = yy_endRead;
3290: yy_buffer_l = yy_buffer;
3291: }
3292:
3293: final public void yypushBuffer(char[] buffer, int off, int len) {
3294: yy_streams.push(new YY_StreamInfo(yy_reader, yy_endRead,
3295: yy_startRead, yy_savePos, yy_currentPos, yy_markedPos,
3296: yy_pushbackPos, yy_buffer, yy_atEOF, yyline, yycolumn));
3297: yy_atEOF = true;
3298: yy_buffer = buffer;
3299: yy_reader = null;
3300: yy_startRead = yy_markedPos = yy_currentPos = yy_pushbackPos = off;
3301: yy_savePos = -1;
3302: yy_endRead = yy_startRead + len;
3303: yyline = yycolumn = yyline_next = yycolumn_next = 0;
3304:
3305: // Yuval added
3306: yy_endRead_l = yy_endRead;
3307: yy_buffer_l = yy_buffer;
3308: }
3309:
3310: /**
3311: * Closes the current input stream and continues to
3312: * read from the one on top of the stream stack.
3313: *
3314: * @throws java.util.EmptyStackException
3315: * if there is no further stream to read from.
3316: *
3317: * @throws java.io.IOException
3318: * if there was an error in closing the stream.
3319: *
3320: * @see #yypushStream(java.io.Reader)
3321: */
3322: final public void yypopStream() throws java.io.IOException {
3323: if (yy_reader != null)
3324: yy_reader.close();
3325: YY_StreamInfo s = (YY_StreamInfo) yy_streams.pop();
3326: yy_buffer = s.yy_buffer;
3327: yy_reader = s.yy_reader;
3328: yy_endRead = s.yy_endRead;
3329: yy_startRead = s.yy_startRead;
3330: yy_savePos = s.yy_savePos;
3331: yy_currentPos = s.yy_currentPos;
3332: yy_markedPos = s.yy_markedPos;
3333: yy_pushbackPos = s.yy_pushbackPos;
3334: yy_atEOF = s.yy_atEOF;
3335: yyline = s.yyline;
3336: yycolumn = s.yycolumn;
3337: yyline_next = yyline;
3338: yycolumn_next = yycolumn;
3339:
3340: // Yuval added
3341: yy_endRead_l = yy_endRead;
3342: yy_buffer_l = yy_buffer;
3343: yycmap_l = yycmap;
3344:
3345: }
3346:
3347: /**
3348: * Returns true iff there are still streams left
3349: * to read from on the stream stack.
3350: */
3351: final public boolean yymoreStreams() {
3352: return !yy_streams.isEmpty();
3353: }
3354:
3355: /**
3356: * Closes the current stream, and resets the
3357: * scanner to read from a new input stream.
3358: *
3359: * All internal variables are reset, the old input stream
3360: * <b>cannot</b> be reused (internal buffer is discarded and lost).
3361: * Lexical state is set to <tt>YY_INITIAL</tt>.
3362: *
3363: * @param reader the new input stream
3364: *
3365: * @see #yypushStream(java.io.Reader)
3366: * @see #yypopStream()
3367: */
3368: final public void yyreset(java.io.Reader reader)
3369: throws java.io.IOException {
3370: yyclose();
3371:
3372: yy_buffer = yy_saved_buffer;
3373:
3374: yy_reader = reader;
3375: yy_atBOL = true;
3376: yy_atEOF = false;
3377: yy_endRead = yy_startRead = 0;
3378: yy_savePos = -1;
3379: yy_currentPos = yy_markedPos = yy_pushbackPos = 0;
3380:
3381: yyline = yychar = yycolumn = 0;
3382: yy_state = yy_lexical_state = YYINITIAL;
3383: yy_sawCR = false;
3384: yyline_next = yycolumn_next = 0;
3385:
3386: yy_streams.clear();
3387: }
3388:
3389: final public void yyreset(char[] buffer, int off, int len)
3390: throws java.io.IOException {
3391: yyclose();
3392: yy_buffer = buffer;
3393: yy_reader = null;
3394: yy_atBOL = true;
3395: yy_atEOF = true;
3396: yy_currentPos = yy_markedPos = yy_pushbackPos = yy_startRead = off;
3397:
3398: yy_savePos = -1;
3399: yy_endRead = off + len;
3400: yyline = yychar = yycolumn = 0;
3401: yy_state = yy_lexical_state = YYINITIAL;
3402: yy_sawCR = false;
3403: yyline_next = yycolumn_next = 0;
3404:
3405: yy_endRead_l = yy_endRead;
3406: yy_buffer_l = yy_buffer;
3407:
3408: yy_streams.clear();
3409: }
3410:
3411: /**
3412: * Returns the current lexical state.
3413: */
3414: final public int yystate() {
3415: return yy_lexical_state;
3416: }
3417:
3418: /**
3419: * Enters a new lexical state
3420: *
3421: * @param newState the new lexical state
3422: */
3423: final public void yybegin(int newState) {
3424: yy_lexical_state = newState;
3425: }
3426:
3427: /**
3428: * Returns the text matched by the current regular expression.
3429: */
3430: final public String yytext() {
3431: return new String(yy_buffer, yy_startRead, yy_markedPos
3432: - yy_startRead);
3433: }
3434:
3435: /**
3436: * Returns the text matched by the current regular expression.
3437: *
3438: * @param start starting offset from the beginning of the current expression.
3439: * @param length number of characters to include in the string.
3440: */
3441: final public String yytext(int offset, int length) {
3442: return new String(yy_buffer, yy_startRead + offset, length);
3443: }
3444:
3445: /**
3446: * Accept the current action as completed and update line, column and
3447: * character counters accordingly. Used in conjunction with
3448: * yynextChar().
3449: *
3450: * @see #yynextChar()
3451: */
3452: final public void yynextAction() {
3453: yyline = yyline_next;
3454: yycolumn = yycolumn_next;
3455: // Uncomment for %char directive: yychar += (yy_markedPos - yy_startRead);
3456: yy_currentPos = yy_startRead = yy_markedPos;
3457: }
3458:
3459: /**
3460: * Extends the matched text by one character and returns it.
3461: *
3462: * @returns the next character, or YYEOF
3463: */
3464: final public int yynextChar() throws IOException {
3465: if (yy_markedPos < yy_endRead)
3466: return yy_buffer[yy_markedPos++];
3467: else if (yy_atEOF) {
3468: return YYEOF;
3469: } else {
3470: boolean eof = yy_refill();
3471: yy_buffer_l = yy_buffer;
3472: yy_endRead_l = yy_endRead;
3473: if (eof)
3474: return YYEOF;
3475: else
3476: return yy_buffer[yy_markedPos++];
3477: }
3478: }
3479:
3480: /**
3481: * Extends the matched text by one character and returns it.
3482: * Similar to yynextChar(), but the caller guarantees [by using
3483: * yybufferLeft()] that there is at least one more character in the
3484: * buffer.
3485: *
3486: *
3487: * @returns the next character, or YYEOF
3488: */
3489: final public int yynextBufferChar() {
3490: return yy_buffer[yy_markedPos++];
3491: }
3492:
3493: /**
3494: * Counts the character for line and column counting.
3495: */
3496: final public void yycountChar(int yy_input) {
3497: switch (yy_input) {
3498: /* Piccolo eliminates all CR's before they get to JFlex
3499: case '\r':
3500: yyline_next++;
3501: yycolumn_next = 0;
3502: yy_sawCR = true;
3503: break;
3504: */
3505: case '\n':
3506: // if (yy_sawCR)
3507: // yy_sawCR = false;
3508: // else {
3509: yyline_next++;
3510: // yycolumn_next = 0;
3511: // }
3512: break;
3513:
3514: default:
3515: // yy_sawCR = false;
3516: // yycolumn_next++;
3517: break;
3518: }
3519: }
3520:
3521: /**
3522: * Returns the character at position <tt>pos</tt> from the
3523: * matched text.
3524: *
3525: * It is equivalent to yytext().charAt(pos), but faster
3526: *
3527: * @param pos the position of the character to fetch.
3528: * A value from 0 to yylength()-1.
3529: *
3530: * @return the character at position pos
3531: */
3532: final public char yycharat(int pos) {
3533: return yy_buffer[yy_startRead + pos];
3534: }
3535:
3536: /**
3537: * Returns the number of characters remaining in the buffer,
3538: * not including the matched text, before more
3539: * characters must be read from the input Reader.
3540: *
3541: */
3542: final public int yybufferLeft() {
3543: return yy_endRead - yy_markedPos;
3544: }
3545:
3546: /**
3547: * Skips past the specified number of characters.
3548: * These characters will be included in line, column, and character
3549: * counting, but they will not be used for matching.
3550: *
3551: * @param n the number of characters to skip
3552: */
3553: final public void yyskip(int n) {
3554: yy_markedPos += n;
3555: yy_markedPos_l = yy_markedPos;
3556: if (yy_markedPos > yy_endRead)
3557: yy_ScanError(YY_SKIP_2BIG);
3558: }
3559:
3560: /**
3561: * Returns the length of the matched text region.
3562: */
3563: final public int yylength() {
3564: return yy_markedPos - yy_startRead;
3565: }
3566:
3567: /**
3568: * Reports an error that occured while scanning.
3569: *
3570: * In a wellformed scanner (no or only correct usage of
3571: * yypushback(int) and a match-all fallback rule) this method
3572: * will only be called with things that "Can't Possibly Happen".
3573: * If this method is called, something is seriously wrong
3574: * (e.g. a JFlex bug producing a faulty scanner etc.).
3575: *
3576: * Usual syntax/scanner level error handling should be done
3577: * in error fallback rules.
3578: *
3579: * @param errorCode the code of the errormessage to display
3580: */
3581: private void yy_ScanError(int errorCode) {
3582: String message;
3583: try {
3584: message = YY_ERROR_MSG[errorCode];
3585: } catch (ArrayIndexOutOfBoundsException e) {
3586: message = YY_ERROR_MSG[YY_UNKNOWN_ERROR];
3587: }
3588:
3589: throw new Error(message);
3590: }
3591:
3592: /**
3593: * Pushes the specified amount of characters back into the input stream.
3594: *
3595: * They will be read again by then next call of the scanning method
3596: *
3597: * @param number the number of characters to be read again.
3598: * This number must not be greater than yylength()!
3599: */
3600: private void yypushback(int number) {
3601: if (number > yylength())
3602: yy_ScanError(YY_PUSHBACK_2BIG);
3603:
3604: yy_markedPos -= number;
3605:
3606: // Recount the lines and columns
3607: yyline_next = yyline;
3608: yycolumn_next = yycolumn;
3609: yy_sawCR = yy_prev_sawCR;
3610: for (int pos = yy_startRead; pos < yy_markedPos; pos++)
3611: yycountChar(yy_buffer[pos]);
3612: }
3613:
3614: /**
3615: * Contains user EOF-code, which will be executed exactly once,
3616: * when the end of file is reached
3617: */
3618: private void yy_do_eof() throws java.io.IOException {
3619: if (!yy_eof_done) {
3620: yy_eof_done = true;
3621: yyclose();
3622: }
3623: }
3624:
3625: // Yuval moved cached fields to class level so yypushStream() can set them.
3626: private int yy_currentPos_l;
3627: private int yy_startRead_l;
3628: private int yy_markedPos_l;
3629: private int yy_endRead_l;
3630: private char[] yy_buffer_l;
3631: private char[] yycmap_l;
3632:
3633: // Line and column counting variables.
3634: private boolean yy_sawCR = false; // Was the last character a CR?
3635: private boolean yy_prev_sawCR = false; // value of yy_sawCR before this action was parsed
3636: private int yyline_next = 0; // What yyline should be after matched text
3637: private int yycolumn_next = 0; // What yycolumn should be after matched text
3638:
3639: /**
3640: * Resumes scanning until the next regular expression is matched,
3641: * the end of input is encountered or an I/O-Error occurs.
3642: *
3643: * @return the next token
3644: * @exception IOException if any I/O-Error occurs
3645: */
3646:
3647: public int yylex() throws java.io.IOException,
3648: org.xml.sax.SAXException, FatalParsingException {
3649: int yy_input;
3650: int yy_action;
3651:
3652: // Set cached fields:
3653: yy_endRead_l = yy_endRead;
3654: yy_buffer_l = yy_buffer;
3655: yycmap_l = yycmap;
3656:
3657: int[] yytrans_l = yytrans;
3658: int[] yy_rowMap_l = yy_rowMap;
3659: byte[] yy_attr_l = YY_ATTRIBUTE;
3660: int yy_pushbackPos_l = yy_pushbackPos = -1;
3661: boolean yy_was_pushback;
3662: int yyline_next_l, yycolumn_next_l;
3663:
3664: while (true) {
3665: yy_markedPos_l = yy_markedPos;
3666:
3667: // Add the lines and columns found in the last matching text
3668: yyline = yyline_next_l = yyline_next;
3669: // yycolumn = yycolumn_next_l = yycolumn_next;
3670: // yy_prev_sawCR = yy_sawCR;
3671:
3672: yy_action = -1;
3673:
3674: yy_startRead_l = yy_currentPos_l = yy_currentPos = yy_startRead = yy_markedPos_l;
3675:
3676: yy_state = yy_lexical_state;
3677:
3678: yy_was_pushback = false;
3679:
3680: yy_forAction: {
3681: while (true) {
3682:
3683: if (yy_currentPos_l < yy_endRead_l)
3684: yy_input = yy_buffer_l[yy_currentPos_l++];
3685: else if (yy_atEOF) {
3686: yy_input = YYEOF;
3687: break yy_forAction;
3688: } else {
3689: // store back cached positions
3690: yy_currentPos = yy_currentPos_l;
3691: yy_markedPos = yy_markedPos_l;
3692: yy_pushbackPos = yy_pushbackPos_l;
3693: boolean eof = yy_refill();
3694: // get translated positions and possibly new buffer
3695: yy_currentPos_l = yy_currentPos;
3696: yy_markedPos_l = yy_markedPos;
3697: yy_buffer_l = yy_buffer;
3698: yy_endRead_l = yy_endRead;
3699: yy_pushbackPos_l = yy_pushbackPos;
3700: if (eof) {
3701: yy_input = YYEOF;
3702: break yy_forAction;
3703: } else {
3704: yy_input = yy_buffer_l[yy_currentPos_l++];
3705: }
3706: }
3707: switch (yy_input) {
3708: /*
3709: case '\r':
3710: yyline_next_l++;
3711: yycolumn_next_l = 0;
3712: yy_sawCR = true;
3713: break;
3714: */
3715: case '\n':
3716: // if (yy_sawCR)
3717: // yy_sawCR = false;
3718: // else {
3719: yyline_next_l++;
3720: // yycolumn_next_l = 0;
3721: // }
3722: break;
3723:
3724: default:
3725: // yy_sawCR = false;
3726: // yycolumn_next_l++;
3727: break;
3728: }
3729:
3730: int yy_next = yytrans_l[yy_rowMap_l[yy_state]
3731: + yycmap_l[yy_input]];
3732: if (yy_next == -1)
3733: break yy_forAction;
3734: yy_state = yy_next;
3735:
3736: int yy_attributes = yy_attr_l[yy_state];
3737: if ((yy_attributes & 2) == 2)
3738: yy_pushbackPos_l = yy_currentPos_l;
3739:
3740: if ((yy_attributes & 1) == 1) {
3741: yy_was_pushback = (yy_attributes & 4) == 4;
3742: yy_action = yy_state;
3743: yy_markedPos_l = yy_currentPos_l;
3744: yyline_next = yyline_next_l;
3745: // yycolumn_next = yycolumn_next_l;
3746:
3747: if ((yy_attributes & 8) == 8)
3748: break yy_forAction;
3749: }
3750:
3751: }
3752: }
3753:
3754: // store back cached position
3755: yy_markedPos = yy_markedPos_l;
3756:
3757: if (yy_was_pushback)
3758: yy_markedPos = yy_pushbackPos_l;
3759:
3760: switch (yy_action) {
3761:
3762: case 322: {
3763: appendToCbuf('&');
3764: yybegin(prevState);
3765: }
3766: case 434:
3767: break;
3768: case 422: {
3769: yybegin(DTD_TAG);
3770: return Piccolo.NMTOKENS;
3771: }
3772: case 435:
3773: break;
3774: case 421: {
3775: yybegin(DTD_TAG);
3776: return Piccolo.ENTITIES;
3777: }
3778: case 436:
3779: break;
3780: case 416: {
3781: yybegin(DTD_ENTITY_DECL);
3782: return Piccolo.ENTITY_DECL_START;
3783: }
3784: case 437:
3785: break;
3786: case 408: {
3787: yybegin(DTD_TAG);
3788: return Piccolo.NMTOKEN;
3789: }
3790: case 438:
3791: break;
3792: case 388: {
3793: yybegin(DTD_TAG);
3794: return Piccolo.IDREFS;
3795: }
3796: case 439:
3797: break;
3798: case 385: {
3799: yybegin(DTD_TAG);
3800: return Piccolo.ENTITY;
3801: }
3802: case 440:
3803: break;
3804: case 122: {
3805: yybegin(DTD_TAG);
3806: return Piccolo.RPAREN;
3807: }
3808: case 441:
3809: break;
3810: case 106: {
3811: yybegin(DTD_TAG_START);
3812: bypassPERefs = bypassGERefs = false;
3813: }
3814: case 442:
3815: break;
3816: case 348: {
3817: yybegin(baseState);
3818: parser.reportCdata('"');
3819: }
3820: case 443:
3821: break;
3822: case 347: {
3823: yybegin(baseState);
3824: parser.reportCdata('\'');
3825: }
3826: case 444:
3827: break;
3828: case 311: {
3829: yybegin(baseState);
3830: parser.reportCdata('&');
3831: }
3832: case 445:
3833: break;
3834: case 263: {
3835: yybegin(baseState);
3836: parser.reportCdata('>');
3837: }
3838: case 446:
3839: break;
3840: case 257: {
3841: yybegin(baseState);
3842: parser.reportCdata('<');
3843: }
3844: case 447:
3845: break;
3846: case 222: {
3847: yybegin(DTD_TAG);
3848: return Piccolo.ID;
3849: }
3850: case 448:
3851: break;
3852: case 113: {
3853: yybegin(DTD);
3854: return Piccolo.TAG_END;
3855: }
3856: case 449:
3857: break;
3858: case 425: {
3859: return Piccolo.IMPLIED;
3860: }
3861: case 450:
3862: break;
3863: case 414: {
3864: return Piccolo.PCDATA;
3865: }
3866: case 451:
3867: break;
3868: case 411: {
3869: return Piccolo.INCLUDE;
3870: }
3871: case 452:
3872: break;
3873: case 391: {
3874: return Piccolo.IGNORE;
3875: }
3876: case 453:
3877: break;
3878: case 224: {
3879: return Piccolo.PERCENT;
3880: }
3881: case 454:
3882: break;
3883: case 139: {
3884: return Piccolo.LPAREN;
3885: }
3886: case 455:
3887: break;
3888: case 142: {
3889: return Piccolo.RPAREN;
3890: }
3891: case 456:
3892: break;
3893: case 5:
3894: case 54: {
3895: yybegin(PI);
3896: }
3897: case 457:
3898: break;
3899: case 138: {
3900: yybegin(DTD);
3901: return Piccolo.LBRACKET;
3902: }
3903: case 458:
3904: break;
3905: case 431: {
3906: return Piccolo.REQUIRED;
3907: }
3908: case 459:
3909: break;
3910: case 424: {
3911: return Piccolo.NOTATION;
3912: }
3913: case 460:
3914: break;
3915: case 423: {
3916: return Piccolo.NOTATION;
3917: }
3918: case 461:
3919: break;
3920: case 132: {
3921: return Piccolo.QUESTION;
3922: }
3923: case 462:
3924: break;
3925: case 427: {
3926: yybegin(DTD_TAG);
3927: return Piccolo.ELEMENT_DECL_START;
3928: }
3929: case 463:
3930: break;
3931: case 393: {
3932: bypassPERefs = bypassGERefs = true;
3933: yybegin(DTD_PUBLIC_ID);
3934: return Piccolo.PUBLIC;
3935: }
3936: case 464:
3937: break;
3938: case 39: {
3939: int token = parseWhitespace();
3940: if (token == Piccolo.CDATA) {
3941: parser.reportCdata();
3942: }
3943:
3944: return token;
3945: }
3946: case 465:
3947: break;
3948: case 119: {
3949: yybegin(DTD_TAG);
3950: return stringToken(Piccolo.NAME, yytext2());
3951: }
3952: case 466:
3953: break;
3954: case 153: {
3955: appendToCbuf(yy_buffer, yy_startRead, yy_markedPos
3956: - yy_startRead);
3957: yybegin(DTD_TAG_VALUE_ENTITY);
3958: }
3959: case 467:
3960: break;
3961: case 361: {
3962: yybegin(DTD_TAG);
3963: return Piccolo.CDATA;
3964: }
3965: case 468:
3966: break;
3967: case 360: {
3968: yybegin(DTD_TAG);
3969: return Piccolo.IDREF;
3970: }
3971: case 469:
3972: break;
3973: case 196: {
3974: yybegin(tagState);
3975: parseSingleQuotedTagValue();
3976: }
3977: case 470:
3978: break;
3979: case 396: {
3980: return Piccolo.FIXED;
3981: }
3982: case 471:
3983: break;
3984: case 364: {
3985: return Piccolo.NDATA;
3986: }
3987: case 472:
3988: break;
3989: case 362: {
3990: return Piccolo.EMPTY;
3991: }
3992: case 473:
3993: break;
3994: case 296: {
3995: return Piccolo.ANY;
3996: }
3997: case 474:
3998: break;
3999: case 206: {
4000: yybegin(tagState);
4001: String value;
4002:
4003: // Cache and internalize short strings and all URIs
4004: if (cbuflen < 4 || attributeQName == "xmlns")
4005: value = stringConverter.convert(cbuf, 0, cbuflen);
4006: else
4007: value = new String(cbuf, 0, cbuflen);
4008:
4009: addAttribute(attributeURI, attributeLocalName,
4010: attributeQName, attributeValueType, value);
4011: }
4012: case 475:
4013: break;
4014: case 121: {
4015: return stringToken(Piccolo.NAME, yytext2());
4016: }
4017: case 476:
4018: break;
4019: case 123: {
4020: return Piccolo.PIPE;
4021: }
4022: case 477:
4023: break;
4024: case 133:
4025: case 134:
4026: case 135:
4027: case 136:
4028: case 137:
4029: case 140:
4030: case 232:
4031: case 233:
4032: case 234:
4033: case 235:
4034: case 236:
4035: case 237:
4036: case 238:
4037: case 239:
4038: case 291:
4039: case 292:
4040: case 293:
4041: case 294:
4042: case 295:
4043: case 297:
4044: case 298:
4045: case 330:
4046: case 331:
4047: case 332:
4048: case 333:
4049: case 334:
4050: case 335:
4051: case 336:
4052: case 363:
4053: case 365:
4054: case 366:
4055: case 367:
4056: case 368:
4057: case 389:
4058: case 390:
4059: case 410: {
4060: return stringToken(Piccolo.NAME, yytext2());
4061: }
4062: case 478:
4063: break;
4064: case 143: {
4065: return Piccolo.STAR;
4066: }
4067: case 479:
4068: break;
4069: case 144: {
4070: return Piccolo.PLUS;
4071: }
4072: case 480:
4073: break;
4074: case 145: {
4075: return Piccolo.COMMA;
4076: }
4077: case 481:
4078: break;
4079: case 96:
4080: case 100: {
4081: appendToCbuf(' ');
4082: }
4083: case 482:
4084: break;
4085: case 404: {
4086: attributeURI = "xmlns";
4087: attributeLocalName = yytext2(6, yylength() - 6);
4088: attributeQName = yytext2();
4089: isNamespaceDeclaration = true;
4090: yybegin(TAG_VALUE);
4091: }
4092: case 483:
4093: break;
4094: case 283: {
4095: yybegin(DTD_ATT_TYPE);
4096: return stringToken(Piccolo.PREFIXED_NAME, yytext2());
4097: }
4098: case 484:
4099: break;
4100: case 282: {
4101: if (isTopEntity())
4102: throw fatalError("Parameter entities may not appear in the internal subset");
4103:
4104: if (handleEntityRef(yytext2(1, yylength() - 2),
4105: EntityManager.PARAMETER) != 0)
4106: returnEntityEndToken = false;
4107: return Piccolo.WHITESPACE;
4108: }
4109: case 485:
4110: break;
4111: case 195: {
4112: yybegin(tagState);
4113: parseQuotedTagValue();
4114: }
4115: case 486:
4116: break;
4117: case 13:
4118: case 14:
4119: case 17:
4120: case 18:
4121: case 83:
4122: case 87:
4123: case 95:
4124: case 99: {
4125: appendToCbuf(yy_buffer, yy_startRead, yy_markedPos
4126: - yy_startRead);
4127: }
4128: case 487:
4129: break;
4130: case 11:
4131: case 74: {
4132: appendToCbuf(yy_buffer, yy_startRead, yy_markedPos
4133: - yy_startRead);
4134: }
4135: case 488:
4136: break;
4137: case 33:
4138: case 154:
4139: case 155: {
4140: yybegin(DTD_TAG_VALUE_ENTITY);
4141: }
4142: case 489:
4143: break;
4144: case 111:
4145: case 112:
4146: case 218: {
4147: yybegin(DTD_ATT_TYPE);
4148: return stringToken(Piccolo.UNPREFIXED_NAME, yytext2());
4149: }
4150: case 490:
4151: break;
4152: case 179: {
4153: yybegin(baseState);
4154: processComplexElement();
4155: parser.reportStartTag("", "", stringValue);
4156: parser.reportEndTag("", "", stringValue);
4157: attribs.clear();
4158: if (tokenizeInput)
4159: return Piccolo.EMPTY_TAG;
4160: }
4161: case 491:
4162: break;
4163: case 186: {
4164: yybegin(CLOSE_TAG);
4165: stringValue = yytext2(1, yylength() - 1);
4166: }
4167: case 492:
4168: break;
4169: case 38: {
4170: safeBacktrack();
4171: parseCdata();
4172: parser.reportCdata();
4173:
4174: return Piccolo.CDATA;
4175: }
4176: case 493:
4177: break;
4178: case 97: {
4179: needsNormalization = true;
4180:
4181: // prevState is already set from the <TAG>"\"" or <TAG>"\'" rule
4182: yybegin(TAG_VALUE_ENTITYREF);
4183: }
4184: case 494:
4185: break;
4186: case 85: {
4187: // prevState is already set from the <TAG>"\"" or <TAG>"\'" rule
4188: yybegin(TAG_VALUE_ENTITYREF);
4189: }
4190: case 495:
4191: break;
4192: case 75: {
4193: appendToCbuf(' ');
4194: }
4195: case 496:
4196: break;
4197: case 21:
4198: case 22:
4199: case 23:
4200: case 24:
4201: case 25:
4202: case 26:
4203: case 29:
4204: case 30:
4205: case 105:
4206: case 131: {
4207: return Piccolo.WHITESPACE;
4208: }
4209: case 497:
4210: break;
4211: case 350: {
4212: throw fatalError("'?xml' is a reserved processing instruction target and must be in lower case.");
4213: }
4214: case 498:
4215: break;
4216: case 92: {
4217: clearCbuf();
4218: prevState = TAG_SQSTRING_NORMALIZE_BUFFERED;
4219: yybegin(prevState);
4220: appendToCbuf(yy_buffer, yy_startRead, yy_markedPos
4221: - yy_startRead);
4222: }
4223: case 499:
4224: break;
4225: case 88: {
4226: clearCbuf();
4227: prevState = TAG_QSTRING_NORMALIZE_BUFFERED;
4228: yybegin(prevState);
4229: appendToCbuf(yy_buffer, yy_startRead, yy_markedPos
4230: - yy_startRead);
4231: }
4232: case 500:
4233: break;
4234: case 146: {
4235: prevState = DTD_TAG_QSTRING_BUFFERED;
4236: clearCbuf();
4237: appendToCbuf(yy_buffer, yy_startRead + 1,
4238: yylength() - 1);
4239: yybegin(prevState);
4240: }
4241: case 501:
4242: break;
4243: case 159: {
4244: yybegin(DTD_TAG);
4245: return stringToken(Piccolo.STRING, new String(cbuf, 0,
4246: cbuflen));
4247: }
4248: case 502:
4249: break;
4250: case 281: {
4251: return Piccolo.DOUBLE_RBRACKET_END;
4252: }
4253: case 503:
4254: break;
4255: case 152: {
4256: yybegin(DTD_TAG_VALUE_PARAM_ENTITYREF);
4257: }
4258: case 504:
4259: break;
4260: case 378: {
4261: yybegin(baseState);
4262: parser.reportComment(yy_buffer, yy_startRead + 3,
4263: (yy_markedPos - yy_startRead) - 6);
4264: if (tokenizeInput)
4265: return Piccolo.COMMENT;
4266: }
4267: case 505:
4268: break;
4269: case 349: {
4270: prevState = baseState;
4271: yybegin(XML_TAG);
4272: }
4273: case 506:
4274: break;
4275: case 58: {
4276: yybegin(baseState);
4277: tagStack.push(stringValue);
4278: processComplexElement();
4279: parser.reportStartTag(elementURI, elementLocalName,
4280: stringValue);
4281: attribs.clear();
4282: if (tokenizeInput) {
4283: setTokenize(false);
4284: return Piccolo.OPEN_TAG;
4285: }
4286: }
4287: case 507:
4288: break;
4289: case 32:
4290: case 150: {
4291: appendToCbuf(yy_buffer, yy_startRead, yy_markedPos
4292: - yy_startRead);
4293: }
4294: case 508:
4295: break;
4296: case 147: {
4297: prevState = DTD_TAG_SQSTRING_BUFFERED;
4298: clearCbuf();
4299: appendToCbuf(yy_buffer, yy_startRead + 1,
4300: yylength() - 1);
4301: yybegin(prevState);
4302: }
4303: case 509:
4304: break;
4305: case 177: {
4306: yybegin(piPrevState);
4307: parser
4308: .reportPI(elementQName, yytext(0,
4309: yylength() - 2));
4310: if (tokenizeInput) {
4311: return Piccolo.PI;
4312: }
4313: }
4314: case 510:
4315: break;
4316: case 189: {
4317: yybegin(baseState);
4318: processComplexElement();
4319: resolveNamespacePrefixes();
4320: parser.reportStartTag(elementURI, elementLocalName,
4321: stringValue);
4322: parser.reportEndTag(elementURI, elementLocalName,
4323: stringValue);
4324: processNSContextEnd();
4325: attribs.clear();
4326: if (tokenizeInput)
4327: return Piccolo.EMPTY_TAG;
4328: }
4329: case 511:
4330: break;
4331: case 310: {
4332: yybegin(baseState);
4333: try {
4334: clearCbuf();
4335: parseEncodedChar(yy_buffer, yy_startRead + 2,
4336: yylength() - 3, 16);
4337: parser.reportCdata(cbuf, 0, cbuflen);
4338: } catch (IllegalCharException e) {
4339: throw fatalError("Invalid character entity reference: &"
4340: + yytext());
4341: }
4342: }
4343: case 512:
4344: break;
4345: case 258: {
4346: yybegin(baseState);
4347: try {
4348: clearCbuf();
4349: parseEncodedChar(yy_buffer, yy_startRead + 1,
4350: yylength() - 2, 10);
4351: parser.reportCdata(cbuf, 0, cbuflen);
4352: } catch (IllegalCharException e) {
4353: throw fatalError("Invalid character entity reference: &"
4354: + yytext());
4355: }
4356: }
4357: case 513:
4358: break;
4359: case 42:
4360: case 43:
4361: case 45:
4362: case 46:
4363: case 47:
4364: case 48:
4365: case 49:
4366: case 50:
4367: case 51:
4368: case 52:
4369: case 53:
4370: case 55:
4371: case 59:
4372: case 61:
4373: case 62:
4374: case 63:
4375: case 68:
4376: case 71:
4377: case 72:
4378: case 73:
4379: case 77:
4380: case 78:
4381: case 79:
4382: case 80:
4383: case 81:
4384: case 82:
4385: case 86:
4386: case 91:
4387: case 98:
4388: case 101:
4389: case 103:
4390: case 107:
4391: case 108:
4392: case 110:
4393: case 114:
4394: case 115:
4395: case 116:
4396: case 117:
4397: case 120:
4398: case 124:
4399: case 125:
4400: case 129:
4401: case 130:
4402: case 141:
4403: case 148:
4404: case 149:
4405: case 161:
4406: case 162: {
4407: throw fatalError("Unexpected character encountered (lex state "
4408: + yystate() + "): '" + yytext() + "'");
4409: }
4410: case 514:
4411: break;
4412: case 252: {
4413: yybegin(DTD_TAG);
4414: if (isTopEntity())
4415: throw fatalError("'<![' constructs are not allowed in the internal DTD subset");
4416:
4417: return Piccolo.CONDITIONAL_START;
4418: }
4419: case 515:
4420: break;
4421: case 208: {
4422: yybegin(tagState);
4423: addAttribute(attributeURI, attributeLocalName,
4424: attributeQName, attributeValueType, "");
4425: }
4426: case 516:
4427: break;
4428: case 104: {
4429: yybegin(baseState);
4430: checkEndTag(stringValue);
4431: parser.reportEndTag(elementURI, elementLocalName,
4432: stringValue);
4433: processNSContextEnd();
4434: if (tokenizeInput)
4435: return Piccolo.CLOSE_TAG;
4436: }
4437: case 517:
4438: break;
4439: case 165: {
4440: if (currentEntity.isInternal())
4441: throw fatalError("XML declarations are not allowed in internal entities");
4442:
4443: yybegin(prevState);
4444:
4445: if (currentEntity.getXMLVersion() != null) {
4446: if (currentEntity.getDeclaredEncoding() == null)
4447: return Piccolo.XML_DOC_DECL;
4448: else if (currentEntity.isStandaloneDeclared())
4449: return Piccolo.XML_DOC_DECL;
4450: else
4451: return Piccolo.XML_DOC_OR_TEXT_DECL;
4452: } else if (currentEntity.getDeclaredEncoding() != null
4453: && !currentEntity.isStandaloneDeclared())
4454: return Piccolo.XML_TEXT_DECL;
4455: else
4456: throw fatalError("XML declaration is not well-formed");
4457: }
4458: case 518:
4459: break;
4460: case 15:
4461: case 89: {
4462: clearCbuf();
4463: prevState = TAG_QSTRING_NORMALIZE_BUFFERED;
4464: yybegin(prevState);
4465: }
4466: case 519:
4467: break;
4468: case 151: {
4469: yybegin(DTD_TAG_VALUE_STD_ENTITYREF);
4470: }
4471: case 520:
4472: break;
4473: case 290: {
4474: return Piccolo.IGNORED_CONDITIONAL_START;
4475: }
4476: case 521:
4477: break;
4478: case 309: {
4479: yybegin(DTD_COMMENT);
4480: }
4481: case 522:
4482: break;
4483: case 76: {
4484: yybegin(TAG_VALUE_ENTITYREF);
4485: }
4486: case 523:
4487: break;
4488: case 230: {
4489: yybegin(DTD_TAG);
4490: return stringToken(Piccolo.STRING, yytext(1,
4491: yylength() - 2));
4492: }
4493: case 524:
4494: break;
4495: case 244: {
4496: return stringToken(Piccolo.STRING, yytext(1,
4497: yylength() - 2));
4498: }
4499: case 525:
4500: break;
4501: case 64:
4502: case 65:
4503: case 66:
4504: case 187:
4505: case 188:
4506: case 270:
4507: case 319:
4508: case 354:
4509: case 382: {
4510: isNamespaceDeclaration = false;
4511: attributeLocalName = attributeQName = yytext2();
4512: attributeURI = "";
4513: yybegin(TAG_VALUE);
4514: }
4515: case 526:
4516: break;
4517: case 191:
4518: case 192:
4519: case 272: {
4520: yybegin(CLOSE_TAG_NS);
4521: elementURI = nsSupport.getDefaultURI();
4522: stringValue = elementLocalName = yytext2(1,
4523: yylength() - 1);
4524: }
4525: case 527:
4526: break;
4527: case 16:
4528: case 93: {
4529: clearCbuf();
4530: prevState = TAG_SQSTRING_NORMALIZE_BUFFERED;
4531: yybegin(prevState);
4532: }
4533: case 528:
4534: break;
4535: case 215: {
4536: return Piccolo.RBRACKET_END;
4537: }
4538: case 529:
4539: break;
4540: case 180:
4541: case 181:
4542: case 182:
4543: case 264:
4544: case 265:
4545: case 314:
4546: case 315: {
4547: piPrevState = baseState;
4548: elementQName = yytext2(1, yylength() - 1);
4549: yybegin(PI_WS);
4550: }
4551: case 530:
4552: break;
4553: case 57: {
4554: attributeQName = yytext2();
4555: yybegin(TAG_VALUE);
4556: }
4557: case 531:
4558: break;
4559: case 40: {
4560: int result;
4561:
4562: tokenStartLine = yyline_next + 1;
4563:
4564: yybegin(tagStartState);
4565:
4566: if (parser.fNamespaces)
4567: result = parseTagNS();
4568: else
4569: result = parseTag();
4570:
4571: if (result != -1) {
4572: if (tokenizeInput) {
4573: if (tagType == Piccolo.OPEN_TAG)
4574: setTokenize(false);
4575: return tagType;
4576: }
4577: }
4578:
4579: }
4580: case 532:
4581: break;
4582: case 109: {
4583: yybegin(DTD_ATT_NAME);
4584: bypassPERefs = true;
4585: return stringToken(Piccolo.NAME, yytext2());
4586: }
4587: case 533:
4588: break;
4589: case 432: {
4590: yybegin(DTD_TAG);
4591: return Piccolo.NOTATION_START;
4592: }
4593: case 534:
4594: break;
4595: case 429: {
4596: yybegin(DTD_ATTLIST_ELEMENT);
4597: return Piccolo.ATTLIST_START;
4598: }
4599: case 535:
4600: break;
4601: case 392: {
4602: bypassPERefs = bypassGERefs = true;
4603: return Piccolo.SYSTEM;
4604: }
4605: case 536:
4606: break;
4607: case 356: {
4608: appendToCbuf('\"');
4609: yybegin(prevState);
4610: }
4611: case 537:
4612: break;
4613: case 355: {
4614: appendToCbuf('\'');
4615: yybegin(prevState);
4616: }
4617: case 538:
4618: break;
4619: case 279: {
4620: appendToCbuf('>');
4621: yybegin(prevState);
4622: }
4623: case 539:
4624: break;
4625: case 273: {
4626: appendToCbuf('<');
4627: yybegin(prevState);
4628: }
4629: case 540:
4630: break;
4631: case 118: {
4632: yybegin(DTD_NMTOKENS);
4633: return Piccolo.LPAREN;
4634: }
4635: case 541:
4636: break;
4637: case 256: {
4638: if (isTopEntity())
4639: throw fatalError("Parameter entities may not appear in the internal subset");
4640:
4641: if (!handleLiteralEntityRef(yytext2(0, yylength() - 1),
4642: EntityManager.PARAMETER)) {
4643: appendToCbuf('%');
4644: appendToCbuf(yy_buffer, yy_startRead, yy_markedPos
4645: - yy_startRead);
4646: yybegin(prevState);
4647: }
4648: }
4649: case 542:
4650: break;
4651: case 269: {
4652: isNamespaceDeclaration = false;
4653: attributeQName = yytext2();
4654: int colon = attributeQName.indexOf(':');
4655: attributeURI = yytext2(0, colon);
4656: // fixing bug when computing localname
4657: attributeLocalName = yytext2(colon + 1, (yylength()
4658: - colon - 1));
4659: yybegin(TAG_VALUE);
4660: }
4661: case 543:
4662: break;
4663: case 254: {
4664: appendToCbuf('&');
4665: appendToCbuf(yy_buffer, yy_startRead, yylength());
4666: yybegin(prevState);
4667: }
4668: case 544:
4669: break;
4670: case 102: {
4671: yybegin(baseState);
4672: checkEndTag(stringValue);
4673: parser.reportEndTag(elementURI, elementLocalName,
4674: stringValue);
4675: if (tokenizeInput)
4676: return Piccolo.CLOSE_TAG;
4677: }
4678: case 545:
4679: break;
4680: case 34:
4681: case 156: {
4682: appendToCbuf(yy_buffer, yy_startRead, yylength());
4683: }
4684: case 546:
4685: break;
4686: case 35:
4687: case 160: {
4688: appendToCbuf(yy_buffer, yy_startRead, yylength());
4689: }
4690: case 547:
4691: break;
4692: case 84: {
4693: for (int i = 0; i < yylength(); i++) {
4694: appendToCbuf(' ');
4695: }
4696: }
4697: case 548:
4698: break;
4699: case 280: {
4700: int token = handleEntityRef(yytext2(1, yylength() - 2),
4701: EntityManager.PARAMETER);
4702: if (token != 0) {
4703: returnEntityEndToken = false;
4704: return token;
4705: }
4706: }
4707: case 549:
4708: break;
4709: case 60: {
4710: yybegin(TAG);
4711: stringValue = yytext2();
4712: prepareComplexElement(stringValue);
4713: }
4714: case 550:
4715: break;
4716: case 44: {
4717: /* Instead of making flex deal with the simple parsing,
4718: * we use a handwritten loop that can handle simple text and
4719: * tags more efficiently.
4720: *
4721: * parseCdata();
4722: * parser.reportCdata(cdataBuffer,cdataStart,cdataLength);
4723: */
4724:
4725: safeBacktrack();
4726: int token = parseXML();
4727:
4728: if (token != 0)
4729: return token;
4730: }
4731: case 551:
4732: break;
4733: case 41: {
4734: yybegin(ENTITYREF);
4735: }
4736: case 552:
4737: break;
4738: case 167: {
4739: yybegin(baseState);
4740:
4741: int token = handleEntityRef(yytext2(0, yylength() - 1),
4742: EntityManager.GENERAL);
4743: if (token != 0)
4744: return token;
4745: }
4746: case 553:
4747: break;
4748: case 178: {
4749: yybegin(piPrevState);
4750: parser.reportPI(elementQName, "");
4751: if (piPrevState != DTD_TAG_VALUE_EXTERNAL_ENTITY
4752: && tokenizeInput) {
4753: return Piccolo.PI;
4754: }
4755: }
4756: case 554:
4757: break;
4758: case 430: {
4759: yybegin(DTD_TAG);
4760: if (parseExternalEntities(EntityManager.GENERAL))
4761: return Piccolo.DTD_START;
4762: else
4763: return Piccolo.DTD_START_SKIPEXTERNAL;
4764: }
4765: case 555:
4766: break;
4767: case 419: {
4768: yybegin(baseState);
4769: startCdata();
4770: parseCdataSection();
4771: if (tokenizeInput)
4772: return Piccolo.CDATA;
4773: endCdata();
4774: }
4775: case 556:
4776: break;
4777: case 406: {
4778: attributeURI = "xmlns";
4779: attributeLocalName = "";
4780: attributeQName = "xmlns";
4781: isNamespaceDeclaration = true;
4782: parseCdataLiteral('\'', TAG_SQSTRING_CDATA_BUFFERED);
4783: }
4784: case 557:
4785: break;
4786: case 405: {
4787: attributeURI = "xmlns";
4788: attributeLocalName = "";
4789: attributeQName = "xmlns";
4790: isNamespaceDeclaration = true;
4791: parseCdataLiteral('\"', TAG_QSTRING_CDATA_BUFFERED);
4792: }
4793: case 558:
4794: break;
4795: case 321: {
4796: yybegin(prevState);
4797: try {
4798: parseEncodedChar(yy_buffer, yy_startRead + 2,
4799: yylength() - 3, 16);
4800: } catch (ClassCastException e) {
4801: throw fatalError("Invalid character entity reference: &"
4802: + yytext());
4803: }
4804: }
4805: case 559:
4806: break;
4807: case 289: {
4808: yybegin(DTD);
4809: parser.reportComment(yy_buffer, yy_startRead,
4810: (yy_markedPos - 3) - yy_startRead);
4811:
4812: // Comments are never important in the DTD
4813: // if (tokenizeInput)
4814: // return Piccolo.COMMENT;
4815: }
4816: case 560:
4817: break;
4818: case 274: {
4819: yybegin(prevState);
4820: try {
4821: parseEncodedChar(yy_buffer, yy_startRead + 1,
4822: yylength() - 2, 10);
4823: } catch (ClassCastException e) {
4824: throw fatalError("Invalid character entity reference: &"
4825: + yytext());
4826: }
4827: }
4828: case 561:
4829: break;
4830: case 271: {
4831: nsSupport.pushContext();
4832: yybegin(TAG_NS);
4833: stringValue = yytext2();
4834: int colon = stringValue.indexOf(':');
4835: elementURI = yytext2(0, colon);
4836: elementLocalName = yytext2(colon + 1, yylength()
4837: - (colon + 1));
4838: prepareComplexElement(stringValue);
4839: }
4840: case 562:
4841: break;
4842: case 210: {
4843: yybegin(tagState);
4844: addAttribute(attributeURI, attributeLocalName,
4845: attributeQName, attributeValueType, new String(
4846: cbuf, 0, cbuflen));
4847: }
4848: case 563:
4849: break;
4850: case 94: {
4851: clearCbuf();
4852: prevState = TAG_SQSTRING_NORMALIZE_BUFFERED;
4853: needsNormalization = true;
4854: yybegin(TAG_VALUE_ENTITYREF);
4855: }
4856: case 564:
4857: break;
4858: case 90: {
4859: clearCbuf();
4860: prevState = TAG_QSTRING_NORMALIZE_BUFFERED;
4861: needsNormalization = true;
4862: yybegin(TAG_VALUE_ENTITYREF);
4863: }
4864: case 565:
4865: break;
4866: case 69:
4867: case 70:
4868: case 190: {
4869: nsSupport.pushContext();
4870: yybegin(TAG_NS);
4871: elementURI = "";
4872: elementLocalName = stringValue = yytext2();
4873: prepareComplexElement(stringValue);
4874: }
4875: case 566:
4876: break;
4877: case 67: {
4878: yybegin(baseState);
4879: processComplexElement();
4880: resolveNamespacePrefixes();
4881: parser.reportStartTag(elementURI, elementLocalName,
4882: stringValue);
4883: attribs.clear();
4884: tagStack.push(stringValue);
4885: if (tokenizeInput) {
4886: setTokenize(false);
4887: return Piccolo.OPEN_TAG;
4888: }
4889: }
4890: case 567:
4891: break;
4892: case 157: {
4893: if (bypassGERefs)
4894: appendToCbuf('&');
4895: else
4896: yybegin(DTD_TAG_VALUE_STD_ENTITYREF);
4897: }
4898: case 568:
4899: break;
4900: case 158: {
4901: if (bypassPERefs)
4902: appendToCbuf('%');
4903: else
4904: yybegin(DTD_TAG_VALUE_PARAM_ENTITYREF);
4905: }
4906: case 569:
4907: break;
4908: case 198: {
4909: if (!handleLiteralEntityRef(yytext2(0, yylength() - 1),
4910: EntityManager.GENERAL)) {
4911: appendToCbuf('&');
4912: appendToCbuf(yy_buffer, yy_startRead, yy_markedPos
4913: - yy_startRead);
4914: yybegin(prevState);
4915: }
4916: }
4917: case 570:
4918: break;
4919: case 373: {
4920: prevState = DTD;
4921: yybegin(XML_TAG);
4922: }
4923: case 571:
4924: break;
4925: case 320: {
4926: yybegin(CLOSE_TAG_NS);
4927: stringValue = yytext2(1, yylength() - 1);
4928: int colon = stringValue.indexOf(':') + 1;
4929: elementURI = nsSupport.getURI(yytext2(1, colon - 1));
4930: elementLocalName = yytext2(colon + 1, (yylength() - 1)
4931: - colon);
4932: }
4933: case 572:
4934: break;
4935: case 245:
4936: case 246:
4937: case 247:
4938: case 303:
4939: case 304:
4940: case 341:
4941: case 342: {
4942: piPrevState = DTD;
4943: yybegin(PI_WS);
4944: elementQName = yytext2(1, yylength() - 1);
4945: }
4946: case 573:
4947: break;
4948: case 28:
4949: case 126:
4950: case 127:
4951: case 128: {
4952: }
4953: case 574:
4954: break;
4955: case 6:
4956: case 8:
4957: case 56: {
4958: }
4959: case 575:
4960: break;
4961: default:
4962: if (yy_input == YYEOF && yy_startRead == yy_currentPos) {
4963: yy_atEOF = true;
4964: yy_do_eof();
4965: switch (yy_lexical_state) {
4966: case CLOSE_TAG_NS: {
4967: throw fatalError("Entity is not well-formed (ending lex state: "
4968: + yystate() + ")");
4969: }
4970: case 434:
4971: break;
4972: case PI: {
4973: throw fatalError("Entity is not well-formed (ending lex state: "
4974: + yystate() + ")");
4975: }
4976: case 435:
4977: break;
4978: case ENTITYREF: {
4979: throw fatalError("Entity is not well-formed (ending lex state: "
4980: + yystate() + ")");
4981: }
4982: case 436:
4983: break;
4984: case TAG_VALUE_ENTITYREF: {
4985: throw fatalError("Entity is not well-formed (ending lex state: "
4986: + yystate() + ")");
4987: }
4988: case 437:
4989: break;
4990: case TAG_NS: {
4991: throw fatalError("Entity is not well-formed (ending lex state: "
4992: + yystate() + ")");
4993: }
4994: case 438:
4995: break;
4996: case DTD_COMMENT: {
4997: throw fatalError("Entity is not well-formed (ending lex state: "
4998: + yystate() + ")");
4999: }
5000: case 439:
5001: break;
5002: case PI_WS: {
5003: throw fatalError("Entity is not well-formed (ending lex state: "
5004: + yystate() + ")");
5005: }
5006: case 440:
5007: break;
5008: case TAG_START_NS: {
5009: throw fatalError("Entity is not well-formed (ending lex state: "
5010: + yystate() + ")");
5011: }
5012: case 441:
5013: break;
5014: case TAG_VALUE: {
5015: throw fatalError("Entity is not well-formed (ending lex state: "
5016: + yystate() + ")");
5017: }
5018: case 442:
5019: break;
5020: case CLOSE_TAG: {
5021: throw fatalError("Entity is not well-formed (ending lex state: "
5022: + yystate() + ")");
5023: }
5024: case 443:
5025: break;
5026: default: {
5027:
5028: if (yymoreStreams()) {
5029: yypopStream();
5030:
5031: if (isEntityBeingParsed) {
5032: if (currentEntity != null)
5033: currentEntity.close();
5034: currentEntity = (Entity) entityStack
5035: .pop();
5036: }
5037:
5038: boolean prevReturnEndToken = returnEntityEndToken;
5039: boolean prevIsParamEntity = isParamEntity;
5040:
5041: popEntityState();
5042:
5043: if (prevReturnEndToken)
5044: return Piccolo.ENTITY_END;
5045: else if (prevIsParamEntity)
5046: return Piccolo.WHITESPACE;
5047: } else
5048: return 0;
5049: }
5050: }
5051: } else {
5052: yy_ScanError(YY_NO_MATCH);
5053: }
5054: }
5055: }
5056: }
5057:
5058: }
|