Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compact Syntax: primary ::= "empty" { <empty/> } | "empty" { <text/> } #15

Open
RavuAlHemio opened this issue Feb 3, 2025 · 1 comment

Comments

@RavuAlHemio
Copy link

Greetings,

I think I have found an erratum in the compact syntax spec (compact-20021121.html).

§ A.1 contains the following production primary:

primary returns Element ::=
"element" nameClass(isElem := true)x "{" patterny "}"
  { <element> x y </element> }
 | "attribute" nameClass(isElem := false)x "{" patterny "}"
  { <attribute> x y </attribute> }
 | "mixed" "{" patternx "}"
  { <mixed> x </mixed> }
 | "list" "{" patternx "}"
  { <list> x </list> }
 | datatypeNamex optParamsy
  { <data x > y </data> }
 | datatypeNamex datatypeValuey
  { <value x > y </value> }
 | datatypeValuex
  { <value> x </value> }
 | "empty"
  { <empty/> }
 | "notAllowed"
  { <notAllowed/> }
 | "empty"
  { <text/> }
 | refx
  { <ref name= x /> }
 | "parent" refx
  { <parentRef name= x /> }
 | "grammar" "{" grammarx "}"
  { <grammar> x </grammar> }
 | "external" anyURILiteralx optInherity
  { <externalRef href=mapSchemaRef(x) y /> }

Two alternatives match on the keyword "empty", one producing <empty/> and the other producing <text/>.

My assumption is that the one producing <text/> should be matching the keyword "text" instead.

@ndw
Copy link
Contributor

ndw commented Feb 3, 2025

Yes, I think that's right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants