[Question]How to make GNU readline read until balanced parenthesis string is matched?
by oren_daniel from LinuxQuestions.org on (#58B1R)
I am planning on implementing simple interpreter in C.
I want to have the ability to write a lisp style s-expression on multiple lines,
and that readline function would stop only after the user entered a balanced s-expression
like so:
>> (a b
c d
(e f))
>>
I have never used Readline before and I don't know enough about the library to know what I am looking for or if it's even doable with Readline.
Can somebody direct me to an example or section in the man page that details how to achieve this?


I want to have the ability to write a lisp style s-expression on multiple lines,
and that readline function would stop only after the user entered a balanced s-expression
like so:
>> (a b
c d
(e f))
>>
I have never used Readline before and I don't know enough about the library to know what I am looking for or if it's even doable with Readline.
Can somebody direct me to an example or section in the man page that details how to achieve this?