other versions
- jessie 0.4.4-6.2
Parse.or(3kaya) | Kaya module reference | Parse.or(3kaya) |
NAME¶
Parse::or - Create a new parser which is the combination of the arguments.SYNOPSIS¶
Parser<a> or( Parser<a> x, Parser<a> y )ARGUMENTS¶
x The first parser y The second parserDESCRIPTION¶
Create a new parser combining x and yThe new parser recognises a string which is recognised by either x or y.
-
decimal = or(Parse::digit,Parse::char@('.'));
// may be more clear in many situations to write this as
decimal = Parse::digit `or` Parse::char@('.');
AUTHORS¶
Kaya standard library by Edwin Brady, Chris Morris and others (kaya@kayalang.org). For further information see http://kayalang.org/LICENSE¶
The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation.August 2014 | Kaya |