Skip to content

pal-stdr/kaleidoscope-toy-parser-tuto

Repository files navigation

Kaleidoscope Parser Tutorial

TUTORIAL INDEX (git branch wise)

Chapter 0: SETTING-UP BOILERPLATE

  • ch-0-0-init-basic-boilerplate: Setup of the basic boilerplate with g++ compiler.
  • ch-0-1-add-llvm-clang-compiler: Setup the clang++ compiler to build this project.

Chapter 1: SETTING-UP LEXER

  • ch-1-0-parse-and-print-toy-input-code: Parse toy example code as input and print in terminal.
  • More coming....

Chapter 1-0 (ch-1-0-parse-and-print-toy-input-code branch)

Objective

How to Compile

./build.sh

How to run the binary?

# Parse an example toy input code and check the output in the terminal
./build/kaleidoscope-parser test-code-samples/Examples/kaleidoscope/test-cases/1.parse-func-defn.toy

Project Scaffold (Upto now)

├── build
│   └── kaleidoscope-parser # bin to run
├── build.sh # <== Compile (& or run)
├── docs
│   ├── GIT-DOCS
│   │   └── 1.PLAY-with-GIT-SUBMODULES.md
│   └── KALEIDOSCOPE
│       ├── 0.SETTING-UP-BOILERPLATE
│       │   ├── 0.INIT-BOILERPLATE.md
│       │   └── 1.ADD-and-BUILD-CLANG-LLVM-COMPILER.md
│       └── 1.SETUP-LEXER
│           └── 0.PARSE-and-PRINT-SIMPLE-TOY-INPUT-CODE.md # <== newly added doc
├── README.md
├── scripts
│   └── build-llvm-19.sh
├── src
│   ├── include
│   └── kaleidoscope-parser-main.cpp # <== Main "*.cpp" file
└── test-code-samples # <== newly added
    └── Examples
        ├── kaleidoscope
        │   ├── basic_toy_sample.toy
        │   ├── extern_toy_sample.toy
        │   └── test-cases
        │       └── 1.parse-func-defn.toy
        └── Toy
            ├── Ch1
            ├── Ch2
            ├── Ch3
            ├── Ch4
            ├── Ch5
            ├── Ch6
            └── Ch7

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published