From: paytonrules Date: 2006-09-13T03:15:46+09:00 Subject: Newbie Question: - Parse my commands... Okay I'm trying to take our old scripting software and quickly move it up in the world. We have a program that takes as a parameter a script file, parses it and runs it for unit testing purposes. There are several problems: 1) Each script file requires setting up a large database. 2) No way to debug a file short of setting breakpoints in C++ on the parser itself. 3) No way - this is the big one - to just run an individual command and get instant feedback. Now in the meantime I've been playing with Ruby and ROR and I think I should be able to use the irb command to create this pretty quickly, but I'm not quite sure how. Our commands in the .scr file currently look like this ObjectName.Make(param1, param2, param3, param4) The first step, which I'm doing now, is to take our executable program and break the parsing engine into a DLL. That's easy. I can then create a quick ruby program so I could do this: irb load 'rubyProg' parse ObjectName.Make(param1, param2, param3, param4) The rubyProg could work this way - but I'm pretty sure I can go one step farther with ruby and just type: ObjectName.Make(param1, param2, param3, param4) through ruby extensions. The question is - how do I have the interpreter pass on any code to the parser ruby can't handle it?