src/sap.ui.core/src/sap/ui/base/ExpressionParser.js
function consumeToken() {
			var ch, oBinding, iIndex, aMatches, oToken;

			oTokenizer.white();
			ch = oTokenizer.getCh();
			iIndex = oTokenizer.getIndex();

			if ((ch === "$" || ch === "%") && sInput[iIndex + 1] === "{") { //binding
				oBinding = fnResolveBinding(sInput, iIndex + 1);
				oToken = {
					id: "BINDING",
					value: saveBindingAsPart(oBinding.result, iIndex + 1, ch === "%")
				};
				oTokenizer.setIndex(oBinding.at); //go to first character after binding string
			} else if (rIdentifierStart.test(ch)) {
				aMatches = rIdentifier.exec(sInput.slice(iIndex));
				switch (aMatches[0]) {
				case "false":
				case "null":
				case "true":
					oToken = {id: "CONSTANT", value: oTokenizer.word()};
					break;
				case "in":
				case "typeof":
					oToken = {id: aMatches[0]};
					oTokenizer.setIndex(iIndex + aMatches[0].length);
					break;
				default:
					oToken = {id: "IDENTIFIER", value: aMatches[0]};
					oTokenizer.setIndex(iIndex + aMatches[0].length);
				}
			} else if (rDigit.test(ch)
					|| ch === "." && rDigit.test(sInput[iIndex + 1])) {
				oToken = {id: "CONSTANT", value: oTokenizer.number()};
			} else if (ch === "'" || ch === '"') {
				oToken = {id: "CONSTANT", value: oTokenizer.string()};
			} else {
				rTokens.lastIndex = iIndex;
				aMatches = rTokens.exec(sInput);
				if (!aMatches || aMatches.index !== iIndex) {
					return false; // end of input or unrecognized character
				}
				oToken = {id: aMatches[0]};
				oTokenizer.setIndex(iIndex + aMatches[0].length);
			}
			oToken.input = sInput;
			oToken.start = iIndex;
			oToken.end = oTokenizer.getIndex();
			aTokens.push(oToken);
			return true;
		}
function consumeToken() {
			var ch, oBinding, iIndex, aMatches, oToken;

			oTokenizer.white();
			ch = oTokenizer.getCh();
			iIndex = oTokenizer.getIndex();

			if ((ch === "$" || ch === "%") && sInput[iIndex + 1] === "{") { //binding
				oBinding = fnResolveBinding(sInput, iIndex + 1);
				oToken = {
					id: "BINDING",
					value: saveBindingAsPart(oBinding.result, iIndex + 1, ch === "%")
				};
				oTokenizer.setIndex(oBinding.at); //go to first character after binding string
			} else if (rIdentifierStart.test(ch)) {
				aMatches = rIdentifier.exec(sInput.slice(iIndex));
				switch (aMatches[0]) {
				case "false":
				case "null":
				case "true":
					oToken = {id: "CONSTANT", value: oTokenizer.word()};
					break;
				case "in":
				case "typeof":
					oToken = {id: aMatches[0]};
					oTokenizer.setIndex(iIndex + aMatches[0].length);
					break;
				default:
					oToken = {id: "IDENTIFIER", value: aMatches[0]};
					oTokenizer.setIndex(iIndex + aMatches[0].length);
				}
			} else if (rDigit.test(ch)
					|| ch === "." && rDigit.test(sInput[iIndex + 1])) {
				oToken = {id: "CONSTANT", value: oTokenizer.number()};
			} else if (ch === "'" || ch === '"') {
				oToken = {id: "CONSTANT", value: oTokenizer.string()};
			} else {
				rTokens.lastIndex = iIndex;
				aMatches = rTokens.exec(sInput);
				if (!aMatches || aMatches.index !== iIndex) {
					return false; // end of input or unrecognized character
				}
				oToken = {id: aMatches[0]};
				oTokenizer.setIndex(iIndex + aMatches[0].length);
			}
			oToken.input = sInput;
			oToken.start = iIndex;
			oToken.end = oTokenizer.getIndex();
			aTokens.push(oToken);
			return true;
		}
function consumeToken ( ) { var ch , oBinding , iIndex , aMatches , oToken ; oTokenizer . white ( ) ; ch = oTokenizer . getCh ( ) ; iIndex = oTokenizer . getIndex ( ) ; if ( ( ch === "$" || ch === "%" ) && sInput [ iIndex + 1 ] === "{" ) { //binding oBinding = fnResolveBinding ( sInput , iIndex + 1 ) ; oToken = { id : "BINDING" , value : saveBindingAsPart ( oBinding . result , iIndex + 1 , ch === "%" ) } ; oTokenizer . setIndex ( oBinding . at ) ; //go to first character after binding string } else if ( rIdentifierStart . test ( ch ) ) { aMatches = rIdentifier . exec ( sInput . slice ( iIndex ) ) ; switch ( aMatches [ 0 ] ) { case "false" : case "null" : case "true" : oToken = { id : "CONSTANT" , value : oTokenizer . word ( ) } ; break ; case "in" : case "typeof" : oToken = { id : aMatches [ 0 ] } ; oTokenizer . setIndex ( iIndex + aMatches [ 0 ] . length ) ; break ; default : oToken = { id : "IDENTIFIER" , value : aMatches [ 0 ] } ; oTokenizer . setIndex ( iIndex + aMatches [ 0 ] . length ) ; } } else if ( rDigit . test ( ch ) || ch === "." && rDigit . test ( sInput [ iIndex + 1 ] ) ) { oToken = { id : "CONSTANT" , value : oTokenizer . number ( ) } ; } else if ( ch === "'" || ch === '"' ) { oToken = { id : "CONSTANT" , value : oTokenizer . string ( ) } ; } else { rTokens . lastIndex = iIndex ; aMatches = rTokens . exec ( sInput ) ; if ( ! aMatches || aMatches . index !== iIndex ) { return false ; // end of input or unrecognized character } oToken = { id : aMatches [ 0 ] } ; oTokenizer . setIndex ( iIndex + aMatches [ 0 ] . length ) ; } oToken . input = sInput ; oToken . start = iIndex ; oToken . end = oTokenizer . getIndex ( ) ; aTokens . push ( oToken ) ; return true ; }
Consumes the next token in the input string and pushes it to the array of tokens.

@returns {boolean} whether a token is recognized
@throws {Error|Object|SyntaxError}
<code>fnResolveBinding</code> may throw <code>SyntaxError</code>;
<code>oTokenizer.setIndex()</code> may throw <code>Error</code>;
<code>oTokenizer</code> may also throw <code>{name: 'SyntaxError', ...}</code>
Consumes the next token in the input string and pushes it to the array of tokens .