Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #51476
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: RfD Recognizer, 3rd version |
| Date | 2016-09-30 12:34 +0000 |
| Organization | Institut fuer Computersprachen, Technische Universitaet Wien |
| Message-ID | <2016Sep30.143444@mips.complang.tuwien.ac.at> (permalink) |
| References | (3 earlier) <7cf7cab7-4593-48e7-a088-218458d61003@googlegroups.com> <87fuol7ups.fsf@jester.gateway.pace.com> <b9qdnb_VYP2QrXfKnZ2dnUU7-TfNnZ2d@supernews.com> <bb4789a1-e1c7-49cd-be30-dd1fbb79ebd6@googlegroups.com> <a5bb5c67-eb73-4fdc-99ef-2d6a1a0d319b@googlegroups.com> |
JennyB <jennybrien@googlemail.com> writes:
>Perhaps there should be a way of associating a recognizer with the CURRENT =
>wordlist, by analogy with TO FORTH-RECOGNIZER, so that it is active when t=
>he wordlist is in the search order. That would produce the same effect as d=
>efining recognizers with prefixes: INTERPRET would check each wordlist and =
>its recognizer before moving on to the next. You could attach a recognizer =
>to an empty wordlist, as so have it wherever you needed it in the search or=
>der.
What would be the use case of such a scheme?
Among the use cases for recognizers that I know of, such an
association is not needed:
1) For typical literals, I don't see a particular need to associate
them with wordlists. You might want to have a literal for some data
that is only dealt with in a particular wordlist, then the association
would save you from having to remove both the wordlist from the search
order and the recognizer from the recognizer stack. But that is not a
common pattern for using recognizers yet, so maybe we should wait if
it establishes itself before thinking about adding such a feature.
2) For stuff like dot-parsers ("a.b") and TO-replacement ("->v"), the
lookup of a and v happens in the search order anyway, so no need to
associate these recognizers with wordlists.
- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2016: http://www.euroforth.org/ef16/
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: RfD Recognizer, 3rd version trans <transfire@gmail.com> - 2016-09-26 20:33 -0700
Re: RfD Recognizer, 3rd version Paul Rubin <no.email@nospam.invalid> - 2016-09-26 21:39 -0700
Re: RfD Recognizer, 3rd version tabcomputing@gmail.com - 2016-09-26 22:45 -0700
Re: RfD Recognizer, 3rd version Paul Rubin <no.email@nospam.invalid> - 2016-09-26 22:55 -0700
Re: RfD Recognizer, 3rd version Andrew Haley <andrew29@littlepinkcloud.invalid> - 2016-09-27 03:38 -0500
Re: RfD Recognizer, 3rd version anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-27 12:42 +0000
Re: RfD Recognizer, 3rd version Bernd Paysan <bernd@net2o.de> - 2016-09-27 13:23 +0000
Re: RfD Recognizer, 3rd version trans <transfire@gmail.com> - 2016-09-27 19:09 -0700
Re: RfD Recognizer, 3rd version JennyB <jennybrien@googlemail.com> - 2016-09-28 00:07 -0700
Re: RfD Recognizer, 3rd version anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-30 12:34 +0000
Re: RfD Recognizer, 3rd version albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-28 10:03 +0200
Re: RfD Recognizer, 3rd version ruvim.pinka@gmail.com - 2016-09-28 02:39 -0700
Re: RfD Recognizer, 3rd version albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-28 13:22 +0200
Re: RfD Recognizer, 3rd version anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-28 11:41 +0000
Re: RfD Recognizer, 3rd version albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-27 15:15 +0200
csiph-web