File: INPUT_STREAM.html

package info (click to toggle)
lisaac 1%3A0.13.1-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 15,276 kB
  • ctags: 6,396
  • sloc: ansic: 242,479; xml: 635; lisp: 333; makefile: 116; sh: 73; asm: 38
file content (145 lines) | stat: -rwxr-xr-x 11,232 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE HTML SYSTEM>
<!-- Generated by Lisaac shorter / html style -->
<html>
<head>
<title>
Lisaac prototype interface
</title>
</head>
<body BGCOLOR="#FFFFFF">

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
<br><br><strong><font color="#A020F0">Section</font></strong> <strong><font color="#A020F0">Header</font></strong>
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp +</font></strong> <strong><font color="#0000FF">name</font></strong>    := <a href="INPUT_STREAM.html"><font color="#008000">INPUT_STREAM</font></a>;
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">comment</font></strong> := <font color="#BC8F8F">"This abstract class is the superclass of all classes \
               \representing an input stream of bytes."</font>;
  
<br><br><strong><font color="#A020F0">Section</font></strong> <strong><font color="#A020F0">Inherit</font></strong>
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">parent_object</font></strong>:<a href="OBJECT.html"><font color="#008000">OBJECT</font></a> := 
  
<br><br><strong><font color="#A020F0">Section</font></strong> <strong><font color="#A020F0">Public</font></strong>
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">push_back_flag</font></strong>:<a href="BOOLEAN.html"><font color="#008000">BOOLEAN</font></a>;
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  True if one char is already pushed back.</font></strong></em>
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">last_integer</font></strong>:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a>;
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  Last integer read using `read_integer'.</font></strong></em>
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">last_string</font></strong>:<a href="STRING.html"><font color="#008000">STRING</font></a> :=
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  Access to the unique common buffer to get for example the result</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  computed by `read_line', `read_word', `newline', etc. This is a once</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  function (the same common buffer is used for all streams).</font></strong></em>
    
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">is_connected</font></strong>:<a href="BOOLEAN.html"><font color="#008000">BOOLEAN</font></a> <-
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  True when the corresponding stream is connected</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  to some physical input device.</font></strong></em>
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">end_of_input</font></strong>:<a href="BOOLEAN.html"><font color="#008000">BOOLEAN</font></a> <-
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  Has end-of-input been reached ?</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  True when the last character has been read.</font></strong></em>
    
  
  <br><font FACE="Sans-serif" color="#000000"><B> To read one character at a time:</B></font>
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">read_character</font></strong> <-
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  Read a character and assign it to `last_character'.</font></strong></em>
    
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">last_character</font></strong>:<a href="CHARACTER.html"><font color="#008000">CHARACTER</font></a> <-
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  Last character read with `read_character'.</font></strong></em>
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">unread_character</font></strong> <-
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  Un-read the last character read.</font></strong></em>
    
  <br><font FACE="Sans-serif" color="#000000"><B> Skipping separators:</B></font>
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">skip_separators</font></strong> <-
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  Skip all separators (see `is_separator' of class CHARACTER) and</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  make the first non-separator available in `last_character'. This</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  non-separator character is pushed back into the stream (see</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  `unread_character') to be available one more time (the next</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  `read_character' will consider this non-separator). When</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  `end_of_input' occurs, this process is automatically stopped.</font></strong></em>
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">skip_separators_using</font></strong> separators:<a href="STRING.html"><font color="#008000">STRING</font></a> <-
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  Same job as `skip_separators' using the `separators' set.</font></strong></em>
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">skip_remainder_of_line</font></strong> <-
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  Skip all the remainder of the line including the end of</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  line character itself.</font></strong></em>
    
  <br><font FACE="Sans-serif" color="#000000"><B> To read one number at a time:</B></font>
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">read_integer</font></strong> <-
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  Read an integer according to the Lisaac syntax.</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  Make result available in `last_integer'.</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  Heading separators are automatically skipped using</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  `is_separator' of class CHARACTER.</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  Trailing separators are not skipped.</font></strong></em>
    
  
   
  
  <br><font FACE="Sans-serif" color="#000000"><B> To read one line or one word at a time:</B></font>
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">read_line</font></strong> <-
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  Read a complete line ended by '\n' or `end_of_input'. Make the</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  result available in `last_string' common buffer. The end of line</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  character (usually '\n') is not added in the `last_string' buffer.</font></strong></em>
    
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">read_word</font></strong> <-
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  Read a word using `is_separator' of class CHARACTER. Result is</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  available in the `last_string' common buffer. Heading separators are</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  automatically skipped. Trailing separators are not skipped</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  (`last_character' is left on the first one). If `end_of_input' is</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  encountered, Result can be the empty string.</font></strong></em>
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">newline</font></strong> <-
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  Consume input until newline ('\n') is found. Corresponding</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  STRING is stored in `last_string' common buffer.</font></strong></em>
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">reach_and_skip</font></strong> keyword:<a href="STRING.html"><font color="#008000">STRING</font></a> <-
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  Try to skip enough characters in order to reach the `keyword'</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  which is skipped too. If the `keyword' is not in the remainder of</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  this stream, the process is stopped as soon  as `end_of_input'</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  occurs. As for `skip_separators' the following character of the</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  `keyword' is available in `last_character' and not yet read.</font></strong></em>
    
  <br><font FACE="Sans-serif" color="#000000"><B> Other features:</B></font>
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">read_line_in</font></strong> buffer:<a href="STRING.html"><font color="#008000">STRING</font></a> <-
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  Same jobs as `read_line' but storage is directly done in `buffer'.</font></strong></em>
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">read_word_using</font></strong> separators:<a href="STRING.html"><font color="#008000">STRING</font></a> <-
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  Same jobs as `read_word' using `separators'.</font></strong></em>
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">read_tail_in</font></strong> str:<a href="STRING.html"><font color="#008000">STRING</font></a> <-
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  Read all remaining character of the file in `str'.</font></strong></em>
  
</body>
</html>