Package apg
Class UdtLib.CComment
- java.lang.Object
-
- apg.Parser.UdtCallback
-
- apg.UdtLib.CComment
-
- Enclosing class:
- UdtLib
public static class UdtLib.CComment extends Parser.UdtCallback
UDT for recognizing the C-language comments. These are strings of all UTF-8 characters which begin with the phrase "/*
" and end with "*/
". Nesting of beginning and ending phrases not allowed.
-
-
Field Summary
-
Fields inherited from class apg.Parser.UdtCallback
callbackData
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
callback(int offset)
The UDT function.
-
-
-
Constructor Detail
-
CComment
public CComment(Parser parser)
The default constructor.- Parameters:
parser
- the Parser object the UDT is attached to.
-
-
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.
-
-