public BtrpOperand expand ( ) { String head = getChild ( 0 ) . getText ( ) . substring ( 0 , getChild ( 0 ) . getText ( ) . length ( ) - 1 ) ; String tail = getChild ( getChildCount ( ) - 1 ) . getText ( ) . substring ( 1 ) ; BtrpSet res = new BtrpSet ( 1 , BtrpOperand . Type . STRING ) ; for ( int i = 1 ; i < getChildCount ( ) - 1 ; i ++ ) { BtrpOperand op = getChild ( i ) . go ( this ) ; if ( op == IgnorableOperand . getInstance ( ) ) { return op ; } BtrpSet s = ( BtrpSet ) op ; for ( BtrpOperand o : s . getValues ( ) ) { //Compose res . getValues ( ) . add ( new BtrpString ( head + o . toString ( ) + tail ) ) ; } } return res ; }
Expand the enumeration . Variables are not evaluated nor checked