Deutsch English Français Italiano |
<uvd6gv$2rra8$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Lawrence D'Oliveiro <ldo@nz.invalid> Newsgroups: comp.lang.misc Subject: Re: String-Based Macro Systems Date: Sat, 13 Apr 2024 05:51:27 -0000 (UTC) Organization: A noiseless patient Spider Lines: 26 Message-ID: <uvd6gv$2rra8$1@dont-email.me> References: <uvcqn3$2pju0$1@dont-email.me> <pan$5d552$88135a24$abac79c8$4af1fb67@invalid.invalid> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Sat, 13 Apr 2024 07:51:27 +0200 (CEST) Injection-Info: dont-email.me; posting-host="c07c9bb19a0975fd36cf4a2cbd5e0704"; logging-data="3009864"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/u43bK38q/ri7mHGowDtF/" User-Agent: Pan/0.155 (Kherson; fc5a80b8) Cancel-Lock: sha1:haLJASqUUECgCiCPAb2b9fC2Nvk= Bytes: 2197 On Sat, 13 Apr 2024 05:09:26 -0000 (UTC), Blue-Maned_Hawk wrote: > Whenever a system has a system to escape symbols, there are two ways to > go about it: either the symbol is magic by default, and the escape > makes it normal, or the symbol is normal by default, and the escape > makes it magic. And here’s another question: is magic iterative? Is text produced by a macro substitution automatically subject to further macro substitutions? This is true of Macrogenerator and m4, but perhaps this is a source of a lot of the problems with string-based macro systems. On the other hand, if you didn’t do this, then how would you implement the example I gave? §DEF,AORB,<§§Q;;>,§DEF,A,<A§UPDATE,Q,B;>;,§DEF,B,<B§UPDATE,Q,A;>;; If “§A;” expands literally to “A§UPDATE,Q,B;” with no further special interpretation of the embedded “§”, then how would you explicitly request invocation of the “UPDATE” function? The answer would be, the body of the macro would not directly be interpreted as literal text, but would have to consist of a sequence of explicit directives, like “insert literal text”, “insert expansion of a further macro” and so on.