Hlang--write a programming language in Python-logic operation

Preface

In the previous article, the basic variables were implemented, and the basic principles were explained in detail. Therefore, what is to be realized here is this judgment. Since the shelf is basically set up, the following operations cannot be determined as one of the AST. Execution order is a situation we want the interpreter to execute.

So the effect to be achieved here is this:
Insert image description here

The implementation here is relatively simple. If you understand it before, it just requires more operations.

Key words

So as usual, we need to define our keywords first.

First define our type, and legal characters:


TT_INT = "整数"
TT_FLOAT = "浮点数"
TT

Guess you like

Origin blog.csdn.net/FUTEROX/article/details/132380062