private int readInt ( ) { String tag = readWord ( ) ; try { int radix = 10 ; if ( tag . startsWith ( "0x" ) || tag . startsWith ( "0X" ) ) { tag = tag . substring ( "0x" . length ( ) ) ; radix = 16 ; } return Integer . valueOf ( tag , radix ) ; } catch ( Exception e ) { throw unexpected ( "expected an integer but was " + tag ) ; } }
Reads an integer and returns it .