comparison NOTES @ 16:bfa9aaa2d608

update NOTES
author John W. Eaton <jwe@octave.org>
date Fri, 24 May 2019 09:22:35 -0400
parents 822a2fe5bb51
children 7e93b74bd6c2
comparison
equal deleted inserted replaced
15:79783f3e2017 16:bfa9aaa2d608
67 pointers. 67 pointers.
68 68
69 Questions: 69 Questions:
70 70
71 * With this arrangement, would the interpreter have to run in a 71 * With this arrangement, would the interpreter have to run in a
72 separtae thread? 72 separate thread? As the example shows, it's not absolutely
73 necessary, but it could offer some advantages, but only if it is
74 possible for the GUI to do useful things while the interpreter is
75 busy.
73 76
74 * Example parser currently computes results 77 * The example parser currently also performs evaluations and
75 immediately. How do we deal with parsing multiple expressions and 78 computes results immediately so it doesn't properly handle
76 statements with this method? 79 expression lists that are split across multiple lines. Octave
80 wouldn't have this problem because we already build a parse tree
81 then execute it once it is complete.
77 82
78 * Do we need text position markers to keep track of the prompt position 83 * Do we need text position markers to keep track of the prompt position
79 (beginning of current line) when inserting or clearing text? 84 (beginning of current line) when inserting or clearing text?
80 85
86 * This example program doesn't attempt handle multi-line prompts or
87 prompts with invisible characters (color specificiations, for
88 example). Fixing that will make the redisplay function
89 significantly more complex. See, for example, how complicated the
90 default rl_redisplay function is. Unless we actually write a
91 terminal emulator (like the current terminal widgets) then it is
92 not possible to use readline's rl_redisplay function directly.
81 93
82 readline callback functions: 94 readline callback functions:
83 95
84 // -- Variable: rl_getc_func_t * rl_getc_function 96 // -- Variable: rl_getc_func_t * rl_getc_function
85 // If non-zero, Readline will call indirectly through this pointer to 97 // If non-zero, Readline will call indirectly through this pointer to