From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu Subject: Re: [9fans] OT: DTD to yacc spec? From: plan9@blueyonder.co.uk In-Reply-To: <151D589A-62F9-11D8-B491-000393CBA46C@mx6.ttcn.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Thu, 19 Feb 2004 17:08:12 +0000 Topicbox-Message-UUID: eed6655a-eacc-11e9-9e20-41e7f4b1d025 Apologies for keeping the off trackness. kazumi writes: > I've looked at several xml parsers and I found them all to > be too general. They want to be all-encompassing parsers > for any DTDs that are thrown at them. > > In my area of applications, however, systems exchange > XML files conforming to a particular DTD; once the DTD > is agreed upon, we need no generality. Instead we need > speed and space efficiency. > > I guess I am looking for a tool that can convert a DTD into > a good old yacc grammar spec (I would still need to provide > actions, though). Does anybody know of such a tool? Oh, how great it is to know that I'm not alone. Ever since I have been exposed to XML and its parsers have I wondered about their weirdness. They never looked like parsers to me, more like toolkits to help write a generic XML editor or display system. I would absolutely love to have a parser generator that takes a DTD or schema and produces a parser to read XML only for that one definition. All I have encountered so far are "validating" parsers that seem to make XML file interchange even harder, as the DTD or schema has to be provided from the outside. I guess this kind of thing is just a fallout from discussions that end up in "we have all these homegrown file formats for configuration, user preferences, application private data, ..., and it must be so much hassle keeping all of that coded up nicely; we need to clean this up pronto, and the only recognised way of doing it is by using XML; our life will become so much simpler, as there are so many tools out there to help with this." Sniff. Robby