2022-02-12 19:11:22 +01:00
|
|
|
# PARSE COMPLEX
|
|
|
|
|
|
|
|
`default del`
|
|
|
|
|
|
|
|
## type
|
|
|
|
|
|
|
|
`(1,2) type`
|
2022-02-11 14:00:15 +01:00
|
|
|
|
|
|
|
-> stack should be "complex"
|
|
|
|
|
2022-02-12 19:11:22 +01:00
|
|
|
`del`
|
|
|
|
|
|
|
|
## cplx
|
|
|
|
|
|
|
|
`(1,2) (1, 2) ( 1 , 2 )`
|
|
|
|
|
2022-02-11 14:00:15 +01:00
|
|
|
-> stack should be (1,2), (1,2), (1,2)
|
|
|
|
|
2022-02-12 19:11:22 +01:00
|
|
|
`del`
|
|
|
|
|
|
|
|
## cplx inf nan
|
|
|
|
|
|
|
|
```
|
2022-02-11 14:00:15 +01:00
|
|
|
(inf,3)
|
|
|
|
(-inf,nan) (inf,-inf)
|
2022-02-12 19:11:22 +01:00
|
|
|
```
|
|
|
|
|
2022-02-11 14:00:15 +01:00
|
|
|
-> stack should be (inf,3), (-inf,nan), (inf,-inf)
|
|
|
|
|
2022-02-12 19:11:22 +01:00
|
|
|
`del`
|
|
|
|
|
|
|
|
## unterminated
|
|
|
|
|
|
|
|
`( 3.14e2 , -2`
|
|
|
|
|
2022-02-11 14:00:15 +01:00
|
|
|
-> stack should be (314,-2)
|
|
|
|
|
2022-02-12 19:11:22 +01:00
|
|
|
`del`
|
|
|
|
|
|
|
|
## unterminated 2
|
|
|
|
|
|
|
|
`(-inf, nan`
|
|
|
|
|
2022-02-11 14:00:15 +01:00
|
|
|
-> stack should be (-inf,nan)
|
|
|
|
|
2022-02-12 19:11:22 +01:00
|
|
|
`del`
|
|
|
|
|
|
|
|
## unterminated err
|
|
|
|
|
|
|
|
```
|
2022-02-11 14:00:15 +01:00
|
|
|
(
|
|
|
|
(a
|
|
|
|
(123
|
|
|
|
(,
|
|
|
|
(,)
|
|
|
|
(12,
|
|
|
|
(,13)
|
|
|
|
(,3.14
|
2022-02-12 19:11:22 +01:00
|
|
|
```
|
|
|
|
|
2022-02-11 14:00:15 +01:00
|
|
|
-> stack should be '(', '(a', '(123', '(,', '(,)', '(12,', '(,13)', '(,3.14'
|
2022-02-12 19:11:22 +01:00
|
|
|
|
|
|
|
`del`
|