Lines Matching refs:S1
129 read(var(Variable,_), ['('|S1], Precedence, Answer, S) :- !,
130 read(S1, 999, Arg1, S2),
137 read(atom(-), [integer(Integer)|S1], Precedence, Answer, S) :-
139 exprtl0(S1, Negative, Precedence, Answer, S).
141 read(atom(Functor), ['('|S1], Precedence, Answer, S) :- !,
142 read(S1, 999, Arg1, S2),
157 read('[', [']'|S1], Precedence, Answer, S) :- !,
158 exprtl0(S1, [], Precedence, Answer, S).
160 read('[', S1, Precedence, Answer, S) :- !,
161 read(S1, 999, Arg1, S2),
165 read('(', S1, Precedence, Answer, S) :- !,
166 read(S1, 1200, Term, S2),
170 read(' (', S1, Precedence, Answer, S) :- !,
171 read(S1, 1200, Term, S2),
175 read('{', ['}'|S1], Precedence, Answer, S) :- !,
176 exprtl0(S1, '{}', Precedence, Answer, S).
178 read('{', S1, Precedence, Answer, S) :- !,
179 read(S1, 1200, Term, S2),
193 read_args([','|S1], [Term|Rest], S) :- !,
194 read(S1, 999, Term, S2), !,
204 read_list([','|S1], [Term|Rest], S) :- !,
205 read(S1, 999, Term, S2), !,
207 read_list(['|'|S1], Rest, S) :- !,
208 read(S1, 999, Rest, S2), !,
223 peepop(S0, S1),
224 prefix_is_atom(S1, Oprec), % can't cut but would like to
225 exprtl(S1, Oprec, Op, Precedence, Answer, S).
227 after_prefix_op(Op, Oprec, Aprec, S1, Precedence, Answer, S) :-
228 read(S1, Aprec, Arg, S2),
236 peepop([atom(F),'('|S1], [atom(F),'('|S1]) :- !.
237 peepop([atom(F)|S1], [infixop(F,L,P,R)|S1]) :- infixop(F, L, P, R).
238 peepop([atom(F)|S1], [postfixop(F,L,P)|S1]) :- postfixop(F, L, P).
264 exprtl0([atom(F)|S1], Term, Precedence, Answer, S) :-
266 ( exprtl([infixop(F,L1,O1,R1)|S1], 0, Term, Precedence, Answer, S)
267 ; exprtl([postfixop(F,L2,O2) |S1], 0, Term, Precedence, Answer, S)
269 exprtl0([atom(F)|S1], Term, Precedence, Answer, S) :-
271 exprtl([infixop(F,L1,O1,R1)|S1], 0, Term, Precedence, Answer, S).
272 exprtl0([atom(F)|S1], Term, Precedence, Answer, S) :-
274 exprtl([postfixop(F,L2,O2) |S1], 0, Term, Precedence, Answer, S).
276 exprtl0([','|S1], Term, Precedence, Answer, S) :-
278 read(S1, 1000, Next, S2), !,
281 exprtl0(['|'|S1], Term, Precedence, Answer, S) :-
283 read(S1, 1100, Next, S2), !,
286 exprtl0([Thing|S1], _, _, _, _) :-
288 syntax_error([Culprit,follows,expression], [Thing|S1]).
304 exprtl([infixop(F,L,O,R)|S1], C, Term, Precedence, Answer, S) :-
306 read(S1, R, Other, S2),
310 exprtl([postfixop(F,L,O)|S1], C, Term, Precedence, Answer, S) :-
313 peepop(S1, S2),
316 exprtl([','|S1], C, Term, Precedence, Answer, S) :-
318 read(S1, 1000, Next, S2), /*!,*/
321 exprtl(['|'|S1], C, Term, Precedence, Answer, S) :-
323 read(S1, 1100, Next, S2), /*!,*/