| 1 |
= C-INTERCAL Bug and To-Do list = |
| 2 |
|
| 3 |
There are still some known bugs in INTERCAL (and no doubt many we don't even |
| 4 |
suspect as yet). The following list accumulates current bug reports and |
| 5 |
TO DO agenda items through the current release. |
| 6 |
|
| 7 |
ESR = Eric S. Raymond |
| 8 |
SS = Steve Swales |
| 9 |
LHH = Louis Howell |
| 10 |
BLR = Brian Raiter |
| 11 |
AIS = Alex Smith |
| 12 |
|
| 13 |
== Known Bugs == |
| 14 |
|
| 15 |
1. (ESR) INTERCAL would be intrinsically a crock even if it worked right. |
| 16 |
|
| 17 |
2. (BLR) I have hacked up a fix to the problem with line numbers being off |
| 18 |
due to statements sharing/spanning lines. The parser now stores the |
| 19 |
starting line number for all tuples, not just the splatted |
| 20 |
ones. Not only does this give synchronized lines in the comments in |
| 21 |
the degenerated C code, but run-time error messages are just as |
| 22 |
reliable as the parse/compile-time ones. The line number in the |
| 23 |
error message is actually the line number of the next statement |
| 24 |
(e.g., if the next statement is on the same line, the line number |
| 25 |
of both statements will be used). |
| 26 |
|
| 27 |
Note that I said "just as reliable," as opposed to "fully |
| 28 |
reliable". Since the lexer doesn't know where the line ends until |
| 29 |
after it's already parsed the preamble (DO-PLEASE combo, line |
| 30 |
label, oh-oh-seven number, etc) of the following line, it actually |
| 31 |
stores as the starting line number the first non-whitespace of the |
| 32 |
statement proper. So if a statement has its preamble on one line |
| 33 |
and the rest of it on the next, the preamble will be beheaded. |
| 34 |
|
| 35 |
Still, it's a vast improvement, and as LHH pointed out, it's not |
| 36 |
going to get much better without writing a preprocessing lexer that |
| 37 |
can actually separate out the statements before any real parsing |
| 38 |
begins. Until someone wants to do that, this will do nicely, I think. |
| 39 |
|
| 40 |
As a side bonus, splatting now shows the entire statement. (Er, |
| 41 |
except when the statement both spans and shares a line. If a multi- |
| 42 |
line statement ends on the same line as the beginning of the next |
| 43 |
statement, the last part will get truncated. Again, not a case we |
| 44 |
want to be encouraging people to explore anyway.) |
| 45 |
|
| 46 |
3. (BLR) Interleave does not check the type of its arguments. The manual |
| 47 |
insinuates that interleaving 32-bit values should result in error 533; |
| 48 |
instead, C-INTERCAL silently truncates them to 16 bits. Unfortunately, |
| 49 |
the modified behavior of select's return type depends on this, so |
| 50 |
there's not much we can do about it as things stand. |
| 51 |
|
| 52 |
4. (AIS) Reverse assignments (those with the expression on the left) |
| 53 |
are very unlikely to work in bases other than 2. (The current code |
| 54 |
calculates what the answer would be in base 2 and throws an error |
| 55 |
if it isn't correct for the current base.) |
| 56 |
|
| 57 |
5. (AIS) Some of the newer features in intercal.el are not yet fully |
| 58 |
implemented and have a tendency to print 'Unimplemented' rather |
| 59 |
than doing anything useful. |
| 60 |
|
| 61 |
6. (AIS) The external call system only works with gcc (due to its need |
| 62 |
to pass command-line arguments like -x and -E to it), and fails |
| 63 |
when mixed with come-from-gerund and next-from-gerund. |
| 64 |
|
| 65 |
== To Do == |
| 66 |
|
| 67 |
1. (ESR) Add more optimization templates, esp. idioms for +, -, *, /. |
| 68 |
|
| 69 |
2. (ESR) Forget this @!%$#! crock and take a long vacation. |