Hello. I am attempting to build a rudimentary interpreter in Scheme, and I want to use an association list to map to arithmetic functions. This is what i have so far:
; A data type defining an abstract binary operation
(define binoptable
'(("+" . (+ x y)))
("-" . (- x y))
("*" . (* x y))
("/" . (/ x y)))
)
The problem is...
My Shell should understand PATH environment variable. It can be set and modified. It runs in two ways -interactive & batch mode. Shell is capable of taking more than one job like ls;ps;wc file;cal.
I know I will have to use execs, forks and pipes but just cant get started.
Thank you in advance.
Edited:
PS:Not a homework question. Newb...
I've been programming for years (mainly Python), but I don't understand what happens behind the scenes when I compile or execute my code.
In the vein of a question I asked earlier about operating systems, I am looking for a gentle introduction to programming language engineering. I want to be able to define and understand the basics of ...
PS.Where to read about parsing theory?
...
I'm trying to find examples of interpreted languages ported to the iPhone, with source code available to show how to embed it, without Jailbreaking the device:
I've found:
Ruby: http://www.cocos2d-iphone.org/forum/topic/1163
Lua: http://www.mobileorchard.com/announcing-iphone-wax-native-uikit-iphone-apps-written-in-lua/
and I'd like...
I like IPython a lot for working with the python interpreter. However, I continually find myself typing exit to exit, and get prompted "Type exit() to exit."
I know I can type Ctrl-D to exit, but is there a way I can type exit without parentheses and get IPython to exit?
Update: Thanks to nosklo, this can be easily done by adding the...
I'm writing a small functional programming language in Haskell, but I can't find a definition of how (==) is implemented, as this seems to be quite tricky?
...
Hello,
I have just downloaded the last Wictionary dump from their backup and I would like to display the content of some articles in HTML format.
The articles contents come the way they were written: using the wiki syntax, full of internal links, formatting symbols, abreviations and category keywords.
Are you aware of any tool I could...
Here is the code. What I need to do is find a way to make 'i' global so that upon repeated executions the value of 'i' will increment by 1 instead of being reset to 0 everytime. The code in 'main' is from another script that I embed in 'main' in order to have the trace function work. This is all being done from Java.
from __future__ imp...
I have written a compiler for C that outputs byte code. The reason for this was to be able to write applications for an embedded platform that runs on multiple platforms.
I have the compiler and the assembler.
I need to write a linker, and am stuck.
The object format is a custom one, designed around the byte code interpreter, so I ca...
Suppose I want to implement an interpreter for a functional language. I would like to understand the issues involved in doing so and suitable literature that is available. This is a new language that is in early design stages, that is why the question is broad in scope.
For the purpose of this discussion we can assume that the purpose o...
Hey stackoverflow,
I have written a pretty simple Windows service in C# that starts up automatically and runs A-okay. I was wondering the best method to have the service accept command-line input -- it will always be from the same user (admin), and the service itself is fully trusted (LocalSystem).
I know a little (very little) about d...
I've seen jint in Codeplex. It looks very interesting. Have you used it? Is 0.8.4 stable and usable in your opinion? (production quality?)
...
I don't really get the concept of "bytecode interpreter" in the context of CPython. Can someone shed some light over the whole picture?
Does it mean that CPython will compile and execute pyc file (bytecode file?). Then what compile py file to pyc file? And how is Jython different from CPython (except they are implemented in different la...
Possible Duplicate:
Whats with the love of dynamic Languages
I have already read this, but I do not get it.
What use is making your own interpreter. Also, it says platform independence. After all the degree of platform independence is limited by what all platforms your interpreter can run on. So, I don't see any advantage.
Als...
Is there a secure Python intepreter?
Imagine a Python VM you can run on your machine, that restricts the operations.
No files can be opened, no system calls, etc.
It just transforms stdin to stdout, maybe with text processing + math etc.
Does such a secure Python VM exist?
...
Is it possible to include a jar file run running the Scala interpreter?
My code is working when I compile from scalac:
scalac script.scala -classpath *.jar
But I would like to be able to include a jar file when running the interpreter.
...
I am trying to make a toy language in c++. I have used boost spirit for the grammar, and hopefully for parser/lexer. The idea is a toy language where 'everything is an object' like javascript and some implementation of prototype based inheritance. I want to know how to implement the 'object' type for the language in c++. I saw source cod...
Ok guys, today's goal is to build a Turing machine simulator. For those that don't know what it is, see the Wikipedia article. The state table we are using today is found at the end of the Formal Definition that's part of that page.
The code will take a sequence of "0" and "1" string characters, an integer representing the character tha...
The interpreter and dynamic compiler would be for testing/prototyping and when im done testing i use the static compiler.
...