Parse::or
Create a new parser which is the combination of the arguments.
- Provided by: kaya (Version: 0.4.4-6ubuntu3)
- Report a bug
Create a new parser which is the combination of the arguments.
Parser<a> or( Parser<a> x, Parser<a> y )
x The first parser
y The second parser
Create a new parser combining x and y
The new parser recognises a string which is recognised by either x or y.
As with Kaya's || operator, this uses short-circuit evaluation: if x parses the String successfully, y will not be used.
Kaya standard library by Edwin Brady, Chris Morris and others (kaya@kayalang.org). For further information see http://kayalang.org/
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.