writeBNF {xegaBNF} | R Documentation |
Write BNF into text file.
Description
writeBNF()
writes a character string into a textfile.
Usage
writeBNF(g, fn = NULL, eol = "\n")
Arguments
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: |
Details
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.
Value
Invisible NULL.
See Also
Other File I/O:
newBNF()
,
readBNF()
Examples
g<-booleanGrammar()
fn<-tempfile()
writeBNF(g, fn)
g1<-readBNF(fn, eol="\n")
unlink(fn)
[Package xegaBNF version 1.0.0.0 Index]