Can someone, please explain to me is it possible (and how) to use grammar in Prolog for extracting the list elements.
For example, if I have a simple grammar
s --> number, explanation.
number --> [X], {integer(X)}.
explanation --> [X], {atom X}.
and if I have a list L=[1, 'someText']
s(L, [])...