what type of parser is bison?

1.7k views Asked by At

what type of parser is bison. is it a LALR(1) or LR(1) ?

2

There are 2 answers

1
Linus Kleen On BEST ANSWER

Short answer: both.

By default, it produces LALR(1) parsers.

With the explicit option %glr-parser, it'll produce an LR(1) parser.

0
akim On

Yep, since version 2.5, Bison does support several types of LR parsers: LALR(1), canonical LR(1), and IELR(1). See the documentation about "lr.type", for instance here.