The grammar uses / for a tag for extension items:
VendorExtensionItem :
/ VendorExtensionName
/ VendorExtensionName VlqList
InvalidItem :
InvalidTag
InvalidTag VlqList
InvalidTag :
Vlq but not B C D /
All the other defined tags happen to be 1-length VLQs (A, B, C ...)
An InvalidTag is also a VLQ.
This can be taken as an implication that tags are supposed to be VLQs.
/ is not a VLQ, since the digit has a continuation bit set, requiring a following digit. For example /B as a VLQ is 63 (unsigned).
As a vendor extension item it is names[1].
If the tag-space is supposed to be arbitrarily extendable, it would make sense if the tags were always VLQs.
The implication of a non-VLQ tag is that VLQs and tags need to be recognized separately — we can't pre-preemptively decode VLQs since we need context sensitivity to distinguish between / the tag and / the first digit of multi-digit VLQ.
I came across this issue as I was trying to write the character-level scanner as a state machine, but currently you can't do context-insensitive recognition of VLQs and then 'push' them to a recognizer.
The grammar uses
/for a tag for extension items:VendorExtensionItem :
/VendorExtensionName/VendorExtensionName VlqListInvalidItem :
InvalidTag
InvalidTag VlqList
InvalidTag :
Vlq but not
BCD/All the other defined tags happen to be 1-length VLQs (
A,B,C...)An InvalidTag is also a VLQ.
This can be taken as an implication that tags are supposed to be VLQs.
/is not a VLQ, since the digit has a continuation bit set, requiring a following digit. For example/Bas a VLQ is 63 (unsigned).As a vendor extension item it is names[1].
If the tag-space is supposed to be arbitrarily extendable, it would make sense if the tags were always VLQs.
The implication of a non-VLQ tag is that VLQs and tags need to be recognized separately — we can't pre-preemptively decode VLQs since we need context sensitivity to distinguish between
/the tag and/the first digit of multi-digit VLQ.I came across this issue as I was trying to write the character-level scanner as a state machine, but currently you can't do context-insensitive recognition of VLQs and then 'push' them to a recognizer.