octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: push parser


From: Rik
Subject: Re: push parser
Date: Mon, 30 Jan 2012 15:20:27 -0800

On 01/29/2012 06:29 PM, John W. Eaton wrote:
> On 28-Jan-2012, Rik wrote:
>
> | On 01/28/2012 07:28 PM, address@hidden wrote:
> | > Message: 4
> | > Date: Sat, 28 Jan 2012 22:28:30 -0500
> | > From: "John W. Eaton" <address@hidden>
> | > To: octave maintainers mailing list <address@hidden>
> | > Subject: using a push parser to connect Octave to a GUI
> | >
> | > Without a terminal widget, and using Octave this way, we
> | > would not be able to use GNU readline.  OTOH, it might not be that
> | > difficult to emulate enough readline keybindings to satisfy most GUI
> | > users of Octave.
> | OH NO!  Really?  I love Readline editing and while some basic editing is
> | probably reproducible for the average user I can't imagine my setup would
> | be supported.  I use Vi so I don't have the default Emacs key bindings and,
> | worse, I use a Dvorak keyboard layout so my ~/.inputrc is pretty tricked 
> out.
>
> OK, I agree that it would be best to use the real thing rather than
> implement just a subset.  So I thought about it some more and modified
> the example GUI calculator so that it can use the real GNU readline
> with a push parser generated by Bison.  It works by using GNU
> readline's "callback" interface so that the GUI collects characters
> and passes them to readline one at a time.  To handle I/O in the text
> widget requires overriding some of readline's default functions.  To
> do that, you just need to write a few functions and assign some
> function pointers:
JWE,

I was able to kludge some things and get the test code to compile.  The
Readline interface appears to work perfectly well so my objection is
removed.  If the GUI coders think this is the future then I'm okay with that.

--Rik


reply via email to

[Prev in Thread] Current Thread [Next in Thread]