Create a simple interpreted programming language and implement its interpreter

background

Recently brushed up on the tutorial of the big guy, follow along

Effect

starting time

After entering name and age

the code

Self-created programming language SimpleScript: Create a simple script to support Chinese programming (gitee.com)

analyze

1. Lexical analysis

Accurately divide each character string of the program to form multiple word tokens

2. Syntax analysis

Divide each section of Token again to form multiple statements Statement

3. Semantic Analysis

Interpret and execute each statement to form the above effect

epilogue

The grammar part is relatively simple and is for reference only.

Guess you like

Origin blog.csdn.net/qq_36694133/article/details/131744007