case Bind( Name n, Tree t ):  Integer p = (Integer) this.posMap.get( pat );
case Bind( Name n, Tree t ):
      TreeSet compFollow1( TreeSet fol, Tree pat ) {	  //System.out.println("compFollow1("+fol+","+pat+")");            switch( pat ) {            case Sequence( Tree[] trees ):                  TreeSet first = null;                  int i = trees.length;                  if( i > 0 ) { // is nonempty                        do {                              --i;                              first = compFollow1(fol, trees[ i ]);                              if( nullable( trees[ i ] ))                                    fol.addAll( first );                              else                                    fol = first;                        } while( i > 0 ) ;                  }                  if( null == first ) first = new TreeSet();                  return first;		              case Alternative( Tree[] choices ):                  TreeSet first = new TreeSet();                  for( int i = choices.length - 1; i >= 0; --i ) {                        first.addAll( compFollow1( fol, choices[ i ] ));                  }                  return first;            case Bind( Name n, Tree t ):                                      Integer p = (Integer) this.posMap.get( pat );                                    TreeSet first = compFirst( t );                  //System.out.print("BIND" + first);                  recVars.put( pat.symbol(), first );                  // if( appearsRightmost( n, t ))                  // follow = oldfollw + ownfirst                  if( isStar( n ) )                        fol.addAll( first ); // an iterated pattern                  this.follow.put( p, fol.clone() );                  //System.out.println("Bind("+n+",...) first:"+first);                  //System.out.println("Bind("+n+",...) follow:"+fol);                  // continue to compute follow sets with adjusted fol                  return compFollow1( fol, t );                              case Ident( Name n ):                  if ((pat.symbol() != null )                      && pat.symbol().isPrimaryConstructor()) {                        // same as Apply                        Integer pos = (Integer) this.posMap.get( pat );                        TreeSet tset = (TreeSet) fol.clone();                        this.follow.put( pos, tset );                        TreeSet first = new TreeSet();                        first.add( pos );                        return first;                  }                  if ( recVars.keySet().contains( pat.symbol() )) { // grammar                        TreeSet first = (TreeSet) recVars.get( pat.symbol() );                        TreeSet follow = ((TreeSet) fol.clone());                        first.addAll( follow );                        //recVars.put//this.follow.put( pat.symbol(), follow );                        return first;                  }                  // --- --- only happens when called from BindingBerrySethi                   // [... x ...] changed to [... x@_ ...]                  // non-generated, non-recursive variable should not appear,                  // so this is a wildcard pattern _                                    Integer pos = (Integer) this.posMap.get( pat );                  TreeSet tset = (TreeSet) fol.clone();                  this.follow.put( pos, tset );                  TreeSet first = new TreeSet();                  first.add( pos );                  //System.out.println("Ident("+n+",...) first:"+first);                  //System.out.println("Ident("+n+",...) follow:"+tset);                  return first;            case Apply(_, _):            case Literal( _ ):            case Typed(_,_):            case Select(_,_):                  Integer pos = (Integer) this.posMap.get( pat );                  TreeSet tset = (TreeSet) fol.clone();                  this.follow.put( pos, tset );                  TreeSet first = new TreeSet();                  first.add( pos );                  return first;            default:                  throw new ApplicationError("unexpected pattern: "+pat.getClass());            }      }