[fpc-pascal] Interactive command recognition & mapping to program functions & other 'cli' features as a unit

Lukasz Sokol el.es.cr at gmail.com
Fri Jul 31 13:37:03 CEST 2015


I tried piecing something like in $topic together,

intended as an 'interactive' command interpreter for my program.
(which will in time grow an 'embedded' web server and intended to run as a (windows) service,
but it's too early for that at the moment)

(I hooked some events of a TMemo to my interpreter, 
which currently recognizes commands by a static map/array of record of string and function pointers;
and passes the rest of command line to the called function as string, 
then the function is a shim/wrapper over the deeper program functions; 
the entire parameter sanitizing  and conversion from string to what the 'deeper' function expects,
is done in the 'wrapper' function layer,
and so is the function output converted back to string and spat out to the TMemo.

It's growing too complicated to maintain for the purpose, day by day, and has problems
with some more interactive commands or tab completion...

Is there something I could use for the purpose that is ready-made, tested, free and open source AND of course in FreePascal ?
(I can share my changes back if I do any, can't open the entire application though)

Any hints, 
Any keywords,
any lmgtfy's
are welcome :)

Kind Regards
el es

More information about the fpc-pascal mailing list