⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testsrc.txt

📁 Linux下编写的一个表达式解析器可以计算= - * / 与或非运算 经过测试并带有测试用例!供大家参考
💻 TXT
字号:
N (5+(~(2+2))+1)=1N (1*2)*(2*3)=12N 0=0N 0+0=0N 0+1=1N 1=1N 1+2=3N 1   +  2 =3N 0xa=0xaN 0xa=10N 0xabc=0xabcN 0 x a bc=0xabcN 1+2+3+4+5+6+7+8+9+0=45N (0+0)+0=0N (2+4)=6N 2+(3+2)+2=9N (1+2)+(4+3)=10N +=Please input the correct characte!N ()=Please input the correct characte!N 1++2=Please input the correct characte!N +1+2=Please input the correct characte!N 2+1+=Please input the correct characte!N (1+2)+(4+3))=Please input the correct characte!N 0xxa+1=Please input the correct characte!N 0xa+0=10N (0xa+1)+2=13N -6=-6N 0-0=0N 0-1=-1N 2-1=1N 1-1=0N 5-6=-1N -6-5=-11N -6+5=-1N (1-2)-3=-4N  (6-1 )- (9-8)=4N (-6)+5=-1N -(6-5)=-1N (-6+5)=-1N 1--2=Please input the correct characte!N -1-2=-3N 2-1-=Please input the correct characte!N 0-1-2-3-4-5-6-7-8-9=-45N  ( (2+1) + 3  ) =6N 1*2=2N 2*3+1=7N 2*(3*4)=24N (1*2)*(2*3)=12N (2+(3+2)+2)*9=81N 1+2*3=7N 0*1*2*3*4*5*6*7*8*9=0N 1*2*3*4*5*6*7*8*9=362880N 1/1=1N 1/2=0.5N 1/0xa=0.1N 0/1/2/3/4/5/6/7/8/9=0N 2/0=Please input the correct characte!N &=Please input the correct characte!N &+1=Please input the correct characte!N 1+&=Please input the correct characte!N (1&2)&(2&3)=0N 1&0=0N 1&2=0N 1&3=1N 1&(2+3)=1N 0&1&2&3&4&5&6&7&8&9=0N |=Please input the correct characte!N ||=Please input the correct characte!N 1||=Please input the correct characte!N ||1=Please input the correct characte!N (1)|2|(1|3)=3N ((1|2)|(3|4))=7N (12)|2=14N 1|0=1N 1|2=3N 1|3=3N 1|4=5N 0|1|2|3|4|5|6|7|8|9=15N 1+~2=-2N ~1+2=0N ~3+5=1N ~3+3=-1N ~2+2=-1N ~2+3=0N ~2+1=-2N ~3+1=-3N ~4+1=-4N ~(1+2)+5=1N 5+~(2+2)+1=1N (5+~(2+2)+1)=1N ~0+~1+~2+~3+~4+~5+~6+~7+~8+~9=-55N 9999999999+1=result overflow!N 999999999+1=1000000000N 0xb3*(45+6)/5*0x8+6+6+6+66+6+6-6-6-666-5*6+6*8-5+5+8+6+5-59-56+65+6*5-5/25*5-5-5+5*5-5+5+5*5-5+5*8-5+55*5+5+5+5+5/68-5-55-2-4-5659=1N 0*0=0N 0+0*1=0N 0+1*2=2N 1*1=1N 1+2*0=1N 1   +  2 *  1=3N 0xa*1=0xaN 0xa=10N 0xa*1=10N 0xabc*3=0x2034N 0xabc*3=8244N 0xabc*0=0N 0 x a bc=0xabcN 0 x a bc+1=0xabdN 0 x a bc+1*0=2748N 1+2+3+4+5+6+7+8+9+0*2=45N (1+2+3+4+5+6+7+8+9+0)*2=90N (0+0)+0*6=0N (2+4)*6=36N 2+(3+2)+2*1=9N (1+2)+(4+3)*(2+0)=17N 2k+1=error! k 2N +*=Please input the correct characte!N (*)=Please input the correct characte!N 1++2*2=Please input the correct characte!N *1+2*0=Please input the correct characte!N 2+1+1*=Please input the correct characte!N (1+2)*(4+3))=Please input the correct characte!N 0xxa+1*1=Please input the correct characte!N 0xa+0*2+5=15N (0xa+1)+2*5=21N -6*2=-12N 0-0*0=0N 0-1*2=-2N 2-1*2=0N 1-1*3=-2N 5-6*6=-31N -6-5*2=-16N -6+5*3=9N (1-2)-3*2=-7N  (6-1 )- (9-8)*2=3N (-6)+5*2=4N -(6-5)*2=-2N (-6+5)*2=-2N -1-2*3=-7N 2-1-*=Please input the correct characte!N 0-1-2-3-4-5-6-7-8-9*2=-54N  ( (2+1) + 3  ) *2=12N 1*2=2N 2*3+1=7N 2*(3*4)=24N (1*2)*(2*3)=12N 1+2*3=7N 1/1=1N 1/2=0.5N 1/0xa=0.1N 0/1/2/3/4/5/6/7/8/9=0N 2/0=Please input the correct characte!N &=Please input the correct characte!N &+1=Please input the correct characte!N 1+&=Please input the correct characte!N (1&2)&(2&3)=0N 1&0=0N 1&2=0N 1&3=1N 1&(2+3)=1N 0&1&2&3&4&5&6&7&8&9=0N |=Please input the correct characte!N ||=Please input the correct characte!N 1||=Please input the correct characte!N ||1=Please input the correct characte!N (1)|2|(1|3)=3N ((1|2)|(3|4))=7N (12)|2=14N 1|0=1N 1|2=3N 1|3=3N 1|4=5N 0|1|2|3|4|5|6|7|8|9=15N 1+~2=-2N ~1+2=0N ~3+5=1N ~3+3=-1N ~2+2=-1N ~2+3=0N ~2+1=-2N ~3+1=-3N ~4+1=-4N ~(1+2)+5=1N 5+~(2+2)+1=1N (5+~(2+2)+1)=1N ~0+~1+~2+~3+~4+~5+~6+~7+~8+~9=-55N 9999999999+1=result overflow!N 999999999+1=1000000000S 1=1S 1+2=3S -6=-6S 0xa=0xaS 0xabc=0xabcS 0 x a bc=0xabcS 0+0=0S 0+1=1S 1+2=3S 1   +  2 =3S (2+4)=6S  ( (2+1) + 3  ) =6S 2k+1=error! k 2S ()=Please input the correct characte!S 1++2=Please input the correct characte!S +1+2=Please input the correct characte!S 2+1+=Please input the correct characte!S 1+2+3+4+5+6+7+8+9+0=45S 2+(3+2)+2=9S (1+2)+(4+3)=10S (1+2)+(4+3))=Please input the correct characte!S 0xxa+1=Please input the correct characte!S 0xa+0=10S (0xa+1)+2=13S -6=-6S 0-0=0S 0-1=-1S 2-1=1S 1-1=0S 5-6=-1S -6-5=-11S -6+5=-1S (1-2)-3=-4S  (6-1 )- (9-8)=4S (-6)+5=-1S -(6-5)=-1S (-6+5)=-1S 1--2=Please input the correct characte!S -1-2=-3S 2-1-=Please input the correct characte!S 0*0=0S 0+0*1=0S 0+1*2=2S 1*1=1S 1+2*0=1S 1   +  2 *  1=3S 0xa*1=0xaS 0xa=10S 0xa*1=10S 0xabc*3=0x2034S 0xabc*3=8244S 0xabc*0=0S 0 x a bc=0xabcS 0 x a bc+1=0xabdS 0 x a bc+1*0=2748S 1+2+3+4+5+6+7+8+9+0*2=45S (1+2+3+4+5+6+7+8+9+0)*2=90S (0+0)+0*6=0S (2+4)*6=36S 2+(3+2)+2*1=9S (1+2)+(4+3)*(2+0)=17S 2k+1=error! k 2S +*=Please input the correct characte!S (*)=Please input the correct characte!S 1++2*2=Please input the correct characte!S *1+2*0=Please input the correct characte!S 2+1+1*=Please input the correct characte!S (1+2)*(4+3))=Please input the correct characte!S 0xxa+1*1=Please input the correct characte!S 0xa+0*2+5=15S (0xa+1)+2*5=21S -6*2=-12S 0-0*0=0S 0-1*2=-2S 2-1*2=0S 1-1*3=-2S 5-6*6=-31S -6-5*2=-16S -6+5*3=9S (1-2)-3*2=-7S  (6-1 )- (9-8)*2=3S (-6)+5*2=4S -(6-5)*2=-2S (-6+5)*2=-2S -1-2*3=-7S 2-1-*=Please input the correct characte!S 0-1-2-3-4-5-6-7-8-9*2=-54S  ( (2+1) + 3  ) *2=12S 1*2=2S 2*3+1=7S 2*(3*4)=24S (1*2)*(2*3)=12S 1+2*3=7S 2/0=Please input the correct characte!S |=Please input the correct characte!S ||=Please input the correct characte!S 1||=Please input the correct characte!S ||1=Please input the correct characte!S (1)|2|(1|3)=3S ((1|2)|(3|4))=7S (12)|2=14S 1/1=1S 1/2=0.5S 1/0xa=0.1S 2/0=Please input the correct characte!S &=Please input the correct characte!S &+1=Please input the correct characte!S 1+&=Please input the correct characte!S (1&2)&(2&3)=0S 1&0=0S 1&2=0S 1&3=1S 1&(2+3)=1S 0&1&2&3&4&5&6&7&8&9=0S 1+~2=-2S ~1+2=0S ~3+5=1S ~3+3=-1S ~2+2=-1S ~2+3=0S ~2+1=-2S ~3+1=-3S ~4+1=-4S ~(1+2)+5=1S 5+~(2+2)+1=1S +23+1=Please input the correct characte!S 4545145+1646464=result overflow!S 9999+1=10000S 99999+1=result overflow!F 0xab22+3.2=43813.199219F 0xabc=0xabcF 2k+1=error! k 2F 2.31234526511+4=6.31234526511F 2k+1=error! k 2F 999999999.111254602+1=1000000000.000000F 99.265154+1=1F 9999999999.123255+1=10000000000.000000F 999.123456+1=1F 99999123.123+1=99999120.000000F 999999.123+1=1000000.125000D 0x0xa+1=11D 21516=21516.000000D 1.02+2.3=3.320000

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -