View Javadoc

1   /* The following code was generated by JFlex 1.3.2 on 5/3/02 10:58 PM */
2   
3   
4   package hotsax.html.sax;
5   
6   import java.io.*;
7   import java.util.StringTokenizer;
8   
9   
10  /***
11   * This class is a scanner generated by 
12   * <a href="http://www.jflex.de/">JFlex</a> 1.3.2
13   * on 5/3/02 10:58 PM from the specification file
14   * <tt>file:/home/edh/sourceforge/tmp/hotsax/HotSAX-0.1.2c/./build/src/hotsax/html/sax/HtmlLexer.flex</tt>
15   */
16  class HtmlLexer implements SemanticLexer {
17  
18    /*** This character denotes the end of file */
19    final public static int YYEOF = -1;
20  
21    /*** initial size of the lookahead buffer */
22    final private static int YY_BUFFERSIZE = 16384;
23  
24    /*** lexical states */
25    final public static int ATTRVAL = 2;
26    final public static int STRING = 9;
27    final public static int IGNORE_CDATA = 6;
28    final public static int APOSSTRING = 8;
29    final public static int PI_COLLECT = 4;
30    final public static int YYINITIAL = 0;
31    final public static int INNER = 1;
32    final public static int IGNORE_COMMENT = 5;
33    final public static int ERROR_RECOVER = 10;
34    final public static int IGNORE_DOCTYPE = 7;
35    final public static int IGNORE_PI = 3;
36  
37    /*** 
38     * Translates characters to character classes
39     */
40    final private static char [] yycmap = {
41       0,  0,  0,  0,  0,  0,  0,  0,  3, 22, 22,  0,  0, 22,  0,  0, 
42       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
43      22,  8, 20,  0,  0,  0,  0, 21,  0,  0,  0,  0,  0,  5,  0,  7, 
44       2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  0,  0,  6,  4, 19, 18, 
45       0, 17,  1, 11,  9, 15,  1,  1,  1,  1,  1,  1,  1,  1,  1, 10, 
46      14,  1,  1,  1, 12,  1,  1,  1,  1, 13,  1, 16,  0, 23,  0,  2, 
47       0, 17,  1, 11,  9, 15,  1,  1,  1,  1,  1,  1,  1,  1,  1, 10, 
48      14,  1,  1,  1, 12,  1,  1,  1,  1, 13,  1,  0,  0,  0,  0,  0, 
49       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
50       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
51       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
52       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
53       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
54       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
55       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
56       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
57    };
58  
59    /*** 
60     * Translates a state to a row index in the transition table
61     */
62    final private static int yy_rowMap [] = { 
63          0,    24,    48,    72,    96,   120,   144,   168,   192,   216, 
64        240,   264,   288,   312,   336,   360,   384,   360,   408,   360, 
65        360,   432,   456,   480,   504,   528,   552,   576,   600,   624, 
66        360,   648,   360,   672,   696,   360,   360,   720,   360,   360, 
67        360,   744,   768,   792,   816,   840,   360,   360,   360,   864, 
68        888,   912,   936,   960,   984,  1008,  1032,  1056,  1080,   360, 
69        360
70    };
71  
72    /*** 
73     * The packed transition table of the DFA (part 0)
74     */
75    final private static String yy_packed0 = 
76      "\6\14\1\15\21\14\1\0\1\16\1\0\1\17\1\20"+
77      "\2\0\1\21\1\0\7\16\1\0\1\16\1\0\1\22"+
78      "\2\0\1\17\1\0\23\23\1\22\1\24\1\25\1\26"+
79      "\1\23\1\0\1\27\7\0\7\27\1\0\1\27\6\0"+
80      "\22\30\1\31\5\30\5\32\1\33\22\32\27\34\1\35"+
81      "\23\36\1\37\4\36\25\40\1\41\2\40\24\42\1\41"+
82      "\3\42\23\43\1\44\4\43\6\14\1\0\21\14\7\0"+
83      "\1\45\1\46\11\0\1\47\6\0\2\16\2\0\1\16"+
84      "\3\0\7\16\1\0\1\16\11\0\1\17\22\0\1\17"+
85      "\54\0\1\50\4\0\23\23\4\0\1\23\26\0\1\26"+
86      "\2\0\2\27\2\0\1\27\3\0\7\27\1\0\1\27"+
87      "\6\0\22\30\1\0\5\30\23\0\1\51\4\0\5\32"+
88      "\1\0\22\32\5\0\1\52\22\0\27\34\30\0\1\53"+
89      "\23\36\1\0\4\36\25\40\1\0\2\40\24\42\1\0"+
90      "\3\42\23\43\1\0\4\43\5\0\1\54\3\0\1\55"+
91      "\6\0\1\56\32\0\1\57\27\0\1\60\11\0\1\61"+
92      "\34\0\1\62\30\0\1\63\27\0\1\64\25\0\1\65"+
93      "\32\0\1\66\34\0\1\67\23\0\1\70\26\0\1\71"+
94      "\31\0\1\72\32\0\1\73\25\0\1\74\30\0\1\75"+
95      "\7\0";
96  
97    /*** 
98     * The transition table of the DFA
99     */
100   final private static int yytrans [] = yy_unpack();
101 
102 
103   /* error codes */
104   final private static int YY_UNKNOWN_ERROR = 0;
105   final private static int YY_ILLEGAL_STATE = 1;
106   final private static int YY_NO_MATCH = 2;
107   final private static int YY_PUSHBACK_2BIG = 3;
108 
109   /* error messages for the codes above */
110   final private static String YY_ERROR_MSG[] = {
111     "Unkown internal scanner error",
112     "Internal error: unknown state",
113     "Error: could not match input",
114     "Error: pushback value was too large"
115   };
116 
117   /***
118    * YY_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
119    */
120   private final static byte YY_ATTRIBUTE[] = {
121      1,  1,  1,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  9, 
122      0,  9,  1,  9,  9,  1,  1,  1,  0,  1,  1,  1,  1,  1,  9,  1, 
123      9,  1,  1,  9,  9,  0,  9,  9,  9,  0,  0,  0,  0,  0,  9,  9, 
124      9,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  9,  9
125   };
126 
127   /*** the input device */
128   private java.io.Reader yy_reader;
129 
130   /*** the current state of the DFA */
131   private int yy_state;
132 
133   /*** the current lexical state */
134   private int yy_lexical_state = YYINITIAL;
135 
136   /*** this buffer contains the current text to be matched and is
137       the source of the yytext() string */
138   private char yy_buffer[] = new char[YY_BUFFERSIZE];
139 
140   /*** the textposition at the last accepting state */
141   private int yy_markedPos;
142 
143   /*** the textposition at the last state to be included in yytext */
144   private int yy_pushbackPos;
145 
146   /*** the current text position in the buffer */
147   private int yy_currentPos;
148 
149   /*** startRead marks the beginning of the yytext() string in the buffer */
150   private int yy_startRead;
151 
152   /*** endRead marks the last character in the buffer, that has been read
153       from input */
154   private int yy_endRead;
155 
156   /*** number of newlines encountered up to the start of the matched text */
157   private int yyline;
158 
159   /*** the number of characters up to the start of the matched text */
160   private int yychar;
161 
162   /***
163    * the number of characters from the last newline up to the start of the 
164    * matched text
165    */
166   private int yycolumn; 
167 
168   /*** 
169    * yy_atBOL == true <=> the scanner is currently at the beginning of a line
170    */
171   private boolean yy_atBOL = true;
172 
173   /*** yy_atEOF == true <=> the scanner is at the EOF */
174   private boolean yy_atEOF;
175 
176   /*** denotes if the user-EOF-code has already been executed */
177   private boolean yy_eof_done;
178 
179   /* user code: */
180 	private HtmlParser yyparser;
181 	private StringBuffer string = new StringBuffer();
182 	private StringBuffer text = new StringBuffer();
183 	private StringBuffer attr = new StringBuffer();
184 	private StringBuffer comment = new StringBuffer();
185 	private StringBuffer pi = new StringBuffer();
186 	private StringBuffer cdata = new StringBuffer();
187 	private StringBuffer script = new StringBuffer();
188 	private StringBuffer doctype = new StringBuffer();
189 
190 	protected boolean debug = false;
191 	public void setDebug(boolean debug) { this.debug = debug; }
192 	public boolean getDebug() { return debug; }
193 
194 	public void p(String s) { System.out.println(s); }
195 	
196 	public boolean getEOF() { return yy_atEOF; }
197 
198 	public HtmlLexer(Reader r, HtmlParser p)
199 	{
200 		this(r);
201 		yyparser = p;
202 	}
203 
204 	Lval lexer_yylval;
205 	Lval empty_yylval = new Lval("");
206 	private boolean first = false;
207 	private boolean last = false;
208 
209 	public void yylexerror_reset() {
210 		System.err.println("char at : " + yycharat(yy_markedPos));
211 		yypushback(yylength() - 1);  // attempt at resetting this
212 	}
213 
214 	/*** 
215 	 *   mask the actual implementation of yylex to return the first SOF
216 	 *   and the final EOF. Marking the startDocument, EndDocuemnt events
217 	 *   Also catches supposedly unrecoverable Error. Forces new ERROR_RECOVER state.
218      *   #return the token from yylex() - one of HtmlParser.XXXXX
219 	 */
220 	public int _yylex() 
221 		throws IOException
222 	{
223 		int token;
224 
225 		lexer_yylval = empty_yylval; 
226 		try {
227 			token = yylex();
228 		}
229 		catch (Error err) {
230 			if (getDebug()) System.err.println("Caught error " + err.getMessage());
231 			yybegin(ERROR_RECOVER);
232 			if (yyparser != null)
233 				yyparser.yylval = empty_yylval;
234 			
235 			token = yylex(); // read ahead in ERROR_REOVER
236 		}		
237 		return token;
238 	}
239 	
240 
241 	// set the LH side of the parser
242 	void setLval(String text)
243 	{
244 		lexer_yylval = new Lval(text);
245 			
246 		if (yyparser != null)
247 			yyparser.yylval = lexer_yylval;
248 	}
249 
250 	void setLval(Attribute a)
251 	{
252 		lexer_yylval = new Lval(a);
253 
254 		if (yyparser != null)
255 			yyparser.yylval = lexer_yylval;
256 	}
257 
258 	/*** Return the yy_reader for this class. Can be used to provide alternate scanner 
259 	  @return the Reader for this class */
260 	public Reader getReader() { return yy_reader; }
261 	public void setReader(Reader r) { yy_reader = r; }
262 
263 	/***
264   	 * Sets this lexer to the same yybuffer, and character positions as the other lexer
265      */
266 	public void setBuffer(SemanticLexer lexer) {
267 		if (this.yy_buffer.length != lexer.getyyBuffer().length) {
268       		char newBuffer[] = new char[lexer.getyyBuffer().length];
269 			this.yy_buffer = newBuffer;
270 		}
271       	System.arraycopy(lexer.getyyBuffer(), 0, yy_buffer, 0, yy_buffer.length);
272 		this.yy_currentPos = lexer.getyyCurrentPos();
273 		this.yy_markedPos = lexer.getyyMarkedPos();
274 		this.yy_pushbackPos = lexer.getyyPushbackPos();
275 		this.yy_endRead = lexer.getyyEndRead();
276 		this.yy_startRead = lexer.getyyStartRead();
277 	}
278 
279 	public char[] getyyBuffer() { return yy_buffer; }
280 	public int getyyCurrentPos() { return yy_currentPos; } 
281 	public int getyyMarkedPos() { return yy_markedPos; }
282 	public int getyyPushbackPos() { return yy_pushbackPos; }
283 	public int getyyEndRead() { return yy_endRead; }
284 	public int getyyStartRead() { return yy_startRead; }
285 
286 	public void printBuffer() {
287 		for (int i = 0; i < yy_endRead; i++) {
288 			System.out.print(yy_buffer[i]);
289 		}
290 	}
291 
292 
293   /***
294    * Runs the scanner on input files.
295    *
296    * This main method is the debugging routine for the scanner.
297    * It prints each returned token to System.out until the end of
298    * file is reached, or an error occured.
299    *
300    * @param argv   the command line, contains the filenames to run
301    *               the scanner on.
302    */
303   public static void main(String argv[]) {
304     for (int i = 0; i < argv.length; i++) {
305       HtmlLexer scanner = null;
306       try {
307         scanner = new HtmlLexer( new java.io.FileReader(argv[i]) );
308       }
309       catch (java.io.FileNotFoundException e) {
310         System.out.println("File not found : \""+argv[i]+"\"");
311         System.exit(1);
312       }
313       catch (java.io.IOException e) {
314         System.out.println("Error opening file \""+argv[i]+"\"");
315         System.exit(1);
316       }
317       catch (ArrayIndexOutOfBoundsException e) {
318         System.out.println("Usage : java HtmlLexer <inputfile>");
319         System.exit(1);
320       }
321 
322 	  scanner.setDebug(true);
323       try {
324         do {
325           System.out.println(scanner._yylex() + " : " + scanner.yytext() +  " lval:" + scanner.lexer_yylval);
326         } while (!scanner.yy_atEOF);
327 
328       }
329       catch (java.io.IOException e) {
330         System.out.println("An I/O error occured while scanning :");
331         System.out.println(e);
332         System.exit(1);
333       }
334       catch (Exception e) {
335         e.printStackTrace();
336         System.exit(1);
337       }
338     }
339   }
340 
341 
342   /***
343    * Creates a new scanner
344    * There is also a java.io.InputStream version of this constructor.
345    *
346    * @param   in  the java.io.Reader to read input from.
347    */
348   HtmlLexer(java.io.Reader in) {
349     this.yy_reader = in;
350   }
351 
352   /***
353    * Creates a new scanner.
354    * There is also java.io.Reader version of this constructor.
355    *
356    * @param   in  the java.io.Inputstream to read input from.
357    */
358   HtmlLexer(java.io.InputStream in) {
359     this(new java.io.InputStreamReader(in));
360   }
361 
362   /*** 
363    * Unpacks the split, compressed DFA transition table.
364    *
365    * @return the unpacked transition table
366    */
367   private static int [] yy_unpack() {
368     int [] trans = new int[1104];
369     int offset = 0;
370     offset = yy_unpack(yy_packed0, offset, trans);
371     return trans;
372   }
373 
374   /*** 
375    * Unpacks the compressed DFA transition table.
376    *
377    * @param packed   the packed transition table
378    * @return         the index of the last entry
379    */
380   private static int yy_unpack(String packed, int offset, int [] trans) {
381     int i = 0;       /* index in packed string  */
382     int j = offset;  /* index in unpacked array */
383     int l = packed.length();
384     while (i < l) {
385       int count = packed.charAt(i++);
386       int value = packed.charAt(i++);
387       value--;
388       do trans[j++] = value; while (--count > 0);
389     }
390     return j;
391   }
392 
393 
394   /***
395    * Gets the next input character.
396    *
397    * @return      the next character of the input stream, EOF if the
398    *              end of the stream is reached.
399    * @exception   IOException  if any I/O-Error occurs
400    */
401   private int yy_advance() throws java.io.IOException {
402 
403     /* standard case */
404     if (yy_currentPos < yy_endRead) return yy_buffer[yy_currentPos++];
405 
406     /* if the eof is reached, we don't need to work hard */ 
407     if (yy_atEOF) return YYEOF;
408 
409     /* otherwise: need to refill the buffer */
410 
411     /* first: make room (if you can) */
412     if (yy_startRead > 0) {
413       System.arraycopy(yy_buffer, yy_startRead, 
414                        yy_buffer, 0, 
415                        yy_endRead-yy_startRead);
416 
417       /* translate stored positions */
418       yy_endRead-= yy_startRead;
419       yy_currentPos-= yy_startRead;
420       yy_markedPos-= yy_startRead;
421       yy_pushbackPos-= yy_startRead;
422       yy_startRead = 0;
423     }
424 
425     /* is the buffer big enough? */
426     if (yy_currentPos >= yy_buffer.length) {
427       /* if not: blow it up */
428       char newBuffer[] = new char[yy_currentPos*2];
429       System.arraycopy(yy_buffer, 0, newBuffer, 0, yy_buffer.length);
430       yy_buffer = newBuffer;
431     }
432 
433     /* finally: fill the buffer with new input */
434     int numRead = yy_reader.read(yy_buffer, yy_endRead, 
435                                             yy_buffer.length-yy_endRead);
436 
437     if ( numRead == -1 ) return YYEOF;
438 
439     yy_endRead+= numRead;
440 
441     return yy_buffer[yy_currentPos++];
442   }
443 
444 
445   /***
446    * Closes the input stream.
447    */
448   final public void yyclose() throws java.io.IOException {
449     yy_atEOF = true;            /* indicate end of file */
450     yy_endRead = yy_startRead;  /* invalidate buffer    */
451 
452     if (yy_reader != null)
453       yy_reader.close();
454   }
455 
456 
457   /***
458    * Closes the current stream, and resets the
459    * scanner to read from a new input stream.
460    *
461    * All internal variables are reset, the old input stream 
462    * <b>cannot</b> be reused (internal buffer is discarded and lost).
463    * Lexical state is set to <tt>YY_INITIAL</tt>.
464    *
465    * @param reader   the new input stream 
466    */
467   final public void yyreset(java.io.Reader reader) throws java.io.IOException {
468     yyclose();
469     yy_reader = reader;
470     yy_atBOL  = true;
471     yy_atEOF  = false;
472     yy_endRead = yy_startRead = 0;
473     yy_currentPos = yy_markedPos = yy_pushbackPos = 0;
474     yyline = yychar = yycolumn = 0;
475     yy_lexical_state = YYINITIAL;
476   }
477 
478 
479   /***
480    * Returns the current lexical state.
481    */
482   final public int yystate() {
483     return yy_lexical_state;
484   }
485 
486 
487   /***
488    * Enters a new lexical state
489    *
490    * @param newState the new lexical state
491    */
492   final public void yybegin(int newState) {
493     yy_lexical_state = newState;
494   }
495 
496 
497   /***
498    * Returns the text matched by the current regular expression.
499    */
500   final public String yytext() {
501     return new String( yy_buffer, yy_startRead, yy_markedPos-yy_startRead );
502   }
503 
504 
505   /***
506    * Returns the character at position <tt>pos</tt> from the 
507    * matched text. 
508    * 
509    * It is equivalent to yytext().charAt(pos), but faster
510    *
511    * @param pos the position of the character to fetch. 
512    *            A value from 0 to yylength()-1.
513    *
514    * @return the character at position pos
515    */
516   final public char yycharat(int pos) {
517     return yy_buffer[yy_startRead+pos];
518   }
519 
520 
521   /***
522    * Returns the length of the matched text region.
523    */
524   final public int yylength() {
525     return yy_markedPos-yy_startRead;
526   }
527 
528 
529   /***
530    * Reports an error that occured while scanning.
531    *
532    * In a wellformed scanner (no or only correct usage of 
533    * yypushback(int) and a match-all fallback rule) this method 
534    * will only be called with things that "Can't Possibly Happen".
535    * If this method is called, something is seriously wrong
536    * (e.g. a JFlex bug producing a faulty scanner etc.).
537    *
538    * Usual syntax/scanner level error handling should be done
539    * in error fallback rules.
540    *
541    * @param   errorCode  the code of the errormessage to display
542    */
543   private void yy_ScanError(int errorCode) {
544     String message;
545     try {
546       message = YY_ERROR_MSG[errorCode];
547     }
548     catch (ArrayIndexOutOfBoundsException e) {
549       message = YY_ERROR_MSG[YY_UNKNOWN_ERROR];
550     }
551 
552     throw new Error(message);
553   } 
554 
555 
556   /***
557    * Pushes the specified amount of characters back into the input stream.
558    *
559    * They will be read again by then next call of the scanning method
560    *
561    * @param number  the number of characters to be read again.
562    *                This number must not be greater than yylength()!
563    */
564   private void yypushback(int number)  {
565     if ( number > yylength() )
566       yy_ScanError(YY_PUSHBACK_2BIG);
567 
568     yy_markedPos -= number;
569   }
570 
571 
572   /***
573    * Contains user EOF-code, which will be executed exactly once,
574    * when the end of file is reached
575    */
576   private void yy_do_eof() throws java.io.IOException {
577     if (!yy_eof_done) {
578       yy_eof_done = true;
579       yyclose();
580     }
581   }
582 
583 
584   /***
585    * Resumes scanning until the next regular expression is matched,
586    * the end of input is encountered or an I/O-Error occurs.
587    *
588    * @return      the next token
589    * @exception   IOException  if any I/O-Error occurs
590    */
591   @SuppressWarnings("fallthrough")
592 public int yylex() throws java.io.IOException {
593     int yy_input;
594     int yy_action;
595 
596 
597     while (true) {
598 
599       yy_action = -1;
600 
601       yy_currentPos = yy_startRead = yy_markedPos;
602 
603       yy_state = yy_lexical_state;
604 
605 
606       yy_forAction: {
607         while (true) {
608 
609           yy_input = yy_advance();
610 
611           if ( yy_input == YYEOF ) break yy_forAction;
612 
613           int yy_next = yytrans[ yy_rowMap[yy_state] + yycmap[yy_input] ];
614           if (yy_next == -1) break yy_forAction;
615           yy_state = yy_next;
616 
617           int yy_attributes = YY_ATTRIBUTE[yy_state];
618           if ( (yy_attributes & 1) > 0 ) {
619             yy_action = yy_state; 
620             yy_markedPos = yy_currentPos; 
621             if ( (yy_attributes & 8) > 0 ) break yy_forAction;
622           }
623 
624         }
625       }
626 
627 
628       switch (yy_action) {
629 
630         case 47: 
631           { 
632         yybegin(YYINITIAL);
633         return HtmlParser.CDATA_END;
634      }
635         case 62: break;
636         case 46: 
637           { 
638         yybegin(YYINITIAL);
639         return HtmlParser.COMMENT_END;
640      }
641         case 63: break;
642         case 5: 
643         case 6: 
644         case 7: 
645         case 25: 
646         case 27: 
647         case 28: 
648         case 29: 
649           { 
650         setLval(yytext());
651         return HtmlParser.TEXT;
652      }
653         case 64: break;
654         case 13: 
655           { 
656 		setLval(yytext());
657 		return HtmlParser.NAME;
658 	  }
659         case 65: break;
660         case 15: 
661           { 
662 		yybegin(ATTRVAL);
663 		return HtmlParser.EQUAL;
664 	  }
665         case 66: break;
666         case 30: 
667           { 
668         yybegin(YYINITIAL);
669         return HtmlParser.ANGLE_CLOSE;
670      }
671         case 67: break;
672         case 60: 
673           {  
674             yybegin(IGNORE_CDATA);
675             return HtmlParser.CDATA_START;
676 	 }
677         case 68: break;
678         case 48: 
679           {  
680             yybegin(IGNORE_COMMENT);
681             return HtmlParser.COMMENT_START;
682 	 }
683         case 69: break;
684         case 40: 
685           {  
686 		yybegin(YYINITIAL);
687 		return HtmlParser.PI_CLOSE;
688 	 }
689         case 70: break;
690         case 38: 
691           {  
692             yybegin(IGNORE_PI);
693             return HtmlParser.PI_OPEN;
694 	 }
695         case 71: break;
696         case 36: 
697           {   
698             yybegin(INNER);
699             return HtmlParser.ANGLE_END_OPEN;
700 	 }
701         case 72: break;
702         case 4: 
703         case 23: 
704           {  
705 		setLval(yytext());
706 		return HtmlParser.TEXT;
707 	 }
708         case 73: break;
709         case 35: 
710           { 
711 		yybegin(YYINITIAL);
712 		if (getDebug()) System.err.println("ERROR_RECOVER: recovered");
713 		return HtmlParser.ANGLE_CLOSE;
714 	 }
715         case 74: break;
716         case 12: 
717           { 
718             yybegin(INNER);
719             return HtmlParser.ANGLE_OPEN;
720 	 }
721         case 75: break;
722         case 10: 
723         case 34: 
724           { 
725 		/* ignore all this till recover */
726 	 }
727         case 76: break;
728         case 18: 
729           { 
730 		yybegin(INNER);
731 		setLval(yytext());
732 		return HtmlParser.VALUE;
733 	 }
734         case 77: break;
735         case 22: 
736           { 
737 		yybegin(PI_COLLECT);
738 		setLval(yytext());
739 		return HtmlParser.NAME;
740 	 }
741         case 78: break;
742         case 26: 
743           { 						  /* handle any hanging minus signs E.g. i - 2; --a; etc. */
744         setLval(yytext());
745         return HtmlParser.TEXT;   /* this has to be handled correctly in parser */
746 	 }
747         case 79: break;
748         case 59: 
749           {   
750             yybegin(IGNORE_DOCTYPE);
751             return HtmlParser.DOCTYPE_START;
752      }
753         case 80: break;
754         case 39: 
755           {    
756 		yybegin(YYINITIAL);
757 		return HtmlParser.ANGLE_END_CLOSE;
758 	  }
759         case 81: break;
760         case 32: 
761           {  yybegin(INNER); 
762          setLval(string.toString());
763 	     return HtmlParser.STRING; 
764             }
765         case 82: break;
766         case 8: 
767         case 9: 
768         case 31: 
769         case 33: 
770           {  string.append(yytext());  }
771         case 83: break;
772         case 1: 
773         case 14: 
774           {   }
775         case 84: break;
776         case 0: 
777         case 11: 
778           {  
779          setLval(yytext());
780          return HtmlParser.TEXT;
781       }
782         case 85: break;
783         case 17: 
784           {    
785 		yybegin(YYINITIAL);
786 		return HtmlParser.ANGLE_CLOSE;
787 	  }
788         case 86: break;
789         case 19: 
790           {  string.setLength(0); yybegin(STRING);  }
791         case 87: break;
792         case 20: 
793           {  string.setLength(0); yybegin(APOSSTRING);  }
794         case 88: break;
795         case 2: 
796         case 21: 
797           {  }
798         case 89: break;
799         default: 
800           if (yy_input == YYEOF && yy_startRead == yy_currentPos) {
801             yy_atEOF = true;
802             yy_do_eof();
803               { return 0; }
804           } 
805           else {
806             yy_ScanError(YY_NO_MATCH);
807           }
808       }
809     }
810   }
811 
812 
813 }