You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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()
The text was updated successfully, but these errors were encountered:
For certain grammars, it would be helpful if
PUSH()
,PEEK
, andPOP
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 usesPUSH()
andPOP
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 existingPosition::match_string()
The text was updated successfully, but these errors were encountered: