Exemple #1
0
 /**
  * Reverses the order of tokens appearing in the RHS of this production. This is used to change a
  * right recursive language to a left recursive language, or vice versa.
  *
  * @return
  */
 public Production reverse() {
   SequenceUnion reversedRHS = rhs.reverseAll();
   return new Production(lhs, reversedRHS);
 }
Exemple #2
0
 public String toString() {
   return lhs.toString() + " -> " + rhs.toString();
 }