inflearn logo

Creating your own programming language

This course is designed for those who want to create their own programming language.

19 learners are taking this course

Level Basic

Course period Unlimited

Rust
Rust
Rust
Rust

What you will gain after the course

  • Compiler

  • Language Design

  • Lexer Implementation

  • Parser Development

  • Creating an AST

  • Compiler Construction

  • LLVM IR Generation

  • Creating a programming language

  • Introduction to System Programming

  • Developing a code generator

  • Rust Hands-on Project


My own language, can I actually build it all the way to execution?

A language is not complete just by defining its grammar.
A code truly becomes a language only when you personally implement the flow of dividing tokens and passing them through a parser and an abstract syntax tree to be executed by a compiler.


First, we follow the process of the lexer breaking down the source code into tokens. You will see firsthand how numbers, operators, variables, and print statements are decomposed.

Next, you will build the structure of the code by creating a parser and an Abstract Syntax Tree (AST). You will implement a simple language using Rust and connect it to a compiler and output functionality.

Finally, you will decide on the target users, grammar, type system, and error handling methods yourself. You will move beyond simply using languages created by others and translate your own designs into code.

It is okay if the structures of compilers and parsers are unfamiliar to you.
The experience of starting from a single small token and completing a language that actually runs will be your next challenge.


From lexers and parsers to tokens and abstract syntax trees,
you will implement a compiler yourself using Rust.

Turn vague ideas into executable syntax, and move forward as a developer who creates their own language.




By the end of this course, you will


You will be able to design the entire flow of a programming language at a glance.

  • You will gain a step-by-step understanding of the process where source code is divided into tokens by a lexer, formed into an Abstract Syntax Tree through a parser, and finally converted into executable code. When encountering the structure of a new language, you will be able to explain the role of each component yourself and organize them into a language structure diagram.






✔️

Design the process of a single line of code being born as a language yourself.

Turning ideas into grammar and
completing them as an executable language

Understand the flow by connecting the roles of lexers and parsers to the differences between abstract syntax trees, interpreters, and compilers. By implementing structures to handle token definitions, syntax analysis, variables, and operators in Rust, you will transform the vague process of language creation into concrete steps.

From token decomposition to implementing output commands

Divide the string output code into tokens, organize numbers and operators into an Abstract Syntax Tree (AST), and ensure they are executed by the compiler. You will even write your own simple language code by directly defining the syntax style, type system, and error handling methods.

Rust practice code and language design materials

You can continue your practice based on the token definitions, lexer, parser, abstract syntax tree (AST), and compiler implementation code covered in the lecture. Through missions that organize the language's target audience, philosophy, syntax, and debugging direction, you will also establish design criteria for expanding features in the future.


📚

Complete your own language from scratch, from lexer to code generation, using Rust

Section 1

Concepts of Programming Languages and Motivations for Creating Them

Examine the definition and components of programming languages, and understand the reasons for designing and implementing your own language as well as the direction of study.


Section 2

Overall Structure of Language Implementation

Learn the roles of the lexer, parser, and abstract syntax tree, and compare the differences between interpreters and compilers. Understand the step-by-step processing flow through which source code is transformed into an executable file or execution results.


Section 3

Implementing a Simple Language with Rust

After setting up the Rust development environment, we will implement token definitions, a lexer, and a parser and Abstract Syntax Tree (AST) for handling numbers, operators, and variables. Subsequently, we will complete the compiler and output functions to practice the execution process of a simple programming language.


Section 4

Language Philosophy and Design Decisions

Design the syntax style, whether to introduce a type system, and error handling and debugging methods based on the target users and the language's philosophy. Organize key design choices to conceive a consistent language specification.


Section 5

Simple Programming Language Creation Practice

Based on the language design and implementation principles learned previously, you will write code for your own simple language. You will experience the creation process by directly defining the language's syntax and core operations.


Section 6

The Meaning of Creating Your Own Language

We reflect on the motivation for creating a programming language and the meaning of creation. We consider how language design influences our way of thinking and problem-solving.


We can solve the concerns
of people like this!

📌

Junior developers who have completed an introduction to programming

Those who have created small programs that handle numbers and operators, but are still unfamiliar with the process of source code being executed through tokens and syntax trees
Those who want to learn the entire flow of a compiler by hands-on implementation of a lexer, parser, and abstract syntax tree using basic Rust syntax

📌

Rust-based System Developer

Those who have handled memory and data structures with Rust and C, but lack projects that convert their own custom syntax into executable code
Those who want to expand their system programming capabilities by designing a simple language that handles variables, operators, and print statements, and by implementing the compiler and code generation process

📌

Aspiring programming language researchers and developers

Those who have studied parser and compiler structures but lack experience in designing language syntax, type systems, and error handling methods based on their own standards
Those who want to define the target users and philosophy of a language, flesh out the syntax, and create a starting point for a language creation project by writing their own simple language code




Notes before taking the course


Practice Environment

  • Windows, macOS, and Linux are supported.
    Rust development tools will be installed and used.

  • A document editor and terminal are required.
    At least 8 GB of memory is recommended.

Prerequisites and Important Notes

  • A basic knowledge of Rust or C is required.
    You must be familiar with variables, functions, and data types.

  • It covers lexers, parsers, and abstract syntax trees.
    Having experience in writing code will be advantageous for the hands-on practice.

Learning Materials

  • Lecture slide PDFs are provided.
    Review grammar design and compiler structure.

  • We utilize practice materials for tokens, parsers, and compilers.
    We will follow the entire production process of a simple language.


Recommended for
these people

Who is this course right for?

  • Someone who wants to create a programming language

  • Those who have learned the basics of Rust and C but need a challenge

  • Those interested in parser, lexer, and compiler structures

Need to know before starting?

  • Rust

  • Basic level of programming experience

Hello
This is lunastev

Career Verified

Wave programming language developer

Wave GitHub

GitHub

Curriculum

All

22 lectures

Course Materials:

Lecture resources
Published: 
Last updated: 

Reviews

Not enough reviews.
Please write a valuable review that helps everyone!

lunastev's other courses

Check out other courses by the instructor!

25% off for new members

$112.90

25%

$152.90