new rc parser

137 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Russ Cox

ungelesen,
04.05.2020, 23:57:3404.05.20
an plan9port-dev
Hi all,

As an experiment, I have pushed to plan9port a new rc parser that resolves two long-time nagging issues:

1. Equal signs (=) are now allowed unquoted in command line arguments. 

2. Free carats are now inserted any time two word expressions are next to each other with no spaces, not just most of the time. For example, the Plan 9 printfont script contains a bug of the form:

    x=$x'abc'`{def}'ghi'

The bug is that an explicit carat is needed after the }. No longer.

I tested the change by checking every rc script I could find against the old and new parser; the printfont script mentioned above was the only affected script (and it's not in plan9port anyway).

You can compare the parser output on any particular script using:

    diff <{rc -Y -D script} <{rc -D script}

If you run into any problems, the old parser is still available using "rc -Y", but please file an issue so we can fix the new parser.

Best,
Russ

Mathieu Lonjaret

ungelesen,
05.05.2020, 04:21:1405.05.20
an Russ Cox, plan9port-dev
thanks, equal signs needing to be quoted in acme tags has always been
a minor annoyance indeed.
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "plan9port-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to plan9port-de...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/plan9port-dev/CADSkJJU%3DqQEL4KJLzQXhR3CwuJQmLdZY-EiBQpN5DzGGWbRPgw%40mail.gmail.com.

Jacob Vosmaer

ungelesen,
05.05.2020, 18:47:1805.05.20
an r...@swtch.com, plan9port-dev
Thanks! I enjoy working with Rc and I use it every day. But having to always quote '=' or consciously use flag syntax where I don't need it was awkward.

Op di 5 mei 2020 om 05:57 schreef Russ Cox <r...@swtch.com>:
--

Ethan Gardener

ungelesen,
07.05.2020, 06:50:4007.05.20
an plan9p...@googlegroups.com
I hardly use rc any more, but I'm still thinking these changes are very welcome. ;)
Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten