Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #3115
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Carlos <carlos@cvkm.cz> |
| Newsgroups | comp.lang.postscript |
| Subject | Re: Parser combinators |
| Date | Tue, 13 Jun 2017 07:40:59 +0200 |
| Organization | A noiseless patient Spider |
| Lines | 44 |
| Message-ID | <20170613074059.02058fe1@samara.DOMA> (permalink) |
| References | <8ebd95de-c888-458c-9597-9418988a940a@googlegroups.com> <e30c88b0-d059-464b-84bc-a30206c163fd@googlegroups.com> <eaa60376-161d-4a80-9b8f-9d2c431bd757@googlegroups.com> <91f043e3-caba-424c-841e-45da1905644d@googlegroups.com> <5a83d009-e230-4662-a037-25df709a13fa@googlegroups.com> <bf96c8d8-fba3-4598-8ff4-c77b33aa4a51@googlegroups.com> <3e0df99a-2bbe-4f32-9f7c-61492432b623@googlegroups.com> <8c08b559-58ab-4546-b480-f3a44ff914fa@googlegroups.com> <87cb3ae9-2580-45af-b6a2-38f7cecd533c@googlegroups.com> <f27c0490-4a15-4a50-9d2b-40ab28664e5e@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=US-ASCII |
| Content-Transfer-Encoding | 7bit |
| Injection-Info | mx02.eternal-september.org; posting-host="b2e2331b3a2131af1eeac4df58726a5b"; logging-data="8684"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18+69Dj0dmYqGd1eqoZuqljo0QtkhFzDSw=" |
| X-Newsreader | Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) |
| Cancel-Lock | sha1:Q3VF3gcJjMAkNwVb03eV/NfMrCI= |
| Xref | csiph.com comp.lang.postscript:3115 |
Show key headers only | View raw
[luser droog <luser.droog@gmail.com>, 2017-06-12 21:19] > On Sunday, June 11, 2017 at 1:36:15 AM UTC-5, luser droog wrote: > > I've got a better one now. The idea is it's a sequence. In my > > builder notation, > > > > [ x ] > > > > where x is whatever, the input parser to this combinator. > > This is the zero-or-more quantifier, so there may be matching > > input but if not, the matcher still succeeds. > > > > << [ x ] true >> > > > > Then we stitch this into a loop by inserting the whole matcher > > into the inner sequence. > > > > y = <<[ x y ] true>> > > > > And it works! > > > > It came up in the comp.lang.c thread that this is not the usual > behavior of BNF quantifiers. There's no backtracking so a greedy > quantifier with this program is also "possessive". So with > something like > > (x) term some > (xy) term alt > > which corresponds to the regex > > x+xy > > the 'x+' consumes all 'x's that may be present, and the 'xy' part > will never match. > > I may not be able to fix this quickly or easily. Need to rethink > the whole deal. According to https://qntm.org/combinators shouldn't "x+" return a set of all matches? --
Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Parser combinators luser droog <luser.droog@gmail.com> - 2017-05-28 21:22 -0700
Re: Parser combinators luser droog <luser.droog@gmail.com> - 2017-06-03 15:15 -0700
Re: Parser combinators luser droog <luser.droog@gmail.com> - 2017-06-04 11:13 -0700
Re: Parser combinators luser droog <luser.droog@gmail.com> - 2017-06-04 18:57 -0700
Re: Parser combinators luser droog <luser.droog@gmail.com> - 2017-06-04 19:39 -0700
Re: Parser combinators luser droog <luser.droog@gmail.com> - 2017-06-06 23:38 -0700
Re: Parser combinators luser droog <luser.droog@gmail.com> - 2017-06-08 22:18 -0700
Re: Parser combinators luser droog <luser.droog@gmail.com> - 2017-06-09 14:54 -0700
Re: Parser combinators luser droog <luser.droog@gmail.com> - 2017-06-10 23:36 -0700
Re: Parser combinators luser droog <luser.droog@gmail.com> - 2017-06-12 21:19 -0700
Re: Parser combinators Carlos <carlos@cvkm.cz> - 2017-06-13 07:40 +0200
Re: Parser combinators luser droog <luser.droog@gmail.com> - 2017-06-13 01:53 -0700
Re: Parser combinators luser droog <luser.droog@gmail.com> - 2017-06-13 03:48 -0700
Re: Parser combinators luser droog <luser.droog@gmail.com> - 2017-06-13 04:22 -0700
Re: Parser combinators luser droog <luser.droog@gmail.com> - 2017-06-13 23:28 -0700
Re: Parser combinators Carlos <carlos@cvkm.cz> - 2017-06-14 21:52 +0200
Re: Parser combinators luser droog <luser.droog@gmail.com> - 2017-06-15 13:36 -0700
csiph-web