public class JavascriptParserImpl extends GenericParser implements JavascriptParser
Many comments copied almost verbatim from the original C version.
columnNumber, currentState, initialState, intToExtStateTable, lineNumber, parserStateTable
STATE_COMMENT, STATE_DQ, STATE_Q, STATE_REGEXP, STATE_TEXT
STATE_ERROR
Constructor and Description |
---|
JavascriptParserImpl()
Creates a
JavascriptParserImpl object. |
JavascriptParserImpl(JavascriptParserImpl aJavascriptParserImpl)
Creates a
JavascriptParserImpl object that is a copy
of the one provided. |
Modifier and Type | Method and Description |
---|---|
protected com.google.streamhtmlparser.impl.InternalState |
handleEnterState(com.google.streamhtmlparser.impl.InternalState currentState,
com.google.streamhtmlparser.impl.InternalState expectedNextState,
char input)
Invoked when the parser enters a new state.
|
protected com.google.streamhtmlparser.impl.InternalState |
handleExitState(com.google.streamhtmlparser.impl.InternalState currentState,
com.google.streamhtmlparser.impl.InternalState expectedNextState,
char input)
Invoked when the parser exits a state.
|
protected com.google.streamhtmlparser.impl.InternalState |
handleInState(com.google.streamhtmlparser.impl.InternalState currentState,
char input)
Invoked for each character read when no state change occured.
|
void |
reset()
Reset the parser back to its initial default state.
|
getColumnNumber, getLineNumber, getState, parse, parse, record, setColumnNumber, setLineNumber, setNextState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getColumnNumber, getLineNumber, getState, parse, parse, setColumnNumber, setLineNumber
public JavascriptParserImpl()
JavascriptParserImpl
object.public JavascriptParserImpl(JavascriptParserImpl aJavascriptParserImpl)
JavascriptParserImpl
object that is a copy
of the one provided.aJavascriptParserImpl
- the JavascriptParserImpl
to copypublic void reset()
GenericParser
reset
in interface Parser
reset
in class GenericParser
protected com.google.streamhtmlparser.impl.InternalState handleEnterState(com.google.streamhtmlparser.impl.InternalState currentState, com.google.streamhtmlparser.impl.InternalState expectedNextState, char input)
GenericParser
handleEnterState
in class GenericParser
currentState
- the current state of the parserexpectedNextState
- the next state according to the
state table definitioninput
- the last character parsedexpectedNextState
providedprotected com.google.streamhtmlparser.impl.InternalState handleExitState(com.google.streamhtmlparser.impl.InternalState currentState, com.google.streamhtmlparser.impl.InternalState expectedNextState, char input)
GenericParser
handleExitState
in class GenericParser
currentState
- the current state of the parserexpectedNextState
- the next state according to the
state table definitioninput
- the last character parsedexpectedNextState
providedprotected com.google.streamhtmlparser.impl.InternalState handleInState(com.google.streamhtmlparser.impl.InternalState currentState, char input)
GenericParser
handleInState
in class GenericParser
currentState
- the current state of the parserinput
- the last character parsedexpectedNextState
providedCopyright © 2010-2013 Google. All Rights Reserved.