|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.unitils.dbmaintainer.script.parsingstate.impl.BaseParsingState
org.unitils.dbmaintainer.script.parsingstate.impl.NormalParsingState
public class NormalParsingState
The default initial parsing state that is able to recognize the beginning of line comments, block comments, single and double quote literals and the ending of a statment.
Field Summary | |
---|---|
protected boolean |
backSlashEscapingEnabled
Determines whether backslashes can be used to escape characters, e.g. \" for a double quote (= "") |
protected boolean |
escaping
True if the next character should be escaped |
protected ParsingState |
inBlockCommentParsingState
The in a block comment (/ * comment * /) state. |
protected ParsingState |
inDoubleQuotesParsingState
The in double quotes ("text") state. |
protected ParsingState |
inLineCommentParsingState
The in an in-line comment (-- comment) state. |
protected ParsingState |
inSingleQuotesParsingState
The in single quotes ('text') state. |
Constructor Summary | |
---|---|
NormalParsingState()
|
Method Summary | |
---|---|
protected ParsingState |
getNextParsingState(char previousChar,
char currentChar,
char nextChar,
StatementBuilder statementBuilder)
Determines the next state. |
void |
init(ParsingState inLineCommentParsingState,
ParsingState inBlockCommentParsingState,
ParsingState inSingleQuotesParsingState,
ParsingState inDoubleQuotesParsingState,
boolean backSlashEscapingEnabled)
Initializes the state with the given parsing states. |
Methods inherited from class org.unitils.dbmaintainer.script.parsingstate.impl.BaseParsingState |
---|
handleNextChar |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ParsingState inLineCommentParsingState
protected ParsingState inBlockCommentParsingState
protected ParsingState inSingleQuotesParsingState
protected ParsingState inDoubleQuotesParsingState
protected boolean backSlashEscapingEnabled
protected boolean escaping
Constructor Detail |
---|
public NormalParsingState()
Method Detail |
---|
public void init(ParsingState inLineCommentParsingState, ParsingState inBlockCommentParsingState, ParsingState inSingleQuotesParsingState, ParsingState inDoubleQuotesParsingState, boolean backSlashEscapingEnabled)
inLineCommentParsingState
- The inline comment state, not nullinBlockCommentParsingState
- The block comment state, not nullinSingleQuotesParsingState
- The single quote literal state, not nullinDoubleQuotesParsingState
- The double quote literal state, not nullbackSlashEscapingEnabled
- True if backslashes can be used for escapingprotected ParsingState getNextParsingState(char previousChar, char currentChar, char nextChar, StatementBuilder statementBuilder)
getNextParsingState
in class BaseParsingState
previousChar
- The previous char, 0 if nonecurrentChar
- The current charnextChar
- The next char, 0 if nonestatementBuilder
- The statement builder, not null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |