private void evalSelect ( MessageArg arg ) { tag . skip ( COMMA_WS ) ; int pos = - 1 ; int end = - 1 ; String value = arg . asString ( ) ; while ( tag . peek ( ) != Chars . EOF ) { if ( ! tag . seek ( NON_WS , choice ) ) { break ; } String token = choice . token ( ) . toString ( ) ; tag . jump ( choice ) ; tag . skip ( COMMA_WS ) ; if ( ! tag . seekBounds ( choice , ' ' , ' ' ) ) { break ; } if ( token . equals ( value ) ) { recurse ( choice , value ) ; return ; } else if ( token . equals ( "other" ) ) { pos = choice . pos ; end = choice . end ; } else { tag . jump ( choice ) ; tag . skip ( COMMA_WS ) ; } } // Evaluate the "other" tag if nothing matched. if ( pos != - 1 && end != - 1 ) { choice . set ( pos , end ) ; recurse ( choice , value ) ; } }
SELECT - Evaluate the tag that matches the argument s value .