コード例 #1
0
ファイル: Production.java プロジェクト: greenwoodcm/chomper
 /**
  * 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);
 }
コード例 #2
0
ファイル: Production.java プロジェクト: greenwoodcm/chomper
 public String toString() {
   return lhs.toString() + " -> " + rhs.toString();
 }