| immutable class SFILE_ID < $STR, $HASH, $IS_LT{SFILE_ID} |
|---|
| **** | A character position in a Sather source file. Used for generating error messages. Maintains a shared list of already processed files, and provides the routines for reading a file. Non-reentrant. |
| $IS_LT{_} | $IS_EQ | $HASH | $STR |
| shared pos: INT; |
|---|
| **** | the current position in source line |
| shared source: FSTR; |
|---|
| **** | the current source file as a FSTR |
| shared files: FLIST{STR}; |
|---|
| **** | list of registered file names |
| shared pos: INT; |
|---|
| **** | the current position in source line |
| shared source: FSTR; |
|---|
| **** | the current source file as a FSTR |
| const eof_char: CHAR := '\0'; |
|---|
| **** | returned at end of file |
| close_file |
|---|
| col_num_in: INT |
|---|
| **** | Column position encoded in loc |
| create (loc: INT): SFILE_ID |
|---|
| file_in: STR |
|---|
| **** | File name encoded in loc |
| hash:INT |
|---|
| index: INT |
|---|
| **** | List index referred to encoded in loc |
| is_eq (y: SFILE_ID): BOOL |
|---|
| is_lt(y: SFILE_ID): BOOL |
|---|
| **** | Sorting won't be so arbitrary The character encoding should be in the lowest bits? |
| is_neq (y: SFILE_ID): BOOL |
|---|
| line_num_in: INT |
|---|
| **** | Line number encoded in loc |
| next: CHAR |
|---|
| no_location: SFILE_ID |
|---|
| open_file (p: PROG, name: STR): BOOL |
|---|
| source_loc: SFILE_ID |
|---|
| str: STR |
|---|
| **** | Name of the file into which loc is pointing |
| const B: INT := 1024; |
|---|
| **** | maximal line length |
| shared column: INT; |
|---|
| **** | the current column |
| shared column: INT; |
|---|
| **** | the current column |
| shared files: FLIST{STR}; |
|---|
| **** | list of registered file names |
| shared line: INT := 0; |
|---|
| **** | current accumulated line number |
| shared line: INT := 0; |
|---|
| **** | current accumulated line number |
| shared line_pos: INT; |
|---|
| **** | the position of the first character in the line |
| shared line_pos: INT; |
|---|
| **** | the position of the first character in the line |
| shared lines: FLIST{INT}; |
|---|
| **** | list of accumulated lines (0 for first file) |
| shared lines: FLIST{INT}; |
|---|
| **** | list of accumulated lines (0 for first file) |
| attr loc: INT; |
|---|
| **** |
| attr loc: INT; |
|---|
| **** |
| shared newline: BOOL; |
|---|
| **** | next character starts a new line |
| shared newline: BOOL; |
|---|
| **** | next character starts a new line |
| const sentinel: INT := 2147483647; |
|---|
| **** |