Path: csiph.com!xmission!news.snarked.org!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: anton@mips.complang.tuwien.ac.at (Anton Ertl) Newsgroups: comp.compilers Subject: Re: A minimal LL(1) parser generator ? Date: Sat, 25 Jan 2020 18:25:50 GMT Organization: Institut fuer Computersprachen, Technische Universitaet Wien Lines: 42 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <20-01-029@comp.compilers> References: <19-12-016@comp.compilers> <19-12-030@comp.compilers> <19-12-032@comp.compilers> <19-12-040@comp.compilers> <20-01-001@comp.compilers> <20-01-003@comp.compilers> <20-01-008@comp.compilers> <20-01-025@comp.compilers> <20-01-028@comp.compilers> Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="82398"; mail-complaints-to="abuse@iecc.com" Keywords: LL(1) Posted-Date: 25 Jan 2020 14:05:55 EST 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:2437 carlglassberg@gmail.com writes: >Anton, I now see that, in Gray, the precedence of "&&" is higher than every other operator. Among the postfix operators, precedence is determined by the way they are written down. But yes, if you see (( a b || c d )) as having two infix operators, || and the empty operator, then you can write a precedence hierarchy: postfix empty || >So Gray EBNF: >a b && c d && e f && <- x Correctly written as (( a b && c d && e f && )) <- x >is equivalent to Wirth EBNF: > >x = a { b a } c { d c } e { f e } . Yes. >Likewise: > >a b && ? <- x a b && ?? <- x >is >x = [ a { b a } ] . Yes. - anton -- M. Anton Ertl anton@mips.complang.tuwien.ac.at http://www.complang.tuwien.ac.at/anton/