Skip to content

Commit

Permalink
sSequence collect inner Iterators.flatten working around 1.5 llvm error
Browse files Browse the repository at this point in the history
  • Loading branch information
gkappler committed Aug 4, 2020
1 parent 366d42b commit 5c910d6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions docs/src/man/pcre-compliance-failed.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@


# Failed PCRE Tests
25 failed tests on 17 patterns.



## Skipped
12 patterns were skipped for the following reasons:

Expand Down Expand Up @@ -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


Expand Down
18 changes: 7 additions & 11 deletions docs/src/man/pcre-compliance.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
3 changes: 2 additions & 1 deletion src/CombinedParsers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
Expand Down

2 comments on commit 5c910d6

@gkappler
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/18982

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.1 -m "<description of version>" 5c910d67637b588c6cd5ccd7378d9f8322eef3f0
git push origin v0.1.1

Please sign in to comment.