C'Dent - A Portable Module Programming Language
C’Dent is a programming language that:
Currently the best way to install C’Dent is to get the source code and install it like so:
> git clone git://github.com/ingydotnet/cdent.git > cd cdent > sudo python setup.py install
You will need setuptools for Python to run the last command. On Debian-based systems, this can be installed with:
> sudo apt-get install python-setuptools
After you install C’Dent, you will have a
cdent compiler in your Unix path.
Try running this command:
You’ll need a program written in C’Dent. There are some in your C’Dent
repository clone. One example is
tests/modules/world.cd.py which looks like
"""\ This is World class :) """ class World(): def greet(self): print "Hello, world"
You can compile to Ruby with this command:
cdent --compile --in=tests/modules/world.cd.py --to=rb
# *** DO NOT EDIT *** This is a C'Dent generated Ruby module. ### # This is World class :) ### class World def greet puts("Hello, world") end end
You can compile it to many other languages by changing the value of
C’Dent can currently parse modules with a simplistic grammar of Module/Classes/Methods/Print/Comments to an AST form and generate equivalent output modules in many languages:
C’Dent can currently parse:
C’Dent can currently produce:
Join #cdent on irc.freenode.net.
C’Dent is Copyright (c) 2010, Ingy dot Net
C’Dent is licensed under the New BSD License. See the LICENSE file.