With regard to my current programming project, the XML parser in Mythryl, I’ve been rather stalled out as of late, partly for mundane reasons (it’s Christmas), but also because of this:
The markup declarations may be made up in whole or in part of the replacement text of parameter entities. The productions later in this specification for individual nonterminals (elementdecl, AttlistDecl, and so on) describe the declarations after all the parameter entities have been included.
The relevant productions:
[28]
doctypedecl ::= '<!DOCTYPE' S Name (S ExternalID)? S? ('[' intSubset ']' S?)? '>'
[28a]
DeclSep ::= PEReference | S
[28b]
intSubset ::= (markupdecl | DeclSep)*
[29]
markupdecl
::=elementdecl | AttlistDecl | EntityDecl | NotationDecl | PI | Comment
[30]
extSubset ::= TextDecl? extSubsetDecl
[31]
extSubsetDecl ::= ( markupdecl | conditionalSect | DeclSep)*
The XML BNF does not encompass this remark, so it’s something I’ll need to handle myself. The extSubset production will be handled via a callback function that can then build a new recursive descent parser that knows about parameter entity references and generate a new string with all the replacements accomplished. I have not made a decision about intSubset, or perhaps markupdecl – a solution is not readily apparent.
In other news, a new release of Mythryl occurred. I shan’t link to it because my attempt to compile it failed. Turns out Cynbe, the developer, didn’t notice some supporting third party libraries went through a major versioning while he was busy with development and chemotherapy. I tried to compile with the latest and failed. If I had lots of time, I could learn about the component in question (it has to do with OpenGL) and fix it up – but I haven’t that much time, nor interest (graphics has never been an interest of mine).