-
-
Notifications
You must be signed in to change notification settings - Fork 65
Closed
Description
Description
Blank lines in a list definition cause a syntax error.
Blank lines are sometimes useful for code formatting reasons.
Mathematica allows these blank lines.
How to Reproduce
- Create a script with the content
list = {
A,
B}
- Then invoke the script with
$mathics -script < script.math
Output Given
hrueter@pc:~/code/mathics$ mathics -script < broken_script.math
Mathics3 9.0.1.dev0
Running on linux CPython 3.10.12 (main, May 27 2025, 17:12:29) [GCC 11.4.0]
using SymPy 1.14.0, mpmath 1.3.0, numpy 2.2.6, cython 3.1.2, scipy 1.15.3, skimage Not installed
Copyright (C) 2011-2025 The Mathics3 Team.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions.
See the documentation for the full license.
Quit by evaluating Quit[] or by pressing CONTROL-D.
In[1]:= Syntax::sntxi: Incomplete expression; more input is needed (line 1 of ).
In[1]:= Syntax::sntxf: "A==2" cannot be followed by "," (line 1 of ",").
In[1]:= In[1]:= Syntax::sntxf: "B==3" cannot be followed by "}" (line 1 of "}").
In[1]:=
Goodbye!
Expected behavior
Blank lines are ignored and all lines are interpreted as if in a normal list definition.
Your Environment
Mathics3 9.0.1.dev0
Running on linux CPython 3.10.12 (main, May 27 2025, 17:12:29) [GCC 11.4.0]
using SymPy 1.14.0, mpmath 1.3.0, numpy 2.2.6, cython 3.1.2, scipy 1.15.3, skimage Not installed
Additional context
Must be resolved before #254 can continue.
Metadata
Metadata
Assignees
Labels
No labels