ambiguity in the RelaxNG Compact Syntax EBNF?

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.


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