Chaga Programming Language

Documentation

Downloads

Project status

  • First priority: implementing selection statements in Chaga compiler.
  • COMPLETED: implementing Boolean datatypes in Chaga compiler.
  • COMPLETED: string-based integer remainder (modulo function) in Chaga string arithmetic library.
  • COMPLETED: string-based integer division added to Chaga string arithmetic library.
  • COMPLETED: string-based integer multiplication added to Chaga string arithmetic library.
  • COMPLETED: string-based integer subtraction added to Chaga string arithmetic library.
  • COMPLETED: string-based integer addition added to Chaga string arithmetic library.
  • COMPLETED: The Chaga compiler is now generating Intel x86 assembler instructions for simple Chaga programs that write text to the screen. I can assemble and link these instructions to make executable Chaga programs.
  • COMPLETED: tokenizer.
  • COMPLETED: symbol table.
  • Partially completed: Concrete Syntax Tree (CST). The CST is a gigantic deterministic finite automaton using recursive descent parsing. Thus far I'm completely parsing the following statements:
    • define (for functions, procedures)
    • declare (for variable)
    • print (for integer and Boolean datatypes and static strings)
    • set (for integer and Boolean datatypes only)
  • Partially completed: Abstract Syntax Tree (AST) and intermediate code generation.
  • Partially completed: x86 assembly language subroutines to access argv and argc variables from GNU/Linux operating system, Also have x86 assembly language to read from standard input and write to standard output with a character buffer. Lastly, I have x86 code to generate output from static character string buffers. All assembly language programs run under GNU/Linux.
  • To do: Brainstorming on techniques for automatic garbage collection (memory management for memory requested on-the-fly from the heap). I would like applications written in Chaga to be safe from memory-leaks.

Tentative features to add

  • Allow main procedure to accept environment variables, argv and argc from the operating system.
  • Add built-in support for coroutines
  • Add built-in support for blocking and non-blocking threads
  • Add support for new datatype: pipes.
  • Add support for new datatype: socket.
  • Add support for new datatype: shared memory.

Copyright © 2025, 2026 Robert James Bruce.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is available at https://www.gnu.org/licenses/fdl-1.3.html