hotsax.html.sax
Class StyleLexer

java.lang.Object
  extended by hotsax.html.sax.StyleLexer
All Implemented Interfaces:
SemanticLexer

 class StyleLexer
extends Object
implements SemanticLexer

This class is a scanner generated by JFlex 1.3.2 on 8/10/01 4:37 PM from the specification file file:/home/edh/sourceforge/HotSAX/./build/src/hotsax/html/sax/StyleLexer.flex


Field Summary
protected  boolean debug
           
(package private)  Lval empty_yylval
           
static int ERROR_RECOVER
          lexical states
static int IGNORE_CDATA
           
(package private)  Lval lexer_yylval
           
static int YYEOF
          This character denotes the end of file
static int YYINITIAL
           
 
Constructor Summary
StyleLexer(HtmlParser p)
           
StyleLexer(InputStream in)
          Creates a new scanner.
StyleLexer(Reader in)
          Creates a new scanner There is also a java.io.InputStream version of this constructor.
StyleLexer(Reader r, HtmlParser p)
           
 
Method Summary
 int _yylex()
          mask the actual implementation of yylex to return the first SOF and the final EOF.
 boolean getDebug()
           
 boolean getEOF()
           
 Reader getReader()
          Return the yy_reader for this class.
 char[] getyyBuffer()
          Return the character buffer of the lexer.
 int getyyCurrentPos()
          Return the current position of the lexer.
 int getyyEndRead()
          Return the end read of the buffer of the lexer.
 int getyyMarkedPos()
          Return the marked position of the lexer.
 int getyyPushbackPos()
          Return the pushback position of the lexer.
 int getyyStartRead()
          Return the start read of the buffer of the lexer.
static void main(String[] argv)
          Runs the scanner on input files.
 void p(String s)
           
 void printBuffer()
          Debugs the yy_buffer.
 void setBuffer(SemanticLexer lexer)
          Sets this lexer to the same yybuffer, and character positions as the other lexer
 void setDebug(boolean debug)
           
(package private)  void setLval(Attribute a)
           
(package private)  void setLval(Lval l)
           
(package private)  void setLval(String text)
           
 void setReader(Reader r)
          Ser the Reader for the lexer.
 void yybegin(int newState)
          Enters a new lexical state
 char yycharat(int pos)
          Returns the character at position pos from the matched text.
 void yyclose()
          Closes the input stream.
 int yylength()
          Returns the length of the matched text region.
 int yylex()
          Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.
 void yylexerror_reset()
           
 void yyreset(Reader reader)
          Closes the current stream, and resets the scanner to read from a new input stream.
 int yystate()
          Returns the current lexical state.
 String yytext()
          Returns the text matched by the current regular expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

YYEOF

public static final int YYEOF
This character denotes the end of file

See Also:
Constant Field Values

ERROR_RECOVER

public static final int ERROR_RECOVER
lexical states

See Also:
Constant Field Values

IGNORE_CDATA

public static final int IGNORE_CDATA
See Also:
Constant Field Values

YYINITIAL

public static final int YYINITIAL
See Also:
Constant Field Values

debug

protected boolean debug

lexer_yylval

Lval lexer_yylval

empty_yylval

Lval empty_yylval
Constructor Detail

StyleLexer

public StyleLexer(Reader r,
                  HtmlParser p)

StyleLexer

public StyleLexer(HtmlParser p)

StyleLexer

StyleLexer(Reader in)
Creates a new scanner There is also a java.io.InputStream version of this constructor.

Parameters:
in - the java.io.Reader to read input from.

StyleLexer

StyleLexer(InputStream in)
Creates a new scanner. There is also java.io.Reader version of this constructor.

Parameters:
in - the java.io.Inputstream to read input from.
Method Detail

setDebug

public void setDebug(boolean debug)

getDebug

public boolean getDebug()

p

public void p(String s)

getEOF

public boolean getEOF()

yylexerror_reset

public void yylexerror_reset()

_yylex

public int _yylex()
           throws IOException
mask the actual implementation of yylex to return the first SOF and the final EOF. Marking the startDocument, EndDocuemnt events Also catches supposedly unrecoverable Error. Forces new ERROR_RECOVER state. #return the token from yylex() - one of HtmlParser.XXXXX

