[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
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
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.
Re: [xsl] library for parsing RTF
Subject: Re: [xsl] library for parsing RTF From: Andriy Gerasika <andriy.gerasika@xxxxxxxxx> Date: Wed, 30 Jun 2010 22:57:52 +0300 |
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.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] library for parsing RTF, Maurice Mengel | Thread | Re: [xsl] library for parsing RTF, Andriy Gerasika |
Re: [xsl] debugging document() call, Michael Kay | Date | Re: [xsl] library for parsing RTF, Andriy Gerasika |
Month |