S = ABz. A = Ax | x. B = x | y. (0) S' = S# (1) A = ABz (2) A = x (3) A = Ax (4) B = x (5) B = y Tabelle aufstellen und "xyx" simulieren. 0 S' = .S# / sS1 S = .ABz / # sA2 A = .x / xy sx3 <--- A = .Ax / xy sA2 1 S' = S.# / acc # <--- 2 S = A.Bz / # sB4 A = A.x / xy sx5 <--- B = .x / z sx5 B = .y / z sy6 3 A = x. / xy r{xy}(2) <--- 4 S = AB.z / # sz7 <--- 5 A = Ax. / xy r{xy}(3) <--- B = x. / z rz(4) 6 B = y. / z rz(5) <--- 7 S = ABz. / # r#(1) <--- Komprimierte Tabelle x y z # xyz# 0,1 sr(2) acc 0:1000 2,4 s5 sr(5) sr(1) 1:0001 5 r(3) r(3) r(4) 2:1100 4:0010 5:1110 S A B SAB 0,2 s1 s2 s4 0:110 1:000 2:001 4:000 5:000 Simulation "xyx" (Originaltabelle) Keller Eingabe Aktion 0 xyx# s3 0 3 yx# r(2) 0 Ayx# s2 0 2 yx# s6 0 2 6 x# err Fluchtweg suchen von 0 2 6 -> Keller mit Wegweisern weitersimulieren, bei den Reduce immer sofort das nächste Shift ausführen weil das sicher nur ein NTS konsumiert, Anker sind alle (!) möglichen Symbole in dem momentanen Zustand, Wegweiser (TS) die unterwegs konsumiert werden sind Fluchtweg (Reduce konsumiert nichts!) Keller Eingabe Aktion Anker 0 2 6 z r(5) s4 0 2 4 z s7 {z} 0 2 4 7 # r(1) s1 0 1 # acc {#} Anker = {z, #}, Fluchtweg = z# -> TS von Input löschen bis ein Anker erreicht wird (x# => #) und TS vom Fluchtweg bis dieser Anker erreicht wird einfügen (# => z#) Wiederaufsatz mit z# Keller Eingabe Aktion 0 2 6 z# r(5) 0 2 Bz# s4 0 2 4 z# s7 0 2 4 7 # r(1) 0 S# s1 0 1 # acc