PreviousUpNext

14.4.57  Parser_Combinator

The standard library Parser_Combinator api defines access to parser combinators over readers.

The Parser_Combinator api is implemented by the parser_combinator package.

The Parser_Combinator api source code is in src/lib/src/parser-combinator.api.

The above information is manually maintained and may contain errors.

api {    Parser (X, Y) = number_string::Reader((Char, Y) ) -> number_string::Reader((X, Y) );
    result : X -> Parser((X, Y) );
    failure : Parser((X, Y) );
    wrap : (Parser((X, Z) ) , (X -> Y)) -> Parser((Y, Z) );
    seq : (Parser((X, Z) ) , Parser((Y, Z) )) -> Parser(((X , Y), Z) );
    seq_with : ((X , Y) -> Z)
               -> (Parser((X, A) ) , Parser((Y, A) )) -> Parser((Z, A) );
    bind : (Parser((X, Z) ) , (X -> Parser((Y, Z) ))) -> Parser((Y, Z) );
    eat_char : (Char -> Bool) -> Parser((Char, X) );
    char : Char -> Parser((Char, X) );
    string : String -> Parser((String, X) );
    skip_before : (Char -> Bool) -> Parser((X, Y) ) -> Parser((X, Y) );
    or_op : (Parser((X, Y) ) , Parser((X, Y) )) -> Parser((X, Y) );
    or' : List(Parser((X, Y) ) ) -> Parser((X, Y) );
    zero_or_more : Parser((X, Y) ) -> Parser((List(X ), Y) );
    one_or_more : Parser((X, Y) ) -> Parser((List(X ), Y) );
    option : Parser((X, Y) ) -> Parser((Null_Or(X ), Y) );
    join : Parser((Null_Or(X ), Y) ) -> Parser((X, Y) );
    token : (Char -> Bool) -> Parser((String, X) );
};


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext