mathics-scanner icon indicating copy to clipboard operation
mathics-scanner copied to clipboard

Prescanner adds closing quotes when

Open mmatera opened this issue 1 year ago • 0 comments

Description

When an input includes characters using the ASCII code escape form, an extra quote is added at the end of the input.

How to reproduce

In the REPL, type

a="\.4Auan

Output Given

Juan

Expected behavior

The expression should result in an incomplete expression.

Syntax::sntxi: Incomplete expression; more input is needed (line 1 of "<stdin>").

The problem comes if we write the complete expression

a="\.4Auan"

because then, the final quote is interpreted as a new open string, which is not closed.

Your Environment

OS: Ubuntu Mate 22.04

Mathics 7.0.1dev0 on CPython 3.8.12 (heads/pyston_main:759470647d, Apr 1 2022, 15:36:47) using SymPy 1.13.3, mpmath 1.3.0, numpy 1.21.4, cython 0.29.25

mmatera avatar Nov 25 '24 21:11 mmatera