print.pegR: Prints the rules contained in the PEG

Description Usage Arguments Examples

View source: R/print_pegr.R

Description

Prints the rules contained in the PEG

Usage

1
2
## S3 method for class 'pegR'
print(parser)

Arguments

peg

parser produced by new.parser()

Examples

1
2
3
4
5
6
7
peg<-new.parser()
add_rule(peg, "NUM<-[0-9]+ (. [0-9] )?" )
peg<-set_description(peg, "NUM", "A Number")
peg<-add_rule(peg, "FT<-NUM ' '* ft")
peg<-set_description(peg, "FT"," measurement in feet")
# Now print the print the rules
print(peg)

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