21#define ZERODIVISOR_MASK 8
35#define ALLOW_NC ALLOW_LP|ALLOW_PLURAL
42#define NO_ZERODIVISOR 8
43#define ALLOW_ZERODIVISOR 0
44#define ZERODIVISOR_MASK 8
46#define ALLOW_ZZ (ALLOW_RING|NO_ZERODIVISOR)
51#define NO_CONVERSION 32
145 if (
tok==
NONE)
return "nothing";
152 if (
tok==
IDHDL)
return "identifier";
156 while (
cmds[
i].tokval!=0)
165 while (
cmds[
i].tokval!=0)
207 if (
pCmdL->tokval==-1)
209 if (
pCmdR->tokval==-1)
215 if(
pCmdR->tokval==-1)
return -1;
242 if (
pCmdL->tokval==-1)
244 if (
pCmdR->tokval==-1)
251 if(
pCmdR->tokval==-1)
284 case LE:
return "<=";
285 case GE:
return ">=";
340 "/****************************************\n"
341 "* Computer Algebra System SINGULAR *\n"
342 "****************************************/\n\n");
345 fprintf(
outfile,
"// - search for an exact match of the argument types\n");
346 fprintf(
outfile,
"// - otherwise search for the first possibility\n");
349 fprintf(
outfile,
"// --------------------------------------------------\n");
350 fprintf(
outfile,
"// depends on Singular/table.h and kernel/mod2.h\n\n");
383 fprintf(
outfile,
"/*---------------------------------------------*/\n");
415 fprintf(
outfile,
"/*---------------------------------------------*/\n");
449 fprintf(
outfile,
"/*---------------------------------------------*/\n");
471 fprintf(
outfile,
"/*---------------------------------------------*/\n");
481 fprintf(
outfile,
"/*---------------------------------------------*/\n");
501 "@item\n@ %d. @tab @code{%s} @tab @expansion{} @code{%s}\n",
514 fprintf(
outfile,
"/*---------------------------------------------*/\n");
515 char ops[]=
"=><+*/[.^,%(;";
529 fprintf(
outfile,
"/*---------------------------------------------*/\n");
531 "const struct sValCmdTab dArithTab1[]=\n"
549 "const struct sValCmdTab dArithTab2[]=\n"
579 "/****************************************\n"
580 "* Computer Algebra System SINGULAR *\n"
581 "****************************************/\n\n");
587 "void iiInitCmdName()\n{\n"
588 " sArithBase.nCmdUsed = 0;\n"
589 " sArithBase.nCmdAllocated = %d;\n"
590 " sArithBase.sCmds = (cmdnames*)omAlloc0(%d/*sArithBase.nCmdAllocated*/ *sizeof(cmdnames));\n"
592 " // name-string alias tokval toktype index\n",
606 switch(
cmds[
m].toktype)
622 if((
cmds[
m].toktype>
' ') &&(
cmds[
m].toktype<127))
643 " sArithBase.nLastIdentifier = %d;\n",
649"#define LAST_IDENTIFIER %d\n"
655 if( c->tokval==0)
return 0;
656 if (c->alias > 0)
return 0;
657 if ((c->toktype==
CMD_1)
658 || (c->toktype==
CMD_2)
659 || (c->toktype==
CMD_3)
660 || (c->toktype==
CMD_M)
664 || (c->toktype==
CMD_123))
return 1;
719 fprintf(
part,
"@table @code\n@item @strong{Syntax:}\n");
818 "only for commutive polynomial rings\n");
821 "only for polynomial rings over fields\n");
824 "only for polynomial rings over domains\n");
826 "@item @strong{Example:}\n"
830 "@end smallexample\n"
847 const char *
old_s=
"";
849 "@c *****************************************\n"
850 "@c * Computer Algebra System SINGULAR *\n"
851 "@c *****************************************\n\n");
882 fprintf(
outfile,
"@c ---------------------------------------------\n");
910 fprintf(
outfile,
"@c ---------------------------------------------\n");
938 fprintf(
outfile,
"@c ---------------------------------------------\n");
963 fprintf(
outfile,
"@c ---------------------------------------------\n");
966 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[]