This seems about as useful as a regex C compiler, that compiles
main() { printf ("Hello world!\n"); }
and _nothing_ else.
C is procedural language, RTF is markup language. I am pointing that BNF
is too heavy for markup languages, such as RTF, MIF, CSS, JSON --
parsing of that can be relatively easy performed w/ XSLT and regexps. At
least I find it more difficult to deal w/ YACC compared to XSLT and regexps.
For example, I have created simple JSON to XML parser in XSLT using
regular expressions:
http://www.gerixsoft.com/sites/gerixsoft.com/files/json2xml.zip
IMHO it is more simple compared to parser on top of BNF
Just because you can make an regex for _one instanace_ of a grammer
does not mean that you can (easily) use regexs to parse a generic
format. RTF is generic - there are MANY valid ways to say similiar
things in RTF.
This is semantics, not syntax.
General RTF syntax of curly braces and control tags prefixed w/ "\" is
always the same for all vendors. The fact that Apple uses its own RTF
control tags and Microsoft is using its own RTF control tags, does not
change the RTF {} and \ syntax.
RTF is very similar to HTML and CSS -- syntax is always the same for all
vendors, elements and semantics behind elements may be different. But it
is not a question of parser, and I doubt BNF parser will handle the
semantics.
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--