Specified by:
_yylex in interface SemanticLexer
Returns:
the HtmlParser.XXXX token id.
Throws:
IOException - thrown if the input could not be read

setLval

void setLval(String text)

setLval

void setLval(Attribute a)

setLval

void setLval(Lval l)

getReader

public Reader getReader()
Return the yy_reader for this class. Can be used to provide alternate scanner

Specified by:
getReader in interface SemanticLexer
Returns:
the Reader for this class

setReader

public void setReader(Reader r)
Description copied from interface: SemanticLexer
Ser the Reader for the lexer.

Specified by:
setReader in interface SemanticLexer
Parameters:
r - Reader to set

setBuffer

public void setBuffer(SemanticLexer lexer)
Sets this lexer to the same yybuffer, and character positions as the other lexer

Specified by:
setBuffer in interface SemanticLexer
Parameters:
lexer - The SemanticLexer to read the buffer from.

getyyBuffer

public char[] getyyBuffer()
Description copied from interface: SemanticLexer
Return the character buffer of the lexer. Exposes private yy_buffer

Specified by:
getyyBuffer in interface SemanticLexer
Returns:
the yy_buffer

getyyCurrentPos

public int getyyCurrentPos()
Description copied from interface: SemanticLexer
Return the current position of the lexer. Exposes private yy_currentPos

Specified by:
getyyCurrentPos in interface SemanticLexer
Returns:
the yy_currentPos

getyyMarkedPos

public int getyyMarkedPos()
Description copied from interface: SemanticLexer
Return the marked position of the lexer. Exposes private yy_markedPos

Specified by:
getyyMarkedPos in interface SemanticLexer
Returns:
the yy_markedPos

getyyPushbackPos

public int getyyPushbackPos()
Description copied from interface: SemanticLexer
Return the pushback position of the lexer. Exposes private yy_pushbackPos

Specified by:
getyyPushbackPos in interface SemanticLexer
Returns:
the yy_pushbackPos

getyyEndRead

public int getyyEndRead()
Description copied from interface: SemanticLexer
Return the end read of the buffer of the lexer. Exposes private yy_endRead

Specified by:
getyyEndRead in interface SemanticLexer
Returns:
the yy_endRead

getyyStartRead

public int getyyStartRead()
Description copied from interface: SemanticLexer
Return the start read of the buffer of the lexer. Exposes private yy_startRead

Specified by:
getyyStartRead in interface SemanticLexer
Returns:
the yy_startRead

printBuffer

public void printBuffer()
Description copied from interface: SemanticLexer
Debugs the yy_buffer. Prints the content of the buffer on System.out

Specified by:
printBuffer in interface SemanticLexer

main

public static void main(String[] argv)
Runs the scanner on input files. This main method is the debugging routine for the scanner. It prints each returned token to System.out until the end of file is reached, or an error occured.

Parameters:
argv - the command line, contains the filenames to run the scanner on.

yyclose

public final void yyclose()
                   throws IOException
Closes the input stream.

Throws:
IOException

yyreset

public final void yyreset(Reader reader)
                   throws IOException
Closes the current stream, and resets the scanner to read from a new input stream. All internal variables are reset, the old input stream cannot be reused (internal buffer is discarded and lost). Lexical state is set to YY_INITIAL.

Parameters:
reader - the new input stream
Throws:
IOException

yystate

public final int yystate()
Returns the current lexical state.


yybegin

public final void yybegin(int newState)
Enters a new lexical state

Specified by:
yybegin in interface SemanticLexer
Parameters:
newState - the new lexical state

yytext

public final String yytext()
Returns the text matched by the current regular expression.


yycharat

public final char yycharat(int pos)
Returns the character at position pos from the matched text. It is equivalent to yytext().charAt(pos), but faster

Parameters:
pos - the position of the character to fetch. A value from 0 to yylength()-1.
Returns:
the character at position pos

yylength

public final int yylength()
Returns the length of the matched text region.


yylex

public int yylex()
          throws IOException
Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.

Returns:
the next token
Throws:
IOException - if any I/O-Error occurs


Copyright © 2007-2008. All Rights Reserved.