Handbook
Glossary
apply-non-memo-rule ( r p -- ast )
Vocabulary
peg
.
private
Inputs
r
an
object
p
an
object
Outputs
ast
an
object
Definition
USING:
accessors
kernel
namespaces
peg
;
IN:
peg.private
::
apply-non-memo-rule
( r p -- ast )
fail
r
rule-id
f
lrstack
get
left-recursion
boa
:>
lr lr
lrstack
set
lr p
memo-entry
boa
dup
p r
rule-id
set-memo
:>
m r
eval-rule
:>
ans
lrstack
get
next>>
lrstack
set
pos
get
m
pos<<
lr
head>>
[
m
ans>>
left-recursion?
[
ans lr
seed<<
r p m
lr-answer
]
[
ans
]
if
]
[
ans m
ans<<
ans
]
if
;
inline