正在加载图片...
a bottom-up parser has two possible actions(besidesaccept ): Shift a terminal from the front of the input to the top of the stack Reduce a string a at the top of the stack to a nonterminals, given the bnf choice A→→a a bottom-up parser is thus sometimes called a shift-reduce parser One further feature of bottom-up parsers is that, grammars are always augmented with a new start symbol s"→S• A bottom-up parser has two possible actions (besides "accept"): Shift a terminal from the front of the input to the top of the stack Reduce a string α at the top of the stack to a nonterminal A, given the BNF choice A→α • A bottom-up parser is thus sometimes called a shift-reduce parser • One further feature of bottom-up parsers is that, grammars are always augmented with a new start symbol S' → S
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有