0001: /*
0002: * Licensed to the Apache Software Foundation (ASF) under one or more
0003: * contributor license agreements. See the NOTICE file distributed with
0004: * this work for additional information regarding copyright ownership.
0005: * The ASF licenses this file to You under the Apache License, Version 2.0
0006: * (the "License"); you may not use this file except in compliance with
0007: * the License. You may obtain a copy of the License at
0008: *
0009: * http://www.apache.org/licenses/LICENSE-2.0
0010: *
0011: * Unless required by applicable law or agreed to in writing, software
0012: * distributed under the License is distributed on an "AS IS" BASIS,
0013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0014: * See the License for the specific language governing permissions and
0015: * limitations under the License.
0016: */
0017:
0018: //----------------------------------------------------
0019: // The following code was generated by CUP v0.11a beta 20060102
0020: // Wed Dec 20 21:02:26 ART 2006
0021: //----------------------------------------------------
0022: package javax.swing.text.html.parser;
0023:
0024: import java_cup.runtime.*;
0025: import java.lang.reflect.Field;
0026: import java.util.ArrayList;
0027: import java.util.List;
0028: import java.math.BigInteger;
0029:
0030: import org.apache.harmony.x.swing.internal.nls.Messages;
0031:
0032: /** CUP v0.11a beta 20060102 generated parser.
0033: * @version Wed Dec 20 21:02:26 ART 2006
0034: */
0035: class ParserCup extends java_cup.runtime.lr_parser {
0036:
0037: /** Default constructor. */
0038: public ParserCup() {
0039: super ();
0040: }
0041:
0042: /** Constructor which sets the default scanner. */
0043: public ParserCup(java_cup.runtime.Scanner s) {
0044: super (s);
0045: }
0046:
0047: /** Production table. */
0048: protected static final short _production_table[][] = unpackFromStrings(new String[] { "\000\070\000\002\002\004\000\002\002\004\000\002\002"
0049: + "\003\000\002\003\003\000\002\003\003\000\002\003\003"
0050: + "\000\002\003\003\000\002\003\003\000\002\003\003\000"
0051: + "\002\003\003\000\002\003\003\000\002\003\003\000\002"
0052: + "\004\003\000\002\004\003\000\002\004\003\000\002\005"
0053: + "\004\000\002\032\004\000\002\006\004\000\002\013\003"
0054: + "\000\002\013\004\000\002\031\004\000\002\007\005\000"
0055: + "\002\007\004\000\002\011\005\000\002\012\004\000\002"
0056: + "\012\003\000\002\012\002\000\002\010\006\000\002\014"
0057: + "\003\000\002\014\004\000\002\021\004\000\002\021\004"
0058: + "\000\002\021\004\000\002\022\003\000\002\022\003\000"
0059: + "\002\015\003\000\002\015\005\000\002\015\010\000\002"
0060: + "\026\004\000\002\020\003\000\002\020\004\000\002\016"
0061: + "\003\000\002\016\005\000\002\024\003\000\002\024\005"
0062: + "\000\002\017\004\000\002\017\002\000\002\023\004\000"
0063: + "\002\030\003\000\002\030\003\000\002\030\002\000\002"
0064: + "\027\003\000\002\034\002\000\002\027\005\000\002\025"
0065: + "\003\000\002\025\003" });
0066:
0067: /** Access to production table. */
0068: public short[][] production_table() {
0069: return _production_table;
0070: }
0071:
0072: /** Parse-action table. */
0073: protected static final short[][] _action_table = unpackFromStrings(new String[] { "\000\104\000\024\003\015\004\016\016\025\017\013\020"
0074: + "\014\022\022\033\005\034\024\035\011\001\002\000\026"
0075: + "\002\ufffa\003\ufffa\004\ufffa\016\ufffa\017\ufffa\020\ufffa\022"
0076: + "\ufffa\033\ufffa\034\ufffa\035\ufffa\001\002\000\026\002\ufff6"
0077: + "\003\ufff6\004\ufff6\016\ufff6\017\ufff6\020\ufff6\022\ufff6\033"
0078: + "\ufff6\034\ufff6\035\ufff6\001\002\000\026\002\ufff3\003\ufff3"
0079: + "\004\ufff3\016\ufff3\017\ufff3\020\ufff3\022\ufff3\033\ufff3\034"
0080: + "\ufff3\035\ufff3\001\002\000\026\002\ufff5\003\ufff5\004\ufff5"
0081: + "\016\ufff5\017\ufff5\020\ufff5\022\ufff5\033\ufff5\034\ufff5\035"
0082: + "\ufff5\001\002\000\026\002\ufffd\003\ufffd\004\ufffd\016\ufffd"
0083: + "\017\ufffd\020\ufffd\022\ufffd\033\ufffd\034\ufffd\035\ufffd\001"
0084: + "\002\000\026\002\ufff7\003\ufff7\004\ufff7\016\ufff7\017\ufff7"
0085: + "\020\ufff7\022\ufff7\033\ufff7\034\ufff7\035\ufff7\001\002\000"
0086: + "\026\002\ufff4\003\ufff4\004\ufff4\016\ufff4\017\ufff4\020\ufff4"
0087: + "\022\ufff4\033\ufff4\034\ufff4\035\ufff4\001\002\000\010\006"
0088: + "\uffcf\032\050\033\046\001\002\000\014\006\uffcf\013\uffcf"
0089: + "\023\uffcf\032\050\033\046\001\002\000\004\006\103\001"
0090: + "\002\000\026\002\ufff8\003\ufff8\004\ufff8\016\ufff8\017\ufff8"
0091: + "\020\ufff8\022\ufff8\033\ufff8\034\ufff8\035\ufff8\001\002\000"
0092: + "\006\006\101\013\102\001\002\000\026\002\ufffe\003\ufffe"
0093: + "\004\ufffe\016\ufffe\017\ufffe\020\ufffe\022\ufffe\033\ufffe\034"
0094: + "\ufffe\035\ufffe\001\002\000\026\002\ufffb\003\ufffb\004\ufffb"
0095: + "\016\ufffb\017\ufffb\020\ufffb\022\ufffb\033\ufffb\034\ufffb\035"
0096: + "\ufffb\001\002\000\026\002\ufffc\003\ufffc\004\ufffc\016\ufffc"
0097: + "\017\ufffc\020\ufffc\022\ufffc\033\ufffc\034\ufffc\035\ufffc\001"
0098: + "\002\000\010\006\uffef\013\uffef\023\044\001\002\000\026"
0099: + "\002\ufff9\003\ufff9\004\ufff9\016\ufff9\017\ufff9\020\ufff9\022"
0100: + "\ufff9\033\ufff9\034\ufff9\035\ufff9\001\002\000\010\006\uffe7"
0101: + "\012\034\030\032\001\002\000\026\002\uffff\003\uffff\004"
0102: + "\uffff\016\uffff\017\uffff\020\uffff\022\uffff\033\uffff\034\uffff"
0103: + "\035\uffff\001\002\000\026\002\030\003\015\004\016\016"
0104: + "\025\017\013\020\014\022\022\033\005\034\024\035\011"
0105: + "\001\002\000\004\002\001\001\002\000\026\002\000\003"
0106: + "\000\004\000\016\000\017\000\020\000\022\000\033\000"
0107: + "\034\000\035\000\001\002\000\006\006\uffe8\031\040\001"
0108: + "\002\000\004\006\037\001\002\000\004\021\035\001\002"
0109: + "\000\004\014\036\001\002\000\026\002\uffe6\003\uffe6\004"
0110: + "\uffe6\016\uffe6\017\uffe6\020\uffe6\022\uffe6\033\uffe6\034\uffe6"
0111: + "\035\uffe6\001\002\000\026\002\uffea\003\uffea\004\uffea\016"
0112: + "\uffea\017\uffea\020\uffea\022\uffea\033\uffea\034\uffea\035\uffea"
0113: + "\001\002\000\004\006\uffe9\001\002\000\012\006\uffde\007"
0114: + "\055\013\uffde\023\uffd8\001\002\000\004\023\044\001\002"
0115: + "\000\006\006\uffe5\013\uffe5\001\002\000\016\006\uffcf\007"
0116: + "\uffcf\013\uffcf\023\uffcf\032\050\033\046\001\002\000\006"
0117: + "\006\uffee\013\uffee\001\002\000\024\006\uffd0\007\uffd0\010"
0118: + "\uffd0\011\uffd0\013\uffd0\023\uffd0\025\uffd0\026\uffd0\027\uffd0"
0119: + "\001\002\000\024\006\uffd1\007\uffd1\010\uffd1\011\uffd1\013"
0120: + "\uffd1\023\uffd1\025\uffd1\026\uffd1\027\uffd1\001\002\000\026"
0121: + "\006\uffce\007\uffce\010\uffce\011\uffce\013\uffce\023\uffce\025"
0122: + "\uffce\026\uffce\027\uffce\032\uffcd\001\002\000\012\006\uffdb"
0123: + "\007\uffdb\013\uffdb\023\uffdb\001\002\000\004\032\050\001"
0124: + "\002\000\024\006\uffcc\007\uffcc\010\uffcc\011\uffcc\013\uffcc"
0125: + "\023\uffcc\025\uffcc\026\uffcc\027\uffcc\001\002\000\006\006"
0126: + "\uffe4\013\uffe4\001\002\000\014\010\060\011\064\025\061"
0127: + "\026\056\027\062\001\002\000\026\006\uffcf\010\uffcf\011"
0128: + "\uffcf\013\uffcf\023\uffcf\025\uffcf\026\uffcf\027\uffcf\032\050"
0129: + "\033\046\001\002\000\022\006\uffdd\010\060\011\064\013"
0130: + "\uffdd\023\uffd6\025\061\026\056\027\062\001\002\000\030"
0131: + "\006\uffcb\010\uffcb\011\uffcb\013\uffcb\023\uffcb\024\uffcb\025"
0132: + "\uffcb\026\uffcb\027\uffcb\032\uffcb\033\uffcb\001\002\000\026"
0133: + "\006\uffcf\010\uffcf\011\uffcf\013\uffcf\023\uffcf\025\uffcf\026"
0134: + "\uffcf\027\uffcf\032\050\033\046\001\002\000\026\006\uffcf"
0135: + "\010\uffcf\011\uffcf\013\uffcf\023\uffcf\025\uffcf\026\uffcf\027"
0136: + "\uffcf\032\050\033\046\001\002\000\022\006\uffda\010\uffda"
0137: + "\011\uffda\013\uffda\023\uffda\025\uffda\026\uffda\027\uffda\001"
0138: + "\002\000\030\006\uffca\010\uffca\011\uffca\013\uffca\023\uffca"
0139: + "\024\uffca\025\uffca\026\uffca\027\uffca\032\uffca\033\uffca\001"
0140: + "\002\000\004\023\uffd7\001\002\000\010\010\uffd3\011\uffd3"
0141: + "\024\uffd3\001\002\000\010\010\060\011\064\024\071\001"
0142: + "\002\000\014\006\uffcf\013\uffcf\023\uffd5\032\050\033\046"
0143: + "\001\002\000\010\010\uffd4\011\uffd4\024\uffd4\001\002\000"
0144: + "\006\006\uffdc\013\uffdc\001\002\000\022\006\uffe1\010\uffe1"
0145: + "\011\uffe1\013\uffe1\023\uffe1\025\uffe1\026\uffe1\027\uffe1\001"
0146: + "\002\000\022\006\uffe2\010\uffe2\011\uffe2\013\uffe2\023\uffe2"
0147: + "\025\uffe2\026\uffe2\027\uffe2\001\002\000\022\006\uffd9\010"
0148: + "\uffd9\011\uffd9\013\uffd9\023\uffd9\025\uffd9\026\uffd9\027\uffd9"
0149: + "\001\002\000\022\006\uffdf\010\uffdf\011\uffdf\013\uffdf\023"
0150: + "\uffdf\025\uffdf\026\uffdf\027\uffdf\001\002\000\022\006\uffe0"
0151: + "\010\uffe0\011\uffe0\013\uffe0\023\uffe0\025\uffe0\026\uffe0\027"
0152: + "\uffe0\001\002\000\022\006\uffe3\010\uffe3\011\uffe3\013\uffe3"
0153: + "\023\uffe3\025\uffe3\026\uffe3\027\uffe3\001\002\000\026\002"
0154: + "\ufff2\003\ufff2\004\ufff2\016\ufff2\017\ufff2\020\ufff2\022\ufff2"
0155: + "\033\ufff2\034\ufff2\035\ufff2\001\002\000\026\002\ufff0\003"
0156: + "\ufff0\004\ufff0\016\ufff0\017\ufff0\020\ufff0\022\ufff0\033\ufff0"
0157: + "\034\ufff0\035\ufff0\001\002\000\026\002\uffeb\003\uffeb\004"
0158: + "\uffeb\016\uffeb\017\uffeb\020\uffeb\022\uffeb\033\uffeb\034\uffeb"
0159: + "\035\uffeb\001\002\000\010\006\uffed\013\uffed\023\uffed\001"
0160: + "\002\000\004\006\106\001\002\000\026\002\uffec\003\uffec"
0161: + "\004\uffec\016\uffec\017\uffec\020\uffec\022\uffec\033\uffec\034"
0162: + "\uffec\035\uffec\001\002" });
0163:
0164: /** Access to parse-action table. */
0165: public short[][] action_table() {
0166: return _action_table;
0167: }
0168:
0169: /** <code>reduce_goto</code> table. */
0170: protected static final short[][] _reduce_table = unpackFromStrings(new String[] { "\000\104\000\030\002\026\003\025\004\017\005\006\006"
0171: + "\011\007\007\010\003\011\020\013\016\031\022\033\005"
0172: + "\001\001\000\002\001\001\000\002\001\001\000\002\001"
0173: + "\001\000\002\001\001\000\002\001\001\000\002\001\001"
0174: + "\000\002\001\001\000\006\027\046\030\104\001\001\000"
0175: + "\006\027\046\030\103\001\001\000\002\001\001\000\002"
0176: + "\001\001\000\002\001\001\000\002\001\001\000\002\001"
0177: + "\001\000\002\001\001\000\012\014\044\015\042\016\041"
0178: + "\026\040\001\001\000\002\001\001\000\004\012\032\001"
0179: + "\001\000\002\001\001\000\026\003\030\004\017\005\006"
0180: + "\006\011\007\007\010\003\011\020\013\016\031\022\033"
0181: + "\005\001\001\000\002\001\001\000\002\001\001\000\002"
0182: + "\001\001\000\002\001\001\000\002\001\001\000\002\001"
0183: + "\001\000\002\001\001\000\002\001\001\000\002\001\001"
0184: + "\000\002\001\001\000\012\014\053\015\042\016\041\026"
0185: + "\040\001\001\000\002\001\001\000\006\027\046\030\050"
0186: + "\001\001\000\002\001\001\000\002\001\001\000\002\001"
0187: + "\001\000\004\034\051\001\001\000\002\001\001\000\004"
0188: + "\027\052\001\001\000\002\001\001\000\002\001\001\000"
0189: + "\012\020\056\021\062\024\064\025\065\001\001\000\006"
0190: + "\027\046\030\077\001\001\000\010\021\076\022\074\025"
0191: + "\075\001\001\000\002\001\001\000\006\027\046\030\073"
0192: + "\001\001\000\006\027\046\030\072\001\001\000\002\001"
0193: + "\001\000\002\001\001\000\002\001\001\000\004\017\066"
0194: + "\001\001\000\004\025\067\001\001\000\006\027\046\030"
0195: + "\071\001\001\000\002\001\001\000\002\001\001\000\002"
0196: + "\001\001\000\002\001\001\000\002\001\001\000\002\001"
0197: + "\001\000\002\001\001\000\002\001\001\000\002\001\001"
0198: + "\000\002\001\001\000\002\001\001\000\002\001\001\000"
0199: + "\002\001\001\000\002\001\001" });
0200:
0201: /** Access to <code>reduce_goto</code> table. */
0202: public short[][] reduce_table() {
0203: return _reduce_table;
0204: }
0205:
0206: /** Instance of action encapsulation class. */
0207: protected CUP$ParserCup$actions action_obj;
0208:
0209: /** Action encapsulation object initializer. */
0210: protected void init_actions() {
0211: action_obj = new CUP$ParserCup$actions(this );
0212: }
0213:
0214: /** Invoke a user supplied parse action. */
0215: public java_cup.runtime.Symbol do_action(int act_num,
0216: java_cup.runtime.lr_parser parser, java.util.Stack stack,
0217: int top) throws java.lang.Exception {
0218: /* call code in generated class */
0219: return action_obj.CUP$ParserCup$do_action(act_num, parser,
0220: stack, top);
0221: }
0222:
0223: /** Indicates start state. */
0224: public int start_state() {
0225: return 0;
0226: }
0227:
0228: /** Indicates start production. */
0229: public int start_production() {
0230: return 0;
0231: }
0232:
0233: /** <code>EOF</code> Symbol index. */
0234: public int EOF_sym() {
0235: return 0;
0236: }
0237:
0238: /** <code>error</code> Symbol index. */
0239: public int error_sym() {
0240: return 1;
0241: }
0242:
0243: /**
0244: * A local reference to the ParserHandler.
0245: */
0246: private ParserHandler ph;
0247:
0248: /**
0249: * Receives the ParserHandler were the callback methods will be invoked.
0250: */
0251: public void setCallBack(ParserHandler ph) {
0252: this .ph = ph;
0253: }
0254:
0255: /**
0256: * Sets the ParserHandler of the action manager before processing any symbol.
0257: */
0258: public void user_init() {
0259: action_obj.setHandler(ph);
0260: }
0261:
0262: public void report_fatal_error(final String message,
0263: final Object info) {
0264: ph.reportRemainingElements();
0265: }
0266:
0267: public void report_error(final String message, final Object info) {
0268:
0269: }
0270:
0271: }
0272:
0273: /** Cup generated class to encapsulate user supplied action code.*/
0274: class CUP$ParserCup$actions {
0275:
0276: /**
0277: * A local reference of the ParserHandler in the action manager.
0278: */
0279: private ParserHandler ph;
0280:
0281: /**
0282: * It sets the ParserHandler for this action manager.
0283: */
0284: public void setHandler(final ParserHandler ph) {
0285: this .ph = ph;
0286: }
0287:
0288: /**
0289: * This idicates whether the las tag was successfully created or not
0290: */
0291: private static boolean lastStartTagCreatedOk;
0292:
0293: public boolean isLastStartTagCreatedOk() {
0294: return lastStartTagCreatedOk;
0295: }
0296:
0297: private final ParserCup parser;
0298:
0299: /** Constructor */
0300: CUP$ParserCup$actions(ParserCup parser) {
0301: this .parser = parser;
0302: }
0303:
0304: /** Method with the actual generated action code. */
0305: public final java_cup.runtime.Symbol CUP$ParserCup$do_action(
0306: int CUP$ParserCup$act_num,
0307: java_cup.runtime.lr_parser CUP$ParserCup$parser,
0308: java.util.Stack CUP$ParserCup$stack, int CUP$ParserCup$top)
0309: throws java.lang.Exception {
0310: /* Symbol object for return from actions */
0311: java_cup.runtime.Symbol CUP$ParserCup$result;
0312:
0313: /* select the action based on the action number */
0314: switch (CUP$ParserCup$act_num) {
0315: /*. . . . . . . . . . . . . . . . . . . .*/
0316: case 55: // qm ::= SQM
0317: {
0318: Character RESULT = null;
0319: int quotemarkleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0320: .peek()).left;
0321: int quotemarkright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0322: .peek()).right;
0323: Character quotemark = (Character) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0324: .peek()).value;
0325:
0326: RESULT = quotemark;
0327:
0328: CUP$ParserCup$result = new java_cup.runtime.Symbol(
0329: 19/*qm*/,
0330: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0331: .peek()).left,
0332: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0333: .peek()).right, RESULT);
0334: }
0335: return CUP$ParserCup$result;
0336:
0337: /*. . . . . . . . . . . . . . . . . . . .*/
0338: case 54: // qm ::= DQM
0339: {
0340: Character RESULT = null;
0341: int quotemarkleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0342: .peek()).left;
0343: int quotemarkright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0344: .peek()).right;
0345: Character quotemark = (Character) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0346: .peek()).value;
0347:
0348: RESULT = quotemark;
0349:
0350: CUP$ParserCup$result = new java_cup.runtime.Symbol(
0351: 19/*qm*/,
0352: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0353: .peek()).left,
0354: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0355: .peek()).right, RESULT);
0356: }
0357: return CUP$ParserCup$result;
0358:
0359: /*. . . . . . . . . . . . . . . . . . . .*/
0360: case 53: // lexicalerrors ::= LEXERR NT$0 lexicalerrors
0361: {
0362: List<String> RESULT = null;
0363: // propagate RESULT from NT$0
0364: if (((java_cup.runtime.Symbol) CUP$ParserCup$stack
0365: .elementAt(CUP$ParserCup$top - 1)).value != null)
0366: RESULT = (List<String>) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0367: .elementAt(CUP$ParserCup$top - 1)).value;
0368: int error1left = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0369: .elementAt(CUP$ParserCup$top - 2)).left;
0370: int error1right = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0371: .elementAt(CUP$ParserCup$top - 2)).right;
0372: String error1 = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0373: .elementAt(CUP$ParserCup$top - 2)).value;
0374: int error2left = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0375: .peek()).left;
0376: int error2right = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0377: .peek()).right;
0378: List<String> error2 = (List<String>) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0379: .peek()).value;
0380:
0381: RESULT.addAll(error2);
0382:
0383: CUP$ParserCup$result = new java_cup.runtime.Symbol(
0384: 21/*lexicalerrors*/,
0385: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0386: .elementAt(CUP$ParserCup$top - 2)).left,
0387: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0388: .peek()).right, RESULT);
0389: }
0390: return CUP$ParserCup$result;
0391:
0392: /*. . . . . . . . . . . . . . . . . . . .*/
0393: case 52: // NT$0 ::=
0394: {
0395: Object RESULT = null;
0396: int error1left = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0397: .peek()).left;
0398: int error1right = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0399: .peek()).right;
0400: String error1 = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0401: .peek()).value;
0402:
0403: List<String> list = new ArrayList<String>();
0404: list.add(error1);
0405: RESULT = list;
0406:
0407: CUP$ParserCup$result = new java_cup.runtime.Symbol(
0408: 26/*NT$0*/,
0409: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0410: .peek()).right,
0411: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0412: .peek()).right, RESULT);
0413: }
0414: return CUP$ParserCup$result;
0415:
0416: /*. . . . . . . . . . . . . . . . . . . .*/
0417: case 51: // lexicalerrors ::= LEXERR
0418: {
0419: List<String> RESULT = null;
0420: int error1left = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0421: .peek()).left;
0422: int error1right = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0423: .peek()).right;
0424: String error1 = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0425: .peek()).value;
0426:
0427: List<String> list = new ArrayList<String>();
0428: list.add(error1);
0429: RESULT = list;
0430:
0431: CUP$ParserCup$result = new java_cup.runtime.Symbol(
0432: 21/*lexicalerrors*/,
0433: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0434: .peek()).left,
0435: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0436: .peek()).right, RESULT);
0437: }
0438: return CUP$ParserCup$result;
0439:
0440: /*. . . . . . . . . . . . . . . . . . . .*/
0441: case 50: // optional_lexicalerrors ::=
0442: {
0443: List<String> RESULT = null;
0444:
0445: CUP$ParserCup$result = new java_cup.runtime.Symbol(
0446: 22/*optional_lexicalerrors*/,
0447: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0448: .peek()).right,
0449: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0450: .peek()).right, RESULT);
0451: }
0452: return CUP$ParserCup$result;
0453:
0454: /*. . . . . . . . . . . . . . . . . . . .*/
0455: case 49: // optional_lexicalerrors ::= EOFTK
0456: {
0457: List<String> RESULT = null;
0458: int tokenleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0459: .peek()).left;
0460: int tokenright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0461: .peek()).right;
0462: String token = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0463: .peek()).value;
0464:
0465: CUP$ParserCup$result = new java_cup.runtime.Symbol(
0466: 22/*optional_lexicalerrors*/,
0467: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0468: .peek()).left,
0469: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0470: .peek()).right, RESULT);
0471: }
0472: return CUP$ParserCup$result;
0473:
0474: /*. . . . . . . . . . . . . . . . . . . .*/
0475: case 48: // optional_lexicalerrors ::= lexicalerrors
0476: {
0477: List<String> RESULT = null;
0478: int error2left = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0479: .peek()).left;
0480: int error2right = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0481: .peek()).right;
0482: List<String> error2 = (List<String>) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0483: .peek()).value;
0484:
0485: RESULT = error2;
0486:
0487: CUP$ParserCup$result = new java_cup.runtime.Symbol(
0488: 22/*optional_lexicalerrors*/,
0489: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0490: .peek()).left,
0491: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0492: .peek()).right, RESULT);
0493: }
0494: return CUP$ParserCup$result;
0495:
0496: /*. . . . . . . . . . . . . . . . . . . .*/
0497: case 47: // attrval_lit ::= ATTRVAL_LIT optional_lexicalerrors
0498: {
0499: Pair<Object, List<String>> RESULT = null;
0500: int nextLitleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0501: .elementAt(CUP$ParserCup$top - 1)).left;
0502: int nextLitright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0503: .elementAt(CUP$ParserCup$top - 1)).right;
0504: String nextLit = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0505: .elementAt(CUP$ParserCup$top - 1)).value;
0506: int error1left = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0507: .peek()).left;
0508: int error1right = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0509: .peek()).right;
0510: List<String> error1 = (List<String>) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0511: .peek()).value;
0512:
0513: CUP$ParserCup$result = new java_cup.runtime.Symbol(
0514: 17/*attrval_lit*/,
0515: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0516: .elementAt(CUP$ParserCup$top - 1)).left,
0517: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0518: .peek()).right, RESULT);
0519: }
0520: return CUP$ParserCup$result;
0521:
0522: /*. . . . . . . . . . . . . . . . . . . .*/
0523: case 46: // literal ::=
0524: {
0525: String RESULT = null;
0526: RESULT = new String("");
0527: CUP$ParserCup$result = new java_cup.runtime.Symbol(
0528: 13/*literal*/,
0529: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0530: .peek()).right,
0531: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0532: .peek()).right, RESULT);
0533: }
0534: return CUP$ParserCup$result;
0535:
0536: /*. . . . . . . . . . . . . . . . . . . .*/
0537: case 45: // literal ::= literal ATTRVAL_LIT
0538: {
0539: String RESULT = null;
0540: int prevLitleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0541: .elementAt(CUP$ParserCup$top - 1)).left;
0542: int prevLitright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0543: .elementAt(CUP$ParserCup$top - 1)).right;
0544: String prevLit = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0545: .elementAt(CUP$ParserCup$top - 1)).value;
0546: int nextLitleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0547: .peek()).left;
0548: int nextLitright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0549: .peek()).right;
0550: String nextLit = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0551: .peek()).value;
0552: RESULT = prevLit + nextLit;
0553: CUP$ParserCup$result = new java_cup.runtime.Symbol(
0554: 13/*literal*/,
0555: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0556: .elementAt(CUP$ParserCup$top - 1)).left,
0557: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0558: .peek()).right, RESULT);
0559: }
0560: return CUP$ParserCup$result;
0561:
0562: /*. . . . . . . . . . . . . . . . . . . .*/
0563: case 44: // mult_attr_value ::= qm literal qm
0564: {
0565: Pair<Object, List<String>> RESULT = null;
0566: int attrValueleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0567: .elementAt(CUP$ParserCup$top - 1)).left;
0568: int attrValueright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0569: .elementAt(CUP$ParserCup$top - 1)).right;
0570: String attrValue = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0571: .elementAt(CUP$ParserCup$top - 1)).value;
0572:
0573: RESULT = new Pair(attrValue, new ArrayList());
0574: CUP$ParserCup$result = new java_cup.runtime.Symbol(
0575: 18/*mult_attr_value*/,
0576: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0577: .elementAt(CUP$ParserCup$top - 2)).left,
0578: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0579: .peek()).right, RESULT);
0580: }
0581: return CUP$ParserCup$result;
0582:
0583: /*. . . . . . . . . . . . . . . . . . . .*/
0584: case 43: // mult_attr_value ::= single_attr_value
0585: {
0586: Pair<Object, List<String>> RESULT = null;
0587: int attrValueleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0588: .peek()).left;
0589: int attrValueright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0590: .peek()).right;
0591: Pair<Object, List<String>> attrValue = (Pair<Object, List<String>>) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0592: .peek()).value;
0593: RESULT = attrValue;
0594: CUP$ParserCup$result = new java_cup.runtime.Symbol(
0595: 18/*mult_attr_value*/,
0596: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0597: .peek()).left,
0598: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0599: .peek()).right, RESULT);
0600: }
0601: return CUP$ParserCup$result;
0602:
0603: /*. . . . . . . . . . . . . . . . . . . .*/
0604: case 42: // mult_attr ::= attribute_name EQUALS mult_attr_value
0605: {
0606: HTMLAttributeList RESULT = null;
0607: int attrNameleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0608: .elementAt(CUP$ParserCup$top - 2)).left;
0609: int attrNameright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0610: .elementAt(CUP$ParserCup$top - 2)).right;
0611: Pair<String, List<String>> attrName = (Pair<String, List<String>>) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0612: .elementAt(CUP$ParserCup$top - 2)).value;
0613: int attrValueleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0614: .peek()).left;
0615: int attrValueright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0616: .peek()).right;
0617: Pair<Object, List<String>> attrValue = (Pair<Object, List<String>>) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0618: .peek()).value;
0619:
0620: List<String> array = new ArrayList<String>();
0621:
0622: if (attrName.getSecond() != null)
0623: array.addAll(attrName.getSecond());
0624: if (attrValue.getSecond() != null)
0625: array.addAll(attrValue.getSecond());
0626: RESULT = new HTMLAttributeList(attrName.getFirst(),
0627: attrValue.getFirst(), attrNameright,
0628: attrValueright, null, attrName.getSecond());
0629:
0630: CUP$ParserCup$result = new java_cup.runtime.Symbol(
0631: 12/*mult_attr*/,
0632: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0633: .elementAt(CUP$ParserCup$top - 2)).left,
0634: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0635: .peek()).right, RESULT);
0636: }
0637: return CUP$ParserCup$result;
0638:
0639: /*. . . . . . . . . . . . . . . . . . . .*/
0640: case 41: // mult_attr ::= attribute_name
0641: {
0642: HTMLAttributeList RESULT = null;
0643: int attrNameleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0644: .peek()).left;
0645: int attrNameright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0646: .peek()).right;
0647: Pair<String, List<String>> attrName = (Pair<String, List<String>>) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0648: .peek()).value;
0649: RESULT = new HTMLAttributeList(attrName.getFirst(), null,
0650: attrNameleft, attrNameright, null, attrName
0651: .getSecond());
0652: CUP$ParserCup$result = new java_cup.runtime.Symbol(
0653: 12/*mult_attr*/,
0654: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0655: .peek()).left,
0656: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0657: .peek()).right, RESULT);
0658: }
0659: return CUP$ParserCup$result;
0660:
0661: /*. . . . . . . . . . . . . . . . . . . .*/
0662: case 40: // single_attr_value ::= single_attr_value any_value
0663: {
0664: Pair<Object, List<String>> RESULT = null;
0665: int prevAttrValueleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0666: .elementAt(CUP$ParserCup$top - 1)).left;
0667: int prevAttrValueright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0668: .elementAt(CUP$ParserCup$top - 1)).right;
0669: Pair<Object, List<String>> prevAttrValue = (Pair<Object, List<String>>) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0670: .elementAt(CUP$ParserCup$top - 1)).value;
0671: int newAttrValueleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0672: .peek()).left;
0673: int newAttrValueright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0674: .peek()).right;
0675: Pair<Object, List<String>> newAttrValue = (Pair<Object, List<String>>) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0676: .peek()).value;
0677:
0678: List<String> array = new ArrayList<String>();
0679: if (prevAttrValue != null
0680: && prevAttrValue.getSecond() != null) {
0681: array.addAll(prevAttrValue.getSecond());
0682: }
0683: if (newAttrValue != null
0684: && newAttrValue.getSecond() != null) {
0685: array.addAll(newAttrValue.getSecond());
0686: }
0687: Pair<Object, List<String>> pair = new Pair<Object, List<String>>(
0688: (prevAttrValue != null ? prevAttrValue.getFirst()
0689: .toString() : "")
0690: + (newAttrValue != null ? newAttrValue
0691: .getFirst().toString() : ""), array);
0692: RESULT = pair;
0693:
0694: CUP$ParserCup$result = new java_cup.runtime.Symbol(
0695: 14/*single_attr_value*/,
0696: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0697: .elementAt(CUP$ParserCup$top - 1)).left,
0698: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0699: .peek()).right, RESULT);
0700: }
0701: return CUP$ParserCup$result;
0702:
0703: /*. . . . . . . . . . . . . . . . . . . .*/
0704: case 39: // single_attr_value ::= any_no_lit
0705: {
0706: Pair<Object, List<String>> RESULT = null;
0707: int attrValueleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0708: .peek()).left;
0709: int attrValueright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0710: .peek()).right;
0711: Pair<Object, List<String>> attrValue = (Pair<Object, List<String>>) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0712: .peek()).value;
0713: RESULT = attrValue;
0714: CUP$ParserCup$result = new java_cup.runtime.Symbol(
0715: 14/*single_attr_value*/,
0716: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0717: .peek()).left,
0718: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0719: .peek()).right, RESULT);
0720: }
0721: return CUP$ParserCup$result;
0722:
0723: /*. . . . . . . . . . . . . . . . . . . .*/
0724: case 38: // attribute_name ::= ATTR_NAME optional_lexicalerrors
0725: {
0726: Pair<String, List<String>> RESULT = null;
0727: int attrNameTkleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0728: .elementAt(CUP$ParserCup$top - 1)).left;
0729: int attrNameTkright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0730: .elementAt(CUP$ParserCup$top - 1)).right;
0731: String attrNameTk = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0732: .elementAt(CUP$ParserCup$top - 1)).value;
0733: int error1left = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0734: .peek()).left;
0735: int error1right = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0736: .peek()).right;
0737: List<String> error1 = (List<String>) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0738: .peek()).value;
0739:
0740: RESULT = new Pair(attrNameTk, error1);
0741:
0742: CUP$ParserCup$result = new java_cup.runtime.Symbol(
0743: 20/*attribute_name*/,
0744: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0745: .elementAt(CUP$ParserCup$top - 1)).left,
0746: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0747: .peek()).right, RESULT);
0748: }
0749: return CUP$ParserCup$result;
0750:
0751: /*. . . . . . . . . . . . . . . . . . . .*/
0752: case 37: // single_attr ::= attribute_name EQUALS qm literal qm optional_lexicalerrors
0753: {
0754: HTMLAttributeList RESULT = null;
0755: int attrNameleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0756: .elementAt(CUP$ParserCup$top - 5)).left;
0757: int attrNameright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0758: .elementAt(CUP$ParserCup$top - 5)).right;
0759: Pair<String, List<String>> attrName = (Pair<String, List<String>>) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0760: .elementAt(CUP$ParserCup$top - 5)).value;
0761: int attrValueleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0762: .elementAt(CUP$ParserCup$top - 2)).left;
0763: int attrValueright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0764: .elementAt(CUP$ParserCup$top - 2)).right;
0765: String attrValue = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0766: .elementAt(CUP$ParserCup$top - 2)).value;
0767: int error1left = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0768: .peek()).left;
0769: int error1right = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0770: .peek()).right;
0771: List<String> error1 = (List<String>) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0772: .peek()).value;
0773:
0774: List<String> array = new ArrayList<String>();
0775:
0776: if (attrName.getSecond() != null) {
0777: array.addAll(attrName.getSecond());
0778: }
0779: if (error1 != null) {
0780: array.addAll(error1);
0781: }
0782: RESULT = new HTMLAttributeList(attrName.getFirst(),
0783: attrValue, attrNameleft, attrValueright, null,
0784: array);
0785:
0786: CUP$ParserCup$result = new java_cup.runtime.Symbol(
0787: 11/*single_attr*/,
0788: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0789: .elementAt(CUP$ParserCup$top - 5)).left,
0790: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0791: .peek()).right, RESULT);
0792: }
0793: return CUP$ParserCup$result;
0794:
0795: /*. . . . . . . . . . . . . . . . . . . .*/
0796: case 36: // single_attr ::= attribute_name EQUALS single_attr_value
0797: {
0798: HTMLAttributeList RESULT = null;
0799: int attrNameleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0800: .elementAt(CUP$ParserCup$top - 2)).left;
0801: int attrNameright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0802: .elementAt(CUP$ParserCup$top - 2)).right;
0803: Pair<String, List<String>> attrName = (Pair<String, List<String>>) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0804: .elementAt(CUP$ParserCup$top - 2)).value;
0805: int attrValueleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0806: .peek()).left;
0807: int attrValueright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0808: .peek()).right;
0809: Pair<Object, List<String>> attrValue = (Pair<Object, List<String>>) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0810: .peek()).value;
0811:
0812: List<String> array = new ArrayList<String>();
0813:
0814: if (attrName.getSecond() != null) {
0815: array.addAll(attrName.getSecond());
0816: }
0817: if (attrValue.getSecond() != null) {
0818: array.addAll(attrValue.getSecond());
0819: }
0820: RESULT = new HTMLAttributeList(attrName.getFirst(),
0821: attrValue.getFirst(), attrNameleft, attrValueright,
0822: null, array);
0823:
0824: CUP$ParserCup$result = new java_cup.runtime.Symbol(
0825: 11/*single_attr*/,
0826: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0827: .elementAt(CUP$ParserCup$top - 2)).left,
0828: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0829: .peek()).right, RESULT);
0830: }
0831: return CUP$ParserCup$result;
0832:
0833: /*. . . . . . . . . . . . . . . . . . . .*/
0834: case 35: // single_attr ::= attribute_name
0835: {
0836: HTMLAttributeList RESULT = null;
0837: int attrNameleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0838: .peek()).left;
0839: int attrNameright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0840: .peek()).right;
0841: Pair<String, List<String>> attrName = (Pair<String, List<String>>) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0842: .peek()).value;
0843: RESULT = new HTMLAttributeList(attrName.getFirst(), null,
0844: attrNameleft, attrNameright, null, attrName
0845: .getSecond());
0846: CUP$ParserCup$result = new java_cup.runtime.Symbol(
0847: 11/*single_attr*/,
0848: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0849: .peek()).left,
0850: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0851: .peek()).right, RESULT);
0852: }
0853: return CUP$ParserCup$result;
0854:
0855: /*. . . . . . . . . . . . . . . . . . . .*/
0856: case 34: // any_value ::= qm
0857: {
0858: Pair<Object, List<String>> RESULT = null;
0859:
0860: CUP$ParserCup$result = new java_cup.runtime.Symbol(
0861: 16/*any_value*/,
0862: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0863: .peek()).left,
0864: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0865: .peek()).right, RESULT);
0866: }
0867: return CUP$ParserCup$result;
0868:
0869: /*. . . . . . . . . . . . . . . . . . . .*/
0870: case 33: // any_value ::= any_no_lit
0871: {
0872: Pair<Object, List<String>> RESULT = null;
0873: int anyValueleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0874: .peek()).left;
0875: int anyValueright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0876: .peek()).right;
0877: Pair<Object, List<String>> anyValue = (Pair<Object, List<String>>) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0878: .peek()).value;
0879: RESULT = anyValue;
0880: CUP$ParserCup$result = new java_cup.runtime.Symbol(
0881: 16/*any_value*/,
0882: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0883: .peek()).left,
0884: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0885: .peek()).right, RESULT);
0886: }
0887: return CUP$ParserCup$result;
0888:
0889: /*. . . . . . . . . . . . . . . . . . . .*/
0890: case 32: // any_no_lit ::= ATTRVAL_NUM optional_lexicalerrors
0891: {
0892: Pair<Object, List<String>> RESULT = null;
0893: int attrValueTokenleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0894: .elementAt(CUP$ParserCup$top - 1)).left;
0895: int attrValueTokenright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0896: .elementAt(CUP$ParserCup$top - 1)).right;
0897: String attrValueToken = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0898: .elementAt(CUP$ParserCup$top - 1)).value;
0899: int error1left = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0900: .peek()).left;
0901: int error1right = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0902: .peek()).right;
0903: List<String> error1 = (List<String>) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0904: .peek()).value;
0905:
0906: RESULT = new Pair(attrValueToken, error1);
0907:
0908: CUP$ParserCup$result = new java_cup.runtime.Symbol(
0909: 15/*any_no_lit*/,
0910: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0911: .elementAt(CUP$ParserCup$top - 1)).left,
0912: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0913: .peek()).right, RESULT);
0914: }
0915: return CUP$ParserCup$result;
0916:
0917: /*. . . . . . . . . . . . . . . . . . . .*/
0918: case 31: // any_no_lit ::= ATTRVAL_NMTK optional_lexicalerrors
0919: {
0920: Pair<Object, List<String>> RESULT = null;
0921: int attrValueTokenleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0922: .elementAt(CUP$ParserCup$top - 1)).left;
0923: int attrValueTokenright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0924: .elementAt(CUP$ParserCup$top - 1)).right;
0925: String attrValueToken = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0926: .elementAt(CUP$ParserCup$top - 1)).value;
0927: int error1left = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0928: .peek()).left;
0929: int error1right = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0930: .peek()).right;
0931: List<String> error1 = (List<String>) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0932: .peek()).value;
0933:
0934: RESULT = new Pair(attrValueToken, error1);
0935:
0936: CUP$ParserCup$result = new java_cup.runtime.Symbol(
0937: 15/*any_no_lit*/,
0938: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0939: .elementAt(CUP$ParserCup$top - 1)).left,
0940: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0941: .peek()).right, RESULT);
0942: }
0943: return CUP$ParserCup$result;
0944:
0945: /*. . . . . . . . . . . . . . . . . . . .*/
0946: case 30: // any_no_lit ::= ATTRVAL_NUMTK optional_lexicalerrors
0947: {
0948: Pair<Object, List<String>> RESULT = null;
0949: int attrValueTokenleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0950: .elementAt(CUP$ParserCup$top - 1)).left;
0951: int attrValueTokenright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0952: .elementAt(CUP$ParserCup$top - 1)).right;
0953: String attrValueToken = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0954: .elementAt(CUP$ParserCup$top - 1)).value;
0955: int error1left = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0956: .peek()).left;
0957: int error1right = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0958: .peek()).right;
0959: List<String> error1 = (List<String>) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0960: .peek()).value;
0961:
0962: RESULT = new Pair(attrValueToken, error1);
0963:
0964: CUP$ParserCup$result = new java_cup.runtime.Symbol(
0965: 15/*any_no_lit*/,
0966: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0967: .elementAt(CUP$ParserCup$top - 1)).left,
0968: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0969: .peek()).right, RESULT);
0970: }
0971: return CUP$ParserCup$result;
0972:
0973: /*. . . . . . . . . . . . . . . . . . . .*/
0974: case 29: // atts ::= mult_attr atts
0975: {
0976: HTMLAttributeList RESULT = null;
0977: int attrleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0978: .elementAt(CUP$ParserCup$top - 1)).left;
0979: int attrright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0980: .elementAt(CUP$ParserCup$top - 1)).right;
0981: HTMLAttributeList attr = (HTMLAttributeList) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0982: .elementAt(CUP$ParserCup$top - 1)).value;
0983: int attrListleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0984: .peek()).left;
0985: int attrListright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0986: .peek()).right;
0987: HTMLAttributeList attrList = (HTMLAttributeList) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0988: .peek()).value;
0989: attr.setNext(attrList);
0990: RESULT = attr;
0991:
0992: CUP$ParserCup$result = new java_cup.runtime.Symbol(
0993: 10/*atts*/,
0994: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0995: .elementAt(CUP$ParserCup$top - 1)).left,
0996: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
0997: .peek()).right, RESULT);
0998: }
0999: return CUP$ParserCup$result;
1000:
1001: /*. . . . . . . . . . . . . . . . . . . .*/
1002: case 28: // atts ::= single_attr
1003: {
1004: HTMLAttributeList RESULT = null;
1005: int attrleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1006: .peek()).left;
1007: int attrright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1008: .peek()).right;
1009: HTMLAttributeList attr = (HTMLAttributeList) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1010: .peek()).value;
1011: RESULT = attr;
1012: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1013: 10/*atts*/,
1014: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1015: .peek()).left,
1016: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1017: .peek()).right, RESULT);
1018: }
1019: return CUP$ParserCup$result;
1020:
1021: /*. . . . . . . . . . . . . . . . . . . .*/
1022: case 27: // comment ::= TAG_OPEN_EXM COMM COMM_CONTENT TAG_COMM_CLOSE
1023: {
1024: Object RESULT = null;
1025: int initTagleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1026: .elementAt(CUP$ParserCup$top - 3)).left;
1027: int initTagright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1028: .elementAt(CUP$ParserCup$top - 3)).right;
1029: String initTag = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1030: .elementAt(CUP$ParserCup$top - 3)).value;
1031: int commleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1032: .elementAt(CUP$ParserCup$top - 2)).left;
1033: int commright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1034: .elementAt(CUP$ParserCup$top - 2)).right;
1035: String comm = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1036: .elementAt(CUP$ParserCup$top - 2)).value;
1037: int commTextleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1038: .elementAt(CUP$ParserCup$top - 1)).left;
1039: int commTextright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1040: .elementAt(CUP$ParserCup$top - 1)).right;
1041: String commText = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1042: .elementAt(CUP$ParserCup$top - 1)).value;
1043: int closeTokenleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1044: .peek()).left;
1045: int closeTokenright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1046: .peek()).right;
1047: String closeToken = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1048: .peek()).value;
1049: ph.iHaveNewComment(new HTMLComment(commText, initTagleft,
1050: initTagright));
1051:
1052: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1053: 6/*comment*/,
1054: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1055: .elementAt(CUP$ParserCup$top - 3)).left,
1056: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1057: .peek()).right, RESULT);
1058: }
1059: return CUP$ParserCup$result;
1060:
1061: /*. . . . . . . . . . . . . . . . . . . .*/
1062: case 26: // markup_content ::=
1063: {
1064: Pair<String, String> RESULT = null;
1065: RESULT = new Pair<String, String>(null, null);
1066: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1067: 8/*markup_content*/,
1068: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1069: .peek()).right,
1070: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1071: .peek()).right, RESULT);
1072: }
1073: return CUP$ParserCup$result;
1074:
1075: /*. . . . . . . . . . . . . . . . . . . .*/
1076: case 25: // markup_content ::= MUDECL
1077: {
1078: Pair<String, String> RESULT = null;
1079: int mkDeclleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1080: .peek()).left;
1081: int mkDeclright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1082: .peek()).right;
1083: String mkDecl = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1084: .peek()).value;
1085: RESULT = new Pair<String, String>(mkDecl, null);
1086: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1087: 8/*markup_content*/,
1088: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1089: .peek()).left,
1090: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1091: .peek()).right, RESULT);
1092: }
1093: return CUP$ParserCup$result;
1094:
1095: /*. . . . . . . . . . . . . . . . . . . .*/
1096: case 24: // markup_content ::= MUDECL MUDECL_CONTENT
1097: {
1098: Pair<String, String> RESULT = null;
1099: int mkDeclleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1100: .elementAt(CUP$ParserCup$top - 1)).left;
1101: int mkDeclright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1102: .elementAt(CUP$ParserCup$top - 1)).right;
1103: String mkDecl = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1104: .elementAt(CUP$ParserCup$top - 1)).value;
1105: int mkContleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1106: .peek()).left;
1107: int mkContright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1108: .peek()).right;
1109: String mkCont = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1110: .peek()).value;
1111: RESULT = new Pair<String, String>(mkDecl, mkCont);
1112: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1113: 8/*markup_content*/,
1114: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1115: .elementAt(CUP$ParserCup$top - 1)).left,
1116: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1117: .peek()).right, RESULT);
1118: }
1119: return CUP$ParserCup$result;
1120:
1121: /*. . . . . . . . . . . . . . . . . . . .*/
1122: case 23: // markup ::= TAG_OPEN_EXM markup_content TAG_CLOSE
1123: {
1124: Object RESULT = null;
1125: int initTokenleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1126: .elementAt(CUP$ParserCup$top - 2)).left;
1127: int initTokenright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1128: .elementAt(CUP$ParserCup$top - 2)).right;
1129: String initToken = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1130: .elementAt(CUP$ParserCup$top - 2)).value;
1131: int mkContentleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1132: .elementAt(CUP$ParserCup$top - 1)).left;
1133: int mkContentright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1134: .elementAt(CUP$ParserCup$top - 1)).right;
1135: Pair<String, String> mkContent = (Pair<String, String>) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1136: .elementAt(CUP$ParserCup$top - 1)).value;
1137: int closeTokenleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1138: .peek()).left;
1139: int closeTokenright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1140: .peek()).right;
1141: Character closeToken = (Character) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1142: .peek()).value;
1143: ph.iHaveNewMarkup(new HTMLMarkup(mkContent.getFirst(),
1144: mkContent.getSecond(), initTokenleft));
1145:
1146: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1147: 7/*markup*/,
1148: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1149: .elementAt(CUP$ParserCup$top - 2)).left,
1150: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1151: .peek()).right, RESULT);
1152: }
1153: return CUP$ParserCup$result;
1154:
1155: /*. . . . . . . . . . . . . . . . . . . .*/
1156: case 22: // eelem ::= error TAG_CLOSE
1157: {
1158: Object RESULT = null;
1159:
1160: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1161: 5/*eelem*/,
1162: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1163: .elementAt(CUP$ParserCup$top - 1)).left,
1164: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1165: .peek()).right, RESULT);
1166: }
1167: return CUP$ParserCup$result;
1168:
1169: /*. . . . . . . . . . . . . . . . . . . .*/
1170: case 21: // eelem ::= END_TAG_NAME optional_lexicalerrors TAG_CLOSE
1171: {
1172: Object RESULT = null;
1173: int initTokenleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1174: .elementAt(CUP$ParserCup$top - 2)).left;
1175: int initTokenright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1176: .elementAt(CUP$ParserCup$top - 2)).right;
1177: String initToken = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1178: .elementAt(CUP$ParserCup$top - 2)).value;
1179: int error1left = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1180: .elementAt(CUP$ParserCup$top - 1)).left;
1181: int error1right = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1182: .elementAt(CUP$ParserCup$top - 1)).right;
1183: List<String> error1 = (List<String>) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1184: .elementAt(CUP$ParserCup$top - 1)).value;
1185: int closeTokenleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1186: .peek()).left;
1187: int closeTokenright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1188: .peek()).right;
1189: Character closeToken = (Character) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1190: .peek()).value;
1191:
1192: if (error1 != null) {
1193: ph.iHaveNewError(HTMLErrorType.ERR_EXPECTED, "\'>\'",
1194: null, null);
1195: }
1196: ph
1197: .iHaveNewEndTag(new HTMLTag(HTMLTagType.END,
1198: initToken, null, initTokenleft,
1199: closeTokenleft, initTokenleft));
1200:
1201: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1202: 5/*eelem*/,
1203: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1204: .elementAt(CUP$ParserCup$top - 2)).left,
1205: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1206: .peek()).right, RESULT);
1207: }
1208: return CUP$ParserCup$result;
1209:
1210: /*. . . . . . . . . . . . . . . . . . . .*/
1211: case 20: // tag_name ::= TAG_NAME optional_lexicalerrors
1212: {
1213: String RESULT = null;
1214: int startElemTokenleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1215: .elementAt(CUP$ParserCup$top - 1)).left;
1216: int startElemTokenright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1217: .elementAt(CUP$ParserCup$top - 1)).right;
1218: String startElemToken = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1219: .elementAt(CUP$ParserCup$top - 1)).value;
1220: int error1left = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1221: .peek()).left;
1222: int error1right = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1223: .peek()).right;
1224: List<String> error1 = (List<String>) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1225: .peek()).value;
1226:
1227: if (error1 != null) {
1228: for (String s : error1) {
1229: ph.iHaveNewError(
1230: HTMLErrorType.ERR_INVALID_TAG_CHAR, s,
1231: startElemToken, null);
1232: }
1233: }
1234: RESULT = startElemToken;
1235:
1236: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1237: 23/*tag_name*/,
1238: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1239: .elementAt(CUP$ParserCup$top - 1)).left,
1240: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1241: .peek()).right, RESULT);
1242: }
1243: return CUP$ParserCup$result;
1244:
1245: /*. . . . . . . . . . . . . . . . . . . .*/
1246: case 19: // tag_info ::= tag_name atts
1247: {
1248: Pair<String, HTMLAttributeList> RESULT = null;
1249: int startElemTokenleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1250: .elementAt(CUP$ParserCup$top - 1)).left;
1251: int startElemTokenright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1252: .elementAt(CUP$ParserCup$top - 1)).right;
1253: String startElemToken = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1254: .elementAt(CUP$ParserCup$top - 1)).value;
1255: int attributesleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1256: .peek()).left;
1257: int attributesright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1258: .peek()).right;
1259: HTMLAttributeList attributes = (HTMLAttributeList) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1260: .peek()).value;
1261:
1262: if (attributes.getError() != null) {
1263: for (String s : attributes.getError()) {
1264: ph.iHaveNewError(
1265: HTMLErrorType.ERR_INVALID_TAG_CHAR, s,
1266: startElemToken, null);
1267: }
1268: /*if(attributes.getAttributeValue()!=null)
1269: ph.iHaveNewError(HTMLErrorType.ERR_ATTVALERR,null,null,null);*/
1270: }
1271:
1272: RESULT = new Pair<String, HTMLAttributeList>(
1273: startElemToken, attributes);
1274:
1275: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1276: 9/*tag_info*/,
1277: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1278: .elementAt(CUP$ParserCup$top - 1)).left,
1279: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1280: .peek()).right, RESULT);
1281: }
1282: return CUP$ParserCup$result;
1283:
1284: /*. . . . . . . . . . . . . . . . . . . .*/
1285: case 18: // tag_info ::= tag_name
1286: {
1287: Pair<String, HTMLAttributeList> RESULT = null;
1288: int startElemTokenleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1289: .peek()).left;
1290: int startElemTokenright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1291: .peek()).right;
1292: String startElemToken = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1293: .peek()).value;
1294: RESULT = new Pair<String, HTMLAttributeList>(
1295: startElemToken, null);
1296: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1297: 9/*tag_info*/,
1298: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1299: .peek()).left,
1300: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1301: .peek()).right, RESULT);
1302: }
1303: return CUP$ParserCup$result;
1304:
1305: /*. . . . . . . . . . . . . . . . . . . .*/
1306: case 17: // simple_tag ::= tag_info TAG_SLASH_CLOSE
1307: {
1308: Object RESULT = null;
1309: int tagInfoleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1310: .elementAt(CUP$ParserCup$top - 1)).left;
1311: int tagInforight = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1312: .elementAt(CUP$ParserCup$top - 1)).right;
1313: Pair<String, HTMLAttributeList> tagInfo = (Pair<String, HTMLAttributeList>) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1314: .elementAt(CUP$ParserCup$top - 1)).value;
1315: int closeTokenleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1316: .peek()).left;
1317: int closeTokenright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1318: .peek()).right;
1319: String closeToken = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1320: .peek()).value;
1321: ph.iHaveNewStartTag(new HTMLTag(HTMLTagType.SIMPLE, tagInfo
1322: .getFirst(), tagInfo.getSecond(), tagInfoleft,
1323: closeTokenleft, tagInforight));
1324: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1325: 4/*simple_tag*/,
1326: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1327: .elementAt(CUP$ParserCup$top - 1)).left,
1328: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1329: .peek()).right, RESULT);
1330: }
1331: return CUP$ParserCup$result;
1332:
1333: /*. . . . . . . . . . . . . . . . . . . .*/
1334: case 16: // tag_open ::= TAG_OPEN optional_lexicalerrors
1335: {
1336: Character RESULT = null;
1337: int initTokenleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1338: .elementAt(CUP$ParserCup$top - 1)).left;
1339: int initTokenright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1340: .elementAt(CUP$ParserCup$top - 1)).right;
1341: Character initToken = (Character) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1342: .elementAt(CUP$ParserCup$top - 1)).value;
1343: int error1left = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1344: .peek()).left;
1345: int error1right = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1346: .peek()).right;
1347: List<String> error1 = (List<String>) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1348: .peek()).value;
1349:
1350: if (error1 != null) {
1351: for (String s : error1) {
1352: ph.iHaveNewError(
1353: HTMLErrorType.ERR_EXPECTED_TAGNAME, null,
1354: null, null);
1355: }
1356: }
1357:
1358: RESULT = initToken;
1359:
1360: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1361: 24/*tag_open*/,
1362: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1363: .elementAt(CUP$ParserCup$top - 1)).left,
1364: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1365: .peek()).right, RESULT);
1366: }
1367: return CUP$ParserCup$result;
1368:
1369: /*. . . . . . . . . . . . . . . . . . . .*/
1370: case 15: // start_tag ::= tag_info TAG_CLOSE
1371: {
1372: Object RESULT = null;
1373: int tagInfoleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1374: .elementAt(CUP$ParserCup$top - 1)).left;
1375: int tagInforight = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1376: .elementAt(CUP$ParserCup$top - 1)).right;
1377: Pair<String, HTMLAttributeList> tagInfo = (Pair<String, HTMLAttributeList>) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1378: .elementAt(CUP$ParserCup$top - 1)).value;
1379: int closeTokenleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1380: .peek()).left;
1381: int closeTokenright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1382: .peek()).right;
1383: Character closeToken = (Character) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1384: .peek()).value;
1385:
1386: lastStartTagCreatedOk = true; // So that the lexer can ask if this was true. Curently, it will always be so, we should write
1387: lastStartTagCreatedOk = true; // So that the lexer can ask if this was true. Curently, it will always be so, we should write
1388: ph.iHaveNewStartTag(new HTMLTag(HTMLTagType.START, tagInfo
1389: .getFirst(), tagInfo.getSecond(), tagInfoleft,
1390: closeTokenleft, tagInforight));
1391:
1392: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1393: 3/*start_tag*/,
1394: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1395: .elementAt(CUP$ParserCup$top - 1)).left,
1396: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1397: .peek()).right, RESULT);
1398: }
1399: return CUP$ParserCup$result;
1400:
1401: /*. . . . . . . . . . . . . . . . . . . .*/
1402: case 14: // selem ::= bad_tag_open
1403: {
1404: Object RESULT = null;
1405:
1406: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1407: 2/*selem*/,
1408: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1409: .peek()).left,
1410: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1411: .peek()).right, RESULT);
1412: }
1413: return CUP$ParserCup$result;
1414:
1415: /*. . . . . . . . . . . . . . . . . . . .*/
1416: case 13: // selem ::= simple_tag
1417: {
1418: Object RESULT = null;
1419:
1420: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1421: 2/*selem*/,
1422: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1423: .peek()).left,
1424: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1425: .peek()).right, RESULT);
1426: }
1427: return CUP$ParserCup$result;
1428:
1429: /*. . . . . . . . . . . . . . . . . . . .*/
1430: case 12: // selem ::= start_tag
1431: {
1432: Object RESULT = null;
1433:
1434: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1435: 2/*selem*/,
1436: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1437: .peek()).left,
1438: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1439: .peek()).right, RESULT);
1440: }
1441: return CUP$ParserCup$result;
1442:
1443: /*. . . . . . . . . . . . . . . . . . . .*/
1444: case 11: // data ::= EOFTK
1445: {
1446: Object RESULT = null;
1447: int eofTokenleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1448: .peek()).left;
1449: int eofTokenright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1450: .peek()).right;
1451: String eofToken = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1452: .peek()).value;
1453:
1454: /* finalize the parsing "by hand" */
1455: try {
1456: parser.done_parsing();
1457: } catch (Throwable e) {
1458: ph.iHaveNewError(HTMLErrorType.ERR_THROWABLE, eofToken,
1459: null, null);
1460: }
1461:
1462: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1463: 1/*data*/,
1464: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1465: .peek()).left,
1466: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1467: .peek()).right, RESULT);
1468: }
1469: return CUP$ParserCup$result;
1470:
1471: /*. . . . . . . . . . . . . . . . . . . .*/
1472: case 10: // data ::= LEXERR_EXPECTED_TAG_NAME
1473: {
1474: Object RESULT = null;
1475: int error1left = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1476: .peek()).left;
1477: int error1right = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1478: .peek()).right;
1479: String error1 = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1480: .peek()).value;
1481:
1482: ph.iHaveNewError(HTMLErrorType.ERR_EXPECTED_TAGNAME, null,
1483: null, null);
1484:
1485: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1486: 1/*data*/,
1487: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1488: .peek()).left,
1489: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1490: .peek()).right, RESULT);
1491: }
1492: return CUP$ParserCup$result;
1493:
1494: /*. . . . . . . . . . . . . . . . . . . .*/
1495: case 9: // data ::= SYNC
1496: {
1497: Object RESULT = null;
1498:
1499: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1500: 1/*data*/,
1501: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1502: .peek()).left,
1503: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1504: .peek()).right, RESULT);
1505: }
1506: return CUP$ParserCup$result;
1507:
1508: /*. . . . . . . . . . . . . . . . . . . .*/
1509: case 8: // data ::= EOF_LITERAL
1510: {
1511: Object RESULT = null;
1512: int textoleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1513: .peek()).left;
1514: int textoright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1515: .peek()).right;
1516: String texto = (String) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1517: .peek()).value;
1518: ph.iHaveNewError(HTMLErrorType.ERR_EOF_LITERAL, texto,
1519: null, null);
1520: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1521: 1/*data*/,
1522: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1523: .peek()).left,
1524: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1525: .peek()).right, RESULT);
1526: }
1527: return CUP$ParserCup$result;
1528:
1529: /*. . . . . . . . . . . . . . . . . . . .*/
1530: case 7: // data ::= comment
1531: {
1532: Object RESULT = null;
1533:
1534: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1535: 1/*data*/,
1536: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1537: .peek()).left,
1538: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1539: .peek()).right, RESULT);
1540: }
1541: return CUP$ParserCup$result;
1542:
1543: /*. . . . . . . . . . . . . . . . . . . .*/
1544: case 6: // data ::= markup
1545: {
1546: Object RESULT = null;
1547:
1548: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1549: 1/*data*/,
1550: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1551: .peek()).left,
1552: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1553: .peek()).right, RESULT);
1554: }
1555: return CUP$ParserCup$result;
1556:
1557: /*. . . . . . . . . . . . . . . . . . . .*/
1558: case 5: // data ::= TEXT
1559: {
1560: Object RESULT = null;
1561: int textTokenleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1562: .peek()).left;
1563: int textTokenright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1564: .peek()).right;
1565: HTMLText textToken = (HTMLText) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1566: .peek()).value;
1567: ph.iHaveNewText(textToken);
1568: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1569: 1/*data*/,
1570: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1571: .peek()).left,
1572: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1573: .peek()).right, RESULT);
1574: }
1575: return CUP$ParserCup$result;
1576:
1577: /*. . . . . . . . . . . . . . . . . . . .*/
1578: case 4: // data ::= eelem
1579: {
1580: Object RESULT = null;
1581:
1582: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1583: 1/*data*/,
1584: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1585: .peek()).left,
1586: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1587: .peek()).right, RESULT);
1588: }
1589: return CUP$ParserCup$result;
1590:
1591: /*. . . . . . . . . . . . . . . . . . . .*/
1592: case 3: // data ::= selem
1593: {
1594: Object RESULT = null;
1595:
1596: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1597: 1/*data*/,
1598: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1599: .peek()).left,
1600: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1601: .peek()).right, RESULT);
1602: }
1603: return CUP$ParserCup$result;
1604:
1605: /*. . . . . . . . . . . . . . . . . . . .*/
1606: case 2: // doc ::= data
1607: {
1608: Object RESULT = null;
1609:
1610: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1611: 0/*doc*/,
1612: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1613: .peek()).left,
1614: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1615: .peek()).right, RESULT);
1616: }
1617: return CUP$ParserCup$result;
1618:
1619: /*. . . . . . . . . . . . . . . . . . . .*/
1620: case 1: // doc ::= doc data
1621: {
1622: Object RESULT = null;
1623:
1624: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1625: 0/*doc*/,
1626: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1627: .elementAt(CUP$ParserCup$top - 1)).left,
1628: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1629: .peek()).right, RESULT);
1630: }
1631: return CUP$ParserCup$result;
1632:
1633: /*. . . . . . . . . . . . . . . . . . . .*/
1634: case 0: // $START ::= doc EOF
1635: {
1636: Object RESULT = null;
1637: int start_valleft = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1638: .elementAt(CUP$ParserCup$top - 1)).left;
1639: int start_valright = ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1640: .elementAt(CUP$ParserCup$top - 1)).right;
1641: Object start_val = (Object) ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1642: .elementAt(CUP$ParserCup$top - 1)).value;
1643: RESULT = start_val;
1644: CUP$ParserCup$result = new java_cup.runtime.Symbol(
1645: 0/*$START*/,
1646: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1647: .elementAt(CUP$ParserCup$top - 1)).left,
1648: ((java_cup.runtime.Symbol) CUP$ParserCup$stack
1649: .peek()).right, RESULT);
1650: }
1651: /* ACCEPT */
1652: CUP$ParserCup$parser.done_parsing();
1653: return CUP$ParserCup$result;
1654:
1655: /* . . . . . .*/
1656: default:
1657: throw new Exception(Messages.getString("swing.04")); //$NON-NLS-1$
1658:
1659: }
1660: }
1661: }
|