is golang(1.13)'s parser is a LL(1) parser?

119 views
Skip to first unread message

xie cui

unread,
Jul 17, 2020, 11:29:00 AM7/17/20
to golang-nuts
is golang(1.13)'s parser is a LL(1) parser?

Jan Mercl

unread,
Jul 17, 2020, 2:17:26 PM7/17/20
to xie cui, golang-nuts
Go grammar is not LL(1) AFAICT. It's very close to LALR(1), but with an ambiguity that has a fully defined resolution in the language specification.


On Fri, Jul 17, 2020, 17:28 xie cui <cuiw...@gmail.com> wrote:
is golang(1.13)'s parser is a LL(1) parser?

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/e76ff1b7-926f-4859-b358-2aa20df562ffn%40googlegroups.com.

Ian Lance Taylor

unread,
Jul 17, 2020, 2:18:36 PM7/17/20
to xie cui, golang-nuts
On Fri, Jul 17, 2020 at 8:28 AM xie cui <cuiw...@gmail.com> wrote:
>
> is golang(1.13)'s parser is a LL(1) parser?

The parser used by the gc compiler is a recursive descent parser
(https://golang.org/src/cmd/compile/internal/syntax/parser.go).

Ian
Reply all
Reply to author
Forward
0 new messages