Skip to content

A toy compiler for a C-like language using Flex, Bison, and LLVM. Supports function calls, variable declarations, arithmetic, and expression evaluation

Notifications You must be signed in to change notification settings

yi-json/cc-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Installation

LLVM

Downloading llvm on macOS:

brew install llvm

Add the llvm-config tool to your system's PATH environment variable. Open up the .zshrc file

code ~/.zshrc

then add this:

export PATH="/opt/homebrew/opt/llvm/bin:$PATH"

then refresh:

source ~/.zshrc

Confirm that llvm-config works now via

llvm-config --cxxflags

Bison

brew install bison

Add Bison to your path:

code ~/.zshrc

then add this:

export PATH="/opt/homebrew/opt/bison/bin:$PATH"

then refresh:

source ~/.zshrc

Flex

brew install flex

Add Flex to your path:

code ~/.zshrc

then add this:

export PATH="/opt/homebrew/opt/flex/bin:$PATH"

then refresh:

source ~/.zshrc

About

A toy compiler for a C-like language using Flex, Bison, and LLVM. Supports function calls, variable declarations, arithmetic, and expression evaluation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published