Re: Schema, BNF and parsing
At 12:56 PM 3/4/2005, you wrote: >On Fri, 04 Mar 2005 12:49:51 -0500, Andrew Jeavons <apj@a...> >wrote: >>I have recently started working with a product which uses XML as the >>definition framework. We have a XML (QML we call it) which >>describes how to ask questions. So QML has elements like "text", "sub >>question" and so on. We develop scripts which are validated for syntactic >>validity and then passed to an execution engine. Of course the QML >>written has to conform to the schema defined. As far as I can currently >>work >>out we use a 2666 line XLST script to check QML. QML is not a complex >>"language", it reminds me of IBM MVS JCL - 5 verbs and 200 qualifiers >>for the verbs. >>2666 lines of anything to check this "language" seems extreme. I have >>written parsers using YACC in the past and it seems to me for numerous >>reasons using >>some sort of BNF/EBNF defined grammer and Bison/YACC type tools will be >>VASTLY more efficient and flexible. What I would like to ask is are >>there any >>tools anywhere to convert a schema to BNF/EBNF ? > >If you have an actual XML Schema for this language, why don't you >use a schema validator to validate it. It has got to be a lot >more efficient (and a lot less code to write) than running a giant >XSLT stylesheet. There are plenty of fine validators to choose >from, and the interop these days is not bad. Now I show my ignorance...can you point me to one ? :-) Another issue is that at some point we will have to start doing compiler type things like building symbol tables and various things related to control flow structures that have to go in the language (soon) so I'm not sure the validator would work...but thanks for the suggestion ! andrew >//Mary > > Andrew Jeavons www.andrewjeavons.com +1 513 871 8278
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format