/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * SableCC version 2.1                                                     *
 * Copyright (C) 1997, 1998 Etienne Gagnon (gagnon@sable.mcgill.ca).  All  *
 * rights reserved.                                                        *
 *                                                                         *
 * This program is free software; you can redistribute it and/or modify    *
 * it under the terms of the GNU General Public License as published by    *
 * the Free Software Foundation; either version 2 of the License, or       *
 * (at your option) any later version.                                     *
 *                                                                         *
 * This program is distributed in the hope that it will be useful,         *
 * but WITHOUT ANY WARRANTY; without even the implied warranty of          *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           *
 * GNU General Public License for more details.                            *
 *                                                                         *
 * You should have received a copy of the GNU General Public License along *
 * with this program; if not, write to the Free Software Foundation, Inc., *
 * 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                 *
 *                                                                         *
 * The GNU General Public License does not permit incorporating this       *
 * program into proprietary programs. If you would like to obtain a        *
 * different license for a version that has not been modified in any way   *
 * from a version released by Etienne Gagnon, please write to:             *
 * Etienne Gagnon, 11348 Brunet, Montreal-Nord, Quebec, H1G 5G1, CANADA.   *
 * e-mail: gagnon@sable.mcgill.ca.                                         *
 *                                                                         *
 * To submit a bug, send a comment or get the latest news on SableCC and   *
 * other Sable Research Group projects, please visit the web site:         *
 * http://www.sable.mcgill.ca/                                             *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

// 0 : xxx.node
// 1 : xxx.analysis
// 2 : Txxx
Macro:VariableTextToken
package $0$;

import ca.mcgill.sable.util.*;
import $1$.*;

public final class $2$ extends Token
{
    public $2$(String text)
    {
        setText(text);
    }

    public $2$(String text, int line, int pos)
    {
        setText(text);
        setLine(line);
        setPos(pos);
    }

    public Object clone()
    {
      return new $2$(getText(), getLine(), getPos());
    }

    public void apply(Switch sw)
    {
        ((Analysis) sw).case$2$(this);
    }
}

$

// 0 : xxx.node
// 1 : xxx.analysis
// 2 : Txxx
// 3 : xxx
Macro:FixedTextToken
package $0$;

import ca.mcgill.sable.util.*;
import $1$.*;

public final class $2$ extends Token
{
    public $2$()
    {
        super.setText("$3$");
    }

    public $2$(int line, int pos)
    {
        super.setText("$3$");
        setLine(line);
        setPos(pos);
    }

    public Object clone()
    {
      return new $2$(getLine(), getPos());
    }

    public void apply(Switch sw)
    {
        ((Analysis) sw).case$2$(this);
    }

    public void setText(String text)
    {
        throw new RuntimeException("Cannot change TArrow text.");
    }
}

$

