in cmd use :
python scanner.py filename
Abstract Language Compiler 抽象话词法分析器
Emoji characters can be used as identifiers like:
🐎 = 1.14514 args = 🌶💩💉💧🐮🍺
In light of poor utf8 support in cmd and other terminals, output is printed in result.txt .
~~Type python lexical_scanner.py youTestFile
in cmd and find result.txt to see the output. ~~
refer function to get result
- python3
- django2
~~+ in lexical scanner divide special characters into ALOP(arithmetic and logical operators) and VOP(value giving operators) alop -> + | - | * | / | > | < | >= | <= | != | == #算数逻辑运算符 双目 vop -> = | += | -= | *= | /= #赋值运算符
~~ + principles extention ~~ ~~ + django for visualization ~~