Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
什么类型的解析器是野牛。是 LALR(1) 还是 LR(1) ?
简短的回答:两者。
默认情况下,它生成 LALR(1) 解析器。
使用显式选项%glr-parser,它将生成一个 LR(1) 解析器。
%glr-parser
是的,从 2.5 版开始,Bison 确实支持多种类型的 LR 解析器:LALR(1)、canonical LR(1) 和 IELR(1)。请参阅有关“lr.type”的文档,例如此处。