KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > armedbear > lisp > ReaderMacroFunction


1 /*
2  * ReaderMacroFunction.java
3  *
4  * Copyright (C) 2004 Peter Graves
5  * $Id: ReaderMacroFunction.java,v 1.1 2004/03/11 19:00:11 piso Exp $
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20  */

21
22 package org.armedbear.lisp;
23
24 public abstract class ReaderMacroFunction extends Function
25 {
26     public ReaderMacroFunction(String JavaDoc name)
27     {
28         super(name);
29     }
30
31     public ReaderMacroFunction(String JavaDoc name, String JavaDoc arglist)
32     {
33         super(name, arglist);
34     }
35
36     public ReaderMacroFunction(String JavaDoc name, Package JavaDoc pkg)
37     {
38         super(name, pkg);
39     }
40
41     public ReaderMacroFunction(String JavaDoc name, Package JavaDoc pkg, boolean exported)
42     {
43         super(name, pkg, exported);
44     }
45
46     public ReaderMacroFunction(String JavaDoc name, Package JavaDoc pkg, boolean exported,
47                       String JavaDoc arglist)
48     {
49         super(name, pkg, exported, arglist);
50     }
51
52     public LispObject execute(LispObject first, LispObject second)
53         throws ConditionThrowable
54     {
55         Stream stream = inSynonymOf(first);
56         char c = LispCharacter.getValue(second);
57         return execute(stream, c);
58     }
59
60     public abstract LispObject execute(Stream stream, char c)
61         throws ConditionThrowable;
62 }
63
Popular Tags