Use of sppp.awk
chris hermansen
clhermansen@gmail.com
Thu Feb 12 22:26:44 GMT 2026
Ugh the flu I had that a few weeks back. Felt like I was 80 years old for
a few days afterward.
On Thu, Feb 12, 2026 at 12:54 PM Jose E. Marchesi <jemarch@gnu.org> wrote:
>
> > 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 :)
>
I will thank you!
--
Chris Hermansen · clhermansen "at" gmail "dot" com
C'est ma façon de parler.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://gcc.gnu.org/pipermail/algol68/attachments/20260212/dc22a93d/attachment.htm>
More information about the Algol68
mailing list