正在加载图片...
Handle Pruning A right-most derivation in reverse can be obtained by handle-pruning. S=Y0品Y1Y2…量Yn-1品Yn一0in input string 。 Start from yn find a handle An>Bn in Yn> and replace Bn in by An to get Yn-1. 。Then find a handle An-.l→pn-I in Yn-l and replace Bn-i in by An-i to get Yn-2 Repeat this,until we reach S. CS308 Compiler Theory 6Handle Pruning • A right-most derivation in reverse can be obtained by handle-pruning. S=γ0 ⇒ γ1 ⇒ γ2 ⇒ ... ⇒ γn-1 ⇒ γ rm rm rm rm rm n=ω input string • Start from γn, find a handle An→βn in γn, and replace βn in by An to get γn-1. • Then find a handle An-1→βn-1 in γn-1, and replace βn-1 in by An-1 to get γn-2. • Repeat this, until we reach S. CS308 Compiler Theory 6
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有