Use of sppp.awk
Jose E. Marchesi
jemarch@gnu.org
Thu Feb 12 20:54:22 GMT 2026
> Good morning, everyone,
>
> Seems that I'm actually coding a bit on transput... bit of a slow
> start.
Awesome! :)
> Working with sppp.awk I'm finding one thing that I don't quite like and I
> have a suggestion...
>
> Here is my declaration of mode SimplIn:
>
> mode {ℵ₀} SimplIn = union (
> {iter L {short short } {short } {} {long } {long long }}
> {L}int, {L}bits
> {reti {,}}
> ,
> {iter L {} {long } {long long }}
> {L}real, {L}compl
> {reti {,}}
> ,
> ref bool, ref char, ref [] char, ref string);
>
> What if instead we had "reti" take two arguments - the "separator" and the
> "terminator"? That would look like this:
>
> mode {ℵ₀} SimplIn = union (
> {iter L {short short } {short } {} {long } {long long }}
> {L}int, {L}bits
> {reti {,} {,}}
> {iter L {} {long } {long long }}
> {L}real, {L}compl
> {reti {,} {,}}
> ref bool, ref char, ref [] char, ref string);
>
> I propose this as I don't fancy those commas "hanging out in space" like
> that. Also this would make the generated code look more tidy.
>
> Here's another example, where van Vliet uses "xlx" to represent variable
> names incorporating a length indicator:
>
> int
> {iter xlx {short_short_} {short_} {} {long_} {long_long_}}
> {xlx}int_width
> {reti {,} {,}}
> {iter xlx {} {long_} {long_long_}}
> {xlx}real_width, {xlx}exp_width
> {reti {,} {;}}
>
> You see I've used comma as the first terminator and semicolon as the second
> above.
Makes sense, and I like that the generated code looks tidier. I am down
with the flu right now and once I recover I will have a lot of backlog
to attend to in $DAYJOB, but will see to implement this in sppp.awk at
some point in the near future. In the meanwhile, please use the
existing facilities, don't let me detain you :)
More information about the Algol68
mailing list