interpreter

Parsing and converting 4Test to Perl

I want to convert 4Test scripts to Perl. I have been using the Parse::RecDescent in Perl, but am still overwhelmed at the task. Here is an example. An example of 4Test is something like: ParseSMSPlans (STRING sDir) { STRING sFile; STRING sDirSMSPlan = sDir + "sms_plans\"; STRING sDirPlan = sDir + "plan\"; STRING sDirDeal = sDir + "deal...

Need help designing an interpreter

Hi, i'm thinking on doing an undergrad project on building an interpreter for a simple/rudimentary custom language (perl / C like). I would be be glad if someone could point me in the right direction to start. Most of the books/resources i find are on theoretical implementation of compilers. Are there any resources aimed at interpreters ...

How does the Python interpreter handle files on a shared drive?

Does anyone know of a good guide for the python interpreter? I want to know details as to how it handles files it is interpreting. I have some python files on a shared drive that I want multiple processes to use but I do not know if the separate instances of the interpreter will affect one and other. Any insight would be greatly apprecia...

I need a voice interpreter and translator for an app... where do I go?

Does anyone know where I can find a voice interpreter and translator that I can use on an app? I want voice recognition on a few languages that get translated in to text. Where can I find this or where should I start? I am a rookie so any help is appreciated. ...

Microcontroller Serial Command Interpreter in C/C++; Ways to do it;

I'd like to interpret a command string, recieved by a microcontroller (PIC16f877A if that makes any difference) via serial. The strings have a pretty simple and straight-foward formatting: $AABBCCDDEE (5 "blocks" of 2 chracters+'$' for 11 characters in total) where: $AA= the actual name of the command (could be letters, numbers, both; m...

text based RPG command interpreter

I was just playing a text based RPG and I got to wondering, how exactly were the command interpreters implemented and is there a better way to implement something similar now? It would be easy enough to make a ton of if statements, but that seems cumbersome especially considering for the most part pick up the gold is the same as pick up ...

Zend Virtual Machine Advantages

Hi all, I was trying to understand the working of Zend with the help of this excellent article. Its when I found out that Zend Engine was a Virtual Machine. Now my question is whats the advantage of creating an intermediate code for scripting languages like php? I can understand that having Intermediate Code in the case of prog...

Implementing a direct-threaded interpreter in a functional language like OCaml

In C/C++ you can implement a direct threaded interpreter with an array of function pointers. The array represents your program - an array of operations. Each of the operation functions must end in a call to the next function in the array, something like: void op_plus(size_t pc, uint8_t* data) { *data += 1; BytecodeArray[pc+1](pc+1...

Convert Zval to char*

Hi all, I want to convert Zval to char*. how do i do that in my php extension? ...

Is it possible to embedd PHP as a scripting langage into a desktop application

I know that my customers know PHP because i'm working on a PHP Tool (Running as a MFC Desktop Program) Is it possible to embedd the PHP interpreter in a general purpose way like Python, Ruby, Lua or Javascript? And if yes - is it a hack or is there a clean solution. ...

Interpreter Speeds

I want to do my best on a cool personal project I have in mind, and I need to choose between an interpreter (slow and lightweight in memory) and a virtual machine (faster and heavy). Is true that interpreters are much slower than virtual machines, at a point which it is visible to the user? Somebody have done a comparison? Thanks! ...

Conventional ways to pass arguments to interpreted program

I'm writing an interpreter. The interpreter accepts arguments that it itself uses, including a file to interpret. The interpreted program should not see the interpreter arguments when it queries for arguments and should see arguments meant for the interpreted program. But that's not difficult to do. Instead, I'm interested in styles on h...

Ruby interpreter 1.8.7.0 [i386-mingw32] keeps failing

I have had this problem for a while, but now it is getting so bad that every 2-3 pageloads my local server is failing. activesupport-2.3.5/lib/active_support/core_ext/module/introspection.rb:73: [BUG] gc_sweep(): unknown data type 0x0(0x950f868) ruby 1.8.7 (2010-01-10 patchlevel 249) [i386-mingw32] This application has requested the ...

create my own programming language

Possible Duplicates: References Needed for Implementing an Interpreter in C/C++ Books On Creating Interpreted Languages How to create a language these days? Learning to write a compiler Possible Duplicate: Learning to write a compiler Ok so I'm only 13 years old. I know some c++, VERY good at php, pro at css h...

How does Forth implement the dictionary? (controversy)

I am studying Forth for a personal project I have on my mind. It looks to be a really cool and simple language to implement in a small virtual machine. I am especially impressed by the possibilities of the use of vocabularies on it. On the other hand, I think the way the dictionary works is overly complex for a language that is overall ...

Pseudocode interpreter?

Like lots of you guys on SO, I often write in several languages. And when it comes to planning stuff, (or even answering some SO questions), I actually think and write in some unspecified hybrid language. Although I used to be taught to do this using flow diagrams or UML-like diagrams, in retrospect, I find "my" pseudocode language has c...

Checking Version of Python Interpreter Upon Execution of Script With Invalid Syntax

I have a Python script that uses Python version 2.6 syntax (Except error as value:) which version 2.5 complains about. So in my script I have included some code to check for the Python interpreter version before proceeding so that the user doesn't get hit with a nasty error, however, no matter where I place that code, it doesn't work. On...

How to force interpreter show complete stack trace?

Is there any way to force Scala interpreter (started through SBT) to print complete stack trace. By default, less than 10 lines are displayed: scala> new CacheMonitoringClient javax.management.InstanceNotFoundException: com.bea:Name=DomainRuntimeService,Type=weblogic.management.beanservers.domainrun time.DomainRuntimeServiceMBean ...

Bash: not absolute script #! interpreter?

Is it possible to say to a script to search an interpreter not in an absolute location, but in his path? example: Having to write #!/usr/bin/php is totally retarded: what if the user have php installed somewhere else? Just writing #!php does not automagically works, of course, and I couldn't find anything about it, they just all treat...

Does Python use a complier or interpreter or a combination?

Possible Duplicate: CPython is bytecode interpreter? My question is: Does Python use a compiler, an interpreter or a combination of them? ...