public class NormalParsingState extends BaseParsingState
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
NormalParsingState() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
handleNextCharprotected ParsingState inLineCommentParsingState
protected ParsingState inBlockCommentParsingState
protected ParsingState inSingleQuotesParsingState
protected ParsingState inDoubleQuotesParsingState
protected boolean backSlashEscapingEnabled
protected boolean escaping
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 BaseParsingStatepreviousChar - The previous char, 0 if nonecurrentChar - The current charnextChar - The next char, 0 if nonestatementBuilder - The statement builder, not nullCopyright © 2017. All rights reserved.