git.iko.soy/ikoHSE/sc-project
on master help sign in
Update README.md
commit03e5f2bb72f4d808d572343516c80f7f2402fad6 authoriko <ilyakooo0@gmail.com> dateMon 25 May 2020, 15:17 (6 years ago) parent300eab9
1 file changed+9
README.md+9
README.md+9
@@ -68,18 +68,27 @@ If there are no characters to read from the input, then it should fail.
6868anyToken :: Parser Char
6969```
7070
71+This combinator should read and return exactly one character from the input.
72+If the character does not match the given character, then it should fail.
73+
7174```haskell
7275token :: Char -> Parser ()
7376```
7477
78+This combinator should read a string of charracters. If the string does not match the given string then fail.
79+
7580```haskell
7681tokens :: String -> Parser ()
7782```
7883
84+This character reads any number of consecutive characters, which stisfy the predicate. So this can never fail.
85+
7986```haskell
8087tokensWhile :: (Char -> Bool) -> Parser String
8188```
8289
90+This character reads any number (but at least one) of consecutive characters, which stisfy the predicate. This can only fail if the first character does not satisfy the predicate.
91+
8392```haskell
8493tokensWhile1 :: (Char -> Bool) -> Parser String
8594```