[243243] JSPs with contentType different than "text/html" open as dirty
diff --git a/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/HeadParsers/JSPHeadTokenizer.jFlex b/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/HeadParsers/JSPHeadTokenizer.jFlex index 680b15b..9cfce86 100644 --- a/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/HeadParsers/JSPHeadTokenizer.jFlex +++ b/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/HeadParsers/JSPHeadTokenizer.jFlex
@@ -169,11 +169,15 @@ // [3] S ::= (0x20 | 0x9 | 0xD | 0xA)+ S = [\x20\x09\x0D\x0A] -BeginAttributeeValue = {S}* \= {S}* +//BeginAttributeeValue = {S}* \= {S}* LineTerminator = \r|\n +Z = (\x00)? +S_UTF = {Z}{S}{Z} +BeginAttributeValueUTF = {S_UTF}* \= {S_UTF}* + %state ST_XMLDecl %state ST_PAGE_DIRECTIVE %state QuotedAttributeValue @@ -192,72 +196,69 @@ ^ {UTF83ByteBOM} {if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF83ByteBOM;}} // force to be started on first line, but we do allow preceeding spaces - ^ {S}* "<\?xml" {S}+ {if (yychar == 0 ) {yybegin(ST_XMLDecl); return XMLHeadTokenizerConstants.XMLDeclStart;}} + ^ {S_UTF}* ({Z}<{Z}\?{Z}x{Z}m{Z}l{Z}){S_UTF}+ {if (yychar == 0 ) {yybegin(ST_XMLDecl); return XMLHeadTokenizerConstants.XMLDeclStart;}} // following are some simply rules to identify JSP content as "XHTML" // see http://www.rfc-editor.org/rfc/rfc3236.txt - "<!DOCTYPE" {S}* "html" {S}* "PUBLIC" .* "//DTD XHTML" {isXHTML = true;} - "<html" {S}* "xmlns" {S}* "=" {S}* (\" | \') "http://www.w3.org/1999/xhtml" {isXHTML = true;} + {Z}<{Z}\!{Z}D{Z}O{Z}C{Z}T{Z}Y{Z}P{Z}E{Z} {S_UTF}* {Z}h{Z}t{Z}m{Z}l{Z} {S_UTF}* {Z}P{Z}U{Z}B{Z}L{Z}I{Z}C{Z} .* {Z}\/{Z}\/{Z}D{Z}T{Z}D{Z}{S_UTF}{Z}X{Z}H{Z}T{Z}M{Z}L{Z} {isXHTML = true;} + {Z}<{Z}h{Z}t{Z}m{Z}l{Z} {S_UTF}* {Z}x{Z}m{Z}l{Z}n{Z}s{Z} {S_UTF}* {Z}\={Z} {S_UTF}* (({Z}\"{Z}) | ({Z}\'{Z})) {Z}h{Z}t{Z}t{Z}p{Z}:{Z}\/{Z}\/{Z}w{Z}w{Z}w{Z}\.{Z}w{Z}3{Z}\.{Z}o{Z}r{Z}g{Z}\/{Z}1{Z}9{Z}9{Z}9{Z}\/{Z}x{Z}h{Z}t{Z}m{Z}l{Z} {isXHTML = true;} // another case that's part of the "HTML family" is WML 1.0 (WML 2.0 is part of XHTML) - "<!DOCTYPE" {S}* "wml" {S}* "PUBLIC" .* "//DTD WML" {isWML = true;} + {Z}<{Z}\!{Z}D{Z}O{Z}C{Z}T{Z}Y{Z}P{Z}E{Z} {S_UTF}* {Z}w{Z}m{Z}l{Z} {S_UTF}* {Z}P{Z}U{Z}B{Z}L{Z}I{Z}C{Z} .* {Z}\/{Z}\/{Z}D{Z}T{Z}D {S}{Z}W{Z}M{Z}L{Z} {isWML = true;} - "<%" {S}* "@" {S}* ("page"|"tag") {S}+ {yybegin(ST_PAGE_DIRECTIVE); return JSPHeadTokenizerConstants.PageDirectiveStart;} - ("<jsp:directive.page"|"<jsp:directive.tag") {S}+ {yybegin(ST_PAGE_DIRECTIVE); return JSPHeadTokenizerConstants.PageDirectiveStart;} - + {Z}<{Z}%{Z} {S_UTF}* {Z}@{Z} {S_UTF}* (({Z}p{Z}a{Z}g{Z}e{Z})|({Z}t{Z}a{Z}g{Z})) {S_UTF}+ {yybegin(ST_PAGE_DIRECTIVE); return JSPHeadTokenizerConstants.PageDirectiveStart;} + (({Z}<{Z}j{Z}s{Z}p{Z}:{Z}d{Z}i{Z}r{Z}e{Z}c{Z}t{Z}i{Z}v{Z}e{Z}\.{Z}p{Z}a{Z}g{Z}e{Z})|({Z}<{Z}j{Z}s{Z}p{Z}:{Z}d{Z}i{Z}r{Z}e{Z}c{Z}t{Z}i{Z}v{Z}e{Z}\.{Z}t{Z}a{Z}g{Z})) {S_UTF}+ {yybegin(ST_PAGE_DIRECTIVE); return JSPHeadTokenizerConstants.PageDirectiveStart;} } <ST_XMLDecl> { - "version" {BeginAttributeeValue} {pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDeclVersion;} - "encoding" {BeginAttributeeValue} {pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDelEncoding;} + ({Z}v{Z}e{Z}r{Z}s{Z}i{Z}o{Z}n{Z}) {BeginAttributeValueUTF} {pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDeclVersion;} + ({Z}e{Z}n{Z}c{Z}o{Z}d{Z}i{Z}n{Z}g{Z}) {BeginAttributeValueUTF} {pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDelEncoding;} // note the "forced end" (via 'hasMore=false') once the end of XML Declaration found // This is since non-ascii chars may follow and may cause IOExceptions which would not occur once stream is // read with incorrect encoding (such as if platform encoding is in effect until true encoding detected). // BUT, the hasMore=false was removed for this JSP case (probably still ok for pure XML) because // in a JSP, we must parse past xmlDecl to get at JSP page directive. // We'll assume all chars in this area are "readable" as is. - {S}* "\?>" {yybegin(YYINITIAL); return XMLHeadTokenizerConstants.XMLDeclEnd;} + {S_UTF}* {Z}\?{Z}>{Z} {yybegin(YYINITIAL); return XMLHeadTokenizerConstants.XMLDeclEnd;} } <ST_PAGE_DIRECTIVE> { // removed 'language' since it really can be handled seperately from encoding, but may add it back later for simple re-use. - "language" {BeginAttributeeValue} {pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageLanguage;} - "contentType" {BeginAttributeeValue} {pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageContentType;} - "pageEncoding" {BeginAttributeeValue} {pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageEncoding;} + {Z}l{Z}a{Z}n{Z}g{Z}u{Z}a{Z}g{Z}e{Z} {BeginAttributeValueUTF} {pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageLanguage;} + {Z}c{Z}o{Z}n{Z}t{Z}e{Z}n{Z}t{Z}T{Z}y{Z}p{Z}e{Z} {BeginAttributeValueUTF} {pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageContentType;} + {Z}p{Z}a{Z}g{Z}e{Z}E{Z}n{Z}c{Z}o{Z}d{Z}i{Z}n{Z}g{Z} {BeginAttributeValueUTF} {pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageEncoding;} // note the "forced end" (via 'hasMore=false') once the end of XML Declaration found // This is since non-ascii chars may follow and may cause IOExceptions which would not occur once stream is // read in correct encoding. // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=4205 demonstrates how we need to keep parsing, // even if come to end of one page directive, so hasMore=false was removed from these rules. - "%>" { yybegin(YYINITIAL); return JSPHeadTokenizerConstants.PageDirectiveEnd;} - "\/>" { yybegin(YYINITIAL); return JSPHeadTokenizerConstants.PageDirectiveEnd;} + {Z}%{Z}>{Z} { yybegin(YYINITIAL); return JSPHeadTokenizerConstants.PageDirectiveEnd;} + {Z}\/{Z}>{Z} { yybegin(YYINITIAL); return JSPHeadTokenizerConstants.PageDirectiveEnd;} } <QuotedAttributeValue> { - \" { yybegin(DQ_STRING); string.setLength(0); } - \' { yybegin(SQ_STRING); string.setLength(0); } + {Z}\"{Z} { yybegin(DQ_STRING); string.setLength(0); } + {Z}\'{Z} { yybegin(SQ_STRING); string.setLength(0); } // in this state, anything other than a space character can start an undelimited string - {S}*. { yypushback(1); yybegin(UnDelimitedString); string.setLength(0);} - + {S_UTF}*. { yypushback(1); yybegin(UnDelimitedString); string.setLength(0);} } <DQ_STRING> { - \" { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue; } - {LineTerminator} { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - "\?>" { yypushback(2); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - '<' { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - . { string.append( yytext() ); } - - "%>" { yypushback(2);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}\"{Z} { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue; } + {Z}{LineTerminator}{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}\?{Z}>{Z} { yypushback(yylength()); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}<{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + [^\x00] { string.append( yytext() ); } + {Z}%{Z}>{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} } @@ -265,12 +266,13 @@ <SQ_STRING> { - \' { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue;} - {LineTerminator} { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - "%>" { yypushback(2);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - '<' { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - . { string.append( yytext() ); } - "%>" { yypushback(2);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}\'{Z} { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue;} + {Z}{LineTerminator}{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}%{Z}>{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}<{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + // Skip over the single-byte 0s + [^\x00] { string.append( yytext() ); } + {Z}%{Z}>{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} } @@ -279,27 +281,24 @@ { - {S} { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.UnDelimitedStringValue; } - {LineTerminator} { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - "\?>" { yypushback(2);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - '<' { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {S_UTF} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.UnDelimitedStringValue; } + {Z}{LineTerminator}{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}\?{Z}>{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}<{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} // these are a bit special, since we started an undelimit string, but found a quote ... probably indicates a missing beginning quote - \' { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue;} - \" { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue;} + {Z}\'{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue;} + {Z}\"{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue;} - . { string.append( yytext() ); } - "%>" { yypushback(2);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + [^\x00] { string.append( yytext() ); } + {Z}%{Z}>{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} } // The "match anything" rule should always be in effect except for when looking for end of string // (That is, remember to update state list if/when new states added) -<YYINITIAL, ST_XMLDecl, QuotedAttributeValue, ST_PAGE_DIRECTIVE> -{ -// this is the fallback (match "anything") rule (for this scanner, input is ignored, and position advanced, if not recognized) -.|\n {if (yychar > MAX_TO_SCAN) {hasMore=false; return EncodingParserConstants.MAX_CHARS_REACHED;}} -} +.|\n {if(yychar > MAX_TO_SCAN) {hasMore=false; return EncodingParserConstants.MAX_CHARS_REACHED;}} // this rule always in effect <<EOF>> {hasMore = false; return EncodingParserConstants.EOF;} +
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPHeadTokenizer.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPHeadTokenizer.java index 45ae051..176c532 100644 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPHeadTokenizer.java +++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPHeadTokenizer.java
@@ -1,4 +1,4 @@ -/* The following code was generated by JFlex 1.4.2 on 6/30/08 4:51 PM */ +/* The following code was generated by JFlex 1.4.2 on 7/28/08 9:29 AM */ /******************************************************************************* * Copyright (c) 2005, 2008 IBM Corporation and others. @@ -19,11 +19,12 @@ import org.eclipse.wst.xml.core.internal.contenttype.EncodingParserConstants; import org.eclipse.wst.xml.core.internal.contenttype.XMLHeadTokenizerConstants; + /** * This class is a scanner generated by * <a href="http://www.jflex.de/">JFlex</a> 1.4.2 - * on 6/30/08 4:51 PM from the specification file - * <tt>D:/eclipse.wtp/workspace/org.eclipse.jst.jsp.core/DevTimeSupport/HeadParsers/JSPHeadTokenizer.jFlex</tt> + * on 7/28/08 9:29 AM from the specification file + * <tt>D:/workspaces/wtp301/workspace/org.eclipse.jst.jsp.core/DevTimeSupport/HeadParsers/JSPHeadTokenizer.jFlex</tt> */ public class JSPHeadTokenizer { @@ -56,16 +57,16 @@ * Translates characters to character classes */ private static final String ZZ_CMAP_PACKED = - "\11\0\1\6\1\11\2\0\1\10\22\0\1\34\1\17\1\37\2\0"+ - "\1\51\1\0\1\40\6\0\1\43\1\33\1\0\1\47\1\0\1\44"+ - "\5\0\1\50\1\41\1\0\1\12\1\7\1\56\1\13\1\52\1\53"+ - "\1\31\1\22\1\20\1\26\1\0\1\46\1\27\1\32\1\54\1\0"+ - "\1\16\1\15\1\35\1\21\1\25\1\0\1\45\1\36\1\23\1\30"+ - "\1\55\1\42\1\14\1\24\7\0\1\53\1\31\1\22\1\20\1\26"+ - "\1\0\1\46\1\27\1\32\1\54\1\0\1\16\1\15\1\35\1\21"+ - "\1\25\1\0\1\45\1\36\1\23\1\30\1\55\1\42\1\14\1\24"+ - "\101\0\1\4\3\0\1\5\17\0\1\3\16\0\1\1\20\0\1\3"+ - "\16\0\1\1\1\2\170\0\1\2\ufe87\0"; + "\1\11\10\0\1\6\1\10\2\0\1\7\22\0\1\6\1\20\1\37"+ + "\2\0\1\51\1\0\1\40\6\0\1\43\1\34\1\0\1\47\1\0"+ + "\1\44\5\0\1\50\1\41\1\0\1\13\1\12\1\56\1\14\1\52"+ + "\1\53\1\32\1\23\1\21\1\27\1\0\1\46\1\30\1\33\1\54"+ + "\1\0\1\17\1\16\1\35\1\22\1\26\1\0\1\45\1\36\1\24"+ + "\1\31\1\55\1\42\1\15\1\25\7\0\1\53\1\32\1\23\1\21"+ + "\1\27\1\0\1\46\1\30\1\33\1\54\1\0\1\17\1\16\1\35"+ + "\1\22\1\26\1\0\1\45\1\36\1\24\1\31\1\55\1\42\1\15"+ + "\1\25\101\0\1\4\3\0\1\5\17\0\1\3\16\0\1\1\20\0"+ + "\1\3\16\0\1\1\1\2\170\0\1\2\ufe87\0"; /** * Translates characters to character classes @@ -78,15 +79,20 @@ private static final int [] ZZ_ACTION = zzUnpackAction(); private static final String ZZ_ACTION_PACKED_0 = - "\10\0\20\1\2\2\1\1\1\3\1\4\1\5\1\6"+ - "\1\5\1\7\2\5\1\7\1\10\2\11\4\0\1\12"+ - "\1\13\6\0\1\14\5\0\1\15\1\16\1\0\1\17"+ - "\1\0\1\20\4\0\1\21\41\0\1\22\7\0\1\23"+ - "\12\0\1\24\6\0\1\25\1\26\22\0\1\27\5\0"+ - "\1\30\52\0\1\31\5\0\1\32\12\0\1\32"; + "\10\0\24\1\2\2\1\1\1\2\1\3\1\4\1\5"+ + "\1\6\1\1\1\5\1\7\1\5\1\1\1\10\1\1"+ + "\1\11\6\0\1\12\1\13\15\0\1\14\20\0\1\15"+ + "\1\0\1\16\1\0\1\2\1\3\1\4\1\6\3\0"+ + "\1\17\1\7\1\0\1\10\1\11\10\0\1\20\5\0"+ + "\1\14\12\0\1\15\1\16\1\2\1\17\67\0\1\21"+ + "\20\0\1\22\4\0\1\21\17\0\1\22\6\0\1\23"+ + "\15\0\1\24\1\0\1\23\2\0\1\25\14\0\1\24"+ + "\2\0\1\25\34\0\1\26\14\0\1\26\2\0\1\27"+ + "\13\0\1\27\132\0\1\30\1\0\1\30\6\0\2\30"+ + "\11\0\1\31\1\0\1\31\2\0\2\31\11\0"; private static int [] zzUnpackAction() { - int [] result = new int[214]; + int [] result = new int[446]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; @@ -310,7 +316,7 @@ char [] map = new char[0x10000]; int i = 0; /* index in packed string */ int j = 0; /* index in unpacked array */ - while (i < 192) { + while (i < 194) { int count = packed.charAt(i++); char value = packed.charAt(i++); do map[j++] = value; while (--count > 0); @@ -611,1367 +617,3172 @@ zzForNext: { switch (zzState) { case 0: switch (zzInput) { - case 10: zzIsFinal = true; zzState = 9; break zzForNext; + case 9: zzIsFinal = true; zzState = 9; break zzForNext; + case 11: zzIsFinal = true; zzState = 10; break zzForNext; default: zzIsFinal = true; zzNoLookAhead = true; zzState = 8; break zzForNext; } case 1: switch (zzInput) { - case 1: zzIsFinal = true; zzState = 10; break zzForNext; - case 2: zzIsFinal = true; zzState = 11; break zzForNext; - case 3: zzIsFinal = true; zzState = 12; break zzForNext; + case 1: zzIsFinal = true; zzState = 11; break zzForNext; + case 2: zzIsFinal = true; zzState = 12; break zzForNext; + case 3: zzIsFinal = true; zzState = 13; break zzForNext; case 6: - case 8: - case 9: - case 28: zzIsFinal = true; zzState = 13; break zzForNext; - case 10: zzIsFinal = true; zzState = 14; break zzForNext; + case 7: + case 8: zzIsFinal = true; zzState = 14; break zzForNext; + case 9: zzIsFinal = true; zzState = 15; break zzForNext; + case 11: zzIsFinal = true; zzState = 16; break zzForNext; default: zzIsFinal = true; zzNoLookAhead = true; zzState = 8; break zzForNext; } case 2: switch (zzInput) { case 6: - case 8: - case 9: - case 28: zzIsFinal = true; zzState = 15; break zzForNext; - case 11: zzIsFinal = true; zzState = 16; break zzForNext; - case 22: zzIsFinal = true; zzState = 17; break zzForNext; - case 45: zzIsFinal = true; zzState = 18; break zzForNext; + case 7: + case 8: zzIsFinal = true; zzState = 17; break zzForNext; + case 9: zzIsFinal = true; zzState = 18; break zzForNext; + case 12: zzIsFinal = true; zzState = 19; break zzForNext; + case 23: zzIsFinal = true; zzState = 20; break zzForNext; + case 45: zzIsFinal = true; zzState = 21; break zzForNext; default: zzIsFinal = true; zzNoLookAhead = true; zzState = 8; break zzForNext; } case 3: switch (zzInput) { - case 14: zzIsFinal = true; zzState = 19; break zzForNext; - case 18: zzIsFinal = true; zzState = 20; break zzForNext; - case 21: zzIsFinal = true; zzState = 21; break zzForNext; - case 27: zzIsFinal = true; zzState = 22; break zzForNext; - case 41: zzIsFinal = true; zzState = 23; break zzForNext; + case 9: zzIsFinal = true; zzState = 22; break zzForNext; + case 15: zzIsFinal = true; zzState = 23; break zzForNext; + case 19: zzIsFinal = true; zzState = 24; break zzForNext; + case 22: zzIsFinal = true; zzState = 25; break zzForNext; + case 28: zzIsFinal = true; zzState = 26; break zzForNext; + case 41: zzIsFinal = true; zzState = 27; break zzForNext; default: zzIsFinal = true; zzNoLookAhead = true; zzState = 8; break zzForNext; } case 4: switch (zzInput) { case 6: - case 8: - case 28: zzIsFinal = true; zzState = 25; break zzForNext; - case 9: zzIsFinal = true; zzState = 26; break zzForNext; - case 31: zzIsFinal = true; zzNoLookAhead = true; zzState = 27; break zzForNext; - case 32: zzIsFinal = true; zzNoLookAhead = true; zzState = 28; break zzForNext; - default: zzIsFinal = true; zzNoLookAhead = true; zzState = 24; break zzForNext; + case 7: zzIsFinal = true; zzState = 29; break zzForNext; + case 8: zzIsFinal = true; zzState = 30; break zzForNext; + case 9: zzIsFinal = true; zzState = 31; break zzForNext; + case 31: zzIsFinal = true; zzState = 32; break zzForNext; + case 32: zzIsFinal = true; zzState = 33; break zzForNext; + default: zzIsFinal = true; zzNoLookAhead = true; zzState = 28; break zzForNext; } case 5: switch (zzInput) { + case 7: case 8: - case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 30; break zzForNext; - case 11: zzIsFinal = true; zzState = 31; break zzForNext; - case 31: zzIsFinal = true; zzNoLookAhead = true; zzState = 32; break zzForNext; - case 32: zzIsFinal = true; zzState = 33; break zzForNext; - case 41: zzIsFinal = true; zzState = 34; break zzForNext; - default: zzIsFinal = true; zzNoLookAhead = true; zzState = 29; break zzForNext; + case 11: zzIsFinal = true; zzState = 35; break zzForNext; + case 9: zzIsFinal = true; zzState = 36; break zzForNext; + case 12: zzIsFinal = true; zzState = 37; break zzForNext; + case 31: zzIsFinal = true; zzState = 38; break zzForNext; + case 41: zzIsFinal = true; zzState = 39; break zzForNext; + default: zzIsFinal = true; zzNoLookAhead = true; zzState = 34; break zzForNext; } case 6: switch (zzInput) { + case 7: case 8: - case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 30; break zzForNext; - case 41: zzIsFinal = true; zzState = 34; break zzForNext; - case 32: zzIsFinal = true; zzState = 35; break zzForNext; - default: zzIsFinal = true; zzNoLookAhead = true; zzState = 29; break zzForNext; + case 11: zzIsFinal = true; zzState = 35; break zzForNext; + case 32: zzIsFinal = true; zzState = 38; break zzForNext; + case 41: zzIsFinal = true; zzState = 39; break zzForNext; + case 9: zzIsFinal = true; zzState = 40; break zzForNext; + default: zzIsFinal = true; zzNoLookAhead = true; zzState = 34; break zzForNext; } case 7: switch (zzInput) { - case 11: - case 41: zzIsFinal = true; zzState = 34; break zzForNext; + case 11: zzIsFinal = true; zzState = 35; break zzForNext; + case 12: + case 41: zzIsFinal = true; zzState = 39; break zzForNext; case 6: - case 8: - case 9: - case 28: zzIsFinal = true; zzNoLookAhead = true; zzState = 36; break zzForNext; - case 31: zzIsFinal = true; zzNoLookAhead = true; zzState = 37; break zzForNext; - case 32: zzIsFinal = true; zzState = 38; break zzForNext; - default: zzIsFinal = true; zzNoLookAhead = true; zzState = 29; break zzForNext; + case 7: + case 8: zzIsFinal = true; zzState = 41; break zzForNext; + case 9: zzIsFinal = true; zzState = 42; break zzForNext; + case 31: + case 32: zzIsFinal = true; zzState = 43; break zzForNext; + default: zzIsFinal = true; zzNoLookAhead = true; zzState = 34; break zzForNext; } case 9: switch (zzInput) { - case 15: zzState = 39; break zzForNext; - case 23: zzState = 40; break zzForNext; - case 41: zzState = 41; break zzForNext; - case 44: zzState = 42; break zzForNext; + case 11: zzState = 44; break zzForNext; default: break zzForAction; } case 10: switch (zzInput) { - case 2: zzIsFinal = true; zzNoLookAhead = true; zzState = 43; break zzForNext; + case 9: zzState = 45; break zzForNext; + case 16: zzState = 46; break zzForNext; + case 24: zzState = 47; break zzForNext; + case 41: zzState = 48; break zzForNext; + case 44: zzState = 49; break zzForNext; default: break zzForAction; } case 11: switch (zzInput) { - case 1: zzIsFinal = true; zzNoLookAhead = true; zzState = 44; break zzForNext; + case 2: zzIsFinal = true; zzNoLookAhead = true; zzState = 50; break zzForNext; default: break zzForAction; } case 12: switch (zzInput) { - case 4: zzState = 45; break zzForNext; + case 1: zzIsFinal = true; zzNoLookAhead = true; zzState = 51; break zzForNext; default: break zzForAction; } case 13: switch (zzInput) { - case 6: - case 8: - case 9: - case 28: zzState = 46; break zzForNext; - case 10: zzState = 47; break zzForNext; + case 4: zzState = 52; break zzForNext; default: break zzForAction; } case 14: switch (zzInput) { - case 15: zzState = 39; break zzForNext; - case 23: zzState = 40; break zzForNext; - case 41: zzState = 41; break zzForNext; - case 44: zzState = 42; break zzForNext; - case 11: zzState = 48; break zzForNext; + case 6: + case 7: + case 8: zzState = 53; break zzForNext; + case 9: zzState = 54; break zzForNext; + case 11: zzState = 55; break zzForNext; default: break zzForAction; } case 15: switch (zzInput) { case 6: - case 8: - case 9: - case 28: zzState = 49; break zzForNext; - case 11: zzState = 50; break zzForNext; + case 7: + case 8: zzState = 53; break zzForNext; + case 11: zzState = 56; break zzForNext; default: break zzForAction; } case 16: switch (zzInput) { - case 46: zzIsFinal = true; zzNoLookAhead = true; zzState = 51; break zzForNext; + case 16: zzState = 46; break zzForNext; + case 24: zzState = 47; break zzForNext; + case 41: zzState = 48; break zzForNext; + case 44: zzState = 49; break zzForNext; + case 9: zzState = 57; break zzForNext; + case 12: zzState = 58; break zzForNext; default: break zzForAction; } case 17: switch (zzInput) { - case 29: zzState = 52; break zzForNext; + case 6: + case 7: + case 8: zzState = 59; break zzForNext; + case 9: zzState = 60; break zzForNext; + case 12: zzState = 61; break zzForNext; default: break zzForAction; } case 18: switch (zzInput) { - case 22: zzState = 53; break zzForNext; + case 6: + case 7: + case 8: zzState = 59; break zzForNext; + case 12: zzState = 61; break zzForNext; + case 23: zzState = 62; break zzForNext; + case 45: zzState = 63; break zzForNext; default: break zzForAction; } case 19: switch (zzInput) { - case 43: zzState = 54; break zzForNext; + case 9: zzState = 64; break zzForNext; + case 46: zzIsFinal = true; zzState = 65; break zzForNext; default: break zzForAction; } case 20: switch (zzInput) { - case 17: zzState = 55; break zzForNext; + case 9: zzState = 66; break zzForNext; + case 29: zzState = 67; break zzForNext; default: break zzForAction; } case 21: switch (zzInput) { - case 43: zzState = 56; break zzForNext; + case 9: zzState = 68; break zzForNext; + case 23: zzState = 69; break zzForNext; default: break zzForAction; } case 22: switch (zzInput) { - case 46: zzIsFinal = true; zzNoLookAhead = true; zzState = 57; break zzForNext; + case 15: zzState = 70; break zzForNext; + case 19: zzState = 71; break zzForNext; + case 22: zzState = 72; break zzForNext; + case 28: zzState = 73; break zzForNext; + case 41: zzState = 74; break zzForNext; default: break zzForAction; } case 23: switch (zzInput) { - case 46: zzIsFinal = true; zzNoLookAhead = true; zzState = 58; break zzForNext; + case 9: zzState = 75; break zzForNext; + case 43: zzState = 76; break zzForNext; + default: break zzForAction; + } + + case 24: + switch (zzInput) { + case 9: zzState = 77; break zzForNext; + case 18: zzState = 78; break zzForNext; default: break zzForAction; } case 25: switch (zzInput) { - case 6: - case 8: - case 28: zzIsFinal = true; break zzForNext; - case 9: zzState = 59; break zzForNext; - default: zzIsFinal = true; zzNoLookAhead = true; zzState = 24; break zzForNext; + case 9: zzState = 79; break zzForNext; + case 43: zzState = 80; break zzForNext; + default: break zzForAction; } case 26: switch (zzInput) { + case 9: zzState = 81; break zzForNext; + case 46: zzIsFinal = true; zzState = 82; break zzForNext; + default: break zzForAction; + } + + case 27: + switch (zzInput) { + case 9: zzState = 83; break zzForNext; + case 46: zzIsFinal = true; zzState = 84; break zzForNext; + default: break zzForAction; + } + + case 29: + switch (zzInput) { case 6: - case 8: - case 28: zzIsFinal = true; zzState = 25; break zzForNext; - case 9: zzState = 59; break zzForNext; - default: zzIsFinal = true; zzNoLookAhead = true; zzState = 24; break zzForNext; + case 7: zzIsFinal = true; break zzForNext; + case 8: zzState = 85; break zzForNext; + case 9: zzIsFinal = true; zzState = 86; break zzForNext; + default: zzIsFinal = true; zzNoLookAhead = true; zzState = 28; break zzForNext; + } + + case 30: + switch (zzInput) { + case 6: + case 7: zzIsFinal = true; zzState = 29; break zzForNext; + case 8: zzState = 85; break zzForNext; + case 9: zzIsFinal = true; zzState = 86; break zzForNext; + default: zzIsFinal = true; zzNoLookAhead = true; zzState = 28; break zzForNext; } case 31: switch (zzInput) { - case 46: zzIsFinal = true; zzNoLookAhead = true; zzState = 60; break zzForNext; + case 31: zzIsFinal = true; zzState = 32; break zzForNext; + case 32: zzIsFinal = true; zzState = 33; break zzForNext; + case 6: + case 7: + case 8: zzState = 85; break zzForNext; + default: break zzForAction; + } + + case 32: + switch (zzInput) { + case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 87; break zzForNext; default: break zzForAction; } case 33: switch (zzInput) { - case 10: zzState = 61; break zzForNext; - default: break zzForAction; - } - - case 34: - switch (zzInput) { - case 46: zzIsFinal = true; zzNoLookAhead = true; zzState = 62; break zzForNext; + case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 88; break zzForNext; default: break zzForAction; } case 35: switch (zzInput) { - case 10: zzState = 61; break zzForNext; + case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 89; break zzForNext; + default: break zzForAction; + } + + case 36: + switch (zzInput) { + case 7: + case 8: + case 11: zzIsFinal = true; zzState = 35; break zzForNext; + case 31: zzIsFinal = true; zzState = 38; break zzForNext; + case 12: zzState = 90; break zzForNext; + case 41: zzState = 91; break zzForNext; + default: break zzForAction; + } + + case 37: + switch (zzInput) { + case 9: zzState = 92; break zzForNext; + case 46: zzIsFinal = true; zzState = 93; break zzForNext; default: break zzForAction; } case 38: switch (zzInput) { - case 10: zzState = 61; break zzForNext; + case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 94; break zzForNext; default: break zzForAction; } case 39: switch (zzInput) { - case 16: zzState = 63; break zzForNext; + case 46: zzIsFinal = true; zzState = 35; break zzForNext; + case 9: zzState = 95; break zzForNext; default: break zzForAction; } case 40: switch (zzInput) { - case 19: zzState = 64; break zzForNext; + case 7: + case 8: + case 11: zzIsFinal = true; zzState = 35; break zzForNext; + case 32: zzIsFinal = true; zzState = 38; break zzForNext; + case 41: zzState = 91; break zzForNext; default: break zzForAction; } case 41: switch (zzInput) { - case 6: - case 8: - case 9: - case 28: break zzForNext; - case 42: zzState = 65; break zzForNext; + case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 96; break zzForNext; default: break zzForAction; } case 42: switch (zzInput) { - case 30: zzState = 66; break zzForNext; + case 11: zzIsFinal = true; zzState = 35; break zzForNext; + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 41; break zzForNext; + case 31: + case 32: zzIsFinal = true; zzState = 43; break zzForNext; + case 12: + case 41: zzState = 91; break zzForNext; + default: break zzForAction; + } + + case 43: + switch (zzInput) { + case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 97; break zzForNext; + default: break zzForAction; + } + + case 44: + switch (zzInput) { + case 9: zzState = 45; break zzForNext; + case 16: zzState = 46; break zzForNext; + case 24: zzState = 47; break zzForNext; + case 41: zzState = 48; break zzForNext; + case 44: zzState = 49; break zzForNext; default: break zzForAction; } case 45: switch (zzInput) { - case 5: zzIsFinal = true; zzNoLookAhead = true; zzState = 67; break zzForNext; + case 16: zzState = 46; break zzForNext; + case 24: zzState = 47; break zzForNext; + case 41: zzState = 48; break zzForNext; + case 44: zzState = 49; break zzForNext; default: break zzForAction; } case 46: switch (zzInput) { - case 6: - case 8: - case 9: - case 28: break zzForNext; - case 10: zzState = 47; break zzForNext; + case 9: zzState = 98; break zzForNext; + case 17: zzState = 99; break zzForNext; default: break zzForAction; } case 47: switch (zzInput) { - case 11: zzState = 48; break zzForNext; + case 9: zzState = 100; break zzForNext; + case 20: zzState = 101; break zzForNext; default: break zzForAction; } case 48: switch (zzInput) { - case 12: zzState = 68; break zzForNext; + case 6: + case 7: + case 8: break zzForNext; + case 9: zzState = 102; break zzForNext; + case 42: zzState = 103; break zzForNext; default: break zzForAction; } case 49: switch (zzInput) { - case 6: - case 8: - case 9: - case 28: break zzForNext; - case 11: zzState = 50; break zzForNext; - default: break zzForAction; - } - - case 50: - switch (zzInput) { - case 46: zzIsFinal = true; zzNoLookAhead = true; zzState = 51; break zzForNext; + case 9: zzState = 104; break zzForNext; + case 30: zzState = 105; break zzForNext; default: break zzForAction; } case 52: switch (zzInput) { - case 18: zzState = 69; break zzForNext; + case 5: zzIsFinal = true; zzNoLookAhead = true; zzState = 106; break zzForNext; default: break zzForAction; } case 53: switch (zzInput) { - case 37: zzState = 70; break zzForNext; + case 6: + case 7: + case 8: break zzForNext; + case 9: zzState = 54; break zzForNext; + case 11: zzState = 55; break zzForNext; default: break zzForAction; } case 54: switch (zzInput) { - case 29: zzState = 71; break zzForNext; + case 6: + case 7: + case 8: zzState = 53; break zzForNext; + case 11: zzState = 55; break zzForNext; + case 9: zzState = 107; break zzForNext; default: break zzForAction; } case 55: switch (zzInput) { - case 29: zzState = 72; break zzForNext; + case 12: zzState = 58; break zzForNext; + case 9: zzState = 108; break zzForNext; default: break zzForAction; } case 56: switch (zzInput) { - case 38: zzState = 73; break zzForNext; + case 16: zzState = 46; break zzForNext; + case 24: zzState = 47; break zzForNext; + case 41: zzState = 48; break zzForNext; + case 44: zzState = 49; break zzForNext; + case 9: zzState = 57; break zzForNext; + case 12: zzState = 58; break zzForNext; + default: break zzForAction; + } + + case 57: + switch (zzInput) { + case 16: zzState = 46; break zzForNext; + case 24: zzState = 47; break zzForNext; + case 41: zzState = 48; break zzForNext; + case 44: zzState = 49; break zzForNext; + case 12: zzState = 58; break zzForNext; + default: break zzForAction; + } + + case 58: + switch (zzInput) { + case 9: zzState = 109; break zzForNext; + case 13: zzState = 110; break zzForNext; default: break zzForAction; } case 59: switch (zzInput) { case 6: - case 8: - case 28: zzIsFinal = true; zzState = 25; break zzForNext; - case 9: break zzForNext; - default: zzIsFinal = true; zzNoLookAhead = true; zzState = 24; break zzForNext; + case 7: + case 8: break zzForNext; + case 9: zzState = 60; break zzForNext; + case 12: zzState = 61; break zzForNext; + default: break zzForAction; + } + + case 60: + switch (zzInput) { + case 6: + case 7: + case 8: zzState = 59; break zzForNext; + case 12: zzState = 61; break zzForNext; + case 9: zzState = 111; break zzForNext; + default: break zzForAction; } case 61: switch (zzInput) { - case 32: zzIsFinal = true; zzNoLookAhead = true; zzState = 30; break zzForNext; + case 9: zzState = 64; break zzForNext; + case 46: zzIsFinal = true; zzState = 65; break zzForNext; + default: break zzForAction; + } + + case 62: + switch (zzInput) { + case 9: zzState = 66; break zzForNext; + case 29: zzState = 67; break zzForNext; default: break zzForAction; } case 63: switch (zzInput) { - case 17: zzState = 74; break zzForNext; + case 9: zzState = 68; break zzForNext; + case 23: zzState = 69; break zzForNext; default: break zzForAction; } case 64: switch (zzInput) { - case 13: zzState = 75; break zzForNext; + case 46: zzIsFinal = true; zzState = 65; break zzForNext; default: break zzForAction; } case 65: switch (zzInput) { - case 6: - case 8: - case 9: - case 28: break zzForNext; - case 19: zzState = 76; break zzForNext; - case 21: zzState = 77; break zzForNext; + case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 112; break zzForNext; default: break zzForAction; } case 66: switch (zzInput) { - case 21: zzState = 78; break zzForNext; + case 29: zzState = 67; break zzForNext; + default: break zzForAction; + } + + case 67: + switch (zzInput) { + case 9: zzState = 113; break zzForNext; + case 19: zzState = 114; break zzForNext; default: break zzForAction; } case 68: switch (zzInput) { - case 13: zzState = 79; break zzForNext; + case 23: zzState = 69; break zzForNext; default: break zzForAction; } case 69: switch (zzInput) { - case 17: zzState = 80; break zzForNext; + case 9: zzState = 115; break zzForNext; + case 37: zzState = 116; break zzForNext; default: break zzForAction; } case 70: switch (zzInput) { - case 30: zzState = 81; break zzForNext; + case 9: zzState = 75; break zzForNext; + case 43: zzState = 76; break zzForNext; default: break zzForAction; } case 71: switch (zzInput) { - case 38: zzState = 82; break zzForNext; + case 9: zzState = 77; break zzForNext; + case 18: zzState = 78; break zzForNext; default: break zzForAction; } case 72: switch (zzInput) { - case 19: zzState = 83; break zzForNext; + case 9: zzState = 79; break zzForNext; + case 43: zzState = 80; break zzForNext; default: break zzForAction; } case 73: switch (zzInput) { - case 22: zzState = 84; break zzForNext; + case 9: zzState = 81; break zzForNext; + case 46: zzIsFinal = true; zzState = 82; break zzForNext; default: break zzForAction; } case 74: switch (zzInput) { - case 18: zzState = 85; break zzForNext; + case 9: zzState = 83; break zzForNext; + case 46: zzIsFinal = true; zzState = 84; break zzForNext; default: break zzForAction; } case 75: switch (zzInput) { - case 14: zzState = 86; break zzForNext; + case 43: zzState = 76; break zzForNext; default: break zzForAction; } case 76: switch (zzInput) { - case 43: zzState = 87; break zzForNext; + case 9: zzState = 117; break zzForNext; + case 29: zzState = 118; break zzForNext; default: break zzForAction; } case 77: switch (zzInput) { - case 43: zzState = 88; break zzForNext; + case 18: zzState = 78; break zzForNext; default: break zzForAction; } case 78: switch (zzInput) { - case 33: zzState = 89; break zzForNext; + case 9: zzState = 119; break zzForNext; + case 29: zzState = 120; break zzForNext; default: break zzForAction; } case 79: switch (zzInput) { - case 14: zzState = 90; break zzForNext; + case 43: zzState = 80; break zzForNext; default: break zzForAction; } case 80: switch (zzInput) { - case 16: zzState = 91; break zzForNext; + case 9: zzState = 121; break zzForNext; + case 38: zzState = 122; break zzForNext; default: break zzForAction; } case 81: switch (zzInput) { - case 26: zzState = 92; break zzForNext; + case 46: zzIsFinal = true; zzState = 82; break zzForNext; default: break zzForAction; } case 82: switch (zzInput) { - case 24: zzState = 93; break zzForNext; + case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 123; break zzForNext; default: break zzForAction; } case 83: switch (zzInput) { - case 22: zzState = 94; break zzForNext; + case 46: zzIsFinal = true; zzState = 84; break zzForNext; default: break zzForAction; } case 84: switch (zzInput) { - case 22: zzState = 95; break zzForNext; + case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 124; break zzForNext; default: break zzForAction; } case 85: switch (zzInput) { - case 19: zzState = 96; break zzForNext; - default: break zzForAction; + case 6: + case 7: zzIsFinal = true; zzState = 29; break zzForNext; + case 8: break zzForNext; + case 9: zzIsFinal = true; zzState = 86; break zzForNext; + default: zzIsFinal = true; zzNoLookAhead = true; zzState = 28; break zzForNext; } case 86: switch (zzInput) { case 6: - case 8: - case 9: - case 28: break zzForNext; - case 12: zzState = 97; break zzForNext; - default: break zzForAction; - } - - case 87: - switch (zzInput) { - case 38: zzState = 98; break zzForNext; - default: break zzForAction; - } - - case 88: - switch (zzInput) { - case 38: zzState = 99; break zzForNext; - default: break zzForAction; - } - - case 89: - switch (zzInput) { - case 16: zzState = 100; break zzForNext; - default: break zzForAction; + case 7: zzIsFinal = true; zzState = 29; break zzForNext; + case 8: zzState = 85; break zzForNext; + case 9: zzIsFinal = true; zzState = 125; break zzForNext; + default: zzIsFinal = true; zzNoLookAhead = true; zzState = 28; break zzForNext; } case 90: switch (zzInput) { - case 6: - case 8: - case 9: - case 28: zzIsFinal = true; zzState = 101; break zzForNext; + case 9: zzState = 92; break zzForNext; + case 46: zzIsFinal = true; zzState = 93; break zzForNext; default: break zzForAction; } case 91: switch (zzInput) { - case 26: zzState = 102; break zzForNext; + case 46: zzIsFinal = true; zzState = 35; break zzForNext; + case 9: zzState = 95; break zzForNext; default: break zzForAction; } case 92: switch (zzInput) { - case 17: zzState = 103; break zzForNext; + case 46: zzIsFinal = true; zzState = 93; break zzForNext; default: break zzForAction; } case 93: switch (zzInput) { - case 43: zzState = 104; break zzForNext; - default: break zzForAction; - } - - case 94: - switch (zzInput) { - case 29: zzState = 105; break zzForNext; + case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 126; break zzForNext; default: break zzForAction; } case 95: switch (zzInput) { - case 29: zzState = 106; break zzForNext; - default: break zzForAction; - } - - case 96: - switch (zzInput) { - case 20: zzState = 107; break zzForNext; - default: break zzForAction; - } - - case 97: - switch (zzInput) { - case 13: zzState = 108; break zzForNext; + case 46: zzIsFinal = true; zzState = 35; break zzForNext; default: break zzForAction; } case 98: switch (zzInput) { - case 6: - case 8: - case 9: - case 28: zzIsFinal = true; zzState = 109; break zzForNext; + case 17: zzState = 99; break zzForNext; default: break zzForAction; } case 99: switch (zzInput) { - case 22: zzState = 98; break zzForNext; + case 9: zzState = 127; break zzForNext; + case 18: zzState = 128; break zzForNext; default: break zzForAction; } case 100: switch (zzInput) { - case 26: zzState = 110; break zzForNext; + case 20: zzState = 101; break zzForNext; default: break zzForAction; } case 101: switch (zzInput) { - case 6: - case 8: - case 9: - case 28: zzIsFinal = true; break zzForNext; + case 9: zzState = 129; break zzForNext; + case 14: zzState = 130; break zzForNext; default: break zzForAction; } case 102: switch (zzInput) { - case 29: zzState = 111; break zzForNext; + case 6: + case 7: + case 8: zzState = 48; break zzForNext; + case 42: zzState = 103; break zzForNext; + case 9: zzState = 131; break zzForNext; default: break zzForAction; } case 103: switch (zzInput) { - case 29: zzState = 112; break zzForNext; + case 6: + case 7: + case 8: break zzForNext; + case 9: zzState = 132; break zzForNext; + case 20: zzState = 133; break zzForNext; + case 22: zzState = 134; break zzForNext; default: break zzForAction; } case 104: switch (zzInput) { - case 38: zzState = 113; break zzForNext; + case 30: zzState = 105; break zzForNext; default: break zzForAction; } case 105: switch (zzInput) { - case 19: zzState = 114; break zzForNext; - default: break zzForAction; - } - - case 106: - switch (zzInput) { - case 18: zzState = 115; break zzForNext; + case 9: zzState = 135; break zzForNext; + case 22: zzState = 136; break zzForNext; default: break zzForAction; } case 107: switch (zzInput) { - case 21: zzState = 116; break zzForNext; + case 6: + case 7: + case 8: zzState = 53; break zzForNext; + case 11: zzState = 55; break zzForNext; default: break zzForAction; } case 108: switch (zzInput) { - case 14: zzState = 117; break zzForNext; + case 12: zzState = 58; break zzForNext; default: break zzForAction; } case 109: switch (zzInput) { - case 6: - case 8: - case 9: - case 28: zzIsFinal = true; break zzForNext; + case 13: zzState = 110; break zzForNext; default: break zzForAction; } case 110: switch (zzInput) { - case 37: zzState = 118; break zzForNext; + case 9: zzState = 137; break zzForNext; + case 14: zzState = 138; break zzForNext; default: break zzForAction; } case 111: switch (zzInput) { - case 38: zzState = 119; break zzForNext; - default: break zzForAction; - } - - case 112: - switch (zzInput) { case 6: - case 8: - case 9: - case 28: break zzForNext; - case 7: zzIsFinal = true; zzState = 120; break zzForNext; + case 7: + case 8: zzState = 59; break zzForNext; + case 12: zzState = 61; break zzForNext; default: break zzForAction; } case 113: switch (zzInput) { - case 22: zzState = 121; break zzForNext; + case 19: zzState = 114; break zzForNext; default: break zzForAction; } case 114: switch (zzInput) { - case 19: zzState = 122; break zzForNext; + case 9: zzState = 139; break zzForNext; + case 18: zzState = 140; break zzForNext; default: break zzForAction; } case 115: switch (zzInput) { - case 17: zzState = 123; break zzForNext; + case 37: zzState = 116; break zzForNext; default: break zzForAction; } case 116: switch (zzInput) { - case 22: zzState = 124; break zzForNext; + case 9: zzState = 141; break zzForNext; + case 30: zzState = 142; break zzForNext; default: break zzForAction; } case 117: switch (zzInput) { - case 29: zzState = 125; break zzForNext; + case 29: zzState = 118; break zzForNext; default: break zzForAction; } case 118: switch (zzInput) { - case 22: zzState = 126; break zzForNext; + case 9: zzState = 143; break zzForNext; + case 38: zzState = 144; break zzForNext; default: break zzForAction; } case 119: switch (zzInput) { - case 6: - case 8: - case 9: - case 28: break zzForNext; - case 7: zzIsFinal = true; zzState = 127; break zzForNext; + case 29: zzState = 120; break zzForNext; default: break zzForAction; } case 120: switch (zzInput) { - case 6: - case 8: - case 9: - case 28: zzIsFinal = true; break zzForNext; + case 9: zzState = 145; break zzForNext; + case 20: zzState = 146; break zzForNext; default: break zzForAction; } case 121: switch (zzInput) { - case 6: - case 8: - case 9: - case 28: break zzForNext; - case 7: zzIsFinal = true; zzState = 128; break zzForNext; + case 38: zzState = 122; break zzForNext; default: break zzForAction; } case 122: switch (zzInput) { - case 20: zzState = 129; break zzForNext; - default: break zzForAction; - } - - case 123: - switch (zzInput) { - case 16: zzState = 130; break zzForNext; - default: break zzForAction; - } - - case 124: - switch (zzInput) { - case 6: - case 8: - case 9: - case 28: break zzForNext; - case 23: zzState = 131; break zzForNext; - case 34: zzState = 132; break zzForNext; + case 9: zzState = 147; break zzForNext; + case 23: zzState = 148; break zzForNext; default: break zzForAction; } case 125: switch (zzInput) { - case 30: zzState = 133; break zzForNext; - default: break zzForAction; - } - - case 126: - switch (zzInput) { - case 18: zzState = 134; break zzForNext; + case 6: + case 7: + case 8: zzState = 85; break zzForNext; default: break zzForAction; } case 127: switch (zzInput) { - case 6: - case 8: - case 9: - case 28: zzIsFinal = true; break zzForNext; + case 18: zzState = 128; break zzForNext; default: break zzForAction; } case 128: switch (zzInput) { - case 6: - case 8: - case 9: - case 28: zzIsFinal = true; break zzForNext; + case 9: zzState = 149; break zzForNext; + case 19: zzState = 150; break zzForNext; default: break zzForAction; } case 129: switch (zzInput) { - case 21: zzState = 135; break zzForNext; + case 14: zzState = 130; break zzForNext; default: break zzForAction; } case 130: switch (zzInput) { - case 26: zzState = 136; break zzForNext; + case 9: zzState = 151; break zzForNext; + case 15: zzState = 152; break zzForNext; default: break zzForAction; } case 131: switch (zzInput) { - case 19: zzState = 137; break zzForNext; + case 6: + case 7: + case 8: zzState = 48; break zzForNext; + case 42: zzState = 103; break zzForNext; default: break zzForAction; } case 132: switch (zzInput) { - case 13: zzState = 138; break zzForNext; + case 6: + case 7: + case 8: zzState = 103; break zzForNext; + case 20: zzState = 133; break zzForNext; + case 22: zzState = 134; break zzForNext; + case 9: zzState = 153; break zzForNext; default: break zzForAction; } case 133: switch (zzInput) { - case 6: - case 8: - case 9: - case 28: break zzForNext; - case 7: zzState = 139; break zzForNext; + case 9: zzState = 154; break zzForNext; + case 43: zzState = 155; break zzForNext; default: break zzForAction; } case 134: switch (zzInput) { - case 19: zzState = 140; break zzForNext; + case 9: zzState = 156; break zzForNext; + case 43: zzState = 157; break zzForNext; default: break zzForAction; } case 135: switch (zzInput) { - case 22: zzState = 141; break zzForNext; + case 22: zzState = 136; break zzForNext; default: break zzForAction; } case 136: switch (zzInput) { - case 29: zzState = 142; break zzForNext; + case 9: zzState = 158; break zzForNext; + case 33: zzState = 159; break zzForNext; default: break zzForAction; } case 137: switch (zzInput) { - case 13: zzState = 143; break zzForNext; + case 14: zzState = 138; break zzForNext; default: break zzForAction; } case 138: switch (zzInput) { - case 14: zzState = 144; break zzForNext; + case 9: zzState = 160; break zzForNext; + case 15: zzState = 161; break zzForNext; default: break zzForAction; } case 139: switch (zzInput) { - case 6: - case 8: - case 9: - case 28: break zzForNext; - case 31: - case 32: zzState = 145; break zzForNext; + case 18: zzState = 140; break zzForNext; default: break zzForAction; } case 140: switch (zzInput) { - case 26: zzState = 146; break zzForNext; + case 9: zzState = 162; break zzForNext; + case 17: zzState = 163; break zzForNext; default: break zzForAction; } case 141: switch (zzInput) { - case 6: - case 8: - case 9: - case 28: break zzForNext; - case 7: zzIsFinal = true; zzState = 147; break zzForNext; + case 30: zzState = 142; break zzForNext; default: break zzForAction; } case 142: switch (zzInput) { - case 38: zzState = 148; break zzForNext; + case 9: zzState = 164; break zzForNext; + case 27: zzState = 165; break zzForNext; default: break zzForAction; } case 143: switch (zzInput) { - case 14: zzState = 149; break zzForNext; + case 38: zzState = 144; break zzForNext; default: break zzForAction; } case 144: switch (zzInput) { - case 6: - case 8: - case 9: - case 28: break zzForNext; - case 21: zzState = 150; break zzForNext; + case 9: zzState = 166; break zzForNext; + case 25: zzState = 167; break zzForNext; default: break zzForAction; } case 145: switch (zzInput) { - case 23: zzState = 151; break zzForNext; + case 20: zzState = 146; break zzForNext; default: break zzForAction; } case 146: switch (zzInput) { - case 45: zzState = 152; break zzForNext; + case 9: zzState = 168; break zzForNext; + case 23: zzState = 169; break zzForNext; default: break zzForAction; } case 147: switch (zzInput) { - case 6: - case 8: - case 9: - case 28: zzIsFinal = true; break zzForNext; + case 23: zzState = 148; break zzForNext; default: break zzForAction; } case 148: switch (zzInput) { - case 6: - case 8: - case 9: - case 28: break zzForNext; - case 7: zzIsFinal = true; zzState = 153; break zzForNext; + case 9: zzState = 170; break zzForNext; + case 23: zzState = 171; break zzForNext; default: break zzForAction; } case 149: switch (zzInput) { - case 6: - case 8: - case 9: - case 28: break zzForNext; - case 21: zzState = 154; break zzForNext; + case 19: zzState = 150; break zzForNext; default: break zzForAction; } case 150: switch (zzInput) { - case 24: zzState = 155; break zzForNext; + case 9: zzState = 172; break zzForNext; + case 20: zzState = 173; break zzForNext; default: break zzForAction; } case 151: switch (zzInput) { - case 19: zzState = 156; break zzForNext; + case 15: zzState = 152; break zzForNext; default: break zzForAction; } case 152: switch (zzInput) { - case 22: zzState = 157; break zzForNext; + case 6: + case 7: + case 8: break zzForNext; + case 9: zzState = 174; break zzForNext; + case 13: zzState = 175; break zzForNext; default: break zzForAction; } case 153: switch (zzInput) { case 6: - case 8: - case 9: - case 28: zzIsFinal = true; break zzForNext; + case 7: + case 8: zzState = 103; break zzForNext; + case 20: zzState = 133; break zzForNext; + case 22: zzState = 134; break zzForNext; default: break zzForAction; } case 154: switch (zzInput) { - case 24: zzState = 158; break zzForNext; + case 43: zzState = 155; break zzForNext; default: break zzForAction; } case 155: switch (zzInput) { - case 25: zzState = 159; break zzForNext; + case 9: zzState = 176; break zzForNext; + case 38: zzState = 177; break zzForNext; default: break zzForAction; } case 156: switch (zzInput) { - case 19: zzState = 160; break zzForNext; + case 43: zzState = 157; break zzForNext; default: break zzForAction; } case 157: switch (zzInput) { - case 35: zzState = 161; break zzForNext; + case 9: zzState = 178; break zzForNext; + case 38: zzState = 179; break zzForNext; default: break zzForAction; } case 158: switch (zzInput) { - case 25: zzState = 162; break zzForNext; + case 33: zzState = 159; break zzForNext; default: break zzForAction; } case 159: switch (zzInput) { - case 14: zzState = 163; break zzForNext; + case 9: zzState = 180; break zzForNext; + case 17: zzState = 181; break zzForNext; default: break zzForAction; } case 160: switch (zzInput) { - case 21: zzState = 164; break zzForNext; + case 15: zzState = 161; break zzForNext; default: break zzForAction; } case 161: switch (zzInput) { - case 19: zzState = 76; break zzForNext; - case 21: zzState = 77; break zzForNext; + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 182; break zzForNext; + case 9: zzState = 183; break zzForNext; default: break zzForAction; } case 162: switch (zzInput) { - case 14: zzState = 165; break zzForNext; + case 17: zzState = 163; break zzForNext; default: break zzForAction; } case 163: switch (zzInput) { - case 26: zzState = 166; break zzForNext; + case 9: zzState = 184; break zzForNext; + case 27: zzState = 185; break zzForNext; default: break zzForAction; } case 164: switch (zzInput) { - case 33: zzState = 167; break zzForNext; + case 27: zzState = 165; break zzForNext; default: break zzForAction; } case 165: switch (zzInput) { - case 26: zzState = 168; break zzForNext; + case 9: zzState = 186; break zzForNext; + case 18: zzState = 187; break zzForNext; default: break zzForAction; } case 166: switch (zzInput) { - case 18: zzState = 169; break zzForNext; + case 25: zzState = 167; break zzForNext; default: break zzForAction; } case 167: switch (zzInput) { - case 27: zzState = 170; break zzForNext; + case 9: zzState = 188; break zzForNext; + case 43: zzState = 189; break zzForNext; default: break zzForAction; } case 168: switch (zzInput) { - case 18: zzState = 171; break zzForNext; + case 23: zzState = 169; break zzForNext; default: break zzForAction; } case 169: switch (zzInput) { - case 27: zzState = 172; break zzForNext; - case 9: break zzForAction; - default: break zzForNext; + case 9: zzState = 190; break zzForNext; + case 29: zzState = 191; break zzForNext; + default: break zzForAction; } case 170: switch (zzInput) { - case 27: zzState = 173; break zzForNext; + case 23: zzState = 171; break zzForNext; default: break zzForAction; } case 171: switch (zzInput) { - case 27: zzState = 174; break zzForNext; - case 9: break zzForAction; - default: break zzForNext; + case 9: zzState = 192; break zzForNext; + case 29: zzState = 193; break zzForNext; + default: break zzForAction; } case 172: switch (zzInput) { - case 27: zzState = 175; break zzForNext; - case 9: break zzForAction; - default: zzState = 169; break zzForNext; + case 20: zzState = 173; break zzForNext; + default: break zzForAction; } case 173: switch (zzInput) { - case 34: zzState = 176; break zzForNext; + case 9: zzState = 194; break zzForNext; + case 21: zzState = 195; break zzForNext; default: break zzForAction; } case 174: switch (zzInput) { - case 27: zzState = 177; break zzForNext; - case 9: break zzForAction; - default: zzState = 171; break zzForNext; + case 6: + case 7: + case 8: zzState = 152; break zzForNext; + case 13: zzState = 175; break zzForNext; + case 9: zzState = 196; break zzForNext; + default: break zzForAction; } case 175: switch (zzInput) { - case 27: break zzForNext; - case 16: zzState = 178; break zzForNext; - case 9: break zzForAction; - default: zzState = 169; break zzForNext; + case 9: zzState = 197; break zzForNext; + case 14: zzState = 198; break zzForNext; + default: break zzForAction; } case 176: switch (zzInput) { - case 34: zzState = 179; break zzForNext; + case 38: zzState = 177; break zzForNext; default: break zzForAction; } case 177: switch (zzInput) { - case 27: break zzForNext; - case 16: zzState = 180; break zzForNext; - case 9: break zzForAction; - default: zzState = 171; break zzForNext; + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 199; break zzForNext; + case 9: zzState = 200; break zzForNext; + default: break zzForAction; } case 178: switch (zzInput) { - case 27: zzState = 172; break zzForNext; - case 19: zzState = 181; break zzForNext; - case 9: break zzForAction; - default: zzState = 169; break zzForNext; + case 38: zzState = 179; break zzForNext; + default: break zzForAction; } case 179: switch (zzInput) { - case 34: zzState = 182; break zzForNext; + case 23: zzState = 177; break zzForNext; + case 9: zzState = 201; break zzForNext; default: break zzForAction; } case 180: switch (zzInput) { - case 27: zzState = 174; break zzForNext; - case 19: zzState = 183; break zzForNext; - case 9: break zzForAction; - default: zzState = 171; break zzForNext; + case 17: zzState = 181; break zzForNext; + default: break zzForAction; } case 181: switch (zzInput) { - case 27: zzState = 172; break zzForNext; - case 16: zzState = 184; break zzForNext; - case 9: break zzForAction; - default: zzState = 169; break zzForNext; + case 9: zzState = 202; break zzForNext; + case 27: zzState = 203; break zzForNext; + default: break zzForAction; } case 182: switch (zzInput) { - case 35: zzState = 185; break zzForNext; + case 6: + case 7: + case 8: zzIsFinal = true; break zzForNext; + case 9: zzIsFinal = true; zzState = 204; break zzForNext; default: break zzForAction; } case 183: switch (zzInput) { - case 27: zzState = 174; break zzForNext; - case 16: zzState = 186; break zzForNext; - case 9: break zzForAction; - default: zzState = 171; break zzForNext; + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 182; break zzForNext; + case 9: zzState = 205; break zzForNext; + default: break zzForAction; } case 184: switch (zzInput) { - case 27: zzState = 172; break zzForNext; - case 28: zzState = 187; break zzForNext; - case 9: break zzForAction; - default: zzState = 169; break zzForNext; + case 27: zzState = 185; break zzForNext; + default: break zzForAction; } case 185: switch (zzInput) { - case 34: zzState = 188; break zzForNext; + case 9: zzState = 206; break zzForNext; + case 29: zzState = 207; break zzForNext; default: break zzForAction; } case 186: switch (zzInput) { - case 27: zzState = 174; break zzForNext; - case 28: zzState = 189; break zzForNext; - case 9: break zzForAction; - default: zzState = 171; break zzForNext; + case 18: zzState = 187; break zzForNext; + default: break zzForAction; } case 187: switch (zzInput) { - case 27: zzState = 172; break zzForNext; - case 34: zzState = 190; break zzForNext; - case 9: break zzForAction; - default: zzState = 169; break zzForNext; + case 9: zzState = 208; break zzForNext; + case 29: zzState = 209; break zzForNext; + default: break zzForAction; } case 188: switch (zzInput) { - case 36: zzState = 191; break zzForNext; + case 43: zzState = 189; break zzForNext; default: break zzForAction; } case 189: switch (zzInput) { - case 27: zzState = 174; break zzForNext; - case 12: zzState = 192; break zzForNext; - case 9: break zzForAction; - default: zzState = 171; break zzForNext; + case 9: zzState = 210; break zzForNext; + case 38: zzState = 211; break zzForNext; + default: break zzForAction; } case 190: switch (zzInput) { - case 27: zzState = 172; break zzForNext; - case 13: zzState = 193; break zzForNext; - case 9: break zzForAction; - default: zzState = 169; break zzForNext; + case 29: zzState = 191; break zzForNext; + default: break zzForAction; } case 191: switch (zzInput) { - case 35: zzState = 194; break zzForNext; + case 9: zzState = 212; break zzForNext; + case 20: zzState = 213; break zzForNext; default: break zzForAction; } case 192: switch (zzInput) { - case 27: zzState = 174; break zzForNext; - case 23: zzState = 195; break zzForNext; - case 9: break zzForAction; - default: zzState = 171; break zzForNext; + case 29: zzState = 193; break zzForNext; + default: break zzForAction; } case 193: switch (zzInput) { - case 27: zzState = 172; break zzForNext; - case 14: zzIsFinal = true; zzState = 196; break zzForNext; - case 9: break zzForAction; - default: zzState = 169; break zzForNext; + case 9: zzState = 214; break zzForNext; + case 19: zzState = 215; break zzForNext; + default: break zzForAction; } case 194: switch (zzInput) { - case 17: zzState = 197; break zzForNext; + case 21: zzState = 195; break zzForNext; default: break zzForAction; } case 195: switch (zzInput) { - case 27: zzState = 174; break zzForNext; - case 19: zzState = 198; break zzForNext; - case 9: break zzForAction; - default: zzState = 171; break zzForNext; + case 9: zzState = 216; break zzForNext; + case 22: zzState = 217; break zzForNext; + default: break zzForAction; } case 196: switch (zzInput) { - case 27: zzState = 172; break zzForNext; - case 9: break zzForAction; - default: zzState = 169; break zzForNext; + case 6: + case 7: + case 8: zzState = 152; break zzForNext; + case 13: zzState = 175; break zzForNext; + default: break zzForAction; } case 197: switch (zzInput) { - case 37: zzState = 199; break zzForNext; + case 14: zzState = 198; break zzForNext; default: break zzForAction; } case 198: switch (zzInput) { - case 27: zzState = 174; break zzForNext; - case 13: zzState = 200; break zzForNext; - case 9: break zzForAction; - default: zzState = 171; break zzForNext; + case 9: zzState = 218; break zzForNext; + case 15: zzState = 219; break zzForNext; + default: break zzForAction; } case 199: switch (zzInput) { - case 38: zzState = 201; break zzForNext; + case 6: + case 7: + case 8: zzIsFinal = true; break zzForNext; + case 9: zzIsFinal = true; zzState = 220; break zzForNext; default: break zzForAction; } case 200: switch (zzInput) { - case 27: zzState = 174; break zzForNext; - case 14: zzIsFinal = true; zzState = 202; break zzForNext; - case 9: break zzForAction; - default: zzState = 171; break zzForNext; + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 199; break zzForNext; + case 9: zzState = 221; break zzForNext; + default: break zzForAction; } case 201: switch (zzInput) { - case 27: zzState = 203; break zzForNext; + case 23: zzState = 177; break zzForNext; default: break zzForAction; } case 202: switch (zzInput) { - case 27: zzState = 174; break zzForNext; - case 9: break zzForAction; - default: zzState = 171; break zzForNext; + case 27: zzState = 203; break zzForNext; + default: break zzForAction; } case 203: switch (zzInput) { - case 39: zzState = 204; break zzForNext; + case 9: zzState = 222; break zzForNext; + case 37: zzState = 223; break zzForNext; default: break zzForAction; } case 204: switch (zzInput) { - case 40: zzState = 205; break zzForNext; + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 182; break zzForNext; + case 9: zzState = 205; break zzForNext; default: break zzForAction; } case 205: switch (zzInput) { - case 40: zzState = 206; break zzForNext; + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 182; break zzForNext; default: break zzForAction; } case 206: switch (zzInput) { - case 40: zzState = 207; break zzForNext; + case 29: zzState = 207; break zzForNext; default: break zzForAction; } case 207: switch (zzInput) { - case 27: zzState = 208; break zzForNext; + case 9: zzState = 224; break zzForNext; + case 38: zzState = 225; break zzForNext; default: break zzForAction; } case 208: switch (zzInput) { - case 12: zzState = 209; break zzForNext; + case 29: zzState = 209; break zzForNext; default: break zzForAction; } case 209: switch (zzInput) { - case 23: zzState = 210; break zzForNext; + case 6: + case 7: + case 8: break zzForNext; + case 9: zzState = 226; break zzForNext; + case 10: zzIsFinal = true; zzState = 227; break zzForNext; default: break zzForAction; } case 210: switch (zzInput) { - case 19: zzState = 211; break zzForNext; + case 38: zzState = 211; break zzForNext; default: break zzForAction; } case 211: switch (zzInput) { - case 13: zzState = 212; break zzForNext; + case 9: zzState = 228; break zzForNext; + case 23: zzState = 229; break zzForNext; default: break zzForAction; } case 212: switch (zzInput) { - case 14: zzIsFinal = true; zzNoLookAhead = true; zzState = 213; break zzForNext; + case 20: zzState = 213; break zzForNext; + default: break zzForAction; + } + + case 213: + switch (zzInput) { + case 9: zzState = 230; break zzForNext; + case 20: zzState = 231; break zzForNext; + default: break zzForAction; + } + + case 214: + switch (zzInput) { + case 19: zzState = 215; break zzForNext; + default: break zzForAction; + } + + case 215: + switch (zzInput) { + case 9: zzState = 232; break zzForNext; + case 18: zzState = 233; break zzForNext; + default: break zzForAction; + } + + case 216: + switch (zzInput) { + case 22: zzState = 217; break zzForNext; + default: break zzForAction; + } + + case 217: + switch (zzInput) { + case 9: zzState = 234; break zzForNext; + case 23: zzState = 235; break zzForNext; + default: break zzForAction; + } + + case 218: + switch (zzInput) { + case 15: zzState = 219; break zzForNext; + default: break zzForAction; + } + + case 219: + switch (zzInput) { + case 9: zzState = 236; break zzForNext; + case 29: zzState = 237; break zzForNext; + default: break zzForAction; + } + + case 220: + switch (zzInput) { + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 199; break zzForNext; + case 9: zzState = 221; break zzForNext; + default: break zzForAction; + } + + case 221: + switch (zzInput) { + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 199; break zzForNext; + default: break zzForAction; + } + + case 222: + switch (zzInput) { + case 37: zzState = 223; break zzForNext; + default: break zzForAction; + } + + case 223: + switch (zzInput) { + case 9: zzState = 238; break zzForNext; + case 23: zzState = 239; break zzForNext; + default: break zzForAction; + } + + case 224: + switch (zzInput) { + case 38: zzState = 225; break zzForNext; + default: break zzForAction; + } + + case 225: + switch (zzInput) { + case 6: + case 7: + case 8: break zzForNext; + case 9: zzState = 240; break zzForNext; + case 10: zzIsFinal = true; zzState = 241; break zzForNext; + default: break zzForAction; + } + + case 226: + switch (zzInput) { + case 6: + case 7: + case 8: zzState = 209; break zzForNext; + case 10: zzIsFinal = true; zzState = 227; break zzForNext; + case 9: zzState = 242; break zzForNext; + default: break zzForAction; + } + + case 227: + switch (zzInput) { + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 243; break zzForNext; + case 9: zzState = 244; break zzForNext; + default: break zzForAction; + } + + case 228: + switch (zzInput) { + case 23: zzState = 229; break zzForNext; + default: break zzForAction; + } + + case 229: + switch (zzInput) { + case 6: + case 7: + case 8: break zzForNext; + case 9: zzState = 245; break zzForNext; + case 10: zzIsFinal = true; zzState = 246; break zzForNext; + default: break zzForAction; + } + + case 230: + switch (zzInput) { + case 20: zzState = 231; break zzForNext; + default: break zzForAction; + } + + case 231: + switch (zzInput) { + case 9: zzState = 247; break zzForNext; + case 21: zzState = 248; break zzForNext; + default: break zzForAction; + } + + case 232: + switch (zzInput) { + case 18: zzState = 233; break zzForNext; + default: break zzForAction; + } + + case 233: + switch (zzInput) { + case 9: zzState = 249; break zzForNext; + case 17: zzState = 250; break zzForNext; + default: break zzForAction; + } + + case 234: + switch (zzInput) { + case 23: zzState = 235; break zzForNext; + default: break zzForAction; + } + + case 235: + switch (zzInput) { + case 6: + case 7: + case 8: break zzForNext; + case 9: zzState = 251; break zzForNext; + case 24: zzState = 252; break zzForNext; + case 34: zzState = 253; break zzForNext; + default: break zzForAction; + } + + case 236: + switch (zzInput) { + case 29: zzState = 237; break zzForNext; + default: break zzForAction; + } + + case 237: + switch (zzInput) { + case 9: zzState = 254; break zzForNext; + case 30: zzState = 255; break zzForNext; + default: break zzForAction; + } + + case 238: + switch (zzInput) { + case 23: zzState = 239; break zzForNext; + default: break zzForAction; + } + + case 239: + switch (zzInput) { + case 9: zzState = 256; break zzForNext; + case 19: zzState = 257; break zzForNext; + default: break zzForAction; + } + + case 240: + switch (zzInput) { + case 6: + case 7: + case 8: zzState = 225; break zzForNext; + case 10: zzIsFinal = true; zzState = 241; break zzForNext; + case 9: zzState = 258; break zzForNext; + default: break zzForAction; + } + + case 241: + switch (zzInput) { + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 259; break zzForNext; + case 9: zzState = 260; break zzForNext; + default: break zzForAction; + } + + case 242: + switch (zzInput) { + case 6: + case 7: + case 8: zzState = 209; break zzForNext; + default: break zzForAction; + } + + case 243: + switch (zzInput) { + case 9: zzIsFinal = true; zzState = 227; break zzForNext; + case 6: + case 7: + case 8: zzIsFinal = true; break zzForNext; + default: break zzForAction; + } + + case 244: + switch (zzInput) { + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 243; break zzForNext; + default: break zzForAction; + } + + case 245: + switch (zzInput) { + case 6: + case 7: + case 8: zzState = 229; break zzForNext; + case 10: zzIsFinal = true; zzState = 246; break zzForNext; + case 9: zzState = 261; break zzForNext; + default: break zzForAction; + } + + case 246: + switch (zzInput) { + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 262; break zzForNext; + case 9: zzState = 263; break zzForNext; + default: break zzForAction; + } + + case 247: + switch (zzInput) { + case 21: zzState = 248; break zzForNext; + default: break zzForAction; + } + + case 248: + switch (zzInput) { + case 9: zzState = 264; break zzForNext; + case 22: zzState = 265; break zzForNext; + default: break zzForAction; + } + + case 249: + switch (zzInput) { + case 17: zzState = 250; break zzForNext; + default: break zzForAction; + } + + case 250: + switch (zzInput) { + case 9: zzState = 266; break zzForNext; + case 27: zzState = 267; break zzForNext; + default: break zzForAction; + } + + case 251: + switch (zzInput) { + case 6: + case 7: + case 8: zzState = 235; break zzForNext; + case 24: zzState = 252; break zzForNext; + case 34: zzState = 253; break zzForNext; + case 9: zzState = 268; break zzForNext; + default: break zzForAction; + } + + case 252: + switch (zzInput) { + case 9: zzState = 269; break zzForNext; + case 20: zzState = 270; break zzForNext; + default: break zzForAction; + } + + case 253: + switch (zzInput) { + case 9: zzState = 271; break zzForNext; + case 14: zzState = 272; break zzForNext; + default: break zzForAction; + } + + case 254: + switch (zzInput) { + case 30: zzState = 255; break zzForNext; + default: break zzForAction; + } + + case 255: + switch (zzInput) { + case 6: + case 7: + case 8: break zzForNext; + case 9: zzState = 273; break zzForNext; + case 10: zzState = 274; break zzForNext; + default: break zzForAction; + } + + case 256: + switch (zzInput) { + case 19: zzState = 257; break zzForNext; + default: break zzForAction; + } + + case 257: + switch (zzInput) { + case 9: zzState = 275; break zzForNext; + case 20: zzState = 276; break zzForNext; + default: break zzForAction; + } + + case 258: + switch (zzInput) { + case 6: + case 7: + case 8: zzState = 225; break zzForNext; + default: break zzForAction; + } + + case 259: + switch (zzInput) { + case 9: zzIsFinal = true; zzState = 241; break zzForNext; + case 6: + case 7: + case 8: zzIsFinal = true; break zzForNext; + default: break zzForAction; + } + + case 260: + switch (zzInput) { + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 259; break zzForNext; + default: break zzForAction; + } + + case 261: + switch (zzInput) { + case 6: + case 7: + case 8: zzState = 229; break zzForNext; + default: break zzForAction; + } + + case 262: + switch (zzInput) { + case 9: zzIsFinal = true; zzState = 246; break zzForNext; + case 6: + case 7: + case 8: zzIsFinal = true; break zzForNext; + default: break zzForAction; + } + + case 263: + switch (zzInput) { + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 262; break zzForNext; + default: break zzForAction; + } + + case 264: + switch (zzInput) { + case 22: zzState = 265; break zzForNext; + default: break zzForAction; + } + + case 265: + switch (zzInput) { + case 9: zzState = 277; break zzForNext; + case 23: zzState = 278; break zzForNext; + default: break zzForAction; + } + + case 266: + switch (zzInput) { + case 27: zzState = 267; break zzForNext; + default: break zzForAction; + } + + case 267: + switch (zzInput) { + case 9: zzState = 279; break zzForNext; + case 29: zzState = 280; break zzForNext; + default: break zzForAction; + } + + case 268: + switch (zzInput) { + case 6: + case 7: + case 8: zzState = 235; break zzForNext; + case 24: zzState = 252; break zzForNext; + case 34: zzState = 253; break zzForNext; + default: break zzForAction; + } + + case 269: + switch (zzInput) { + case 20: zzState = 270; break zzForNext; + default: break zzForAction; + } + + case 270: + switch (zzInput) { + case 9: zzState = 281; break zzForNext; + case 14: zzState = 282; break zzForNext; + default: break zzForAction; + } + + case 271: + switch (zzInput) { + case 14: zzState = 272; break zzForNext; + default: break zzForAction; + } + + case 272: + switch (zzInput) { + case 9: zzState = 283; break zzForNext; + case 15: zzState = 284; break zzForNext; + default: break zzForAction; + } + + case 273: + switch (zzInput) { + case 6: + case 7: + case 8: zzState = 255; break zzForNext; + case 10: zzState = 274; break zzForNext; + case 9: zzState = 285; break zzForNext; + default: break zzForAction; + } + + case 274: + switch (zzInput) { + case 6: + case 7: + case 8: break zzForNext; + case 9: zzState = 286; break zzForNext; + case 31: + case 32: zzState = 287; break zzForNext; + default: break zzForAction; + } + + case 275: + switch (zzInput) { + case 20: zzState = 276; break zzForNext; + default: break zzForAction; + } + + case 276: + switch (zzInput) { + case 9: zzState = 288; break zzForNext; + case 27: zzState = 289; break zzForNext; + default: break zzForAction; + } + + case 277: + switch (zzInput) { + case 23: zzState = 278; break zzForNext; + default: break zzForAction; + } + + case 278: + switch (zzInput) { + case 6: + case 7: + case 8: break zzForNext; + case 9: zzState = 290; break zzForNext; + case 10: zzIsFinal = true; zzState = 291; break zzForNext; + default: break zzForAction; + } + + case 279: + switch (zzInput) { + case 29: zzState = 280; break zzForNext; + default: break zzForAction; + } + + case 280: + switch (zzInput) { + case 9: zzState = 292; break zzForNext; + case 38: zzState = 293; break zzForNext; + default: break zzForAction; + } + + case 281: + switch (zzInput) { + case 14: zzState = 282; break zzForNext; + default: break zzForAction; + } + + case 282: + switch (zzInput) { + case 9: zzState = 294; break zzForNext; + case 15: zzState = 295; break zzForNext; + default: break zzForAction; + } + + case 283: + switch (zzInput) { + case 15: zzState = 284; break zzForNext; + default: break zzForAction; + } + + case 284: + switch (zzInput) { + case 6: + case 7: + case 8: break zzForNext; + case 9: zzState = 296; break zzForNext; + case 22: zzState = 297; break zzForNext; + default: break zzForAction; + } + + case 285: + switch (zzInput) { + case 6: + case 7: + case 8: zzState = 255; break zzForNext; + case 10: zzState = 274; break zzForNext; + default: break zzForAction; + } + + case 286: + switch (zzInput) { + case 6: + case 7: + case 8: zzState = 274; break zzForNext; + case 31: + case 32: zzState = 287; break zzForNext; + case 9: zzState = 298; break zzForNext; + default: break zzForAction; + } + + case 287: + switch (zzInput) { + case 9: zzState = 299; break zzForNext; + case 24: zzState = 300; break zzForNext; + default: break zzForAction; + } + + case 288: + switch (zzInput) { + case 27: zzState = 289; break zzForNext; + default: break zzForAction; + } + + case 289: + switch (zzInput) { + case 9: zzState = 301; break zzForNext; + case 45: zzState = 302; break zzForNext; + default: break zzForAction; + } + + case 290: + switch (zzInput) { + case 6: + case 7: + case 8: zzState = 278; break zzForNext; + case 10: zzIsFinal = true; zzState = 291; break zzForNext; + case 9: zzState = 303; break zzForNext; + default: break zzForAction; + } + + case 291: + switch (zzInput) { + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 304; break zzForNext; + case 9: zzState = 305; break zzForNext; + default: break zzForAction; + } + + case 292: + switch (zzInput) { + case 38: zzState = 293; break zzForNext; + default: break zzForAction; + } + + case 293: + switch (zzInput) { + case 6: + case 7: + case 8: break zzForNext; + case 9: zzState = 306; break zzForNext; + case 10: zzIsFinal = true; zzState = 307; break zzForNext; + default: break zzForAction; + } + + case 294: + switch (zzInput) { + case 15: zzState = 295; break zzForNext; + default: break zzForAction; + } + + case 295: + switch (zzInput) { + case 6: + case 7: + case 8: break zzForNext; + case 9: zzState = 308; break zzForNext; + case 22: zzState = 309; break zzForNext; + default: break zzForAction; + } + + case 296: + switch (zzInput) { + case 6: + case 7: + case 8: zzState = 284; break zzForNext; + case 22: zzState = 297; break zzForNext; + case 9: zzState = 310; break zzForNext; + default: break zzForAction; + } + + case 297: + switch (zzInput) { + case 9: zzState = 311; break zzForNext; + case 25: zzState = 312; break zzForNext; + default: break zzForAction; + } + + case 298: + switch (zzInput) { + case 6: + case 7: + case 8: zzState = 274; break zzForNext; + case 31: + case 32: zzState = 287; break zzForNext; + default: break zzForAction; + } + + case 299: + switch (zzInput) { + case 24: zzState = 300; break zzForNext; + case 9: zzState = 313; break zzForNext; + default: break zzForAction; + } + + case 300: + switch (zzInput) { + case 9: zzState = 314; break zzForNext; + case 20: zzState = 315; break zzForNext; + default: break zzForAction; + } + + case 301: + switch (zzInput) { + case 45: zzState = 302; break zzForNext; + default: break zzForAction; + } + + case 302: + switch (zzInput) { + case 9: zzState = 316; break zzForNext; + case 23: zzState = 317; break zzForNext; + default: break zzForAction; + } + + case 303: + switch (zzInput) { + case 6: + case 7: + case 8: zzState = 278; break zzForNext; + default: break zzForAction; + } + + case 304: + switch (zzInput) { + case 9: zzIsFinal = true; zzState = 291; break zzForNext; + case 6: + case 7: + case 8: zzIsFinal = true; break zzForNext; + default: break zzForAction; + } + + case 305: + switch (zzInput) { + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 304; break zzForNext; + default: break zzForAction; + } + + case 306: + switch (zzInput) { + case 6: + case 7: + case 8: zzState = 293; break zzForNext; + case 10: zzIsFinal = true; zzState = 307; break zzForNext; + case 9: zzState = 318; break zzForNext; + default: break zzForAction; + } + + case 307: + switch (zzInput) { + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 319; break zzForNext; + case 9: zzState = 320; break zzForNext; + default: break zzForAction; + } + + case 308: + switch (zzInput) { + case 6: + case 7: + case 8: zzState = 295; break zzForNext; + case 22: zzState = 309; break zzForNext; + case 9: zzState = 321; break zzForNext; + default: break zzForAction; + } + + case 309: + switch (zzInput) { + case 9: zzState = 322; break zzForNext; + case 25: zzState = 323; break zzForNext; + default: break zzForAction; + } + + case 310: + switch (zzInput) { + case 6: + case 7: + case 8: zzState = 284; break zzForNext; + case 22: zzState = 297; break zzForNext; + default: break zzForAction; + } + + case 311: + switch (zzInput) { + case 25: zzState = 312; break zzForNext; + default: break zzForAction; + } + + case 312: + switch (zzInput) { + case 9: zzState = 324; break zzForNext; + case 26: zzState = 325; break zzForNext; + default: break zzForAction; + } + + case 313: + switch (zzInput) { + case 24: zzState = 300; break zzForNext; + default: break zzForAction; + } + + case 314: + switch (zzInput) { + case 20: zzState = 315; break zzForNext; + default: break zzForAction; + } + + case 315: + switch (zzInput) { + case 9: zzState = 326; break zzForNext; + case 20: zzState = 327; break zzForNext; + default: break zzForAction; + } + + case 316: + switch (zzInput) { + case 23: zzState = 317; break zzForNext; + default: break zzForAction; + } + + case 317: + switch (zzInput) { + case 9: zzState = 328; break zzForNext; + case 35: zzState = 329; break zzForNext; + default: break zzForAction; + } + + case 318: + switch (zzInput) { + case 6: + case 7: + case 8: zzState = 293; break zzForNext; + default: break zzForAction; + } + + case 319: + switch (zzInput) { + case 9: zzIsFinal = true; zzState = 307; break zzForNext; + case 6: + case 7: + case 8: zzIsFinal = true; break zzForNext; + default: break zzForAction; + } + + case 320: + switch (zzInput) { + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 319; break zzForNext; + default: break zzForAction; + } + + case 321: + switch (zzInput) { + case 6: + case 7: + case 8: zzState = 295; break zzForNext; + case 22: zzState = 309; break zzForNext; + default: break zzForAction; + } + + case 322: + switch (zzInput) { + case 25: zzState = 323; break zzForNext; + default: break zzForAction; + } + + case 323: + switch (zzInput) { + case 9: zzState = 330; break zzForNext; + case 26: zzState = 331; break zzForNext; + default: break zzForAction; + } + + case 324: + switch (zzInput) { + case 26: zzState = 325; break zzForNext; + default: break zzForAction; + } + + case 325: + switch (zzInput) { + case 9: zzState = 332; break zzForNext; + case 15: zzState = 333; break zzForNext; + default: break zzForAction; + } + + case 326: + switch (zzInput) { + case 20: zzState = 327; break zzForNext; + default: break zzForAction; + } + + case 327: + switch (zzInput) { + case 9: zzState = 334; break zzForNext; + case 22: zzState = 335; break zzForNext; + default: break zzForAction; + } + + case 328: + switch (zzInput) { + case 35: zzState = 329; break zzForNext; + default: break zzForAction; + } + + case 329: + switch (zzInput) { + case 20: zzState = 133; break zzForNext; + case 22: zzState = 134; break zzForNext; + case 9: zzState = 336; break zzForNext; + default: break zzForAction; + } + + case 330: + switch (zzInput) { + case 26: zzState = 331; break zzForNext; + default: break zzForAction; + } + + case 331: + switch (zzInput) { + case 9: zzState = 337; break zzForNext; + case 15: zzState = 338; break zzForNext; + default: break zzForAction; + } + + case 332: + switch (zzInput) { + case 15: zzState = 333; break zzForNext; + default: break zzForAction; + } + + case 333: + switch (zzInput) { + case 9: zzState = 339; break zzForNext; + case 27: zzState = 340; break zzForNext; + default: break zzForAction; + } + + case 334: + switch (zzInput) { + case 22: zzState = 335; break zzForNext; + default: break zzForAction; + } + + case 335: + switch (zzInput) { + case 9: zzState = 341; break zzForNext; + case 33: zzState = 342; break zzForNext; + default: break zzForAction; + } + + case 336: + switch (zzInput) { + case 20: zzState = 133; break zzForNext; + case 22: zzState = 134; break zzForNext; + default: break zzForAction; + } + + case 337: + switch (zzInput) { + case 15: zzState = 338; break zzForNext; + default: break zzForAction; + } + + case 338: + switch (zzInput) { + case 9: zzState = 343; break zzForNext; + case 27: zzState = 344; break zzForNext; + default: break zzForAction; + } + + case 339: + switch (zzInput) { + case 27: zzState = 340; break zzForNext; + default: break zzForAction; + } + + case 340: + switch (zzInput) { + case 9: zzState = 345; break zzForNext; + case 19: zzState = 346; break zzForNext; + default: break zzForAction; + } + + case 341: + switch (zzInput) { + case 33: zzState = 342; break zzForNext; + default: break zzForAction; + } + + case 342: + switch (zzInput) { + case 9: zzState = 347; break zzForNext; + case 28: zzState = 348; break zzForNext; + default: break zzForAction; + } + + case 343: + switch (zzInput) { + case 27: zzState = 344; break zzForNext; + default: break zzForAction; + } + + case 344: + switch (zzInput) { + case 9: zzState = 349; break zzForNext; + case 19: zzState = 350; break zzForNext; + default: break zzForAction; + } + + case 345: + switch (zzInput) { + case 19: zzState = 346; break zzForNext; + default: break zzForAction; + } + + case 346: + switch (zzInput) { + case 28: zzState = 351; break zzForNext; + case 8: break zzForAction; + default: break zzForNext; + } + + case 347: + switch (zzInput) { + case 28: zzState = 348; break zzForNext; + default: break zzForAction; + } + + case 348: + switch (zzInput) { + case 9: zzState = 352; break zzForNext; + case 28: zzState = 353; break zzForNext; + default: break zzForAction; + } + + case 349: + switch (zzInput) { + case 19: zzState = 350; break zzForNext; + default: break zzForAction; + } + + case 350: + switch (zzInput) { + case 28: zzState = 354; break zzForNext; + case 8: break zzForAction; + default: break zzForNext; + } + + case 351: + switch (zzInput) { + case 9: zzState = 355; break zzForNext; + case 28: zzState = 356; break zzForNext; + case 8: break zzForAction; + default: zzState = 346; break zzForNext; + } + + case 352: + switch (zzInput) { + case 28: zzState = 353; break zzForNext; + default: break zzForAction; + } + + case 353: + switch (zzInput) { + case 9: zzState = 357; break zzForNext; + case 34: zzState = 358; break zzForNext; + default: break zzForAction; + } + + case 354: + switch (zzInput) { + case 9: zzState = 359; break zzForNext; + case 28: zzState = 360; break zzForNext; + case 8: break zzForAction; + default: zzState = 350; break zzForNext; + } + + case 355: + switch (zzInput) { + case 28: zzState = 356; break zzForNext; + case 8: break zzForAction; + default: zzState = 346; break zzForNext; + } + + case 356: + switch (zzInput) { + case 28: break zzForNext; + case 9: zzState = 361; break zzForNext; + case 17: zzState = 362; break zzForNext; + case 8: break zzForAction; + default: zzState = 346; break zzForNext; + } + + case 357: + switch (zzInput) { + case 34: zzState = 358; break zzForNext; + default: break zzForAction; + } + + case 358: + switch (zzInput) { + case 9: zzState = 363; break zzForNext; + case 34: zzState = 364; break zzForNext; + default: break zzForAction; + } + + case 359: + switch (zzInput) { + case 28: zzState = 360; break zzForNext; + case 8: break zzForAction; + default: zzState = 350; break zzForNext; + } + + case 360: + switch (zzInput) { + case 28: break zzForNext; + case 9: zzState = 365; break zzForNext; + case 17: zzState = 366; break zzForNext; + case 8: break zzForAction; + default: zzState = 350; break zzForNext; + } + + case 361: + switch (zzInput) { + case 28: zzState = 356; break zzForNext; + case 17: zzState = 362; break zzForNext; + case 8: break zzForAction; + default: zzState = 346; break zzForNext; + } + + case 362: + switch (zzInput) { + case 28: zzState = 351; break zzForNext; + case 9: zzState = 367; break zzForNext; + case 20: zzState = 368; break zzForNext; + case 8: break zzForAction; + default: zzState = 346; break zzForNext; + } + + case 363: + switch (zzInput) { + case 34: zzState = 364; break zzForNext; + default: break zzForAction; + } + + case 364: + switch (zzInput) { + case 9: zzState = 369; break zzForNext; + case 34: zzState = 370; break zzForNext; + default: break zzForAction; + } + + case 365: + switch (zzInput) { + case 28: zzState = 360; break zzForNext; + case 17: zzState = 366; break zzForNext; + case 8: break zzForAction; + default: zzState = 350; break zzForNext; + } + + case 366: + switch (zzInput) { + case 28: zzState = 354; break zzForNext; + case 9: zzState = 371; break zzForNext; + case 20: zzState = 372; break zzForNext; + case 8: break zzForAction; + default: zzState = 350; break zzForNext; + } + + case 367: + switch (zzInput) { + case 28: zzState = 351; break zzForNext; + case 20: zzState = 368; break zzForNext; + case 8: break zzForAction; + default: zzState = 346; break zzForNext; + } + + case 368: + switch (zzInput) { + case 28: zzState = 351; break zzForNext; + case 9: zzState = 373; break zzForNext; + case 17: zzState = 374; break zzForNext; + case 8: break zzForAction; + default: zzState = 346; break zzForNext; + } + + case 369: + switch (zzInput) { + case 34: zzState = 370; break zzForNext; + default: break zzForAction; + } + + case 370: + switch (zzInput) { + case 9: zzState = 375; break zzForNext; + case 35: zzState = 376; break zzForNext; + default: break zzForAction; + } + + case 371: + switch (zzInput) { + case 28: zzState = 354; break zzForNext; + case 20: zzState = 372; break zzForNext; + case 8: break zzForAction; + default: zzState = 350; break zzForNext; + } + + case 372: + switch (zzInput) { + case 28: zzState = 354; break zzForNext; + case 9: zzState = 377; break zzForNext; + case 17: zzState = 378; break zzForNext; + case 8: break zzForAction; + default: zzState = 350; break zzForNext; + } + + case 373: + switch (zzInput) { + case 28: zzState = 351; break zzForNext; + case 17: zzState = 374; break zzForNext; + case 8: break zzForAction; + default: zzState = 346; break zzForNext; + } + + case 374: + switch (zzInput) { + case 28: zzState = 351; break zzForNext; + case 6: + case 7: zzState = 379; break zzForNext; + case 8: zzState = 380; break zzForNext; + default: zzState = 346; break zzForNext; + } + + case 375: + switch (zzInput) { + case 35: zzState = 376; break zzForNext; + default: break zzForAction; + } + + case 376: + switch (zzInput) { + case 9: zzState = 381; break zzForNext; + case 34: zzState = 382; break zzForNext; + default: break zzForAction; + } + + case 377: + switch (zzInput) { + case 28: zzState = 354; break zzForNext; + case 17: zzState = 378; break zzForNext; + case 8: break zzForAction; + default: zzState = 350; break zzForNext; + } + + case 378: + switch (zzInput) { + case 28: zzState = 354; break zzForNext; + case 6: + case 7: zzState = 383; break zzForNext; + case 8: zzState = 384; break zzForNext; + case 9: zzState = 385; break zzForNext; + default: zzState = 350; break zzForNext; + } + + case 379: + switch (zzInput) { + case 28: zzState = 351; break zzForNext; + case 9: zzState = 386; break zzForNext; + case 34: zzState = 387; break zzForNext; + case 8: break zzForAction; + default: zzState = 346; break zzForNext; + } + + case 380: + switch (zzInput) { + case 9: zzState = 388; break zzForNext; + case 34: zzState = 389; break zzForNext; + default: break zzForAction; + } + + case 381: + switch (zzInput) { + case 34: zzState = 382; break zzForNext; + default: break zzForAction; + } + + case 382: + switch (zzInput) { + case 9: zzState = 390; break zzForNext; + case 36: zzState = 391; break zzForNext; + default: break zzForAction; + } + + case 383: + switch (zzInput) { + case 28: zzState = 354; break zzForNext; + case 9: zzState = 392; break zzForNext; + case 13: zzState = 393; break zzForNext; + case 8: break zzForAction; + default: zzState = 350; break zzForNext; + } + + case 384: + switch (zzInput) { + case 9: zzState = 394; break zzForNext; + case 13: zzState = 395; break zzForNext; + default: break zzForAction; + } + + case 385: + switch (zzInput) { + case 28: zzState = 354; break zzForNext; + case 6: + case 7: zzState = 383; break zzForNext; + case 8: zzState = 384; break zzForNext; + case 9: zzState = 396; break zzForNext; + default: zzState = 350; break zzForNext; + } + + case 386: + switch (zzInput) { + case 28: zzState = 351; break zzForNext; + case 34: zzState = 387; break zzForNext; + case 8: break zzForAction; + default: zzState = 346; break zzForNext; + } + + case 387: + switch (zzInput) { + case 28: zzState = 351; break zzForNext; + case 9: zzState = 397; break zzForNext; + case 14: zzState = 398; break zzForNext; + case 8: break zzForAction; + default: zzState = 346; break zzForNext; + } + + case 388: + switch (zzInput) { + case 34: zzState = 389; break zzForNext; + default: break zzForAction; + } + + case 389: + switch (zzInput) { + case 9: zzState = 399; break zzForNext; + case 14: zzState = 400; break zzForNext; + default: break zzForAction; + } + + case 390: + switch (zzInput) { + case 36: zzState = 391; break zzForNext; + default: break zzForAction; + } + + case 391: + switch (zzInput) { + case 9: zzState = 401; break zzForNext; + case 35: zzState = 402; break zzForNext; + default: break zzForAction; + } + + case 392: + switch (zzInput) { + case 28: zzState = 354; break zzForNext; + case 13: zzState = 393; break zzForNext; + case 9: zzState = 403; break zzForNext; + case 8: break zzForAction; + default: zzState = 350; break zzForNext; + } + + case 393: + switch (zzInput) { + case 28: zzState = 354; break zzForNext; + case 9: zzState = 404; break zzForNext; + case 24: zzState = 405; break zzForNext; + case 8: break zzForAction; + default: zzState = 350; break zzForNext; + } + + case 394: + switch (zzInput) { + case 13: zzState = 395; break zzForNext; + case 9: zzState = 406; break zzForNext; + default: break zzForAction; + } + + case 395: + switch (zzInput) { + case 9: zzState = 407; break zzForNext; + case 24: zzState = 408; break zzForNext; + default: break zzForAction; + } + + case 396: + switch (zzInput) { + case 28: zzState = 354; break zzForNext; + case 6: + case 7: zzState = 383; break zzForNext; + case 8: zzState = 384; break zzForNext; + default: zzState = 350; break zzForNext; + } + + case 397: + switch (zzInput) { + case 28: zzState = 351; break zzForNext; + case 14: zzState = 398; break zzForNext; + case 8: break zzForAction; + default: zzState = 346; break zzForNext; + } + + case 398: + switch (zzInput) { + case 28: zzState = 351; break zzForNext; + case 9: zzState = 409; break zzForNext; + case 15: zzIsFinal = true; zzState = 410; break zzForNext; + case 8: break zzForAction; + default: zzState = 346; break zzForNext; + } + + case 399: + switch (zzInput) { + case 14: zzState = 400; break zzForNext; + default: break zzForAction; + } + + case 400: + switch (zzInput) { + case 9: zzState = 411; break zzForNext; + case 15: zzIsFinal = true; zzState = 412; break zzForNext; + default: break zzForAction; + } + + case 401: + switch (zzInput) { + case 35: zzState = 402; break zzForNext; + default: break zzForAction; + } + + case 402: + switch (zzInput) { + case 9: zzState = 413; break zzForNext; + case 18: zzState = 414; break zzForNext; + default: break zzForAction; + } + + case 403: + switch (zzInput) { + case 28: zzState = 354; break zzForNext; + case 13: zzState = 393; break zzForNext; + case 8: break zzForAction; + default: zzState = 350; break zzForNext; + } + + case 404: + switch (zzInput) { + case 28: zzState = 354; break zzForNext; + case 24: zzState = 405; break zzForNext; + case 8: break zzForAction; + default: zzState = 350; break zzForNext; + } + + case 405: + switch (zzInput) { + case 28: zzState = 354; break zzForNext; + case 9: zzState = 415; break zzForNext; + case 20: zzState = 416; break zzForNext; + case 8: break zzForAction; + default: zzState = 350; break zzForNext; + } + + case 406: + switch (zzInput) { + case 13: zzState = 395; break zzForNext; + default: break zzForAction; + } + + case 407: + switch (zzInput) { + case 24: zzState = 408; break zzForNext; + default: break zzForAction; + } + + case 408: + switch (zzInput) { + case 9: zzState = 417; break zzForNext; + case 20: zzState = 418; break zzForNext; + default: break zzForAction; + } + + case 409: + switch (zzInput) { + case 28: zzState = 351; break zzForNext; + case 15: zzIsFinal = true; zzState = 410; break zzForNext; + case 8: break zzForAction; + default: zzState = 346; break zzForNext; + } + + case 410: + switch (zzInput) { + case 28: zzState = 351; break zzForNext; + case 9: zzIsFinal = true; zzState = 419; break zzForNext; + case 8: break zzForAction; + default: zzState = 346; break zzForNext; + } + + case 411: + switch (zzInput) { + case 15: zzIsFinal = true; zzState = 412; break zzForNext; + default: break zzForAction; + } + + case 412: + switch (zzInput) { + case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 420; break zzForNext; + default: break zzForAction; + } + + case 413: + switch (zzInput) { + case 18: zzState = 414; break zzForNext; + default: break zzForAction; + } + + case 414: + switch (zzInput) { + case 9: zzState = 421; break zzForNext; + case 37: zzState = 422; break zzForNext; + default: break zzForAction; + } + + case 415: + switch (zzInput) { + case 28: zzState = 354; break zzForNext; + case 20: zzState = 416; break zzForNext; + case 8: break zzForAction; + default: zzState = 350; break zzForNext; + } + + case 416: + switch (zzInput) { + case 28: zzState = 354; break zzForNext; + case 9: zzState = 423; break zzForNext; + case 14: zzState = 424; break zzForNext; + case 8: break zzForAction; + default: zzState = 350; break zzForNext; + } + + case 417: + switch (zzInput) { + case 20: zzState = 418; break zzForNext; + default: break zzForAction; + } + + case 418: + switch (zzInput) { + case 9: zzState = 425; break zzForNext; + case 14: zzState = 426; break zzForNext; + default: break zzForAction; + } + + case 419: + switch (zzInput) { + case 28: zzState = 351; break zzForNext; + case 8: break zzForAction; + default: zzState = 346; break zzForNext; + } + + case 421: + switch (zzInput) { + case 37: zzState = 422; break zzForNext; + default: break zzForAction; + } + + case 422: + switch (zzInput) { + case 9: zzState = 427; break zzForNext; + case 38: zzState = 428; break zzForNext; + default: break zzForAction; + } + + case 423: + switch (zzInput) { + case 28: zzState = 354; break zzForNext; + case 14: zzState = 424; break zzForNext; + case 8: break zzForAction; + default: zzState = 350; break zzForNext; + } + + case 424: + switch (zzInput) { + case 28: zzState = 354; break zzForNext; + case 9: zzState = 429; break zzForNext; + case 15: zzIsFinal = true; zzState = 430; break zzForNext; + case 8: break zzForAction; + default: zzState = 350; break zzForNext; + } + + case 425: + switch (zzInput) { + case 14: zzState = 426; break zzForNext; + default: break zzForAction; + } + + case 426: + switch (zzInput) { + case 9: zzState = 431; break zzForNext; + case 15: zzIsFinal = true; zzState = 432; break zzForNext; + default: break zzForAction; + } + + case 427: + switch (zzInput) { + case 38: zzState = 428; break zzForNext; + default: break zzForAction; + } + + case 428: + switch (zzInput) { + case 9: zzState = 433; break zzForNext; + case 28: zzState = 434; break zzForNext; + default: break zzForAction; + } + + case 429: + switch (zzInput) { + case 28: zzState = 354; break zzForNext; + case 15: zzIsFinal = true; zzState = 430; break zzForNext; + case 8: break zzForAction; + default: zzState = 350; break zzForNext; + } + + case 430: + switch (zzInput) { + case 28: zzState = 354; break zzForNext; + case 9: zzIsFinal = true; zzState = 435; break zzForNext; + case 8: break zzForAction; + default: zzState = 350; break zzForNext; + } + + case 431: + switch (zzInput) { + case 15: zzIsFinal = true; zzState = 432; break zzForNext; + default: break zzForAction; + } + + case 432: + switch (zzInput) { + case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 436; break zzForNext; + default: break zzForAction; + } + + case 433: + switch (zzInput) { + case 28: zzState = 434; break zzForNext; + default: break zzForAction; + } + + case 434: + switch (zzInput) { + case 9: zzState = 437; break zzForNext; + case 39: zzState = 438; break zzForNext; + default: break zzForAction; + } + + case 435: + switch (zzInput) { + case 28: zzState = 354; break zzForNext; + case 8: break zzForAction; + default: zzState = 350; break zzForNext; + } + + case 437: + switch (zzInput) { + case 39: zzState = 438; break zzForNext; + default: break zzForAction; + } + + case 438: + switch (zzInput) { + case 9: zzState = 439; break zzForNext; + case 40: zzState = 440; break zzForNext; + default: break zzForAction; + } + + case 439: + switch (zzInput) { + case 40: zzState = 440; break zzForNext; + default: break zzForAction; + } + + case 440: + switch (zzInput) { + case 9: zzState = 441; break zzForNext; + case 40: zzState = 442; break zzForNext; + default: break zzForAction; + } + + case 441: + switch (zzInput) { + case 40: zzState = 442; break zzForNext; + default: break zzForAction; + } + + case 442: + switch (zzInput) { + case 9: zzState = 443; break zzForNext; + case 40: zzState = 444; break zzForNext; + default: break zzForAction; + } + + case 443: + switch (zzInput) { + case 40: zzState = 444; break zzForNext; + default: break zzForAction; + } + + case 444: + switch (zzInput) { + case 28: zzState = 394; break zzForNext; + case 9: zzState = 445; break zzForNext; + default: break zzForAction; + } + + case 445: + switch (zzInput) { + case 28: zzState = 394; break zzForNext; default: break zzForAction; } @@ -1997,107 +3808,103 @@ case 10: { if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF16BE;} } - case 27: break; - case 17: + case 26: break; + case 16: { if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF83ByteBOM;} } + case 27: break; + case 1: + { if(yychar > MAX_TO_SCAN) {hasMore=false; return EncodingParserConstants.MAX_CHARS_REACHED;} + } case 28: break; case 4: { yybegin(SQ_STRING); string.setLength(0); } case 29: break; + case 8: + { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.UnDelimitedStringValue; + } + case 30: break; case 5: { string.append( yytext() ); } - case 30: break; - case 22: - { pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageLanguage; - } case 31: break; - case 26: - { isXHTML = true; + case 9: + { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue; } case 32: break; - case 24: - { pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageEncoding; + case 21: + { pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageLanguage; } case 33: break; - case 1: - { if (yychar > MAX_TO_SCAN) {hasMore=false; return EncodingParserConstants.MAX_CHARS_REACHED;} + case 15: + { yypushback(yylength()); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue; } case 34: break; + case 25: + { isXHTML = true; + } + case 35: break; + case 23: + { pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageEncoding; + } + case 36: break; case 11: { if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF16LE;} } - case 35: break; - case 6: - { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue; - } - case 36: break; - case 8: - { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.UnDelimitedStringValue; - } case 37: break; - case 9: - { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue; - } - case 38: break; case 7: { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue; } - case 39: break; + case 38: break; case 14: { yybegin(YYINITIAL); return JSPHeadTokenizerConstants.PageDirectiveEnd; } - case 40: break; - case 23: + case 39: break; + case 22: { pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageContentType; } - case 41: break; - case 18: + case 40: break; + case 17: { if (yychar == 0 ) {yybegin(ST_XMLDecl); return XMLHeadTokenizerConstants.XMLDeclStart;} } - case 42: break; - case 15: - { yypushback(2); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue; - } - case 43: break; + case 41: break; case 2: { yypushback(1); yybegin(UnDelimitedString); string.setLength(0); } - case 44: break; + case 42: break; case 12: { yybegin(YYINITIAL); return XMLHeadTokenizerConstants.XMLDeclEnd; } - case 45: break; + case 43: break; case 13: { yybegin(YYINITIAL); return JSPHeadTokenizerConstants.PageDirectiveEnd; } - case 46: break; - case 25: + case 44: break; + case 24: { isWML = true; } - case 47: break; - case 19: + case 45: break; + case 18: { yybegin(ST_PAGE_DIRECTIVE); return JSPHeadTokenizerConstants.PageDirectiveStart; } - case 48: break; - case 21: + case 46: break; + case 6: + { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue; + } + case 47: break; + case 20: { pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDelEncoding; } - case 49: break; - case 20: + case 48: break; + case 19: { pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDeclVersion; } - case 50: break; - case 16: - { yypushback(2);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue; - } - case 51: break; + case 49: break; case 3: { yybegin(DQ_STRING); string.setLength(0); } - case 52: break; + case 50: break; default: if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { zzAtEOF = true;
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPResourceEncodingDetector.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPResourceEncodingDetector.java index d8292cd..f3f3e9c 100644 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPResourceEncodingDetector.java +++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPResourceEncodingDetector.java
@@ -22,6 +22,7 @@ import org.eclipse.core.resources.IStorage; import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.content.IContentDescription; import org.eclipse.jst.jsp.core.internal.Logger; import org.eclipse.wst.sse.core.internal.encoding.CodedIO; import org.eclipse.wst.sse.core.internal.encoding.EncodingMemento; @@ -217,15 +218,13 @@ createEncodingMemento(enc, EncodingMemento.DETECTED_STANDARD_UNICODE_BYTES); fEncodingMemento.setUTF83ByteBOMUsed(true); } - else if (tokenType == EncodingParserConstants.UTF16BE) { - canHandleAsUnicode = true; - String enc = "UTF-16BE"; //$NON-NLS-1$ - createEncodingMemento(enc, EncodingMemento.DETECTED_STANDARD_UNICODE_BYTES); - } - else if (tokenType == EncodingParserConstants.UTF16LE) { + else if (tokenType == EncodingParserConstants.UTF16BE || tokenType == EncodingParserConstants.UTF16LE) { canHandleAsUnicode = true; String enc = "UTF-16"; //$NON-NLS-1$ + byte[] bom = (tokenType == EncodingParserConstants.UTF16BE) ? IContentDescription.BOM_UTF_16BE : IContentDescription.BOM_UTF_16LE; createEncodingMemento(enc, EncodingMemento.DETECTED_STANDARD_UNICODE_BYTES); + fEncodingMemento.setUnicodeStream(true); + fEncodingMemento.setUnicodeBOM(bom); } return canHandleAsUnicode; }
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/CSSHeadTokenizer.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/CSSHeadTokenizer.java index 02c5eaf..dbdffec 100644 --- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/CSSHeadTokenizer.java +++ b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/CSSHeadTokenizer.java
@@ -1,18 +1,17 @@ +/* The following code was generated by JFlex 1.2.2 on 7/28/08 5:19 PM */ + /******************************************************************************* - * Copyright (c) 2004, 2005 IBM Corporation and others. + * Copyright (c) 2004, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ -/* The following code was generated by JFlex 1.2.2 on 1/27/04 6:42 PM */ - /*nlsXXX*/ package org.eclipse.wst.css.core.internal.contenttype; - import java.io.IOException; import java.io.Reader; @@ -20,104 +19,124 @@ import org.eclipse.wst.xml.core.internal.contenttype.XMLHeadTokenizerConstants; + + /** - * This class is a scanner generated by <a - * href="http://www.informatik.tu-muenchen.de/~kleing/jflex/">JFlex </a> 1.2.2 - * on 1/27/04 6:42 PM from the specification file - * <tt>file:/D:/DevTimeSupport/HeadParsers/CSSHeadTokenizer/CSSHeadTokenizer.jflex</tt> + * This class is a scanner generated by + * <a href="http://www.informatik.tu-muenchen.de/~kleing/jflex/">JFlex</a> 1.2.2 + * on 7/28/08 5:19 PM from the specification file + * <tt>file:/D:/workspaces/wtp301/workspace/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/CSSHeadTokenizer/CSSHeadTokenizer.jFlex</tt> */ public class CSSHeadTokenizer { - /** this character denotes the end of file */ - final public static int YYEOF = -1; + /** this character denotes the end of file */ + final public static int YYEOF = -1; - /** lexical states */ - final public static int YYINITIAL = 0; - final public static int UnDelimitedString = 12; - final public static int DQ_STRING = 8; - final public static int SQ_STRING = 10; - final public static int ST_XMLDecl = 2; - final public static int QuotedAttributeValue = 6; - final public static int CHARSET_RULE = 4; + /** lexical states */ + final public static int YYINITIAL = 0; + final public static int UnDelimitedString = 12; + final public static int DQ_STRING = 8; + final public static int SQ_STRING = 10; + final public static int ST_XMLDecl = 2; + final public static int QuotedAttributeValue = 6; + final public static int CHARSET_RULE = 4; - /** - * YY_LEXSTATE[l] is the state in the DFA for the lexical state l - * YY_LEXSTATE[l+1] is the state in the DFA for the lexical state l at the - * beginning of a line l is of the form l = 2*k, k a non negative integer - */ - private final static int YY_LEXSTATE[] = {0, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7}; + /** + * YY_LEXSTATE[l] is the state in the DFA for the lexical state l + * YY_LEXSTATE[l+1] is the state in the DFA for the lexical state l + * at the beginning of a line + * l is of the form l = 2*k, k a non negative integer + */ + private final static int YY_LEXSTATE[] = { + 0, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7 + }; - /** - * Translates characters to character classes - */ - final private static String yycmap_packed = "\11\0\1\6\1\11\2\0\1\10\22\0\1\6\1\0\1\36\2\0" + "\1\41\1\0\1\37\7\0\1\40\13\0\1\35\1\12\1\7\1\34" + "\1\13\1\17\1\22\1\0\1\20\1\31\1\25\1\0\1\33\1\21" + "\1\32\2\0\1\16\1\15\1\27\1\30\2\0\1\23\1\24\1\26" + "\3\0\1\14\10\0\1\22\1\0\1\20\1\31\1\25\1\0\1\33" + "\1\21\1\32\2\0\1\16\1\15\1\27\1\30\2\0\1\23\1\24" + "\1\26\3\0\1\14\102\0\1\4\3\0\1\5\17\0\1\3\16\0" + "\1\1\20\0\1\3\16\0\1\1\1\2\170\0\1\2\ufe87\0"; + /** + * Translates characters to character classes + */ + final private static String yycmap_packed = + "\1\11\10\0\1\6\1\10\2\0\1\7\22\0\1\6\1\0\1\37"+ + "\2\0\1\42\1\0\1\40\7\0\1\41\13\0\1\36\1\13\1\12"+ + "\1\35\1\14\1\20\1\23\1\0\1\21\1\32\1\26\1\0\1\34"+ + "\1\22\1\33\2\0\1\17\1\16\1\30\1\31\2\0\1\24\1\25"+ + "\1\27\3\0\1\15\10\0\1\23\1\0\1\21\1\32\1\26\1\0"+ + "\1\34\1\22\1\33\2\0\1\17\1\16\1\30\1\31\2\0\1\24"+ + "\1\25\1\27\3\0\1\15\102\0\1\4\3\0\1\5\17\0\1\3"+ + "\16\0\1\1\20\0\1\3\16\0\1\1\1\2\170\0\1\2\ufe87\0"; - /** - * Translates characters to character classes - */ - final private static char[] yycmap = yy_unpack_cmap(yycmap_packed); + /** + * Translates characters to character classes + */ + final private static char [] yycmap = yy_unpack_cmap(yycmap_packed); - /* error codes */ - final private static int YY_UNKNOWN_ERROR = 0; - final private static int YY_ILLEGAL_STATE = 1; - final private static int YY_NO_MATCH = 2; - final private static int YY_PUSHBACK_2BIG = 3; + /* error codes */ + final private static int YY_UNKNOWN_ERROR = 0; + final private static int YY_ILLEGAL_STATE = 1; + final private static int YY_NO_MATCH = 2; + final private static int YY_PUSHBACK_2BIG = 3; - /* error messages for the codes above */ - final private static String YY_ERROR_MSG[] = {"Unkown internal scanner error", "Internal error: unknown state", "Error: could not match input", "Error: pushback value was too large"}; + /* error messages for the codes above */ + final private static String YY_ERROR_MSG[] = { + "Unkown internal scanner error", + "Internal error: unknown state", + "Error: could not match input", + "Error: pushback value was too large" + }; - /** the input device */ - private java.io.Reader yy_reader; + /** the input device */ + private java.io.Reader yy_reader; - /** the current state of the DFA */ - private int yy_state; + /** the current state of the DFA */ + private int yy_state; - /** the current lexical state */ - private int yy_lexical_state = YYINITIAL; + /** the current lexical state */ + private int yy_lexical_state = YYINITIAL; - /** - * this buffer contains the current text to be matched and is the source - * of the yytext() string - */ - private char yy_buffer[] = new char[16384]; + /** this buffer contains the current text to be matched and is + the source of the yytext() string */ + private char yy_buffer[] = new char[16384]; - /** the textposition at the last accepting state */ - private int yy_markedPos; + /** the textposition at the last accepting state */ + private int yy_markedPos; - /** the textposition at the last state to be included in yytext */ - private int yy_pushbackPos; + /** the textposition at the last state to be included in yytext */ + private int yy_pushbackPos; - /** the current text position in the buffer */ - private int yy_currentPos; + /** the current text position in the buffer */ + private int yy_currentPos; - /** startRead marks the beginning of the yytext() string in the buffer */ - private int yy_startRead; + /** startRead marks the beginning of the yytext() string in the buffer */ + private int yy_startRead; - /** - * endRead marks the last character in the buffer, that has been read from - * input - */ - private int yy_endRead; + /** endRead marks the last character in the buffer, that has been read + from input */ + private int yy_endRead; + /** number of newlines encountered up to the start of the matched text */ +// private int yyline; - /** the number of characters up to the start of the matched text */ - private int yychar; + /** the number of characters up to the start of the matched text */ + private int yychar; + /** + * the number of characters from the last newline up to the start of the + * matched text + */ +// private int yycolumn; - /** - * yy_atBOL == true <=>the scanner is currently at the beginning of a - * line - */ - private boolean yy_atBOL; + /** + * yy_atBOL == true <=> the scanner is currently at the beginning of a line + */ + private boolean yy_atBOL; - /** yy_atEOF == true <=>the scanner has returned a value for EOF */ - private boolean yy_atEOF; + /** yy_atEOF == true <=> the scanner has returned a value for EOF */ + private boolean yy_atEOF; - /** denotes if the user-EOF-code has already been executed */ - private boolean yy_eof_done; + /** denotes if the user-EOF-code has already been executed */ + private boolean yy_eof_done; - /* user code: */ + /* user code: */ private boolean hasMore = true; @@ -133,71 +152,76 @@ super(); } - public void reset(Reader in) { - /* the input device */ - yy_reader = in; + public void reset (Reader in) { + /* the input device */ + yy_reader = in; - /* the current state of the DFA */ - yy_state = 0; + /* the current state of the DFA */ + yy_state = 0; - /* the current lexical state */ - yy_lexical_state = YYINITIAL; + /* the current lexical state */ + yy_lexical_state = YYINITIAL; - /* - * this buffer contains the current text to be matched and is the - * source of the yytext() string - */ - java.util.Arrays.fill(yy_buffer, (char) 0); + /* this buffer contains the current text to be matched and is + the source of the yytext() string */ + java.util.Arrays.fill(yy_buffer, (char)0); - /* the textposition at the last accepting state */ - yy_markedPos = 0; + /* the textposition at the last accepting state */ + yy_markedPos = 0; - /* the textposition at the last state to be included in yytext */ - yy_pushbackPos = 0; + /* the textposition at the last state to be included in yytext */ + yy_pushbackPos = 0; - /* the current text position in the buffer */ - yy_currentPos = 0; + /* the current text position in the buffer */ + yy_currentPos = 0; - /* startRead marks the beginning of the yytext() string in the buffer */ - yy_startRead = 0; + /* startRead marks the beginning of the yytext() string in the buffer */ + yy_startRead = 0; - /** - * endRead marks the last character in the buffer, that has been read - * from input - */ - yy_endRead = 0; + /** + * endRead marks the last character in the buffer, that has been read + * from input + */ + yy_endRead = 0; + + /* number of newlines encountered up to the start of the matched text */ +// yyline = 0; + + /* the number of characters up to the start of the matched text */ + yychar = 0; + + /** + * the number of characters from the last newline up to the start + * of the matched text + */ +// yycolumn = 0; + + /** + * yy_atBOL == true <=> the scanner is currently at the beginning + * of a line + */ + yy_atBOL = false; + + /* yy_atEOF == true <=> the scanner has returned a value for EOF */ + yy_atEOF = false; + + /* denotes if the user-EOF-code has already been executed */ + yy_eof_done = false; - /* the number of characters up to the start of the matched text */ - yychar = 0; - - - /** - * yy_atBOL == true <=>the scanner is currently at the beginning of a - * line - */ - yy_atBOL = false; - - /* yy_atEOF == true <=> the scanner has returned a value for EOF */ - yy_atEOF = false; - - /* denotes if the user-EOF-code has already been executed */ - yy_eof_done = false; - - - fStateStack.clear(); - - hasMore = true; - + fStateStack.clear(); + + hasMore = true; + // its a little wasteful to "throw away" first char array generated // by class init (via auto generated code), but we really do want // a small buffer for our head parsers. if (yy_buffer.length != MAX_TO_SCAN) { yy_buffer = new char[MAX_TO_SCAN]; } + - - } + } public final HeadParserToken getNextToken() throws IOException { @@ -207,8 +231,7 @@ if (valueText != null) { result = createToken(context, yychar, valueText); valueText = null; - } - else { + } else { result = createToken(context, yychar, yytext()); } return result; @@ -217,7 +240,6 @@ public final boolean hasMoreTokens() { return hasMore && yychar < MAX_TO_SCAN; } - private void pushCurrentState() { fStateStack.push(yystate()); @@ -226,1130 +248,1193 @@ private void popState() { yybegin(fStateStack.pop()); } - private HeadParserToken createToken(String context, int start, String text) { return new HeadParserToken(context, start, text); } + - /** - * Creates a new scanner There is also a java.io.InputStream version of - * this constructor. - * - * @param in - * the java.io.Reader to read input from. - */ - public CSSHeadTokenizer(java.io.Reader in) { - this.yy_reader = in; - } + /** + * Creates a new scanner + * There is also a java.io.InputStream version of this constructor. + * + * @param in the java.io.Reader to read input from. + */ + public CSSHeadTokenizer(java.io.Reader in) { + this.yy_reader = in; + } - /** - * Creates a new scanner. There is also java.io.Reader version of this - * constructor. - * - * @param in - * the java.io.Inputstream to read input from. - */ - public CSSHeadTokenizer(java.io.InputStream in) { - this(new java.io.InputStreamReader(in)); - } + /** + * Creates a new scanner. + * There is also java.io.Reader version of this constructor. + * + * @param in the java.io.Inputstream to read input from. + */ + public CSSHeadTokenizer(java.io.InputStream in) { + this(new java.io.InputStreamReader(in)); + } - /** - * Unpacks the compressed character translation table. - * - * @param packed - * the packed character translation table - * @return the unpacked character translation table - */ - private static char[] yy_unpack_cmap(String packed) { - char[] map = new char[0x10000]; - int i = 0; /* index in packed string */ - int j = 0; /* index in unpacked array */ - while (i < 158) { - int count = packed.charAt(i++); - char value = packed.charAt(i++); - do - map[j++] = value; - while (--count > 0); - } - return map; - } + /** + * Unpacks the compressed character translation table. + * + * @param packed the packed character translation table + * @return the unpacked character translation table + */ + private static char [] yy_unpack_cmap(String packed) { + char [] map = new char[0x10000]; + int i = 0; /* index in packed string */ + int j = 0; /* index in unpacked array */ + while (i < 160) { + int count = packed.charAt(i++); + char value = packed.charAt(i++); + do map[j++] = value; while (--count > 0); + } + return map; + } - /** - * Gets the next input character. - * - * @return the next character of the input stream, EOF if the end of the - * stream is reached. - * @exception IOException - * if any I/O-Error occurs - */ - private int yy_advance() throws java.io.IOException { + /** + * Gets the next input character. + * + * @return the next character of the input stream, EOF if the + * end of the stream is reached. + * @exception IOException if any I/O-Error occurs + */ + private int yy_advance() throws java.io.IOException { - /* standard case */ - if (yy_currentPos < yy_endRead) - return yy_buffer[yy_currentPos++]; + /* standard case */ + if (yy_currentPos < yy_endRead) return yy_buffer[yy_currentPos++]; - /* if the eof is reached, we don't need to work hard */ - if (yy_atEOF) - return YYEOF; + /* if the eof is reached, we don't need to work hard */ + if (yy_atEOF) return YYEOF; - /* otherwise: need to refill the buffer */ + /* otherwise: need to refill the buffer */ - /* first: make room (if you can) */ - if (yy_startRead > 0) { - System.arraycopy(yy_buffer, yy_startRead, yy_buffer, 0, yy_endRead - yy_startRead); + /* first: make room (if you can) */ + if (yy_startRead > 0) { + System.arraycopy(yy_buffer, yy_startRead, + yy_buffer, 0, + yy_endRead-yy_startRead); - /* translate stored positions */ - yy_endRead -= yy_startRead; - yy_currentPos -= yy_startRead; - yy_markedPos -= yy_startRead; - yy_pushbackPos -= yy_startRead; - yy_startRead = 0; - } + /* translate stored positions */ + yy_endRead-= yy_startRead; + yy_currentPos-= yy_startRead; + yy_markedPos-= yy_startRead; + yy_pushbackPos-= yy_startRead; + yy_startRead = 0; + } - /* is the buffer big enough? */ - if (yy_currentPos >= yy_buffer.length) { - /* if not: blow it up */ - char newBuffer[] = new char[yy_currentPos * 2]; - System.arraycopy(yy_buffer, 0, newBuffer, 0, yy_buffer.length); - yy_buffer = newBuffer; - } + /* is the buffer big enough? */ + if (yy_currentPos >= yy_buffer.length) { + /* if not: blow it up */ + char newBuffer[] = new char[yy_currentPos*2]; + System.arraycopy(yy_buffer, 0, newBuffer, 0, yy_buffer.length); + yy_buffer = newBuffer; + } - /* finally: fill the buffer with new input */ - int numRead = yy_reader.read(yy_buffer, yy_endRead, yy_buffer.length - yy_endRead); + /* finally: fill the buffer with new input */ + int numRead = yy_reader.read(yy_buffer, yy_endRead, + yy_buffer.length-yy_endRead); - if (numRead == -1) - return YYEOF; + if ( numRead == -1 ) return YYEOF; - yy_endRead += numRead; + yy_endRead+= numRead; - return yy_buffer[yy_currentPos++]; - } + return yy_buffer[yy_currentPos++]; + } - /** - * Closes the input stream. - */ - final public void yyclose() throws java.io.IOException { - yy_atEOF = true; /* indicate end of file */ - yy_endRead = yy_startRead; /* invalidate buffer */ - yy_reader.close(); - } + /** + * Closes the input stream. + */ + final public void yyclose() throws java.io.IOException { + yy_atEOF = true; /* indicate end of file */ + yy_endRead = yy_startRead; /* invalidate buffer */ + yy_reader.close(); + } - /** - * Returns the current lexical state. - */ - final public int yystate() { - return yy_lexical_state; - } + /** + * Returns the current lexical state. + */ + final public int yystate() { + return yy_lexical_state; + } - /** - * Enters a new lexical state - * - * @param newState - * the new lexical state - */ - final public void yybegin(int newState) { - yy_lexical_state = newState; - } + /** + * Enters a new lexical state + * + * @param newState the new lexical state + */ + final public void yybegin(int newState) { + yy_lexical_state = newState; + } - /** - * Returns the text matched by the current regular expression. - */ - final public String yytext() { - return new String(yy_buffer, yy_startRead, yy_markedPos - yy_startRead); - } + /** + * Returns the text matched by the current regular expression. + */ + final public String yytext() { + return new String( yy_buffer, yy_startRead, yy_markedPos-yy_startRead ); + } - /** - * Returns the length of the matched text region. - */ - final public int yylength() { - return yy_markedPos - yy_startRead; - } + /** + * Returns the length of the matched text region. + */ + final public int yylength() { + return yy_markedPos-yy_startRead; + } - /** - * Reports an error that occured while scanning. - * - * @param errorCode - * the code of the errormessage to display - */ - private void yy_ScanError(int errorCode) { - try { - System.out.println(YY_ERROR_MSG[errorCode]); - } - catch (ArrayIndexOutOfBoundsException e) { - System.out.println(YY_ERROR_MSG[YY_UNKNOWN_ERROR]); - } + /** + * Reports an error that occured while scanning. + * + * @param errorCode the code of the errormessage to display + */ + private void yy_ScanError(int errorCode) { + try { + System.out.println(YY_ERROR_MSG[errorCode]); + } + catch (ArrayIndexOutOfBoundsException e) { + System.out.println(YY_ERROR_MSG[YY_UNKNOWN_ERROR]); + } - System.exit(1); - } + } - /** - * Pushes the specified amount of characters back into the input stream. - * - * They will be read again by then next call of the scanning method - * - * @param number - * the number of characters to be read again. This number must - * not be greater than yylength()! - */ - private void yypushback(int number) { - if (number > yylength()) - yy_ScanError(YY_PUSHBACK_2BIG); + /** + * Pushes the specified amount of characters back into the input stream. + * + * They will be read again by then next call of the scanning method + * + * @param number the number of characters to be read again. + * This number must not be greater than yylength()! + */ + private void yypushback(int number) { + if ( number > yylength() ) + yy_ScanError(YY_PUSHBACK_2BIG); - yy_markedPos -= number; - } + yy_markedPos -= number; + } - /** - * Contains user EOF-code, which will be executed exactly once, when the - * end of file is reached - */ - private void yy_do_eof() { - if (!yy_eof_done) { - yy_eof_done = true; - hasMore = false; + /** + * Contains user EOF-code, which will be executed exactly once, + * when the end of file is reached + */ + private void yy_do_eof() { + if (!yy_eof_done) { + yy_eof_done = true; + hasMore=false; - } - } + } + } - /** - * Resumes scanning until the next regular expression is matched, the end - * of input is encountered or an I/O-Error occurs. - * - * @return the next token - * @exception IOException - * if any I/O-Error occurs - */ - public String primGetNextToken() throws java.io.IOException { - int yy_input; - int yy_action; + /** + * Resumes scanning until the next regular expression is matched, + * the end of input is encountered or an I/O-Error occurs. + * + * @return the next token + * @exception IOException if any I/O-Error occurs + */ + public String primGetNextToken() throws java.io.IOException { + int yy_input; + int yy_action; - while (true) { + while (true) { - yychar += yylength(); + yychar+= yylength(); - yy_atBOL = yy_markedPos <= 0 || yy_buffer[yy_markedPos - 1] == '\n'; - if (!yy_atBOL && yy_buffer[yy_markedPos - 1] == '\r') { - yy_atBOL = yy_advance() != '\n'; - if (!yy_atEOF) - yy_currentPos--; - } + yy_atBOL = yy_markedPos <= 0 || yy_buffer[yy_markedPos-1] == '\n'; + if (!yy_atBOL && yy_buffer[yy_markedPos-1] == '\r') { + yy_atBOL = yy_advance() != '\n'; + if (!yy_atEOF) yy_currentPos--; + } - yy_action = -1; + yy_action = -1; - yy_currentPos = yy_startRead = yy_markedPos; + yy_currentPos = yy_startRead = yy_markedPos; - if (yy_atBOL) - yy_state = YY_LEXSTATE[yy_lexical_state + 1]; - else - yy_state = YY_LEXSTATE[yy_lexical_state]; + if (yy_atBOL) + yy_state = YY_LEXSTATE[yy_lexical_state+1]; + else + yy_state = YY_LEXSTATE[yy_lexical_state]; - yy_forAction : { - while (true) { + yy_forAction: { + while (true) { - yy_input = yy_advance(); + yy_input = yy_advance(); - if (yy_input == YYEOF) - break yy_forAction; + if ( yy_input == YYEOF ) break yy_forAction; - yy_input = yycmap[yy_input]; + yy_input = yycmap[yy_input]; - boolean yy_isFinal = false; - boolean yy_noLookAhead = false; + boolean yy_isFinal = false; + boolean yy_noLookAhead = false; - yy_forNext : { - switch (yy_state) { - case 0 : - switch (yy_input) { - case 1 : - yy_isFinal = true; - yy_state = 9; - break yy_forNext; - case 2 : - yy_isFinal = true; - yy_state = 10; - break yy_forNext; - case 3 : - yy_isFinal = true; - yy_state = 11; - break yy_forNext; - default : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 8; - break yy_forNext; - } + yy_forNext: { switch (yy_state) { + case 0: + switch (yy_input) { + case 1: yy_isFinal = true; yy_state = 9; break yy_forNext; + case 2: yy_isFinal = true; yy_state = 10; break yy_forNext; + case 3: yy_isFinal = true; yy_state = 11; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 8; break yy_forNext; + } - case 1 : - switch (yy_input) { - case 1 : - yy_isFinal = true; - yy_state = 9; - break yy_forNext; - case 2 : - yy_isFinal = true; - yy_state = 10; - break yy_forNext; - case 3 : - yy_isFinal = true; - yy_state = 11; - break yy_forNext; - case 6 : - case 8 : - case 9 : - yy_isFinal = true; - yy_state = 12; - break yy_forNext; - case 10 : - yy_isFinal = true; - yy_state = 13; - break yy_forNext; - case 15 : - yy_isFinal = true; - yy_state = 14; - break yy_forNext; - default : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 8; - break yy_forNext; - } + case 1: + switch (yy_input) { + case 1: yy_isFinal = true; yy_state = 9; break yy_forNext; + case 2: yy_isFinal = true; yy_state = 10; break yy_forNext; + case 3: yy_isFinal = true; yy_state = 11; break yy_forNext; + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 12; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 13; break yy_forNext; + case 11: yy_isFinal = true; yy_state = 14; break yy_forNext; + case 16: yy_isFinal = true; yy_state = 15; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 8; break yy_forNext; + } - case 2 : - switch (yy_input) { - case 11 : - yy_isFinal = true; - yy_state = 15; - break yy_forNext; - case 21 : - yy_isFinal = true; - yy_state = 16; - break yy_forNext; - default : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 8; - break yy_forNext; - } + case 2: + switch (yy_input) { + case 9: yy_isFinal = true; yy_state = 16; break yy_forNext; + case 12: yy_isFinal = true; yy_state = 17; break yy_forNext; + case 22: yy_isFinal = true; yy_state = 18; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 8; break yy_forNext; + } - case 3 : - switch (yy_input) { - case 6 : - case 8 : - case 9 : - yy_isFinal = true; - yy_state = 17; - break yy_forNext; - case 29 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 18; - break yy_forNext; - default : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 8; - break yy_forNext; - } + case 3: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 19; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 20; break yy_forNext; + case 30: yy_isFinal = true; yy_state = 21; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 8; break yy_forNext; + } - case 4 : - switch (yy_input) { - case 6 : - case 8 : - yy_isFinal = true; - yy_state = 20; - break yy_forNext; - case 9 : - yy_isFinal = true; - yy_state = 21; - break yy_forNext; - case 30 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 22; - break yy_forNext; - case 31 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 23; - break yy_forNext; - default : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 19; - break yy_forNext; - } + case 4: + switch (yy_input) { + case 6: + case 7: yy_isFinal = true; yy_state = 23; break yy_forNext; + case 8: yy_isFinal = true; yy_state = 24; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 25; break yy_forNext; + case 31: yy_isFinal = true; yy_state = 26; break yy_forNext; + case 32: yy_isFinal = true; yy_state = 27; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 22; break yy_forNext; + } - case 5 : - switch (yy_input) { - case 8 : - case 9 : - case 10 : - case 28 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 25; - break yy_forNext; - case 11 : - case 32 : - yy_isFinal = true; - yy_state = 26; - break yy_forNext; - case 29 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 27; - break yy_forNext; - case 30 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 28; - break yy_forNext; - default : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 24; - break yy_forNext; - } + case 5: + switch (yy_input) { + case 7: + case 8: + case 11: + case 29: yy_isFinal = true; yy_state = 29; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 30; break yy_forNext; + case 12: + case 33: yy_isFinal = true; yy_state = 31; break yy_forNext; + case 30: yy_isFinal = true; yy_state = 32; break yy_forNext; + case 31: yy_isFinal = true; yy_state = 33; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 28; break yy_forNext; + } - case 6 : - switch (yy_input) { - case 8 : - case 9 : - case 10 : - case 28 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 25; - break yy_forNext; - case 32 : - yy_isFinal = true; - yy_state = 26; - break yy_forNext; - case 29 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 27; - break yy_forNext; - case 31 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 28; - break yy_forNext; - case 33 : - yy_isFinal = true; - yy_state = 29; - break yy_forNext; - default : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 24; - break yy_forNext; - } + case 6: + switch (yy_input) { + case 7: + case 8: + case 11: + case 29: yy_isFinal = true; yy_state = 29; break yy_forNext; + case 33: yy_isFinal = true; yy_state = 31; break yy_forNext; + case 30: yy_isFinal = true; yy_state = 32; break yy_forNext; + case 32: yy_isFinal = true; yy_state = 33; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 34; break yy_forNext; + case 34: yy_isFinal = true; yy_state = 35; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 28; break yy_forNext; + } + + case 7: + switch (yy_input) { + case 11: + case 29: yy_isFinal = true; yy_state = 29; break yy_forNext; + case 33: yy_isFinal = true; yy_state = 31; break yy_forNext; + case 12: yy_isFinal = true; yy_state = 35; break yy_forNext; + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 36; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 37; break yy_forNext; + case 30: yy_isFinal = true; yy_state = 38; break yy_forNext; + case 31: + case 32: yy_isFinal = true; yy_state = 39; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 28; break yy_forNext; + } + + case 9: + switch (yy_input) { + case 2: yy_isFinal = true; yy_noLookAhead = true; yy_state = 40; break yy_forNext; + default: break yy_forAction; + } + + case 10: + switch (yy_input) { + case 1: yy_isFinal = true; yy_noLookAhead = true; yy_state = 41; break yy_forNext; + default: break yy_forAction; + } + + case 11: + switch (yy_input) { + case 4: yy_state = 42; break yy_forNext; + default: break yy_forAction; + } + + case 12: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 43; break yy_forNext; + case 9: yy_state = 44; break yy_forNext; + case 11: yy_state = 45; break yy_forNext; + case 16: yy_state = 46; break yy_forNext; + default: break yy_forAction; + } + + case 13: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 43; break yy_forNext; + case 11: yy_state = 45; break yy_forNext; + case 16: yy_state = 46; break yy_forNext; + case 9: yy_state = 47; break yy_forNext; + default: break yy_forAction; + } + + case 14: + switch (yy_input) { + case 9: yy_state = 48; break yy_forNext; + case 12: yy_state = 49; break yy_forNext; + default: break yy_forAction; + } + + case 15: + switch (yy_input) { + case 9: yy_state = 50; break yy_forNext; + case 17: yy_state = 51; break yy_forNext; + default: break yy_forAction; + } + + case 16: + switch (yy_input) { + case 12: yy_state = 52; break yy_forNext; + case 22: yy_state = 53; break yy_forNext; + default: break yy_forAction; + } + + case 17: + switch (yy_input) { + case 9: yy_state = 54; break yy_forNext; + case 29: yy_isFinal = true; yy_state = 55; break yy_forNext; + default: break yy_forAction; + } + + case 18: + switch (yy_input) { + case 9: yy_state = 56; break yy_forNext; + case 24: yy_state = 57; break yy_forNext; + default: break yy_forAction; + } + + case 19: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 19; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 58; break yy_forNext; + default: break yy_forAction; + } + + case 20: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 19; break yy_forNext; + case 30: yy_isFinal = true; yy_state = 21; break yy_forNext; + default: break yy_forAction; + } + + case 21: + switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 59; break yy_forNext; + default: break yy_forAction; + } + + case 23: + switch (yy_input) { + case 6: + case 7: yy_isFinal = true; yy_state = 23; break yy_forNext; + case 8: yy_state = 60; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 61; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 22; break yy_forNext; + } + + case 24: + switch (yy_input) { + case 6: + case 7: yy_isFinal = true; yy_state = 23; break yy_forNext; + case 8: yy_state = 60; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 61; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 22; break yy_forNext; + } + + case 25: + switch (yy_input) { + case 31: yy_isFinal = true; yy_state = 26; break yy_forNext; + case 32: yy_isFinal = true; yy_state = 27; break yy_forNext; + case 6: + case 7: + case 8: yy_state = 60; break yy_forNext; + default: break yy_forAction; + } + + case 26: + switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 62; break yy_forNext; + default: break yy_forAction; + } + + case 27: + switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 63; break yy_forNext; + default: break yy_forAction; + } + + case 29: + switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 64; break yy_forNext; + default: break yy_forAction; + } + + case 30: + switch (yy_input) { + case 7: + case 8: + case 11: + case 29: yy_isFinal = true; yy_state = 29; break yy_forNext; + case 30: yy_isFinal = true; yy_state = 32; break yy_forNext; + case 31: yy_isFinal = true; yy_state = 33; break yy_forNext; + case 12: + case 33: yy_state = 65; break yy_forNext; + default: break yy_forAction; + } + + case 31: + switch (yy_input) { + case 29: yy_isFinal = true; yy_state = 32; break yy_forNext; + case 9: yy_state = 66; break yy_forNext; + default: break yy_forAction; + } + + case 32: + switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 67; break yy_forNext; + default: break yy_forAction; + } + + case 33: + switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 68; break yy_forNext; + default: break yy_forAction; + } + + case 34: + switch (yy_input) { + case 7: + case 8: + case 11: + case 29: yy_isFinal = true; yy_state = 29; break yy_forNext; + case 30: yy_isFinal = true; yy_state = 32; break yy_forNext; + case 32: yy_isFinal = true; yy_state = 33; break yy_forNext; + case 33: yy_state = 65; break yy_forNext; + case 34: yy_state = 69; break yy_forNext; + default: break yy_forAction; + } + + case 35: + switch (yy_input) { + case 29: yy_isFinal = true; yy_state = 29; break yy_forNext; + case 9: yy_state = 70; break yy_forNext; + default: break yy_forAction; + } + + case 36: + switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 71; break yy_forNext; + default: break yy_forAction; + } + + case 37: + switch (yy_input) { + case 11: + case 29: yy_isFinal = true; yy_state = 29; break yy_forNext; + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 36; break yy_forNext; + case 30: yy_isFinal = true; yy_state = 38; break yy_forNext; + case 31: + case 32: yy_isFinal = true; yy_state = 39; break yy_forNext; + case 33: yy_state = 65; break yy_forNext; + case 12: yy_state = 69; break yy_forNext; + default: break yy_forAction; + } + + case 38: + switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 72; break yy_forNext; + default: break yy_forAction; + } + + case 39: + switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 73; break yy_forNext; + default: break yy_forAction; + } + + case 42: + switch (yy_input) { + case 5: yy_isFinal = true; yy_noLookAhead = true; yy_state = 74; break yy_forNext; + default: break yy_forAction; + } + + case 43: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 43; break yy_forNext; + case 9: yy_state = 44; break yy_forNext; + case 11: yy_state = 45; break yy_forNext; + case 16: yy_state = 46; break yy_forNext; + default: break yy_forAction; + } + + case 44: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 43; break yy_forNext; + case 11: yy_state = 45; break yy_forNext; + case 16: yy_state = 46; break yy_forNext; + case 9: yy_state = 47; break yy_forNext; + default: break yy_forAction; + } + + case 45: + switch (yy_input) { + case 9: yy_state = 48; break yy_forNext; + case 12: yy_state = 49; break yy_forNext; + default: break yy_forAction; + } + + case 46: + switch (yy_input) { + case 9: yy_state = 50; break yy_forNext; + case 17: yy_state = 51; break yy_forNext; + default: break yy_forAction; + } + + case 47: + switch (yy_input) { + case 11: yy_state = 45; break yy_forNext; + case 16: yy_state = 46; break yy_forNext; + default: break yy_forAction; + } + + case 48: + switch (yy_input) { + case 12: yy_state = 49; break yy_forNext; + default: break yy_forAction; + } + + case 49: + switch (yy_input) { + case 9: yy_state = 75; break yy_forNext; + case 13: yy_state = 76; break yy_forNext; + default: break yy_forAction; + } + + case 50: + switch (yy_input) { + case 17: yy_state = 51; break yy_forNext; + default: break yy_forAction; + } + + case 51: + switch (yy_input) { + case 9: yy_state = 77; break yy_forNext; + case 18: yy_state = 78; break yy_forNext; + default: break yy_forAction; + } + + case 52: + switch (yy_input) { + case 9: yy_state = 54; break yy_forNext; + case 29: yy_isFinal = true; yy_state = 55; break yy_forNext; + default: break yy_forAction; + } + + case 53: + switch (yy_input) { + case 9: yy_state = 56; break yy_forNext; + case 24: yy_state = 57; break yy_forNext; + default: break yy_forAction; + } + + case 54: + switch (yy_input) { + case 29: yy_isFinal = true; yy_state = 55; break yy_forNext; + default: break yy_forAction; + } + + case 55: + switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 79; break yy_forNext; + default: break yy_forAction; + } + + case 56: + switch (yy_input) { + case 24: yy_state = 57; break yy_forNext; + default: break yy_forAction; + } + + case 57: + switch (yy_input) { + case 9: yy_state = 80; break yy_forNext; + case 17: yy_state = 81; break yy_forNext; + default: break yy_forAction; + } + + case 58: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 19; break yy_forNext; + case 9: yy_state = 82; break yy_forNext; + default: break yy_forAction; + } + + case 60: + switch (yy_input) { + case 6: + case 7: yy_isFinal = true; yy_state = 23; break yy_forNext; + case 8: yy_state = 60; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 61; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 22; break yy_forNext; + } + + case 61: + switch (yy_input) { + case 6: + case 7: yy_isFinal = true; yy_state = 23; break yy_forNext; + case 8: yy_state = 60; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 83; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 22; break yy_forNext; + } + + case 65: + switch (yy_input) { + case 29: yy_isFinal = true; yy_state = 32; break yy_forNext; + case 9: yy_state = 66; break yy_forNext; + default: break yy_forAction; + } + + case 66: + switch (yy_input) { + case 29: yy_isFinal = true; yy_state = 32; break yy_forNext; + default: break yy_forAction; + } + + case 69: + switch (yy_input) { + case 29: yy_isFinal = true; yy_state = 29; break yy_forNext; + case 9: yy_state = 70; break yy_forNext; + default: break yy_forAction; + } + + case 70: + switch (yy_input) { + case 29: yy_isFinal = true; yy_state = 29; break yy_forNext; + default: break yy_forAction; + } + + case 75: + switch (yy_input) { + case 13: yy_state = 76; break yy_forNext; + default: break yy_forAction; + } + + case 76: + switch (yy_input) { + case 9: yy_state = 84; break yy_forNext; + case 14: yy_state = 85; break yy_forNext; + default: break yy_forAction; + } + + case 77: + switch (yy_input) { + case 18: yy_state = 78; break yy_forNext; + default: break yy_forAction; + } - case 7 : - switch (yy_input) { - case 10 : - case 28 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 25; - break yy_forNext; - case 32 : - yy_isFinal = true; - yy_state = 26; - break yy_forNext; - case 11 : - yy_isFinal = true; - yy_state = 29; - break yy_forNext; - case 6 : - case 8 : - case 9 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 30; - break yy_forNext; - case 29 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 31; - break yy_forNext; - case 30 : - case 31 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 32; - break yy_forNext; - default : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 24; - break yy_forNext; - } + case 78: + switch (yy_input) { + case 9: yy_state = 86; break yy_forNext; + case 19: yy_state = 87; break yy_forNext; + default: break yy_forAction; + } - case 9 : - switch (yy_input) { - case 2 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 33; - break yy_forNext; - default : - break yy_forAction; - } + case 80: + switch (yy_input) { + case 17: yy_state = 81; break yy_forNext; + default: break yy_forAction; + } - case 10 : - switch (yy_input) { - case 1 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 34; - break yy_forNext; - default : - break yy_forAction; - } + case 81: + switch (yy_input) { + case 9: yy_state = 88; break yy_forNext; + case 25: yy_state = 89; break yy_forNext; + default: break yy_forAction; + } - case 11 : - switch (yy_input) { - case 4 : - yy_state = 35; - break yy_forNext; - default : - break yy_forAction; - } + case 82: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 19; break yy_forNext; + default: break yy_forAction; + } - case 12 : - switch (yy_input) { - case 6 : - case 8 : - case 9 : - yy_state = 36; - break yy_forNext; - case 10 : - yy_state = 37; - break yy_forNext; - case 15 : - yy_state = 38; - break yy_forNext; - default : - break yy_forAction; - } + case 83: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 60; break yy_forNext; + default: break yy_forAction; + } - case 13 : - switch (yy_input) { - case 11 : - yy_state = 39; - break yy_forNext; - default : - break yy_forAction; - } + case 84: + switch (yy_input) { + case 14: yy_state = 85; break yy_forNext; + default: break yy_forAction; + } - case 14 : - switch (yy_input) { - case 16 : - yy_state = 40; - break yy_forNext; - default : - break yy_forAction; - } + case 85: + switch (yy_input) { + case 9: yy_state = 90; break yy_forNext; + case 15: yy_state = 91; break yy_forNext; + default: break yy_forAction; + } - case 15 : - switch (yy_input) { - case 28 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 41; - break yy_forNext; - default : - break yy_forAction; - } + case 86: + switch (yy_input) { + case 19: yy_state = 87; break yy_forNext; + default: break yy_forAction; + } - case 16 : - switch (yy_input) { - case 23 : - yy_state = 42; - break yy_forNext; - default : - break yy_forAction; - } + case 87: + switch (yy_input) { + case 9: yy_state = 92; break yy_forNext; + case 20: yy_state = 93; break yy_forNext; + default: break yy_forAction; + } - case 17 : - switch (yy_input) { - case 6 : - case 8 : - case 9 : - yy_isFinal = true; - yy_state = 17; - break yy_forNext; - default : - break yy_forAction; - } + case 88: + switch (yy_input) { + case 25: yy_state = 89; break yy_forNext; + default: break yy_forAction; + } - case 20 : - switch (yy_input) { - case 6 : - case 8 : - yy_isFinal = true; - yy_state = 20; - break yy_forNext; - case 9 : - yy_state = 43; - break yy_forNext; - default : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 19; - break yy_forNext; - } + case 89: + switch (yy_input) { + case 9: yy_state = 94; break yy_forNext; + case 26: yy_state = 95; break yy_forNext; + default: break yy_forAction; + } - case 21 : - switch (yy_input) { - case 6 : - case 8 : - yy_isFinal = true; - yy_state = 20; - break yy_forNext; - case 9 : - yy_state = 43; - break yy_forNext; - default : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 19; - break yy_forNext; - } + case 90: + switch (yy_input) { + case 15: yy_state = 91; break yy_forNext; + default: break yy_forAction; + } - case 26 : - switch (yy_input) { - case 28 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 44; - break yy_forNext; - default : - break yy_forAction; - } + case 91: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 96; break yy_forNext; + case 9: yy_state = 97; break yy_forNext; + default: break yy_forAction; + } - case 29 : - switch (yy_input) { - case 28 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 45; - break yy_forNext; - default : - break yy_forAction; - } + case 92: + switch (yy_input) { + case 20: yy_state = 93; break yy_forNext; + default: break yy_forAction; + } - case 35 : - switch (yy_input) { - case 5 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 46; - break yy_forNext; - default : - break yy_forAction; - } + case 93: + switch (yy_input) { + case 9: yy_state = 98; break yy_forNext; + case 21: yy_state = 99; break yy_forNext; + default: break yy_forAction; + } - case 36 : - switch (yy_input) { - case 6 : - case 8 : - case 9 : - yy_state = 36; - break yy_forNext; - case 10 : - yy_state = 37; - break yy_forNext; - case 15 : - yy_state = 38; - break yy_forNext; - default : - break yy_forAction; - } + case 94: + switch (yy_input) { + case 26: yy_state = 95; break yy_forNext; + default: break yy_forAction; + } - case 37 : - switch (yy_input) { - case 11 : - yy_state = 39; - break yy_forNext; - default : - break yy_forAction; - } + case 95: + switch (yy_input) { + case 9: yy_state = 100; break yy_forNext; + case 27: yy_state = 101; break yy_forNext; + default: break yy_forAction; + } - case 38 : - switch (yy_input) { - case 16 : - yy_state = 40; - break yy_forNext; - default : - break yy_forAction; - } + case 96: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 96; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 102; break yy_forNext; + default: break yy_forAction; + } - case 39 : - switch (yy_input) { - case 12 : - yy_state = 47; - break yy_forNext; - default : - break yy_forAction; - } + case 97: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 96; break yy_forNext; + case 9: yy_state = 103; break yy_forNext; + default: break yy_forAction; + } - case 40 : - switch (yy_input) { - case 17 : - yy_state = 48; - break yy_forNext; - default : - break yy_forAction; - } + case 98: + switch (yy_input) { + case 21: yy_state = 99; break yy_forNext; + default: break yy_forAction; + } - case 42 : - switch (yy_input) { - case 16 : - yy_state = 49; - break yy_forNext; - default : - break yy_forAction; - } + case 99: + switch (yy_input) { + case 9: yy_state = 104; break yy_forNext; + case 22: yy_state = 105; break yy_forNext; + default: break yy_forAction; + } - case 43 : - switch (yy_input) { - case 6 : - case 8 : - yy_isFinal = true; - yy_state = 20; - break yy_forNext; - case 9 : - yy_state = 43; - break yy_forNext; - default : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 19; - break yy_forNext; - } + case 100: + switch (yy_input) { + case 27: yy_state = 101; break yy_forNext; + default: break yy_forAction; + } - case 47 : - switch (yy_input) { - case 13 : - yy_state = 50; - break yy_forNext; - default : - break yy_forAction; - } + case 101: + switch (yy_input) { + case 9: yy_state = 106; break yy_forNext; + case 24: yy_state = 107; break yy_forNext; + default: break yy_forAction; + } - case 48 : - switch (yy_input) { - case 18 : - yy_state = 51; - break yy_forNext; - default : - break yy_forAction; - } + case 102: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 96; break yy_forNext; + case 9: yy_state = 103; break yy_forNext; + default: break yy_forAction; + } - case 49 : - switch (yy_input) { - case 24 : - yy_state = 52; - break yy_forNext; - default : - break yy_forAction; - } + case 103: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 96; break yy_forNext; + default: break yy_forAction; + } - case 50 : - switch (yy_input) { - case 14 : - yy_state = 53; - break yy_forNext; - default : - break yy_forAction; - } + case 104: + switch (yy_input) { + case 22: yy_state = 105; break yy_forNext; + default: break yy_forAction; + } - case 51 : - switch (yy_input) { - case 19 : - yy_state = 54; - break yy_forNext; - default : - break yy_forAction; - } + case 105: + switch (yy_input) { + case 9: yy_state = 108; break yy_forNext; + case 23: yy_isFinal = true; yy_state = 109; break yy_forNext; + default: break yy_forAction; + } - case 52 : - switch (yy_input) { - case 25 : - yy_state = 55; - break yy_forNext; - default : - break yy_forAction; - } + case 106: + switch (yy_input) { + case 24: yy_state = 107; break yy_forNext; + default: break yy_forAction; + } - case 53 : - switch (yy_input) { - case 6 : - case 8 : - case 9 : - yy_isFinal = true; - yy_state = 56; - break yy_forNext; - default : - break yy_forAction; - } + case 107: + switch (yy_input) { + case 9: yy_state = 110; break yy_forNext; + case 28: yy_state = 111; break yy_forNext; + default: break yy_forAction; + } - case 54 : - switch (yy_input) { - case 20 : - yy_state = 57; - break yy_forNext; - default : - break yy_forAction; - } + case 108: + switch (yy_input) { + case 23: yy_isFinal = true; yy_state = 109; break yy_forNext; + default: break yy_forAction; + } - case 55 : - switch (yy_input) { - case 26 : - yy_state = 58; - break yy_forNext; - default : - break yy_forAction; - } + case 109: + switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 112; break yy_forNext; + default: break yy_forAction; + } - case 56 : - switch (yy_input) { - case 6 : - case 8 : - case 9 : - yy_isFinal = true; - yy_state = 56; - break yy_forNext; - default : - break yy_forAction; - } + case 110: + switch (yy_input) { + case 28: yy_state = 111; break yy_forNext; + default: break yy_forAction; + } - case 57 : - switch (yy_input) { - case 21 : - yy_state = 59; - break yy_forNext; - default : - break yy_forAction; - } + case 111: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 111; break yy_forNext; + case 9: yy_state = 113; break yy_forNext; + case 10: yy_isFinal = true; yy_state = 114; break yy_forNext; + default: break yy_forAction; + } - case 58 : - switch (yy_input) { - case 23 : - yy_state = 60; - break yy_forNext; - default : - break yy_forAction; - } + case 113: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 111; break yy_forNext; + case 10: yy_isFinal = true; yy_state = 114; break yy_forNext; + case 9: yy_state = 115; break yy_forNext; + default: break yy_forAction; + } - case 59 : - switch (yy_input) { - case 22 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 61; - break yy_forNext; - default : - break yy_forAction; - } + case 114: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 116; break yy_forNext; + case 9: yy_state = 117; break yy_forNext; + default: break yy_forAction; + } - case 60 : - switch (yy_input) { - case 27 : - yy_state = 62; - break yy_forNext; - default : - break yy_forAction; - } + case 115: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 111; break yy_forNext; + default: break yy_forAction; + } - case 62 : - switch (yy_input) { - case 6 : - case 8 : - case 9 : - yy_state = 62; - break yy_forNext; - case 7 : - yy_isFinal = true; - yy_state = 63; - break yy_forNext; - default : - break yy_forAction; - } + case 116: + switch (yy_input) { + case 9: yy_isFinal = true; yy_state = 114; break yy_forNext; + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 116; break yy_forNext; + default: break yy_forAction; + } - case 63 : - switch (yy_input) { - case 6 : - case 8 : - case 9 : - yy_isFinal = true; - yy_state = 63; - break yy_forNext; - default : - break yy_forAction; - } + case 117: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 116; break yy_forNext; + default: break yy_forAction; + } - default : - yy_ScanError(YY_ILLEGAL_STATE); - break; - } - } + default: + yy_ScanError(YY_ILLEGAL_STATE); + break; + } } - if (yy_isFinal) { - yy_action = yy_state; - yy_markedPos = yy_currentPos; - if (yy_noLookAhead) - break yy_forAction; - } + if ( yy_isFinal ) { + yy_action = yy_state; + yy_markedPos = yy_currentPos; + if ( yy_noLookAhead ) break yy_forAction; + } - } - } + } + } - switch (yy_action) { + switch (yy_action) { - case 45 : { - yypushback(2); - popState(); - valueText = string.toString(); - return EncodingParserConstants.InvalidTerminatedStringValue; - } - case 65 : - break; - case 25 : { - yypushback(1); - popState(); - valueText = string.toString(); - return EncodingParserConstants.InvalidTerminatedStringValue; - } - case 66 : - break; - case 19 : - case 20 : { - yypushback(1); - yybegin(UnDelimitedString); - string.setLength(0); - } - case 67 : - break; - case 18 : { - yybegin(YYINITIAL); - hasMore = false; - return CSSHeadTokenizerConstants.RuleEnd; - } - case 68 : - break; - case 32 : { - yypushback(1); - popState(); - valueText = string.toString(); - return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue; - } - case 69 : - break; - case 44 : { - yypushback(2); - popState(); - valueText = string.toString(); - return EncodingParserConstants.InvalidTerminatedStringValue; - } - case 70 : - break; - case 61 : { - if (yychar == 0) { - yybegin(CHARSET_RULE); - return CSSHeadTokenizerConstants.CHARSET_RULE; - } - } - case 71 : - break; - case 56 : { - if (yychar == 0) { - yybegin(ST_XMLDecl); - return XMLHeadTokenizerConstants.XMLDeclStart; - } - } - case 72 : - break; - case 8 : - case 9 : - case 10 : - case 11 : - case 12 : - case 13 : - case 14 : - case 15 : - case 16 : - case 21 : { - if (yychar > MAX_TO_SCAN) { - hasMore = false; - return EncodingParserConstants.MAX_CHARS_REACHED; - } - } - case 73 : - break; - case 41 : { - yybegin(YYINITIAL); - return XMLHeadTokenizerConstants.XMLDeclEnd; - } - case 74 : - break; - case 63 : { - pushCurrentState(); - yybegin(QuotedAttributeValue); - return XMLHeadTokenizerConstants.XMLDelEncoding; - } - case 75 : - break; - case 3 : - case 17 : { - pushCurrentState(); - yybegin(QuotedAttributeValue); - } - case 76 : - break; - case 46 : { - hasMore = false; - return EncodingParserConstants.UTF83ByteBOM; - } - case 77 : - break; - case 33 : { - hasMore = false; - return EncodingParserConstants.UTF16BE; - } - case 78 : - break; - case 34 : { - hasMore = false; - return EncodingParserConstants.UTF16LE; - } - case 79 : - break; - case 24 : - case 26 : - case 29 : { - string.append(yytext()); - } - case 80 : - break; - case 23 : { - yybegin(SQ_STRING); - string.setLength(0); - } - case 81 : - break; - case 22 : { - yybegin(DQ_STRING); - string.setLength(0); - } - case 82 : - break; - case 27 : { - yypushback(1); - popState(); - valueText = string.toString(); - return EncodingParserConstants.InvalidTerminatedStringValue; - } - case 83 : - break; - case 28 : { - popState(); - valueText = string.toString(); - return EncodingParserConstants.StringValue; - } - case 84 : - break; - case 30 : { - yypushback(1); - popState(); - valueText = string.toString(); - return EncodingParserConstants.UnDelimitedStringValue; - } - case 85 : - break; - case 31 : { - yypushback(1); - popState(); - valueText = string.toString(); - return EncodingParserConstants.UnDelimitedStringValue; - } - case 86 : - break; - default : - if (yy_input == YYEOF && yy_startRead == yy_currentPos) { - yy_atEOF = true; - yy_do_eof(); - { - hasMore = false; - return EncodingParserConstants.EOF; - } - } - else { - yy_ScanError(YY_NO_MATCH); - } - } - } - } + case 29: + case 64: + { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue; } + case 119: break; + case 22: + case 23: + case 25: + case 61: + case 83: + { yypushback(yylength()); yybegin(UnDelimitedString); string.setLength(0); } + case 120: break; + case 21: + case 59: + { yybegin(YYINITIAL); hasMore = false; return CSSHeadTokenizerConstants.RuleEnd; } + case 121: break; + case 39: + case 73: + { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue; } + case 122: break; + case 109: + case 112: + { if (yychar == 0 ) {yybegin(CHARSET_RULE); return CSSHeadTokenizerConstants.CHARSET_RULE;} } + case 123: break; + case 96: + case 102: + { if (yychar == 0 ) {yybegin(ST_XMLDecl); return XMLHeadTokenizerConstants.XMLDeclStart;} } + case 124: break; + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 20: + case 24: + case 30: + case 34: + case 37: + { if(yychar > MAX_TO_SCAN) {hasMore=false; return EncodingParserConstants.MAX_CHARS_REACHED;} } + case 125: break; + case 55: + case 79: + { yybegin(YYINITIAL); return XMLHeadTokenizerConstants.XMLDeclEnd; } + case 126: break; + case 114: + case 116: + { pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDelEncoding; } + case 127: break; + case 3: + case 19: + case 58: + { pushCurrentState(); yybegin(QuotedAttributeValue); } + case 128: break; + case 40: + { hasMore = false; return EncodingParserConstants.UTF16BE; } + case 129: break; + case 41: + { hasMore = false; return EncodingParserConstants.UTF16LE; } + case 130: break; + case 74: + { hasMore = false; return EncodingParserConstants.UTF83ByteBOM; } + case 131: break; + case 28: + case 31: + case 35: + { string.append( yytext() ); } + case 132: break; + case 27: + case 63: + { yybegin(SQ_STRING); string.setLength(0); } + case 133: break; + case 26: + case 62: + { yybegin(DQ_STRING); string.setLength(0); } + case 134: break; + case 32: + case 67: + { yypushback(yylength()); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue; } + case 135: break; + case 33: + case 68: + { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue; } + case 136: break; + case 36: + case 71: + { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.UnDelimitedStringValue; } + case 137: break; + case 38: + case 72: + { yypushback(yylength()); popState(); valueText = string.toString(); return EncodingParserConstants.UnDelimitedStringValue; } + case 138: break; + default: + if (yy_input == YYEOF && yy_startRead == yy_currentPos) { + yy_atEOF = true; + yy_do_eof(); + { hasMore = false; return EncodingParserConstants.EOF; } + } + else { + yy_ScanError(YY_NO_MATCH); + } + } + } + } - /** - * Runs the scanner on input files. - * - * This main method is the debugging routine for the scanner. It prints - * each returned token to System.out until the end of file is reached, or - * an error occured. - * - * @param argv - * the command line, contains the filenames to run the scanner - * on. - */ - public static void main(String argv[]) { - for (int i = 0; i < argv.length; i++) { - CSSHeadTokenizer scanner = null; - try { - scanner = new CSSHeadTokenizer(new java.io.FileReader(argv[i])); - } - catch (java.io.FileNotFoundException e) { - System.out.println("File not found : \"" + argv[i] + "\""); - System.exit(1); - } - catch (ArrayIndexOutOfBoundsException e) { - System.out.println("Usage : java CSSHeadTokenizer <inputfile>"); - System.exit(1); - } + /** + * Runs the scanner on input files. + * + * This main method is the debugging routine for the scanner. + * It prints each returned token to System.out until the end of + * file is reached, or an error occured. + * + * @param argv the command line, contains the filenames to run + * the scanner on. + */ + public static void main(String argv[]) { + for (int i = 0; i < argv.length; i++) { + CSSHeadTokenizer scanner = null; + try { + scanner = new CSSHeadTokenizer( new java.io.FileReader(argv[i]) ); + } + catch (java.io.FileNotFoundException e) { + System.out.println("File not found : \""+argv[i]+"\""); + System.exit(1); + } + catch (java.io.IOException e) { + System.out.println("Error opening file \""+argv[i]+"\""); + System.exit(1); + } + catch (ArrayIndexOutOfBoundsException e) { + System.out.println("Usage : java CSSHeadTokenizer <inputfile>"); + System.exit(1); + } - try { - do { - System.out.println(scanner.primGetNextToken()); - } - while (!scanner.yy_atEOF); + try { + do { + System.out.println(scanner.primGetNextToken()); + } while (!scanner.yy_atEOF); - } - catch (java.io.IOException e) { - System.out.println("An I/O error occured while scanning :"); - System.out.println(e); - System.exit(1); - } - catch (Exception e) { - e.printStackTrace(); - System.exit(1); - } - } - } + } + catch (java.io.IOException e) { + System.out.println("An I/O error occured while scanning :"); + System.out.println(e); + System.exit(1); + } + catch (Exception e) { + e.printStackTrace(); + System.exit(1); + } + } + } }
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/CSSResourceEncodingDetector.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/CSSResourceEncodingDetector.java index 1562f6f..16f5fbd 100644 --- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/CSSResourceEncodingDetector.java +++ b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/CSSResourceEncodingDetector.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2005 IBM Corporation and others. + * Copyright (c) 2004, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -21,6 +21,7 @@ import org.eclipse.core.resources.IStorage; import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.content.IContentDescription; import org.eclipse.wst.sse.core.internal.encoding.CodedIO; import org.eclipse.wst.sse.core.internal.encoding.EncodingMemento; import org.eclipse.wst.sse.core.internal.encoding.IResourceCharsetDetector; @@ -65,15 +66,13 @@ createEncodingMemento(enc, EncodingMemento.DETECTED_STANDARD_UNICODE_BYTES); fEncodingMemento.setUTF83ByteBOMUsed(true); } - else if (tokenType == EncodingParserConstants.UTF16BE) { - canHandleAsUnicodeStream = true; - String enc = "UTF-16BE"; //$NON-NLS-1$ - createEncodingMemento(enc, EncodingMemento.DETECTED_STANDARD_UNICODE_BYTES); - } - else if (tokenType == EncodingParserConstants.UTF16LE) { + else if (tokenType == EncodingParserConstants.UTF16BE || tokenType == EncodingParserConstants.UTF16LE) { canHandleAsUnicodeStream = true; String enc = "UTF-16"; //$NON-NLS-1$ + byte[] bom = (tokenType == EncodingParserConstants.UTF16BE) ? IContentDescription.BOM_UTF_16BE : IContentDescription.BOM_UTF_16LE; createEncodingMemento(enc, EncodingMemento.DETECTED_STANDARD_UNICODE_BYTES); + fEncodingMemento.setUnicodeStream(true); + fEncodingMemento.setUnicodeBOM(bom); } return canHandleAsUnicodeStream; }
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/wizard/NewDTDWizard.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/wizard/NewDTDWizard.java index 06e15a1..ad7a35c 100644 --- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/wizard/NewDTDWizard.java +++ b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/wizard/NewDTDWizard.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2006 IBM Corporation and others. + * Copyright (c) 2005, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -51,6 +51,7 @@ import org.eclipse.wst.dtd.ui.internal.editor.DTDEditorPluginImages; import org.eclipse.wst.sse.core.internal.encoding.CommonEncodingPreferenceNames; import org.eclipse.wst.sse.core.utils.StringUtils; +import org.eclipse.wst.xml.core.internal.XMLCorePlugin; public class NewDTDWizard extends Wizard implements INewWizard { private WizardNewFileCreationPage fNewFilePage; @@ -227,9 +228,8 @@ if (templateString != null) { templateString = applyLineDelimiter(file, templateString); // determine the encoding for the new file - Preferences preference = DTDCorePlugin.getInstance().getPluginPreferences(); - String charSet = preference.getString(CommonEncodingPreferenceNames.OUTPUT_CODESET); - + String charSet = getAppropriateCharset(); + try { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); OutputStreamWriter outputStreamWriter = null; @@ -260,5 +260,18 @@ } return performedOK; } + + /** + * If the DTD preference identifies a charset, use that. If not, revert to the XML + * charset preference + * + * @return charset based on DTD preferences if defined, if not, from the XML preferences + */ + private String getAppropriateCharset() { + String charset = DTDCorePlugin.getInstance().getPluginPreferences().getString(CommonEncodingPreferenceNames.OUTPUT_CODESET); + if(charset == null || charset.trim().equals("")) + charset = XMLCorePlugin.getDefault().getPluginPreferences().getString(CommonEncodingPreferenceNames.OUTPUT_CODESET); + return charset; + } } \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/HTMLHeadTokenizer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/HTMLHeadTokenizer.java index 33e48f2..1dbdf56 100644 --- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/HTMLHeadTokenizer.java +++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/HTMLHeadTokenizer.java
@@ -1,18 +1,17 @@ +/* The following code was generated by JFlex 1.2.2 on 7/28/08 5:19 PM */ + /******************************************************************************* - * Copyright (c) 2004, 2005 IBM Corporation and others. + * Copyright (c) 2004, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ -/* The following code was generated by JFlex 1.2.2 on 1/27/04 6:41 PM */ - -/*nlsXXX*/ +/*nlsXXX*/ package org.eclipse.wst.html.core.internal.contenttype; - import java.io.IOException; import java.io.Reader; @@ -21,100 +20,125 @@ + /** * This class is a scanner generated by * <a href="http://www.informatik.tu-muenchen.de/~kleing/jflex/">JFlex</a> 1.2.2 - * on 1/27/04 6:41 PM from the specification file - * <tt>file:/D:/DevTimeSupport/HeadParsers/HTMLHeadTokenizer/HTMLHeadTokenizer.jflex</tt> + * on 7/28/08 5:19 PM from the specification file + * <tt>file:/D:/workspaces/wtp301/workspace/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/HTMLHeadTokenizer/HTMLHeadTokenizer.jFlex</tt> */ public class HTMLHeadTokenizer { - /** this character denotes the end of file */ - final public static int YYEOF = -1; + /** this character denotes the end of file */ + final public static int YYEOF = -1; - /** lexical states */ - final public static int ST_META_TAG = 4; - final public static int YYINITIAL = 0; - final public static int UnDelimitedString = 12; - final public static int DQ_STRING = 8; - final public static int SQ_STRING = 10; - final public static int ST_XMLDecl = 2; - final public static int QuotedAttributeValue = 6; + /** lexical states */ + final public static int ST_META_TAG = 4; + final public static int YYINITIAL = 0; + final public static int UnDelimitedString = 12; + final public static int DQ_STRING = 8; + final public static int UnDelimitedCharset = 14; + final public static int SQ_STRING = 10; + final public static int ST_XMLDecl = 2; + final public static int QuotedAttributeValue = 6; - /** - * YY_LEXSTATE[l] is the state in the DFA for the lexical state l - * YY_LEXSTATE[l+1] is the state in the DFA for the lexical state l - * at the beginning of a line - * l is of the form l = 2*k, k a non negative integer - */ - private final static int YY_LEXSTATE[] = {0, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7}; + /** + * YY_LEXSTATE[l] is the state in the DFA for the lexical state l + * YY_LEXSTATE[l+1] is the state in the DFA for the lexical state l + * at the beginning of a line + * l is of the form l = 2*k, k a non negative integer + */ + private final static int YY_LEXSTATE[] = { + 0, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8 + }; - /** - * Translates characters to character classes - */ - final private static String yycmap_packed = "\11\0\1\6\1\7\2\0\1\11\22\0\1\22\1\0\1\40\2\0" + "\1\44\1\0\1\43\5\0\1\34\1\0\1\42\13\0\1\45\1\12" + "\1\10\1\31\1\13\1\0\1\21\1\0\1\24\1\26\1\17\1\0" + "\1\30\1\32\1\27\2\0\1\16\1\15\1\23\1\25\1\33\1\35" + "\2\0\1\20\1\36\1\37\1\0\1\14\1\41\7\0\1\21\1\0" + "\1\24\1\26\1\17\1\0\1\30\1\32\1\27\2\0\1\16\1\15" + "\1\23\1\25\1\33\1\35\2\0\1\20\1\36\1\37\1\0\1\14" + "\1\41\101\0\1\4\3\0\1\5\17\0\1\3\16\0\1\1\20\0" + "\1\3\16\0\1\1\1\2\170\0\1\2\ufe87\0"; + /** + * Translates characters to character classes + */ + final private static String yycmap_packed = + "\1\11\10\0\1\6\1\7\2\0\1\10\22\0\1\6\1\0\1\40"+ + "\2\0\1\44\1\0\1\43\5\0\1\34\1\0\1\42\13\0\1\45"+ + "\1\13\1\12\1\31\1\14\1\0\1\22\1\0\1\24\1\26\1\20"+ + "\1\0\1\30\1\32\1\27\2\0\1\17\1\16\1\23\1\25\1\33"+ + "\1\35\2\0\1\21\1\36\1\37\1\0\1\15\1\41\7\0\1\22"+ + "\1\0\1\24\1\26\1\20\1\0\1\30\1\32\1\27\2\0\1\17"+ + "\1\16\1\23\1\25\1\33\1\35\2\0\1\21\1\36\1\37\1\0"+ + "\1\15\1\41\101\0\1\4\3\0\1\5\17\0\1\3\16\0\1\1"+ + "\20\0\1\3\16\0\1\1\1\2\170\0\1\2\ufe87\0"; - /** - * Translates characters to character classes - */ - final private static char[] yycmap = yy_unpack_cmap(yycmap_packed); + /** + * Translates characters to character classes + */ + final private static char [] yycmap = yy_unpack_cmap(yycmap_packed); - /* error codes */ - final private static int YY_UNKNOWN_ERROR = 0; - final private static int YY_ILLEGAL_STATE = 1; - final private static int YY_NO_MATCH = 2; - final private static int YY_PUSHBACK_2BIG = 3; + /* error codes */ + final private static int YY_UNKNOWN_ERROR = 0; + final private static int YY_ILLEGAL_STATE = 1; + final private static int YY_NO_MATCH = 2; + final private static int YY_PUSHBACK_2BIG = 3; - /* error messages for the codes above */ - final private static String YY_ERROR_MSG[] = {"Unkown internal scanner error", "Internal error: unknown state", "Error: could not match input", "Error: pushback value was too large"}; + /* error messages for the codes above */ + final private static String YY_ERROR_MSG[] = { + "Unkown internal scanner error", + "Internal error: unknown state", + "Error: could not match input", + "Error: pushback value was too large" + }; - /** the input device */ - private java.io.Reader yy_reader; + /** the input device */ + private java.io.Reader yy_reader; - /** the current state of the DFA */ - private int yy_state; + /** the current state of the DFA */ + private int yy_state; - /** the current lexical state */ - private int yy_lexical_state = YYINITIAL; + /** the current lexical state */ + private int yy_lexical_state = YYINITIAL; - /** this buffer contains the current text to be matched and is - the source of the yytext() string */ - private char yy_buffer[] = new char[16384]; + /** this buffer contains the current text to be matched and is + the source of the yytext() string */ + private char yy_buffer[] = new char[16384]; - /** the textposition at the last accepting state */ - private int yy_markedPos; + /** the textposition at the last accepting state */ + private int yy_markedPos; - /** the textposition at the last state to be included in yytext */ - private int yy_pushbackPos; + /** the textposition at the last state to be included in yytext */ + private int yy_pushbackPos; - /** the current text position in the buffer */ - private int yy_currentPos; + /** the current text position in the buffer */ + private int yy_currentPos; - /** startRead marks the beginning of the yytext() string in the buffer */ - private int yy_startRead; + /** startRead marks the beginning of the yytext() string in the buffer */ + private int yy_startRead; - /** endRead marks the last character in the buffer, that has been read - from input */ - private int yy_endRead; + /** endRead marks the last character in the buffer, that has been read + from input */ + private int yy_endRead; + /** number of newlines encountered up to the start of the matched text */ +// private int yyline; - /** the number of characters up to the start of the matched text */ - private int yychar; + /** the number of characters up to the start of the matched text */ + private int yychar; + /** + * the number of characters from the last newline up to the start of the + * matched text + */ +// private int yycolumn; - /** - * yy_atBOL == true <=> the scanner is currently at the beginning of a line - */ - private boolean yy_atBOL; + /** + * yy_atBOL == true <=> the scanner is currently at the beginning of a line + */ + private boolean yy_atBOL; - /** yy_atEOF == true <=> the scanner has returned a value for EOF */ - private boolean yy_atEOF; + /** yy_atEOF == true <=> the scanner has returned a value for EOF */ + private boolean yy_atEOF; - /** denotes if the user-EOF-code has already been executed */ - private boolean yy_eof_done; + /** denotes if the user-EOF-code has already been executed */ + private boolean yy_eof_done; - /* user code: */ + /* user code: */ private boolean hasMore = true; @@ -131,69 +155,76 @@ super(); } - public void reset(Reader in) { - /* the input device */ - yy_reader = in; + public void reset (Reader in) { + /* the input device */ + yy_reader = in; - /* the current state of the DFA */ - yy_state = 0; + /* the current state of the DFA */ + yy_state = 0; - /* the current lexical state */ - yy_lexical_state = YYINITIAL; + /* the current lexical state */ + yy_lexical_state = YYINITIAL; - /* this buffer contains the current text to be matched and is - the source of the yytext() string */ - java.util.Arrays.fill(yy_buffer, (char) 0); + /* this buffer contains the current text to be matched and is + the source of the yytext() string */ + java.util.Arrays.fill(yy_buffer, (char)0); - /* the textposition at the last accepting state */ - yy_markedPos = 0; + /* the textposition at the last accepting state */ + yy_markedPos = 0; - /* the textposition at the last state to be included in yytext */ - yy_pushbackPos = 0; + /* the textposition at the last state to be included in yytext */ + yy_pushbackPos = 0; - /* the current text position in the buffer */ - yy_currentPos = 0; + /* the current text position in the buffer */ + yy_currentPos = 0; - /* startRead marks the beginning of the yytext() string in the buffer */ - yy_startRead = 0; + /* startRead marks the beginning of the yytext() string in the buffer */ + yy_startRead = 0; - /** - * endRead marks the last character in the buffer, that has been read - * from input - */ - yy_endRead = 0; + /** + * endRead marks the last character in the buffer, that has been read + * from input + */ + yy_endRead = 0; + + /* number of newlines encountered up to the start of the matched text */ +// yyline = 0; + + /* the number of characters up to the start of the matched text */ + yychar = 0; + + /** + * the number of characters from the last newline up to the start + * of the matched text + */ +// yycolumn = 0; + + /** + * yy_atBOL == true <=> the scanner is currently at the beginning + * of a line + */ + yy_atBOL = false; + + /* yy_atEOF == true <=> the scanner has returned a value for EOF */ + yy_atEOF = false; + + /* denotes if the user-EOF-code has already been executed */ + yy_eof_done = false; - /* the number of characters up to the start of the matched text */ - yychar = 0; - - - /** - * yy_atBOL == true <=> the scanner is currently at the beginning - * of a line - */ - yy_atBOL = false; - - /* yy_atEOF == true <=> the scanner has returned a value for EOF */ - yy_atEOF = false; - - /* denotes if the user-EOF-code has already been executed */ - yy_eof_done = false; - - - fStateStack.clear(); - - hasMore = true; - + fStateStack.clear(); + + hasMore = true; + // its a little wasteful to "throw away" first char array generated // by class init (via auto generated code), but we really do want // a small buffer for our head parsers. if (yy_buffer.length != MAX_TO_SCAN) { yy_buffer = new char[MAX_TO_SCAN]; } + - - } + } public final HeadParserToken getNextToken() throws IOException { @@ -203,8 +234,7 @@ if (valueText != null) { result = createToken(context, yychar, valueText); valueText = null; - } - else { + } else { result = createToken(context, yychar, yytext()); } return result; @@ -213,7 +243,6 @@ public final boolean hasMoreTokens() { return hasMore && yychar < MAX_TO_SCAN; } - private void pushCurrentState() { fStateStack.push(yystate()); @@ -222,1469 +251,1731 @@ private void popState() { yybegin(fStateStack.pop()); } - private HeadParserToken createToken(String context, int start, String text) { return new HeadParserToken(context, start, text); } + - /** - * Creates a new scanner - * There is also a java.io.InputStream version of this constructor. - * - * @param in the java.io.Reader to read input from. - */ - public HTMLHeadTokenizer(java.io.Reader in) { - this.yy_reader = in; - } + /** + * Creates a new scanner + * There is also a java.io.InputStream version of this constructor. + * + * @param in the java.io.Reader to read input from. + */ + public HTMLHeadTokenizer(java.io.Reader in) { + this.yy_reader = in; + } - /** - * Creates a new scanner. - * There is also java.io.Reader version of this constructor. - * - * @param in the java.io.Inputstream to read input from. - */ - public HTMLHeadTokenizer(java.io.InputStream in) { - this(new java.io.InputStreamReader(in)); - } + /** + * Creates a new scanner. + * There is also java.io.Reader version of this constructor. + * + * @param in the java.io.Inputstream to read input from. + */ + public HTMLHeadTokenizer(java.io.InputStream in) { + this(new java.io.InputStreamReader(in)); + } - /** - * Unpacks the compressed character translation table. - * - * @param packed the packed character translation table - * @return the unpacked character translation table - */ - private static char[] yy_unpack_cmap(String packed) { - char[] map = new char[0x10000]; - int i = 0; /* index in packed string */ - int j = 0; /* index in unpacked array */ - while (i < 174) { - int count = packed.charAt(i++); - char value = packed.charAt(i++); - do - map[j++] = value; - while (--count > 0); - } - return map; - } + /** + * Unpacks the compressed character translation table. + * + * @param packed the packed character translation table + * @return the unpacked character translation table + */ + private static char [] yy_unpack_cmap(String packed) { + char [] map = new char[0x10000]; + int i = 0; /* index in packed string */ + int j = 0; /* index in unpacked array */ + while (i < 176) { + int count = packed.charAt(i++); + char value = packed.charAt(i++); + do map[j++] = value; while (--count > 0); + } + return map; + } - /** - * Gets the next input character. - * - * @return the next character of the input stream, EOF if the - * end of the stream is reached. - * @exception IOException if any I/O-Error occurs - */ - private int yy_advance() throws java.io.IOException { + /** + * Gets the next input character. + * + * @return the next character of the input stream, EOF if the + * end of the stream is reached. + * @exception IOException if any I/O-Error occurs + */ + private int yy_advance() throws java.io.IOException { - /* standard case */ - if (yy_currentPos < yy_endRead) - return yy_buffer[yy_currentPos++]; + /* standard case */ + if (yy_currentPos < yy_endRead) return yy_buffer[yy_currentPos++]; - /* if the eof is reached, we don't need to work hard */ - if (yy_atEOF) - return YYEOF; + /* if the eof is reached, we don't need to work hard */ + if (yy_atEOF) return YYEOF; - /* otherwise: need to refill the buffer */ + /* otherwise: need to refill the buffer */ - /* first: make room (if you can) */ - if (yy_startRead > 0) { - System.arraycopy(yy_buffer, yy_startRead, yy_buffer, 0, yy_endRead - yy_startRead); + /* first: make room (if you can) */ + if (yy_startRead > 0) { + System.arraycopy(yy_buffer, yy_startRead, + yy_buffer, 0, + yy_endRead-yy_startRead); - /* translate stored positions */ - yy_endRead -= yy_startRead; - yy_currentPos -= yy_startRead; - yy_markedPos -= yy_startRead; - yy_pushbackPos -= yy_startRead; - yy_startRead = 0; - } + /* translate stored positions */ + yy_endRead-= yy_startRead; + yy_currentPos-= yy_startRead; + yy_markedPos-= yy_startRead; + yy_pushbackPos-= yy_startRead; + yy_startRead = 0; + } - /* is the buffer big enough? */ - if (yy_currentPos >= yy_buffer.length) { - /* if not: blow it up */ - char newBuffer[] = new char[yy_currentPos * 2]; - System.arraycopy(yy_buffer, 0, newBuffer, 0, yy_buffer.length); - yy_buffer = newBuffer; - } + /* is the buffer big enough? */ + if (yy_currentPos >= yy_buffer.length) { + /* if not: blow it up */ + char newBuffer[] = new char[yy_currentPos*2]; + System.arraycopy(yy_buffer, 0, newBuffer, 0, yy_buffer.length); + yy_buffer = newBuffer; + } - /* finally: fill the buffer with new input */ - int numRead = yy_reader.read(yy_buffer, yy_endRead, yy_buffer.length - yy_endRead); + /* finally: fill the buffer with new input */ + int numRead = yy_reader.read(yy_buffer, yy_endRead, + yy_buffer.length-yy_endRead); - if (numRead == -1) - return YYEOF; + if ( numRead == -1 ) return YYEOF; - yy_endRead += numRead; + yy_endRead+= numRead; - return yy_buffer[yy_currentPos++]; - } + return yy_buffer[yy_currentPos++]; + } - /** - * Closes the input stream. - */ - final public void yyclose() throws java.io.IOException { - yy_atEOF = true; /* indicate end of file */ - yy_endRead = yy_startRead; /* invalidate buffer */ - yy_reader.close(); - } + /** + * Closes the input stream. + */ + final public void yyclose() throws java.io.IOException { + yy_atEOF = true; /* indicate end of file */ + yy_endRead = yy_startRead; /* invalidate buffer */ + yy_reader.close(); + } - /** - * Returns the current lexical state. - */ - final public int yystate() { - return yy_lexical_state; - } + /** + * Returns the current lexical state. + */ + final public int yystate() { + return yy_lexical_state; + } - /** - * Enters a new lexical state - * - * @param newState the new lexical state - */ - final public void yybegin(int newState) { - yy_lexical_state = newState; - } + /** + * Enters a new lexical state + * + * @param newState the new lexical state + */ + final public void yybegin(int newState) { + yy_lexical_state = newState; + } - /** - * Returns the text matched by the current regular expression. - */ - final public String yytext() { - return new String(yy_buffer, yy_startRead, yy_markedPos - yy_startRead); - } + /** + * Returns the text matched by the current regular expression. + */ + final public String yytext() { + return new String( yy_buffer, yy_startRead, yy_markedPos-yy_startRead ); + } - /** - * Returns the length of the matched text region. - */ - final public int yylength() { - return yy_markedPos - yy_startRead; - } + /** + * Returns the length of the matched text region. + */ + final public int yylength() { + return yy_markedPos-yy_startRead; + } - /** - * Reports an error that occured while scanning. - * - * @param errorCode the code of the errormessage to display - */ - private void yy_ScanError(int errorCode) { - try { - System.out.println(YY_ERROR_MSG[errorCode]); - } - catch (ArrayIndexOutOfBoundsException e) { - System.out.println(YY_ERROR_MSG[YY_UNKNOWN_ERROR]); - } + /** + * Reports an error that occured while scanning. + * + * @param errorCode the code of the errormessage to display + */ + private void yy_ScanError(int errorCode) { + try { + System.out.println(YY_ERROR_MSG[errorCode]); + } + catch (ArrayIndexOutOfBoundsException e) { + System.out.println(YY_ERROR_MSG[YY_UNKNOWN_ERROR]); + } - System.exit(1); - } + System.exit(1); + } - /** - * Pushes the specified amount of characters back into the input stream. - * - * They will be read again by then next call of the scanning method - * - * @param number the number of characters to be read again. - * This number must not be greater than yylength()! - */ - private void yypushback(int number) { - if (number > yylength()) - yy_ScanError(YY_PUSHBACK_2BIG); + /** + * Pushes the specified amount of characters back into the input stream. + * + * They will be read again by then next call of the scanning method + * + * @param number the number of characters to be read again. + * This number must not be greater than yylength()! + */ + private void yypushback(int number) { + if ( number > yylength() ) + yy_ScanError(YY_PUSHBACK_2BIG); - yy_markedPos -= number; - } + yy_markedPos -= number; + } - /** - * Contains user EOF-code, which will be executed exactly once, - * when the end of file is reached - */ - private void yy_do_eof() { - if (!yy_eof_done) { - yy_eof_done = true; - hasMore = false; + /** + * Contains user EOF-code, which will be executed exactly once, + * when the end of file is reached + */ + private void yy_do_eof() { + if (!yy_eof_done) { + yy_eof_done = true; + hasMore=false; - } - } + } + } - /** - * Resumes scanning until the next regular expression is matched, - * the end of input is encountered or an I/O-Error occurs. - * - * @return the next token - * @exception IOException if any I/O-Error occurs - */ - public String primGetNextToken() throws java.io.IOException { - int yy_input; - int yy_action; + /** + * Resumes scanning until the next regular expression is matched, + * the end of input is encountered or an I/O-Error occurs. + * + * @return the next token + * @exception IOException if any I/O-Error occurs + */ + public String primGetNextToken() throws java.io.IOException { + int yy_input; + int yy_action; + yy_pushbackPos = -1; + boolean yy_was_pushback; - while (true) { + while (true) { - yychar += yylength(); + yychar+= yylength(); - yy_atBOL = yy_markedPos <= 0 || yy_buffer[yy_markedPos - 1] == '\n'; - if (!yy_atBOL && yy_buffer[yy_markedPos - 1] == '\r') { - yy_atBOL = yy_advance() != '\n'; - if (!yy_atEOF) - yy_currentPos--; - } + yy_atBOL = yy_markedPos <= 0 || yy_buffer[yy_markedPos-1] == '\n'; + if (!yy_atBOL && yy_buffer[yy_markedPos-1] == '\r') { + yy_atBOL = yy_advance() != '\n'; + if (!yy_atEOF) yy_currentPos--; + } - yy_action = -1; + yy_action = -1; - yy_currentPos = yy_startRead = yy_markedPos; + yy_currentPos = yy_startRead = yy_markedPos; - if (yy_atBOL) - yy_state = YY_LEXSTATE[yy_lexical_state + 1]; - else - yy_state = YY_LEXSTATE[yy_lexical_state]; + if (yy_atBOL) + yy_state = YY_LEXSTATE[yy_lexical_state+1]; + else + yy_state = YY_LEXSTATE[yy_lexical_state]; + yy_was_pushback = false; - yy_forAction : { - while (true) { + yy_forAction: { + while (true) { - yy_input = yy_advance(); + yy_input = yy_advance(); - if (yy_input == YYEOF) - break yy_forAction; + if ( yy_input == YYEOF ) break yy_forAction; - yy_input = yycmap[yy_input]; + yy_input = yycmap[yy_input]; - boolean yy_isFinal = false; - boolean yy_noLookAhead = false; + boolean yy_pushback = false; + boolean yy_isFinal = false; + boolean yy_noLookAhead = false; - yy_forNext : { - switch (yy_state) { - case 0 : - switch (yy_input) { - case 1 : - yy_isFinal = true; - yy_state = 9; - break yy_forNext; - case 2 : - yy_isFinal = true; - yy_state = 10; - break yy_forNext; - case 3 : - yy_isFinal = true; - yy_state = 11; - break yy_forNext; - case 10 : - yy_isFinal = true; - yy_state = 12; - break yy_forNext; - default : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 8; - break yy_forNext; - } + yy_forNext: { switch (yy_state) { + case 0: + switch (yy_input) { + case 1: yy_isFinal = true; yy_state = 10; break yy_forNext; + case 2: yy_isFinal = true; yy_state = 11; break yy_forNext; + case 3: yy_isFinal = true; yy_state = 12; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 13; break yy_forNext; + case 11: yy_isFinal = true; yy_state = 14; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 9; break yy_forNext; + } - case 1 : - switch (yy_input) { - case 1 : - yy_isFinal = true; - yy_state = 9; - break yy_forNext; - case 2 : - yy_isFinal = true; - yy_state = 10; - break yy_forNext; - case 3 : - yy_isFinal = true; - yy_state = 11; - break yy_forNext; - case 6 : - case 7 : - case 9 : - case 18 : - yy_isFinal = true; - yy_state = 13; - break yy_forNext; - case 10 : - yy_isFinal = true; - yy_state = 14; - break yy_forNext; - default : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 8; - break yy_forNext; - } + case 1: + switch (yy_input) { + case 1: yy_isFinal = true; yy_state = 10; break yy_forNext; + case 2: yy_isFinal = true; yy_state = 11; break yy_forNext; + case 3: yy_isFinal = true; yy_state = 12; break yy_forNext; + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 15; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 16; break yy_forNext; + case 11: yy_isFinal = true; yy_state = 17; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 9; break yy_forNext; + } - case 2 : - switch (yy_input) { - case 11 : - yy_isFinal = true; - yy_state = 15; - break yy_forNext; - case 15 : - yy_isFinal = true; - yy_state = 16; - break yy_forNext; - default : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 8; - break yy_forNext; - } + case 2: + switch (yy_input) { + case 9: yy_isFinal = true; yy_state = 18; break yy_forNext; + case 12: yy_isFinal = true; yy_state = 19; break yy_forNext; + case 16: yy_isFinal = true; yy_state = 20; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 9; break yy_forNext; + } - case 3 : - switch (yy_input) { - case 25 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 17; - break yy_forNext; - case 26 : - yy_isFinal = true; - yy_state = 18; - break yy_forNext; - case 34 : - yy_isFinal = true; - yy_state = 19; - break yy_forNext; - default : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 8; - break yy_forNext; - } + case 3: + switch (yy_input) { + case 9: yy_isFinal = true; yy_state = 21; break yy_forNext; + case 25: yy_isFinal = true; yy_state = 22; break yy_forNext; + case 26: yy_isFinal = true; yy_state = 23; break yy_forNext; + case 34: yy_isFinal = true; yy_state = 24; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 9; break yy_forNext; + } - case 4 : - switch (yy_input) { - case 6 : - case 9 : - case 18 : - yy_isFinal = true; - yy_state = 21; - break yy_forNext; - case 7 : - yy_isFinal = true; - yy_state = 22; - break yy_forNext; - case 32 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 23; - break yy_forNext; - case 35 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 24; - break yy_forNext; - default : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 20; - break yy_forNext; - } + case 4: + switch (yy_input) { + case 6: + case 8: yy_isFinal = true; yy_state = 26; break yy_forNext; + case 7: yy_isFinal = true; yy_state = 27; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 28; break yy_forNext; + case 32: yy_isFinal = true; yy_state = 29; break yy_forNext; + case 35: yy_isFinal = true; yy_state = 30; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 25; break yy_forNext; + } - case 5 : - switch (yy_input) { - case 7 : - case 9 : - case 10 : - case 25 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 26; - break yy_forNext; - case 11 : - case 34 : - yy_isFinal = true; - yy_state = 27; - break yy_forNext; - case 32 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 28; - break yy_forNext; - default : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 25; - break yy_forNext; - } + case 5: + switch (yy_input) { + case 7: + case 8: + case 11: + case 25: yy_isFinal = true; yy_state = 32; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 33; break yy_forNext; + case 12: + case 34: yy_isFinal = true; yy_state = 34; break yy_forNext; + case 32: yy_isFinal = true; yy_state = 35; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 31; break yy_forNext; + } - case 6 : - switch (yy_input) { - case 7 : - case 9 : - case 10 : - case 25 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 26; - break yy_forNext; - case 34 : - yy_isFinal = true; - yy_state = 27; - break yy_forNext; - case 35 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 28; - break yy_forNext; - case 36 : - yy_isFinal = true; - yy_state = 29; - break yy_forNext; - default : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 25; - break yy_forNext; - } + case 6: + switch (yy_input) { + case 7: + case 8: + case 11: + case 25: yy_isFinal = true; yy_state = 32; break yy_forNext; + case 34: yy_isFinal = true; yy_state = 34; break yy_forNext; + case 35: yy_isFinal = true; yy_state = 35; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 36; break yy_forNext; + case 36: yy_isFinal = true; yy_state = 37; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 31; break yy_forNext; + } - case 7 : - switch (yy_input) { - case 10 : - case 25 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 26; - break yy_forNext; - case 34 : - yy_isFinal = true; - yy_state = 27; - break yy_forNext; - case 11 : - yy_isFinal = true; - yy_state = 29; - break yy_forNext; - case 6 : - case 7 : - case 9 : - case 18 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 30; - break yy_forNext; - case 32 : - case 35 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 31; - break yy_forNext; - case 37 : - yy_isFinal = true; - yy_state = 32; - break yy_forNext; - default : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 25; - break yy_forNext; - } + case 7: + switch (yy_input) { + case 11: + case 25: yy_isFinal = true; yy_state = 32; break yy_forNext; + case 34: yy_isFinal = true; yy_state = 34; break yy_forNext; + case 12: yy_isFinal = true; yy_state = 37; break yy_forNext; + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 38; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 39; break yy_forNext; + case 32: + case 35: yy_isFinal = true; yy_state = 40; break yy_forNext; + case 37: yy_isFinal = true; yy_pushbackPos = yy_currentPos; yy_pushback = true; yy_state = 41; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 31; break yy_forNext; + } - case 9 : - switch (yy_input) { - case 2 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 33; - break yy_forNext; - default : - break yy_forAction; - } + case 8: + switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 9; break yy_forNext; + case 6: + case 7: + case 8: yy_isFinal = true; yy_noLookAhead = true; yy_state = 31; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 42; break yy_forNext; + } - case 10 : - switch (yy_input) { - case 1 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 34; - break yy_forNext; - default : - break yy_forAction; - } + case 10: + switch (yy_input) { + case 2: yy_isFinal = true; yy_noLookAhead = true; yy_state = 43; break yy_forNext; + default: break yy_forAction; + } - case 11 : - switch (yy_input) { - case 4 : - yy_state = 35; - break yy_forNext; - default : - break yy_forAction; - } + case 11: + switch (yy_input) { + case 1: yy_isFinal = true; yy_noLookAhead = true; yy_state = 44; break yy_forNext; + default: break yy_forAction; + } - case 12 : - switch (yy_input) { - case 13 : - yy_state = 36; - break yy_forNext; - default : - break yy_forAction; - } + case 12: + switch (yy_input) { + case 4: yy_state = 45; break yy_forNext; + default: break yy_forAction; + } - case 13 : - switch (yy_input) { - case 6 : - case 7 : - case 9 : - case 18 : - yy_state = 37; - break yy_forNext; - case 10 : - yy_state = 38; - break yy_forNext; - default : - break yy_forAction; - } + case 13: + switch (yy_input) { + case 11: yy_state = 46; break yy_forNext; + default: break yy_forAction; + } + + case 14: + switch (yy_input) { + case 9: yy_state = 47; break yy_forNext; + case 14: yy_state = 48; break yy_forNext; + default: break yy_forAction; + } + + case 15: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 49; break yy_forNext; + case 9: yy_state = 50; break yy_forNext; + case 11: yy_state = 51; break yy_forNext; + default: break yy_forAction; + } + + case 16: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 49; break yy_forNext; + case 11: yy_state = 52; break yy_forNext; + default: break yy_forAction; + } + + case 17: + switch (yy_input) { + case 14: yy_state = 48; break yy_forNext; + case 9: yy_state = 53; break yy_forNext; + case 12: yy_state = 54; break yy_forNext; + default: break yy_forAction; + } + + case 18: + switch (yy_input) { + case 12: yy_state = 55; break yy_forNext; + case 16: yy_state = 56; break yy_forNext; + default: break yy_forAction; + } + + case 19: + switch (yy_input) { + case 9: yy_state = 57; break yy_forNext; + case 25: yy_isFinal = true; yy_state = 58; break yy_forNext; + default: break yy_forAction; + } + + case 20: + switch (yy_input) { + case 9: yy_state = 59; break yy_forNext; + case 19: yy_state = 60; break yy_forNext; + default: break yy_forAction; + } + + case 21: + switch (yy_input) { + case 25: yy_isFinal = true; yy_state = 22; break yy_forNext; + case 26: yy_state = 61; break yy_forNext; + case 34: yy_state = 62; break yy_forNext; + default: break yy_forAction; + } + + case 22: + switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 63; break yy_forNext; + default: break yy_forAction; + } + + case 23: + switch (yy_input) { + case 9: yy_state = 64; break yy_forNext; + case 17: yy_state = 65; break yy_forNext; + default: break yy_forAction; + } + + case 24: + switch (yy_input) { + case 9: yy_state = 66; break yy_forNext; + case 25: yy_isFinal = true; yy_state = 67; break yy_forNext; + default: break yy_forAction; + } + + case 26: + switch (yy_input) { + case 6: + case 8: yy_isFinal = true; yy_state = 26; break yy_forNext; + case 7: yy_state = 68; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 69; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 25; break yy_forNext; + } + + case 27: + switch (yy_input) { + case 6: + case 8: yy_isFinal = true; yy_state = 26; break yy_forNext; + case 7: yy_state = 68; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 69; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 25; break yy_forNext; + } + + case 28: + switch (yy_input) { + case 32: yy_isFinal = true; yy_state = 29; break yy_forNext; + case 35: yy_isFinal = true; yy_state = 30; break yy_forNext; + case 6: + case 7: + case 8: yy_state = 68; break yy_forNext; + default: break yy_forAction; + } + + case 29: + switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 70; break yy_forNext; + default: break yy_forAction; + } + + case 30: + switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 71; break yy_forNext; + default: break yy_forAction; + } + + case 32: + switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 72; break yy_forNext; + default: break yy_forAction; + } + + case 33: + switch (yy_input) { + case 7: + case 8: + case 11: + case 25: yy_isFinal = true; yy_state = 32; break yy_forNext; + case 32: yy_isFinal = true; yy_state = 35; break yy_forNext; + case 12: + case 34: yy_state = 73; break yy_forNext; + default: break yy_forAction; + } + + case 34: + switch (yy_input) { + case 9: yy_state = 74; break yy_forNext; + case 25: yy_isFinal = true; yy_state = 75; break yy_forNext; + default: break yy_forAction; + } + + case 35: + switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 76; break yy_forNext; + default: break yy_forAction; + } + + case 36: + switch (yy_input) { + case 7: + case 8: + case 11: + case 25: yy_isFinal = true; yy_state = 32; break yy_forNext; + case 35: yy_isFinal = true; yy_state = 35; break yy_forNext; + case 34: yy_state = 73; break yy_forNext; + case 36: yy_state = 77; break yy_forNext; + default: break yy_forAction; + } + + case 37: + switch (yy_input) { + case 25: yy_isFinal = true; yy_state = 32; break yy_forNext; + case 9: yy_state = 78; break yy_forNext; + default: break yy_forAction; + } + + case 38: + switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 79; break yy_forNext; + default: break yy_forAction; + } + + case 39: + switch (yy_input) { + case 11: + case 25: yy_isFinal = true; yy_state = 32; break yy_forNext; + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 38; break yy_forNext; + case 32: + case 35: yy_isFinal = true; yy_state = 40; break yy_forNext; + case 34: yy_state = 73; break yy_forNext; + case 12: yy_state = 77; break yy_forNext; + default: break yy_forAction; + } + + case 40: + switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 80; break yy_forNext; + default: break yy_forAction; + } + + case 41: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_pushback = true; yy_state = 81; break yy_forNext; + case 9: yy_state = 82; break yy_forNext; + default: break yy_forAction; + } + + case 45: + switch (yy_input) { + case 5: yy_isFinal = true; yy_noLookAhead = true; yy_state = 83; break yy_forNext; + default: break yy_forAction; + } + + case 46: + switch (yy_input) { + case 9: yy_state = 47; break yy_forNext; + case 14: yy_state = 48; break yy_forNext; + default: break yy_forAction; + } + + case 47: + switch (yy_input) { + case 14: yy_state = 48; break yy_forNext; + default: break yy_forAction; + } + + case 48: + switch (yy_input) { + case 9: yy_state = 84; break yy_forNext; + case 16: yy_state = 85; break yy_forNext; + default: break yy_forAction; + } + + case 49: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 49; break yy_forNext; + case 9: yy_state = 50; break yy_forNext; + case 11: yy_state = 51; break yy_forNext; + default: break yy_forAction; + } + + case 50: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 49; break yy_forNext; + case 11: yy_state = 51; break yy_forNext; + case 9: yy_state = 86; break yy_forNext; + default: break yy_forAction; + } + + case 51: + switch (yy_input) { + case 12: yy_state = 54; break yy_forNext; + case 9: yy_state = 87; break yy_forNext; + default: break yy_forAction; + } + + case 52: + switch (yy_input) { + case 14: yy_state = 48; break yy_forNext; + case 9: yy_state = 53; break yy_forNext; + case 12: yy_state = 54; break yy_forNext; + default: break yy_forAction; + } + + case 53: + switch (yy_input) { + case 14: yy_state = 48; break yy_forNext; + case 12: yy_state = 54; break yy_forNext; + default: break yy_forAction; + } + + case 54: + switch (yy_input) { + case 9: yy_state = 88; break yy_forNext; + case 13: yy_state = 89; break yy_forNext; + default: break yy_forAction; + } + + case 55: + switch (yy_input) { + case 9: yy_state = 57; break yy_forNext; + case 25: yy_isFinal = true; yy_state = 58; break yy_forNext; + default: break yy_forAction; + } + + case 56: + switch (yy_input) { + case 9: yy_state = 59; break yy_forNext; + case 19: yy_state = 60; break yy_forNext; + default: break yy_forAction; + } + + case 57: + switch (yy_input) { + case 25: yy_isFinal = true; yy_state = 58; break yy_forNext; + default: break yy_forAction; + } + + case 58: + switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 90; break yy_forNext; + default: break yy_forAction; + } + + case 59: + switch (yy_input) { + case 19: yy_state = 60; break yy_forNext; + default: break yy_forAction; + } + + case 60: + switch (yy_input) { + case 9: yy_state = 91; break yy_forNext; + case 20: yy_state = 92; break yy_forNext; + default: break yy_forAction; + } + + case 61: + switch (yy_input) { + case 9: yy_state = 64; break yy_forNext; + case 17: yy_state = 65; break yy_forNext; + default: break yy_forAction; + } + + case 62: + switch (yy_input) { + case 9: yy_state = 66; break yy_forNext; + case 25: yy_isFinal = true; yy_state = 67; break yy_forNext; + default: break yy_forAction; + } + + case 64: + switch (yy_input) { + case 17: yy_state = 65; break yy_forNext; + default: break yy_forAction; + } + + case 65: + switch (yy_input) { + case 9: yy_state = 93; break yy_forNext; + case 17: yy_state = 94; break yy_forNext; + default: break yy_forAction; + } + + case 66: + switch (yy_input) { + case 25: yy_isFinal = true; yy_state = 67; break yy_forNext; + default: break yy_forAction; + } + + case 67: + switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 95; break yy_forNext; + default: break yy_forAction; + } + + case 68: + switch (yy_input) { + case 6: + case 8: yy_isFinal = true; yy_state = 26; break yy_forNext; + case 7: yy_state = 68; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 69; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 25; break yy_forNext; + } + + case 69: + switch (yy_input) { + case 6: + case 8: yy_isFinal = true; yy_state = 26; break yy_forNext; + case 7: yy_state = 68; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 96; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 25; break yy_forNext; + } + + case 73: + switch (yy_input) { + case 9: yy_state = 74; break yy_forNext; + case 25: yy_isFinal = true; yy_state = 75; break yy_forNext; + default: break yy_forAction; + } + + case 74: + switch (yy_input) { + case 25: yy_isFinal = true; yy_state = 75; break yy_forNext; + default: break yy_forAction; + } + + case 75: + switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 97; break yy_forNext; + default: break yy_forAction; + } + + case 77: + switch (yy_input) { + case 25: yy_isFinal = true; yy_state = 32; break yy_forNext; + case 9: yy_state = 78; break yy_forNext; + default: break yy_forAction; + } + + case 78: + switch (yy_input) { + case 25: yy_isFinal = true; yy_state = 32; break yy_forNext; + default: break yy_forAction; + } + + case 81: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_pushback = true; yy_state = 81; break yy_forNext; + case 9: yy_isFinal = true; yy_pushback = true; yy_state = 98; break yy_forNext; + default: break yy_forAction; + } + + case 82: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_pushback = true; yy_state = 81; break yy_forNext; + default: break yy_forAction; + } + + case 84: + switch (yy_input) { + case 16: yy_state = 85; break yy_forNext; + default: break yy_forAction; + } + + case 85: + switch (yy_input) { + case 9: yy_state = 99; break yy_forNext; + case 17: yy_state = 100; break yy_forNext; + default: break yy_forAction; + } + + case 86: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 49; break yy_forNext; + case 11: yy_state = 51; break yy_forNext; + default: break yy_forAction; + } + + case 87: + switch (yy_input) { + case 12: yy_state = 54; break yy_forNext; + default: break yy_forAction; + } + + case 88: + switch (yy_input) { + case 13: yy_state = 89; break yy_forNext; + default: break yy_forAction; + } + + case 89: + switch (yy_input) { + case 9: yy_state = 101; break yy_forNext; + case 14: yy_state = 102; break yy_forNext; + default: break yy_forAction; + } + + case 91: + switch (yy_input) { + case 20: yy_state = 92; break yy_forNext; + default: break yy_forAction; + } + + case 92: + switch (yy_input) { + case 9: yy_state = 103; break yy_forNext; + case 21: yy_state = 104; break yy_forNext; + default: break yy_forAction; + } + + case 93: + switch (yy_input) { + case 17: yy_state = 94; break yy_forNext; + default: break yy_forAction; + } + + case 94: + switch (yy_input) { + case 9: yy_state = 105; break yy_forNext; + case 27: yy_state = 106; break yy_forNext; + default: break yy_forAction; + } + + case 96: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 68; break yy_forNext; + default: break yy_forAction; + } + + case 98: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_pushback = true; yy_state = 81; break yy_forNext; + case 9: yy_state = 82; break yy_forNext; + default: break yy_forAction; + } + + case 99: + switch (yy_input) { + case 17: yy_state = 100; break yy_forNext; + default: break yy_forAction; + } + + case 100: + switch (yy_input) { + case 9: yy_state = 107; break yy_forNext; + case 18: yy_isFinal = true; yy_state = 108; break yy_forNext; + default: break yy_forAction; + } + + case 101: + switch (yy_input) { + case 14: yy_state = 102; break yy_forNext; + default: break yy_forAction; + } + + case 102: + switch (yy_input) { + case 9: yy_state = 109; break yy_forNext; + case 15: yy_state = 110; break yy_forNext; + default: break yy_forAction; + } + + case 103: + switch (yy_input) { + case 21: yy_state = 104; break yy_forNext; + default: break yy_forAction; + } + + case 104: + switch (yy_input) { + case 9: yy_state = 111; break yy_forNext; + case 22: yy_state = 112; break yy_forNext; + default: break yy_forAction; + } + + case 105: + switch (yy_input) { + case 27: yy_state = 106; break yy_forNext; + default: break yy_forAction; + } + + case 106: + switch (yy_input) { + case 9: yy_state = 113; break yy_forNext; + case 28: yy_state = 114; break yy_forNext; + default: break yy_forAction; + } + + case 107: + switch (yy_input) { + case 18: yy_isFinal = true; yy_state = 108; break yy_forNext; + default: break yy_forAction; + } + + case 108: + switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 115; break yy_forNext; + default: break yy_forAction; + } + + case 109: + switch (yy_input) { + case 15: yy_state = 110; break yy_forNext; + default: break yy_forAction; + } + + case 110: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 116; break yy_forNext; + case 9: yy_state = 117; break yy_forNext; + default: break yy_forAction; + } + + case 111: + switch (yy_input) { + case 22: yy_state = 112; break yy_forNext; + default: break yy_forAction; + } + + case 112: + switch (yy_input) { + case 9: yy_state = 118; break yy_forNext; + case 23: yy_state = 119; break yy_forNext; + default: break yy_forAction; + } + + case 113: + switch (yy_input) { + case 28: yy_state = 114; break yy_forNext; + default: break yy_forAction; + } + + case 114: + switch (yy_input) { + case 9: yy_state = 120; break yy_forNext; + case 16: yy_state = 121; break yy_forNext; + default: break yy_forAction; + } + + case 116: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 116; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 122; break yy_forNext; + default: break yy_forAction; + } + + case 117: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 116; break yy_forNext; + case 9: yy_state = 123; break yy_forNext; + default: break yy_forAction; + } + + case 118: + switch (yy_input) { + case 23: yy_state = 119; break yy_forNext; + default: break yy_forAction; + } + + case 119: + switch (yy_input) { + case 9: yy_state = 124; break yy_forNext; + case 19: yy_state = 125; break yy_forNext; + default: break yy_forAction; + } + + case 120: + switch (yy_input) { + case 16: yy_state = 121; break yy_forNext; + default: break yy_forAction; + } + + case 121: + switch (yy_input) { + case 9: yy_state = 126; break yy_forNext; + case 29: yy_state = 127; break yy_forNext; + default: break yy_forAction; + } + + case 122: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 116; break yy_forNext; + case 9: yy_state = 123; break yy_forNext; + default: break yy_forAction; + } + + case 123: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 116; break yy_forNext; + default: break yy_forAction; + } + + case 124: + switch (yy_input) { + case 19: yy_state = 125; break yy_forNext; + default: break yy_forAction; + } + + case 125: + switch (yy_input) { + case 9: yy_state = 128; break yy_forNext; + case 24: yy_state = 129; break yy_forNext; + default: break yy_forAction; + } + + case 126: + switch (yy_input) { + case 29: yy_state = 127; break yy_forNext; + default: break yy_forAction; + } + + case 127: + switch (yy_input) { + case 9: yy_state = 130; break yy_forNext; + case 30: yy_state = 131; break yy_forNext; + default: break yy_forAction; + } + + case 128: + switch (yy_input) { + case 24: yy_state = 129; break yy_forNext; + default: break yy_forAction; + } + + case 129: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 129; break yy_forNext; + case 9: yy_state = 132; break yy_forNext; + case 10: yy_isFinal = true; yy_state = 133; break yy_forNext; + default: break yy_forAction; + } - case 14 : - switch (yy_input) { - case 13 : - yy_state = 36; - break yy_forNext; - case 11 : - yy_state = 39; - break yy_forNext; - default : - break yy_forAction; - } + case 130: + switch (yy_input) { + case 30: yy_state = 131; break yy_forNext; + default: break yy_forAction; + } - case 15 : - switch (yy_input) { - case 25 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 40; - break yy_forNext; - default : - break yy_forAction; - } + case 131: + switch (yy_input) { + case 9: yy_state = 134; break yy_forNext; + case 23: yy_state = 135; break yy_forNext; + default: break yy_forAction; + } - case 16 : - switch (yy_input) { - case 19 : - yy_state = 41; - break yy_forNext; - default : - break yy_forAction; - } + case 132: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 129; break yy_forNext; + case 10: yy_isFinal = true; yy_state = 133; break yy_forNext; + case 9: yy_state = 136; break yy_forNext; + default: break yy_forAction; + } - case 18 : - switch (yy_input) { - case 16 : - yy_state = 42; - break yy_forNext; - default : - break yy_forAction; - } + case 133: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 137; break yy_forNext; + case 9: yy_state = 138; break yy_forNext; + default: break yy_forAction; + } - case 19 : - switch (yy_input) { - case 25 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 43; - break yy_forNext; - default : - break yy_forAction; - } + case 134: + switch (yy_input) { + case 23: yy_state = 135; break yy_forNext; + default: break yy_forAction; + } - case 21 : - switch (yy_input) { - case 6 : - case 9 : - case 18 : - yy_isFinal = true; - yy_state = 21; - break yy_forNext; - case 7 : - yy_state = 44; - break yy_forNext; - default : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 20; - break yy_forNext; - } + case 135: + switch (yy_input) { + case 9: yy_state = 139; break yy_forNext; + case 31: yy_state = 140; break yy_forNext; + default: break yy_forAction; + } - case 22 : - switch (yy_input) { - case 6 : - case 9 : - case 18 : - yy_isFinal = true; - yy_state = 21; - break yy_forNext; - case 7 : - yy_state = 44; - break yy_forNext; - default : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 20; - break yy_forNext; - } + case 136: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 129; break yy_forNext; + default: break yy_forAction; + } - case 27 : - switch (yy_input) { - case 25 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 45; - break yy_forNext; - default : - break yy_forAction; - } + case 137: + switch (yy_input) { + case 9: yy_isFinal = true; yy_state = 133; break yy_forNext; + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 137; break yy_forNext; + default: break yy_forAction; + } - case 29 : - switch (yy_input) { - case 25 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 46; - break yy_forNext; - default : - break yy_forAction; - } + case 138: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 137; break yy_forNext; + default: break yy_forAction; + } - case 32 : - switch (yy_input) { - case 6 : - case 7 : - case 9 : - case 18 : - yy_isFinal = true; - yy_state = 32; - break yy_forNext; - default : - break yy_forAction; - } + case 139: + switch (yy_input) { + case 31: yy_state = 140; break yy_forNext; + default: break yy_forAction; + } - case 35 : - switch (yy_input) { - case 5 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 47; - break yy_forNext; - default : - break yy_forAction; - } + case 140: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 140; break yy_forNext; + case 9: yy_state = 141; break yy_forNext; + case 10: yy_state = 142; break yy_forNext; + default: break yy_forAction; + } - case 36 : - switch (yy_input) { - case 15 : - yy_state = 48; - break yy_forNext; - default : - break yy_forAction; - } + case 141: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 140; break yy_forNext; + case 10: yy_state = 142; break yy_forNext; + case 9: yy_state = 143; break yy_forNext; + default: break yy_forAction; + } - case 37 : - switch (yy_input) { - case 6 : - case 7 : - case 9 : - case 18 : - yy_state = 37; - break yy_forNext; - case 10 : - yy_state = 38; - break yy_forNext; - default : - break yy_forAction; - } + case 142: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 144; break yy_forNext; + case 9: yy_state = 145; break yy_forNext; + case 20: yy_state = 146; break yy_forNext; + case 32: yy_state = 147; break yy_forNext; + default: break yy_forAction; + } - case 38 : - switch (yy_input) { - case 11 : - yy_state = 39; - break yy_forNext; - default : - break yy_forAction; - } + case 143: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 140; break yy_forNext; + default: break yy_forAction; + } - case 39 : - switch (yy_input) { - case 12 : - yy_state = 49; - break yy_forNext; - default : - break yy_forAction; - } + case 144: + switch (yy_input) { + case 9: yy_state = 142; break yy_forNext; + case 6: + case 7: + case 8: yy_state = 144; break yy_forNext; + case 20: yy_state = 146; break yy_forNext; + case 32: yy_state = 147; break yy_forNext; + default: break yy_forAction; + } - case 41 : - switch (yy_input) { - case 20 : - yy_state = 50; - break yy_forNext; - default : - break yy_forAction; - } + case 145: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 144; break yy_forNext; + case 20: yy_state = 146; break yy_forNext; + case 32: yy_state = 147; break yy_forNext; + case 9: yy_state = 148; break yy_forNext; + default: break yy_forAction; + } - case 42 : - switch (yy_input) { - case 16 : - yy_state = 51; - break yy_forNext; - default : - break yy_forAction; - } + case 146: + switch (yy_input) { + case 9: yy_state = 149; break yy_forNext; + case 21: yy_state = 150; break yy_forNext; + default: break yy_forAction; + } - case 44 : - switch (yy_input) { - case 6 : - case 9 : - case 18 : - yy_isFinal = true; - yy_state = 21; - break yy_forNext; - case 7 : - yy_state = 44; - break yy_forNext; - default : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 20; - break yy_forNext; - } + case 147: + switch (yy_input) { + case 20: yy_state = 146; break yy_forNext; + case 9: yy_state = 148; break yy_forNext; + default: break yy_forAction; + } - case 48 : - switch (yy_input) { - case 16 : - yy_state = 52; - break yy_forNext; - default : - break yy_forAction; - } + case 148: + switch (yy_input) { + case 20: yy_state = 146; break yy_forNext; + case 9: yy_state = 151; break yy_forNext; + default: break yy_forAction; + } - case 49 : - switch (yy_input) { - case 13 : - yy_state = 53; - break yy_forNext; - default : - break yy_forAction; - } + case 149: + switch (yy_input) { + case 21: yy_state = 150; break yy_forNext; + default: break yy_forAction; + } - case 50 : - switch (yy_input) { - case 21 : - yy_state = 54; - break yy_forNext; - default : - break yy_forAction; - } + case 150: + switch (yy_input) { + case 9: yy_state = 152; break yy_forNext; + case 19: yy_state = 153; break yy_forNext; + default: break yy_forAction; + } - case 51 : - switch (yy_input) { - case 27 : - yy_state = 55; - break yy_forNext; - default : - break yy_forAction; - } + case 151: + switch (yy_input) { + case 20: yy_state = 146; break yy_forNext; + default: break yy_forAction; + } - case 52 : - switch (yy_input) { - case 17 : - yy_state = 56; - break yy_forNext; - default : - break yy_forAction; - } + case 152: + switch (yy_input) { + case 19: yy_state = 153; break yy_forNext; + default: break yy_forAction; + } - case 53 : - switch (yy_input) { - case 14 : - yy_state = 57; - break yy_forNext; - default : - break yy_forAction; - } + case 153: + switch (yy_input) { + case 9: yy_state = 154; break yy_forNext; + case 17: yy_state = 155; break yy_forNext; + default: break yy_forAction; + } - case 54 : - switch (yy_input) { - case 22 : - yy_state = 58; - break yy_forNext; - default : - break yy_forAction; - } + case 154: + switch (yy_input) { + case 17: yy_state = 155; break yy_forNext; + default: break yy_forAction; + } - case 55 : - switch (yy_input) { - case 28 : - yy_state = 59; - break yy_forNext; - default : - break yy_forAction; - } + case 155: + switch (yy_input) { + case 9: yy_state = 156; break yy_forNext; + case 16: yy_state = 157; break yy_forNext; + default: break yy_forAction; + } - case 56 : - switch (yy_input) { - case 18 : - yy_isFinal = true; - yy_noLookAhead = true; - yy_state = 60; - break yy_forNext; - default : - break yy_forAction; - } + case 156: + switch (yy_input) { + case 16: yy_state = 157; break yy_forNext; + default: break yy_forAction; + } - case 57 : - switch (yy_input) { - case 6 : - case 7 : - case 9 : - case 18 : - yy_isFinal = true; - yy_state = 61; - break yy_forNext; - default : - break yy_forAction; - } + case 157: + switch (yy_input) { + case 9: yy_state = 158; break yy_forNext; + case 19: yy_state = 159; break yy_forNext; + default: break yy_forAction; + } - case 58 : - switch (yy_input) { - case 23 : - yy_state = 62; - break yy_forNext; - default : - break yy_forAction; - } + case 158: + switch (yy_input) { + case 19: yy_state = 159; break yy_forNext; + default: break yy_forAction; + } - case 59 : - switch (yy_input) { - case 15 : - yy_state = 63; - break yy_forNext; - default : - break yy_forAction; - } + case 159: + switch (yy_input) { + case 9: yy_state = 160; break yy_forNext; + case 17: yy_state = 161; break yy_forNext; + default: break yy_forAction; + } - case 61 : - switch (yy_input) { - case 6 : - case 7 : - case 9 : - case 18 : - yy_isFinal = true; - yy_state = 61; - break yy_forNext; - default : - break yy_forAction; - } + case 160: + switch (yy_input) { + case 17: yy_state = 161; break yy_forNext; + default: break yy_forAction; + } - case 62 : - switch (yy_input) { - case 19 : - yy_state = 64; - break yy_forNext; - default : - break yy_forAction; - } + case 161: + switch (yy_input) { + case 9: yy_state = 162; break yy_forNext; + case 28: yy_state = 163; break yy_forNext; + default: break yy_forAction; + } - case 63 : - switch (yy_input) { - case 29 : - yy_state = 65; - break yy_forNext; - default : - break yy_forAction; - } + case 162: + switch (yy_input) { + case 28: yy_state = 163; break yy_forNext; + default: break yy_forAction; + } - case 64 : - switch (yy_input) { - case 24 : - yy_state = 66; - break yy_forNext; - default : - break yy_forAction; - } + case 163: + switch (yy_input) { + case 9: yy_state = 164; break yy_forNext; + case 17: yy_state = 165; break yy_forNext; + default: break yy_forAction; + } - case 65 : - switch (yy_input) { - case 30 : - yy_state = 67; - break yy_forNext; - default : - break yy_forAction; - } + case 164: + switch (yy_input) { + case 17: yy_state = 165; break yy_forNext; + default: break yy_forAction; + } - case 66 : - switch (yy_input) { - case 6 : - case 7 : - case 9 : - case 18 : - yy_state = 66; - break yy_forNext; - case 8 : - yy_isFinal = true; - yy_state = 68; - break yy_forNext; - default : - break yy_forAction; - } + case 165: + switch (yy_input) { + case 9: yy_state = 166; break yy_forNext; + case 33: yy_state = 167; break yy_forNext; + default: break yy_forAction; + } - case 67 : - switch (yy_input) { - case 23 : - yy_state = 69; - break yy_forNext; - default : - break yy_forAction; - } + case 166: + switch (yy_input) { + case 33: yy_state = 167; break yy_forNext; + default: break yy_forAction; + } - case 68 : - switch (yy_input) { - case 6 : - case 7 : - case 9 : - case 18 : - yy_isFinal = true; - yy_state = 68; - break yy_forNext; - default : - break yy_forAction; - } + case 167: + switch (yy_input) { + case 9: yy_state = 168; break yy_forNext; + case 27: yy_state = 169; break yy_forNext; + default: break yy_forAction; + } - case 69 : - switch (yy_input) { - case 31 : - yy_state = 70; - break yy_forNext; - default : - break yy_forAction; - } + case 168: + switch (yy_input) { + case 27: yy_state = 169; break yy_forNext; + default: break yy_forAction; + } - case 70 : - switch (yy_input) { - case 6 : - case 7 : - case 9 : - case 18 : - yy_state = 70; - break yy_forNext; - case 8 : - yy_state = 71; - break yy_forNext; - default : - break yy_forAction; - } + case 169: + switch (yy_input) { + case 9: yy_state = 170; break yy_forNext; + case 16: yy_state = 171; break yy_forNext; + default: break yy_forAction; + } - case 71 : - switch (yy_input) { - case 6 : - case 7 : - case 9 : - case 18 : - yy_state = 71; - break yy_forNext; - case 20 : - yy_state = 72; - break yy_forNext; - case 32 : - yy_state = 73; - break yy_forNext; - default : - break yy_forAction; - } + case 170: + switch (yy_input) { + case 16: yy_state = 171; break yy_forNext; + default: break yy_forAction; + } - case 72 : - switch (yy_input) { - case 21 : - yy_state = 74; - break yy_forNext; - default : - break yy_forAction; - } + case 171: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 172; break yy_forNext; + case 9: yy_state = 173; break yy_forNext; + case 32: yy_state = 174; break yy_forNext; + default: break yy_forAction; + } - case 73 : - switch (yy_input) { - case 20 : - yy_state = 72; - break yy_forNext; - default : - break yy_forAction; - } + case 172: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 172; break yy_forNext; + case 9: yy_state = 175; break yy_forNext; + case 20: yy_state = 176; break yy_forNext; + default: break yy_forAction; + } - case 74 : - switch (yy_input) { - case 19 : - yy_state = 75; - break yy_forNext; - default : - break yy_forAction; - } + case 173: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 172; break yy_forNext; + case 32: yy_state = 174; break yy_forNext; + case 9: yy_state = 177; break yy_forNext; + default: break yy_forAction; + } - case 75 : - switch (yy_input) { - case 16 : - yy_state = 76; - break yy_forNext; - default : - break yy_forAction; - } + case 174: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 172; break yy_forNext; + case 9: yy_state = 177; break yy_forNext; + default: break yy_forAction; + } - case 76 : - switch (yy_input) { - case 15 : - yy_state = 77; - break yy_forNext; - default : - break yy_forAction; - } + case 175: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 172; break yy_forNext; + case 20: yy_state = 176; break yy_forNext; + case 9: yy_state = 178; break yy_forNext; + default: break yy_forAction; + } - case 77 : - switch (yy_input) { - case 19 : - yy_state = 78; - break yy_forNext; - default : - break yy_forAction; - } + case 176: + switch (yy_input) { + case 9: yy_state = 179; break yy_forNext; + case 21: yy_state = 180; break yy_forNext; + default: break yy_forAction; + } - case 78 : - switch (yy_input) { - case 16 : - yy_state = 79; - break yy_forNext; - default : - break yy_forAction; - } + case 177: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 172; break yy_forNext; + case 9: yy_state = 181; break yy_forNext; + default: break yy_forAction; + } - case 79 : - switch (yy_input) { - case 28 : - yy_state = 80; - break yy_forNext; - default : - break yy_forAction; - } + case 178: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 172; break yy_forNext; + case 20: yy_state = 176; break yy_forNext; + default: break yy_forAction; + } - case 80 : - switch (yy_input) { - case 16 : - yy_state = 81; - break yy_forNext; - default : - break yy_forAction; - } + case 179: + switch (yy_input) { + case 21: yy_state = 180; break yy_forNext; + default: break yy_forAction; + } - case 81 : - switch (yy_input) { - case 33 : - yy_state = 82; - break yy_forNext; - default : - break yy_forAction; - } + case 180: + switch (yy_input) { + case 9: yy_state = 182; break yy_forNext; + case 19: yy_state = 183; break yy_forNext; + default: break yy_forAction; + } - case 82 : - switch (yy_input) { - case 27 : - yy_state = 83; - break yy_forNext; - default : - break yy_forAction; - } + case 181: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 172; break yy_forNext; + default: break yy_forAction; + } - case 83 : - switch (yy_input) { - case 15 : - yy_state = 84; - break yy_forNext; - default : - break yy_forAction; - } + case 182: + switch (yy_input) { + case 19: yy_state = 183; break yy_forNext; + default: break yy_forAction; + } - case 84 : - switch (yy_input) { - case 6 : - case 7 : - case 9 : - case 18 : - yy_state = 85; - break yy_forNext; - case 32 : - yy_state = 86; - break yy_forNext; - default : - break yy_forAction; - } + case 183: + switch (yy_input) { + case 9: yy_state = 184; break yy_forNext; + case 17: yy_state = 185; break yy_forNext; + default: break yy_forAction; + } - case 85 : - switch (yy_input) { - case 6 : - case 7 : - case 9 : - case 18 : - yy_state = 85; - break yy_forNext; - case 20 : - yy_state = 87; - break yy_forNext; - default : - break yy_forAction; - } + case 184: + switch (yy_input) { + case 17: yy_state = 185; break yy_forNext; + default: break yy_forAction; + } - case 86 : - switch (yy_input) { - case 6 : - case 7 : - case 9 : - case 18 : - yy_state = 85; - break yy_forNext; - default : - break yy_forAction; - } + case 185: + switch (yy_input) { + case 9: yy_state = 186; break yy_forNext; + case 16: yy_state = 187; break yy_forNext; + default: break yy_forAction; + } - case 87 : - switch (yy_input) { - case 21 : - yy_state = 88; - break yy_forNext; - default : - break yy_forAction; - } + case 186: + switch (yy_input) { + case 16: yy_state = 187; break yy_forNext; + default: break yy_forAction; + } - case 88 : - switch (yy_input) { - case 19 : - yy_state = 89; - break yy_forNext; - default : - break yy_forAction; - } + case 187: + switch (yy_input) { + case 9: yy_state = 188; break yy_forNext; + case 19: yy_state = 189; break yy_forNext; + default: break yy_forAction; + } - case 89 : - switch (yy_input) { - case 16 : - yy_state = 90; - break yy_forNext; - default : - break yy_forAction; - } + case 188: + switch (yy_input) { + case 19: yy_state = 189; break yy_forNext; + default: break yy_forAction; + } - case 90 : - switch (yy_input) { - case 15 : - yy_state = 91; - break yy_forNext; - default : - break yy_forAction; - } + case 189: + switch (yy_input) { + case 9: yy_state = 190; break yy_forNext; + case 17: yy_state = 191; break yy_forNext; + default: break yy_forAction; + } - case 91 : - switch (yy_input) { - case 19 : - yy_state = 92; - break yy_forNext; - default : - break yy_forAction; - } + case 190: + switch (yy_input) { + case 17: yy_state = 191; break yy_forNext; + default: break yy_forAction; + } - case 92 : - switch (yy_input) { - case 16 : - yy_state = 93; - break yy_forNext; - default : - break yy_forAction; - } + case 191: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 191; break yy_forNext; + case 9: yy_state = 192; break yy_forNext; + case 10: yy_isFinal = true; yy_state = 193; break yy_forNext; + default: break yy_forAction; + } - case 93 : - switch (yy_input) { - case 6 : - case 7 : - case 9 : - case 18 : - yy_state = 93; - break yy_forNext; - case 8 : - yy_isFinal = true; - yy_state = 94; - break yy_forNext; - default : - break yy_forAction; - } + case 192: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 191; break yy_forNext; + case 10: yy_isFinal = true; yy_state = 193; break yy_forNext; + case 9: yy_state = 194; break yy_forNext; + default: break yy_forAction; + } - case 94 : - switch (yy_input) { - case 6 : - case 7 : - case 9 : - case 18 : - yy_isFinal = true; - yy_state = 94; - break yy_forNext; - default : - break yy_forAction; - } + case 193: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 195; break yy_forNext; + case 9: yy_state = 196; break yy_forNext; + default: break yy_forAction; + } - default : - yy_ScanError(YY_ILLEGAL_STATE); - break; - } - } + case 194: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 191; break yy_forNext; + default: break yy_forAction; + } - if (yy_isFinal) { - yy_action = yy_state; - yy_markedPos = yy_currentPos; - if (yy_noLookAhead) - break yy_forAction; - } + case 195: + switch (yy_input) { + case 9: yy_isFinal = true; yy_state = 193; break yy_forNext; + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 195; break yy_forNext; + default: break yy_forAction; + } - } - } + case 196: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 195; break yy_forNext; + default: break yy_forAction; + } + default: + yy_ScanError(YY_ILLEGAL_STATE); + break; + } } - switch (yy_action) { + if ( yy_isFinal ) { + yy_was_pushback = yy_pushback; + yy_action = yy_state; + yy_markedPos = yy_currentPos; + if ( yy_noLookAhead ) break yy_forAction; + } - case 26 : - { - yypushback(1); - popState(); - valueText = string.toString(); - return EncodingParserConstants.InvalidTerminatedStringValue; - } - case 96 : - break; - case 20 : - case 21 : - { - yypushback(1); - yybegin(UnDelimitedString); - string.setLength(0); - } - case 97 : - break; - case 17 : - { - yybegin(YYINITIAL); - if (foundContentTypeValue) - hasMore = false; - return HTMLHeadTokenizerConstants.MetaTagEnd; - } - case 98 : - break; - case 31 : - { - yypushback(1); - popState(); - valueText = string.toString(); - return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue; - } - case 99 : - break; - case 43 : - { - yybegin(YYINITIAL); - if (foundContentTypeValue) - hasMore = false; - return HTMLHeadTokenizerConstants.MetaTagEnd; - } - case 100 : - break; - case 45 : - { - yypushback(2); - popState(); - valueText = string.toString(); - return EncodingParserConstants.InvalidTerminatedStringValue; - } - case 101 : - break; - case 46 : - { - yypushback(2); - popState(); - valueText = string.toString(); - return EncodingParserConstants.InvalidTerminatedStringValue; - } - case 102 : - break; - case 61 : - { - if (yychar == 0) { - yybegin(ST_XMLDecl); - return XMLHeadTokenizerConstants.XMLDeclStart; - } - } - case 103 : - break; - case 8 : - case 9 : - case 10 : - case 11 : - case 12 : - case 13 : - case 14 : - case 15 : - case 16 : - case 18 : - case 19 : - case 22 : - { - if (yychar > MAX_TO_SCAN) { - hasMore = false; - return EncodingParserConstants.MAX_CHARS_REACHED; - } - } - case 104 : - break; - case 60 : - { - yybegin(ST_META_TAG); - return HTMLHeadTokenizerConstants.MetaTagStart; - } - case 105 : - break; - case 40 : - { - yybegin(YYINITIAL); - return XMLHeadTokenizerConstants.XMLDeclEnd; - } - case 106 : - break; - case 94 : - { - pushCurrentState(); - yybegin(QuotedAttributeValue); - foundContentTypeValue = true; - return HTMLHeadTokenizerConstants.MetaTagContentType; - } - case 107 : - break; - case 68 : - { - pushCurrentState(); - yybegin(QuotedAttributeValue); - return XMLHeadTokenizerConstants.XMLDelEncoding; - } - case 108 : - break; - case 33 : - { - hasMore = false; - return EncodingParserConstants.UTF16BE; - } - case 109 : - break; - case 34 : - { - hasMore = false; - return EncodingParserConstants.UTF16LE; - } - case 110 : - break; - case 47 : - { - hasMore = false; - return EncodingParserConstants.UTF83ByteBOM; - } - case 111 : - break; - case 28 : - { - popState(); - valueText = string.toString(); - return EncodingParserConstants.StringValue; - } - case 112 : - break; - case 25 : - case 27 : - case 29 : - case 32 : - { - string.append(yytext()); - } - case 113 : - break; - case 24 : - { - yybegin(SQ_STRING); - string.setLength(0); - } - case 114 : - break; - case 23 : - { - yybegin(DQ_STRING); - string.setLength(0); - } - case 115 : - break; - case 30 : - { - yypushback(1); - popState(); - valueText = string.toString(); - return EncodingParserConstants.UnDelimitedStringValue; - } - case 116 : - break; - default : - if (yy_input == YYEOF && yy_startRead == yy_currentPos) { - yy_atEOF = true; - yy_do_eof(); - { - hasMore = false; - return EncodingParserConstants.EOF; - } - } - else { - yy_ScanError(YY_NO_MATCH); - } - } - } - } + } + } - /** - * Runs the scanner on input files. - * - * This main method is the debugging routine for the scanner. - * It prints each returned token to System.out until the end of - * file is reached, or an error occured. - * - * @param argv the command line, contains the filenames to run - * the scanner on. - */ - public static void main(String argv[]) { - for (int i = 0; i < argv.length; i++) { - HTMLHeadTokenizer scanner = null; - try { - scanner = new HTMLHeadTokenizer(new java.io.FileReader(argv[i])); - } - catch (java.io.FileNotFoundException e) { - System.out.println("File not found : \"" + argv[i] + "\""); - System.exit(1); - } - catch (ArrayIndexOutOfBoundsException e) { - System.out.println("Usage : java HTMLHeadTokenizer <inputfile>"); - System.exit(1); - } + if (yy_was_pushback) + yy_markedPos = yy_pushbackPos; - try { - do { - System.out.println(scanner.primGetNextToken()); - } - while (!scanner.yy_atEOF); + switch (yy_action) { - } - catch (java.io.IOException e) { - System.out.println("An I/O error occured while scanning :"); - System.out.println(e); - System.exit(1); - } - catch (Exception e) { - e.printStackTrace(); - System.exit(1); - } - } - } + case 32: + case 72: + { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue; } + case 198: break; + case 25: + case 26: + case 28: + case 69: + case 96: + { yypushback(1); yybegin(UnDelimitedString); string.setLength(0); } + case 199: break; + case 22: + case 63: + { yybegin(YYINITIAL); if (foundContentTypeValue) hasMore = false; return HTMLHeadTokenizerConstants.MetaTagEnd; } + case 200: break; + case 40: + case 80: + { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue; } + case 201: break; + case 67: + case 95: + { yybegin(YYINITIAL); if (foundContentTypeValue) hasMore = false; return HTMLHeadTokenizerConstants.MetaTagEnd; } + case 202: break; + case 75: + case 97: + { yypushback(yylength()); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue; } + case 203: break; + case 116: + case 122: + { if (yychar == 0 ) {yybegin(ST_XMLDecl); return XMLHeadTokenizerConstants.XMLDeclStart;} } + case 204: break; + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 23: + case 24: + case 27: + case 33: + case 36: + case 39: + { if(yychar > MAX_TO_SCAN) {hasMore=false; return EncodingParserConstants.MAX_CHARS_REACHED;} } + case 205: break; + case 108: + case 115: + { yybegin(ST_META_TAG); return HTMLHeadTokenizerConstants.MetaTagStart; } + case 206: break; + case 58: + case 90: + { yybegin(YYINITIAL); return XMLHeadTokenizerConstants.XMLDeclEnd; } + case 207: break; + case 193: + case 195: + { pushCurrentState(); yybegin(QuotedAttributeValue); foundContentTypeValue=true; return HTMLHeadTokenizerConstants.MetaTagContentType; } + case 208: break; + case 133: + case 137: + { pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDelEncoding; } + case 209: break; + case 83: + { hasMore = false; return EncodingParserConstants.UTF83ByteBOM; } + case 210: break; + case 43: + { hasMore = false; return EncodingParserConstants.UTF16BE; } + case 211: break; + case 44: + { hasMore = false; return EncodingParserConstants.UTF16LE; } + case 212: break; + case 35: + case 76: + { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue; } + case 213: break; + case 31: + case 34: + case 37: + { string.append( yytext() ); } + case 214: break; + case 30: + case 71: + { yybegin(SQ_STRING); string.setLength(0); } + case 215: break; + case 29: + case 70: + { yybegin(DQ_STRING); string.setLength(0); } + case 216: break; + case 38: + case 79: + { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.UnDelimitedStringValue; } + case 217: break; + case 41: + case 81: + case 98: + { pushCurrentState(); yybegin(UnDelimitedCharset); string.append( yytext() ); } + case 218: break; + case 42: + { yypushback(1); popState(); } + case 219: break; + default: + if (yy_input == YYEOF && yy_startRead == yy_currentPos) { + yy_atEOF = true; + yy_do_eof(); + { hasMore = false; return EncodingParserConstants.EOF; } + } + else { + yy_ScanError(YY_NO_MATCH); + } + } + } + } }
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/HTMLResourceEncodingDetector.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/HTMLResourceEncodingDetector.java index 4401d90..0367e54 100644 --- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/HTMLResourceEncodingDetector.java +++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/HTMLResourceEncodingDetector.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2005 IBM Corporation and others. + * Copyright (c) 2004, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -13,6 +13,7 @@ import java.io.IOException; import java.util.regex.Pattern; +import org.eclipse.core.runtime.content.IContentDescription; import org.eclipse.wst.sse.core.internal.encoding.CodedIO; import org.eclipse.wst.sse.core.internal.encoding.EncodingMemento; import org.eclipse.wst.sse.core.internal.encoding.IResourceCharsetDetector; @@ -38,15 +39,13 @@ createEncodingMemento(enc, EncodingMemento.DETECTED_STANDARD_UNICODE_BYTES); fEncodingMemento.setUTF83ByteBOMUsed(true); } - else if (tokenType == EncodingParserConstants.UTF16BE) { - canHandleAsUnicodeStream = true; - String enc = "UTF-16BE"; //$NON-NLS-1$ - createEncodingMemento(enc, EncodingMemento.DETECTED_STANDARD_UNICODE_BYTES); - } - else if (tokenType == EncodingParserConstants.UTF16LE) { + else if (tokenType == EncodingParserConstants.UTF16BE || tokenType == EncodingParserConstants.UTF16LE) { canHandleAsUnicodeStream = true; String enc = "UTF-16"; //$NON-NLS-1$ + byte[] bom = (tokenType == EncodingParserConstants.UTF16BE) ? IContentDescription.BOM_UTF_16BE : IContentDescription.BOM_UTF_16LE; createEncodingMemento(enc, EncodingMemento.DETECTED_STANDARD_UNICODE_BYTES); + fEncodingMemento.setUnicodeStream(true); + fEncodingMemento.setUnicodeBOM(bom); } return canHandleAsUnicodeStream; } @@ -176,7 +175,7 @@ } } if (parts.length > 1) { - charset = parts[1]; + charset = parts[1].trim(); } if (charset != null && charset.length() > 0) {
diff --git a/bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/CSSHeadTokenizer/CSSHeadTokenizer.jFlex b/bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/CSSHeadTokenizer/CSSHeadTokenizer.jFlex index 96fe58a..bd7272a 100644 --- a/bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/CSSHeadTokenizer/CSSHeadTokenizer.jFlex +++ b/bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/CSSHeadTokenizer/CSSHeadTokenizer.jFlex
@@ -1,286 +1,279 @@ -/******************************************************************************* - * Copyright (c) 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/*nlsXXX*/ -package org.eclipse.wst.common.encoding.contentspecific.css; -import java.io.IOException; -import java.io.Reader; - -import org.eclipse.wst.common.encoding.contentspecific.EncodingParserConstants; -import org.eclipse.wst.common.encoding.contentspecific.HeadParserToken; -import org.eclipse.wst.common.encoding.contentspecific.IntStack; -import org.eclipse.wst.common.encoding.contentspecific.xml.XMLHeadTokenizerConstants; - - - -%% - -%{ - - - private boolean hasMore = true; - private final static int MAX_TO_SCAN = 8000; - StringBuffer string = new StringBuffer(); - // state stack for easier state handling - private IntStack fStateStack = new IntStack(); - private String valueText = null; - - - - public CSSHeadTokenizer() { - super(); - } - - public void reset (Reader in) { - /* the input device */ - yy_reader = in; - - /* the current state of the DFA */ - yy_state = 0; - - /* the current lexical state */ - yy_lexical_state = YYINITIAL; - - /* this buffer contains the current text to be matched and is - the source of the yytext() string */ - java.util.Arrays.fill(yy_buffer, (char)0); - - /* the textposition at the last accepting state */ - yy_markedPos = 0; - - /* the textposition at the last state to be included in yytext */ - yy_pushbackPos = 0; - - /* the current text position in the buffer */ - yy_currentPos = 0; - - /* startRead marks the beginning of the yytext() string in the buffer */ - yy_startRead = 0; - - /** - * endRead marks the last character in the buffer, that has been read - * from input - */ - yy_endRead = 0; - - /* number of newlines encountered up to the start of the matched text */ - yyline = 0; - - /* the number of characters up to the start of the matched text */ - yychar = 0; - - /** - * the number of characters from the last newline up to the start - * of the matched text - */ - yycolumn = 0; - - /** - * yy_atBOL == true <=> the scanner is currently at the beginning - * of a line - */ - yy_atBOL = false; - - /* yy_atEOF == true <=> the scanner has returned a value for EOF */ - yy_atEOF = false; - - /* denotes if the user-EOF-code has already been executed */ - yy_eof_done = false; - - - fStateStack.clear(); - - hasMore = true; - - // its a little wasteful to "throw away" first char array generated - // by class init (via auto generated code), but we really do want - // a small buffer for our head parsers. - if (yy_buffer.length != MAX_TO_SCAN) { - yy_buffer = new char[MAX_TO_SCAN]; - } - - - } - - - public final HeadParserToken getNextToken() throws IOException { - String context = null; - context = primGetNextToken(); - HeadParserToken result = null; - if (valueText != null) { - result = createToken(context, yychar, valueText); - valueText = null; - } else { - result = createToken(context, yychar, yytext()); - } - return result; - } - - public final boolean hasMoreTokens() { - return hasMore && yychar < MAX_TO_SCAN; - } - private void pushCurrentState() { - fStateStack.push(yystate()); - - } - - private void popState() { - yybegin(fStateStack.pop()); - } - private HeadParserToken createToken(String context, int start, String text) { - return new HeadParserToken(context, start, text); - } - - -%} - -%eof{ - hasMore=false; -%eof} - -%public -%class CSSHeadTokenizer -%function primGetNextToken -%type String -%char -%unicode -%ignorecase -%debug -%switch - - -UTF16BE = \xFE\xFF -UTF16LE = \xFF\xFE -UTF83ByteBOM = \xEF\xBB\xBF - -//SpaceChar = [\x20\x09] - - - -// [3] S ::= (0x20 | 0x9 | 0xD | 0xA)+ -S = [\x20\x09\x0D\x0A] - -BeginAttribeValue = {S}* \= {S}* - -LineTerminator = \r|\n - - -%state ST_XMLDecl -%state CHARSET_RULE -%state QuotedAttributeValue -%state DQ_STRING -%state SQ_STRING -%state UnDelimitedString - -%% - - -<YYINITIAL> -{ - {UTF16BE} {hasMore = false; return EncodingParserConstants.UTF16BE;} - {UTF16LE} {hasMore = false; return EncodingParserConstants.UTF16LE;} - {UTF83ByteBOM} {hasMore = false; return EncodingParserConstants.UTF83ByteBOM;} - - // force to be started on first line, but we do allow preceeding spaces - ^ {S}* "<\?xml" {S}+ {if (yychar == 0 ) {yybegin(ST_XMLDecl); return XMLHeadTokenizerConstants.XMLDeclStart;}} - - ^ {S}* "@charset" {if (yychar == 0 ) {yybegin(CHARSET_RULE); return CSSHeadTokenizerConstants.CHARSET_RULE;}} - - -} - -// I don't think there's really an XML form of CSS files ... but will leave here for consistency -<ST_XMLDecl> -{ - //"version" {BeginAttribeValue} {pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDeclVersion;} - "encoding" {BeginAttribeValue} {pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDelEncoding;} - // note this "forced end" once end of XML Declaration found - "\?>" {yybegin(YYINITIAL); return XMLHeadTokenizerConstants.XMLDeclEnd;} -} - -<CHARSET_RULE> -{ - - {S}* {pushCurrentState(); yybegin(QuotedAttributeValue);} - ";" { yybegin(YYINITIAL); hasMore = false; return CSSHeadTokenizerConstants.RuleEnd;} -} - - -<QuotedAttributeValue> -{ - \" { yybegin(DQ_STRING); string.setLength(0); } - \' { yybegin(SQ_STRING); string.setLength(0); } - // in this state, anything other than a space character can start an undelimited string - {S}*. { yypushback(1); yybegin(UnDelimitedString); string.setLength(0);} - -} - - -<DQ_STRING> -{ - - \" { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue; } - {LineTerminator} { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - "\?>" { yypushback(2); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - "<" { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - - ">" { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - "\/>" { yypushback(2); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - ";" { yypushback(1); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue; } - - . { string.append( yytext() ); } - - -} - -<SQ_STRING> -{ - - \' { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue;} - {LineTerminator} { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - "%>" { yypushback(2);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - "<" { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - ">" { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - "\/>" { yypushback(2); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - ";" { yypushback(1); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue; } - . { string.append( yytext() ); } - - -} - -<UnDelimitedString> -{ - - - {S} { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.UnDelimitedStringValue; } - {LineTerminator} { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - "\?>" { yypushback(2);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - "<" { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - // these are a bit special, since we started an undelimit string, but found a quote ... probably indicates a missing beginning quote - \' { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue;} - \" { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue;} - - ">" { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - "\/>" { yypushback(2); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - ";" { yypushback(1); popState(); valueText = string.toString(); return EncodingParserConstants.UnDelimitedStringValue; } - . { string.append( yytext() ); } - -} - -// The "match anything" rule should always be in effect except for when looking for end of string -// (That is, remember to update state list if/when new states added) -<YYINITIAL, ST_XMLDecl, QuotedAttributeValue, CHARSET_RULE> -{ -// this is the fallback (match "anything") rule (for this scanner, input is ignored, and position advanced, if not recognized) -.|\n {if (yychar > MAX_TO_SCAN) {hasMore=false; return EncodingParserConstants.MAX_CHARS_REACHED;}} -} - -// this rule always in effect -<<EOF>> {hasMore = false; return EncodingParserConstants.EOF;} +/******************************************************************************* + * Copyright (c) 2004, 2008 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +/*nlsXXX*/ +package org.eclipse.wst.css.core.internal.contenttype; +import java.io.IOException; +import java.io.Reader; + +import org.eclipse.wst.xml.core.internal.contenttype.EncodingParserConstants; +import org.eclipse.wst.xml.core.internal.contenttype.XMLHeadTokenizerConstants; + + + +%% + +%{ + + + private boolean hasMore = true; + private final static int MAX_TO_SCAN = 8000; + StringBuffer string = new StringBuffer(); + // state stack for easier state handling + private IntStack fStateStack = new IntStack(); + private String valueText = null; + + + + public CSSHeadTokenizer() { + super(); + } + + public void reset (Reader in) { + /* the input device */ + yy_reader = in; + + /* the current state of the DFA */ + yy_state = 0; + + /* the current lexical state */ + yy_lexical_state = YYINITIAL; + + /* this buffer contains the current text to be matched and is + the source of the yytext() string */ + java.util.Arrays.fill(yy_buffer, (char)0); + + /* the textposition at the last accepting state */ + yy_markedPos = 0; + + /* the textposition at the last state to be included in yytext */ + yy_pushbackPos = 0; + + /* the current text position in the buffer */ + yy_currentPos = 0; + + /* startRead marks the beginning of the yytext() string in the buffer */ + yy_startRead = 0; + + /** + * endRead marks the last character in the buffer, that has been read + * from input + */ + yy_endRead = 0; + + /* number of newlines encountered up to the start of the matched text */ + yyline = 0; + + /* the number of characters up to the start of the matched text */ + yychar = 0; + + /** + * the number of characters from the last newline up to the start + * of the matched text + */ + yycolumn = 0; + + /** + * yy_atBOL == true <=> the scanner is currently at the beginning + * of a line + */ + yy_atBOL = false; + + /* yy_atEOF == true <=> the scanner has returned a value for EOF */ + yy_atEOF = false; + + /* denotes if the user-EOF-code has already been executed */ + yy_eof_done = false; + + + fStateStack.clear(); + + hasMore = true; + + // its a little wasteful to "throw away" first char array generated + // by class init (via auto generated code), but we really do want + // a small buffer for our head parsers. + if (yy_buffer.length != MAX_TO_SCAN) { + yy_buffer = new char[MAX_TO_SCAN]; + } + + + } + + + public final HeadParserToken getNextToken() throws IOException { + String context = null; + context = primGetNextToken(); + HeadParserToken result = null; + if (valueText != null) { + result = createToken(context, yychar, valueText); + valueText = null; + } else { + result = createToken(context, yychar, yytext()); + } + return result; + } + + public final boolean hasMoreTokens() { + return hasMore && yychar < MAX_TO_SCAN; + } + private void pushCurrentState() { + fStateStack.push(yystate()); + + } + + private void popState() { + yybegin(fStateStack.pop()); + } + private HeadParserToken createToken(String context, int start, String text) { + return new HeadParserToken(context, start, text); + } + + +%} + +%eof{ + hasMore=false; +%eof} + +%public +%class CSSHeadTokenizer +%function primGetNextToken +%type String +%char +%unicode +%ignorecase +%debug +%switch + + +UTF16BE = \xFE\xFF +UTF16LE = \xFF\xFE +UTF83ByteBOM = \xEF\xBB\xBF + +//SpaceChar = [\x20\x09] + + + +// [3] S ::= (0x20 | 0x9 | 0xD | 0xA)+ +S = [\x20\x09\x0D\x0A] + +//BeginAttribeValue = {S}* \= {S}* + +LineTerminator = \r|\n + +// Z is the single-byte zero character to be used in parsing double-byte files +Z = (\x00)? +S_UTF = {Z}{S}{Z} +BeginAttributeValueUTF = {S_UTF}* \= {S_UTF}* + +%state ST_XMLDecl +%state CHARSET_RULE +%state QuotedAttributeValue +%state DQ_STRING +%state SQ_STRING +%state UnDelimitedString + +%% + + +<YYINITIAL> +{ + {UTF16BE} {hasMore = false; return EncodingParserConstants.UTF16BE;} + {UTF16LE} {hasMore = false; return EncodingParserConstants.UTF16LE;} + {UTF83ByteBOM} {hasMore = false; return EncodingParserConstants.UTF83ByteBOM;} + + // force to be started on first line, but we do allow preceeding spaces + ^ {Z}({S}{Z})* ({Z}<{Z}\?{Z}x{Z}m{Z}l{Z}){S_UTF}+ {if (yychar == 0 ) {yybegin(ST_XMLDecl); return XMLHeadTokenizerConstants.XMLDeclStart;}} + + ^ {Z}({S}{Z})*({Z}@{Z}c{Z}h{Z}a{Z}r{Z}s{Z}e{Z}t{Z}) {if (yychar == 0 ) {yybegin(CHARSET_RULE); return CSSHeadTokenizerConstants.CHARSET_RULE;}} +} + +// I don't think there's really an XML form of CSS files ... but will leave here for consistency +<ST_XMLDecl> +{ + //"version" {BeginAttribeValue} {pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDeclVersion;} + {Z}e{Z}n{Z}c{Z}o{Z}d{Z}i{Z}n{Z}g{Z} {BeginAttributeValueUTF} {pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDelEncoding;} + // note this "forced end" once end of XML Declaration found + {Z}\?{Z}>{Z} {yybegin(YYINITIAL); return XMLHeadTokenizerConstants.XMLDeclEnd;} +} + +<CHARSET_RULE> +{ + + {S_UTF}* {pushCurrentState(); yybegin(QuotedAttributeValue);} + {Z};{Z} { yybegin(YYINITIAL); hasMore = false; return CSSHeadTokenizerConstants.RuleEnd;} +} + + +<QuotedAttributeValue> +{ + {Z}\"{Z} { yybegin(DQ_STRING); string.setLength(0); } + {Z}\'{Z} { yybegin(SQ_STRING); string.setLength(0); } + // in this state, anything other than a space character can start an undelimited string + {S_UTF}*. { yypushback(yylength()); yybegin(UnDelimitedString); string.setLength(0);} + +} + + +<DQ_STRING> +{ + + {Z}\"{Z} { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue; } + {Z}{LineTerminator}{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}\?{Z}>{Z} { yypushback(yylength()); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}<{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + + {Z}>{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}\/{Z}>{Z} { yypushback(yylength()); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z};{Z} { yypushback(yylength()); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue; } + [^\x00] { string.append( yytext() ); } + + +} + +<SQ_STRING> +{ + + {Z}\'{Z} { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue;} + {Z}{LineTerminator}{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}%{Z}>{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}<{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}>{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}\/{Z}>{Z} { yypushback(yylength()); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z};{Z} { yypushback(yylength()); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue; } + [^\x00] { string.append( yytext() ); } + +} + +<UnDelimitedString> +{ + + + {S_UTF} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.UnDelimitedStringValue; } + {Z}{LineTerminator}{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}\?{Z}>{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}<{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + // these are a bit special, since we started an undelimit string, but found a quote ... probably indicates a missing beginning quote + {Z}\'{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue;} + {Z}\"{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue;} + + {Z}>{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}\/{Z}>{Z} { yypushback(yylength()); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z};{Z} { yypushback(yylength()); popState(); valueText = string.toString(); return EncodingParserConstants.UnDelimitedStringValue; } + [^\x00] { string.append( yytext() ); } +} + +// The "match anything" rule should always be in effect except for when looking for end of string +// (That is, remember to update state list if/when new states added) +.|\n {if(yychar > MAX_TO_SCAN) {hasMore=false; return EncodingParserConstants.MAX_CHARS_REACHED;}} + +// this rule always in effect +<<EOF>> {hasMore = false; return EncodingParserConstants.EOF;}
diff --git a/bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/CSSHeadTokenizer/CSSHeadTokenizer.java b/bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/CSSHeadTokenizer/CSSHeadTokenizer.java index 4dfc385..d2309dd 100644 --- a/bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/CSSHeadTokenizer/CSSHeadTokenizer.java +++ b/bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/CSSHeadTokenizer/CSSHeadTokenizer.java
@@ -1,5 +1,7 @@ +/* The following code was generated by JFlex 1.2.2 on 7/28/08 5:19 PM */ + /******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. + * Copyright (c) 2004, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -7,20 +9,14 @@ * * Contributors: * IBM Corporation - initial API and implementation - * Jens Lukowski/Innoopract - initial renaming/restructuring - * *******************************************************************************/ -/* The following code was generated by JFlex 1.2.2 on 1/27/04 6:42 PM */ - /*nlsXXX*/ -package org.eclipse.wst.common.encoding.contentspecific.css; +package org.eclipse.wst.css.core.internal.contenttype; import java.io.IOException; import java.io.Reader; -import org.eclipse.wst.common.encoding.contentspecific.EncodingParserConstants; -import org.eclipse.wst.common.encoding.contentspecific.HeadParserToken; -import org.eclipse.wst.common.encoding.contentspecific.IntStack; -import org.eclipse.wst.common.encoding.contentspecific.xml.XMLHeadTokenizerConstants; +import org.eclipse.wst.xml.core.internal.contenttype.EncodingParserConstants; +import org.eclipse.wst.xml.core.internal.contenttype.XMLHeadTokenizerConstants; @@ -28,8 +24,8 @@ /** * This class is a scanner generated by * <a href="http://www.informatik.tu-muenchen.de/~kleing/jflex/">JFlex</a> 1.2.2 - * on 1/27/04 6:42 PM from the specification file - * <tt>file:/D:/DevTimeSupport/HeadParsers/CSSHeadTokenizer/CSSHeadTokenizer.jflex</tt> + * on 7/28/08 5:19 PM from the specification file + * <tt>file:/D:/workspaces/wtp301/workspace/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/CSSHeadTokenizer/CSSHeadTokenizer.jFlex</tt> */ public class CSSHeadTokenizer { @@ -59,14 +55,14 @@ * Translates characters to character classes */ final private static String yycmap_packed = - "\11\0\1\6\1\11\2\0\1\10\22\0\1\6\1\0\1\36\2\0"+ - "\1\41\1\0\1\37\7\0\1\40\13\0\1\35\1\12\1\7\1\34"+ - "\1\13\1\17\1\22\1\0\1\20\1\31\1\25\1\0\1\33\1\21"+ - "\1\32\2\0\1\16\1\15\1\27\1\30\2\0\1\23\1\24\1\26"+ - "\3\0\1\14\10\0\1\22\1\0\1\20\1\31\1\25\1\0\1\33"+ - "\1\21\1\32\2\0\1\16\1\15\1\27\1\30\2\0\1\23\1\24"+ - "\1\26\3\0\1\14\102\0\1\4\3\0\1\5\17\0\1\3\16\0"+ - "\1\1\20\0\1\3\16\0\1\1\1\2\170\0\1\2\ufe87\0"; + "\1\11\10\0\1\6\1\10\2\0\1\7\22\0\1\6\1\0\1\37"+ + "\2\0\1\42\1\0\1\40\7\0\1\41\13\0\1\36\1\13\1\12"+ + "\1\35\1\14\1\20\1\23\1\0\1\21\1\32\1\26\1\0\1\34"+ + "\1\22\1\33\2\0\1\17\1\16\1\30\1\31\2\0\1\24\1\25"+ + "\1\27\3\0\1\15\10\0\1\23\1\0\1\21\1\32\1\26\1\0"+ + "\1\34\1\22\1\33\2\0\1\17\1\16\1\30\1\31\2\0\1\24"+ + "\1\25\1\27\3\0\1\15\102\0\1\4\3\0\1\5\17\0\1\3"+ + "\16\0\1\1\20\0\1\3\16\0\1\1\1\2\170\0\1\2\ufe87\0"; /** * Translates characters to character classes @@ -144,7 +140,7 @@ private boolean hasMore = true; - private final static int MAX_TO_SCAN = 1000; + private final static int MAX_TO_SCAN = 8000; StringBuffer string = new StringBuffer(); // state stack for easier state handling private IntStack fStateStack = new IntStack(); @@ -289,7 +285,7 @@ char [] map = new char[0x10000]; int i = 0; /* index in packed string */ int j = 0; /* index in unpacked array */ - while (i < 158) { + while (i < 160) { int count = packed.charAt(i++); char value = packed.charAt(i++); do map[j++] = value; while (--count > 0); @@ -496,324 +492,775 @@ case 2: yy_isFinal = true; yy_state = 10; break yy_forNext; case 3: yy_isFinal = true; yy_state = 11; break yy_forNext; case 6: - case 8: - case 9: yy_isFinal = true; yy_state = 12; break yy_forNext; - case 10: yy_isFinal = true; yy_state = 13; break yy_forNext; - case 15: yy_isFinal = true; yy_state = 14; break yy_forNext; + case 7: + case 8: yy_isFinal = true; yy_state = 12; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 13; break yy_forNext; + case 11: yy_isFinal = true; yy_state = 14; break yy_forNext; + case 16: yy_isFinal = true; yy_state = 15; break yy_forNext; default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 8; break yy_forNext; } case 2: switch (yy_input) { - case 11: yy_isFinal = true; yy_state = 15; break yy_forNext; - case 21: yy_isFinal = true; yy_state = 16; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 16; break yy_forNext; + case 12: yy_isFinal = true; yy_state = 17; break yy_forNext; + case 22: yy_isFinal = true; yy_state = 18; break yy_forNext; default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 8; break yy_forNext; } case 3: switch (yy_input) { case 6: - case 8: - case 9: yy_isFinal = true; yy_state = 17; break yy_forNext; - case 29: yy_isFinal = true; yy_noLookAhead = true; yy_state = 18; break yy_forNext; + case 7: + case 8: yy_isFinal = true; yy_state = 19; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 20; break yy_forNext; + case 30: yy_isFinal = true; yy_state = 21; break yy_forNext; default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 8; break yy_forNext; } case 4: switch (yy_input) { case 6: - case 8: yy_isFinal = true; yy_state = 20; break yy_forNext; - case 9: yy_isFinal = true; yy_state = 21; break yy_forNext; - case 30: yy_isFinal = true; yy_noLookAhead = true; yy_state = 22; break yy_forNext; - case 31: yy_isFinal = true; yy_noLookAhead = true; yy_state = 23; break yy_forNext; - default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 19; break yy_forNext; + case 7: yy_isFinal = true; yy_state = 23; break yy_forNext; + case 8: yy_isFinal = true; yy_state = 24; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 25; break yy_forNext; + case 31: yy_isFinal = true; yy_state = 26; break yy_forNext; + case 32: yy_isFinal = true; yy_state = 27; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 22; break yy_forNext; } case 5: switch (yy_input) { + case 7: case 8: - case 9: - case 10: - case 28: yy_isFinal = true; yy_noLookAhead = true; yy_state = 25; break yy_forNext; case 11: - case 32: yy_isFinal = true; yy_state = 26; break yy_forNext; - case 29: yy_isFinal = true; yy_noLookAhead = true; yy_state = 27; break yy_forNext; - case 30: yy_isFinal = true; yy_noLookAhead = true; yy_state = 28; break yy_forNext; - default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 24; break yy_forNext; + case 29: yy_isFinal = true; yy_state = 29; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 30; break yy_forNext; + case 12: + case 33: yy_isFinal = true; yy_state = 31; break yy_forNext; + case 30: yy_isFinal = true; yy_state = 32; break yy_forNext; + case 31: yy_isFinal = true; yy_state = 33; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 28; break yy_forNext; } case 6: switch (yy_input) { + case 7: case 8: - case 9: - case 10: - case 28: yy_isFinal = true; yy_noLookAhead = true; yy_state = 25; break yy_forNext; - case 32: yy_isFinal = true; yy_state = 26; break yy_forNext; - case 29: yy_isFinal = true; yy_noLookAhead = true; yy_state = 27; break yy_forNext; - case 31: yy_isFinal = true; yy_noLookAhead = true; yy_state = 28; break yy_forNext; - case 33: yy_isFinal = true; yy_state = 29; break yy_forNext; - default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 24; break yy_forNext; + case 11: + case 29: yy_isFinal = true; yy_state = 29; break yy_forNext; + case 33: yy_isFinal = true; yy_state = 31; break yy_forNext; + case 30: yy_isFinal = true; yy_state = 32; break yy_forNext; + case 32: yy_isFinal = true; yy_state = 33; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 34; break yy_forNext; + case 34: yy_isFinal = true; yy_state = 35; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 28; break yy_forNext; } case 7: switch (yy_input) { - case 10: - case 28: yy_isFinal = true; yy_noLookAhead = true; yy_state = 25; break yy_forNext; - case 32: yy_isFinal = true; yy_state = 26; break yy_forNext; - case 11: yy_isFinal = true; yy_state = 29; break yy_forNext; + case 11: + case 29: yy_isFinal = true; yy_state = 29; break yy_forNext; + case 33: yy_isFinal = true; yy_state = 31; break yy_forNext; + case 12: yy_isFinal = true; yy_state = 35; break yy_forNext; case 6: - case 8: - case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 30; break yy_forNext; - case 29: yy_isFinal = true; yy_noLookAhead = true; yy_state = 31; break yy_forNext; - case 30: - case 31: yy_isFinal = true; yy_noLookAhead = true; yy_state = 32; break yy_forNext; - default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 24; break yy_forNext; + case 7: + case 8: yy_isFinal = true; yy_state = 36; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 37; break yy_forNext; + case 30: yy_isFinal = true; yy_state = 38; break yy_forNext; + case 31: + case 32: yy_isFinal = true; yy_state = 39; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 28; break yy_forNext; } case 9: switch (yy_input) { - case 2: yy_isFinal = true; yy_noLookAhead = true; yy_state = 33; break yy_forNext; + case 2: yy_isFinal = true; yy_noLookAhead = true; yy_state = 40; break yy_forNext; default: break yy_forAction; } case 10: switch (yy_input) { - case 1: yy_isFinal = true; yy_noLookAhead = true; yy_state = 34; break yy_forNext; + case 1: yy_isFinal = true; yy_noLookAhead = true; yy_state = 41; break yy_forNext; default: break yy_forAction; } case 11: switch (yy_input) { - case 4: yy_state = 35; break yy_forNext; + case 4: yy_state = 42; break yy_forNext; default: break yy_forAction; } case 12: switch (yy_input) { case 6: - case 8: - case 9: yy_state = 36; break yy_forNext; - case 10: yy_state = 37; break yy_forNext; - case 15: yy_state = 38; break yy_forNext; + case 7: + case 8: yy_state = 43; break yy_forNext; + case 9: yy_state = 44; break yy_forNext; + case 11: yy_state = 45; break yy_forNext; + case 16: yy_state = 46; break yy_forNext; default: break yy_forAction; } case 13: switch (yy_input) { - case 11: yy_state = 39; break yy_forNext; + case 6: + case 7: + case 8: yy_state = 43; break yy_forNext; + case 11: yy_state = 45; break yy_forNext; + case 16: yy_state = 46; break yy_forNext; + case 9: yy_state = 47; break yy_forNext; default: break yy_forAction; } case 14: switch (yy_input) { - case 16: yy_state = 40; break yy_forNext; + case 9: yy_state = 48; break yy_forNext; + case 12: yy_state = 49; break yy_forNext; default: break yy_forAction; } case 15: switch (yy_input) { - case 28: yy_isFinal = true; yy_noLookAhead = true; yy_state = 41; break yy_forNext; + case 9: yy_state = 50; break yy_forNext; + case 17: yy_state = 51; break yy_forNext; default: break yy_forAction; } case 16: switch (yy_input) { - case 23: yy_state = 42; break yy_forNext; + case 12: yy_state = 52; break yy_forNext; + case 22: yy_state = 53; break yy_forNext; default: break yy_forAction; } case 17: switch (yy_input) { + case 9: yy_state = 54; break yy_forNext; + case 29: yy_isFinal = true; yy_state = 55; break yy_forNext; + default: break yy_forAction; + } + + case 18: + switch (yy_input) { + case 9: yy_state = 56; break yy_forNext; + case 24: yy_state = 57; break yy_forNext; + default: break yy_forAction; + } + + case 19: + switch (yy_input) { case 6: - case 8: - case 9: yy_isFinal = true; yy_state = 17; break yy_forNext; + case 7: + case 8: yy_isFinal = true; yy_state = 19; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 58; break yy_forNext; default: break yy_forAction; } case 20: switch (yy_input) { case 6: - case 8: yy_isFinal = true; yy_state = 20; break yy_forNext; - case 9: yy_state = 43; break yy_forNext; - default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 19; break yy_forNext; + case 7: + case 8: yy_isFinal = true; yy_state = 19; break yy_forNext; + case 30: yy_isFinal = true; yy_state = 21; break yy_forNext; + default: break yy_forAction; } case 21: switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 59; break yy_forNext; + default: break yy_forAction; + } + + case 23: + switch (yy_input) { case 6: - case 8: yy_isFinal = true; yy_state = 20; break yy_forNext; - case 9: yy_state = 43; break yy_forNext; - default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 19; break yy_forNext; + case 7: yy_isFinal = true; yy_state = 23; break yy_forNext; + case 8: yy_state = 60; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 61; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 22; break yy_forNext; + } + + case 24: + switch (yy_input) { + case 6: + case 7: yy_isFinal = true; yy_state = 23; break yy_forNext; + case 8: yy_state = 60; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 61; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 22; break yy_forNext; + } + + case 25: + switch (yy_input) { + case 31: yy_isFinal = true; yy_state = 26; break yy_forNext; + case 32: yy_isFinal = true; yy_state = 27; break yy_forNext; + case 6: + case 7: + case 8: yy_state = 60; break yy_forNext; + default: break yy_forAction; } case 26: switch (yy_input) { - case 28: yy_isFinal = true; yy_noLookAhead = true; yy_state = 44; break yy_forNext; + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 62; break yy_forNext; + default: break yy_forAction; + } + + case 27: + switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 63; break yy_forNext; default: break yy_forAction; } case 29: switch (yy_input) { - case 28: yy_isFinal = true; yy_noLookAhead = true; yy_state = 45; break yy_forNext; + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 64; break yy_forNext; + default: break yy_forAction; + } + + case 30: + switch (yy_input) { + case 7: + case 8: + case 11: + case 29: yy_isFinal = true; yy_state = 29; break yy_forNext; + case 30: yy_isFinal = true; yy_state = 32; break yy_forNext; + case 31: yy_isFinal = true; yy_state = 33; break yy_forNext; + case 12: + case 33: yy_state = 65; break yy_forNext; + default: break yy_forAction; + } + + case 31: + switch (yy_input) { + case 29: yy_isFinal = true; yy_state = 32; break yy_forNext; + case 9: yy_state = 66; break yy_forNext; + default: break yy_forAction; + } + + case 32: + switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 67; break yy_forNext; + default: break yy_forAction; + } + + case 33: + switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 68; break yy_forNext; + default: break yy_forAction; + } + + case 34: + switch (yy_input) { + case 7: + case 8: + case 11: + case 29: yy_isFinal = true; yy_state = 29; break yy_forNext; + case 30: yy_isFinal = true; yy_state = 32; break yy_forNext; + case 32: yy_isFinal = true; yy_state = 33; break yy_forNext; + case 33: yy_state = 65; break yy_forNext; + case 34: yy_state = 69; break yy_forNext; default: break yy_forAction; } case 35: switch (yy_input) { - case 5: yy_isFinal = true; yy_noLookAhead = true; yy_state = 46; break yy_forNext; + case 29: yy_isFinal = true; yy_state = 29; break yy_forNext; + case 9: yy_state = 70; break yy_forNext; default: break yy_forAction; } case 36: switch (yy_input) { - case 6: - case 8: - case 9: yy_state = 36; break yy_forNext; - case 10: yy_state = 37; break yy_forNext; - case 15: yy_state = 38; break yy_forNext; + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 71; break yy_forNext; default: break yy_forAction; } case 37: switch (yy_input) { - case 11: yy_state = 39; break yy_forNext; + case 11: + case 29: yy_isFinal = true; yy_state = 29; break yy_forNext; + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 36; break yy_forNext; + case 30: yy_isFinal = true; yy_state = 38; break yy_forNext; + case 31: + case 32: yy_isFinal = true; yy_state = 39; break yy_forNext; + case 33: yy_state = 65; break yy_forNext; + case 12: yy_state = 69; break yy_forNext; default: break yy_forAction; } case 38: switch (yy_input) { - case 16: yy_state = 40; break yy_forNext; + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 72; break yy_forNext; default: break yy_forAction; } case 39: switch (yy_input) { - case 12: yy_state = 47; break yy_forNext; - default: break yy_forAction; - } - - case 40: - switch (yy_input) { - case 17: yy_state = 48; break yy_forNext; + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 73; break yy_forNext; default: break yy_forAction; } case 42: switch (yy_input) { - case 16: yy_state = 49; break yy_forNext; + case 5: yy_isFinal = true; yy_noLookAhead = true; yy_state = 74; break yy_forNext; default: break yy_forAction; } case 43: switch (yy_input) { case 6: - case 8: yy_isFinal = true; yy_state = 20; break yy_forNext; - case 9: yy_state = 43; break yy_forNext; - default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 19; break yy_forNext; + case 7: + case 8: yy_state = 43; break yy_forNext; + case 9: yy_state = 44; break yy_forNext; + case 11: yy_state = 45; break yy_forNext; + case 16: yy_state = 46; break yy_forNext; + default: break yy_forAction; + } + + case 44: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 43; break yy_forNext; + case 11: yy_state = 45; break yy_forNext; + case 16: yy_state = 46; break yy_forNext; + case 9: yy_state = 47; break yy_forNext; + default: break yy_forAction; + } + + case 45: + switch (yy_input) { + case 9: yy_state = 48; break yy_forNext; + case 12: yy_state = 49; break yy_forNext; + default: break yy_forAction; + } + + case 46: + switch (yy_input) { + case 9: yy_state = 50; break yy_forNext; + case 17: yy_state = 51; break yy_forNext; + default: break yy_forAction; } case 47: switch (yy_input) { - case 13: yy_state = 50; break yy_forNext; + case 11: yy_state = 45; break yy_forNext; + case 16: yy_state = 46; break yy_forNext; default: break yy_forAction; } case 48: switch (yy_input) { - case 18: yy_state = 51; break yy_forNext; + case 12: yy_state = 49; break yy_forNext; default: break yy_forAction; } case 49: switch (yy_input) { - case 24: yy_state = 52; break yy_forNext; + case 9: yy_state = 75; break yy_forNext; + case 13: yy_state = 76; break yy_forNext; default: break yy_forAction; } case 50: switch (yy_input) { - case 14: yy_state = 53; break yy_forNext; + case 17: yy_state = 51; break yy_forNext; default: break yy_forAction; } case 51: switch (yy_input) { - case 19: yy_state = 54; break yy_forNext; + case 9: yy_state = 77; break yy_forNext; + case 18: yy_state = 78; break yy_forNext; default: break yy_forAction; } case 52: switch (yy_input) { - case 25: yy_state = 55; break yy_forNext; + case 9: yy_state = 54; break yy_forNext; + case 29: yy_isFinal = true; yy_state = 55; break yy_forNext; default: break yy_forAction; } case 53: switch (yy_input) { - case 6: - case 8: - case 9: yy_isFinal = true; yy_state = 56; break yy_forNext; + case 9: yy_state = 56; break yy_forNext; + case 24: yy_state = 57; break yy_forNext; default: break yy_forAction; } case 54: switch (yy_input) { - case 20: yy_state = 57; break yy_forNext; + case 29: yy_isFinal = true; yy_state = 55; break yy_forNext; default: break yy_forAction; } case 55: switch (yy_input) { - case 26: yy_state = 58; break yy_forNext; + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 79; break yy_forNext; default: break yy_forAction; } case 56: switch (yy_input) { - case 6: - case 8: - case 9: yy_isFinal = true; yy_state = 56; break yy_forNext; + case 24: yy_state = 57; break yy_forNext; default: break yy_forAction; } case 57: switch (yy_input) { - case 21: yy_state = 59; break yy_forNext; + case 9: yy_state = 80; break yy_forNext; + case 17: yy_state = 81; break yy_forNext; default: break yy_forAction; } case 58: switch (yy_input) { - case 23: yy_state = 60; break yy_forNext; - default: break yy_forAction; - } - - case 59: - switch (yy_input) { - case 22: yy_isFinal = true; yy_noLookAhead = true; yy_state = 61; break yy_forNext; + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 19; break yy_forNext; + case 9: yy_state = 82; break yy_forNext; default: break yy_forAction; } case 60: switch (yy_input) { - case 27: yy_state = 62; break yy_forNext; + case 6: + case 7: yy_isFinal = true; yy_state = 23; break yy_forNext; + case 8: yy_state = 60; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 61; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 22; break yy_forNext; + } + + case 61: + switch (yy_input) { + case 6: + case 7: yy_isFinal = true; yy_state = 23; break yy_forNext; + case 8: yy_state = 60; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 83; break yy_forNext; + default: yy_isFinal = true; yy_noLookAhead = true; yy_state = 22; break yy_forNext; + } + + case 65: + switch (yy_input) { + case 29: yy_isFinal = true; yy_state = 32; break yy_forNext; + case 9: yy_state = 66; break yy_forNext; default: break yy_forAction; } - case 62: + case 66: switch (yy_input) { - case 6: - case 8: - case 9: yy_state = 62; break yy_forNext; - case 7: yy_isFinal = true; yy_state = 63; break yy_forNext; + case 29: yy_isFinal = true; yy_state = 32; break yy_forNext; default: break yy_forAction; } - case 63: + case 69: + switch (yy_input) { + case 29: yy_isFinal = true; yy_state = 29; break yy_forNext; + case 9: yy_state = 70; break yy_forNext; + default: break yy_forAction; + } + + case 70: + switch (yy_input) { + case 29: yy_isFinal = true; yy_state = 29; break yy_forNext; + default: break yy_forAction; + } + + case 75: + switch (yy_input) { + case 13: yy_state = 76; break yy_forNext; + default: break yy_forAction; + } + + case 76: + switch (yy_input) { + case 9: yy_state = 84; break yy_forNext; + case 14: yy_state = 85; break yy_forNext; + default: break yy_forAction; + } + + case 77: + switch (yy_input) { + case 18: yy_state = 78; break yy_forNext; + default: break yy_forAction; + } + + case 78: + switch (yy_input) { + case 9: yy_state = 86; break yy_forNext; + case 19: yy_state = 87; break yy_forNext; + default: break yy_forAction; + } + + case 80: + switch (yy_input) { + case 17: yy_state = 81; break yy_forNext; + default: break yy_forAction; + } + + case 81: + switch (yy_input) { + case 9: yy_state = 88; break yy_forNext; + case 25: yy_state = 89; break yy_forNext; + default: break yy_forAction; + } + + case 82: switch (yy_input) { case 6: - case 8: - case 9: yy_isFinal = true; yy_state = 63; break yy_forNext; + case 7: + case 8: yy_isFinal = true; yy_state = 19; break yy_forNext; + default: break yy_forAction; + } + + case 83: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 60; break yy_forNext; + default: break yy_forAction; + } + + case 84: + switch (yy_input) { + case 14: yy_state = 85; break yy_forNext; + default: break yy_forAction; + } + + case 85: + switch (yy_input) { + case 9: yy_state = 90; break yy_forNext; + case 15: yy_state = 91; break yy_forNext; + default: break yy_forAction; + } + + case 86: + switch (yy_input) { + case 19: yy_state = 87; break yy_forNext; + default: break yy_forAction; + } + + case 87: + switch (yy_input) { + case 9: yy_state = 92; break yy_forNext; + case 20: yy_state = 93; break yy_forNext; + default: break yy_forAction; + } + + case 88: + switch (yy_input) { + case 25: yy_state = 89; break yy_forNext; + default: break yy_forAction; + } + + case 89: + switch (yy_input) { + case 9: yy_state = 94; break yy_forNext; + case 26: yy_state = 95; break yy_forNext; + default: break yy_forAction; + } + + case 90: + switch (yy_input) { + case 15: yy_state = 91; break yy_forNext; + default: break yy_forAction; + } + + case 91: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 96; break yy_forNext; + case 9: yy_state = 97; break yy_forNext; + default: break yy_forAction; + } + + case 92: + switch (yy_input) { + case 20: yy_state = 93; break yy_forNext; + default: break yy_forAction; + } + + case 93: + switch (yy_input) { + case 9: yy_state = 98; break yy_forNext; + case 21: yy_state = 99; break yy_forNext; + default: break yy_forAction; + } + + case 94: + switch (yy_input) { + case 26: yy_state = 95; break yy_forNext; + default: break yy_forAction; + } + + case 95: + switch (yy_input) { + case 9: yy_state = 100; break yy_forNext; + case 27: yy_state = 101; break yy_forNext; + default: break yy_forAction; + } + + case 96: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 96; break yy_forNext; + case 9: yy_isFinal = true; yy_state = 102; break yy_forNext; + default: break yy_forAction; + } + + case 97: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 96; break yy_forNext; + case 9: yy_state = 103; break yy_forNext; + default: break yy_forAction; + } + + case 98: + switch (yy_input) { + case 21: yy_state = 99; break yy_forNext; + default: break yy_forAction; + } + + case 99: + switch (yy_input) { + case 9: yy_state = 104; break yy_forNext; + case 22: yy_state = 105; break yy_forNext; + default: break yy_forAction; + } + + case 100: + switch (yy_input) { + case 27: yy_state = 101; break yy_forNext; + default: break yy_forAction; + } + + case 101: + switch (yy_input) { + case 9: yy_state = 106; break yy_forNext; + case 24: yy_state = 107; break yy_forNext; + default: break yy_forAction; + } + + case 102: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 96; break yy_forNext; + case 9: yy_state = 103; break yy_forNext; + default: break yy_forAction; + } + + case 103: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 96; break yy_forNext; + default: break yy_forAction; + } + + case 104: + switch (yy_input) { + case 22: yy_state = 105; break yy_forNext; + default: break yy_forAction; + } + + case 105: + switch (yy_input) { + case 9: yy_state = 108; break yy_forNext; + case 23: yy_isFinal = true; yy_state = 109; break yy_forNext; + default: break yy_forAction; + } + + case 106: + switch (yy_input) { + case 24: yy_state = 107; break yy_forNext; + default: break yy_forAction; + } + + case 107: + switch (yy_input) { + case 9: yy_state = 110; break yy_forNext; + case 28: yy_state = 111; break yy_forNext; + default: break yy_forAction; + } + + case 108: + switch (yy_input) { + case 23: yy_isFinal = true; yy_state = 109; break yy_forNext; + default: break yy_forAction; + } + + case 109: + switch (yy_input) { + case 9: yy_isFinal = true; yy_noLookAhead = true; yy_state = 112; break yy_forNext; + default: break yy_forAction; + } + + case 110: + switch (yy_input) { + case 28: yy_state = 111; break yy_forNext; + default: break yy_forAction; + } + + case 111: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 111; break yy_forNext; + case 9: yy_state = 113; break yy_forNext; + case 10: yy_isFinal = true; yy_state = 114; break yy_forNext; + default: break yy_forAction; + } + + case 113: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 111; break yy_forNext; + case 10: yy_isFinal = true; yy_state = 114; break yy_forNext; + case 9: yy_state = 115; break yy_forNext; + default: break yy_forAction; + } + + case 114: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 116; break yy_forNext; + case 9: yy_state = 117; break yy_forNext; + default: break yy_forAction; + } + + case 115: + switch (yy_input) { + case 6: + case 7: + case 8: yy_state = 111; break yy_forNext; + default: break yy_forAction; + } + + case 116: + switch (yy_input) { + case 9: yy_isFinal = true; yy_state = 114; break yy_forNext; + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 116; break yy_forNext; + default: break yy_forAction; + } + + case 117: + switch (yy_input) { + case 6: + case 7: + case 8: yy_isFinal = true; yy_state = 116; break yy_forNext; default: break yy_forAction; } @@ -834,31 +1281,33 @@ switch (yy_action) { - case 45: - { yypushback(2);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue; } - case 65: break; + case 29: + case 64: + { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue; } + case 119: break; + case 22: + case 23: case 25: - { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue; } - case 66: break; - case 19: - case 20: - { yypushback(1); yybegin(UnDelimitedString); string.setLength(0); } - case 67: break; - case 18: - { yybegin(YYINITIAL); hasMore = false; return CSSHeadTokenizerConstants.RuleEnd; } - case 68: break; - case 32: - { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue; } - case 69: break; - case 44: - { yypushback(2); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue; } - case 70: break; case 61: + case 83: + { yypushback(yylength()); yybegin(UnDelimitedString); string.setLength(0); } + case 120: break; + case 21: + case 59: + { yybegin(YYINITIAL); hasMore = false; return CSSHeadTokenizerConstants.RuleEnd; } + case 121: break; + case 39: + case 73: + { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue; } + case 122: break; + case 109: + case 112: { if (yychar == 0 ) {yybegin(CHARSET_RULE); return CSSHeadTokenizerConstants.CHARSET_RULE;} } - case 71: break; - case 56: + case 123: break; + case 96: + case 102: { if (yychar == 0 ) {yybegin(ST_XMLDecl); return XMLHeadTokenizerConstants.XMLDeclStart;} } - case 72: break; + case 124: break; case 8: case 9: case 10: @@ -868,51 +1317,66 @@ case 14: case 15: case 16: - case 21: - { if (yychar > MAX_TO_SCAN) {hasMore=false; return EncodingParserConstants.MAX_CHARS_REACHED;} } - case 73: break; - case 41: - { yybegin(YYINITIAL); return XMLHeadTokenizerConstants.XMLDeclEnd; } - case 74: break; - case 63: - { pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDelEncoding; } - case 75: break; - case 3: case 17: - { pushCurrentState(); yybegin(QuotedAttributeValue); } - case 76: break; - case 46: - { hasMore = false; return EncodingParserConstants.UTF83ByteBOM; } - case 77: break; - case 33: - { hasMore = false; return EncodingParserConstants.UTF16BE; } - case 78: break; - case 34: - { hasMore = false; return EncodingParserConstants.UTF16LE; } - case 79: break; + case 18: + case 20: case 24: - case 26: - case 29: - { string.append( yytext() ); } - case 80: break; - case 23: - { yybegin(SQ_STRING); string.setLength(0); } - case 81: break; - case 22: - { yybegin(DQ_STRING); string.setLength(0); } - case 82: break; - case 27: - { yypushback(1); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue; } - case 83: break; - case 28: - { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue; } - case 84: break; case 30: - { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.UnDelimitedStringValue; } - case 85: break; + case 34: + case 37: + { if(yychar > MAX_TO_SCAN) {hasMore=false; return EncodingParserConstants.MAX_CHARS_REACHED;} } + case 125: break; + case 55: + case 79: + { yybegin(YYINITIAL); return XMLHeadTokenizerConstants.XMLDeclEnd; } + case 126: break; + case 114: + case 116: + { pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDelEncoding; } + case 127: break; + case 3: + case 19: + case 58: + { pushCurrentState(); yybegin(QuotedAttributeValue); } + case 128: break; + case 40: + { hasMore = false; return EncodingParserConstants.UTF16BE; } + case 129: break; + case 41: + { hasMore = false; return EncodingParserConstants.UTF16LE; } + case 130: break; + case 74: + { hasMore = false; return EncodingParserConstants.UTF83ByteBOM; } + case 131: break; + case 28: case 31: - { yypushback(1); popState(); valueText = string.toString(); return EncodingParserConstants.UnDelimitedStringValue; } - case 86: break; + case 35: + { string.append( yytext() ); } + case 132: break; + case 27: + case 63: + { yybegin(SQ_STRING); string.setLength(0); } + case 133: break; + case 26: + case 62: + { yybegin(DQ_STRING); string.setLength(0); } + case 134: break; + case 32: + case 67: + { yypushback(yylength()); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue; } + case 135: break; + case 33: + case 68: + { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue; } + case 136: break; + case 36: + case 71: + { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.UnDelimitedStringValue; } + case 137: break; + case 38: + case 72: + { yypushback(yylength()); popState(); valueText = string.toString(); return EncodingParserConstants.UnDelimitedStringValue; } + case 138: break; default: if (yy_input == YYEOF && yy_startRead == yy_currentPos) { yy_atEOF = true;
diff --git a/bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/HTMLHeadTokenizer/HTMLHeadTokenizer.jFlex b/bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/HTMLHeadTokenizer/HTMLHeadTokenizer.jFlex index 2bc923d..fd5dc23 100644 --- a/bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/HTMLHeadTokenizer/HTMLHeadTokenizer.jFlex +++ b/bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/HTMLHeadTokenizer/HTMLHeadTokenizer.jFlex
@@ -1,285 +1,292 @@ -/******************************************************************************* - * Copyright (c) 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/*nlsXXX*/ -package org.eclipse.wst.common.encoding.contentspecific.html; -import java.io.IOException; -import java.io.Reader; - -import org.eclipse.wst.common.encoding.contentspecific.EncodingParserConstants; -import org.eclipse.wst.common.encoding.contentspecific.HeadParserToken; -import org.eclipse.wst.common.encoding.contentspecific.IntStack; -import org.eclipse.wst.common.encoding.contentspecific.xml.XMLHeadTokenizerConstants; - - - -%% - -%{ - - - private boolean hasMore = true; - private final static int MAX_TO_SCAN = 8000; - StringBuffer string = new StringBuffer(); - // state stack for easier state handling - private IntStack fStateStack = new IntStack(); - private String valueText = null; - boolean foundContentTypeValue = false; - - - - public HTMLHeadTokenizer() { - super(); - } - - public void reset (Reader in) { - /* the input device */ - yy_reader = in; - - /* the current state of the DFA */ - yy_state = 0; - - /* the current lexical state */ - yy_lexical_state = YYINITIAL; - - /* this buffer contains the current text to be matched and is - the source of the yytext() string */ - java.util.Arrays.fill(yy_buffer, (char)0); - - /* the textposition at the last accepting state */ - yy_markedPos = 0; - - /* the textposition at the last state to be included in yytext */ - yy_pushbackPos = 0; - - /* the current text position in the buffer */ - yy_currentPos = 0; - - /* startRead marks the beginning of the yytext() string in the buffer */ - yy_startRead = 0; - - /** - * endRead marks the last character in the buffer, that has been read - * from input - */ - yy_endRead = 0; - - /* number of newlines encountered up to the start of the matched text */ - yyline = 0; - - /* the number of characters up to the start of the matched text */ - yychar = 0; - - /** - * the number of characters from the last newline up to the start - * of the matched text - */ - yycolumn = 0; - - /** - * yy_atBOL == true <=> the scanner is currently at the beginning - * of a line - */ - yy_atBOL = false; - - /* yy_atEOF == true <=> the scanner has returned a value for EOF */ - yy_atEOF = false; - - /* denotes if the user-EOF-code has already been executed */ - yy_eof_done = false; - - - fStateStack.clear(); - - hasMore = true; - - // its a little wasteful to "throw away" first char array generated - // by class init (via auto generated code), but we really do want - // a small buffer for our head parsers. - if (yy_buffer.length != MAX_TO_SCAN) { - yy_buffer = new char[MAX_TO_SCAN]; - } - - - } - - - public final HeadParserToken getNextToken() throws IOException { - String context = null; - context = primGetNextToken(); - HeadParserToken result = null; - if (valueText != null) { - result = createToken(context, yychar, valueText); - valueText = null; - } else { - result = createToken(context, yychar, yytext()); - } - return result; - } - - public final boolean hasMoreTokens() { - return hasMore && yychar < MAX_TO_SCAN; - } - private void pushCurrentState() { - fStateStack.push(yystate()); - - } - - private void popState() { - yybegin(fStateStack.pop()); - } - private HeadParserToken createToken(String context, int start, String text) { - return new HeadParserToken(context, start, text); - } - - -%} - -%eof{ - hasMore=false; -%eof} - -%public -%class HTMLHeadTokenizer -%function primGetNextToken -%type String -%char -%unicode -%ignorecase -%debug -%switch - - -UTF16BE = \xFE\xFF -UTF16LE = \xFF\xFE -UTF83ByteBOM = \xEF\xBB\xBF - -SpaceChar = [\x20\x09] - - - -// [3] S ::= (0x20 | 0x9 | 0xD | 0xA)+ -S = [\x20\x09\x0D\x0A] - -BeginAttribeValue = {S}* \= {S}* - -LineTerminator = \r|\n - - -%state ST_XMLDecl -%state ST_META_TAG -%state QuotedAttributeValue -%state DQ_STRING -%state SQ_STRING -%state UnDelimitedString - -%% - - -<YYINITIAL> -{ - {UTF16BE} {hasMore = false; return EncodingParserConstants.UTF16BE;} - {UTF16LE} {hasMore = false; return EncodingParserConstants.UTF16LE;} - {UTF83ByteBOM} {hasMore = false; return EncodingParserConstants.UTF83ByteBOM;} - - // force to be started on first line, but we do allow preceeding spaces - ^ {S}* "<\?xml" {S}+ {if (yychar == 0 ) {yybegin(ST_XMLDecl); return XMLHeadTokenizerConstants.XMLDeclStart;}} - - "<META " {yybegin(ST_META_TAG); return HTMLHeadTokenizerConstants.MetaTagStart;} - - -} - -<ST_XMLDecl> -{ - //"version" {BeginAttribeValue} {pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDeclVersion;} - "encoding" {BeginAttribeValue} {pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDelEncoding;} - // note this "forced end" once end of XML Declaration found - "\?>" {yybegin(YYINITIAL); return XMLHeadTokenizerConstants.XMLDeclEnd;} -} - -<ST_META_TAG> -{ - - "http-equiv" {S}* \= {S}* \"? "Content-Type" \"? {S}+ "content" {BeginAttribeValue} {pushCurrentState(); yybegin(QuotedAttributeValue); foundContentTypeValue=true; return HTMLHeadTokenizerConstants.MetaTagContentType;} - ">" { yybegin(YYINITIAL); if (foundContentTypeValue) hasMore = false; return HTMLHeadTokenizerConstants.MetaTagEnd;} - "\/>" { yybegin(YYINITIAL); if (foundContentTypeValue) hasMore = false; return HTMLHeadTokenizerConstants.MetaTagEnd;} -} - - -<QuotedAttributeValue> -{ - \" { yybegin(DQ_STRING); string.setLength(0); } - \' { yybegin(SQ_STRING); string.setLength(0); } - // in this state, anything other than a space character can start an undelimited string - {S}*. { yypushback(1); yybegin(UnDelimitedString); string.setLength(0);} - -} - - -<DQ_STRING> -{ - - \" { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue; } - {LineTerminator} { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - "\?>" { yypushback(2); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - "<" { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - - ">" { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - "\/>" { yypushback(2); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - . { string.append( yytext() ); } - - -} - -<SQ_STRING> -{ - - \' { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue;} - {LineTerminator} { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - "%>" { yypushback(2);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - "<" { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - ">" { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - "\/>" { yypushback(2); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - . { string.append( yytext() ); } - - -} - -<UnDelimitedString> -{ - - - // note this initial special case for HTTP contenttype values - ";"{S}* { string.append( yytext() ); } - {S} { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.UnDelimitedStringValue; } - {LineTerminator} { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - "\?>" { yypushback(2);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - "<" { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - // these are a bit special, since we started an undelimit string, but found a quote ... probably indicates a missing beginning quote - \' { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue;} - \" { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue;} - - ">" { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - "\/>" { yypushback(2); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - . { string.append( yytext() ); } - -} - -// The "match anything" rule should always be in effect except for when looking for end of string -// (That is, remember to update state list if/when new states added) -<YYINITIAL, ST_XMLDecl, QuotedAttributeValue, ST_META_TAG> -{ -// this is the fallback (match "anything") rule (for this scanner, input is ignored, and position advanced, if not recognized) -.|\n {if (yychar > MAX_TO_SCAN) {hasMore=false; return EncodingParserConstants.MAX_CHARS_REACHED;}} -} - -// this rule always in effect -<<EOF>> {hasMore = false; return EncodingParserConstants.EOF;} +/******************************************************************************* + * Copyright (c) 2004, 2008 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +/*nlsXXX*/ +package org.eclipse.wst.html.core.internal.contenttype; +import java.io.IOException; +import java.io.Reader; + +import org.eclipse.wst.xml.core.internal.contenttype.EncodingParserConstants; +import org.eclipse.wst.xml.core.internal.contenttype.XMLHeadTokenizerConstants; + + + +%% + +%{ + + + private boolean hasMore = true; + private final static int MAX_TO_SCAN = 8000; + StringBuffer string = new StringBuffer(); + // state stack for easier state handling + private IntStack fStateStack = new IntStack(); + private String valueText = null; + boolean foundContentTypeValue = false; + + + + public HTMLHeadTokenizer() { + super(); + } + + public void reset (Reader in) { + /* the input device */ + yy_reader = in; + + /* the current state of the DFA */ + yy_state = 0; + + /* the current lexical state */ + yy_lexical_state = YYINITIAL; + + /* this buffer contains the current text to be matched and is + the source of the yytext() string */ + java.util.Arrays.fill(yy_buffer, (char)0); + + /* the textposition at the last accepting state */ + yy_markedPos = 0; + + /* the textposition at the last state to be included in yytext */ + yy_pushbackPos = 0; + + /* the current text position in the buffer */ + yy_currentPos = 0; + + /* startRead marks the beginning of the yytext() string in the buffer */ + yy_startRead = 0; + + /** + * endRead marks the last character in the buffer, that has been read + * from input + */ + yy_endRead = 0; + + /* number of newlines encountered up to the start of the matched text */ + yyline = 0; + + /* the number of characters up to the start of the matched text */ + yychar = 0; + + /** + * the number of characters from the last newline up to the start + * of the matched text + */ + yycolumn = 0; + + /** + * yy_atBOL == true <=> the scanner is currently at the beginning + * of a line + */ + yy_atBOL = false; + + /* yy_atEOF == true <=> the scanner has returned a value for EOF */ + yy_atEOF = false; + + /* denotes if the user-EOF-code has already been executed */ + yy_eof_done = false; + + + fStateStack.clear(); + + hasMore = true; + + // its a little wasteful to "throw away" first char array generated + // by class init (via auto generated code), but we really do want + // a small buffer for our head parsers. + if (yy_buffer.length != MAX_TO_SCAN) { + yy_buffer = new char[MAX_TO_SCAN]; + } + + + } + + + public final HeadParserToken getNextToken() throws IOException { + String context = null; + context = primGetNextToken(); + HeadParserToken result = null; + if (valueText != null) { + result = createToken(context, yychar, valueText); + valueText = null; + } else { + result = createToken(context, yychar, yytext()); + } + return result; + } + + public final boolean hasMoreTokens() { + return hasMore && yychar < MAX_TO_SCAN; + } + private void pushCurrentState() { + fStateStack.push(yystate()); + + } + + private void popState() { + yybegin(fStateStack.pop()); + } + private HeadParserToken createToken(String context, int start, String text) { + return new HeadParserToken(context, start, text); + } + + +%} + +%eof{ + hasMore=false; +%eof} + +%public +%class HTMLHeadTokenizer +%function primGetNextToken +%type String +%char +%unicode +%ignorecase +//%debug +%switch + + +UTF16BE = \xFE\xFF +UTF16LE = \xFF\xFE +UTF83ByteBOM = \xEF\xBB\xBF + +SpaceChar = [\x20\x09] + + + +// [3] S ::= (0x20 | 0x9 | 0xD | 0xA)+ +S = [\x20\x09\x0D\x0A] + +// BeginAttribeValue = {S}* \= {S}* + +LineTerminator = \r|\n + +Z = (\x00)? +S_UTF = {Z}{S}{Z} +BeginAttributeValueUTF = {S_UTF}* \= {S_UTF}* + +%state ST_XMLDecl +%state ST_META_TAG +%state QuotedAttributeValue +%state DQ_STRING +%state SQ_STRING +%state UnDelimitedString +%state UnDelimitedCharset + +%% + + +<YYINITIAL> +{ + {UTF16BE} {hasMore = false; return EncodingParserConstants.UTF16BE;} + {UTF16LE} {hasMore = false; return EncodingParserConstants.UTF16LE;} + {UTF83ByteBOM} {hasMore = false; return EncodingParserConstants.UTF83ByteBOM;} + + // force to be started on first line, but we do allow preceeding spaces + ^ {S_UTF}* ({Z}<{Z}\?{Z}x{Z}m{Z}l{Z}){S_UTF}+ {if (yychar == 0 ) {yybegin(ST_XMLDecl); return XMLHeadTokenizerConstants.XMLDeclStart;}} + ({Z}<{Z}M{Z}E{Z}T{Z}A{Z}) {yybegin(ST_META_TAG); return HTMLHeadTokenizerConstants.MetaTagStart;} + + +} + +<ST_XMLDecl> +{ + //"version" {BeginAttribeValue} {pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDeclVersion;} + ({Z}e{Z}n{Z}c{Z}o{Z}d{Z}i{Z}n{Z}g{Z}) {BeginAttributeValueUTF} {pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDelEncoding;} + // note this "forced end" once end of XML Declaration found + ({Z}\?{Z}>{Z}) {yybegin(YYINITIAL); return XMLHeadTokenizerConstants.XMLDeclEnd;} +} + +<ST_META_TAG> +{ + +// "http-equiv" {S}* \= {S}* \"? "Content-Type" \"? {S}+ "content" {BeginAttribeValue} {pushCurrentState(); yybegin(QuotedAttributeValue); foundContentTypeValue=true; return HTMLHeadTokenizerConstants.MetaTagContentType;} + {Z}h{Z}t{Z}t{Z}p{Z}-{Z}e{Z}q{Z}u{Z}i{Z}v{Z} {S_UTF}* \= {S_UTF}* {Z}\"?{Z} ({Z}C{Z}o{Z}n{Z}t{Z}e{Z}n{Z}t{Z}-{Z}T{Z}y{Z}p{Z}e{Z}) \"?{Z} ({S_UTF})+ ({Z}c{Z}o{Z}n{Z}t{Z}e{Z}n{Z}t{Z}) {BeginAttributeValueUTF} {pushCurrentState(); yybegin(QuotedAttributeValue); foundContentTypeValue=true; return HTMLHeadTokenizerConstants.MetaTagContentType;} + {Z}>{Z} { yybegin(YYINITIAL); if (foundContentTypeValue) hasMore = false; return HTMLHeadTokenizerConstants.MetaTagEnd;} + {Z}\/{Z}>{Z} { yybegin(YYINITIAL); if (foundContentTypeValue) hasMore = false; return HTMLHeadTokenizerConstants.MetaTagEnd;} +} + + +<QuotedAttributeValue> +{ + {Z}\"{Z} { yybegin(DQ_STRING); string.setLength(0); } + {Z}\'{Z} { yybegin(SQ_STRING); string.setLength(0); } + // in this state, anything other than a space character can start an undelimited string + {S_UTF}*. { yypushback(1); yybegin(UnDelimitedString); string.setLength(0);} + +} + + +<DQ_STRING> +{ + + {Z}\"{Z} { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue; } + {Z}{LineTerminator}{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}\?{Z}>{Z} { yypushback(yylength()); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}<{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + + {Z}>{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}\/{Z}>{Z} { yypushback(yylength()); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + [^\x00] { string.append( yytext() ); } + + +} + +<SQ_STRING> +{ + + {Z}\'{Z} { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue;} + {Z}{LineTerminator}{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}%{Z}>{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}<{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}>{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}\/{Z}>{Z} { yypushback(yylength()); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + [^\x00] { string.append( yytext() ); } + + +} + +<UnDelimitedString> +{ + + + // note this initial special case for HTTP contenttype values + // Look ahead and see if there are spaces, but don't append the spaces as they may be double-byte + // Let the next state handle removal of the \x00 and properly append spaces + ";"/{S_UTF}* { pushCurrentState(); yybegin(UnDelimitedCharset); string.append( yytext() ); } + {S_UTF} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.UnDelimitedStringValue; } + {Z}{LineTerminator}{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}\?{Z}>{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}<{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + // these are a bit special, since we started an undelimit string, but found a quote ... probably indicates a missing beginning quote + {Z}\'{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue;} + {Z}\"{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue;} + + {Z}>{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}\/{Z}>{Z} { yypushback(yylength()); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + [^\x00] { string.append( yytext() ); } + +} + +<UnDelimitedCharset> +{ + {S} { string.append( yytext() ); } + // For non \x00 characters, let the previous state handle it + [^\x00] {yypushback(1); popState(); } +} + +// The "match anything" rule should always be in effect except for when looking for end of string +// (That is, remember to update state list if/when new states added) +.|\n {if(yychar > MAX_TO_SCAN) {hasMore=false; return EncodingParserConstants.MAX_CHARS_REACHED;}} + +// this rule always in effect +<<EOF>> {hasMore = false; return EncodingParserConstants.EOF;}
diff --git a/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/CodedIO.java b/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/CodedIO.java index ddc8d1d..1f31829 100644 --- a/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/CodedIO.java +++ b/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/CodedIO.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2005 IBM Corporation and others. + * Copyright (c) 2001, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -116,6 +116,7 @@ result.setUnicodeStream(true); else if (detectedBom.length == 3) result.setUTF83ByteBOMUsed(true); + result.setUnicodeBOM(detectedBom); } return result; }
diff --git a/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/CodedReaderCreator.java b/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/CodedReaderCreator.java index 53f2998..155ccdb 100644 --- a/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/CodedReaderCreator.java +++ b/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/CodedReaderCreator.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2005 IBM Corporation and others. + * Copyright (c) 2001, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -64,6 +64,10 @@ private InputStream fInputStream; + + private static final String CHARSET_UTF_16= "UTF-16"; //$NON-NLS-1$ + + private static final String CHARSET_UTF_16LE= "UTF-16LE"; //$NON-NLS-1$ public CodedReaderCreator() { @@ -292,6 +296,11 @@ if (fEncodingRule == EncodingRule.FORCE_DEFAULT) { charsetName = encodingMemento.getAppropriateDefault(); } + + // [228366] For files that have a unicode BOM, and a charset name of UTF-16, the charset decoder needs "UTF-16LE" + if(CHARSET_UTF_16.equals(charsetName) && encodingMemento.getUnicodeBOM() == IContentDescription.BOM_UTF_16LE) + charsetName = CHARSET_UTF_16LE; + Charset charset = Charset.forName(charsetName); CharsetDecoder charsetDecoder = charset.newDecoder(); if (fEncodingRule == EncodingRule.IGNORE_CONVERSION_ERROR) {
diff --git a/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/EncodingMemento.java b/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/EncodingMemento.java index 28857a3..c195a84 100644 --- a/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/EncodingMemento.java +++ b/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/EncodingMemento.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2005 IBM Corporation and others. + * Copyright (c) 2001, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -73,6 +73,8 @@ private String fJavaCharsetName; private boolean fUnicodeStream; private boolean fUTF83ByteBOMUsed; + + private byte[] fBOM; public EncodingMemento() { super(); @@ -157,15 +159,8 @@ byte[] bom = null; if (isUTF83ByteBOMUsed()) bom = IContentDescription.BOM_UTF_8; - else if (isUnicodeStream()) { - if (getJavaCharsetName().equals("UTF-16") || getJavaCharsetName().equals("UTF-16LE")) { //$NON-NLS-1$ //$NON-NLS-2$ - bom = IContentDescription.BOM_UTF_16LE; - } - else if (getJavaCharsetName().equals("UTF-16BE")) { //$NON-NLS-1$ - bom = IContentDescription.BOM_UTF_16BE; - } - - } + else if (isUnicodeStream()) + bom = fBOM; return bom; } @@ -246,4 +241,7 @@ fUTF83ByteBOMUsed = uTF83ByteBOMUsed; } + public void setUnicodeBOM(byte[] bom) { + fBOM = bom; + } }
diff --git a/bundles/org.eclipse.wst.xml.core/DevTimeSupport/HeadParsers/XMLHeadTokenizer.jFlex b/bundles/org.eclipse.wst.xml.core/DevTimeSupport/HeadParsers/XMLHeadTokenizer.jFlex index ff50a31..15d5b0a 100644 --- a/bundles/org.eclipse.wst.xml.core/DevTimeSupport/HeadParsers/XMLHeadTokenizer.jFlex +++ b/bundles/org.eclipse.wst.xml.core/DevTimeSupport/HeadParsers/XMLHeadTokenizer.jFlex
@@ -1,256 +1,254 @@ -/******************************************************************************* - * Copyright (c) 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/*nlsXXX*/ -package org.eclipse.wst.xml.core.internal.contenttype; -import java.io.IOException; -import java.io.Reader; - -import org.eclipse.wst.xml.core.internal.contenttype.EncodingParserConstants; -import org.eclipse.wst.xml.core.internal.contenttype.XMLHeadTokenizerConstants; - - -%% - -%{ - - - private boolean hasMore = true; - private final static int MAX_TO_SCAN = 8000; - StringBuffer string = new StringBuffer(); - // state stack for easier state handling - private IntStack fStateStack = new IntStack(); - private String valueText = null; - - - public XMLHeadTokenizer() { - super(); - } - - public void reset (Reader in) { - /* the input device */ - zzReader = in; - - /* the current state of the DFA */ - zzState = 0; - - /* the current lexical state */ - zzLexicalState = YYINITIAL; - - /* this buffer contains the current text to be matched and is - the source of the yytext() string */ - java.util.Arrays.fill(zzBuffer, (char)0); - - /* the textposition at the last accepting state */ - zzMarkedPos = 0; - - /* the textposition at the last state to be included in yytext */ - zzPushbackPos = 0; - - /* the current text position in the buffer */ - zzCurrentPos = 0; - - /* startRead marks the beginning of the yytext() string in the buffer */ - zzStartRead = 0; - - /** - * endRead marks the last character in the buffer, that has been read - * from input - */ - zzEndRead = 0; - - /* number of newlines encountered up to the start of the matched text */ - yyline = 0; - - /* the number of characters up to the start of the matched text */ - yychar = 0; - - /** - * the number of characters from the last newline up to the start - * of the matched text - */ - yycolumn = 0; - - /** - * yy_atBOL == true <=> the scanner is currently at the beginning - * of a line - */ - zzAtBOL = true; - - /* yy_atEOF == true <=> the scanner has returned a value for EOF */ - zzAtEOF = false; - - /* denotes if the user-EOF-code has already been executed */ - zzEOFDone = false; - - - fStateStack.clear(); - - hasMore = true; - - } - - - public final HeadParserToken getNextToken() throws IOException { - String context = null; - context = primGetNextToken(); - HeadParserToken result = null; - if (valueText != null) { - result = createToken(context, yychar, valueText); - valueText = null; - } else { - result = createToken(context, yychar, yytext()); - } - return result; - } - - public final boolean hasMoreTokens() { - return hasMore && yychar < MAX_TO_SCAN; - } - private void pushCurrentState() { - fStateStack.push(yystate()); - - } - - private void popState() { - yybegin(fStateStack.pop()); - } - - private HeadParserToken createToken(String context, int start, String text) { - return new HeadParserToken(context, start, text); - } - -%} - -%eof{ - hasMore=false; -%eof} - -%public -%class XMLHeadTokenizer -%function primGetNextToken -%type String -%char -%unicode -%ignorecase -//%debug -%switch -%buffer 8192 - -UTF16BE = \xFE\xFF -UTF16LE = \xFF\xFE -UTF83ByteBOM = \xEF\xBB\xBF - -//SpaceChar = [\x20\x09] - -// [3] S ::= (0x20 | 0x9 | 0xD | 0xA)+ -S = [\x20\x09\x0D\x0A] - -BeginAttribeValue = {S}* \= {S}* - -LineTerminator = \r|\n - - -%state ST_XMLDecl -%state QuotedAttributeValue -%state DQ_STRING -%state SQ_STRING -%state UnDelimitedString - -%% - - -<YYINITIAL> -{ - // force to start at beginning of line (^) and at beginning of file (yychar == 0) - ^{UTF16BE} {if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF16BE;}} - ^{UTF16LE} {if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF16LE;}} - ^{UTF83ByteBOM} {if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF83ByteBOM;}} - - // force to be started on first line, but we do allow preceeding spaces - ^ {S}* "<\?xml" {S}+ {if (yychar == 0 ) {yybegin(ST_XMLDecl); return XMLHeadTokenizerConstants.XMLDeclStart;}} - -} - -<ST_XMLDecl> -{ - "version" {BeginAttribeValue} {pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDeclVersion;} - "encoding" {BeginAttribeValue} {pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDelEncoding;} - // note the "forced end" (via 'hasMore=false') once the end of XML Declaration found - // This is since non-ascii chars may follow and may cause IOExceptions which would not occur once stream is - // read with incorrect encoding (such as if platform encoding is in effect until true encoding detected). - "\?>" {yybegin(YYINITIAL); hasMore = false; return XMLHeadTokenizerConstants.XMLDeclEnd;} -} - - - -<QuotedAttributeValue> -{ - \" { yybegin(DQ_STRING); string.setLength(0); } - \' { yybegin(SQ_STRING); string.setLength(0); } - // in this state, anything other than a space character can start an undelimited string - {S}*. { yypushback(1); yybegin(UnDelimitedString); string.setLength(0);} - -} - - -<DQ_STRING> -{ - - \" { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue; } - {LineTerminator} { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - "\?>" { yypushback(2); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - '<' { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - . { string.append( yytext() ); } - - -} - -<SQ_STRING> -{ - - \' { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue;} - {LineTerminator} { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - "%>" { yypushback(2);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - '<' { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - . { string.append( yytext() ); } - - -} - -<UnDelimitedString> -{ - - {S} { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.UnDelimitedStringValue; } - {LineTerminator} { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - "\?>" { yypushback(2);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - '<' - { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} - // these are a bit special, since we started an undelimit string, but found a quote ... probably indicates a missing beginning quote - \' { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue;} - - \" { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue;} - - . { string.append( yytext() ); } - -} - -// The "match anything" rule should always be in effect except for when looking for end of string -// (That is, remember to update state list if/when new states added) -<YYINITIAL, ST_XMLDecl, QuotedAttributeValue> -{ -// this is the fallback (match "anything") rule (for this scanner, input is ignored, and position advanced, if not recognized) -.|\n {if (yychar > MAX_TO_SCAN) {hasMore=false; return EncodingParserConstants.MAX_CHARS_REACHED;}} -} - -// this rule always in effect -<<EOF>> {hasMore = false; return EncodingParserConstants.EOF;} - +/******************************************************************************* + * Copyright (c) 2005, 2008 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +/*nlsXXX*/ +package org.eclipse.wst.xml.core.internal.contenttype; +import java.io.IOException; +import java.io.Reader; + +import org.eclipse.wst.xml.core.internal.contenttype.EncodingParserConstants; +import org.eclipse.wst.xml.core.internal.contenttype.XMLHeadTokenizerConstants; + + +%% + +%{ + + + private boolean hasMore = true; + private final static int MAX_TO_SCAN = 8000; + StringBuffer string = new StringBuffer(); + // state stack for easier state handling + private IntStack fStateStack = new IntStack(); + private String valueText = null; + + + public XMLHeadTokenizer() { + super(); + } + + public void reset (Reader in) { + /* the input device */ + zzReader = in; + + /* the current state of the DFA */ + zzState = 0; + + /* the current lexical state */ + zzLexicalState = YYINITIAL; + + /* this buffer contains the current text to be matched and is + the source of the yytext() string */ + java.util.Arrays.fill(zzBuffer, (char)0); + + /* the textposition at the last accepting state */ + zzMarkedPos = 0; + + /* the textposition at the last state to be included in yytext */ + zzPushbackPos = 0; + + /* the current text position in the buffer */ + zzCurrentPos = 0; + + /* startRead marks the beginning of the yytext() string in the buffer */ + zzStartRead = 0; + + /** + * endRead marks the last character in the buffer, that has been read + * from input + */ + zzEndRead = 0; + + /* number of newlines encountered up to the start of the matched text */ + yyline = 0; + + /* the number of characters up to the start of the matched text */ + yychar = 0; + + /** + * the number of characters from the last newline up to the start + * of the matched text + */ + yycolumn = 0; + + /** + * yy_atBOL == true <=> the scanner is currently at the beginning + * of a line + */ + zzAtBOL = true; + + /* yy_atEOF == true <=> the scanner has returned a value for EOF */ + zzAtEOF = false; + + /* denotes if the user-EOF-code has already been executed */ + zzEOFDone = false; + + + fStateStack.clear(); + + hasMore = true; + + } + + + public final HeadParserToken getNextToken() throws IOException { + String context = null; + context = primGetNextToken(); + HeadParserToken result = null; + if (valueText != null) { + result = createToken(context, yychar, valueText); + valueText = null; + } else { + result = createToken(context, yychar, yytext()); + } + return result; + } + + public final boolean hasMoreTokens() { + return hasMore && yychar < MAX_TO_SCAN; + } + private void pushCurrentState() { + fStateStack.push(yystate()); + + } + + private void popState() { + yybegin(fStateStack.pop()); + } + + private HeadParserToken createToken(String context, int start, String text) { + return new HeadParserToken(context, start, text); + } + +%} + +%eof{ + hasMore=false; +%eof} + +%public +%class XMLHeadTokenizer +%function primGetNextToken +%type String +%char +%unicode +%ignorecase +//%debug +%switch +%buffer 8192 + +UTF16BE = \xFE\xFF +UTF16LE = \xFF\xFE +UTF83ByteBOM = \xEF\xBB\xBF + +//SpaceChar = [\x20\x09] + +// [3] S ::= (0x20 | 0x9 | 0xD | 0xA)+ +S = [\x20\x09\x0D\x0A] + +//BeginAttribeValue = {S}* \= {S}* + +LineTerminator = \r|\n + +// Z is the single-byte zero character to be used in parsing double-byte files +Z = (\x00)? +S_UTF = {Z}{S}{Z} +BeginAttributeValueUTF = {S_UTF}* \= {S_UTF}* + +%state ST_XMLDecl +%state QuotedAttributeValue +%state DQ_STRING +%state SQ_STRING +%state UnDelimitedString + +%% + + +<YYINITIAL> +{ + // force to start at beginning of line (^) and at beginning of file (yychar == 0) + ^{UTF16BE} {if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF16BE;}} + ^{UTF16LE} {if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF16LE;}} + ^{UTF83ByteBOM} {if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF83ByteBOM;}} + + // force to be started on first line, but we do allow preceeding spaces + ^ {S_UTF}* ({Z}<{Z}\?{Z}x{Z}m{Z}l{Z}){S_UTF}+ {if (yychar == 0 ) {yybegin(ST_XMLDecl); return XMLHeadTokenizerConstants.XMLDeclStart;}} + +} + +<ST_XMLDecl> +{ + ({Z}v{Z}e{Z}r{Z}s{Z}i{Z}o{Z}n{Z}) {BeginAttributeValueUTF} {pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDeclVersion;} + ({Z}e{Z}n{Z}c{Z}o{Z}d{Z}i{Z}n{Z}g{Z}) {BeginAttributeValueUTF} {pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDelEncoding;} + // note the "forced end" (via 'hasMore=false') once the end of XML Declaration found + // This is since non-ascii chars may follow and may cause IOExceptions which would not occur once stream is + // read with incorrect encoding (such as if platform encoding is in effect until true encoding detected). + ({Z}\?{Z}>{Z}) {yybegin(YYINITIAL); hasMore = false; return XMLHeadTokenizerConstants.XMLDeclEnd;} +} + + + +<QuotedAttributeValue> +{ + {Z}\"{Z} { yybegin(DQ_STRING); string.setLength(0); } + {Z}\'{Z} { yybegin(SQ_STRING); string.setLength(0); } + // in this state, anything other than a space character can start an undelimited string + {S_UTF}*. { yypushback(1); yybegin(UnDelimitedString); string.setLength(0);} + +} + + +<DQ_STRING> +{ + + {Z}\"{Z} { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue; } + {Z}{LineTerminator}{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}\?{Z}>{Z} { yypushback(yylength()); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}<{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + [^\x00] { string.append( yytext() ); } + +} + +<SQ_STRING> +{ + + {Z}\'{Z} { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue;} + {Z}{LineTerminator}{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}%{Z}>{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}<{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + [^\x00] { string.append( yytext() ); } + +} + +<UnDelimitedString> +{ + + {S_UTF} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.UnDelimitedStringValue; } + {Z}{LineTerminator}{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}\?{Z}>{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + {Z}<{Z} + { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;} + // these are a bit special, since we started an undelimit string, but found a quote ... probably indicates a missing beginning quote + {Z}\'{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue;} + + {Z}\"{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue;} + + [^\x00] { string.append( yytext() ); } + +} + +// The "match anything" rule should always be in effect except for when looking for end of string +// (That is, remember to update state list if/when new states added) +.|\n {if(yychar > MAX_TO_SCAN) {hasMore=false; return EncodingParserConstants.MAX_CHARS_REACHED;}} + +// this rule always in effect +<<EOF>> {hasMore = false; return EncodingParserConstants.EOF;} + \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/contenttype/XMLHeadTokenizer.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/contenttype/XMLHeadTokenizer.java index 3eab68b..76fb40b 100644 --- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/contenttype/XMLHeadTokenizer.java +++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/contenttype/XMLHeadTokenizer.java
@@ -1,7 +1,7 @@ -/* The following code was generated by JFlex 1.4 on 7/5/05 1:19 AM */ +/* The following code was generated by JFlex 1.4.2 on 7/28/08 9:29 AM */ /******************************************************************************* - * Copyright (c) 2005 IBM Corporation and others. + * Copyright (c) 2005, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -22,9 +22,9 @@ /** * This class is a scanner generated by - * <a href="http://www.jflex.de/">JFlex</a> 1.4 - * on 7/5/05 1:19 AM from the specification file - * <tt>D:/builds/Workspaces/PureHeadWTP_M7/org.eclipse.wst.xml.core/DevTimeSupport/HeadParsers/XMLHeadTokenizer.jFlex</tt> + * <a href="http://www.jflex.de/">JFlex</a> 1.4.2 + * on 7/28/08 9:29 AM from the specification file + * <tt>D:/workspaces/wtp301/workspace/org.eclipse.wst.xml.core/DevTimeSupport/HeadParsers/XMLHeadTokenizer.jFlex</tt> */ public class XMLHeadTokenizer { @@ -56,14 +56,14 @@ * Translates characters to character classes */ private static final String ZZ_CMAP_PACKED = - "\11\0\1\6\1\11\2\0\1\10\22\0\1\6\1\0\1\32\2\0"+ - "\1\34\1\0\1\33\24\0\1\12\1\7\1\31\1\13\3\0\1\26"+ - "\1\27\1\20\1\0\1\30\1\0\1\23\2\0\1\16\1\15\1\25"+ - "\1\24\2\0\1\21\1\22\2\0\1\17\1\0\1\14\12\0\1\26"+ - "\1\27\1\20\1\0\1\30\1\0\1\23\2\0\1\16\1\15\1\25"+ - "\1\24\2\0\1\21\1\22\2\0\1\17\1\0\1\14\102\0\1\4"+ - "\3\0\1\5\17\0\1\3\16\0\1\1\20\0\1\3\16\0\1\1"+ - "\1\2\170\0\1\2\ufe87\0"; + "\1\11\10\0\1\6\1\10\2\0\1\7\22\0\1\6\1\0\1\33"+ + "\2\0\1\35\1\0\1\34\24\0\1\13\1\12\1\32\1\14\3\0"+ + "\1\27\1\30\1\21\1\0\1\31\1\0\1\24\2\0\1\17\1\16"+ + "\1\26\1\25\2\0\1\22\1\23\2\0\1\20\1\0\1\15\12\0"+ + "\1\27\1\30\1\21\1\0\1\31\1\0\1\24\2\0\1\17\1\16"+ + "\1\26\1\25\2\0\1\22\1\23\2\0\1\20\1\0\1\15\102\0"+ + "\1\4\3\0\1\5\17\0\1\3\16\0\1\1\20\0\1\3\16\0"+ + "\1\1\1\2\170\0\1\2\ufe87\0"; /** * Translates characters to character classes @@ -76,13 +76,16 @@ private static final int [] ZZ_ACTION = zzUnpackAction(); private static final String ZZ_ACTION_PACKED_0 = - "\7\0\11\1\2\2\1\1\1\3\1\4\1\5\1\6"+ - "\1\5\1\7\1\5\1\7\1\5\1\10\2\11\1\12"+ - "\1\13\4\0\1\14\3\0\1\15\1\0\1\16\1\17"+ - "\11\0\1\20\4\0\1\21\1\0\1\22"; + "\7\0\13\1\2\2\1\1\1\2\1\3\1\4\1\5"+ + "\1\6\1\1\1\5\1\7\1\1\1\5\1\10\1\1"+ + "\1\11\1\12\1\13\12\0\1\14\5\0\1\2\1\3"+ + "\1\4\1\6\2\0\1\15\1\7\2\0\1\10\1\11"+ + "\1\16\3\0\1\14\4\0\1\2\1\15\14\0\1\17"+ + "\5\0\1\17\6\0\1\20\3\0\1\20\2\0\1\21"+ + "\1\0\1\21\1\0"; private static int [] zzUnpackAction() { - int [] result = new int[62]; + int [] result = new int[111]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; @@ -129,9 +132,6 @@ /** the textposition at the last accepting state */ private int zzMarkedPos; - /** the textposition at the last state to be included in yytext */ - private int zzPushbackPos; - /** the current text position in the buffer */ private int zzCurrentPos; @@ -198,7 +198,7 @@ zzMarkedPos = 0; /* the textposition at the last state to be included in yytext */ - zzPushbackPos = 0; +// zzPushbackPos = 0; /* the current text position in the buffer */ zzCurrentPos = 0; @@ -305,7 +305,7 @@ char [] map = new char[0x10000]; int i = 0; /* index in packed string */ int j = 0; /* index in unpacked array */ - while (i < 148) { + while (i < 150) { int count = packed.charAt(i++); char value = packed.charAt(i++); do map[j++] = value; while (--count > 0); @@ -333,7 +333,6 @@ zzEndRead-= zzStartRead; zzCurrentPos-= zzStartRead; zzMarkedPos-= zzStartRead; - zzPushbackPos-= zzStartRead; zzStartRead = 0; } @@ -349,13 +348,23 @@ int numRead = zzReader.read(zzBuffer, zzEndRead, zzBuffer.length-zzEndRead); - if (numRead < 0) { - return true; - } - else { + if (numRead > 0) { zzEndRead+= numRead; return false; } + // unlikely but not impossible: read 0 characters, but not at end of stream + if (numRead == 0) { + int c = zzReader.read(); + if (c == -1) { + return true; + } else { + zzBuffer[zzEndRead++] = (char) c; + return false; + } + } + + // numRead < 0 + return true; } @@ -386,7 +395,7 @@ zzAtBOL = true; zzAtEOF = false; zzEndRead = zzStartRead = 0; - zzCurrentPos = zzMarkedPos = zzPushbackPos = 0; + zzCurrentPos = zzMarkedPos = 0; yychar = 0; zzLexicalState = YYINITIAL; } @@ -540,6 +549,7 @@ else { boolean eof = zzRefill(); zzMarkedPosL = zzMarkedPos; + zzEndReadL = zzEndRead; zzBufferL = zzBuffer; if (eof) zzAtBOL = false; @@ -605,323 +615,733 @@ case 2: zzIsFinal = true; zzState = 9; break zzForNext; case 3: zzIsFinal = true; zzState = 10; break zzForNext; case 6: - case 8: - case 9: zzIsFinal = true; zzState = 11; break zzForNext; - case 10: zzIsFinal = true; zzState = 12; break zzForNext; + case 7: + case 8: zzIsFinal = true; zzState = 11; break zzForNext; + case 9: zzIsFinal = true; zzState = 12; break zzForNext; + case 11: zzIsFinal = true; zzState = 13; break zzForNext; default: zzIsFinal = true; zzNoLookAhead = true; zzState = 7; break zzForNext; } case 2: switch (zzInput) { - case 11: zzIsFinal = true; zzState = 13; break zzForNext; - case 15: zzIsFinal = true; zzState = 14; break zzForNext; - case 16: zzIsFinal = true; zzState = 15; break zzForNext; + case 9: zzIsFinal = true; zzState = 14; break zzForNext; + case 12: zzIsFinal = true; zzState = 15; break zzForNext; + case 16: zzIsFinal = true; zzState = 16; break zzForNext; + case 17: zzIsFinal = true; zzState = 17; break zzForNext; default: zzIsFinal = true; zzNoLookAhead = true; zzState = 7; break zzForNext; } case 3: switch (zzInput) { case 6: - case 8: zzIsFinal = true; zzState = 17; break zzForNext; - case 9: zzIsFinal = true; zzState = 18; break zzForNext; - case 26: zzIsFinal = true; zzNoLookAhead = true; zzState = 19; break zzForNext; - case 27: zzIsFinal = true; zzNoLookAhead = true; zzState = 20; break zzForNext; - default: zzIsFinal = true; zzNoLookAhead = true; zzState = 16; break zzForNext; + case 7: zzIsFinal = true; zzState = 19; break zzForNext; + case 8: zzIsFinal = true; zzState = 20; break zzForNext; + case 9: zzIsFinal = true; zzState = 21; break zzForNext; + case 27: zzIsFinal = true; zzState = 22; break zzForNext; + case 28: zzIsFinal = true; zzState = 23; break zzForNext; + default: zzIsFinal = true; zzNoLookAhead = true; zzState = 18; break zzForNext; } case 4: switch (zzInput) { + case 7: case 8: - case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 22; break zzForNext; - case 11: zzIsFinal = true; zzState = 23; break zzForNext; - case 26: zzIsFinal = true; zzNoLookAhead = true; zzState = 24; break zzForNext; - case 27: zzIsFinal = true; zzState = 25; break zzForNext; - default: zzIsFinal = true; zzNoLookAhead = true; zzState = 21; break zzForNext; + case 11: zzIsFinal = true; zzState = 25; break zzForNext; + case 9: zzIsFinal = true; zzState = 26; break zzForNext; + case 12: zzIsFinal = true; zzState = 27; break zzForNext; + case 27: zzIsFinal = true; zzState = 28; break zzForNext; + default: zzIsFinal = true; zzNoLookAhead = true; zzState = 24; break zzForNext; } case 5: switch (zzInput) { + case 7: case 8: - case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 22; break zzForNext; - case 27: zzIsFinal = true; zzState = 26; break zzForNext; - case 28: zzIsFinal = true; zzState = 27; break zzForNext; - default: zzIsFinal = true; zzNoLookAhead = true; zzState = 21; break zzForNext; + case 11: zzIsFinal = true; zzState = 25; break zzForNext; + case 28: zzIsFinal = true; zzState = 28; break zzForNext; + case 9: zzIsFinal = true; zzState = 29; break zzForNext; + case 29: zzIsFinal = true; zzState = 30; break zzForNext; + default: zzIsFinal = true; zzNoLookAhead = true; zzState = 24; break zzForNext; } case 6: switch (zzInput) { - case 11: zzIsFinal = true; zzState = 27; break zzForNext; + case 11: zzIsFinal = true; zzState = 25; break zzForNext; + case 12: zzIsFinal = true; zzState = 30; break zzForNext; case 6: - case 8: - case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 28; break zzForNext; - case 26: zzIsFinal = true; zzNoLookAhead = true; zzState = 29; break zzForNext; - case 27: zzIsFinal = true; zzState = 30; break zzForNext; - default: zzIsFinal = true; zzNoLookAhead = true; zzState = 21; break zzForNext; + case 7: + case 8: zzIsFinal = true; zzState = 31; break zzForNext; + case 9: zzIsFinal = true; zzState = 32; break zzForNext; + case 27: + case 28: zzIsFinal = true; zzState = 33; break zzForNext; + default: zzIsFinal = true; zzNoLookAhead = true; zzState = 24; break zzForNext; } case 8: switch (zzInput) { - case 2: zzIsFinal = true; zzNoLookAhead = true; zzState = 31; break zzForNext; + case 2: zzIsFinal = true; zzNoLookAhead = true; zzState = 34; break zzForNext; default: break zzForAction; } case 9: switch (zzInput) { - case 1: zzIsFinal = true; zzNoLookAhead = true; zzState = 32; break zzForNext; + case 1: zzIsFinal = true; zzNoLookAhead = true; zzState = 35; break zzForNext; default: break zzForAction; } case 10: switch (zzInput) { - case 4: zzState = 33; break zzForNext; + case 4: zzState = 36; break zzForNext; default: break zzForAction; } case 11: switch (zzInput) { case 6: - case 8: - case 9: zzState = 34; break zzForNext; - case 10: zzState = 35; break zzForNext; + case 7: + case 8: zzState = 37; break zzForNext; + case 9: zzState = 38; break zzForNext; + case 11: zzState = 39; break zzForNext; default: break zzForAction; } case 12: switch (zzInput) { - case 11: zzState = 36; break zzForNext; + case 6: + case 7: + case 8: zzState = 37; break zzForNext; + case 11: zzState = 39; break zzForNext; default: break zzForAction; } case 13: switch (zzInput) { - case 25: zzIsFinal = true; zzNoLookAhead = true; zzState = 37; break zzForNext; + case 9: zzState = 40; break zzForNext; + case 12: zzState = 41; break zzForNext; default: break zzForAction; } case 14: switch (zzInput) { - case 16: zzState = 38; break zzForNext; + case 12: zzState = 42; break zzForNext; + case 16: zzState = 43; break zzForNext; + case 17: zzState = 44; break zzForNext; default: break zzForAction; } case 15: switch (zzInput) { - case 21: zzState = 39; break zzForNext; + case 9: zzState = 45; break zzForNext; + case 26: zzIsFinal = true; zzState = 46; break zzForNext; + default: break zzForAction; + } + + case 16: + switch (zzInput) { + case 9: zzState = 47; break zzForNext; + case 17: zzState = 48; break zzForNext; default: break zzForAction; } case 17: switch (zzInput) { - case 6: - case 8: zzIsFinal = true; zzState = 17; break zzForNext; - case 9: zzState = 40; break zzForNext; - default: zzIsFinal = true; zzNoLookAhead = true; zzState = 16; break zzForNext; + case 9: zzState = 49; break zzForNext; + case 22: zzState = 50; break zzForNext; + default: break zzForAction; } - case 18: + case 19: switch (zzInput) { case 6: - case 8: zzIsFinal = true; zzState = 17; break zzForNext; - case 9: zzState = 40; break zzForNext; - default: zzIsFinal = true; zzNoLookAhead = true; zzState = 16; break zzForNext; + case 7: zzIsFinal = true; break zzForNext; + case 8: zzState = 51; break zzForNext; + case 9: zzIsFinal = true; zzState = 52; break zzForNext; + default: zzIsFinal = true; zzNoLookAhead = true; zzState = 18; break zzForNext; + } + + case 20: + switch (zzInput) { + case 6: + case 7: zzIsFinal = true; zzState = 19; break zzForNext; + case 8: zzState = 51; break zzForNext; + case 9: zzIsFinal = true; zzState = 52; break zzForNext; + default: zzIsFinal = true; zzNoLookAhead = true; zzState = 18; break zzForNext; + } + + case 21: + switch (zzInput) { + case 27: zzIsFinal = true; zzState = 22; break zzForNext; + case 28: zzIsFinal = true; zzState = 23; break zzForNext; + case 6: + case 7: + case 8: zzState = 51; break zzForNext; + default: break zzForAction; + } + + case 22: + switch (zzInput) { + case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 53; break zzForNext; + default: break zzForAction; } case 23: switch (zzInput) { - case 25: zzIsFinal = true; zzNoLookAhead = true; zzState = 41; break zzForNext; + case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 54; break zzForNext; default: break zzForAction; } case 25: switch (zzInput) { - case 10: zzState = 42; break zzForNext; + case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 55; break zzForNext; default: break zzForAction; } case 26: switch (zzInput) { - case 10: zzState = 42; break zzForNext; + case 7: + case 8: + case 11: zzIsFinal = true; zzState = 25; break zzForNext; + case 27: zzIsFinal = true; zzState = 28; break zzForNext; + case 12: zzState = 56; break zzForNext; default: break zzForAction; } case 27: switch (zzInput) { - case 25: zzIsFinal = true; zzNoLookAhead = true; zzState = 43; break zzForNext; + case 9: zzState = 57; break zzForNext; + case 26: zzIsFinal = true; zzState = 58; break zzForNext; + default: break zzForAction; + } + + case 28: + switch (zzInput) { + case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 59; break zzForNext; + default: break zzForAction; + } + + case 29: + switch (zzInput) { + case 7: + case 8: + case 11: zzIsFinal = true; zzState = 25; break zzForNext; + case 28: zzIsFinal = true; zzState = 28; break zzForNext; + case 29: zzState = 60; break zzForNext; default: break zzForAction; } case 30: switch (zzInput) { - case 10: zzState = 42; break zzForNext; + case 26: zzIsFinal = true; zzState = 25; break zzForNext; + case 9: zzState = 61; break zzForNext; + default: break zzForAction; + } + + case 31: + switch (zzInput) { + case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 62; break zzForNext; + default: break zzForAction; + } + + case 32: + switch (zzInput) { + case 11: zzIsFinal = true; zzState = 25; break zzForNext; + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 31; break zzForNext; + case 27: + case 28: zzIsFinal = true; zzState = 33; break zzForNext; + case 12: zzState = 60; break zzForNext; default: break zzForAction; } case 33: switch (zzInput) { - case 5: zzIsFinal = true; zzNoLookAhead = true; zzState = 44; break zzForNext; - default: break zzForAction; - } - - case 34: - switch (zzInput) { - case 6: - case 8: - case 9: zzState = 34; break zzForNext; - case 10: zzState = 35; break zzForNext; - default: break zzForAction; - } - - case 35: - switch (zzInput) { - case 11: zzState = 36; break zzForNext; + case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 63; break zzForNext; default: break zzForAction; } case 36: switch (zzInput) { - case 12: zzState = 45; break zzForNext; + case 5: zzIsFinal = true; zzNoLookAhead = true; zzState = 64; break zzForNext; + default: break zzForAction; + } + + case 37: + switch (zzInput) { + case 6: + case 7: + case 8: break zzForNext; + case 9: zzState = 38; break zzForNext; + case 11: zzState = 39; break zzForNext; default: break zzForAction; } case 38: switch (zzInput) { - case 17: zzState = 46; break zzForNext; + case 6: + case 7: + case 8: zzState = 37; break zzForNext; + case 11: zzState = 39; break zzForNext; + case 9: zzState = 65; break zzForNext; default: break zzForAction; } case 39: switch (zzInput) { - case 22: zzState = 47; break zzForNext; + case 9: zzState = 40; break zzForNext; + case 12: zzState = 41; break zzForNext; default: break zzForAction; } case 40: switch (zzInput) { - case 6: - case 8: zzIsFinal = true; zzState = 17; break zzForNext; - case 9: zzState = 40; break zzForNext; - default: zzIsFinal = true; zzNoLookAhead = true; zzState = 16; break zzForNext; + case 12: zzState = 41; break zzForNext; + default: break zzForAction; + } + + case 41: + switch (zzInput) { + case 9: zzState = 66; break zzForNext; + case 13: zzState = 67; break zzForNext; + default: break zzForAction; } case 42: switch (zzInput) { - case 27: zzIsFinal = true; zzNoLookAhead = true; zzState = 22; break zzForNext; + case 9: zzState = 45; break zzForNext; + case 26: zzIsFinal = true; zzState = 46; break zzForNext; + default: break zzForAction; + } + + case 43: + switch (zzInput) { + case 9: zzState = 47; break zzForNext; + case 17: zzState = 48; break zzForNext; + default: break zzForAction; + } + + case 44: + switch (zzInput) { + case 9: zzState = 49; break zzForNext; + case 22: zzState = 50; break zzForNext; default: break zzForAction; } case 45: switch (zzInput) { - case 13: zzState = 48; break zzForNext; + case 26: zzIsFinal = true; zzState = 46; break zzForNext; default: break zzForAction; } case 46: switch (zzInput) { - case 18: zzState = 49; break zzForNext; + case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 68; break zzForNext; default: break zzForAction; } case 47: switch (zzInput) { - case 20: zzState = 50; break zzForNext; + case 17: zzState = 48; break zzForNext; default: break zzForAction; } case 48: switch (zzInput) { - case 14: zzState = 51; break zzForNext; + case 9: zzState = 69; break zzForNext; + case 18: zzState = 70; break zzForNext; default: break zzForAction; } case 49: switch (zzInput) { - case 19: zzState = 52; break zzForNext; + case 22: zzState = 50; break zzForNext; default: break zzForAction; } case 50: switch (zzInput) { - case 23: zzState = 53; break zzForNext; + case 9: zzState = 71; break zzForNext; + case 23: zzState = 72; break zzForNext; default: break zzForAction; } case 51: switch (zzInput) { case 6: - case 8: - case 9: zzIsFinal = true; zzState = 54; break zzForNext; - default: break zzForAction; + case 7: zzIsFinal = true; zzState = 19; break zzForNext; + case 8: break zzForNext; + case 9: zzIsFinal = true; zzState = 52; break zzForNext; + default: zzIsFinal = true; zzNoLookAhead = true; zzState = 18; break zzForNext; } case 52: switch (zzInput) { - case 20: zzState = 55; break zzForNext; - default: break zzForAction; - } - - case 53: - switch (zzInput) { - case 19: zzState = 56; break zzForNext; - default: break zzForAction; - } - - case 54: - switch (zzInput) { case 6: - case 8: - case 9: zzIsFinal = true; zzState = 54; break zzForNext; - default: break zzForAction; - } - - case 55: - switch (zzInput) { - case 21: zzState = 57; break zzForNext; - default: break zzForAction; + case 7: zzIsFinal = true; zzState = 19; break zzForNext; + case 8: zzState = 51; break zzForNext; + case 9: zzIsFinal = true; zzState = 73; break zzForNext; + default: zzIsFinal = true; zzNoLookAhead = true; zzState = 18; break zzForNext; } case 56: switch (zzInput) { - case 21: zzState = 58; break zzForNext; + case 9: zzState = 57; break zzForNext; + case 26: zzIsFinal = true; zzState = 58; break zzForNext; default: break zzForAction; } case 57: switch (zzInput) { - case 6: - case 8: - case 9: zzState = 57; break zzForNext; - case 7: zzIsFinal = true; zzState = 59; break zzForNext; + case 26: zzIsFinal = true; zzState = 58; break zzForNext; default: break zzForAction; } case 58: switch (zzInput) { - case 24: zzState = 60; break zzForNext; - default: break zzForAction; - } - - case 59: - switch (zzInput) { - case 6: - case 8: - case 9: zzIsFinal = true; zzState = 59; break zzForNext; + case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 74; break zzForNext; default: break zzForAction; } case 60: switch (zzInput) { - case 6: - case 8: - case 9: zzState = 60; break zzForNext; - case 7: zzIsFinal = true; zzState = 61; break zzForNext; + case 26: zzIsFinal = true; zzState = 25; break zzForNext; + case 9: zzState = 61; break zzForNext; default: break zzForAction; } case 61: switch (zzInput) { + case 26: zzIsFinal = true; zzState = 25; break zzForNext; + default: break zzForAction; + } + + case 65: + switch (zzInput) { case 6: - case 8: - case 9: zzIsFinal = true; zzState = 61; break zzForNext; + case 7: + case 8: zzState = 37; break zzForNext; + case 11: zzState = 39; break zzForNext; + default: break zzForAction; + } + + case 66: + switch (zzInput) { + case 13: zzState = 67; break zzForNext; + default: break zzForAction; + } + + case 67: + switch (zzInput) { + case 9: zzState = 75; break zzForNext; + case 14: zzState = 76; break zzForNext; + default: break zzForAction; + } + + case 69: + switch (zzInput) { + case 18: zzState = 70; break zzForNext; + default: break zzForAction; + } + + case 70: + switch (zzInput) { + case 9: zzState = 77; break zzForNext; + case 19: zzState = 78; break zzForNext; + default: break zzForAction; + } + + case 71: + switch (zzInput) { + case 23: zzState = 72; break zzForNext; + default: break zzForAction; + } + + case 72: + switch (zzInput) { + case 9: zzState = 79; break zzForNext; + case 21: zzState = 80; break zzForNext; + default: break zzForAction; + } + + case 73: + switch (zzInput) { + case 6: + case 7: + case 8: zzState = 51; break zzForNext; + default: break zzForAction; + } + + case 75: + switch (zzInput) { + case 14: zzState = 76; break zzForNext; + default: break zzForAction; + } + + case 76: + switch (zzInput) { + case 9: zzState = 81; break zzForNext; + case 15: zzState = 82; break zzForNext; + default: break zzForAction; + } + + case 77: + switch (zzInput) { + case 19: zzState = 78; break zzForNext; + default: break zzForAction; + } + + case 78: + switch (zzInput) { + case 9: zzState = 83; break zzForNext; + case 20: zzState = 84; break zzForNext; + default: break zzForAction; + } + + case 79: + switch (zzInput) { + case 21: zzState = 80; break zzForNext; + default: break zzForAction; + } + + case 80: + switch (zzInput) { + case 9: zzState = 85; break zzForNext; + case 24: zzState = 86; break zzForNext; + default: break zzForAction; + } + + case 81: + switch (zzInput) { + case 15: zzState = 82; break zzForNext; + default: break zzForAction; + } + + case 82: + switch (zzInput) { + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 87; break zzForNext; + case 9: zzState = 88; break zzForNext; + default: break zzForAction; + } + + case 83: + switch (zzInput) { + case 20: zzState = 84; break zzForNext; + default: break zzForAction; + } + + case 84: + switch (zzInput) { + case 9: zzState = 89; break zzForNext; + case 21: zzState = 90; break zzForNext; + default: break zzForAction; + } + + case 85: + switch (zzInput) { + case 24: zzState = 86; break zzForNext; + default: break zzForAction; + } + + case 86: + switch (zzInput) { + case 9: zzState = 91; break zzForNext; + case 20: zzState = 92; break zzForNext; + default: break zzForAction; + } + + case 87: + switch (zzInput) { + case 6: + case 7: + case 8: zzIsFinal = true; break zzForNext; + case 9: zzIsFinal = true; zzState = 93; break zzForNext; + default: break zzForAction; + } + + case 88: + switch (zzInput) { + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 87; break zzForNext; + case 9: zzState = 94; break zzForNext; + default: break zzForAction; + } + + case 89: + switch (zzInput) { + case 21: zzState = 90; break zzForNext; + default: break zzForAction; + } + + case 90: + switch (zzInput) { + case 9: zzState = 95; break zzForNext; + case 22: zzState = 96; break zzForNext; + default: break zzForAction; + } + + case 91: + switch (zzInput) { + case 20: zzState = 92; break zzForNext; + default: break zzForAction; + } + + case 92: + switch (zzInput) { + case 9: zzState = 97; break zzForNext; + case 22: zzState = 98; break zzForNext; + default: break zzForAction; + } + + case 93: + switch (zzInput) { + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 87; break zzForNext; + case 9: zzState = 94; break zzForNext; + default: break zzForAction; + } + + case 94: + switch (zzInput) { + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 87; break zzForNext; + default: break zzForAction; + } + + case 95: + switch (zzInput) { + case 22: zzState = 96; break zzForNext; + default: break zzForAction; + } + + case 96: + switch (zzInput) { + case 6: + case 7: + case 8: break zzForNext; + case 9: zzState = 99; break zzForNext; + case 10: zzIsFinal = true; zzState = 100; break zzForNext; + default: break zzForAction; + } + + case 97: + switch (zzInput) { + case 22: zzState = 98; break zzForNext; + default: break zzForAction; + } + + case 98: + switch (zzInput) { + case 9: zzState = 101; break zzForNext; + case 25: zzState = 102; break zzForNext; + default: break zzForAction; + } + + case 99: + switch (zzInput) { + case 6: + case 7: + case 8: zzState = 96; break zzForNext; + case 10: zzIsFinal = true; zzState = 100; break zzForNext; + case 9: zzState = 103; break zzForNext; + default: break zzForAction; + } + + case 100: + switch (zzInput) { + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 104; break zzForNext; + case 9: zzState = 105; break zzForNext; + default: break zzForAction; + } + + case 101: + switch (zzInput) { + case 25: zzState = 102; break zzForNext; + default: break zzForAction; + } + + case 102: + switch (zzInput) { + case 6: + case 7: + case 8: break zzForNext; + case 9: zzState = 106; break zzForNext; + case 10: zzIsFinal = true; zzState = 107; break zzForNext; + default: break zzForAction; + } + + case 103: + switch (zzInput) { + case 6: + case 7: + case 8: zzState = 96; break zzForNext; + default: break zzForAction; + } + + case 104: + switch (zzInput) { + case 9: zzIsFinal = true; zzState = 100; break zzForNext; + case 6: + case 7: + case 8: zzIsFinal = true; break zzForNext; + default: break zzForAction; + } + + case 105: + switch (zzInput) { + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 104; break zzForNext; + default: break zzForAction; + } + + case 106: + switch (zzInput) { + case 6: + case 7: + case 8: zzState = 102; break zzForNext; + case 10: zzIsFinal = true; zzState = 107; break zzForNext; + case 9: zzState = 108; break zzForNext; + default: break zzForAction; + } + + case 107: + switch (zzInput) { + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 109; break zzForNext; + case 9: zzState = 110; break zzForNext; + default: break zzForAction; + } + + case 108: + switch (zzInput) { + case 6: + case 7: + case 8: zzState = 102; break zzForNext; + default: break zzForAction; + } + + case 109: + switch (zzInput) { + case 9: zzIsFinal = true; zzState = 107; break zzForNext; + case 6: + case 7: + case 8: zzIsFinal = true; break zzForNext; + default: break zzForAction; + } + + case 110: + switch (zzInput) { + case 6: + case 7: + case 8: zzIsFinal = true; zzState = 109; break zzForNext; default: break zzForAction; } @@ -944,83 +1364,81 @@ zzMarkedPos = zzMarkedPosL; switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { - case 10: - { if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF16BE;} - } - case 19: break; - case 15: - { if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF83ByteBOM;} - } - case 20: break; - case 4: - { yybegin(SQ_STRING); string.setLength(0); - } - case 21: break; - case 5: - { string.append( yytext() ); - } - case 22: break; - case 1: - { if (yychar > MAX_TO_SCAN) {hasMore=false; return EncodingParserConstants.MAX_CHARS_REACHED;} - } - case 23: break; - case 11: - { if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF16LE;} - } - case 24: break; - case 6: - { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue; - } - case 25: break; - case 8: - { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.UnDelimitedStringValue; - } - case 26: break; - case 9: - { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue; - } - case 27: break; - case 7: - { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue; - } - case 28: break; - case 13: - { yypushback(2); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue; - } - case 29: break; - case 16: - { if (yychar == 0 ) {yybegin(ST_XMLDecl); return XMLHeadTokenizerConstants.XMLDeclStart;} - } - case 30: break; - case 2: - { yypushback(1); yybegin(UnDelimitedString); string.setLength(0); - } - case 31: break; - case 18: - { pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDelEncoding; - } - case 32: break; - case 17: - { pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDeclVersion; - } - case 33: break; - case 14: - { yypushback(2);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue; - } - case 34: break; - case 3: - { yybegin(DQ_STRING); string.setLength(0); - } - case 35: break; case 12: { yybegin(YYINITIAL); hasMore = false; return XMLHeadTokenizerConstants.XMLDeclEnd; } - case 36: break; + case 18: break; + case 14: + { if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF83ByteBOM;} + } + case 19: break; + case 9: + { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue; + } + case 20: break; + case 2: + { yypushback(1); yybegin(UnDelimitedString); string.setLength(0); + } + case 21: break; + case 7: + { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue; + } + case 22: break; + case 10: + { if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF16BE;} + } + case 23: break; + case 1: + { if(yychar > MAX_TO_SCAN) {hasMore=false; return EncodingParserConstants.MAX_CHARS_REACHED;} + } + case 24: break; + case 6: + { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue; + } + case 25: break; + case 5: + { string.append( yytext() ); + } + case 26: break; + case 13: + { yypushback(yylength()); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue; + } + case 27: break; + case 4: + { yybegin(SQ_STRING); string.setLength(0); + } + case 28: break; + case 3: + { yybegin(DQ_STRING); string.setLength(0); + } + case 29: break; + case 8: + { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.UnDelimitedStringValue; + } + case 30: break; + case 17: + { pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDelEncoding; + } + case 31: break; + case 15: + { if (yychar == 0 ) {yybegin(ST_XMLDecl); return XMLHeadTokenizerConstants.XMLDeclStart;} + } + case 32: break; + case 11: + { if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF16LE;} + } + case 33: break; + case 16: + { pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDeclVersion; + } + case 34: break; default: if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { zzAtEOF = true; zzDoEOF(); - { hasMore = false; return EncodingParserConstants.EOF; } + { + hasMore = false; return EncodingParserConstants.EOF; + } } else { zzScanError(ZZ_NO_MATCH);
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/contenttype/XMLResourceEncodingDetector.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/contenttype/XMLResourceEncodingDetector.java index a728792..b1690f3 100644 --- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/contenttype/XMLResourceEncodingDetector.java +++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/contenttype/XMLResourceEncodingDetector.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2005 IBM Corporation and others. + * Copyright (c) 2001, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -14,6 +14,7 @@ import java.io.IOException; +import org.eclipse.core.runtime.content.IContentDescription; import org.eclipse.wst.sse.core.internal.encoding.EncodingMemento; import org.eclipse.wst.sse.core.internal.encoding.IResourceCharsetDetector; @@ -31,16 +32,13 @@ createEncodingMemento(enc, EncodingMemento.DETECTED_STANDARD_UNICODE_BYTES); fEncodingMemento.setUTF83ByteBOMUsed(true); } - - else if (tokenType == EncodingParserConstants.UTF16BE) { - canHandleAsUnicodeStream = true; - String enc = "UTF-16BE"; //$NON-NLS-1$ - createEncodingMemento(enc, EncodingMemento.DETECTED_STANDARD_UNICODE_BYTES); - } - else if (tokenType == EncodingParserConstants.UTF16LE) { + else if (tokenType == EncodingParserConstants.UTF16BE || tokenType == EncodingParserConstants.UTF16LE) { canHandleAsUnicodeStream = true; String enc = "UTF-16"; //$NON-NLS-1$ + byte[] bom = (tokenType == EncodingParserConstants.UTF16BE) ? IContentDescription.BOM_UTF_16BE : IContentDescription.BOM_UTF_16LE; createEncodingMemento(enc, EncodingMemento.DETECTED_STANDARD_UNICODE_BYTES); + fEncodingMemento.setUnicodeStream(true); + fEncodingMemento.setUnicodeBOM(bom); } return canHandleAsUnicodeStream; }