net.sourceforge.chaperon.build.conflict
Class ShiftReduceConflict

java.lang.Object
  extended bynet.sourceforge.chaperon.build.conflict.Conflict
      extended bynet.sourceforge.chaperon.build.conflict.ShiftReduceConflict

public class ShiftReduceConflict
extends Conflict

This class represents a shift/reduce conflict.

Version:
CVS $Id: ShiftReduceConflict.java,v 1.7 2003/12/09 19:55:52 benedikta Exp $
Author:
Stephan Michels

Constructor Summary
ShiftReduceConflict(Grammar grammar, ItemSetCollection itemsets, int state, Terminal symbol, int production)
          Creates a shift/reduce conflict.
 
Method Summary
 int getProduction()
          Production.
 int getState()
          The state, in which the conflict occurs.
 Terminal getSymbol()
          The symbol, which the conflict produce.
 java.lang.String toString()
          Return a string representation of the conflict.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ShiftReduceConflict

public ShiftReduceConflict(Grammar grammar,
                           ItemSetCollection itemsets,
                           int state,
                           Terminal symbol,
                           int production)
Creates a shift/reduce conflict.

Parameters:
grammar - Grammar.
itemsets - Collection of item sets.
state - The state, in which the conflict occurs.
symbol - The symbol, which the conflict produce.
production - Production.
Method Detail

getState

public int getState()
The state, in which the conflict occurs.

Returns:
Index of state.

getSymbol

public Terminal getSymbol()
The symbol, which the conflict produce.

Returns:
Symbol.

getProduction

public int getProduction()
Production.

Returns:
production.

toString

public java.lang.String toString()
Return a string representation of the conflict.

Specified by:
toString in class Conflict
Returns:
String representation of the conflict.


Copyright ? 2003 Chaperon project. All Rights Reserved.