Article 58B1R [Question]How to make GNU readline read until balanced parenthesis string is matched?

[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?latest?d=yIl2AUoC8zA latest?i=ntQFDp9CMu0:ZQWNbfbQsS0:F7zBnMy latest?i=ntQFDp9CMu0:ZQWNbfbQsS0:V_sGLiP latest?d=qj6IDK7rITs latest?i=ntQFDp9CMu0:ZQWNbfbQsS0:gIN9vFwntQFDp9CMu0
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments