JOCKY documentation

Learn the language, understand how the compiler works, and find the guides you need to contribute.

Language documentation

The JOCKY language guide

The complete guide to JOCKY, from first steps to compiler internals. It's written alongside the compiler in the repository's docs folder and republished here on every change.

Loading the documentation index…

Compiler pipeline

JOCKY source passes through these stages on its way to machine code. Each stage is its own part of the compiler, and each one is open to contributions.

  1. Lexer
  2. Parser
  3. AST
  4. Semantic analysis
  5. Type checking
  6. LLVM IR generation
  7. Optimization passes
  8. Machine code
StageWhat it does
LexerTurns source text into a stream of tokens
ParserBuilds an abstract syntax tree (AST) from the tokens
Semantic analysisResolves names and scopes, and checks that the program makes sense
Type checkingVerifies that every expression and operation has a valid type
LLVM IR generationLowers the checked program to LLVM intermediate representation
Optimization passesTransforms the IR to make the generated code faster and smaller
RuntimeRuntime components and standard libraries that compiled programs link against

JOCKYShield

JOCKYShield is JOCKY's code-transformation system. Read JOCKYShield and Code Transformation in the contributing guide before working on it.

Contributor guides

Sections of CONTRIBUTING.md for people working on JOCKY itself.

Getting help

Can't find what you need? Ask in GitHub Discussions. If the documentation is wrong or unclear, open an issue or send a pull request. Documentation contributions are especially valuable.