Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connectionsPath: ...!news.alt.net!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: anton@mips.complang.tuwien.ac.at (Anton Ertl) Newsgroups: comp.lang.forth Subject: Re: Progressing Matthias Trute's recognizer proposal Date: Sun, 28 Jun 2020 15:30:40 GMT Organization: Institut fuer Computersprachen, Technische Universitaet Wien Lines: 69 Message-ID: <2020Jun28.173040@mips.complang.tuwien.ac.at> References: Injection-Info: reader02.eternal-september.org; posting-host="735b83a7b25e009a9ed4ad67971d8eae"; logging-data="15655"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/7A4r2MkGBgKSQUWIaDW8R" Cancel-Lock: sha1:rIOz2nVHdKr9p8jd9SqbuIw63+o= X-newsreader: xrn 10.00-beta-3 Bytes: 3246 Ruvim writes: >By the Standard, in the glossary entry for POSTPONE >https://forth-standard.org/standard/core/POSTPONE > > Skip leading space delimiters. Parse _name_ delimited by a space. > Find _name_. Append the compilation semantics of _name_ > to the current definition. > > >If the Recognizers word set is provided, this specification can be >updated to something like the following: > > Skip leading space delimiters. Parse _lexeme_ delimited by a space. > Recognize _lexeme_. Append the compilation semantics for _lexeme_ > to the current definition. Sounds ok (apart from the bikeshedded terminology). >It should append compilations semantics for *the same* _lexeme_ that was >parsed. > >Let _lexeme_ is "foo{". So it should append compilation semantics for >lexeme "foo{". Not for lexeme "foo{ bar }" or anything else. > > >The same for string literals. >A code like > POSTPONE "foo bar" >should be incorrect. It should not be exclusion from the general rule. That does not make sense. Your "recognize _lexeme_" invokes the string recognizer, which parses ' bar"'. It's also more useful. : foo POSTPONE "foo bar" POSTPONE type ; immediate : bar foo ; bar \ prints "foo bar" certainly works in Gforth. It also makes more sense to those who know the string recognizer. >If we want to postpone (compile) fragments of code, the right ways is >something like c{ ... }c construct that properly works for *any* code. > > : postpone-my-fancy-code > c{ "foo bar" ( c-addr u ) type }c > > c{ > foo{ bar } [defined] x [if] x [then] > }c > ; > > : foo [ c{ "test passed" }c ] type ; foo Gforth has ]] ... [[, and : foo ]] "foo bar" type [[ ; immediate : bar foo ; bar works exactly like the version using POSTPONE above. It would take extra code to make it work differently. - 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 2020: https://euro.theforth.net/2020