KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jfun > parsec > ParserEval


1 /*****************************************************************************
2  * Copyright (C) Zephyr Business Solutions Corp. All rights reserved. *
3  * ------------------------------------------------------------------------- *
4  * The software in this package is published under the terms of the BSD *
5  * style license a copy of which has been included with this distribution in *
6  * the LICENSE.txt file. *
7  *****************************************************************************/

8 /*
9  * Created on 2004-11-14
10  *
11  * Author Ben Yu
12  */

13 package jfun.parsec;
14
15 /**
16  * This is to provide laziness of a Parser.
17  * When mutual recursive dependency exists, it is mandatory to declare the depended parser to be lazy.
18  * use Parsers.lazy(new ParserEval(){
19  * public Parser eval(){return myparser();}
20  * });
21  * @author Ben Yu
22  *
23  * 2004-11-14
24  */

25 public interface ParserEval<R> extends java.io.Serializable JavaDoc{
26   /**
27    * do the evaluation.
28    * @return the evaluated Parser object.
29    */

30   Parser<R> eval();
31 }
32
Popular Tags