More README editation.
catseye
10 years ago
99 | 99 | which is followed by a label name. A label with this label name |
100 | 100 | is sought in the program and, if found, the position of the label |
101 | 101 | in the program text (with 0 being the position of the first character |
102 | of the program, and with all characters, including whitespace, having | |
103 | sequential positions within the program) is written to the register. | |
104 | If there are multiple labels with the same label name, the one closest | |
105 | to the start of the program text is chosen. If a matching label is | |
106 | not found, "an error occurs", whatever that means exactly. | |
102 | of the program, and with all characters, including whitespace and | |
103 | comments, having sequential positions within the program) is written to | |
104 | the register. If there are multiple labels with the same label name, | |
105 | the one closest to the start of the program text is chosen. If a | |
106 | matching label is not found, "an error occurs", whatever that means | |
107 | exactly. | |
107 | 108 | * an _output statement_, which is where the register reference |
108 | 109 | is followed by a `>` character. The ASCII character with the same |
109 | 110 | value as the contents of the register will be written to the program's |
125 | 126 | time a jump statement is executed. |
126 | 127 | * an _emotion bank switch statement_, which is where the register |
127 | 128 | reference is followed by a `=` followed by a `>`. The emotion bank |
128 | is switched to the value in the register. If that emotion bank is | |
129 | not supported by the implementation, "an error occurs". | |
129 | is switched to the value in the register. The previous emotion bank | |
130 | number is then written to the register for posterity. If that emotion | |
131 | bank is not supported by the implementation, "an error occurs". An | |
132 | "error" may also "occur" if emotion bank switching is not supported | |
133 | by the implementation. | |
130 | 134 | |
131 | 135 | Note that whitespace and comments are not allowed inside any statement |
132 | 136 | which begins with a register reference. If an attempt is made to execute any |
227 | 231 | * 72: love |
228 | 232 | * 73: lust |
229 | 233 | |
230 | (While some of the above may not be emotions per se, and while some | |
231 | combinations, such as "faint zeal", "mild rage", and "extreme apathy" may be | |
232 | tricky to express, this does not detract from the bare fact that Cfluviurrh | |
233 | *does* support experiencing emotions.) | |
234 | ||
235 | 234 | There are five intensity levels, listed in the following table. To find the |
236 | 235 | intensity level of an emotion to be experienced, each of the first twenty-six |
237 | 236 | registers are multiplied by three (modulo five) and this set of values is |
255 | 254 | just that, you know, it's C. |
256 | 255 | |
257 | 256 | As mentioned, the reference implementation requires the user to agree to |
258 | act as the emoter. As it uses standard input and output to interact with | |
259 | the emoter, asking them to agree to act as the emoter, and prompting them to | |
260 | feel the required emotions, the input stream and output stream of the | |
261 | Cfluviurrh program are assigned to two files given on the command line: | |
257 | act as the emoter. As it uses C's standard input and standard output to | |
258 | interact with the emoter, asking them to agree to act as the emoter, and | |
259 | prompting them to feel the required emotions, the input stream and output | |
260 | stream of the Cfluviurrh program are assigned to two files given on the | |
261 | command line: | |
262 | 262 | |
263 | 263 | cfluviurrh <program-file> <input-file> <output-file> |
264 | 264 | |
265 | When "an error occurs" the reference interpreter exits to the operating | |
266 | system with an error message of some sort. | |
265 | To facilitate interactive Cfluviurrh programs, the input-file and | |
266 | output-file may be named pipes, or (on AmigaOS) console devices, or | |
267 | something. | |
268 | ||
269 | When "an error occurs" the reference interpreter generally exits to the | |
270 | operating system with an error message of some sort. Although, it may | |
271 | just crash, too. | |
267 | 272 | |
268 | 273 | Discussion |
269 | 274 | ---------- |
282 | 287 | "real" parser would not be necessary. I implemented in C partly because it |
283 | 288 | would be nice to port it to AmigaOS 1.3 someday, and partly because, if I |
284 | 289 | don't have enough C repos on Github to outnumber my legacy Perl repos, |
285 | they'll label me a Perl programmer, and I don't particularly want that. | |
290 | they'll label Cat's Eye Technologies a Perl outfit, and I don't particularly | |
291 | want that. | |
292 | ||
293 | While some of the entries in the emotion table may not be emotions per se, | |
294 | and while some combination of intensity and emotion, such as "faint zeal", | |
295 | "mild rage", and "extreme apathy" may be tricky to express, this does not | |
296 | detract from the bare fact that Cfluviurrh *does* support experiencing | |
297 | emotions. | |
286 | 298 | |
287 | 299 | Because every label name can only be a single printable character, it might |
288 | 300 | appear that the number of jump destinations in a program is limited to 95. |