D29418: Strip trailing binary operators

David Hurka noreply at phabricator.kde.org
Tue May 5 18:37:02 BST 2020


davidhurka added a comment.


  In D29418#663911 <https://phabricator.kde.org/D29418#663911>, @cfeck wrote:
  
  > The problem is that the original author wanted input errors to be visible while typing.
  
  
  That makes sense. It actually works, so it works.
  
  > If you check the expression after hitting Enter, you can detect more errors.
  
  That also already works. When you do not match an `(` with a `)`, the expression is not accepted at Enter.
  
  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?
  
  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...
  
  It appears that binary expressions are matched in `heir0()` to `heir5()` 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.

REPOSITORY
  R334 KmPlot

REVISION DETAIL
  https://phabricator.kde.org/D29418

To: yurchor, cfeck, davidhurka
Cc: kde-edu, narvaez, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20200505/869b4f45/attachment.html>


More information about the kde-edu mailing list