正在加载图片...
The handle of the right sentential form: A string, together with The position in the right sentential form where it occurs and The production used to reduce it Determining the next handle is the main task of a shift-reduce parser. Parsing stack input Action n+nS shift + nS reduce E→n 234567 nS shift SE+ s shift SE+n reduce e→E+n SE S| reduce e→E SE accept• The handle of the right sentential form: – A string, together with – The position in the right sentential form where it occurs, and – The production used to reduce it. • Determining the next handle is the main task of a shift-reduce parser. 1 2 3 4 5 6 7 Parsing stack input Action $ $n $E $E+ $E+n $E $E’ n+n$ +n$ n$ $ $ $ $ shift reduce E→n shift shift reduce E→E + n reduce E’→E accept
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有