archives

Waste your CPU-resources on programming challenge

Al Zimmermann's Programming Contests has come up with a new problem that you can try to solve:

Pack n non-overlapping circles with radii from 1 to N into as small a circle as possible.

Try to find the best solution by mid January.

More info here.

Parsing and syntax reordering

I been doing some programming language design and I ran into something that I am sure as a name, and I thought I would ask too see if anybody could tell me what it is.

I found that the two syntaxes have the same effect (at least the way that I think of languages):

def x <-> x
defun x y z <-> x(y) z
set x 4 <-> x = 4
add x 4 <-> x += 4

ie. the first defines a variable x in the symbol table, the second defines a function x with an arguement y and a body z, etc.

Now the question is: what is the name of a parsing and reordering scheme for transforming the form on the right to the form on the left? I'm not sure if I am using the correct terminology, but basically I'm looking for the algorithm that could be used to convert tokens (or a parse tree maybe?) from the form on the right to the form on the left.

Any help appreciated.

--
kruhft
kruhft.blogspot.com