-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
21 lines (18 loc) · 834 Bytes
/
test.py
File metadata and controls
21 lines (18 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from command_parser import ParserSystem,CommandTree,CommandTransfor
import heartrate,time
#heartrate.trace(browser=1)
str1 = 'execute@s[r = 1, name="阿大的那",hasitem=[{item=aaa}]] ~ ~ ~ detect ~ ~ ~ bedrock 1 say aaa'
#str1 = ''
Tokenazier = ParserSystem.Command_Parser(CommandTree.Command_Tree)
Token_List = Tokenazier.parser(str1)
if isinstance(Token_List,tuple) :
print("######################## ERROR #########################")
print(Token_List[0])
print("########################################################")
else :
print("######################## Token #########################")
print(Token_List)
print("########################################################")
command_transfor = CommandTransfor.Start_Transformer(Token_List)
print(command_transfor)
exit()