Skip to content

Latest commit

History

73 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

GridC

GridC gives GridLang a nice, C-ish syntax.

Online editor/compiler

http://lessandro.com/gridc/

Dependencies

Instructions

  1. If you just installed cabal, run cabal update
  2. On the gridc project folder, run cabal install
  3. The executable should be in ~/.cabal/gridc
  4. ./gridc input.gridc > output.gridlang

GridC

int factorial(n)
{
if (n == 0) {
return 1;
}
f = factorial(n - 1);
return n * f;
}

The language works as you expect it to work, with a few caveats:

  • Type declarations don't matter.
  • Everything is a number (int or float).
  • There are no void functions.
  • Functions without a return statement return 0.
  • Variables are created on assignment.
  • The compiler does not check function calls.

Have fun writing GridC!

About

The GridC programming language

Resources

Stars

5 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages