get_rule_stack: Returns the call stack when the stop level was exceeded

Description Usage Arguments Value Examples

View source: R/rule_stack.R

Description

Returns the call stack when the stop level was exceeded

Usage

1

Arguments

parser,

a peg parser produced by new.parser

Value

call stack, a data frame show the sequence of calls encounterd prior to the exceeding the stop level

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
peg<-new.parser()
set_rule_stack_limit(peg, 20)
peg<-add_rule(peg, "A<-B" )
peg<-add_rule(peg, "B<-C")
peg<-add_rule(peg, "C<-A") # A vicious circle of calls resulting in infinite recursion
apply_rule(peg, "A", "x") # will stop at 20
get_rule_stack(peg)

## End(Not run)

mslegrand/pegr documentation built on May 23, 2019, 7:53 a.m.