/*************** -*- Mode: MACSYMA; Package: MAXIMA -*-  ******************/
/***************************************************************************
***                                                                    *****
***     Copyright (c) 1984 by William Schelter,University of Texas     *****
***     All rights reserved                                            *****
***************************************************************************/

infix("|");
"|"$

exp1:{x | x > 0};
set(x | x > 0)$

exp2:{x | x < 2};
set(x | x < 2)$

infix("ou");
"ou"$

infix("oi");
"oi"$

exp1 ou exp2;
set(x | x > 0) ou set(x | x < 2)$

exp1 ou exp2;
set(x | x > 0) ou set(x | x < 2)$

exp1:{1,2,3};
set(1,2,3)$

{3,4,5};
set(3,4,5)$

exp1 ou exp1 ou %;
set(1,2,3) ou set(1,2,3) ou set(3,4,5)$

infix("ou",100,100);
"ou"$

exp2:infix("oi",120,120);
"oi"$

exp1 ou exp1 ou {7};
set(1,2,3) ou set(1,2,3) ou set(7)$

/* Make sure we didn't make the uppercase versions also operators */
x + OU;
x + OU$
x + OI;
x + OI$
/*kill("ou");*/
remove("ou",operator);
done$
foo(ou);
foo(ou);

/* SF bug #4671: "build_info outputs extraneous empty lines" */

(build_info_pattern: regex_compile ("Maxima-version: .*\\nMaxima build date: .*\\nHost type: .*\\nLisp implementation type: .*\\nLisp implementation version: .*\\nUser dir: .*\\nTemp dir: .*\\nObject dir: .*\\nFrontend: .*\\n"),
 S: make_string_output_stream (),
 with_stdout (S, print (build_info ())),
 S1: get_output_stream_string (S),
 close (S),
 if (m: regex_match (build_info_pattern, S1)) # false then true else S1);
true;
