diff --git a/Project.toml b/Project.toml index 59fd17d..d7972cf 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "CombinedParsers" uuid = "5ae71ed2-6f8a-4ed1-b94f-e14e8158f19e" authors = ["Gregor Kappler"] -version = "0.1.0" +version = "0.1.1" [deps] AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" @@ -18,7 +18,7 @@ InternedStrings = "0.7" Nullables = "1.0.0" TextParse = "0.9, 1.0.0" Tries = "0.1.4" -julia = "1" +julia = "1.3, 1.4, 1.5" [extras] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/docs/src/man/pcre-compliance-failed.md b/docs/src/man/pcre-compliance-failed.md index 704571f..b54506a 100644 --- a/docs/src/man/pcre-compliance-failed.md +++ b/docs/src/man/pcre-compliance-failed.md @@ -1,8 +1,10 @@ + # Failed PCRE Tests 25 failed tests on 17 patterns. + ## Skipped 12 patterns were skipped for the following reasons: @@ -125,6 +127,7 @@ parse(r"(|\1xxx)+", "xxx") (no 1173) skipped, because of very long compile time. The complex pattern parses PCRE regex syntax. + ## Failed tests diff --git a/docs/src/man/pcre-compliance.md b/docs/src/man/pcre-compliance.md index 58073a9..a995e5a 100644 --- a/docs/src/man/pcre-compliance.md +++ b/docs/src/man/pcre-compliance.md @@ -1,22 +1,18 @@ # Compliance with the PCRE test set !!! note PCRE features supported by `@re_str` - - Characters + - ✅ sequences, alternations (`|`), repetitions (`*`,`+`,`{n}`, `{min,}`, `{min,max}`), optional matches (`?`) - ✅ escaped characters and generic character types - ✅ character ranges (`[]`) - - Basics - - ✅ sequences, alternations (`|`), repetitions (`*`,`+`,`{n}`, `{min,}`, `{min,max}`), optional matches (`?`) - - ✅ lazy repetitions - - ✅ atomic groups - - ✅ options, internal and accross pattern - - ✅ comments - - Capturing - ✅ non-capturing groups - ✅ capturing groups, backreferences, subroutines (all by index, relative index and name) - - ✅ conditional expressions - - Assertions - - ✅ simple assertions (`\A`, `\z`, `\Z`, `\b`, `\B`, `^`, `$`,...) + - ✅ simple assertions (`\A`, `\z`, `\Z`, `\b`, `\B`, `^`, `$`) - ✅ lookaheads and lookbehinds + - ✅ atomic groups + - ✅ lazy repetitions + - ✅ conditional expressions + - ✅ internal and pattern options setting + - ✅ comments !!! warning PCRE functionality that is currently not supported: - ❌ Capture groups in lookbehinds. diff --git a/src/CombinedParsers.jl b/src/CombinedParsers.jl index 9ee2209..7ba09db 100644 --- a/src/CombinedParsers.jl +++ b/src/CombinedParsers.jl @@ -1522,7 +1522,8 @@ sSequence_(x::Sequence) = sSequence_(x.parts...) sSequence_(x::Always) = tuple() sSequence_() = tuple() sSequence_(x1) = tuple(parser(x1)) -sSequence_(x1,x...) = Iterators.flatten( ( sSequence_(x1), Iterators.flatten( ( sSequence_(e) for e in x ) ) ) ) +sSequence_(x1,x...) = + Iterators.flatten(tuple( sSequence_(x1), collect(Iterators.flatten( ( sSequence_(e) for e in x ) )))) """ sSequence(x...)