正在加载图片...
Shift-Reduce Parsers There are two main categories of shift-reduce parsers 1.Operator-Precedence Parser simple,but only a small class of grammars. CFG LR LALR 2.LR-Parsers SLR covers wide range of grammars. ·SLR-simple LR parser LR-most general LR parser LALR-intermediate LR parser(lookhead LR parser) SLR,LR and LALR work same,only their parsing tables are different. CS308 Compiler TheoryShift-Reduce Parsers • There are two main categories of shift-reduce parsers 1. Operator-Precedence Parser – simple, but only a small class of grammars. CFG LR 2. LR-Parsers SLR LALR – covers wide range of grammars. • SLR – simple LR parser • LR – most general LR parse r • LALR – intermediate LR parser (lookhead LR parser) SLR LR and LALR work same only their parsing tables are different CS308 Compiler Theory 11 – SLR, LR and LALR work same, only their parsing tables are different
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有