Bill Allombert on Tue, 8 Apr 2003 14:00:21 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PATCH CVS] broken proto


On Tue, Apr 08, 2003 at 03:46:40AM -0700, Ilya Zakharevich wrote:
> On Tue, Apr 08, 2003 at 11:46:08AM +0200, Bill Allombert wrote:
> > You already implemented it.
> 
> No, I did not.  It is not complicated, but with all bug-chasing and
> testing, it still is a significant time sink.
> 
> Basically, there are circa 50 of valences which are special cased in
> Pari.xs (look for interface22() etc.).  The list is present in
> Math::PariBuild.  One needs to translate this list to a big switch()
> tree which would translate, e.g., the string "GG" to 22.  But newer
> Perls already have a module (XS::something) to generate such switch
> statements.

If it can help, I have wrote this as part of the description system.

%valence=(
"Gp" => 1,
"GG" => 2,
"GGG" => 3,
"GGGG" => 4,
"lG" => 10,
"L" => 11,
"GnP" => 12,
"GDn" => 14,
"G" => 18,
"lGG" => 20,
"GL" => 21,
"GVE" => 22,
#"GL" => 23,
"LG" => 24,
"GGD0,L," => 25,
"GnG" => 26,
"V=GEp" => 27,
"GDVDI" => 28,
"GGp" => 29,
"lGGG" => 30,
"GDGDGD&" => 31,
"GGL" => 32,
"GGGD0,L,p" =>33,
"V=GGEp" => 37,
"V=GGEDG" => 47,
"GGDVDVDI" => 49,
"GDGDGD0,L,p" => 62,
"vV=GGI" => 83,
"vGVI" => 84,
"vV=GGGI" => 86,
"vV=GID0,L," => 87,
"GD0,L,DGp" => 91
);
%spec_valence=(
"O" => 50,
"if" => 80,
"while" => 81,
"until" => 82,
"global" => 88
);

Cheers,
Bill.