The ARF programming language
This repository has been archived on 2024-02-27. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Sasha Koshka b3e2d9f822 Progress on data structures for type sections
Type specifiers will now store a list of members, instead of
type sections doing that. This will make it possible to do an
inline object definition within a data section, = phrase, etc.

The parser will be reworked to include syntax that supports this,
objects and types will be merged into just a type section, and
face sections will have the added capability of defining function
pointer types.
2022-09-09 20:57:41 -04:00
analyzer Progress on data structures for type sections 2022-09-09 20:57:41 -04:00
arfc Fixed import paths 2022-08-30 01:11:10 -04:00
assets Update heatmap 2022-09-05 13:49:15 -04:00
examples Updated other test cases and examples to match 2022-09-05 11:35:32 -04:00
file Error widths now work properly 2022-08-18 02:04:49 -04:00
infoerr Fixed import paths 2022-08-30 01:11:10 -04:00
lexer Lexer no longer freaks out when parsing a 0 2022-09-03 20:27:03 -04:00
parser Syntax tree now stores map of require names -> full paths 2022-09-07 17:12:46 -04:00
tests Syntax tree now stores map of require names -> full paths 2022-09-07 17:12:46 -04:00
types Added cool little generic stack 2022-09-09 01:39:04 -04:00
.gitignore
go.mod Fixed import paths 2022-08-30 01:11:10 -04:00
LICENSE
README.md Update readme and heatmap 2022-09-05 12:47:03 -04:00

ARF

The ARF programming language.

This is still under development and does not compile things yet. Once complete, it will serve as a temporary compiler that will be used to write a new one using the language itself.

The old repository can be found here.

ARF is a low level language with a focus on organization, modularization, and code clarity. Behind it's avant-garde syntax, its basically just a more refined version of C.

A directory of ARF files is called a module, and modules will compile to object files (one per module) using C as an intermediate language (maybe LLVM IR in the future).

Design Aspects

These are some design goals that I have followed/am following:

  • The standard library will be fully optional, and decoupled from the language
  • The language itself must be extremely simple
  • Language features must be immutable (no reflection or operator overloading)
  • Prefer static over dynamic
  • Data must be immutable by default
  • Memory not on the stack must be allocated and freed manually
  • Language syntax must have zero ambiguity
  • The compiler should not generate new functions or complex logic that the user has not written
  • One line at a time - the language's syntax should encourage writing code that flows vertically and not horizontally, with minimal nesting

Planned Features

  • Type definition through inheritence
  • Struct member functions
  • Go-style interfaces
  • Generics
  • A standard library (that can be dynamically linked)

Checklist

  • File reader
  • File -> tokens
  • Tokens -> syntax tree
  • Syntax tree -> semantic tree
  • Semantic tree -> C -> object file
  • Figure out HOW to implement generics
  • Create a standard library

Compiler Progress

Progress heatmap
  • Yellow: needs to be completed for the MVP
  • Lime: ongoing progress in this area
  • Green: Already completed