title: Boolean expressions: postfix to multiple infix strings
body: <p>Given following (infix) expression:</p>
  
  <pre><code>(country = be or country = nl) and 
  (language = en or language = nl) and 
  message contains twitter
  </code></pre>
  
  <p>I'd like to create the following 4 infix notations:</p>
  
  <pre><code>message contains twitter and country = be and language = en
  message contains twitter and country = be and language = en
  message contains twitter and country = nl and language = nl
  message contains twitter and country = nl and language = nl
  </code></pre>
  
  <p>So, basically, I would like to get rid of all OR's.</p>
  
  <p>I already have a postfix notation for the first expression, so I'm currently trying to process that to get the desired notation. This particular situation, however, causes trouble.</p>
  
  <p>(For illustration purposes, the postfix notation for this query would be:)</p>
  
  <pre><code>country be = country nl = or language en = language = nl or and message twitter contains and
  </code></pre>
  
  <p>Does anyone know of an algorithm to achieve this?</p>