Skip to content

Introduction

skyrabbit edited this page Jun 13, 2019 · 10 revisions

This is the official reference for the mGroupy programming language.

Warning: This is incomplete.
Documenting everything takes a while.
See the GitHub issues for what is not documented in this.

Policy

simple and friendly

Notation

kind notation
classes CamelCase
constants UPPERCASE & snake_case
variables lowercase & snake_case
annotation @annotation

Dictionary

word meaning
IR Intermediate Representation
AST Abstract Syntax Tree

Contents

flowchart of processing mGroupy programs
// .grp file

  1. Bundler
  2. Reformer
  3. Runtime

Bundler

Content Detail
Lexical Analyzer* flex
Syntax Analyzer* bison
AST Builder* IR = AST + namespace
Linker embed standard library & resolve dependency

Reformer

Content Detail
Static Analyzer infer type & check error
Optimizer Optimize IR

Runtime

Content Detail
Virtual Machine* interpret IR
JIT compiler compile IR Just In Time
Garbage Collector collect garbage & manage memory
Runtime Library start up mGroupy