SVN
| Line | |
|---|
| 1 | <?php |
|---|
| 2 | /** |
|---|
| 3 | * @package PEG |
|---|
| 4 | * @author anatoo<anatoo@nequal.jp> |
|---|
| 5 | * @license http://www.opensource.org/licenses/mit-license.php MIT License |
|---|
| 6 | * @version $Id: Anything.php 655 2009-04-12 07:26:42Z anatoo $ |
|---|
| 7 | */ |
|---|
| 8 | |
|---|
| 9 | /** |
|---|
| 10 | * どのような文字にでもヒットするパーサ |
|---|
| 11 | * |
|---|
| 12 | */ |
|---|
| 13 | class PEG_Anything implements PEG_IParser |
|---|
| 14 | { |
|---|
| 15 | function __construct() { } |
|---|
| 16 | function parse(PEG_IContext $context) |
|---|
| 17 | { |
|---|
| 18 | if ($context->eos()) return PEG_Failure; |
|---|
| 19 | return $context->read(1); |
|---|
| 20 | } |
|---|
| 21 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.