22 #define ZERODIVISOR_MASK 8
25 #define ZERODIVISOR_MASK 0
40#define ALLOW_NC ALLOW_LP|ALLOW_PLURAL
47#define NO_ZERODIVISOR 8
48#define ALLOW_ZERODIVISOR 0
49#define ZERODIVISOR_MASK 8
51#define ALLOW_ZZ (ALLOW_RING|NO_ZERODIVISOR)
56#define NO_CONVERSION 32
148 if (
tok==
NONE)
return "nothing";
155 if (
tok==
IDHDL)
return "identifier";
159 while (
cmds[
i].tokval!=0)
168 while (
cmds[
i].tokval!=0)
210 if (
pCmdL->tokval==-1)
212 if (
pCmdR->tokval==-1)
218 if(
pCmdR->tokval==-1)
return -1;
245 if (
pCmdL->tokval==-1)
247 if (
pCmdR->tokval==-1)
254 if(
pCmdR->tokval==-1)
287 case LE:
return "<=";
288 case GE:
return ">=";
343 "/****************************************\n"
344 "* Computer Algebra System SINGULAR *\n"
345 "****************************************/\n\n");
348 fprintf(
outfile,
"// - search for an exact match of the argument types\n");
349 fprintf(
outfile,
"// - otherwise search for the first possibility\n");
352 fprintf(
outfile,
"// --------------------------------------------------\n");
353 fprintf(
outfile,
"// depends on Singular/table.h and kernel/mod2.h\n\n");
384 fprintf(
outfile,
"/*---------------------------------------------*/\n");
416 fprintf(
outfile,
"/*---------------------------------------------*/\n");
450 fprintf(
outfile,
"/*---------------------------------------------*/\n");
472 fprintf(
outfile,
"/*---------------------------------------------*/\n");
482 fprintf(
outfile,
"/*---------------------------------------------*/\n");
502 "@item\n@ %d. @tab @code{%s} @tab @expansion{} @code{%s}\n",
515 fprintf(
outfile,
"/*---------------------------------------------*/\n");
516 char ops[]=
"=><+*/[.^,%(;";
530 fprintf(
outfile,
"/*---------------------------------------------*/\n");
532 "const struct sValCmdTab dArithTab1[]=\n"
550 "const struct sValCmdTab dArithTab2[]=\n"
580 "/****************************************\n"
581 "* Computer Algebra System SINGULAR *\n"
582 "****************************************/\n\n");
588 "void iiInitCmdName()\n{\n"
589 " sArithBase.nCmdUsed = 0;\n"
590 " sArithBase.nCmdAllocated = %d;\n"
591 " sArithBase.sCmds = (cmdnames*)omAlloc0(%d/*sArithBase.nCmdAllocated*/ *sizeof(cmdnames));\n"
593 " // name-string alias tokval toktype index\n",
607 switch(
cmds[
m].toktype)
623 if((
cmds[
m].toktype>
' ') &&(
cmds[
m].toktype<127))
644 " sArithBase.nLastIdentifier = %d;\n",
650"#define LAST_IDENTIFIER %d\n"
656 if( c->tokval==0)
return 0;
657 if (c->alias > 0)
return 0;
658 if ((c->toktype==
CMD_1)
659 || (c->toktype==
CMD_2)
660 || (c->toktype==
CMD_3)
661 || (c->toktype==
CMD_M)
665 || (c->toktype==
CMD_123))
return 1;
720 fprintf(
part,
"@table @code\n@item @strong{Syntax:}\n");
819 "only for commutive polynomial rings\n");
822 "only for polynomial rings over fields\n");
825 "only for polynomial rings over domains\n");
827 "@item @strong{Example:}\n"
831 "@end smallexample\n"
848 const char *
old_s=
"";
850 "@c *****************************************\n"
851 "@c * Computer Algebra System SINGULAR *\n"
852 "@c *****************************************\n\n");
885 fprintf(
outfile,
"@c ---------------------------------------------\n");
915 fprintf(
outfile,
"@c ---------------------------------------------\n");
945 fprintf(
outfile,
"@c ---------------------------------------------\n");
972 fprintf(
outfile,
"@c ---------------------------------------------\n");
975 rename(
"plural_cmd.xx",
"plural_cmd.inc");
const CanonicalForm int s
char name(const Variable &v)
static int _gentable_sort_cmds(const void *a, const void *b)
compares to entry of cmdsname-list
int is_ref_cmd(cmdnames *c)
int iiTestConvert(int inputType, int outputType)
const char * iiTwoOps(int t)
void ttGen2b()
generate cmds initialisation
static int _texi_sort_cmds(const void *a, const void *b)
VAR int produce_convert_table
const char * Tok2Cmdname(int tok)
static int RingDependend(int t)
const struct sConvertTypes dConvertTypes[]
const struct sValCmd1 dArith1[]
const struct sValCmd2 dArith2[]
const struct sValCmdM dArithM[]
const struct sValCmd3 dArith3[]
int status int void * buf
const struct sValAssign dAssign[]