Added probability support
Added grammar parsing.
TODO: Cast to array.