[phc-general] Structured Tags pre-processor

Conor McDermottroe lists at mcdermottroe.com
Thu Aug 10 19:53:56 CEST 2006


Satyam wrote:
> I have (or at least had) this funny idea that DTDs were on their way out
> and XSDs were the way of the future.  That future seems to be too
> distant so I'll fall back on DTDs.  Actually, I didn't plan to really
> follow all the XSD, there is much more information there that I could
> possibly check for anyway.  The nice thing about XSDs is that I had the
> loading of it solved. I am still looking for a DTD parser, found plenty
> in Java, one in c# (I guess that's the closest) one in perl, another in
> Lisp, a couple in languages I never heard about (besides Haskell, I mean
> ;-) )  Doing one in C++ from scratch .... well, it might be
> interesting.   By the way, talking about Lisp, can you imagine:

If you're crazy enough to write a DTD parser yourself, I can provide you
with a lexer specification and grammar that does it in Java with JFlex
and CUP. It should be less work to "port" those to flex and bison than
to start from scratch. Contact me off-list if you would like a copy.

I would, however, encourage you to *not* parse DTDs yourself and use
some tool that already does it. DTDs look quite simple but can get quite
horrid when you try to handle the full details.

-C



More information about the phc-general mailing list