Readers
Light-weight text input file readers. 
  |   | type Reader |   |  
  | Light-weight text input file reader.
File access.
Error messages.
Temporary data. |   |  
 
  |   | type Reader_Access |   |  
  | Access types for instance variables. |   |  
 
Internal initialization and finalization
  |   | procedure Initialize_Reader |   |  
  | Initialize a newly created reader instance. |   |  
| 
 |  
 
  |   | procedure Initialize_Reader |   |  
  | Initialize a newly created reader instance with a file to read. |   |  
| 
 |  
 
  |   | procedure Finalize_Reader |   |  
  | Close the input file. |   |  
| 
 |  
 
Creating readers
  |   | function Current_Input |   |  
  | Create a reader for current input (stdin). |   |  
| 
 |  
 
  |   | function Open |   |  
  | Create a reader for file input. |   |  
| 
 |  
 
  |   | procedure Close |   |  
  | Close a reader's input file. |   |  
| Param  | Type  | Description |  
| in out This  | Reader_Access  |  
  |  
 
 |  
 
Wrappers for file input
  |   | function End_Of_Line |   |  
  | Check for end of line. |   |  
| 
 |  
 
  |   | function End_Of_File |   |  
  | Check if the end of the input file has been reached. |   |  
| 
 |  
 
  |   | procedure Get |   |  
  | Get the next input character into This.C. |   |  
| 
 |  
 
Error handling
  |   | exception Syntax_Error  |   |  
  | The input syntax has been violated. |   |  
 
  |   | procedure Error |   |  
  | Print an error message, then raise Syntax_Error. |   |  
| 
 |  
 
  |   | function "/" |   |  
  | Concatenate two strings in a special format acceptable for
expectation errors. |   |  
| 
 |  
 
  |   | procedure Expect_Error |   |  
  | Print a formatted error message for unmatched expectations, then
raise Syntax_Error. |   |  
| 
 |  
 
Reading characters
  |   | function Get_Char |   |  
  | Read the current character. |   |  
| 
 |  
 
  |   | function Found_Char |   |  
  | Check if a given token was found. |   |  
| 
 |  
 
  |   | procedure Assert_Char |   |  
  | Test if the current look-ahead character is what we expect.
Call Error if not, and that raises Syntax_Error. |   |  
| 
 |  
 
 |