private void readPinNames(HDLTokenizer input, int partNumber, String partName)
     throws HDLException {
        boolean endOfPins = false;

        // read pin names
        while (!endOfPins) {
            // read left pin name
            input.advance();
            if (!(input.getTokenType() == HDLTokenizer.TYPE_IDENTIFIER))
                input.HDLError("A pin name is expected");

            String leftName = input.getIdentifier();

            // check '='
            input.advance();
            if (!(input.getTokenType() == HDLTokenizer.TYPE_SYMBOL && input.getSymbol() == '='))
                input.HDLError("Missing '='");

            // read right pin name
            input.advance();
            if (!(input.getTokenType() == HDLTokenizer.TYPE_IDENTIFIER))
                input.HDLError("A pin name is expected");

            String rightName = input.getIdentifier();
            addConnection(input, partNumber, partName, leftName, rightName);

            // check ',' or ')'
            input.advance();
            if (input.getTokenType() == HDLTokenizer.TYPE_SYMBOL && input.getSymbol() == ')')
                endOfPins = true;
            else if (!(input.getTokenType() == HDLTokenizer.TYPE_SYMBOL
                       && input.getSymbol() == ','))
                input.HDLError("',' or ')' are expected");
        }
    }