    private static Token parseToken(BufferedReader br) throws IOException {
        Token token = new Token();
        
        skipWhitespace(br);
        
        token.line = currentLine;
        token.column = currentColumn;
        
        switch(peekChar(br)) {
        case  -1: token.type = Token.EOF; return token;
        case '(': popChar(br); token.type = Token.LPAREN; return token;
        case ')': popChar(br); token.type = Token.RPAREN; return token;
        case '{': popChar(br); token.type = Token.LBRACE; return token;
        case '}': popChar(br); token.type = Token.RBRACE; return token;
        case '[': popChar(br); token.type = Token.LBRACK; return token;
        case ']': popChar(br); token.type = Token.RBRACK; return token;
        case ',': popChar(br); token.type = Token.COMMA; return token;
        }
        
        if (Character.isLetter((char)peekChar(br))) {
            token.type = Token.STRING;
            token.value = "" + (char)popChar(br);
            while (Character.isLetter((char)peekChar(br))) {
                token.value += (char)popChar(br);
            }
        } else if (peekChar(br) == '"') {
            token.type = Token.STRING;
            token.value = "";
            popChar(br);
            while (peekChar(br) != '\n' && peekChar(br) != '\r' && peekChar(br) != '"') {
                token.value += (char)popChar(br);
            }
            if (peekChar(br) == '"')
                popChar(br);
            else
                throwException("Newline in string: ", token);
        } else if (Character.isDigit((char)peekChar(br)) ||
                   peekChar(br) == '-') {
            token.type = Token.NUMBER;
            token.value = "" + (char)popChar(br);
            while (Character.isDigit((char)peekChar(br)) || peekChar(br) == '.' ||
                   peekChar(br) == 'E' || peekChar(br) == '-') {
                token.value += (char)popChar(br);
            }
        } else {
            throwException("Unrecognized character: " + ((char)peekChar(br)), token);
        }
        
        return token;
    }
