/* This file is part of SableCC ( http://sablecc.org ).
 *
 * See the NOTICE file distributed with this work for copyright information.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.sablecc.sablecc.exception;

import org.sablecc.exception.*;

@SuppressWarnings("serial")
public abstract class CompilerException
        extends RuntimeException {

    protected CompilerException(
            String message) {

        super(message);

        if (message == null) {
            throw new InternalException("message may not be null");
        }
    }
/*
    public static CompilerException invalidInterval(
            TTwoDots twoDots,
            Token from,
            Token to) {

        return new CompilerException(
                new MInvalidInterval(twoDots.getLine() + "", twoDots.getPos()
                        + "", from.getText(), to.getText()).toString());
    }

    public static CompilerException undefinedReference(
            TIdentifier identifier) {

        return new CompilerException(new MUndefinedReference(
                identifier.getText(), identifier.getLine() + "",
                identifier.getPos() + "").toString());
    }

    public static CompilerException invalidReference(
            TIdentifier token) {

        return new CompilerException(new MInvalidReference(token.getText(),
                token.getLine() + "", token.getPos() + "").toString());
    }

    public static CompilerException cyclicReference(
            TIdentifier reference,
            TIdentifier context) {

        return new CompilerException(new MCyclicReference(reference.getText(),
                reference.getLine() + "", reference.getPos() + "",
                context.getText(), context.getLine() + "", context.getPos()
                        + "").toString());
    }

    public static CompilerException invalidPriority(
            TGt gt,
            MatchedToken matchedToken) {

        return new CompilerException(new MInvalidPriority(gt.getLine() + "", gt
                .getPos()
                + "", matchedToken.getName()).toString());
    }

    public static CompilerException conflictingPriorities(
            TGt gt,
            MatchedToken high,
            MatchedToken low,
            TGt prior_gt) {

        return new CompilerException(new MConflictingPriorities(gt.getLine()
                + "", gt.getPos() + "", high.getName(), low.getName(), prior_gt
                .getLine()
                + "", prior_gt.getPos() + "").toString());
    }

    public static CompilerException notAToken(
            Token token) {

        return new CompilerException(new MNotAToken(token.getLine() + "",
                token.getPos() + "", token.getText()).toString());
    }

    public static CompilerException lexerConflict(
            MatchedToken matchedToken1,
            MatchedToken matchedToken2) {

        return new CompilerException(new MLexerConflict(
                matchedToken1.getName(), matchedToken2.getName()).toString());
    }

    public static CompilerException parserUselessProduction(
            String name) {

        return new CompilerException(
                new MParserUselessProduction(name).toString());
    }

    public static CompilerException parserSpuriousPriority(
            TIdentifier identifier) {

        return new CompilerException(new MParserSpuriousPriority(
                identifier.getText(), "" + identifier.getLine(), ""
                        + identifier.getPos()).toString());
    }

    public static CompilerException alternativeNotRecursive(
            TIdentifier identifier) {

        return new CompilerException(new MAlternativeNotRecursive(
                identifier.getText(), "" + identifier.getLine(), ""
                        + identifier.getPos()).toString());
    }

    public static CompilerException recursionNotFollowedByToken(
            TIdentifier identifier) {

        return new CompilerException(new MRecursionNotFollowedByToken(
                identifier.getText(), "" + identifier.getLine(), ""
                        + identifier.getPos()).toString());
    }

    public static CompilerException notImplemented(
            Token token,
            String feature) {

        return new CompilerException(new MNotImplemented(feature,
                token.getLine() + "", token.getPos() + "").toString());
    }

    public static CompilerException outputError(
            String fileName,
            Throwable cause) {

        return new CompilerException(new MOutputError(fileName,
                cause.getMessage()).toString());
    }
*/
}

@@ -1077,4061 +1077,6 @@
   %7D%0A
