forked from M-Labs/nac3
1
0
Fork 0
New ARTIQ compiler, third iteration
Go to file
pca006132 1fea51d9b3 Merge pull request 'nac3parser: add comment support' (#68) from with_nac3comment into master
Reviewed-on: M-Labs/nac3#68
2021-11-05 20:46:42 +08:00
.cargo runkernel: sort out cargo rigmarole with rustc link arg 2021-11-01 00:28:27 +08:00
nac3artiq nac3artiq: move demo to dedicated folder 2021-11-05 18:28:31 +08:00
nac3ast nac3ast: generated ast with comment fields 2021-11-04 15:01:50 +08:00
nac3core Merge branch 'master' into with_nac3comment 2021-11-05 20:46:29 +08:00
nac3parser nac3parser: add and fix tests due to comment support 2021-11-04 15:03:34 +08:00
nac3standalone integrate nac3parser 2021-11-03 17:11:00 +08:00
runkernel runkernel: sort out cargo rigmarole with rustc link arg 2021-11-01 00:28:27 +08:00
.gitignore nac3embedded: basic source extraction 2020-12-18 23:45:09 +08:00
Cargo.lock integrate nac3parser 2021-11-03 17:11:00 +08:00
Cargo.toml integrate nac3parser 2021-11-03 17:11:00 +08:00
README.md README: update 2021-11-03 17:22:14 +08:00
flake.lock flake: update nixpkgs 2021-11-03 21:54:27 +08:00
flake.nix fix and run parser tests 2021-11-03 17:39:48 +08:00

README.md

NAC3 compiler

This repository contains:

  • nac3ast: Python abstract syntax tree definition (based on RustPython).
  • nac3parser: Python parser (based on RustPython).
  • nac3core: Core compiler library, containing type-checking and code generation.
  • nac3standalone: Standalone compiler tool (core language only).
  • nac3artiq: Integration with ARTIQ and implementation of ARTIQ-specific extensions to the core language.
  • runkernel: Simple program that runs compiled ARTIQ kernels on the host and displays RTIO operations. Useful for testing without hardware.

The core compiler knows nothing about symbol resolution, host variables etc. nac3artiq and nac3standalone provide (implement) the symbol resolver to the core compiler for resolving the type and value for unknown symbols. The core compiler only type checks classes and functions requested by nac3artiq/nac3standalone (the API should allow the caller to specify which methods should be compiled). After type checking, the compiler analyses the set of functions/classes that are used and performs code generation.

value could be integer values, boolean values, bytes (for memcpy), function ID (full name + concrete type)