/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * 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/                                             *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

Macro:Production
package $0$;

public abstract class $1$ extends Node
{
}

$

Macro:HiddenAlternative0
package $0$;

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

public final class $2$ extends $3$
{
    public $2$()
    {
    }

    public Object clone()
    {
        throw new RuntimeException("Unsupported Operation");
    }

    public void apply(Switch sw)
    {
        throw new RuntimeException("Switch not supported.");
    }

    void removeChild(Node child)
    {
    }

    void replaceChild(Node oldChild, Node newChild)
    {
    }

    public String toString()
    {
        return "";
    }
}

$

Macro:HiddenAlternative1
package $0$;

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

public final class $2$ extends $3$
{
    private $4$ _$5$_;

    public $2$()
    {
    }

    public $2$(
        $4$ _$5$_)
    {
        set$4$(_$5$_);
    }

    public Object clone()
    {
        throw new RuntimeException("Unsupported Operation");
    }

    public void apply(Switch sw)
    {
        throw new RuntimeException("Switch not supported.");
    }

    public $4$ get$4$()
    {
        return _$5$_;
    }

    public void set$4$($4$ node)
    {
        if(_$5$_ != null)
        {
            _$5$_.parent(null);
        }

        if(node != null)
        {
            if(node.parent() != null)
            {
                node.parent().removeChild(node);
            }

            node.parent(this);
        }

        _$5$_ = node;
    }

    void removeChild(Node child)
    {
        if(_$5$_ == child)
        {
            _$5$_ = null;
        }
    }

    void replaceChild(Node oldChild, Node newChild)
    {
    }

    public String toString()
    {
        return "" +
            toString(_$5$_);
    }
}

$

Macro:HiddenAlternative2
package $0$;

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

public final class $2$ extends $3$
{
    private $3$ _$6$_;
    private $4$ _$5$_;

    public $2$()
    {
    }

    public $2$(
        $3$ _$6$_,
        $4$ _$5$_)
    {
        set$3$(_$6$_);
        set$4$(_$5$_);
    }

    public Object clone()
    {
        throw new RuntimeException("Unsupported Operation");
    }

    public void apply(Switch sw)
    {
        throw new RuntimeException("Switch not supported.");
    }

    public $3$ get$3$()
    {
        return _$6$_;
    }

    public void set$3$($3$ node)
    {
        if(_$6$_ != null)
        {
            _$6$_.parent(null);
        }

        if(node != null)
        {
            if(node.parent() != null)
            {
                node.parent().removeChild(node);
            }

            node.parent(this);
        }

        _$6$_ = node;
    }

    public $4$ get$4$()
    {
        return _$5$_;
    }

    public void set$4$($4$ node)
    {
        if(_$5$_ != null)
        {
            _$5$_.parent(null);
        }

        if(node != null)
        {
            if(node.parent() != null)
            {
                node.parent().removeChild(node);
            }

            node.parent(this);
        }

        _$5$_ = node;
    }

    void removeChild(Node child)
    {
        if(_$6$_ == child)
        {
            _$6$_ = null;
        }

        if(_$5$_ == child)
        {
            _$5$_ = null;
        }
    }

    void replaceChild(Node oldChild, Node newChild)
    {
    }

    public String toString()
    {
        return "" +
            toString(_$6$_) +
            toString(_$5$_);
    }
}

$

