-- LR1 constructs: shift error S A B c d mul end defuncts: states labels atoms draw fovars: hidden axioms: states == [0] & labels == [end,S,A,B,c,d,mul] & atoms == [shift,error,S A,A B,B c,B d,A A mul B] & (0,A) -> 1 & (0,B) -> 2 & (0,c) -> 3 & (0,d) -> 4 & (1,mul) -> 5 & (5,B) -> 6 & (5,c) -> 3 & (5,d) -> 4 & (x `in` [c,d] ==> (shift,x) -> branch[0,5]) & (shift,mul) -> 1 & (S A,end) -> 1 & (x `in` [c,d] ==> (error,x) -> branch[1,2,3,4,6]) & (x `in` [mul,end] ==> (error,x) -> branch[0,5]) & (x `in` [mul,end] ==> (A B,x) -> 2) & (x `in` [mul,end] ==> (B c,x) -> 3) & (x `in` [mul,end] ==> (B d,x) -> 4) & (x `in` [mul,end] ==> (A A mul B,x) -> 6) & draw == fun(parseLR(hidden,x,y,z), tower(2,33,L)[red$text$input,tower(55,5)$map(text)$x, red$text$state stack,tower(55,5)$map(text)$y, red$text$syntax trees,shelf(55,11)$map(frame(0).tree)$z], x,tree$x) -- pict type = widgets terms: parseLR$c mul d <+> parseLR(x,[c,d,gg,vvvv,ss],[999,555555],[h(t,z,u),g,h(t,h,m,z,u)])