Ruby/Python: regex parser: group sequences of 'normal' characters

This commit is contained in:
Arthur Baars
2022-02-22 10:51:47 +01:00
parent 36e02ae9ac
commit 69ed121ecb
9 changed files with 166 additions and 231 deletions

View File

@@ -1,6 +1,6 @@
| 012345678 | first | 0 | 1 |
| 012345678 | last | 8 | 9 |
| (?!not-this)^[A-Z_]+$ | first | 3 | 4 |
| 012345678 | first | 0 | 9 |
| 012345678 | last | 0 | 9 |
| (?!not-this)^[A-Z_]+$ | first | 3 | 11 |
| (?!not-this)^[A-Z_]+$ | first | 12 | 13 |
| (?!not-this)^[A-Z_]+$ | first | 13 | 19 |
| (?!not-this)^[A-Z_]+$ | first | 13 | 20 |
@@ -27,9 +27,9 @@
| (?m)^(?!$) | last | 4 | 5 |
| (?m)^(?!$) | last | 8 | 9 |
| (\\033\|~{) | first | 1 | 5 |
| (\\033\|~{) | first | 6 | 7 |
| (\\033\|~{) | first | 6 | 8 |
| (\\033\|~{) | last | 1 | 5 |
| (\\033\|~{) | last | 7 | 8 |
| (\\033\|~{) | last | 6 | 8 |
| [\ufffd-\ufffd] | first | 0 | 5 |
| [\ufffd-\ufffd] | last | 0 | 5 |
| [\ufffd-\ufffd][\ufffd-\ufffd] | first | 0 | 5 |
@@ -52,8 +52,8 @@
| \\A[+-]?\\d+ | last | 7 | 9 |
| \\A[+-]?\\d+ | last | 7 | 10 |
| \\Afoo\\Z | first | 0 | 2 |
| \\Afoo\\Z | first | 2 | 3 |
| \\Afoo\\Z | last | 4 | 5 |
| \\Afoo\\Z | first | 2 | 5 |
| \\Afoo\\Z | last | 2 | 5 |
| \\Afoo\\Z | last | 5 | 7 |
| \\[(?P<txt>[^[]*)\\]\\((?P<uri>[^)]*) | first | 0 | 2 |
| \\[(?P<txt>[^[]*)\\]\\((?P<uri>[^)]*) | last | 28 | 32 |
@@ -86,24 +86,24 @@
| ^[A-Z_]+$(?<!not-this) | last | 1 | 7 |
| ^[A-Z_]+$(?<!not-this) | last | 1 | 8 |
| ^[A-Z_]+$(?<!not-this) | last | 8 | 9 |
| ^[A-Z_]+$(?<!not-this) | last | 20 | 21 |
| ^[A-Z_]+$(?<!not-this) | last | 13 | 21 |
| ax{01,3} | first | 0 | 1 |
| ax{01,3} | last | 1 | 2 |
| ax{01,3} | last | 1 | 8 |
| ax{01,3} | last | 7 | 8 |
| ax{01,3} | last | 3 | 8 |
| ax{3,} | first | 0 | 1 |
| ax{3,} | last | 1 | 2 |
| ax{3,} | last | 1 | 6 |
| ax{3,} | last | 5 | 6 |
| ax{3,} | last | 3 | 6 |
| ax{3} | first | 0 | 1 |
| ax{3} | last | 1 | 2 |
| ax{3} | last | 1 | 5 |
| ax{3} | last | 4 | 5 |
| ax{3} | last | 3 | 5 |
| ax{,3} | first | 0 | 1 |
| ax{,3} | last | 0 | 1 |
| ax{,3} | last | 1 | 2 |
| ax{,3} | last | 1 | 6 |
| ax{,3} | last | 5 | 6 |
| ax{,3} | last | 3 | 6 |
| x\| | first | 0 | 1 |
| x\| | last | 0 | 1 |
| x\|(?<!\\w)l | first | 0 | 1 |
@@ -111,5 +111,5 @@
| x\|(?<!\\w)l | first | 9 | 10 |
| x\|(?<!\\w)l | last | 0 | 1 |
| x\|(?<!\\w)l | last | 9 | 10 |
| x{Not qual} | first | 0 | 1 |
| x{Not qual} | last | 10 | 11 |
| x{Not qual} | first | 0 | 11 |
| x{Not qual} | last | 0 | 11 |