Re: A minimal LL(1) parser generator ?

anton@mips.complang.tuwien.ac.at (Anton Ertl)
Thu, 02 Jan 2020 17:25:14 GMT

          From comp.compilers

Related articles
[2 earlier articles]
Re: A minimal LL(1) parser generator ? anton@mips.complang.tuwien.ac.at (2019-12-26)
Re: A minimal LL(1) parser generator ? carlglassberg@gmail.com (2019-12-29)
Re: A minimal LL(1) parser generator ? gaztoast@gmail.com (2019-12-31)
Re: A minimal LL(1) parser generator ? anton@mips.complang.tuwien.ac.at (2019-12-31)
Re: A minimal LL(1) parser generator ? carlglassberg@gmail.com (2020-01-01)
Re: A minimal LL(1) parser generator ? gaztoast@gmail.com (honey crisis) (2020-01-02)
Re: A minimal LL(1) parser generator ? anton@mips.complang.tuwien.ac.at (2020-01-02)
Re: A minimal LL(1) parser generator ? gneuner2@comcast.net (George Neuner) (2020-01-02)
Re: A minimal LL(1) parser generator ? rockbrentwood@gmail.com (2020-01-04)
Re: A minimal LL(1) parser generator ? gaztoast@gmail.com (honey crisis) (2020-01-05)
Re: A minimal LL(1) parser generator ? carlglassberg@gmail.com (2020-01-05)
Re: A minimal LL(1) parser generator ? carlglassberg@gmail.com (2020-01-05)
Re: A minimal LL(1) parser generator ? carlglassberg@gmail.com (2020-01-05)
[3 later articles]
| List of all articles for this month |

From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.compilers
Date: Thu, 02 Jan 2020 17:25:14 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
References: 19-12-016 19-12-030 19-12-032 19-12-040 20-01-001
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="11280"; mail-complaints-to="abuse@iecc.com"
Keywords: LL(1)
Posted-Date: 02 Jan 2020 13:21:52 EST

carlglassberg@gmail.com writes:
>On Tuesday, December 31, 2019 at 8:42:51 AM UTC-8, Anton Ertl wrote:
>> carlglassberg@gmail.com writes:
>> >Gray's meta notation uses a postix operator "&&" for "separator list".
>...
>> >If Gray: "a b &&" ---> EBNF: "a { b a }"
...
>> >"a b && c &&"
...
>Should that be ?
>a {b a} { c a {b a}}


Yes.


>Also, would
> a b && c d &&


I assume you mean a concatenation of "a b &&" and "c d &&". In Gray
syntax that would be


(( a b && c d && ))


>parse as:
> a { b a } c { d c }


Yes.


>or as:
> a { b a } c { d a { b a } c }


If you want that, you would write it as


(( a b && c )) d &&


&& is just a binary postfix operator.


- anton
--
M. Anton Ertl
anton@mips.complang.tuwien.ac.at
http://www.complang.tuwien.ac.at/anton/



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.