hey guy im playing a cleric lvl 8 and i just got enough BAB to do 2 attacks in the same round is it legal to instead of doing 2 attacks with my sword to cast 2 spells or 2 magic attacks??
No, you can only cast one spell per round in most cases (standard action or full round action). There are a few exceptions, like the Quickened Spell Metamagic feat. In any case, casting spells has nothing to do with your BAB and the number of attacks you get when you take a Full Attack action.