Module | RParsec::Parsers |
In: |
rparsec/parser.rb
|
This module provides all out-of-box parser implementations.
Whitespaces | = | " \t\r\n" | characters considered white space. |
A parser that makes sure that the given values don‘t match the current inputs. One input is consumed if it succeeds.
A parser that parses a chunk of text started with open and ended by close. nil is the result.
A lazy parser, when executed, calls the given block to get a parser object and delegate the call to this lazily instantiated parser.
A parser that maps current parser result to a new result using the given block.
Different from Parser#map, this method does not need to be combined with any Parser object. It is rather an independent Parser object that maps the current parser result.
A parser that maps current parser result to a new result using the given block. If the current parser result is an array, the array elements are expanded and then passed as parameters to the block.
Different from Parser#mapn, this method does not need to be combined with any Parser object. It is rather an independent Parser object that maps the current parser result.
parser1.mapn{|x,y|…} is equivalent to parser1 >> mapn{|x,y|…}
A parser that succeeds when the given predicate returns true (with the current input as the parameter). expected is the error message when pred returns false.