I am a Prolog newbie and am stuck at parsing a string to a list. I have a string of the form. I want to read polynomial as String and convert it into String. I want to convert the input String
2x^3 + x^2 - 4x^1 - 8
to
[[2,3], [1,2], [-4, 1], [-8, 0]]
How can I achieve this functionality?