Skip to content

mikespallino/lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lang

This is a repo for my work on developing a language. Most of the begining will be me going back through Language Implementation Patterns by Terrance Parr. I'm currently writing this in C++ to refresh my brain and learn more about implementing software in C++.

Current progress is an LL(1) Recursive-Descent Parser for the following grammar:

list     : '[' elements ']' ;
elements : element (',' element)* ;
element  : NAME | list ;
NAME     : ([a-zA-Z]+)+ ;
WS       : ([\ \t\r\n]+)+ ;

Dependencies

Building

make

Tests

make test_lang

Usage

./lang '[a, b]'
./lang '[asdf,sdf,[ert,sdf],dfs]'
./lang '[asdf,]'
./lang '341'

LLVM

I've recently started going through the LLVM tutorial on implementing a language here. The LLVM folder will be updated as I go through the sections. The code in there is up to the end of chapter 3.

Build that with the following:

clang++ -g -O3 kaleidoscope.cpp `llvm-config --cxxflags --ldflags --system-libs --libs core` -o kaleidoscope

About

Language Development Repository - Exploring LLVM and the Language Implementation Patterns book

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published