Path: csiph.com!xmission!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: "Ev. Drikos" Newsgroups: comp.compilers Subject: Re: Languages with optional spaces Date: Thu, 12 Mar 2020 17:45:51 +0200 Organization: Aioe.org NNTP Server Lines: 25 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <20-03-012@comp.compilers> References: <20-02-015@comp.compilers> <20-02-016@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="54657"; mail-complaints-to="abuse@iecc.com" Keywords: lex Posted-Date: 13 Mar 2020 08:26:08 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Content-Language: en-US Xref: csiph.com comp.compilers:2483 On 21/02/2020 08:38, Jerry wrote: > class Lexer: > """ > Lexer emulates quirky Applesoft tokenizer as closely as possible. > > Thus, it diverges from what a normal lexer would do. In > particular, spaces are completely insignificant, except within > strings, except if it finds "AT" followed by a space and then an > "N" appears. That is parsed as "AT N", not "ATN". Fun?;) > """ Hello, Lacking any Python skills, I can't test the lexer but if this comment is accurate, then any spaces in literals should normally be ignored. The AppleSoft II manual in page 69 at www.classiccmp.org/cini/pdf/Apple/ implies that spaces are also important in literals after first position, similar comment in the Basic dialect supported by the Compukit UK101 at http://uk101.sourceforge.net/docs/index.html Rather than critique, it's a detail I'm interested in, see next question. Ev. Drikos