print.PEGResult: prints the final result of applying a rule to text input

Description Usage Note Examples

View source: R/print.PEGResult.R

Description

prints the final result of applying a rule to text input

Usage

1
2
## S3 method for class 'PEGResult'
print(res)

Note

for readability, quotes are left out when printing the list.

Examples

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

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