-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attoparsec parsers #19
Comments
I have a somewhat a need for |
@dashed What kind of need? The reason I have not yet implemented As for using |
I recently discovered |
@m4rw3r Do you know if there's a better way to do |
@dashed To properly make it it would require some additional methods on the internal trait for the bounded combinators. But there is an easy way by implementing a sink implementing |
@m4rw3r Thanks for the suggestion! I'll try to investigate this approach. |
Attoparsec has a lot of good parsers and combinators, would be a good idea to implement most if not all of them.
Data.Attoparsec.ByteString
Individual bytes
word8
->token
anyWord8
->any
notWord8
->not_token
satisfy
satisfyWith ->
satisfy_with
skipsatisfy
optimizes intoskip
.Lookahead
peekWord8
->peek
peek_next
Byte classes
inClass
notInClass
Efficient string handling
string
skipWhile ->
skip_while
takeWhile
optimizes intoskipWhile
for simpleInput
types like slices.take
scan
runScanner ->
run_scanner
takeWhile
->take_while
takeWhile1
->take_while1
takeTill
->take_till
Consume all remaining input
takeByteString
->take_remainder
Combinators
tryRedundant since Chomp backtracks automatically on combinators requiring backtracking.
<?>Redundant since
map_err
exists.choice
count
option
many
many1
manyTill ->
many_till
sepBy ->
sep_by
sepBy1 ->
sep_by1
skipMany
->skip_many
skipMany1 ->
skip_many1
eitherP ->
either
match ->
matched_by
State observation
endOfInput
->eof
Data.Attoparsec.ByteString.Char8
Special character parsers
ascii::digit
space
-> predicateascii::is_whitespace
Fast predicates
isDigit
->ascii::is_digit
isAlpha_ascii
->ascii::is_alpha
isSpace
->ascii::is_whitespace
isHorizontalSpace
->ascii::is_horizontal_space
isEndOfLine
->ascii::is_end_of_line
Efficient string handling
ascii::string_ci
ascii::skip_whitespace
Numeric parsers
decimal
->ascii::decimal
ascii::signed
ascii::float
double
double
Data.Attoparsec.Combinator
combinators::look_ahead
Data.Attoparsec.Text
ascii::string_ci
The text was updated successfully, but these errors were encountered: