Metalinguistic capability of Python? 
Author Message
 Metalinguistic capability of Python?

I'm looking to create a simulation environment (using stackless
python & continuations) that would need a pseudo simulation
language to go along with it. In Lisp, I might make heavy use
of macros in order to accomplish what I want. Is there any
sane way to go about approaching this in Python, or is this
a lost cause? (I don't believe that what I want to accomplish
can be accomplished with methods or functions).

C/



Sun, 20 Oct 2002 03:00:00 GMT  
 Metalinguistic capability of Python?

Quote:

> I'm looking to create a simulation environment (using stackless
> Python & continuations) that would need a pseudo simulation
> language to go along with it. In Lisp, I might make heavy use
> of macros in order to accomplish what I want. Is there any
> sane way to go about approaching this in Python, or is this
> a lost cause? (I don't believe that what I want to accomplish
> can be accomplished with methods or functions).

This is a lost cause -- Python has no macro system.

Depending on how badly you need it, you might want to look at John
Aycock's SPARK parsing system. It has a Python grammar as an example,
and you could probably subclass and extend it with the productions you
need, and then rewrite them into Python code.

If you want to build a generic language extension system for Python,
I'd recommend taking SPARK, and then implementing some of the ideas
described in the paper:

  Luca Cardelli, Florian Matthes, and Martn Abadi. Extensible syntax
  with lexical scoping. SRC Research Report 121, Digital Equipment
  Corporation Systems Research Center, February 21, 1994.

You can find it online at:

  http://research.microsoft.com/Users/luca/Papers/SRC-121.pdf

Neel



Thu, 24 Oct 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Python with the VBA recording capabilities

2. Editors with Python or Active Scripting capability?

3. Capabilities of python?

4. Python timer capability?

5. Tcl vs Python in graphics capabilities

6. Python FTP-Class w/ Resuming-Capabilities -- General Questions

7. Tcl vs Python in graphics capabilities

8. The Collective Capabilities of Available Smalltalk Systems

9. Enhancing J file capabilities

10. Dolphin capabilities(newbie question..)

11. Dos Capability: APL on iPAQ vs. HP200Lx

12. Capability based security in Smalltalk?

 

 
Powered by phpBB® Forum Software