W3C home > Mailing lists > Public > w3c-sgml-wg@w3.org > June 1997

Re: KISS (was: Parameter entity references in WF docs)

From: <lee@sq.com>
Date: Thu, 5 Jun 97 11:49:27 EDT
Message-Id: <9706051549.AA13635@sqrex.sq.com>
To: w3c-sgml-wg@w3.org
> It's been my experience that PEs are a lot more useful on the "right
> hand side" of a declaration than on the "left hand side" [...]
> Does this make any difference to ease of implementation?

The simplest way to implement them that I can see is to push the input
stack on %name; and to pop it on the end of the corresponding string.
This isn't exactly the SGML way.

Most macro processors I've seen do this either in a getchar() or a
gettoken() routine, depending on whether a macro is a token (as per
XML and C, for example) or not (as per troff, for example).

I therefore think that implementation would be eased if S were removed
from all productions and replaced by a set of tokenisation rules.
The input could then be considered as a token stream rather than as
a byte stream with delimiters -- that is to say, both views would be
equally conformant and correct.

I have previously offered to see if I could make this change to the
grammar, but have been waiting for it to settle down a bit more first.

People who have implemented parsers -- might that have been eaiser?
Do you agree?

Received on Thursday, 5 June 1997 11:49:46 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:25:10 UTC