Path: csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: carlglassberg@gmail.com Newsgroups: comp.compilers Subject: Re: A minimal LL(1) parser generator ? Date: Sun, 29 Dec 2019 14:47:11 -0800 (PST) Organization: Compilers Central Lines: 43 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <19-12-032@comp.compilers> References: <19-12-016@comp.compilers> <19-12-030@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="7435"; mail-complaints-to="abuse@iecc.com" Keywords: LL(1), parse Posted-Date: 30 Dec 2019 11:29:38 EST X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com In-Reply-To: <19-12-030@comp.compilers> Xref: csiph.com comp.compilers:2413 Lightweight and interesting, this Gray parser-generator. Example: Gray's meta notation uses a postix operator "&&" for "separator list". "&&" seems particularly elegant and interesting: If Gray: "a b &&" ---> EBNF: "a { b a }" then I assume: "a b && c &&" ---> "a { b a } { c a }" and so on ... Further "a b && b && ..." ===> "a b &&" ??? Is my understanding correct? Carl ---- On Thursday, December 26, 2019 at 9:12:41 AM UTC-8, Anton Ertl wrote: > Andy writes: > >ANTLR has even LL(*) but is too complicated. I am searching maximal > >simple and elegant generator which generates function call like > >written by hand. > > Sounds like you want a generator that generates a recursive-descent > parser. A while ago I compared a number of parser generators > [ertl99ef], and among those that generate recursive-descent parsers > the shortest one by far was Gray > . Whether you > consider it simple and elegant is for you to decide. > > @InProceedings{ertl99ef, > author = {M. Anton Ertl}, > title = {Is {Forth} Code Compact? {A} Case Study}, > booktitle = {EuroForth'99 Conference Proceedings}, > year = {1999}, > address = {St. Petersburg, Russia}, > url = {http://www.complang.tuwien.ac.at/papers/ertl99ef.ps.gz},