Description Usage Note Examples
View source: R/print.PEGResult.R
prints the final result of applying a rule to text input
1 2 | ## S3 method for class 'PEGResult'
print(res)
|
for readability, quotes are left out when printing the list.
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")->res
res #invokes print.PEGResult
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.