delocalise apply-memo-rule
parent
a4700e072e
commit
72dbac6a29
|
@ -179,14 +179,13 @@ C: <head> peg-head
|
||||||
] if
|
] if
|
||||||
] ; inline
|
] ; inline
|
||||||
|
|
||||||
:: apply-memo-rule ( r m -- ast )
|
: apply-memo-rule ( r m -- ast )
|
||||||
m pos>> pos set
|
[ ans>> ] [ pos>> ] bi pos set
|
||||||
m ans>> left-recursion? [
|
dup left-recursion? [
|
||||||
r m ans>> setup-lr
|
[ setup-lr ] keep seed>>
|
||||||
m ans>> seed>>
|
|
||||||
] [
|
] [
|
||||||
m ans>>
|
nip
|
||||||
] if ;
|
] if ; inline
|
||||||
|
|
||||||
: apply-rule ( r p -- ast )
|
: apply-rule ( r p -- ast )
|
||||||
2dup recall [
|
2dup recall [
|
||||||
|
|
Loading…
Reference in New Issue