Skip to content
AkaneMurakawaPublic

About

Mini C script interpreter

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

mini-csi

Mini C script interpreter

  • support basic arithmetic calculation and decimal calculation.
  • support negative numbers and parentheses

Basic structure of simple interpreter

Lexical ———Token———> Parser ———AST———> Interpreter

Example

Hello, C script interpreter
>> -1+2*3-(4+5)/3
tokenKind=3, value=-
tokenKind=1, value=1
tokenKind=2, value=+
tokenKind=1, value=2
tokenKind=4, value=*
tokenKind=1, value=3
tokenKind=3, value=-
tokenKind=6, value=(
tokenKind=1, value=4
tokenKind=2, value=+
tokenKind=1, value=5
tokenKind=7, value=)
tokenKind=5, value=/
tokenKind=1, value=3
2

Compiler and Run

gcc main.c -o main

./main

Refrence

  • 《自制编程语言》 [日] 前桥和弥

About

Mini C script interpreter

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages