XMLTokenMaker.flex assumes ASCII element names, which is evident from its TagName production. This production is incorrect per XML spec, which allows far more characters to appear here.
For some reason, it does allow attribute names with a wider character range to be used in their names, evident from InTagIdentifier production.
This results in strange token sequences being produced for well formed XML, such as below.
<cszčšž:test xmlns:cszčšž="test:uri"/>
So, instead of a simple [delimiter ('<'), tag name ("cszčšž:test"), whitespace (" ")] sequence, we get [delimiter ('<'), tag name ("csz"), attribute name ("čšž:test"), whitespace (" ")] for the above element (up to that first namespace attribute).
Note: apparently GitHub's own lexer gets this wrong, but any compliant XML validator would lex the above example without issues.
XMLTokenMaker.flex should be revised to more closely resemble the XML spec:
I'm seeing this with an older version of RSTA, but since the flex file has not been changed much in between, the latest versions are bound to exhibit the same.
XMLTokenMaker.flex assumes ASCII element names, which is evident from its
TagName
production. This production is incorrect per XML spec, which allows far more characters to appear here.For some reason, it does allow attribute names with a wider character range to be used in their names, evident from
InTagIdentifier
production.This results in strange token sequences being produced for well formed XML, such as below.
So, instead of a simple
[delimiter ('<'), tag name ("cszčšž:test"), whitespace (" ")]
sequence, we get[delimiter ('<'), tag name ("csz"), attribute name ("čšž:test"), whitespace (" ")]
for the above element (up to that first namespace attribute).Note: apparently GitHub's own lexer gets this wrong, but any compliant XML validator would lex the above example without issues.
XMLTokenMaker.flex should be revised to more closely resemble the XML spec:
I'm seeing this with an older version of RSTA, but since the flex file has not been changed much in between, the latest versions are bound to exhibit the same.