Ahead use a parser to parse state, return the result and rollback whatever
The parser try p behaves like parser p, except that it pretends that it hasn't consumed any input when an error occurs.
The parser try p behaves like parser p, except that it pretends that it hasn't consumed any input when an error occurs.
This combinator is used whenever arbitrary look ahead is needed. Since it pretends that it hasn't consumed any input when p fails, the (<|>) combinator will try its second alternative even when the first parser failed while consuming input.
1.0.0
Between parse the open parser, and then sub parser, and then close parser, return sub parser result if success.
Between parse the open parser, and then sub parser, and then close parser, return sub parser result if success.
1.0.0
TODO
TODO
1.0.0
2020/06/12 19:03
If get one char equals the Ch prepared, return it.
If get one char equals the Ch prepared, return it.
1.0.0
If get a char match any of content, return it.
If get a char match any of content, return it.
1.0.0
Char None get next char, return it if none of content chars match.
Char None get next char, return it if none of content chars match.
1.0.0
TODO
TODO
1.0.0
2022/05/06 00:59
TODO
TODO
1.0.0
2022/05/06 00:59
Choice just the operator <|> in Haskell parsec
Choice just the operator <|> in Haskell parsec
1.0.0
Common State has int status and transaction market.
Common State has int status and transaction market. It can apply to Seq[T] or any serial collection.
1.0.0
count n p parses n occurrences of p.
count n p parses n occurrences of p. If n is smaller or equal to zero, the parser equals to return []. Returns a list of n values returned by p.
1.0.0
Crlf 即 haskell parsec 的 crlf 算子,匹配 \r\n .
Crlf 即 haskell parsec 的 crlf 算子,匹配 \r\n .
1.0.0
Decimal parser parse a decimal number with signed or no.
Decimal parser parse a decimal number with signed or no.
1.0.0
Digit parser return char if it is a digit
Digit parser return char if it is a digit
1.0.0
EndBy p sep parses zero or more occurrences of p, separated and ended by sep.
EndBy p sep parses zero or more occurrences of p, separated and ended by sep. Returns a seq of values returned by p.
1.0.0
EndBy1 p sep parses one or more occurrences of p, separated and ended by sep.
EndBy1 p sep parses one or more occurrences of p, separated and ended by sep. Returns a seq of values returned by p.
1.0.0
check next content if a \n char or \r\n
check next content if a \n char or \r\n
1.0.0
TODO
TODO
1.0.0
2023/10/22 00:43
Eof check state if get to end, It return nothing.
Eof check state if get to end, It return nothing. Eof just success or failed.
1.0.0
Eq return from state if get a item equals its.
Eq return from state if get a item equals its.
1.0.0
Fail do nothing but failed.
Fail do nothing but failed.
1.0.0
Find try and next util success or eof.
Find try and next util success or eof.
1.0.0
Int try to parse a long as long int from state and with signed.
Int try to parse a long as long int from state and with signed.
1.0.0
TODO
TODO
1.0.0
2020/07/23 14:18
TODO
TODO
1.0.0
2020/06/12 18:53
Many try to parse the parse more times, and collect all results into a Seq.
Many try to parse the parse more times, and collect all results into a Seq. Many could success 0 to any times.
Many try to parse the parse more times, and collect all results into a Seq.
Many try to parse the parse more times, and collect all results into a Seq. Many must success once at lest
1.0.0
TODO
TODO
1.0.0
2022/05/06 00:47
TODO
TODO
1.0.0
2022/05/06 00:47
manyTill p end applies parser p zero or more times until parser end succeeds.
manyTill p end applies parser p zero or more times until parser end succeeds. Returns the list of values returned by p. This parser can be used to scan comments.
1.0.0
TODO
TODO
1.0.0
2020/06/12 19:03
NCh return if get a char not equals prepared.
NCh return if get a char not equals prepared.
1.0.0
Ne success if get item not equals the prepared one.
Ne success if get item not equals the prepared one.
1.0.0
Newline match \n char
Newline match \n char
1.0.0
NoWhitespace success if the char is't any whitespace.
NoWhitespace success if the char is't any whitespace.
1.0.0
NoneOf success if get a item is none in prepared
NoneOf success if get a item is none in prepared
1.0.0
One just take state.next, It maybe throw eof exception.
One just take state.next, It maybe throw eof exception.
1.0.0
OneOf success if item equals one of prepared.
OneOf success if item equals one of prepared.
1.0.0
Opt x p tries to apply parser p.
Opt x p tries to apply parser p. If p fails without consuming input, it returns the value x, otherwise the value returned by p.
1.0.0
trait of Parsec parsers.
trait of Parsec parsers.
1.0.0
Parser throw ParsecException if failed.
Parser throw ParsecException if failed.
1.0.0
Return just lift a value to Parsec Parser.
Return just lift a value to Parsec Parser.
1.0.0
TODO
TODO
1.0.0
sepBy p sep parses zero or more occurrences of p, separated by sep.
sepBy p sep parses zero or more occurrences of p, separated by sep. Returns a list of values returned by p.
1.0.0
SepBy1 p sep parses one or more occurrences of p, separated by sep.
SepBy1 p sep parses one or more occurrences of p, separated by sep. Returns a list of values returned by p.
1.0.0
SepEndBy p sep parses zero or more occurrences of p, separated and optionally ended by sep, ie.
SepEndBy p sep parses zero or more occurrences of p, separated and optionally ended by sep, ie. haskell style statements. Returns a seq of values returned by p.
1.0.0
SepEndBy1 p sep parses one or more occurrences of p, separated and optionally ended by sep.
SepEndBy1 p sep parses one or more occurrences of p, separated and optionally ended by sep. Returns a list of values returned by p.
1.0.0
Skip p applies the parser p zero or more times, skipping its result.
Skip p applies the parser p zero or more times, skipping its result.
1.0.0
Skip1 p applies the parser p one or more times, skipping its result.
Skip1 p applies the parser p one or more times, skipping its result.
1.0.0
TODO
TODO
1.0.0
TODO
TODO
1.0.0
TODO
TODO
1.0.0
TODO
TODO
1.0.0
TODO
TODO
1.0.0
TODO
TODO
1.0.0
TODO
TODO
1.0.0
Txt State extends Common State trait.
Txt State extends Common State trait. It special for text content analyst. Txt state could mark a status point in which line.
1.0.0
UDecimal parser parse a decimal number without signed
UDecimal parser parse a decimal number without signed
1.0.0
Int try to parse a long as long int from state and without signed.
Int try to parse a long as long int from state and without signed.
1.0.0
TODO
TODO
1.0.0
2020/05/09 17:18
Atom parsers, like one, eof, return and failed, equals and not equals, etc.
Atom parsers, like one, eof, return and failed, equals and not equals, etc.
1.0.0
Parsec Combinators
Parsec Combinators
1.0.0
Functions Helper include parsers for Text
Functions Helper include parsers for Text
1.0.0
Ahead use a parser to parse state, return the result and rollback whatever
1.0.0