
/* stdopers is loaded immediately after Yacas is started. It contains
 * the definitions of the infix operators, so the parser can already
 * parse expressions containing these operators, even though the
 * function hasn't been defined yet.
 */

Infix("=",90);
Infix("And",1000);
RightAssociative("And");
Infix("Or", 1010);
Prefix("Not", 100);
Infix("<",90);
Infix(">",90);
Infix("<=",90);
Infix(">=",90);
Infix("!=",90);

Infix(":=",10000);
RightAssociative(":=");

Infix("+",70);
Infix("-",70);
RightPrecedence("-",40);
Infix("/",30);
Infix("*",40);
Infix("^",20);
RightAssociative("^");
Prefix("+",50);
Prefix("-",50);
RightPrecedence("-",40);
Bodied("For",60000);
Bodied("Until",60000);
Postfix("++",5);
Postfix("--",5);
Bodied("ForEach",60000);
Infix("<<",10);
Infix(">>",10);
Bodied("D",60000);
Bodied("Deriv",60000);
Infix("X",30);
Infix(".",30);
Infix("o",30);
Postfix("!", 30);
Postfix("!!", 30);
Infix("***", 50);
Bodied("Integrate",60000);
Bodied("NIntegrate",60000);

Bodied("Limit",60000);

/* functional operators */
Infix(":",70);
RightAssociative(":");
Infix("@",600);
Infix("/@",600);
Infix("..",600);

Bodied("Taylor",60000);
Bodied("Taylor1",60000);
Bodied("Taylor2",60000);
Bodied("Taylor3",60000);
Bodied("InverseTaylor",60000);

Infix("<--",10000);
Infix("#",9900);

Bodied("TSum",60000);
Bodied("TExplicitSum",60000);
Bodied("TD",5);  /* Tell the Yacas interpreter that TD is to be used as TD(i)f */

/* Operator to be used for non-evaluating comparisons */
Infix("==",90);
Infix("!==",90);

/* Operators needed for propositional logic theorem prover */
Infix("=>",10000); /* implication, read as 'implies' */


Bodied("if",5);
Infix("else",60000);
RightAssociative("else");
/* Bitwise operations we REALLY need. Perhaps we should define them
   also as Yacas operators?
 */
Infix("&",50);
Infix("|",50);
Infix("%",50);

/* local pattern replacement operators */
Infix("/:",20000);
Infix("/::",20000);
Infix("<-",10000);

/* Operators used for manual layout */
Infix("<>", OpPrecedence("="));
Infix("<=>", OpPrecedence("="));

/* Operators for Solve: Where and AddTo */
Infix("Where", 11000);
Infix("AddTo", 2000);

Bodied("Function",60000);
Bodied("Macro",60000);

Bodied(Assert, 60000);

// Defining very simple functions, in scripts that can be converted to plugin.
Bodied("Defun",0);

// Operators for defining graph edges
Infix("<->",90);
Infix("->",90);
