|Adding an interpreted language to program firstname.lastname@example.org (me262) (2007-03-29)|
|Re: Adding an interpreted language to program email@example.com (me262) (2007-03-29)|
|Re: Adding an interpreted language to program firstname.lastname@example.org (Louis Krupp) (2007-03-30)|
|From:||Louis Krupp <email@example.com>|
|Date:||30 Mar 2007 23:06:11 -0400|
|Organization:||Posted via Supernews, http://www.supernews.com|
|Posted-Date:||30 Mar 2007 23:06:11 EDT|
> On Mar 28, 10:01 pm, "me262" <me2...@gmail.com> wrote:
>> I am facing a task of hooking up my program to an intepreted
>> language for front end. I know nothing about compiler theory. Is there
>> a step-by-step guide on how to do that?
>> I looked into some tools such and ANTLR and GOLD. Somehow, they
>> would produce an AST. But how do I work it to do things that are
>> useful, for example, printing "Hello world: we saw a = 10?".
>> [This question comes up a lot, and the best advice is NOT to try to
>> write your own interpreter. There are plenty of interpreted languages
>> already such as TCL, Lua, and Python, any of which can be used to
>> drive your application. -John]
> Hi John,
> Thanks for the comment. I totally agree with what you said. But in
> our particular branch of engineering, there are thousands of scripts
> already written in an old interpretive language. As a new comer, we
> must be able to pop in CD, install and kick ass. We just can't ask
> customers to Pythonize first.
> [In that case, you'll have to reimplent your scripting language. Ugh.
> I'd suggest parsing into an AST or RPN, then interpret that, rather
> than trying to interpret directly from the parser. -John]
Depending on the interpretive language, you *might* be able to
translate a script on the fly to Lua or whatever, and then execute the
lkrupp *at* pssw *dot* com
Return to the
Search the comp.compilers archives again.