Description Usage Arguments Note Examples
Plots a tree representing the result of applying a rule to
a text input, when that result was obtained with the record
parameter set to TRUE (Either by
set_record_status
or by as a parameter option
in apply_rule
)
1 2 3 4 |
res, |
a result obtained from parsing with record=TRUE |
shadow, |
when set to TRUE, renders a shadow for all nodes. The default is TRUE |
show, |
a vector consisting of any combination of the following:
|
The default value for show is "names".
1 2 3 4 5 6 7 8 9 10 11 12 | peg<-new.parser()
peg<-add_rule(peg, "A<-'a'")
peg<-add_rule(peg, "B<-'b'")
peg<-add_rule(peg, "D<-'d'")
peg<-add_rule(peg, "C<-'c'")
peg<-add_rule(peg,"ROOT<-A B C D")
apply_rule(peg,"ROOT","abcd", record=TRUE)->res
plot(res)
plot(res, show="args")
plot(res, show="vals")
plot(res, show=c("names","args"))
plot(res, show="all")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.