From: Taco Hoekwater <taco@elvenkind.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Off-topic: Struggles with LPEG grammar
Date: Mon, 21 Dec 2020 15:18:56 +0100 [thread overview]
Message-ID: <CCC06728-AF8C-43D0-B68E-5CC79E0FA97D@elvenkind.com> (raw)
In-Reply-To: <CALBOmsYmq6fE=t2xhy2OVxO+w+X65XgScV67S-nyVLwLujkn7Q@mail.gmail.com>
Hi,
Also good reading are the first sections in Roberto’s paper:
http://www.inf.puc-rio.br/~roberto/docs/peg.pdf
>
> In reality it just means that I was trying to add a new rule to solve
> the second part of the puzzle (hidden on the website until you solve
> the first part), which read something like
> 6: 3 | 3 6
> which would in theory be translated into something like
> r6 = lpeg.V"r3" + lpeg.V"r3" * lpeg.V"r6",
> if PEGs worked the way I imagined they worked, that is. Apparently they don't :)
Try this, blind guess:
r6 = lpeg.V"r3" * lpeg.V”r6” + lpeg.V"r3",
Best wishes,
Taco
Taco Hoekwater
Elvenkind BV
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2020-12-21 14:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-21 12:16 Mojca Miklavec
2020-12-21 12:46 ` Taco Hoekwater
2020-12-21 12:50 ` Taco Hoekwater
2020-12-21 13:08 ` Mojca Miklavec
2020-12-21 13:36 ` Taco Hoekwater
2020-12-21 13:47 ` luigi scarso
2020-12-21 14:10 ` Mojca Miklavec
2020-12-21 14:18 ` Taco Hoekwater [this message]
2020-12-21 14:44 ` Hans Hagen
2020-12-21 13:38 ` Arthur Reutenauer
2020-12-21 13:52 ` Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CCC06728-AF8C-43D0-B68E-5CC79E0FA97D@elvenkind.com \
--to=taco@elvenkind.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).