|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CharScannerSyntax
This is the interface used to define the syntax to scan characters.
CharStreamScanner.readUntil(char, boolean, CharScannerSyntax)| Method Summary | |
|---|---|
char |
getAltQuoteEnd()
This method gets the alternative character used to end a quotation. |
char |
getAltQuoteEscape()
This method gets the character used to escape the alt-quote-end character within an quotation opened by
alt-quote-start. |
char |
getAltQuoteStart()
This method gets the alternative character used to start a quotation that should be terminated by a alt-quote-end
character. |
char |
getEntityEnd()
This method gets the character used to end an entity. |
char |
getEntityStart()
This method gets the character used to start an entity. |
char |
getEscape()
This method gets the character used as escape. |
char |
getQuoteEnd()
This method gets the character used to end a quotation. |
char |
getQuoteEscape()
This method gets the character used to escape the quote-end character within a quotation. |
char |
getQuoteStart()
This method gets the character used to start a quotation that should be terminated by a quote-end character. |
boolean |
isAltQuoteEscapeLazy()
If alt-quote-start, alt-quote-end and alt-quote-escape all point
to the same character (which is NOT '\0'), then this method
determines if alt-quotation escaping is
lazy. |
boolean |
isQuoteEscapeLazy()
If quote-start, quote-end
and quote-escape all point to the same character
(which is NOT '\0'), then this method determines if
quotation escaping is lazy. |
String |
resolveEntity(String entity)
This method resolves the given entity. |
| Method Detail |
|---|
char getEscape()
stop-character, quote-start,
alt-quote-start, as well as the
escape itself.\).escape |
input | output |
|---|---|---|
| \ | a\b\\c | ab\c |
| ~ | a~b~~~c | ab~c |
escape is disabled within quotations.
0 ('\0') for no
escaping.getEntityStart()char getQuoteStart()
quote-end character. The text inside
the quote is taken as is (without the quote characters).') and
double quotes (").
0 (
'\0') to disable.char getQuoteEnd()
getQuoteStart()char getQuoteEscape()
quote-end character within a quotation. This may be the
quote-end itself so a duplicate
quote-end represents a single occurrence of that
character within a quotation. Otherwise the escape may be any other
character.quote-start and only escapes the
quote-end character and nothing else so in any other
case the quote-escape is treated as a regular
character.quote-start |
quote-end |
quote-escape |
input | output |
|---|---|---|---|---|
| ' | ' | ' | a'bc'd | abcd |
| ' | ' | ' | a'b''c'd | ab'cd |
| ' | ' | \ | a'b\c\'d\\'e'f | ab\c'd\'ef |
quote-end
character or 0 ('\0') to disable.boolean isQuoteEscapeLazy()
quote-start, quote-end
and quote-escape all point to the same character
(which is NOT '\0'), then this method determines if
quotation escaping is lazy. This means
that outside a quotation a double occurrence of the quote character is NOT
treated as quotation but as escaped quote character. Otherwise if NOT lazy,
the double quote character is treated as quotation representing the empty
sequence.
quote-start
quote-end
quote-escape
quote-escape-lazy
input
output
'
'
'
true
''
'
'
'
'
false
''
'
'
'
true
''''
''
'
'
'
false
''''
'
'
'
'
true
'''a'
'a
'
'
'
false
'''a'
'a
'''a' the complete sequence is treated as quote if
quote-escape-lazy is false and
otherwise just the trailing 'a'.
true if quote-escaping is lazy, false
otherwise.char getAltQuoteStart()
alt-quote-end
character. The text inside the quote is taken as is (without the quote
characters).
0 ('\0') to disable.getQuoteStart()char getAltQuoteEnd()
getAltQuoteStart()char getAltQuoteEscape()
alt-quote-end character within an quotation opened by
alt-quote-start.
quote-end
character or 0 ('\0') to disable.getQuoteEscape()boolean isAltQuoteEscapeLazy()
alt-quote-start, alt-quote-end and alt-quote-escape all point
to the same character (which is NOT '\0'), then this method
determines if alt-quotation escaping is
lazy.
true if alt-quote-escaping is lazy, false
otherwise.isQuoteEscapeLazy()char getEntityStart()
entity-start and entity-end. It will be decoded by
resolveEntity(String).
0 (
'\0') to disable.char getEntityEnd()
getEntityStart()String resolveEntity(String entity)
entity.entity-start is '&' and
getEntityEnd() is ';' then if the string "<" is
scanned, this method is called with "lt" as
entity argument and may return "<".
entity - is the entity string that was found surrounded by
entity-start and
entity-end excluding these characters.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||