Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

16 Commits

Folders and files

Repository files navigation

Simple-OurC-interpreter

Introduction.

截圖 2022-04-06 下午1 43 31

依照上圖的文法,利用Recursive Descent Parsing,實作出interpreter.

不斷讀取指令直到遇到'quit',且'quit'只有在第一個token時才會被視作為停止interpreter

Token Types

IDENT starts with a letter and is followed by digits or letters or underlines.
NUM is either an integer or a float number. ( Could be 1, 1.2, 0.5, .73 and 05 )
SIGN is delimiter

Files

main.cpp 是全部的程式碼
test_file.txt 是額外寫的測試檔案

Example

Input:

截圖 2022-04-06 下午9 39 49

Output:

截圖 2022-04-06 下午9 40 18

Input:

截圖 2022-04-06 下午9 47 06

Output:

截圖 2022-04-06 下午9 47 38

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages