<table><tr><td style="">davidhurka added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D29418">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #8C98B8;
          color: #6B748C;
          font-style: italic;
          margin: 4px 0 12px 0;
          padding: 8px 12px;
          background-color: #F8F9FC;">
<div style="font-style: normal;
          padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D29418#663911" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: line-through;">D29418#663911</a>, <a href="https://phabricator.kde.org/p/cfeck/" style="
              border-color: #f1f7ff;
              color: #19558d;
              background-color: #f1f7ff;
                border: 1px solid transparent;
                border-radius: 3px;
                font-weight: bold;
                padding: 0 4px;">@cfeck</a> wrote:</div>
<div style="margin: 0;
          padding: 0;
          border: 0;
          color: rgb(107, 116, 140);"><p>The problem is that the original author wanted input errors to be visible while typing.</p></div>
</blockquote>

<p>That makes sense. It actually works, so it works.</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>If you check the expression after hitting Enter, you can detect more errors.</p></blockquote>

<p>That also already works. When you do not match an <tt style="background: #ebebeb; font-size: 13px;">(</tt> with a <tt style="background: #ebebeb; font-size: 13px;">)</tt>, the expression is not accepted at <span><span class="phui-tag-view phui-tag-type-shade phui-tag-grey phui-tag-shade "><span class="phui-tag-core ">Enter</span></span></span>.</p>

<p>Currently I understand it that some parser function inside KmPlot parses the expression to a token stream, which is then passed to Mathematica. The parser requires matching brackets, so it could also require right arguments for binary operators, couldn’t it?</p>

<p>To me as a user it looks like the parser works in general, and it is fairly complex code, so I think we don’t need to replace it with a new parser. I don’t know the parser of LabPlot2. If it could be a drop-in replacement, hmm...</p>

<p>It appears that binary expressions are matched in <tt style="background: #ebebeb; font-size: 13px;">heir0()</tt> to <tt style="background: #ebebeb; font-size: 13px;">heir5()</tt> functions. Their logical structure is too complicated to understand it quickly, but I think one of these doesn’t monitor which operator makes sense now.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R334 KmPlot</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D29418">https://phabricator.kde.org/D29418</a></div></div><br /><div><strong>To: </strong>yurchor, cfeck, davidhurka<br /><strong>Cc: </strong>kde-edu, narvaez, apol<br /></div>