home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / text / sgml / 949 < prev    next >
Encoding:
Internet Message Format  |  1992-07-28  |  1.5 KB

  1. Path: sparky!uunet!ebt-inc!uhura!sjd
  2. From: sjd@uhura.uucp (Steve DeRose)
  3. Newsgroups: comp.text.sgml
  4. Subject: Re: Straw man proposal for overlapping markup
  5. Message-ID: <5444@ebt-inc.UUCP>
  6. Date: 28 Jul 92 13:17:26 GMT
  7. Sender: news@ebt-inc.UUCP
  8. Organization: EBT
  9. Lines: 22
  10. Originator: sjd@uhura
  11.  
  12. Darrell wrote in response to my overlapping-markup proposal:
  13.  
  14. >  Can the parser validate balancing tags for overlapping elements without 
  15. >  ceasing to be context free?  I don't think so.  (A sketch of a proof:
  16. >  imagine a pushdown automaton stacking the opening tags, and then having 
  17. >  to match up an end tag with some opening tag that's inside the stack).
  18.  
  19. True, this isn't context free (except that given a concrete syntax and
  20. quantity set, there is only a finite number of possible ID values, and
  21. so the problem is actually finite-state; but only *barely* finite).
  22.  
  23. However, ID/IDREF validation is also not context-free.  I don't see this
  24. as a problem, but as being like type-checking in programming languages;
  25. checking that the types of two variables in an assignment are compatible
  26. is not context free, but is left to the semantic part rather than
  27. the syntactic part of the language's grammer.  Readers unfamiliar with
  28. either linguistics or compiler construction would do well to read a bit
  29. of Chomsky to follow the current thread (not suggesting Darrell has such need!).
  30.  
  31. By the same token, it is fair to say that ID/IDREF validation is a place
  32. where SGML defines semantics, not syntax; when various posting have claimed
  33. SGML deals "purely" with syntax, they were incorrect.
  34.