home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ralvm13.VNET.IBM.COM
- From: drmacro@ralvm13.VNET.IBM.COM
- Message-ID: <19921228.050635.862@almaden.ibm.com>
- Date: Mon, 28 Dec 92 07:54:28 EST
- Newsgroups: comp.text.sgml
- Subject: Re: Precedence of SGML Operators?
- Disclaimer: This posting represents the poster's views, not those of IBM
- News-Software: UReply 3.1
- References: <1802@igd.fhg.de>
- Lines: 38
-
- In <1802@igd.fhg.de> Hans Holger Rath writes:
- >Is the first element definition equivalent to
- >
- > <!ELEMENT x - - (z, ((a* | b)*)) > ???
-
- I'm assuming you meant:
- <!ELEMENT x - - (z, ((a* | b*))) > ???
-
- > _ _
- >
- >I don't think so and Mr. Martin Bryan in "SGML an Author's Guide", page 111 don't
- >think so, too.
- >
- >I always thought, that the occurence indicators ("?", "+", "*") have a higher
- >precedence than the group connectors ("|", ",", "&").
- >
- >What do the experts think about these problems?
- >
- >Thanks in advance,
- >
- --Holger
-
- I tried the test case with two different parsers (IBM SGML Translator
- release 2 and release 3) and both flagged the B element as out of
- context, which they should have. Even if the grouping operator did
- take precedence in (A* | B*), B is still invalid because the OR group
- itself is not repeating and thus only A or B can be specified
- (regardless of the repitition operators). Thus, if A is specified, B
- cannot be specified. This suggests that (A* | B*) is equivalent to
- ((A*) | (B*)), which they are. Both say "A repeated OR B repeated".
- The grouping around the individual tokens does not change the meaning.
-
- Eliot Kimber Internet: drmacro@ralvm13.vnet.ibm.com
- Dept E14/B500 IBMMAIL: USIB2DK9@IBMMAIL
- Network Programs Information Development Phone: 1-919-543-7091
- IBM Corporation
- Research Triangle Park, NC 27709
-
-