RFC2822Parser (open)
Syntax
LOADLIB "wh::internet/mime.whlib";
OBJECTTYPE RFC2822Parser
Constructor
- MACRO NEW(STRING data) (inherited from StringParser)
Initializes a string parser
Properties
- PROPERTY current (inherited from StringParser)
Current character, or empty string at eof.
- PROPERTY eof (inherited from StringParser)
Whether position is at end of data
- PROPERTY position (inherited from StringParser)
Integer with current position within data
- PROPERTY remaining_data (inherited from StringParser)
Returns current character and the rest of the unparsed data
- PROPERTY set_all (inherited from StringParser)
A string with all byte characters (0-255)
- PROPERTY set_alpha (inherited from StringParser)
A string with ASCII letters (a-z, A-Z)
- PROPERTY set_ascii (inherited from StringParser)
A string with all ASCII characters (0-127)
- PROPERTY set_control (inherited from StringParser)
A string with all control characters (0-31, 127)
- PROPERTY set_digit (inherited from StringParser)
A string with all ASCII digits (0-9)
Functions
- INTEGER FUNCTION GetDistanceFromState(RECORD state) (inherited from StringParser)
Returns the difference in characters from a saved state to the current position.
- STRING FUNCTION GetLastParsed(INTEGER n) (inherited from StringParser)
Get the last N parsed characters, without moving the current position
- STRING FUNCTION GetRemainingData() (inherited from StringParser)
Returns all reamining (unparsed) data (inclusing current character)
- BOOLEAN FUNCTION Next() (inherited from StringParser)
Set position to the next character, returns whether eof has been reached
- STRING FUNCTION ParseN(INTEGER n) (inherited from StringParser)
Parses a number characters
- STRING FUNCTION ParseUntilCharacter(STRING c) (inherited from StringParser)
Parses until a specific character, or the end of the data. Returns the data from the current position up to (but not including) the end character
- STRING FUNCTION ParseWhileInSet(STRING myset) (inherited from StringParser)
Parses all subsequent characters that are in the set
- STRING FUNCTION ParseWhileNotInSet(STRING myset) (inherited from StringParser)
Parses all subsequent characters that are not in the set
- STRING FUNCTION PeekN(INTEGER n, INTEGER pluspos) (inherited from StringParser)
Returns the next N characters, without moving the current position
- STRING FUNCTION RemoveFromSet(STRING myset, STRING removethese) (inherited from StringParser)
Removes a number of characters from a character set
- MACRO Reset(STRING data) (inherited from StringParser)
Resets the parser for a new string
- MACRO RestoreState(RECORD state) (inherited from StringParser)
Restores the state of the stringparser
- RECORD FUNCTION SaveState() (inherited from StringParser)
Saves the state of the stringparser
- MACRO SkipCFWS()
- MACRO SkipComment()
- MACRO SkipFWS()
- BOOLEAN FUNCTION SkipN(INTEGER n) (inherited from StringParser)
Skips N characters
- BOOLEAN FUNCTION TryParse(STRING c) (inherited from StringParser)
Tries to parse a string, returns whether successful.
- BOOLEAN FUNCTION TryParseCase(STRING c) (inherited from StringParser)
Tries to parse a string (case insensitive), returns whether successful.