Notice to GitKraken users: A vulnerability has been found in the SSH key generation of GitKraken versions 7.6.0 to 8.0.0 (https://www.gitkraken.com/blog/weak-ssh-key-fix). If you use GitKraken and have generated a SSH key using one of these versions, please remove it both from your local workstation and from your LRZ GitLab profile.

21.10.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 9507e47e authored by eckhart's avatar eckhart
Browse files

- XML-parser-example: added a few "required markers" to XML.ebnf

parent 2ae8204a
......@@ -54,7 +54,7 @@ ignoreSectContents = IgnoreChars {'<![' ignoreSectContents ']]>' IgnoreChars}
extParsedEnt = [TextDecl] content
TextDecl = '<?xml' [VersionInfo] EncodingDecl ~ '?>'
elementdecl = '<!ELEMENT' S Name S contentspec ~ '>'
elementdecl = '<!ELEMENT' §S Name ~ contentspec ~ '>'
contentspec = EMPTY | ANY | Mixed | children
EMPTY = 'EMPTY'
ANY = 'ANY'
......@@ -67,8 +67,8 @@ choice = '(' ~ { ~ '|' ~ cp }+ ~ ')'
cp = (Name | choice | seq) ['?' | '*' | '+']
seq = '(' ~ cp { ~ ',' ~ cp } ~ ')'
AttlistDecl = '<!ATTLIST' S Name { S AttDef } ~ '>'
AttDef = Name S AttType S DefaultDecl
AttlistDecl = '<!ATTLIST' §S Name { ~ AttDef } ~ '>'
AttDef = Name ~ §AttType S DefaultDecl
AttType = StringType | TokenizedType | EnumeratedType
StringType = 'CDATA'
TokenizedType = ID | IDREF | IDREFS | ENTITY | ENTITIES | NMTOKEN | NMTOKENS
......@@ -90,16 +90,16 @@ IMPLIED = '#IMPLIED'
FIXED = ['#FIXED' S] AttValue
EntityDecl = GEDecl | PEDecl
GEDecl = '<!ENTITY' S Name S EntityDef ~ '>'
PEDecl = '<!ENTITY' S '%' S Name S PEDef ~ '>'
GEDecl = '<!ENTITY' S Name §S EntityDef ~ '>'
PEDecl = '<!ENTITY' S '%' §S Name S PEDef ~ '>'
EntityDef = EntityValue | ExternalID [NDataDecl]
PEDef = EntityValue | ExternalID
NotationDecl = '<!NOTATION' S Name ~ (ExternalID | PublicID) ~ '>'
NotationDecl = '<!NOTATION' §S Name ~ (ExternalID | PublicID) ~ '>'
ExternalID = 'SYSTEM' S SystemLiteral
PublicID = 'PUBLIC' S PubidLiteral
NDataDecl = 'NData' S Name
ExternalID = 'SYSTEM' §S SystemLiteral
PublicID = 'PUBLIC' §S PubidLiteral
NDataDecl = 'NData' §S Name
#######################################################################
......@@ -108,14 +108,14 @@ NDataDecl = 'NData' S Name
#
#######################################################################
element = EmptyElemTag | STag content ETag
element = EmptyElemTag | STag §content ETag
STag = '<' TagName { ~ Attribute } ~ '>'
ETag = '</' ::TagName ~ '>'
ETag = '</' §::TagName ~ '>'
EmptyElemTag = '<' Name { ~ Attribute } ~ '/>'
TagName = Name
Attribute = Name ~ '=' ~ AttValue
Attribute = Name ~ §'=' ~ AttValue
content = [ CharData ]
{ (element | Reference | CDSect | PI | Comment)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment