newBNF {xegaBNF} | R Documentation |
newBNF()
reads a text file and
returns a constant function which returns
the BNF as a character string.
newBNF(filename, eol = "\n")
filename |
A file name. |
eol |
End-of-line symbol(s). Default: |
The purpose of this function is to include examples of grammars in packages.
Returns a constant function which returns a BNF.
Other File I/O:
readBNF()
,
writeBNF()
g<-booleanGrammar()
fn<-tempfile()
writeBNF(g, fn)
g1<-newBNF(fn)
unlink(fn)