-
-
Notifications
You must be signed in to change notification settings - Fork 287
Description
For certain grammars, it would be helpful if PUSH(), PEEK, and POP all had case-insensitive variants. The HTML grammar used by the html_parser crate is one example; it does not properly parse sequences such as <BODY></body> and there is no "easy" fix -- this is partially a side-effect of the grammar being written to accept arbitrary tags (rather than limiting to only the well-defined HTML tags such as), so it does not explicitly list all of the valid tag tokens. Instead, it uses PUSH() and POP to find matching opening / closing tags.
I'm sure there are other cases where this would be handy. It doesn't look like a major effort either, as there is already a case-insensitive comparison method Position::match_insensitive() that could be used in place of the existing Position::match_string()