r'[+-]?\d+\.?\d*[eE][+-]?\d+
(t)
| 140 | return t |
| 141 | |
| 142 | def t_SCI(t): |
| 143 | r'[+-]?\d+\.?\d*[eE][+-]?\d+' |
| 144 | """ |
| 145 | Converts a string representing a number in scientific notation into a |
| 146 | float. |
| 147 | """ |
| 148 | try: |
| 149 | t.value = sp.Rational(t.value) |
| 150 | t.type = 'FLT' |
| 151 | except TypeError: |
| 152 | exc_type, value, exc_traceback = sys.exc_info() |
| 153 | print('\n', value) |
| 154 | _printError('Cannot convert number to float.', t) |
| 155 | return t |
| 156 | |
| 157 | # Define a rule so we can track line numbers |
| 158 | def t_NEWLINE(t): |
nothing calls this directly
no test coverage detected