Parse character class [::], collating symbol [..] and equivalence class
[==] within a bracket expresion, so that we can determine the start and
end of a bracket expression more accurately, thus determine the start
and end of a regular expression more accurately in the lexer.
Change the brackets variable from a counter to a tristate variable,
0 - not within a bracket expression
1 - within a bracket expression, but not within a character class
2 - within a bracket expression and character class
I appreciate the effort to repair this issue, but I don't like amount of code it adds for literally the pleasure of avoiding an escape. I will not continue with this, arnold's change has been reverted.
Parse character class [::], collating symbol [..] and equivalence class [==] within a bracket expresion, so that we can determine the start and end of a bracket expression more accurately, thus determine the start and end of a regular expression more accurately in the lexer.
Change the
brackets
variable from a counter to a tristate variable,This approach addresses the failing cases described in https://github.com/onetrueawk/awk/issues/135#issuecomment-979081899