title: fparsec OperatorPrecedenceParser : How to deal with incomplete parentheses
body: <p>This code will read this input "(WEEKEND-SUNDAY)" and then return "SATURDAY"
  but input "WEEKEND-SUNDAY)" still return "SATURDAY" => this parser ignore last ')'</p>
  
  <pre><code>let pDayOfWeekKeyWords = choice [ 
                            pstring "MONDAY" ;
                            pstring "TUESDAY" ;
                            pstring "WEDNESDAY" ;
                            pstring "THURSDAY" ;
                            pstring "FRIDAY" ;
                            pstring "SATURDAY" ;
                            pstring "SUNDAY" ;
                            pstring "WEEKEND" ;
                            pstring "WEEKDAY" ;
                            pstring "ALL" ] 
  
  let betweenParentheses p =
      between (pstring "(") (pstring ")") p
  
  let opp = new OperatorPrecedenceParser&lt;Set&lt;DayOfWeek&gt;,unit,unit&gt;()
  let pExpr = opp.ExpressionParser 
  let term = (betweenParentheses pExpr) &lt;|&gt; (pDayOfWeekKeyWords |&gt;&gt; ( fun x -&gt; 
      match x with 
      | "MONDAY" -&gt;  Set.ofList [DayOfWeek.Monday]
      | "TUESDAY" -&gt;  Set.ofList [DayOfWeek.Tuesday]
      | "WEDNESDAY" -&gt;  Set.ofList [DayOfWeek.Wednesday]
      | "THURSDAY" -&gt; Set.ofList [DayOfWeek.Thursday]
      | "FRIDAY" -&gt; Set.ofList [DayOfWeek.Friday]
      | "SATURDAY" -&gt; Set.ofList [DayOfWeek.Saturday]
      | "SUNDAY" -&gt; Set.ofList [DayOfWeek.Sunday]
      | "WEEKDAY" -&gt; Set.ofList [DayOfWeek.Monday ; DayOfWeek.Tuesday ; DayOfWeek.Wednesday;DayOfWeek.Thursday;DayOfWeek.Friday]
      | "WEEKEND" -&gt; Set.ofList [DayOfWeek.Saturday;DayOfWeek.Sunday]
      | "ALL"-&gt; Set.ofList [DayOfWeek.Monday ; DayOfWeek.Tuesday ; DayOfWeek.Wednesday;DayOfWeek.Thursday;DayOfWeek.Friday;DayOfWeek.Saturday;DayOfWeek.Sunday]
      | _ -&gt; failwith "ERROR MESSAGE") )
  opp.TermParser &lt;- term 
  opp.AddOperator(InfixOperator&lt;Set&lt;DayOfWeek&gt;,unit,unit&gt;("+", skipString "", 1, Associativity.Left, fun x y -&gt; x + y))
  opp.AddOperator(InfixOperator&lt;Set&lt;DayOfWeek&gt;,unit,unit&gt;("-", skipString "" , 1, Associativity.Left, fun x y -&gt; x - y))
  </code></pre>
  
  <p>run </p>
  
  <pre><code> run pExpr "MONDAY+(WEEKEND-SUNDAY)"
  </code></pre>
  
  <p>output</p>
  
  <pre><code> Success: set [Monday; Saturday]
  </code></pre>
  
  <p>problem is </p>
  
  <pre><code> run pExpr "MONDAY+WEEKEND-SUNDAY)" or run pExpr "MONDAY)+WEEKEND-SUNDAY"
  </code></pre>
  
  <p>it still return</p>
  
  <pre><code> Success: set [Monday; Saturday]
  </code></pre>
  
  <p>I want it to show Failure: something..</p>
  
  <p>did I miss something? thank you</p>