Token_Readers
Light-weight token input file readers.
| | type Token_Reader | |
| Light-weight token input file reader.
Behaviour.
Temporary data. | |
| | type Token_Reader_Access | |
| Type for instance variables. | |
Internal initialization and finalization
| | procedure Initialize_Token_Reader | |
| Initialize a newly created reader instance. | |
Param | Type | Description |
access This | Token_Reader'Class |
|
|
| | procedure Initialize_Token_Reader | |
| Initialize a newly created reader instance with a file to read. | |
Param | Type | Description |
access This | Token_Reader'Class |
|
|
|
| | procedure Finalize_Token_Reader | |
| Close the input file. | |
Param | Type | Description |
access This | Token_Reader'Class |
|
|
Creating readers
| | function Current_Input | |
| Create an Token reader for current input (stdin). | |
Param | Type | Description |
return | Token_Reader_Access |
|
|
| | function Open | |
| Create an Token reader for file input. | |
Param | Type | Description |
|
return | Token_Reader_Access |
|
|
| | procedure Close | |
| Close an Token reader's input file. | |
Param | Type | Description |
in out This | Token_Reader_Access |
|
|
Whitespace
| | function Found_Whitespace | |
| Check if the next input character is whitespace. | |
Param | Type | Description |
access This | Token_Reader'Class |
|
|
|
| | procedure Skip_Whitespace | |
| Skip forward until the next input character is not whitespace. | |
Param | Type | Description |
access This | Token_Reader'Class |
|
|
Reading tokens
| | function Read_Word | |
| Read characters from input until one of the Word_Separators is
found. | |
Param | Type | Description |
access This | Token_Reader'Class |
|
|
|
| | function Read_Real | |
| Read a real number for a token reader. | |
Param | Type | Description |
access This | Token_Reader'Class |
|
|
|
| | function Read_String | |
| Read characters from input until String_Quote is found. | |
Param | Type | Description |
access This | Token_Reader'Class |
|
|
|
| | procedure Read_Token | |
| If the current character is String_Quote, read a string,
otherwise read a word. The result is stored in This.Token. | |
Param | Type | Description |
access This | Token_Reader'Class |
|
|
| | function Read_Token | |
| If the current character is String_Quote, read a string,
otherwise read a word. The result is stored in This.Token and
also returned for immediate checking. | |
Param | Type | Description |
access This | Token_Reader'Class |
|
|
|
| | function Get_Token | |
| Get the current token from a token reader. | |
Param | Type | Description |
access This | Token_Reader'Class |
|
|
|
| | procedure Set_Token | |
| Modify the current token of a token reader. | |
Param | Type | Description |
access This | Token_Reader'Class |
|
|
|
| | function Found | |
| Check if a given token was found. | |
Param | Type | Description |
access This | Token_Reader'Class |
|
|
|
|
|