[IronPython] A few DLR questions

Artur Krosny maplab at gery.pl
Fri Jun 27 17:08:11 CEST 2008


First of all, I am sorry if this is a wrong group, but I
couldn't find a better place to ask questions about DLR.

I am trying to learn how to write a simple compiler which
targets DLR by analising ToyScript sources (and sometimes
looking at IronRuby sources too).

My idea is to use GoldParser to create a parser skeleton
for my learning curve. This allows me to concentrate on a
problem of generating DLR Ast, instead of spending time on
creating a parser by hand. The GoldParser part was rather
easy and a skeleton parser was ready quite quickly.

Now I am trying to "fill it" with a generation of DLR Ast.
I am trying to follow a "ToyScript way" of generating DLR
Ast, adopting its Ast classes and applying required changes.
However I encountered a problem with "Global varaiables".
My language has a statement "PUBLIC <var>[:=<value>]" which
declares a global var. And I fill a little bit "lost" :).
I see how "Local variables" are handled in ToyScript but
I have no idea how to handle globals.

Anyone could point me to the right direction ?



More information about the Ironpython-users mailing list