Skip to content

Chasiny/simple_compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Compiler

Build Status

Run

go get github.com/Chasiny/simple_compiler
cd $GOPATH/src/github.com/Chasiny/simple_compiler
go run main.go

Lexical analysis

Lexical analysis

prase regexp to nfa, and convert nfa to dfa,
input the program and output its words.
The effect is as follows:

Lexical analysis Lexical analysis

Grammar analysis

input the grammar and generate the fisrt set,follow set and grammar tree,
input the analysis string and output the analysis process.
The effect is as follows:

Lexical analysis

Simple compiler

using int dfa, and simple four arithmetic grammars,
input a simple program and output is all variables value.
The effect is as follows: Lexical analysis

About

a simple compiler,from regexp,nfa,dfa,ll(1) to a simple compiler

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published