/** * Translate a POSIX basic regular expression to the RegExp dialect. * * grep, sed and expr read basic expressions unless told otherwise, and RegExp * reads something close to an extended one, so handing a pattern straight over * inverts every operator in it. `a+b` looks for a literal plus to grep and for a * repeated `a` to RegExp, and both find something, which is why this went * unnoticed: the failure is a wrong answer, not an error. * * Every rule below is pinned against GNU grep 3.x rather than taken from a * specification, because the edge cases are where the two dialects differ most: * * - `+ ? | ( ) { }` are ordinary; `\+ \? \| \( \) \{ \}` are the operators (a * GNU extension for the first three). * - `*` is ordinary where nothing precedes it to repeat: at the start of the * pattern, and after `^`, `\(` or `\|`. `^*abc` matches a literal asterisk. * - `^` anchors only at those same starting positions, and `$` only at the end * or before `\)` / `\|`. `a^b` and `a$b` are three literal characters each. * - A bracket expression is copied out whole: everything inside it is already * ordinary in both dialects. * * @param pattern the expression as the user typed it */ export declare function breToRegExp(pattern: string): string; //# sourceMappingURL=bre.d.ts.map