org.waxeye.parser.AutomatonTransition Maven / Gradle / Ivy
The newest version!
/*
* Waxeye Parser Generator
* www.waxeye.org
* Copyright (C) 2008-2010 Orlando Hill
* Licensed under the MIT license. See 'LICENSE' for details.
*/
package org.waxeye.parser;
import org.waxeye.ast.IAST;
/**
* A transition cost of matching an automaton.
*
* @param The AST type.
*
* @author Orlando Hill
*/
public final class AutomatonTransition > implements ITransition
{
/** The index of the automaton. */
private final int index;
/**
* Create a new AutomatonTransition.
*
* @param index The index of the automaton.
*/
public AutomatonTransition(final int index)
{
this.index = index;
}
/**
* Returns the index.
*
* @return Returns the index.
*/
public int getIndex()
{
return index;
}
/** {@inheritDoc} */
public IAST acceptVisitor(final ITransitionVisitor visitor)
{
return visitor.visitAutomatonTransition(this);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy