%mathpiper,def=""


/* stdopers is loaded immediately after MathPiper 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);
RightAssociativeSet("And");
Infix("Or", 1010);
Prefix("Not", 100);
Infix("<",90);
Infix(">",90);
Infix("<=",90);
Infix(">=",90);
Infix("!=",90);

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

Infix("+",70);
Infix("-",70);
RightPrecedenceSet("-",40);
Infix("/",30);
Infix("*",40);
Infix("^",20);
LeftPrecedenceSet("^",19); //Added to make expressions like x^n^2 unambiguous.
RightAssociativeSet("^");
Prefix("+",50);
Prefix("-",50);
RightPrecedenceSet("-",40);
Bodied("For",60000);
Bodied("Until",60000);
Postfix("++",5);
Postfix("--",5);
Bodied("ForEach",60000);
Infix("<<",10);
Infix(">>",10);
Bodied("Differentiate",60000);
Bodied("Deriv",60000);
Infix("X",30);
Infix(".",30);
Infix("o",30);
Postfix("!", 30);
Postfix("!!", 30);
Infix("***", 50);
Bodied("Integrate",60000);

Bodied("Limit",60000);

Bodied("EchoTime", 60000);

Bodied("Repeat", 60000);

Infix("->",600);

/* functional operators */
Infix(":",70);
RightAssociativeSet(":");
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 MathPiper 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);
RightAssociativeSet("else");
/* Bitwise operations we REALLY need. Perhaps we should define them
   also as MathPiper operators?
 */
Infix("&",50);
Infix("|",50);
Infix("%",50);

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

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

/* 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);




%/mathpiper