hotsax.html.sax
Interface SemanticLexer

All Known Implementing Classes:
HtmlLexer, ScriptLexer, StyleLexer

public interface SemanticLexer


Method Summary
 int _yylex()
          Wrapper for jflex generated yylex() method.
 Reader getReader()
          Get the current Reader
 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.
 void printBuffer()
          Debugs the yy_buffer.
 void setBuffer(SemanticLexer lexer)
          Sets the buffer from another SemanticLexer, probably the default one.
 void setReader(Reader r)
          Ser the Reader for the lexer.
 void yybegin(int state)
          Set the Lexer state.
 

Method Detail

_yylex

int _yylex()
           throws IOException
Wrapper for jflex generated yylex() method.

Returns:
the HtmlParser.XXXX token id.
Throws:
IOException - thrown if the input could not be read

setReader

void setReader(Reader r)
Ser the Reader for the lexer.

Parameters:
r - Reader to set

getReader

Reader getReader()
Get the current Reader

Returns:
the Reader for this SemanticLexer

yybegin

void yybegin(int state)
Set the Lexer state. Usually called by the HtmlParser and set to HtmlLexer.YYINITIAL

Parameters:
state - the state to set/reset the lexer state to

setBuffer

void setBuffer(SemanticLexer lexer)
Sets the buffer from another SemanticLexer, probably the default one.

Parameters:
lexer - The SemanticLexer to read the buffer from.

getyyBuffer

char[] getyyBuffer()
Return the character buffer of the lexer. Exposes private yy_buffer

Returns:
the yy_buffer

getyyCurrentPos

int getyyCurrentPos()
Return the current position of the lexer. Exposes private yy_currentPos

Returns:
the yy_currentPos

getyyMarkedPos

int getyyMarkedPos()
Return the marked position of the lexer. Exposes private yy_markedPos

Returns:
the yy_markedPos

getyyPushbackPos

int getyyPushbackPos()
Return the pushback position of the lexer. Exposes private yy_pushbackPos

Returns:
the yy_pushbackPos

getyyEndRead

int getyyEndRead()
Return the end read of the buffer of the lexer. Exposes private yy_endRead

Returns:
the yy_endRead

getyyStartRead

int getyyStartRead()
Return the start read of the buffer of the lexer. Exposes private yy_startRead

Returns:
the yy_startRead

printBuffer

void printBuffer()
Debugs the yy_buffer. Prints the content of the buffer on System.out



Copyright © 2007-2008. All Rights Reserved.