Annotation of OpenXM/src/asir-doc/int-parts/parser.texi, Revision 1.1
1.1 ! noro 1: @comment $OpenXM$
! 2: @chapter Paser
! 3:
! 4: @section Parser $B$N9=@.(B
! 5:
! 6: parser $B$O(B Asir $B8@8l$G=q$+$l$?J8;zNs$rCf4V8@8l$KJQ49$9$k(B. paser $B$O(B
! 7: $B<!$N$b$N$+$i9=@.$5$l$k(B.
! 8:
! 9: @itemize
! 10: @item $BJ8K!Dj5A(B
! 11:
! 12: Asir $B8@8l$NJ8K!$O(B @code{yacc} $B$N%=!<%9%U%!%$%k$H$7$FDj5A$5$l$F$$$k(B. $B$3$N(B
! 13: $B%U%!%$%k$O(B @code{yacc} $B$K$h$j(B parser $B%W%m%0%i%`$KJQ49$5$l$k(B.
! 14:
! 15: @item $B;z6g2r@O(B
! 16:
! 17: yacc $B$G@8@.$5$l$k(B parser $B%W%m%0%i%`$O(B, $BF~NOJ8;zNs$N@hF,$+$i=g$K(B, $BB0@-Kh(B
! 18: $B$KJ8;zNs$r@Z$jJ,$1$k4X?t(B @code{yylex()} $B$r8F$S=P$7$J$,$i(B, $BJ8K!Dj5A$K=>$C(B
! 19: $B$FCf4V8@8l(B tree $B$r9=@.$7$F$$$/(B. $B;z6g2r@ODj5A%U%!%$%k$+$i(B @code{yylex()}
! 20: $B$r@8@.$9$k%W%m%0%i%`(B @code{lex} $B$b$"$k$,(B, Asir $B$G$ONr;KE*$JM}M3$+$i(B
! 21: C $B8@8l$K$h$jD>@\5-=R$7$F$$$k(B.
! 22:
! 23: @item $BL>A04IM}(B
! 24:
! 25: @code{yylex()} $B$K$h$C$F@Z$jJ,$1$i$l$kJ8;zNs$H$7$F(B, $B$"$i$+$8$aDj5A$5$l$?(B
! 26: keyword (@samp{if}, @samp{for} $B$J$I(B) $B$NB>$K(B, $BJQ?tL>(B, $B4X?tL>$J$IF0E*$K(B
! 27: $B@8@.$5$l$kL>A0$,$"$k(B. $B$3$l$i$OB0@-Kh$K%j%9%H(B, $BG[Ns$J$I$N7A$G4IM}$5$l(B,
! 28: parser $B$N<B9TCf$K;2>H(B, $BDI2C$J$I$,9T$o$l$k(B.
! 29: @end itemize
! 30:
! 31: @section $BCf4V8@8l(B
! 32:
! 33: @example
! 34: typedef struct oFNODE @{ $B<0$rI=$9%N!<%I(B
! 35: fid id; $B<1JL;R(B
! 36: pointer arg[1]; $B0z?tG[Ns(B ($BD9$52DJQ(B)
! 37: @} oFNODE *FNODE;
! 38:
! 39: typedef struct oSNODE @{ $BJ8$rI=$9%N!<%I(B
! 40: sid id; $B<1JL;R(B
! 41: int ln; $B9THV9f(B
! 42: pointer arg[1]; $B0z?tG[Ns(B ($BD9$52DJQ(B)
! 43: @} oSNODE *SNODE;
! 44: @end example
! 45:
! 46: interpreter $B$NF~NO$H$J$kCf4V8@8l$N9=@.$O6K$a$FC1=c$G$"$k(B.
! 47: $BCf4V8@8l$N9=@.MWAG$O(B @b{$BJ8(B} $B$*$h$S(B @b{$B<0(B} $B$G$"$k(B.
! 48: Asir $B8@8l$K$h$kF~NOJ8;zNs$O(B, $BJ8$NJB$S$H$7$F(B parse $B$5$l(B,
! 49: @code{SNODE} $B9=B$BN$N%j%9%H$KJQ49$5$l$k(B. $BJ8$N<oN`$O<1JL;R(B @code{id}
! 50: $B$K$h$j<($5$l$k(B. $B0z?tG[Ns$OJ8$N<oN`$K1~$8$FD9$5(B, $B$*$h$S$=$N3FMWAG$N(B
! 51: $B0UL#(B($BLr3d(B)$B$,7h$^$k(B. $B0J2<$G(B @code{S_} $B$G;O$^$k$N$O<1JL;R$NL>A0$G(B,
! 52: $B<B:]$K$OAj0[$J$k@0?t$,3d$jEv$F$i$l$F$$$k(B.
! 53: @samp{|} $B$O(B, $B<1JL;R$*$h$S0z?t$N;E@Z$j$r<($9(B.
! 54:
! 55: @table @code
! 56: @item S_SINGLE | $B<0(B
! 57:
! 58: @samp{$B<0(B}$B$r<B9T$9$k(B.
! 59:
! 60: @item S_BREAK
! 61:
! 62: $B:G$bFbB&$N%k!<%W(B (@code{S_FOR}, @code{S_DO}) $B$rH4$1$k(B.
! 63:
! 64: @item S_CONTINUE
! 65:
! 66: $B:G$bFbB&$N%k!<%W$N@hF,$KHt$V(B.
! 67:
! 68: @item S_RETURN | $B<0(B
! 69:
! 70: $B4X?t$+$iH4$1$F(B, @samp{$B<0(B} $B$NCM$rJV$9(B.
! 71:
! 72: @item S_IFELSE | $B%@%_!<(B | $B>r7o<0(B | $BJ8(B1 | $BJ8(B2
! 73:
! 74: @samp{$B>r7o<0(B} $B$NCM$,(B 0 $B$G$J$$$J$i(B @samp{$BJ8(B1} $B$r<B9T(B, 0 $B$J$i(B @samp{$BJ8(B2} $B$r(B
! 75: $B<B9T(B.
! 76:
! 77: @item S_FOR | $B%@%_!<(B | $B<0(B1 | $B>r7o<0(B | $BJ8(B | $B<0(B2
! 78:
! 79: $B$^$:(B @samp{$B<0(B1} $B$r<B9T$7$?$"$H(B, @samp{$B>r7o<0(B} $B$NCM$,(B 0 $B$G$J$$4V(B, @samp{$BJ8(B}
! 80: $B$H(B @samp{$B<0(B2} $B$N7W;;$r7+$jJV$9(B.
! 81:
! 82: @item S_DO | $B%@%_!<(B | $BJ8(B | $B>r7o<0(B
! 83:
! 84: @samp{$BJ8(B} $B$r<B9T$7$?$"$H(B @samp{$B>r7o<0(B} $B$r7W;;$7(B, $B$=$NCM$,(B 0 $B$G$J$$4V(B
! 85: $B7+$jJV$9(B.
! 86: @end table
! 87:
! 88: @code{SNODE} $B$O9THV9f$r<($9%a%s%P(B @code{ln} $B$r;}$D(B. $B3F9T$,%U%!%$%k$+$iFI$^$l$?(B
! 89: $B>l9g$K(B, $B$=$N%U%!%$%k$K$*$1$k9THV9f$r3JG<$7$F$*$/(B. $B$3$l$O%G%P%C%0;~$K9THV9f(B
! 90: $B$+$iJ8$rFCDj$9$k$?$a$J$I$KMQ$$$i$l$k(B.
! 91:
! 92: $BJ8$KBP$9$kCf4V8@8lDj5A$GJ,$+$k$h$&$K(B, $BJ8$O:G=*E*$K$O<0$+$i9=@.$5$l$F$$$k(B.
! 93: $BJ8Cf$K8=$l$?<0$O(B, parser $B$K$h$C$F2r@O$5$l(B, @code{FNODE} $B9=B$BN$N%j%9%H$K(B
! 94: $BJQ49$5$l$k(B. $B<0$N<oN`$O<1JL;R(B @code{id}$B$K$h$j<($5$l$k(B. $B0z?tG[Ns$O<0$N<oN`(B
! 95: $B$K1~$8$FD9$5(B, $B$*$h$S$=$N3FMWAG$N0UL#(B($BLr3d(B)$B$,7h$^$k(B. $B0J2<$G(B @code{I_} $B$G(B
! 96: $B;O$^$k$N$O<1JL;R$NL>A0$G(B, $B<B:]$K$OAj0[$J$k@0?t$,3d$jEv$F$i$l$F$$(B
! 97: $B$k(B. @samp{|} $B$O(B, $B<1JL;R$*$h$S0z?t$N;E@Z$j$r<($9(B.
! 98:
! 99: @table @code
! 100: @item I_STR | $BJ8;zNs(B
! 101:
! 102: $BJ8;zNs(B
! 103:
! 104: @item I_FORMULA | Risa object
! 105:
! 106: $B4{$K(B Risa object $B$KJQ49$5$l$F$$$k<0(B
! 107:
! 108: @item I_ANS | $B%$%s%G%C%/%9(B
! 109:
! 110: @samp{$B%$%s%G%C%/%9(B} $BHVL\$N7W;;7k2L(B
! 111:
! 112: @item I_GF2NGEN
! 113:
! 114: $BI8?t(B 2 $BM-8BBN$N@8@.85(B
! 115:
! 116: @item I_EV | $B%$%s%G%C%/%9%N!<%I(B
! 117:
! 118: @samp{$B%$%s%G%C%/%9%N!<%I(B} $B$r;X?t%Y%/%H%k$H$_$F(B, $B78?t(B 1 $B$NC19`<0$r@8@.$9$k(B.
! 119:
! 120: @item I_FUNC | $B4X?t(B | $B0z?t%j%9%H(B
! 121:
! 122: $B4X?t8F$S=P$7(B
! 123:
! 124: @item I_CAR | $B%j%9%H(B
! 125:
! 126: $B%j%9%H$N@hF,MWAG(B
! 127:
! 128: @item I_CDR | $B%j%9%H(B
! 129:
! 130: $B%j%9%H$+$i@hF,MWAG$r=|$$$?%j%9%H(B
! 131:
! 132: @item I_PVAR | $B%$%s%G%C%/%9(B
! 133:
! 134: @code{$B%$%s%G%C%/%9(B} $BHVL\$N%W%m%0%i%`JQ?t$NCM(B
! 135:
! 136: @item I_ASSPVAR | $B<0(B1 | $B<0(B2
! 137:
! 138: @samp{$B<0(B1} $B$G<($5$l$k%W%m%0%i%`JQ?t$K(B @samp{$B<0(B2} $B$rBeF~(B
! 139:
! 140: @item I_INDEX | $B<0(B | $B%$%s%G%C%/%9%N!<%I(B
! 141:
! 142: @samp{$B<0(B} $B$rG[Ns$^$?$O%j%9%H$H8+$F(B, @samp{$B%$%s%G%C%/%9(B}$B$G;XDj$5$l$kMWAG$r<h$j=P$9(B.
! 143:
! 144: @item I_POSTSELF | $B4X?t(B | $B<0(B
! 145:
! 146: @samp{$B<0(B} $B$NCM$r<h$j=P$7$?$"$H(B, @samp{$B4X?t(B} $B$,2C;;$J$i(B @samp{$B<0(B} $B$r(B 1 $BA}$d$7(B,
! 147: @samp{$B4X?t(B} $B$,8:;;$J$i(B @samp{$B<0(B} $B$r(B 1 $B8:$i$9(B.
! 148:
! 149: @item I_PRESELF | $B4X?t(B | $B<0(B
! 150:
! 151: @samp{$B4X?t(B} $B$,2C;;$J$i(B @samp{$B<0(B} $B$r(B 1 $BA}$d$7(B, @samp{$B4X?t(B} $B$,8:;;$J$i(B
! 152: @samp{$B<0(B} $B$r(B 1 $B8:$i$9(B. $B$=$N8e(B @samp{$B<0(B} $B$NCM$r<h$j=P$9(B.
! 153:
! 154: @item I_LIST | $B%N!<%I(B
! 155:
! 156: @samp{$B%N!<%I(B}$B$+$i%j%9%H$r@8@.$9$k(B.
! 157:
! 158: @item I_NOP | $B<0(B
! 159:
! 160: @samp{$B<0(B} $B$,(B 0 $B$G$J$$$J$i(B 0, 0 $B$J$i(B 1.
! 161:
! 162: @item I_OR | $B<0(B1 | $B<0(B2
! 163:
! 164: @samp{$B<0(B1}, @samp{$B<0(B2} $B$,$H$b$K(B 0 $B$J$i(B 0, $B$=$l0J30$O(B 1.
! 165:
! 166: @item I_AND | $B<0(B1 | $B<0(B2
! 167:
! 168: @samp{$B<0(B1}, @samp{$B<0(B2} $B$,$H$b$K(B 0 $B$G$J$$$J$i(B 1, $B$=$l0J30$O(B 0.
! 169:
! 170: @item I_CE | $B>r7o<0(B | $B<0(B1 | $B<0(B2
! 171:
! 172: @samp{$B>r7o<0(B} $B$,(B 0 $B$G$J$$$H$-(B @samp{$B<0(B1} $B$NCM(B, 0 $B$N$H$-(B @samp{$B<0(B2} $B$NCM(B.
! 173:
! 174: @item I_BOP | $B<1JL;R(B | $B<0(B1 | $B<0(B2
! 175:
! 176: @samp{$B<1JL;R(B} $B$G;XDj$5$l$kFs9`1i;;;R(B ($B2C8:>h=|$J$I(B) $B$K=>$C$F(B, @samp{$B<0(B1},
! 177: @samp{$B<0(B2} $B$r0z?t$H$7$F1i;;(B.
! 178:
! 179: @item I_COP | $B<1JL;R(B | $B<0(B1 | $B<0(B2
! 180:
! 181: @samp{$B<1JL;R(B} $B$G;XDj$5$l$kHf3S1i;;;R$K=>$C$F(B, @samp{$B<0(B1},
! 182: @samp{$B<0(B2} $B$rHf3S(B. $B7k2L$O(B 0, 1, -1.
! 183:
! 184: @item I_LOP | $B<1JL;R(B | $B<0(B1 | $B<0(B2
! 185:
! 186: @samp{$B<1JL;R(B} $B$G;XDj$5$l$kO@M}1i;;;R$K$h$j(B, @samp{$B<0(B1},
! 187: @samp{$B<0(B2} $B$r0z?t$H$7$FO@M}<0$r@8@.(B.
! 188: @end table
! 189:
! 190: @section $B;z6g2r@O(B
! 191:
! 192: $B;z6g2r@OIt$G$O(B, $B6uGr(B, $B%?%V(B, $B2~9T$r%9%-%C%W$7$?$"$H$N:G=i$NJ8;z$K$h$C$F(B
! 193: $B:G=i$NJ,N`$r9T$&(B.
! 194:
! 195: @itemize @bullet
! 196: @item 0
! 197:
! 198: $BB3$/(B 0 $B$r%9%-%C%W$7$F(B, $B?t;z$,Mh$?$i(B 10 $B?J?t(B, b $B$,Mh$?$i(B 2 $B?J?t(B, x $B$,Mh$?$i(B
! 199: 16 $B?J?t$H$7$F(B, $B$"$H$KB3$/(B valid $B$JJ8;z$r%P%C%U%!$KFI$_9~$_(B, 2^32 $B?J?t$K(B
! 200: $BJQ49$9$k(B.
! 201:
! 202: @item 0 $B0J30$N?t;z(B
! 203:
! 204: $B0J2<$KB3$/?t;z$r%P%C%U%!$KFI$_9~$_(B, 10 $B?J?t$H$7$F(B 2^32 $B?J?t$KJQ49$9$k(B.
! 205:
! 206: @item $B1Q>.J8;z(B
! 207:
! 208: $B0J2<$KB3$/(B, $B%"%k%U%!%Y%C%H(B, $B?t;z(B, @samp{_} $B$r%P%C%U%!$KFI$_9~$_(B, keyword
! 209: $B$N>l9g$K$O$=$N<1JL;R(B, $B$=$&$G$J$$>l9g$K$O(B @samp{$B>.J8;z$G;O$^$kJ8;zNs(B} $B$r0UL#(B
! 210: $B$9$k<1JL;R$rJV$9(B.
! 211:
! 212: @item $B1QBgJ8;z(B
! 213:
! 214: $B0J2<$KB3$/(B, $B%"%k%U%!%Y%C%H(B, $B?t;z(B, @samp{_} $B$r%P%C%U%!$KFI$_9~$_(B,
! 215: @samp{$BBgJ8;z$G;O$^$kJ8;zNs(B} $B$r0UL#$9$k<1JL;R$rJV$9(B.
! 216:
! 217: @item @code{@@}
! 218:
! 219: @code{@@} $B$O$=$N8e$KMh$kJ8;zNs$K$h$j$5$^$6$^$JBP>]$rI=$9(B.
! 220:
! 221: @itemize @code{-}
! 222: @item @code{@@@@}
! 223:
! 224: $BD>A0$N7W;;7k2L(B
! 225:
! 226: @item @code{@@pi}
! 227:
! 228: $B1_<~N($rI=$9ITDj85(B
! 229: @item @code{@@e}
! 230:
! 231: $B<+A3BP?t$NDl$rI=$9ITDj85(B
! 232:
! 233: @item @code{@@i}
! 234:
! 235: $B5u?tC10L(B
! 236:
! 237: @item @code{@@p}
! 238:
! 239: $B4qI8?tM-8BBN$N3HBgBN$N@8@.85(B
! 240:
! 241: @item @code{@@true}, @code{@@false}, @code{@@impl}, @code{@@repl}, @code{@@equiv}
! 242:
! 243: $BO@M}1i;;;R(B
! 244: @end itemize
! 245:
! 246: $B$3$l0J30$N>l9g(B @code{@@} $B$OI8?t(B 2 $B$NM-8BBN$N@8@.85$rI=$9(B.
! 247:
! 248: @item @samp{"}
! 249:
! 250: $B<!$N(B @samp{"} $B$ND>A0$NJ8;z$^$G$rJ8;zNs(B Risa object $B$H$_$J$9(B.
! 251:
! 252: @item @samp{'}
! 253:
! 254: $B<!$N(B @samp{'} $B$ND>A0$NJ8;z$^$G$r(B @samp{$B>.J8;z$G;O$^$kJ8;zNs(B} $B$H$_$J$9(B.
! 255: $B$3$l$O(B, $BG$0UJ8;zNs$rL>A0$H$9$kITDj85$r@8@.$9$kI,MW$,$"$k>l9g$J$I$K(B
! 256: $BMQ$$$k(B.
! 257:
! 258: @item $B$=$NB>$N5-9f(B
! 259:
! 260: $B5-9f$K1~$8$F$5$^$6$^$K07$o$l$k(B. $BB?$/$O1i;;;R$H$7$F07$o$l$k$,(B,
! 261: @samp{@{}, @samp{@}}, @samp{[}, @samp{]}, @samp{(}, @samp{)}
! 262: $B$J$I(B, $B0lBP$G4V$K$"$kBP>]$K:nMQ$9$k$b$N$b$"$k(B.
! 263: @end itemize
! 264:
! 265: @section $BL>A04IM}(B
! 266:
! 267: Asir $B$K$*$$$F$O(B, $BITDj85(B, $B4X?t(B, $B%W%m%0%i%`JQ?t$H$$$&(B 3 $B$D$N%+%F%4%jJL$K(B
! 268: $BL>A0$,4IM}$5$l$F$$$k(B.
! 269:
! 270: @subsection $BITDj85(B
! 271:
! 272: $BITDj85$OJQ?t%j%9%H(B @code{CO} (Current variable Order) $B$G4IM}$5$l$k(B. $BITDj(B
! 273: $B85$HG'<1$5$l$kJ8;zNs$,;z6g2r@OIt$+$iM?$($i$l$?>l9g(B, @code{CO} $B$KEPO?$5$l(B
! 274: $B$F$$$kITDj85$NL>A0$H$=$NJ8;zNs$r=g$KHf3S$7(B, $B0lCW$7$?>l9g$K$O$=$NITDj859=(B
! 275: $BB$BN%]%$%s%?$rBP1~$9$kJQ?t$H$7$FMQ$$$k(B. $B0lCW$9$kL>A0$,$J$$>l9g$K$O?7$?$K(B
! 276: $BITDj859=B$BN$r@8@.$7(B, $BM?$($i$l$?J8;zNs$rL>A0$H$7$FEPO?$7(B, @code{CO} $B$N(B
! 277: $BKvHx$KDI2C$9$k(B.
! 278:
! 279: @subsection $B4X?t(B
! 280:
! 281: @example
! 282: typedef struct oFUNC @{ Asir $B4X?t(B
! 283: char *name; $B4X?tL>(B
! 284: int argc; $B0z?t$N8D?t(B
! 285: int type; PARI $B4X?t7?(B
! 286: aid id; $B7?(B ($BL$Dj5A(B, $BAH$_9~$_(B, $B%f!<%6(B, $B=c(B, PARI)
! 287: union @{
! 288: void (*binf)(); $BAH$_9~$_4X?t(B
! 289: struct oUSRF *usrf; $B%f!<%6Dj5A4X?t9=B$BN(B
! 290: struct oPF *puref; $B=c4X?t(B
! 291: @} f;
! 292: @} *FUNC;
! 293:
! 294: typedef struct oUSRF @{ $B%f!<%6Dj5A4X?t(B
! 295: char *fname; $B4X?tL>(B
! 296: short vol; $BL$;HMQ(B
! 297: int startl,endl; $B%U%!%$%kFb$G$N3+;O(B, $B=*N;0LCV(B
! 298: NODE args; $B2>0z?t%j%9%H(B
! 299: VS pvs; $B6I=j%W%m%0%i%`JQ?tG[Ns(B
! 300: char *desc; $B4X?t$N@bL@(B
! 301: struct oSNODE *body; $BJ8%j%9%H(B($B4X?tK\BN(B)
! 302: @} *USRF;
! 303:
! 304: typedef struct oPF @{ $B=c4X?t(B
! 305: char *name; $B4X?tL>(B
! 306: int argc; $B0z?t$N8D?t(B
! 307: Obj body; $B%f!<%6Dj5A=c4X?t$NK\BN(B
! 308: V *args; $B0z?tG[Ns(B
! 309: Obj *deriv; $BJPF34X?tG[Ns(B
! 310: NODE ins; $B4X?t%$%s%9%?%s%9%j%9%H(B
! 311: int (*pari)(); PARI $B8F$S=P$74X?t(B
! 312: double (*libm)(); C $B?t3X4X?t(B
! 313: int (*simplify)(); simplifier
! 314: @} *PF;
! 315:
! 316: struct oV @{ $BITDj85(B($B:F7G(B)
! 317: char *name;
! 318: pointer attr; $BB0@-(B
! 319: pointer priv;
! 320: @};
! 321:
! 322: extern NODE sysf,noargsysf; $BAH$_9~$_4X?t%j%9%H(B
! 323: extern NODE usrf; $B%f!<%6Dj5A4X?t%j%9%H(B
! 324: extern NODE parif; PARI $B4X?t%j%9%H(B
! 325: extern NODE pflist; $B=c4X?t%j%9%H(B
! 326: @end example
! 327:
! 328: $B4X?t$K$O(B, $BAH$_9~$_4X?t(B, $B%f!<%6Dj5A4X?t(B, PARI $B4X?t$*$h$S=c4X?t$,$"$k(B. $B$$(B
! 329: $B$:$l$b(B $B4X?t9=B$BN(B @code{FUNC} $B$H$7$FEPO?$5$l%j%9%H$H$7$FJ];}$5$l$k(B. $BAH$_(B
! 330: $B9~$_4X?t$N$&$A(B, $B0z?t$r;}$D$b$N$O(B, @code{sysf} $B$K(B, $B;}$?$J$$$b$N$O(B
! 331: @code{noargsysf} $B$KEPO?$5$l$k(B.
! 332:
! 333: $B%f!<%6Dj5A4X?t$O(B, $B8F$S=P$7;~$"$k$$$O4X?tDj5A;~$K(B, @code{usrf} $B$r8!:w$7(B,
! 334: $B%j%9%HCf$K$=$NL>$N4X?t$,$J$$>l9g$K(B @code{FUNC} $B9=B$BN$,@8@.$5$l(B, $B%j%9%H$K(B
! 335: $BDI2C$5$l$k(B. $B4X?tDj5A$,9T$o$l$kA0$K8F$S=P$7$,9T$o$l$?>l9g(B, @code{FUNC}
! 336: $B9=B$BN$N%a%s%P(B @code{id} $B$K$O(B, $BL$Dj5A$r0UL#$9$k<1JL;R$,%;%C%H$5$l$k(B.
! 337: $B8e$K<B:]$K4X?tDj5A$,9T$o$l$?:]$K(B, $B$3$N%a%s%P$O%f!<%6Dj5A4X?t$r0UL#$9$k(B
! 338: $B<1JL;R$G>e=q$-$5$l(B, $B$=$NB>$N%a%s%P$bA3$k$Y$/%;%C%H$5$l$k(B. $B4{$KDj5A(B
! 339: $B$5$l$F$$$k>l9g$K$O(B, $B$3$l$i$N%a%s%P$O>e=q$-$5$l$k(B. $BB($A(B, $BF10l4X?tL>(B
! 340: $B$G$O:G?7$NDj5A$,MQ$$$i$l$k(B.
! 341:
! 342: PARI $B4X?t$O(B, $B<B:]$N7W;;$K(B PARI $B%i%$%V%i%j$rMQ$$$k$H$$$&E@$r=|$1$P(B,
! 343: $BAH$_9~$_4X?t$HF1Ey$G$"$k(B. $B$?$@$7(B, PARI $B%i%$%V%i%j$O(B PARI bigfloat
! 344: $B$r7k2L$H$7$FJV$9$N$G(B, double float $B$N7k2L$rF@$?$$>l9g$N$?$a$K(B,
! 345: C $B$N(B @code{libm} $B%i%$%V%i%j$NF1Ey$N4X?t%]%$%s%?$rJ];}$7$F$$$k(B.
! 346:
! 347: $BAH$_9~$_(B, $B%f!<%6Dj5A(B, PARI $B4X?t$O(B, $B0z?t$rMQ$$$F7W;;$r9T$$(B, Risa object
! 348: $B$r7k2L$H$7$FJV$9(B, $BDL>o$N%W%m%0%i%_%s%08@8l$N0UL#$G$N4X?t$@$,(B, $B=c4X?t$O(B,
! 349: $B0z?t$N$_$,I>2A$5$l$F(B, $B$=$N0z?t$r;}$D4X?t8F$S=P$7$=$N$b$N$rJV$9(B.
! 350: Asir $B$N<B9TNc$r<($9(B.
! 351:
! 352: @example
! 353: [0] A=sin(x);
! 354: sin(x);
! 355: [1] type(A);
! 356: 2 <--- $B=c4X?t$OB?9`<0(B
! 357: [2] vtype(A);
! 358: 2 <--- $BB0@-$O=c4X?t(B
! 359: [3] args(A);
! 360: [x] <--- $B0z?t%j%9%H(B
! 361: [4] B=functor(A);
! 362: sin <--- $B4X?t;R(B
! 363: [5] type(B);
! 364: 2 <--- $B4X?t;R$bB?9`<0(B
! 365: [4] vtype(B);
! 366: 3 <--- $BB0@-$O4X?t;R(B
! 367: @end example
! 368:
! 369: $B$3$NNc$G$O(B, @code{sin(x)} $B$J$k=c4X?t$,@8@.$5$l$F$$$k$,(B, Risa object $B$H$7(B
! 370: $B$F$O(B, @code{sin(x)} $B<+?H$,ITDj85(B, $BB($AB?9`<0$H$J$k(B. $B$7$+$7(B @code{V} $B9=B$(B
! 371: $BBN$H$7$F$NB0@-(B ($B%a%s%P(B @code{attr}) $B$NCM$,0[$J$k(B. $B$3$NCM$,=c4X?t$r0UL#$9(B
! 372: $B$k$H$-(B, $B%a%s%P(B @code{priv} $B$K$O$3$N=c4X?t$K4X$9$k$5$^$6$^$J>pJs$,3JG<$5(B
! 373: $B$l(B, @code{args}, @code{functor} $B$K$h$j<hF@$5$l$k(B. $B4X?t;R<+?H$b(B, Risa
! 374: object $B$H$7$F$OITDj85$H$7$FB8:_$9$k(B. $B$3$N>l9g$bB0@-$K$h$j4X?t;R$G$"$k(B
! 375: $B$3$H$,<($5$l$k(B.
! 376:
! 377: @subsection $B%W%m%0%i%`JQ?t(B
! 378:
! 379: @example
! 380: typedef struct oVS @{ $B%W%m%0%i%`JQ?tG[Ns(B
! 381: unsigned int n; $B8=:_4^$^$l$kJQ?t$N8D?t(B
! 382: unsigned int asize; $B3d$jEv$F$i$l$?G[Ns$ND9$5(B
! 383: unsigned int at;
! 384: unsigned int level;
! 385: struct oFUNC *usrf;
! 386: struct oPV *va; $BG[NsK\BN(B
! 387: NODE opt; $BL$;HMQ(B
! 388: @} *VS;
! 389:
! 390: typedef struct oPV @{ $B%W%m%0%i%`JQ?t(B
! 391: char *name; $BJQ?tL>(B
! 392: sort attr,type;
! 393: pointer priv;
! 394: @} *PV;
! 395:
! 396: extern VS GPVS; $BBg0hJQ?tG[Ns(B
! 397: extern VS CPVS; $B8=:_$NJQ?tG[Ns(B
! 398: extern VS EPVS; extern $B@k8@$5$l$?JQ?tG[Ns(B
! 399: extern VS APVS; $B7W;;7k2L$r3JG<$9$kG[Ns(B
! 400: @end example
! 401:
! 402: Asir $B$K$*$$$F$O(B, $B%W%m%0%i%`JQ?t$N%9%3!<%W$O(B, $BBg0hJQ?t$H(B, $B%W%m%0%i%`Fb$G(B
! 403: $B$N6I=jJQ?t$N(B 2 $B%l%Y%k$KC1=c2=$5$l$F$$$k(B. $BJQ?t$O(B, $B8=$l$?;~E@$G$$$:$l$+$N(B
! 404: $B%W%m%0%i%`JQ?t$H$7$FEPO?$5$l$k(B. $B4X?t$N30$G8=$l$?%W%m%0%i%`JQ?t$O(B, $BBg0hJQ(B
! 405: $B?tG[Ns$KEPO?$5$l$k(B. $B4X?tDj5AFb$G8=$l$?%W%m%0%i%`JQ?t$O(B, $B4X?tDj5A8GM-$N6I(B
! 406: $B=jJQ?tG[Ns$KEPO?$5$l(B, @code{USRF} $B9=B$BN$N%a%s%P(B @code{pvs}$B$H$7$FEPO?$5(B
! 407: $B$l$k(B. $B4X?t$,<B9T$5$l$k>l9g$K(B, $BEPO?$5$l$?6I=jJQ?tG[Ns$r%F%s%W%l!<%H$H$7$F(B,
! 408: $B%9%?%C%/$KAjEv$9$kJQ?tG[Ns$,@8@.$5$l(B, $B<B9T;~$NJQ?t$NCM$O$3$NG[Ns$K3JG<(B
! 409: $B$5$l$k(B.
! 410:
! 411: $BCf4V8@8l$K$*$$$F(B, $B%W%m%0%i%`JQ?t;2>H$O%$%s%G%C%/%9$K$h$j9T$o$l$k(B. $B4X?t(B
! 412: $BFb$G$NJQ?t;2>H$O(B, $BDL>o$O6I=jJQ?tG[NsFb$NJQ?t$KBP$9$k%$%s%G%C%/%9$,MQ$$$i(B
! 413: $B$l$k$,(B, extern $B@k8@$5$l$F$$$kJQ?t$K4X$7$F$O(B, $BF1L>$NBg0hJQ?tG[Ns$NJQ?t$K(B
! 414: $BBP$9$k%$%s%G%C%/%9$,MQ$$$i$l$k(B. $B$3$N>l9g(B, $B<B:]$K$O$3$N6hJL$O%$%s%G%C%/%9(B
! 415: $B$N:G>e0L%S%C%H$r(B 1 $B$K$9$k$3$H$G9T$C$F$$$k(B.
! 416:
! 417:
! 418:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>