W3C home > Mailing lists > Public > www-archive@w3.org > May 2003

ambiguity in the RelaxNG Compact Syntax EBNF?

From: Eric Prud'hommeaux <eric@w3.org>
Date: Wed, 7 May 2003 01:26:19 -0400
To: relax-ng-comment@lists.oasis-open.org
Cc: www-archive@w3.org
Message-ID: <20030507052619.GA3060@w3.org>

This subgrammer is derived from the RNG Compact Syntax EBNF [1]:
 topLevel ::=  decl* pattern
 decl ::=  "datatypes" identifierOrKeyword "=" literal
 pattern ::=  [datatypeName] datatypeValue
 param ::=  identifierOrKeyword "=" literal
 datatypeValue ::=  literal
 literal ::=  literalSegment+
 literalSegment ::=  '"' (Char - '"')* '"'
 datatypeName ::=  CName

Given the example decl and pattern:

datatypes myId = "declLitSeg" "declLitSetOrPtrnTypeValSeg" "PtrnTypeValSeg"

is "declLitSetOrPtrnTypeValSeg" the second literalSegment+ in
 decl ::=  "datatypes" identifierOrKeyword "=" literal
or the first literSegment+ in datatypeValue in
 pattern ::=  [datatypeName] datatypeValue
? I had heard that the grammer was not LARL(1), I think this prooves it
ambiguous even with backtracking.

'course it's late and I may have have screwed up. and I haven't examined
the formal stuff at the bottom.

[1] http://www.oasis-open.org/committees/relax-ng/compact-20020607.html#formal-syntax

office: +1.617.258.5741 NE43-344, MIT, Cambridge, MA 02144 USA
cell:   +1.857.222.5741

Feel free to forward this message to any list for any purpose other than
email address distribution.
Received on Wednesday, 7 May 2003 01:26:20 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:42:24 UTC