private Operation parseUrlParam ( ) { StringBuilder builder = cachesBuilder ; builder . setLength ( 0 ) ; Operation op = new Operation ( reader , new ValueExpression ( reader , relativeURL . getPath ( ) ) , ' ' ) ; for ( ; ; ) { char ch = read ( ) ; switch ( ch ) { case ' ' : case ' ' : String val = builder . toString ( ) ; String quote = readQuote ( ch ) ; builder . append ( val ) ; builder . append ( quote ) ; break ; case ' ' : //escape builder . append ( ch ) ; builder . append ( read ( ) ) ; break ; case ' ' : if ( builder . length ( ) == 0 ) { reader . back ( ch ) ; op . addOperand ( parseExpression ( ( char ) 0 ) ) ; read ( ) ; return op ; } builder . append ( ch ) ; break ; case ' ' : val = trim ( builder ) ; op . addOperand ( new ValueExpression ( reader , val , Expression . STRING ) ) ; return op ; default : builder . append ( ch ) ; } } }
Parse the parameter of an url function which has some curious fallbacks .