mirror of
https://github.com/ikoHSE/sc-project.git
synced 2024-10-05 19:37:31 +03:00
Update README.md
This commit is contained in:
parent
300eab9e58
commit
03e5f2bb72
@ -68,18 +68,27 @@ If there are no characters to read from the input, then it should fail.
|
||||
anyToken :: Parser Char
|
||||
```
|
||||
|
||||
This combinator should read and return exactly one character from the input.
|
||||
If the character does not match the given character, then it should fail.
|
||||
|
||||
```haskell
|
||||
token :: Char -> Parser ()
|
||||
```
|
||||
|
||||
This combinator should read a string of charracters. If the string does not match the given string then fail.
|
||||
|
||||
```haskell
|
||||
tokens :: String -> Parser ()
|
||||
```
|
||||
|
||||
This character reads any number of consecutive characters, which stisfy the predicate. So this can never fail.
|
||||
|
||||
```haskell
|
||||
tokensWhile :: (Char -> Bool) -> Parser String
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
```haskell
|
||||
tokensWhile1 :: (Char -> Bool) -> Parser String
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user