-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Proposal
Often I find myself that some clauses are more easily parsed with a regex than with PikaParser clauses. The solution is to user a Scan
in a way similar to:
rules = Dict(
...,
:id => PikaParser.scan() do x
matched = match(r"^[a-z][a-zA-Z0-9_]*", x)
isnothing(matched) && return 0
length(matched.match)
end,
...,
)
It would be great if we could just pass the regex to scan
.
Unsolved issues
Only regex of the form r"^..."
should be accepted. If the ^
clause is not present, then the regex will search the pattern along all the input.
exaexa
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request