public interface TokenControl
Offers methods to control the parsing process by the handler.
-
Method Summary
Modifier and TypeMethodDescriptionvoidDisable the handling of all types of comments.voiddisableComments(int type) Disable the handling of comments of the given type.voidEnable the handling of all types of comments.voidenableComments(int type) Enable the handling of comments of the given type.voidsetAcceptEofEndingQuoted(boolean accept) If set, quoted strings ending with an EOF (End Of File). are processed through the relevantquotedmethod, albeit an error is reported in any case.voidsetAcceptNewlineEndingQuote(boolean accept) If set, quoted strings ending with an unescaped newline (instead of the closing quote) are processed through the relevantquotedmethod, albeit an error is reported in any case.
-
Method Details
-
enableAllComments
void enableAllComments()Enable the handling of all types of comments. -
setAcceptNewlineEndingQuote
void setAcceptNewlineEndingQuote(boolean accept) If set, quoted strings ending with an unescaped newline (instead of the closing quote) are processed through the relevantquotedmethod, albeit an error is reported in any case. Otherwise, only the error is reported.It is set to
falseby default.- Parameters:
accept- true to process quoted strings that ends with an unescaped newline, false otherwise.
-
setAcceptEofEndingQuoted
void setAcceptEofEndingQuoted(boolean accept) If set, quoted strings ending with an EOF (End Of File). are processed through the relevantquotedmethod, albeit an error is reported in any case. Otherwise, only the error is reported.It is set to
falseby default.- Parameters:
accept- true to process quoted strings that ends with an EOF,falseotherwise.
-
disableAllComments
void disableAllComments()Disable the handling of all types of comments. -
enableComments
void enableComments(int type) Enable the handling of comments of the given type.- Parameters:
type- the type of comment to enable. If the type does not exist, implementations may or may not throw an exception, depending on the intended coupling with theTokenHandler.
-
disableComments
void disableComments(int type) Disable the handling of comments of the given type.- Parameters:
type- the type of comment to disable. If the type does not exist, implementations may or may not throw an exception, depending on the intended coupling with theTokenHandler.
-