delocalise apply-rule
parent
970f0055c2
commit
a4700e072e
|
@ -188,16 +188,12 @@ C: <head> peg-head
|
||||||
m ans>>
|
m ans>>
|
||||||
] if ;
|
] if ;
|
||||||
|
|
||||||
:: apply-rule ( r p -- ast )
|
: apply-rule ( r p -- ast )
|
||||||
[let* |
|
2dup recall [
|
||||||
m [ r p recall ]
|
nip apply-memo-rule
|
||||||
|
|
|
||||||
m [
|
|
||||||
r m apply-memo-rule
|
|
||||||
] [
|
] [
|
||||||
r p apply-non-memo-rule
|
apply-non-memo-rule
|
||||||
] if
|
] if* ; inline
|
||||||
] ; inline
|
|
||||||
|
|
||||||
: with-packrat ( input quot -- result )
|
: with-packrat ( input quot -- result )
|
||||||
#! Run the quotation with a packrat cache active.
|
#! Run the quotation with a packrat cache active.
|
||||||
|
|
Loading…
Reference in New Issue