-/*%0A    public static CompilerException invalidInterval(%0A            TTwoDots twoDots,%0A            Token from,%0A            Token to) %7B%0A%0A        return new CompilerException(%0A                new MInvalidInterval(twoDots.getLine() + %22%22, twoDots.getPos()%0A                        + %22%22, from.getText(), to.getText()).toString());%0A    %7D%0A%0A    public static CompilerException undefinedReference(%0A            TIdentifier identifier) %7B%0A%0A        return new CompilerException(new MUndefinedReference(%0A                identifier.getText(), identifier.getLine() + %22%22,%0A                identifier.getPos() + %22%22).toString());%0A    %7D%0A%0A    public static CompilerException invalidReference(%0A            TIdentifier token) %7B%0A%0A        return new CompilerException(new MInvalidReference(token.getText(),%0A                token.getLine() + %22%22, token.getPos() + %22%22).toString());%0A    %7D%0A%0A    public static CompilerException cyclicReference(%0A            TIdentifier reference,%0A            TIdentifier context) %7B%0A%0A        return new CompilerException(new MCyclicReference(reference.getText(),%0A                reference.getLine() + %22%22, reference.getPos() + %22%22,%0A                context.getText(), context.getLine() + %22%22, context.getPos()%0A                        + %22%22).toString());%0A    %7D%0A%0A    public static CompilerException invalidPriority(%0A            TGt gt,%0A            MatchedToken matchedToken) %7B%0A%0A        return new CompilerException(new MInvalidPriority(gt.getLine() + %22%22, gt%0A                .getPos()%0A                + %22%22, matchedToken.getName()).toString());%0A    %7D%0A%0A    public static CompilerException conflictingPriorities(%0A            TGt gt,%0A            MatchedToken high,%0A            MatchedToken low,%0A            TGt prior_gt) %7B%0A%0A        return new CompilerException(new MConflictingPriorities(gt.getLine()%0A                + %22%22, gt.getPos() + %22%22, high.getName(), low.getName(), prior_gt%0A                .getLine()%0A                + %22%22, prior_gt.getPos() + %22%22).toString());%0A    %7D%0A%0A    public static CompilerException notAToken(%0A            Token token) %7B%0A%0A        return new CompilerException(new MNotAToken(token.getLine() + %22%22,%0A                token.getPos() + %22%22, token.getText()).toString());%0A    %7D%0A%0A    public static CompilerException lexerConflict(%0A            MatchedToken matchedToken1,%0A            MatchedToken matchedToken2) %7B%0A%0A        return new CompilerException(new MLexerConflict(%0A                matchedToken1.getName(), matchedToken2.getName()).toString());%0A    %7D%0A%0A    public static CompilerException parserUselessProduction(%0A            String name) %7B%0A%0A        return new CompilerException(%0A                new MParserUselessProduction(name).toString());%0A    %7D%0A%0A    public static CompilerException parserSpuriousPriority(%0A            TIdentifier identifier) %7B%0A%0A        return new CompilerException(new MParserSpuriousPriority(%0A                identifier.getText(), %22%22 + identifier.getLine(), %22%22%0A                        + identifier.getPos()).toString());%0A    %7D%0A%0A    public static CompilerException alternativeNotRecursive(%0A            TIdentifier identifier) %7B%0A%0A        return new CompilerException(new MAlternativeNotRecursive(%0A                identifier.getText(), %22%22 + identifier.getLine(), %22%22%0A                        + identifier.getPos()).toString());%0A    %7D%0A%0A    public static CompilerException recursionNotFollowedByToken(%0A            TIdentifier identifier) %7B%0A%0A        return new CompilerException(new MRecursionNotFollowedByToken(%0A                identifier.getText(), %22%22 + identifier.getLine(), %22%22%0A                        + identifier.getPos()).toString());%0A    %7D%0A%0A    public static CompilerException notImplemented(%0A            Token token,%0A            String feature) %7B%0A%0A        return new CompilerException(new MNotImplemented(feature,%0A                token.getLine() + %22%22, token.getPos() + %22%22).toString());%0A    %7D%0A%0A    public static CompilerException outputError(%0A            String fileName,%0A            Throwable cause) %7B%0A%0A        return new CompilerException(new MOutputError(fileName,%0A                cause.getMessage()).toString());%0A    %7D%0A*/%0A
 %7D%0A

Delete obsolete code.