/** * Parse a Java <code>string</code> from the digits <code>0,1,2,3,4,5,6,7,8,9</code>. * * @return */ protected String getIntegerString() { int startPosition = fCurrentPosition - 1; getChar(); while (Character.isDigit(fCurrentChar)) { getChar(); } int endPosition = fCurrentPosition--; return new String(fInputString, startPosition, (--endPosition) - startPosition); }
getChar(); if (firstCh == '0') { switch (fCurrentChar) { numFormat = 2; startPosition = fCurrentPosition; getChar(); break; case 'B': // binary format numFormat = 2; startPosition = fCurrentPosition; getChar(); break; case 'o': // octal format numFormat = 8; startPosition = fCurrentPosition; getChar(); break; case 'O': // octal format numFormat = 8; startPosition = fCurrentPosition; getChar(); break; case 'x': // hexadecimal format numFormat = 16; startPosition = fCurrentPosition; getChar(); break; case 'X': // hexadecimal format
getChar(); if ( firstCh == '0' ) { switch ( fCurrentChar ) { numFormat = 2; startPosition = fCurrentPosition; getChar(); break; case 'B': // binary format numFormat = 2; startPosition = fCurrentPosition; getChar(); break; case 'o': // octal format numFormat = 8; startPosition = fCurrentPosition; getChar(); break; case 'O': // octal format numFormat = 8; startPosition = fCurrentPosition; getChar(); break; case 'x': // hexadecimal format numFormat = 16; startPosition = fCurrentPosition; getChar(); break; case 'X': // hexadecimal format
protected String getIdentifier() { final int startPosition = fCurrentPosition - 1; getChar(); if (fCurrentChar == '$') { getChar(); } while (((fCurrentChar >= 'a') && (fCurrentChar <= 'z')) || ((fCurrentChar >= 'A') && (fCurrentChar <= 'Z')) || ((fCurrentChar >= '0') && (fCurrentChar <= '9'))) { getChar(); } int endPosition = fCurrentPosition--; final int length = (--endPosition) - startPosition; if (length == 1) { return optimizedCurrentTokenSource1(startPosition, endPosition); } if (length == 2 && fInputString.charAt(startPosition) == '$') { return optimizedCurrentTokenSource2(startPosition, endPosition); } return fInputString.substring(startPosition, endPosition); }
/** * Gets the identifier. * * @return the identifier */ protected String getIdentifier() { final int startPosition = fCurrentPosition - 1; getChar(); if ( fCurrentChar == '$' ) { getChar(); } while ( ((fCurrentChar >= 'a') && (fCurrentChar <= 'z')) || ((fCurrentChar >= 'A') && (fCurrentChar <= 'Z')) || ((fCurrentChar >= '0') && (fCurrentChar <= '9')) ) { getChar(); } int endPosition = fCurrentPosition--; final int length = (--endPosition) - startPosition; if ( length == 1 ) { return optimizedCurrentTokenSource1( startPosition, endPosition ); } if ( length == 2 && fInputString.charAt( startPosition ) == '$' ) { return optimizedCurrentTokenSource2( startPosition, endPosition ); } return fInputString.substring( startPosition, endPosition ); }
getChar(); if (fExplicitTimes) { if (firstCh == '0') { numFormat = 2; startPosition = fCurrentPosition; getChar(); break; case 'B': // binary format numFormat = 2; startPosition = fCurrentPosition; getChar(); break; case 'o': // octal format numFormat = 8; startPosition = fCurrentPosition; getChar(); break; case 'O': // octal format numFormat = 8; startPosition = fCurrentPosition; getChar(); break; case 'x': // hexadecimal format numFormat = 16; startPosition = fCurrentPosition; getChar(); break; case 'X': // hexadecimal format