Description Usage Arguments Examples
Prints 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
1 | tree(res)
|
res, |
a result obtained from parsing with record=TRUE |
1 2 3 4 5 6 7 8 | 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
tree(res)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.