| Modifier and Type | Class and Description |
|---|---|
class |
DefaultParser.ArgumentList
The result of a delimited buffer.
|
static class |
DefaultParser.BlockCommentDelims |
static class |
DefaultParser.Bracket |
Parser.ParseContextREGEX_COMMAND, REGEX_VARIABLE| Constructor and Description |
|---|
DefaultParser() |
public DefaultParser lineCommentDelims(String[] lineCommentDelims)
public DefaultParser blockCommentDelims(DefaultParser.BlockCommentDelims blockCommentDelims)
public DefaultParser quoteChars(char[] chars)
public DefaultParser escapeChars(char[] chars)
public DefaultParser eofOnUnclosedQuote(boolean eofOnUnclosedQuote)
public DefaultParser eofOnUnclosedBracket(DefaultParser.Bracket... brackets)
public DefaultParser eofOnEscapedNewLine(boolean eofOnEscapedNewLine)
public DefaultParser regexVariable(String regexVariable)
public DefaultParser regexCommand(String regexCommand)
public DefaultParser commandGroup(int commandGroup)
public void setQuoteChars(char[] chars)
public char[] getQuoteChars()
public void setEscapeChars(char[] chars)
public char[] getEscapeChars()
public void setLineCommentDelims(String[] lineCommentDelims)
public String[] getLineCommentDelims()
public void setBlockCommentDelims(DefaultParser.BlockCommentDelims blockCommentDelims)
public DefaultParser.BlockCommentDelims getBlockCommentDelims()
public void setEofOnUnclosedQuote(boolean eofOnUnclosedQuote)
public boolean isEofOnUnclosedQuote()
public void setEofOnEscapedNewLine(boolean eofOnEscapedNewLine)
public boolean isEofOnEscapedNewLine()
public void setEofOnUnclosedBracket(DefaultParser.Bracket... brackets)
public void setRegexVariable(String regexVariable)
public void setRegexCommand(String regexCommand)
public void setCommandGroup(int commandGroup)
public boolean validCommandName(String name)
validCommandName in interface Parserpublic boolean validVariableName(String name)
validVariableName in interface Parserpublic String getCommand(String line)
getCommand in interface Parserpublic String getVariable(String line)
getVariable in interface Parserpublic ParsedLine parse(String line, int cursor, Parser.ParseContext context)
public boolean isDelimiter(CharSequence buffer, int pos)
getQuoteChars(), and is not escaped by any of the getEscapeChars(), and
returns true from isDelimiterChar(java.lang.CharSequence, int).buffer - The complete command bufferpos - The index of the character in the bufferpublic boolean isQuoted(CharSequence buffer, int pos)
public boolean isQuoteChar(CharSequence buffer, int pos)
public boolean isLineCommentStarted(CharSequence buffer, int pos)
public boolean isEscapeChar(char ch)
isEscapeChar in interface Parserpublic boolean isEscapeChar(CharSequence buffer, int pos)
buffer - the buffer to check inpos - the position of the character to checkpublic boolean isEscaped(CharSequence buffer, int pos)
buffer - the buffer to check inpos - the position of the character to checkpublic boolean isDelimiterChar(CharSequence buffer, int pos)
getQuoteChars(), and is not escaped by any of the
getEscapeChars(). To perform escaping manually, override isDelimiter(java.lang.CharSequence, int) instead.buffer - the buffer to check inpos - the position of the character to checkCopyright © 2023. All rights reserved.