SRFI 200: Pattern Matching Arthur A. Gleckler (26 Jun 2020 06:04 UTC)
Re: SRFI 200: Pattern Matching John Cowan (26 Jun 2020 21:12 UTC)
Re: SRFI 200: Pattern Matching Marc Nieper-Wißkirchen (26 Jun 2020 21:39 UTC)
Re: SRFI 200: Pattern Matching Panicz Maciej Godek (26 Jun 2020 22:41 UTC)
Re: SRFI 200: Pattern Matching Alex Shinn (26 Jun 2020 22:56 UTC)
Re: SRFI 200: Pattern Matching Panicz Maciej Godek (26 Jun 2020 23:02 UTC)
Re: SRFI 200: Pattern Matching Panicz Maciej Godek (26 Jun 2020 23:12 UTC)
Re: SRFI 200: Pattern Matching Panicz Maciej Godek (27 Jun 2020 00:11 UTC)
Re: SRFI 200: Pattern Matching Arthur A. Gleckler (27 Jun 2020 01:12 UTC)
Re: SRFI 200: Pattern Matching Marc Nieper-Wißkirchen (27 Jun 2020 08:05 UTC)
Re: SRFI 200: Pattern Matching Panicz Maciej Godek (27 Jun 2020 18:06 UTC)

Re: SRFI 200: Pattern Matching Marc Nieper-Wißkirchen 27 Jun 2020 08:05 UTC

If you prefer clear and maintainable code for the reference
implementations, I would like to recommend my SRFI 148, which allows
writing complicated syntax-rule macros much more clearly. It has
`em-symbol?', `em-bound-identifier=?', and `em-free-identifier=?'.

Marc

Am Sa., 27. Juni 2020 um 01:13 Uhr schrieb Panicz Maciej Godek
<xxxxxx@gmail.com>:
>
>
>
> sob., 27 cze 2020 o 01:02 Panicz Maciej Godek <xxxxxx@gmail.com> napisał(a):
>>
>>
>>
>> sob., 27 cze 2020 o 00:56 Alex Shinn <xxxxxx@gmail.com> napisał(a):
>>>
>>> On Sat, Jun 27, 2020 at 7:41 AM Panicz Maciej Godek <xxxxxx@gmail.com> wrote:
>>>>
>>>>
>>>> I tried to analyze the implementation of Alex Shinn's code, but I didn't manage to figure out how he recognizes that a pattern variable is an identifier.
>>>
>>>
>>> It uses Oleg's trick.  See match-check-identifier.
>>>
>> I saw it. I just didn't get it ;)
>>
>
>
> OK, I get it now. The macro expands to a local macro definition (sym?). So if it is a literal (like a number or a boolean or a string), then the "successful" pattern will contain that literal, and the attempt to match it with "abracadabra" will fail.
>
> "One weird trick".
>