org.metasyntactic.math.automata
Class ShiftReduceConflict

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.metasyntactic.math.automata.ParseTableConflict
                    |
                    +--org.metasyntactic.math.automata.ShiftReduceConflict
All Implemented Interfaces:
java.io.Serializable

public class ShiftReduceConflict
extends ParseTableConflict

There are context-free grammars for which shift-reducing parsing cannot be used. Every shift-reduce parser for such a grammar can reach a configuration in which the parser, knowing the entire stack contents and the next input symbol, cannot decide whether to shift or reduce.

See Also:
Serialized Form

Constructor Summary
ShiftReduceConflict(LRParseTable.Shift shift, org.metasyntactic.math.automata.LRParseTable.Reduce reduce)
          Creates new ShiftReduceConflict without detail message.
ShiftReduceConflict(LRParseTable.Shift shift, org.metasyntactic.math.automata.LRParseTable.Reduce reduce, java.lang.String msg)
          Constructs an ShiftReduceConflict with the specified detail message.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ShiftReduceConflict

public ShiftReduceConflict(LRParseTable.Shift shift,
                           org.metasyntactic.math.automata.LRParseTable.Reduce reduce)
Creates new ShiftReduceConflict without detail message.


ShiftReduceConflict

public ShiftReduceConflict(LRParseTable.Shift shift,
                           org.metasyntactic.math.automata.LRParseTable.Reduce reduce,
                           java.lang.String msg)
Constructs an ShiftReduceConflict with the specified detail message.

Parameters:
msg - the detail message.