Hosted by
 |
Parsers
 |  | type Parser |  |
 | Private type for instance variables. |  |
 |  | exception Parse_Error |  |
 | Raised by procedure Error. |  |
Create and destroy parsers
 |  | function Current_Input |  |
 | Constructor for a parser on STDIN. |  |
|
 |  | function Open |  |
 | Constructor for a parser on a file. |  |
|
 |  | procedure Close |  |
 | Destructor: free memory and set instance to null. |  |
Param | Type | Description |
in out Parser | Parsers.Parser |
|
|
Line-based file access
 |  | procedure Set_Auto_Read |  |
 | Enable / disable the automatic read feature. The default is
False.
If Auto_Read is set to True, the application doesn't need to
call Next_Line because it's done automatically and
transparently. |  |
|
 |  | function Next_Line |  |
 | Read next line of input. |  |
|
 |  | function End_Of_Line |  |
 | Check cursor position. Returns true if and only if the cursor is
at the end of the current line. |  |
|
 |  | function End_Of_File |  |
 | Check cursor position. Returns true if and only if the end of
input has been reached. |  |
|
Advance the cursor unconditionally
 |  | procedure Skip |  |
 | Advance cursor position. |  |
|
 |  | function Skip |  |
 | Read a character and advance cursor. |  |
|
 |  | function Skip |  |
 | Read a number of characters. |  |
|
Read text without moving the cursor
 |  | function Char |  |
 | Read a character, don't move cursor. |  |
|
 |  | function Rest_Of_Line |  |
 | Read the rest of the line, don't move cursor. |  |
|
Check if specified text is at cursor
 |  | function Found |  |
 | Check for a character. |  |
|
 |  | function Found |  |
 | Check for a string. |  |
|
 |  | function Found_Any |  |
 | Check for any one out of a number of characters. |  |
|
Check if specified text is at cursor and skip if yes
 |  | function Skip |  |
 | Skip one character if found. |  |
|
 |  | procedure Skip |  |
 | Skip one character if found. |  |
|
 |  | function Skip |  |
 | Skip a string if found. |  |
|
 |  | procedure Skip |  |
 | Skip a string if found. |  |
|
 |  | function Skip_Any |  |
 | Skip any out of a number of characters as long as found. |  |
|
 |  | procedure Skip_Any |  |
 | Skip any out of a number of characters as long as found. |  |
|
Search forward for specified text
 |  | function Read_Natural |  |
 | special reading functions |  |
|
 |  | function Position |  |
 | return file name, line and column number for error messages |  |
|
 |  | procedure Warning |  |
 | print an error message to current error |  |
|
 |  | procedure Error |  |
 | same as warn plus raise Parse_Error |  |
|
|
|