Here is the whole thing (how to split your List into Rules) :
getRules([], _Delimiter, []) :- !.
getRules(List, Delimiter, [Rule|Rules]) :-
getRule(List, Delimiter, Rule, Rest),
getRules(Rest, Delimiter, Rules).
Using the getRule you asked for :
getRule([], _Delimiter, [], []) :- !.
getRule([Delimiter|Rest], Delimiter, [], Rest) :- !.
getRule([Item|List], Delimiter, [Item|Rule], Rest) :-
getRule(List, Delimiter, Rule, Rest).
Callable with
?- getRule(['S', =, a, 'S', b, ;, 'S', =, c, ;], ;, Rule, Rest).
Returns
Rule = ['S', =, a, 'S', b],
Rest = ['S', =, c, ;].
And the main one :
?- getRules(['S', =, a, 'S', b, ;, 'S', =, c, ;], ;, Rules).
returns
Rules = [['S', =, a, 'S', b], ['S', =, c]].
You can obviously hardcode ; if you want !
Please ask if you need any explanation about the code.
I added the modification discussed in comments and remove spoilers since you read it.
Here is the other thing you asked for :
divideRules(Rules, PureRules) :-
divideRules_(Rules, Temp),
append(Temp, PureRules).
divideRules_([], []) :- !.
divideRules_([Rule|Rules], [PureRule|PureRules]) :-
divideRule(Rule, PureRule),
divideRules_(Rules, PureRules).
divideRule(Rule, PureRule) :-
getRule(Rule, ::=, Left, Right),
append([Left, [::=]], NewLeft),
getRules(Right, '|', PureRight),
maplist(append(NewLeft), PureRight, PureRule).
Here is my guess but I can't run a prolog interpreter now so it's untested :
grammarize([], []) :- !.
grammarize([[Left, ::=|Right]|PureRules], [grammar(Left, Right)|Grammars]) :-
grammarize(PureRules, Grammars).