Related articles |
---|
[12 earlier articles] |
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) |
Re: A minimal LL(1) parser generator ? anton@mips.complang.tuwien.ac.at (2020-01-22) |
Re: A minimal LL(1) parser generator ? anton@mips.complang.tuwien.ac.at (2020-01-22) |
Re: A minimal LL(1) parser generator ? carlglassberg@gmail.com (2020-01-23) |
Re: A minimal LL(1) parser generator ? anton@mips.complang.tuwien.ac.at (2020-01-25) |
Re: A minimal LL(1) parser generator ? FredJScipione@alum.RPI.edu (Fred J. Scipione) (2020-01-25) |
From: | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
Newsgroups: | comp.compilers |
Date: | Sat, 25 Jan 2020 18:25:50 GMT |
Organization: | Institut fuer Computersprachen, Technische Universitaet Wien |
References: | 19-12-016 19-12-030 19-12-032 19-12-040 20-01-001 20-01-003 20-01-008 20-01-025 20-01-028 |
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 |
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/
Return to the
comp.compilers page.
Search the
comp.compilers archives again.