system/src/sc/parser/IndexedChoice.java
public void replace(Parselet oldParselet, Parselet newParselet) {
      int oldIx;
      for (oldIx = 0; oldIx < parselets.size(); oldIx++) {
         if (parselets.get(oldIx) == oldParselet)
            break;
      }
      if (oldIx == parselets.size())
         System.err.println("*** Replace parselet in IndexedChoice failed to find parselet to replace: " + oldParselet + " language: " + getLanguage());
      else {
         parselets.set(oldIx, newParselet);
      }
   }
/**
    * When inheriting a grammar from a base language, you may need to replace one parselet for another one.
    * This method is useful if you have a new child parselet for the same indexed key as the old one.
    */
When inheriting a grammar from a base language, you may need to replace one parselet for another one.
This method is useful if you have a new child parselet for the same indexed key as the old one.
When inheriting a grammar from a base language you may need to replace one parselet for another one . This method is useful if you have a new child parselet for the same indexed key as the old one .
public void replace(Parselet oldParselet, Parselet newParselet) {
      int oldIx;
      for (oldIx = 0; oldIx < parselets.size(); oldIx++) {
         if (parselets.get(oldIx) == oldParselet)
            break;
      }
      if (oldIx == parselets.size())
         System.err.println("*** Replace parselet in IndexedChoice failed to find parselet to replace: " + oldParselet + " language: " + getLanguage());
      else {
         parselets.set(oldIx, newParselet);
      }
   }
public void replace ( Parselet oldParselet , Parselet newParselet ) { int oldIx ; for ( oldIx = 0 ; oldIx < parselets . size ( ) ; oldIx ++ ) { if ( parselets . get ( oldIx ) == oldParselet ) break ; } if ( oldIx == parselets . size ( ) ) System . err . println ( "*** Replace parselet in IndexedChoice failed to find parselet to replace: " + oldParselet + " language: " + getLanguage ( ) ) ; else { parselets . set ( oldIx , newParselet ) ; } }
When inheriting a grammar from a base language, you may need to replace one parselet for another one.
When inheriting a grammar from a base language you may need to replace one parselet for another one .