Re: Do I need to use a validating parser?
----- Original Message ----- From: Joshua E. Smith <jesmith@k...> To: XML Developers' List <xml-dev@i...> Sent: 05/05/1999 12:54 Subject: re: Do I need to use a validating parser? > I really meant what I wrote. I'm assuming that most programmers will not > actually write in the markup language, but rather will use editors which > produce markup as their output. If you think about it, that's what's > already happening with tools like Access or Delphi (users work in an > editor, and for the most part, don't touch the code), and of course that's > almost the only way anyone can deal with HTML anymore. > What sort of editor do you imagine? If you are thinking of using an XML editor constrained by the DTD then I think that would be a very clumsy way of programming. > Now consider what happens to your favorite ALGOL-derived language (say, > Java) when you compile it. It gets formatted by YACC into a parse tree. > So represent the parse tree in XML to begin with, and get rid of the > compiler front end. I think you are getting confused with your compiler terminology. The only thing that I can see marking up your program using XML helping with is the lexing stage i.e. recognising the tokens. Using a DTD would help with some syntax validation but I'm sure there are rules that you would want to enforce that can't be expressed in the DTD. Also think about what sort of error messages you want to give back to the programmer and how well your proposed solution will handle that. > My language isn't anything like LISP or ALGOL, but I think this gets the > point across. It's pretty easy to write programming languages which are > XML-Conformant. You might be able to define a language easily but XML isn't going to help with the interpretation. At least using tools like yacc/lex, javac and antlr you can link the grammar to what you want to do with the language which aids maintenance. I agree with David, I don't think programming languages marked up using XML is a good way to go. I know people are doing it but it strikes me as a case of a man with a hammer thinking everything looks like a nail. Steve Oldmeadow Justice Systems Technologies xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1 To (un)subscribe, mailto:majordomo@i... the following message; (un)subscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
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