writeBNF {xegaBNF} | R Documentation |
writeBNF()
writes a character string into a textfile.
writeBNF(g, fn = NULL, eol = "\n")
g |
A named list with $filename and $BNF as a character string. |
fn |
A file name. Default: NULL. |
eol |
End-of-line symbol(s). Default: |
The user writes the BNF to a text file which he edits. The newline symbols are inserted after each substitution variant and after each production rule to improve the readability of the grammar by the user.
Invisible NULL.
Other File I/O:
newBNF()
,
readBNF()
g<-booleanGrammar()
fn<-tempfile()
writeBNF(g, fn)
g1<-readBNF(fn, eol="\n")
unlink(fn)