最終還是基於Anltr4+Python進行的語法解析,還是向Antlr屈服了(實在是懶得自己完全從0開始寫
仍然還在苦苦開發之中,敬請期待!
开发阶段debug测试
pip install antlr4-tools #安裝antlr4語法解析工具
pip install antlr4-python3-runtime
anltr4 #測試是否安裝成功
詳細的使用自己參考anltr-官方文檔
fY(,'.`?d@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$BMb0Xx/)]<!llllll!>+?1/xunnr/{?l'. .........
C)"...lvW$$$$$$$$$$$$$$$$$$$$$$$$$@WkZn{>:'. .`";<?)j/--]->;^. ..
ci.. .[b@$$$$$$$$$$$$$$$$$$$$$8aQj]!"' .. .. `:l>_{\ft{i' .
(: . ,U%$$$$$$$$$$$$$$$$$$$8wj?!^ .,i^. .:~)vc/<`...
!`..'_a$$$$$$$$$$$$$$$$$Bhz[: . ..."{?`.. ... "+fzv{l'.
". ':n%$$$$$$$$$$$$$$$@bx!. '. .. .'"]\"... .. . .^_nYj~` ....
.. '+d@@$$$$$$$$$$@$BhjI'''.. ..l)~.... . .I\Jz-^.......
..;nM$$$$$$$$$$$@@oz<. `'.. .^i_".... .'I(Uc?^''...
...-p%$$$$$$$$@@$Bw[` ''...... ... ."l:'. ... lnqj^...
..`jM@@$$$$$$$$$Mz!..........^>-" . .,!^.. ....^[Znl..
..;O@$@$$$$$$$$k{^.''..... '<(}i' . '\zI.. .`"' . ..... +0L>
.'[#$$$$$$$$$Bp?. '....'..!(x>'. >qLl .',-?l`.. ....._UY!' ...
`u%@$$$$$$$&X+`'......`']v(:...... .^'... !cmJ?' .''"~|1, .. .'.Ix)^ ...
'+b$$$$$$$$Wr, .'....'.:\u<`... ... `-~"'.. :rz-nn: . ...';{t<' . .. '-/i....
:r&$$$$$$$8LI........'>xrl... .... '<):.. ^fY~^1C+`:,... . `]x}^ . :\ci .
>O@$$$$$$8C<'.. .....!x/: . '^l:. "\)",!+?xwcf)tmu?YYi.'. . ..!x|^ . ."vU;..
fa$$$$$$$m+''. . <n)".. .:)]^ .iu]`:I)mL_>>i<(qwq%0>'....'l]!''..... . :/\l. <wcI .
L&$$$$$$W(`........lf\".. .<u_ '[U< ;(Yt!. . 't0fL8w/"....,jQ(, ..^ll'.....:)\l.. '\br`
a@$$$$$BCI........'[|:......... '+z_..'}Q{?vu~'''''''.;Y0|QpZr:..'."tpQ+` .`l{[;' .'"}?^. lLb+
8$$$$$@a]........ "+l...........'Ix/"..-OL(+" .''''''..ixJ/czYX]^...^|qqx]:. ^?/(!'...`l^. . ..'(hx.
@$$$$$Mu: .......`"^'... ...... '>c): !Cz;....''.'''''',tJ\tUcYu_^ ^~uvjrf?,."-fj],'.<1!'. ...~OZI
@@$$$@w+' ..... :[{' .. ...+Uv!"|Q_'. .. .'.^)Ux\xnjcu{!" l(j}[/r\}<!]tf|]rhY:.. ..iYb_.
@@$$$&x: ...... +n{.... ....?cnx)+uz~.,!?(ttt/?I' ..ltX\jX)]|xxrf(xQ1:"i[\///(|tYaOI ... ..!cb?.
@$$$$k<'. _U)'... 'xc>:{\ndwUznt{}{)rCqz?"'.'>{fYC/"',l>_{cYcucXJCJn}]tQ*OI.... ...!Yb_.
@$$$Bz". +Ut` .. "Uv! '>cZz1l`.`"..."]Yz+`.. 'Il:'.. !|x\}_ill>[r00xuM&Y:.... '~Qp<.
$$$$M{......... icv` .. ..:QxI."-{l'`?1:!t?^...'`''.... .....,;". .'.:\JL#Mr^ .{kY;..
$$$8Li ....... .;j0;. ..'. ..;Ox;.'..<]:-X?,tL<'''..... ....... . .,:"{]:l:(Mb?..... .)p1'.
@@$h1" ..... `?0\' .. ."}! ...^JJ~.'..!j?;/f:izr^......... ...... '-\>]t~?(chj" '... ')m]. ...
$@BUI...... ':". `\O1" .":.^tf: . \q|''.."{),l(!'>?`............ ...... .<r_I\~!YkLi..'....'>};`\O+. ....
$$a?`.'.....>]I...^/Qf,.<x],!YY+ !JQ+....'`.... . ...!}~...... .^!,.`"1qXl' ......;cL]>YQ;
@M\^'.....'>)l..'..`-UU?:>fu{+jJj+" !cul.... ...,>}|\)?l' ......;~I...... 'lrC(;'i>`... :fCj_[mu`
Mx,......'+/~'.'... ,{cz)<{xzcvCQUn\|c\l'..'`:{r/{-~-fYY{".''... ...... .',_jc\<>{X0|". ivU/j[zU>'.
x; .+r[' ....';:' lJBoUva$@WapCzr)~".'.'l\Y>......:)0Y+^'.... .. "\wpYf(zbMkt:.`:}CX?{fYm[`'.
".... lx[^......lt?`>zW@dXZ@$$@$Wci`......'"?Jr~";{<`. :zZ['... ... ...'"~1)?+-LaL-,I[cLc-!xZQX+''..
..... .Ir|`. .....-n>;Y&%wjY8$@$$$@8kr: .'''.'`!)rjcpX<:'.]qY, .':~!^'`^`.. '+cpt<]\ff}i^.,?{~"..'..
..... Ijc;.. ....'|v_x8%QndB&&B@@avrhWY_,...... ':~(rcvjtYdxl<---]]}{/f+^''....l(cr?:^"^'...... .'...
. .. ')m{. . ..`tYzWMYchkc?]XkJ-`"t0CCY):. ...... .."Ii<?]+-{|}}))[i^^'....l)fLt:. ...................
,JYl ....'.`taaqXQm/l`'}c(^ ..")J{-rCz)I. ..... .. . . . ,]nb%$$Mt,. ... . ....
<](ffuqt, .......`j&mXZv>`'`?\l'.... .)Q/;!|COz|i"' ............ `l-tzcubB$$@o). .
0OZdM%MJ]`.... ..'\MaU-`.''.}c~...... .-CY>'`}Uh#wc)+l". .`">{rYJc(>^;C$$$$$w_. .....
_-!,;[p&n".. . .. -aJI.''...lX\"....... ,\0v! .!n*@$%#pUx/(?>~](cOdQ\->:!I.',zmufjQpwc-. ...
~,'''^thj'. .. I0b)''. . .fQ] ....... .>nCf<`.!(Q#B$$WQj)_?vbB$$Ll'.'!]I.'jx: ^{r)0k)^ ..
'...'.lvp)^.. .. ..{ao\".. >Uu"'.. . . .<uJv], `_zqc], ijnJ#m+'...<];.?X?'^]Y+lzoj, .
'..'''':nd(".. . .',n8#j;... '{O(^. ..... .;(0Ox{xJf;. ... "|/,}O/'..."}1I:vz! IY|',Y*u,..
....... ^\bU~.......lv&Wc:.. ."jO}' .. .:+(\|1}?-jLz?"...')z:'nm-'.'.:]/~~Yr"^vf" :raz;...... .'.
.........`}00-". ... IzW&cl'...i0J> .`:?YpQnjjxrt/0M*v<^'^)Ul +ZU>''.."-t+[U|:uc:. ,jhc!.. .. .."i>