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
143 if (
tok==
NONE)
return "nothing";
150 if (
tok==
IDHDL)
return "identifier";
154 while (
cmds[
i].tokval!=0)
163 while (
cmds[
i].tokval!=0)
205 if (
pCmdL->tokval==-1)
207 if (
pCmdR->tokval==-1)
213 if(
pCmdR->tokval==-1)
return -1;
240 if (
pCmdL->tokval==-1)
242 if (
pCmdR->tokval==-1)
249 if(
pCmdR->tokval==-1)
282 case LE:
return "<=";
283 case GE:
return ">=";
338 "/****************************************\n"
339 "* Computer Algebra System SINGULAR *\n"
340 "****************************************/\n\n");
343 fprintf(
outfile,
"// - search for an exact match of the argument types\n");
344 fprintf(
outfile,
"// - otherwise search for the first possibility\n");
347 fprintf(
outfile,
"// --------------------------------------------------\n");
348 fprintf(
outfile,
"// depends on Singular/table.h and kernel/mod2.h\n\n");
379 fprintf(
outfile,
"/*---------------------------------------------*/\n");
411 fprintf(
outfile,
"/*---------------------------------------------*/\n");
445 fprintf(
outfile,
"/*---------------------------------------------*/\n");
467 fprintf(
outfile,
"/*---------------------------------------------*/\n");
477 fprintf(
outfile,
"/*---------------------------------------------*/\n");
497 "@item\n@ %d. @tab @code{%s} @tab @expansion{} @code{%s}\n",
510 fprintf(
outfile,
"/*---------------------------------------------*/\n");
511 char ops[]=
"=><+*/[.^,%(;";
525 fprintf(
outfile,
"/*---------------------------------------------*/\n");
527 "const struct sValCmdTab dArithTab1[]=\n"
545 "const struct sValCmdTab dArithTab2[]=\n"
575 "/****************************************\n"
576 "* Computer Algebra System SINGULAR *\n"
577 "****************************************/\n\n");
583 "void iiInitCmdName()\n{\n"
584 " sArithBase.nCmdUsed = 0;\n"
585 " sArithBase.nCmdAllocated = %d;\n"
586 " sArithBase.sCmds = (cmdnames*)omAlloc0(%d/*sArithBase.nCmdAllocated*/ *sizeof(cmdnames));\n"
588 " // name-string alias tokval toktype index\n",
602 switch(
cmds[
m].toktype)
618 if((
cmds[
m].toktype>
' ') &&(
cmds[
m].toktype<127))
639 " sArithBase.nLastIdentifier = %d;\n",
645"#define LAST_IDENTIFIER %d\n"
651 if( c->tokval==0)
return 0;
652 if (c->alias > 0)
return 0;
653 if ((c->toktype==
CMD_1)
654 || (c->toktype==
CMD_2)
655 || (c->toktype==
CMD_3)
656 || (c->toktype==
CMD_M)
660 || (c->toktype==
CMD_123))
return 1;
715 fprintf(
part,
"@table @code\n@item @strong{Syntax:}\n");
814 "only for commutive polynomial rings\n");
817 "only for polynomial rings over fields\n");
820 "only for polynomial rings over domains\n");
822 "@item @strong{Example:}\n"
826 "@end smallexample\n"
843 const char *
old_s=
"";
845 "@c *****************************************\n"
846 "@c * Computer Algebra System SINGULAR *\n"
847 "@c *****************************************\n\n");
878 fprintf(
outfile,
"@c ---------------------------------------------\n");
906 fprintf(
outfile,
"@c ---------------------------------------------\n");
934 fprintf(
outfile,
"@c ---------------------------------------------\n");
959 fprintf(
outfile,
"@c ---------------------------------------------\n");
962 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[]