KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jfun > parsec > FromToken


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-12
10  *
11  * Author Ben Yu
12  */

13 package jfun.parsec;
14
15 /**
16  * maps a token object to an Object.
17  * <br>
18  * Implement your own FromToken when you have your own Token classes.
19  * <p> SourcePos -> Token -> a
20  * @author Ben Yu
21  *
22  * 2004-11-12
23  */

24 public interface FromToken<R> extends java.io.Serializable JavaDoc{
25   /**
26    * Transform a token to an Object.
27    * @param tok the token
28    * @return the transformed Object.
29    */

30   public R fromToken(final Tok tok);
31 }
32
Popular Tags