Commit c36e173
Fix two issues in PCRE printing.
Fix unused local variable localflags: the idea of PR #249 was to use
this variable in the call to pp_iter, but this was accidentally still
using re_flags. This had no effect because we never need to group an
operand of |, as | has the lowest precedence of all operators, but we
may want to group operands of | in the future for simpler flag printing.
Fix printing of changed flags to ignore a change in global flags:
RE_ANCHORED applies to whole regexps only, not individual
subexpressions, and cannot be turned on or off. This cannot occur when
constructing ASTs from regexps, as the RE_ANCHORED flag will be the same
for all AST nodes, but can happen when constructing ASTs from FSMs when
additionally using the -b option (which should have no effect).1 parent b987814 commit c36e173
1 file changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
70 | 74 | | |
71 | 75 | | |
72 | 76 | | |
| |||
93 | 97 | | |
94 | 98 | | |
95 | 99 | | |
96 | | - | |
| 100 | + | |
97 | 101 | | |
98 | 102 | | |
99 | | - | |
| 103 | + | |
100 | 104 | | |
101 | 105 | | |
102 | 106 | | |
| |||
133 | 137 | | |
134 | 138 | | |
135 | 139 | | |
136 | | - | |
| 140 | + | |
137 | 141 | | |
138 | 142 | | |
139 | 143 | | |
| |||
0 commit comments