summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/dfa.c2
-rw-r--r--lib/dfa.h6
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/dfa.c b/lib/dfa.c
index bd4c5f0582..4f8367af3f 100644
--- a/lib/dfa.c
+++ b/lib/dfa.c
@@ -1563,6 +1563,8 @@ lex (struct dfa *dfa)
}
dfawarn (msg);
}
+ FALLTHROUGH;
+ case ']': case '}':
normal_char:
dfa->lex.laststart = false;
/* For multibyte character sets, folding is done in atom. Always
diff --git a/lib/dfa.h b/lib/dfa.h
index 91ec1d809f..043f0e9717 100644
--- a/lib/dfa.h
+++ b/lib/dfa.h
@@ -79,7 +79,11 @@ enum
merely a warning. */
DFA_CONFUSING_BRACKETS_ERROR = 1 << 2,
- /* Warn about stray backslashes before ordinary characters. */
+ /* Warn about stray backslashes before ordinary characters other
+ than ] and } which are special because even though POSIX
+ says \] and \} have undefined interpretation, platforms
+ reliably ignore those stray backlashes and warning about them
+ would likely cause more trouble than it's worth. */
DFA_STRAY_BACKSLASH_WARN = 1 << 3,
/* Warn about * appearing out of context at the start of an