Package apg
Class UdtLib.QuotedString
- java.lang.Object
-
- apg.Parser.UdtCallback
-
- apg.UdtLib.QuotedString
-
- Direct Known Subclasses:
UdtLib.DoubleQuotedString
,UdtLib.SingleQuotedString
- Enclosing class:
- UdtLib
public static class UdtLib.QuotedString extends Parser.UdtCallback
UDT for the quoted-string.A quoted string is a string of any printing ASCII characters (
32-126
) between beginning and ending quote characters, not including the quote character. "Escaped" character pairs, such as\n
or\"
not allowed.
-
-
Field Summary
-
Fields inherited from class apg.Parser.UdtCallback
callbackData
-
-
Constructor Summary
Constructors Constructor Description QuotedString(Parser p, char quote)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
callback(int offset)
The UDT function.
-
-
-
Constructor Detail
-
QuotedString
public QuotedString(Parser p, char quote)
Constructor.- Parameters:
p
- the Parser object this UDT is attached to.quote
- the beginning and ending quote character.
-
-
Method Detail
-
callback
public int callback(int offset)
Description copied from class:Parser.UdtCallback
The UDT function.- Specified by:
callback
in classParser.UdtCallback
- Parameters:
offset
- offset into the input string to the first character of the parsed phrase.- Returns:
- the matched phrase length,
L
, or-1
if no phrase was matched. The phrase length must be in the range0 <= L <=(n-1)
, wheren
is the remaining number of characters in the input string.
-
-