Changeset 92a50b in git for Singular/newstruct.cc
- Timestamp:
- Apr 2, 2015, 4:51:56 PM (9 years ago)
- Branches:
- (u'spielwiese', 'a719bcf0b8dbc648b128303a49777a094b57592c')
- Children:
- 32545c1dbcab1687004c413a9339ad043918e219
- Parents:
- 6140a33d67eb502e86ab3e4826db6c4eb05ffe1f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/newstruct.cc
r6140a3 r92a50b 855 855 currRingHdl=(idhdl)1; // fake ring detection 856 856 857 i f(!IsCmd(func,p->t))858 {859 int t=0;860 i f (func[1]=='\0') p->t=func[0];861 elseif((t=iiOpsTwoChar(func))!=0)857 int tt; 858 if(!(tt=IsCmd(func,p->t))) 859 { 860 int t; 861 if((t=iiOpsTwoChar(func))!=0) 862 862 { 863 863 p->t=t; 864 tt=CMD_2; /* ..,::, ==, <=, <>, >= !=i and +,-,*,/,%,.... */ 865 if ((t==PLUSPLUS) 866 ||(t==MINUSMINUS) 867 ||(t=='=')) 868 tt=CMD_1; /* ++,--,= */ 864 869 } 865 870 else 866 871 { 872 desc->procs=p->next; 873 omFreeSize(p,sizeof(*p)); 867 874 Werror(">>%s<< is not a kernel command",func); 868 875 currRingHdl = save_ring; … … 870 877 } 871 878 } 879 switch(tt) 880 { 881 // type conversions: 882 case BIGINTMAT_CMD: 883 case MATRIX_CMD: 884 case INTMAT_CMD: 885 case RING_CMD: 886 case RING_DECL: 887 case RING_DECL_LIST: 888 case ROOT_DECL: 889 case ROOT_DECL_LIST: 890 // operations: 891 case CMD_1: 892 if(args!=1) { Warn("args must be 1 in %s",my_yylinebuf);args=1;} 893 break; 894 case CMD_2: 895 if(args!=2) { Warn("args must be 2 in %s",my_yylinebuf);args=2;} 896 break; 897 case CMD_3: 898 if(args!=3) { Warn("args must be 3 in %s",my_yylinebuf);args=3;} 899 break; 900 case CMD_12: 901 if((args!=1)&&(args!=2)) { Werror("args must in 1 or 2 in %s",my_yylinebuf);} 902 break; 903 case CMD_13: 904 if((args!=1)&&(args!=3)) { Werror("args must in 1 or 3 in %s",my_yylinebuf);} 905 break; 906 case CMD_23: 907 if((args<2)||(args>3)) { Werror("args must in 2..3 in %s",my_yylinebuf);} 908 break; 909 case CMD_123: 910 if((args<1)||(args>3)) { Werror("args must in 1..3 in %s",my_yylinebuf);} 911 break; 912 case CMD_M: 913 if(args!=4) { Warn("args must be 4 in %s",my_yylinebuf);args=4;} 914 break; 915 default: 916 Werror("unknown token type %d in %s",tt,my_yylinebuf); 917 break; 918 } 919 currRingHdl = save_ring; 920 if (errorreported) 921 { 922 desc->procs=p->next; 923 omFreeSize(p,sizeof(*p)); 924 return TRUE; 925 } 872 926 p->args=args; 873 927 p->p=pr; pr->ref++; 874 928 pr->is_static=0; 875 currRingHdl = save_ring;876 929 return FALSE; 877 930 }
Note: See TracChangeset
for help on using the changeset viewer.