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.
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
Scanin a way similar to: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.