Massive octave session and expression refactoring
ClosedPublic

Authored by sirgienko on Sep 29 2018, 9:34 PM.

Details

Summary

Massive refactoring OctaveSession and OctaveExpression, for fixing some bugs and problems:

  • fix bug with unhandling error in Expression with plog commands
  • remove finalazing in OctaveExpression: handle output in parseOutput function and error in parseError
  • fix problem, when octave prompt comes BEFORE error message, and we ignore error or some internal command handle it.
  • simplify logic in OctaveSession::readOutput
  • add handling subprompt (octave print subprompt, when user write unfinished octave statement)
Test Plan
  1. Test with all Octave cws
  2. If there are errors, comment them to this phabricator thread

Diff Detail

Repository
R55 Cantor
Branch
octave-massive-refactoring
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 4051
Build 4069: arc lint + arc unit
sirgienko created this revision.Sep 29 2018, 9:34 PM
Restricted Application added a project: KDE Edu. · View Herald TranscriptSep 29 2018, 9:35 PM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
sirgienko requested review of this revision.Sep 29 2018, 9:35 PM
sirgienko added inline comments.Sep 29 2018, 9:39 PM
src/backends/octave/octavesession.cpp
313 ↗(On Diff #42569)

This is not very good solution, but i have no idea, how I exit from octave "user input requrested" mode without errors.
Better, if we could write something, that finish expression and go in 'line.contains(m_promt)' branch or more usefull error (without )]'" in end).
I also think about additionInputRequsted signal, but it's not very good solution: we split command in two different input field in this case.

sirgienko updated this revision to Diff 43917.Oct 19 2018, 12:19 PM

Improve subprompt handling

sirgienko marked an inline comment as done.Oct 19 2018, 12:21 PM
sirgienko added inline comments.
src/backends/octave/octavesession.cpp
313 ↗(On Diff #42569)

Printing "Syntax Error", I think, enough informative.

sirgienko marked 2 inline comments as done.Oct 19 2018, 12:21 PM
asemke accepted this revision.Nov 3 2018, 8:43 AM
This revision is now accepted and ready to land.Nov 3 2018, 8:43 AM
This revision was automatically updated to reflect the committed changes.