Minor aesthetic changes for release of version 1.0.
catseye
12 years ago
0 | 0 | yucca |
1 | 1 | ===== |
2 | ||
3 | _Version 1.0, June 10 2012_ | |
2 | 4 | |
3 | 5 | IT SO HAPPENS in the course of human events that one may find oneself |
4 | 6 | cross-developing an 8-bit BASIC program from a modern development |
9 | 11 | cross-developed code is correct. |
10 | 12 | |
11 | 13 | IT IS FOR THIS PURPOSE that _yucca_ was developed. It is a small Python |
12 | program which can perform static analysis on 8-bit BASIC programs. | |
14 | program which can perform static analysis on 8-bit BASIC programs. | |
13 | 15 | Specifically, it can, at present, check that every line number which is |
14 | 16 | a target of a jump is actually present in the program. If it is not, an |
15 | 17 | error message describing the inconsistency is given. |
22 | 24 | recognize (and thus will not check) computed `GOTO`s or any |
23 | 25 | dialect-specific command that involves line numbers. |
24 | 26 | |
25 | THE BASIC PROGRAM to be analyzed must be present in a textual form. | |
27 | THE BASIC PROGRAM to be analyzed must be present in a textual form. | |
26 | 28 | Some emulators allow such text to be pasted in, to simulate entering it |
27 | 29 | at the 8-bit computer's keyboard; other tools are available to convert a |
28 | 30 | tokenized BASIC program to a textual form and back. `yucca` handles |
49 | 51 | Python's `fileinput` module is used, so the BASIC source can also be piped |
50 | 52 | into `yucca`, and so forth. |
51 | 53 | |
52 | By default, the program is checked that the target of each jump is an | |
54 | By default, `yucca` checks that the target of each jump in the program is an | |
53 | 55 | existing line number. This includes any jumps that may occur in immediate |
54 | 56 | mode commands (i.e. commands with no line number) given in the text |
55 | 57 | file. If this check fails, further transformations may not be performed on |
86 | 88 | |
87 | 89 | * Show errors in the order they occur in the program. |
88 | 90 | * Handle duplicate and deleted lines (line number then nothing.) |
91 | * Support `GO TO` form of `GOTO` found in some BASICs. | |
89 | 92 | |
90 | 93 | Plans |
91 | 94 | ----- |
92 | 95 | |
93 | 96 | `yucca` could be easily extended to warn about "code smells" such as a |
94 | redundant `GOTO` to the next line, a line conaining another `GOTO`, and | |
97 | redundant `GOTO` to the next line, a line containing another `GOTO`, and | |
95 | 98 | so forth. |
96 | 99 | |
97 | 100 | `yucca` can dump the input program with (as far as I can tell) total |