Hi, I wrote a conditional plugin[1] and it works fine for "nested" conditional statements when the commands are entered in the interpreter one by one but creates problems when the same commands are read from a file.Mind it this only happens in case of "nested" conditional statements.
You can check c_if.9 [2](comment out "load ./alias.so" in the file) which is a script for testing nested conditionals.If you are running it please compile c_if.cc,interp.h and c_echo.cc[3] to get the so files required to run the script. So after using untested() and tracing the flow of execution of plugin,I figured out the problem is that when a new "NESTED IF/ELIF/ELSE command" is launched it doesn't get the next instructions it is supposed to receive from the file and keeps on waiting for the next input from the file.It doesn't receive the input because this "if" command is called by another "if" command using CMD::command() method,line 99 c_if.cc The question is how can the child process receive the input from a file in gnucap? Any idea how can I solve the problem in gnucap's way.I know other techniques but if there is way to solve it in gnucap then it is better. [1]: http://git.savannah.gnu.org/cgit/gnucap.git/tree/c_if.cc?h=WIP&id=b73c04c8ed1fec7333926b42e149221a0f3f75a6 [2]:http://git.savannah.gnu.org/cgit/gnucap.git/tree/tests/if/c_if.9?h=WIP [3]: http://git.savannah.gnu.org/cgit/gnucap.git/tree/?h=WIP&id=b73c04c8ed1fec7333926b42e149221a0f3f75a6 Thanks, Rishabh Yadav Junior Undergraduate Department of Electronics Engineering IIT (BHU), Varanasi Varanasi-221005 India _______________________________________________ Gnucap-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/gnucap-devel
