Pascal News
Pascal News
Pascal News
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
2689<br />
2690<br />
2691<br />
2692<br />
2693<br />
2694<br />
2695<br />
2696<br />
2697<br />
2698<br />
2699<br />
2700<br />
2701<br />
2702<br />
2703<br />
2704<br />
2705<br />
2706<br />
,2708<br />
2709<br />
2710<br />
2711<br />
2712<br />
2713<br />
2714<br />
2715<br />
2716<br />
2717<br />
2718<br />
2719<br />
2720<br />
2721<br />
2722<br />
2723<br />
2724<br />
2725<br />
2726<br />
2727<br />
2728<br />
2729<br />
2730<br />
2731<br />
2732<br />
2733<br />
2734<br />
2735<br />
2736<br />
2737<br />
2738<br />
2739<br />
2740<br />
2741<br />
2742<br />
2743<br />
2744<br />
if aspstringptr then ak:=ploaded;<br />
end,;<br />
nilcst:<br />
begin insym; asp:=nilptr;<br />
for i:=1 to ptrsize diy wordslze do genHop_loc,O);<br />
end;<br />
lparent:<br />
begin insym;<br />
expresslon(fsys+[rparent]); nextif(rparent ,+0199)<br />
end;<br />
notsy:<br />
begin lnsym; factor(fsys); load; genO(op_teq);<br />
if aspboolptr thel! asperr(+0200)<br />
end;<br />
lbrack:<br />
begin insym; buildset(fsys+[rbrack]); nextif(rbrack,+0201) end;<br />
end<br />
-end end;<br />
procedure term(fsys:sos);<br />
var lsy:symbol; lsp:sp; lO,11,12:integer; first:boolean;<br />
begin with a,b do begin first:=true; 11:=11no; 10:=11;<br />
factor( fsys+[starsy •• andsy]);<br />
vbile find2([starsy •• andsy],fsys,+0202) do<br />
begin if first then begin load; flrst:=false end;<br />
isy:=sy; insym.; 11: =11no; lsp:=asp;<br />
factor(fsys+[starsy •• andsy]); load; convert(lsp,ll);<br />
if aspnil tben<br />
case lsy of<br />
starsy:<br />
if asp=intptr tben genO(op_mul) else<br />
if asp=realptr then genO (op_fmu) else<br />
if asp=longptr then genO(op_dmu) else<br />
if aspA .form=power then setop(op_and) else asperr(+0203);<br />
slashsy:<br />
if asp=realptr tben genO (op_fdv) else<br />
if (asp=intptr) or (asp=longptr) then<br />
begin lsp:=asp;<br />
convert(realptr,11); (make real of right operand)<br />
convert(lsp,11); (make real of left operand)<br />
genO (op_fdv)<br />
end<br />
else asperr(+0204);<br />
divsy:<br />
if asp=intptr tben genO (op_diy) else<br />
if asp=longptr tben genO(op,-ddv) else asperr(+0205);<br />
modsy:<br />
begin 12: =11no; gen1(op_mrk,O); exchange(10,12);<br />
if asp=intptr tben gensp(MDI) else<br />
if asp=longptr then gensp(MDL) else asperr(+0206);<br />
end;<br />
andsy:'<br />
if asp=boolptr then setop(op_and) else asperr(+0207);<br />
end {case}<br />
end {while}<br />
end end;<br />
2746<br />
2747<br />
2748<br />
2749<br />
2750<br />
2751<br />
2752<br />
2753<br />
2754<br />
2755<br />
2756<br />
2757<br />
2758<br />
2759<br />
2760<br />
2761<br />
2762<br />
2763<br />
2764<br />
2765<br />
2766<br />
2767<br />
2768<br />
2769<br />
2770<br />
2771<br />
2772<br />
2773<br />
2774<br />
2775<br />
2776<br />
2777<br />
2778<br />
2779<br />
2781<br />
2782<br />
2783<br />
2784<br />
2785<br />
2786<br />
2787<br />
2788<br />
2789<br />
2790<br />
2791<br />
2792<br />
2793<br />
2794<br />
2795<br />
2796<br />
2797<br />
2798<br />
2799<br />
2800<br />
procedure simpleexpressionCfsys:sos);<br />
var lsy:symbol: lSp:sp; 11:integer; signed,min,first:boolean;<br />
begin with a do begin 11: =11no; first :=true;<br />
signed:=(sy=plussy) or (sy=minsy);<br />
if signed then begin min:=sy=minsy; insym end else min:=false:<br />
term(fsys + [minsy,plussy,orsy]); lsp:=desub(asp);<br />
if signed then<br />
if (lsp intptr) and (lsprealptr) and (lsp longptr) then<br />
asperr(+0208)<br />
else if min then<br />
begin load; first:::false; asp:=lsp; negate(11) end.;<br />
while find2([plussy,minsy,orsy],fsys,+0209) do<br />
begin if first then begin load; first:=false end;<br />
lsy:=sy; insym; 11 :=lino; Isp:=asp;<br />
term(fsys+[minsy,plussy,orsy]); load; convert(lsp,11);<br />
if aspnil then<br />
case lsy of<br />
plussy:<br />
if asp=intptr then genO (op_add) else<br />
if asp=realptr then genO (op_fad) else<br />
if asp=longptr then genO(op_dad) else<br />
if aspA .form=power then setop(op_ior) else asperr(+0210);<br />
minsy:<br />
if asp=intptr tben genO(op_sub) else<br />
if asp=realptr tben genO(op_fsb) else,<br />
if asp=longptr tben genO(op_dsb) else<br />
if asp ..... form=power then<br />
begin setop( op com); setop( op and) end<br />
else asperr(+0211); -<br />
orsy:<br />
if asp=boolptr then setop(op_ior) else asperr(+0212);<br />
end {case}<br />
end (while)<br />
end end;<br />
procedure expression; { fsys :sos }<br />
var lsy:symbol; lsp:sp; 11,12,13,sz:integer;<br />
begin with a do begin 11: =11no ;<br />
simpleexpression( fsys+[eqsy •. insy]);<br />
if find2([eqsy •• insy],fsys,+0213) then<br />
begin 18Y:=SY; insym; lsp:=asp; loadcheap; 12:=lino;<br />
8impleexpression( fsys); load cheap ;<br />
if lsy=insy then<br />
begin<br />
if not formof( asp, [power]) then asperr( +0214) elSE<br />
if asp=emptyset then setop(op_and) else<br />
{this effectively replaces the word on top the<br />
stack by the result of the I in I operator: "31;:'!e }<br />
if not (compat(lsp,aspA .elset)