home *** CD-ROM | disk | FTP | other *** search
- ------------------------------------------------------------------------
-
- package scanners is --| Scan tokens from strings
-
- --| Requirement Satisfied: ABS(1).Scanners(1) 1
-
- type scanner_type is
- record
- Index: natural; --| Index of next character to be scanned
- Max_Index: natural; --| Index of last scannable character
- First: natural; --| Index of first character of the result of a scan
- Last: Natural; --| Index of last character of the result of a scan
- Length: Natural; --| Length of the item scanned.
- end record;
-
-
- procedure start_Scanner( --| Initialize a scanner
- Scanner: in out Scanner_Type; --| Scanner to be initialized
- S: in string; --| String to be scanned
- Last: in natural --| Last scannable character in S.
- );
-
- --| Requirement Satisfied: ABS(1).Scanners(1) 1.1
-
-
- function is_Empty( --| Return False if Scanner can scan more characters
- Scanner: in Scanner_Type
- ) return boolean;
-
- --| Requirement Satisfied: ABS(1).Scanners(1) 1.1
-
-
- function is_Alpha( --| Check for alphabetic character
- Scanner: in scanner_Type;
- S: in string
- ) return boolean;
-
- --| Requirement Satisfied: ABS(1).Scanners(1) 1.2
- pragma inline(is_Alpha);
-
-
- function is_Digit( --| Check for start of unsigned number
- Scanner: in scanner_Type;
- S: in string
- ) return boolean;
-
- --| Requirement Satisfied: ABS(1).Scanners(1) 1.2
-
-
- function is_Sign( --| Check for '+' or '-'
- Scanner: in scanner_Type;
- S: in string
- ) return boolean;
-
- --| Requirement Satisfied: ABS(1).Scanners(1) 1.2
-
-
- function is_Digit_or_Sign( --| Check for start of optionally signed number
- Scanner: in scanner_Type;
- S: in string
- ) return boolean;
-
- --| Requirement Satisfied: ABS(1).Scanners(1) 1.2
-
-
- procedure skip_Blanks( --| Skip leading blanks in S
- Scanner: in out Scanner_Type; --| Scanner to be updated
- S: in string --| String being scanned
- );
-
- --| Requirement Satisfied: ABS(1).Scanners(1) 1.2
-
-
- procedure scan_Word( --| Scan past a sequence of non-blank characters
- Scanner: in out Scanner_Type;
- S: in string
- );
-
- --| Requirement Satisfied: ABS(1).Scanners(1) 1.2
-
-
- procedure scan_Number(
- Scanner: in out scanner_Type;
- S: in string
- );
-
- --| Requirement Satisfied: ABS(1).Scanners(1) 1.3
-
-
- procedure scan_Delimited( --| Scan string delimited by a single character
- Scanner: in out scanner_Type;
- S: in string
- );
-
- --| Requirement Satisfied: ABS(1).Scanners(1) 1.4
-
- end scanners;
-
- ------------------------------------------------------------------------
-