Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Lieven Marchand Newsgroups: comp.compilers Subject: Re: Lisp syntax, A simpler way to tokenize and parse? Date: Mon, 27 Mar 2023 23:15:02 +0200 Organization: Compilers Central Sender: johnl@iecc.com Approved: comp.compilers@iecc.com Message-ID: <23-03-028@comp.compilers> References: <23-03-011@comp.compilers> <23-03-019@comp.compilers> <23-03-026@comp.compilers> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="9504"; mail-complaints-to="abuse@iecc.com" Keywords: Lisp, syntax Posted-Date: 27 Mar 2023 19:43:17 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:3430 Kaz Kylheku <864-117-4973@kylheku.com> writes: > Not every Lisp dialect has hash-dot read-time evaluation; that's > a feature of Common Lisp, disabled by setting/binding *read-eval* > to nil. I don't seem to recall that Scheme has it. I deliberately > kept it out of TXR Lisp. You also should wrap a use of read in a with-standard-io-syntax and even then there can still be surprises in CL. One implementation I used by default still also had the #, that has disappeared from the CLtL2 era of the standard. >> A good rule of thumb for production ready software is to define >> a grammar for valid input and provide a validating parser. > > Sure, if you want to waste your time defining grammars and > writing validating parsers. > > This is no longer done that much outside of the Lisp world. People use XML, > JSON, Yaml, ..., whose grammar they definitely didn't design or > implement, and validate the content/shape of the object that comes out. The Haskell and the Rust world have partially gone to applicative and monadic parsing. In such a paradigm it's not that hard to write grammars. -- Laat hulle almal sterf. Ek is tevrede om die wêreld te sien brand en die vallende konings te spot. Ek en my aasdier sal loop op die as van die verwoeste aarde.