Do you just want a simple formula to turn a range like [a-b] into 1dx+y? because that's easy:
[a-b] == 1d(b-a+1) + (a-1)
If you have to worry about multiple dice, things get... well, more dicey! ;) For one, there may be multiple solutions. For example, [4-13] could be done as 1d10+3 or 3d4+1...