package css
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=d402b78761349700da30c192ab9735a3
sha512=9f0ebbf61b37a4df23e3d88fec450ceb75c601b07ae5c52a133c803ba919266fa0cf257b72e43797741e1cd56d651b08a68d1be4ef1fd3fea32857989ff2ca9c
doc/css/Css/U/index.html
Module Css.USource
Utilities for parsing.
Parser failing with the given message where current position is added.
parse_error ctx e raises a T.Error with a parse error e and last position of ctx.
Util parsers
opt_ p returns None if p fails, else return Some r where r is the result of p.
take_char is a parser returning None is there is no more char, else accept any character c, Angstrom.advance by 1 char and returns Some c.
take_while_upto pred n accepts at most n characters or as long a pred returns true. Returns accepted characters as a string.
Same as take_while_upto but fails if no character is available.
Accept a comment.
ws ctx accepts any number of white spaces or comments.
Parser combinators
p1 &&& p2 returns a parser succeeding when p1 and p2 succeed, in any order.
p1 ||| p2 returns a parser accepting values for p1 or p2 or both.
alt_1_2 def1 p1 def2 p2 is the same as (|||) but returns the provided default values for each parser.
Predefined character parsers
All these parser accept a character after optional white spaces or comments.