/GNC

GNC is Not C. It is intended for a better and more effective c language.

Primary LanguageRustMIT LicenseMIT

GNC

Build And Test

GNC is Not C. It is intended for a better and more effective c language.

Grammar Features

  • int main() ...
  • declare local int variable
  • unary operation
  • binary operation
  • conditional statement
  • loop statement
  • scope
  • function
  • global variable
  • more types
  • cast expression
  • pointer
  • string
  • scanf() and printf()

Other Features

  • Pest as frontend
  • LLVM as backend
  • Parse tree and AST visualization using AntV
  • HLVM (High Level Virtual Machine Interpreter)
  • Full compiler capabilities in the browser using WASM

Build

GNC Cli

$ cargo build --package GNC --bin GNC

GNC Online

$ cd forntend
$ yarn
$ yarn build

Test

Environment

# install zx
$ npm i -g zx

Run

$ cd test
$ zx ./minidecaf-test.mjs