Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail From: Lars Brinkhoff Newsgroups: comp.lang.forth Subject: Re: Recognizers and DT-TOKEN: Organization: nocrew References: <2017May4.160014@mips.complang.tuwien.ac.at> <2017May8.134427@mips.complang.tuwien.ac.at> <1e139225-3735-458b-b8d2-fde65fed0bc9@googlegroups.com> <2017May8.193009@mips.complang.tuwien.ac.at> <768e8435-91e6-4ad9-9f80-2566a46d4c75@googlegroups.com> <86bmr0amdi.fsf@molnjunk.nocrew.org> Date: Wed, 10 May 2017 16:08:00 +0200 Message-ID: <8637ccajpb.fsf@molnjunk.nocrew.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:XCTjPNofE5YLM/GMKDWbNey82Ig= MIME-Version: 1.0 Content-Type: text/plain Lines: 21 NNTP-Posting-Host: 178.18.91.250 X-Trace: news.sunsite.dk DXC=WJ[]ESj41hQ5LoVIWDNeH\YSB=nbEKnk[:02ZWQ`i[jTnY:6X7^ZBNWI57e>YZ9SO[1HBfORCSCcSD5J_h8H;EFSI2Ic:1WDKBS X-Complaints-To: staff@sunsite.dk Xref: csiph.com comp.lang.forth:58984 Alex wrote: >> I have PARSED right before the dictionary search. >> And NUMBER right after a failed directionary search. > > Do PARSED and NUMBER point at the input buffer, or to a copy (for > example in a counted string from WORD, that's perhaps been case > adjusted to make FIND easier)? Interpreting a line looks much like this: : interpret ( -- ) begin parse-name dup while parsed repeat 2drop ; PARSE-NAME returns ( a u ) pointing into the input buffer. I don't accomodate FIND, because I don't have that in the kernel. I have FIND-NAME ( a u -- a u 0 | xt +-1 ). The default PARSED searches the dictionary and executes/compiles xts. If not found, NUMBER is called. Note: I'm not trying to argue much of anything. In particular, I'm not advocating for or against recognizers.