-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parser bug on character constants #995
Comments
I thought we had fixed it back then. I will check this again, maybe we didn't fix it properly or merges between HPC-GAP and GAP re-broke it. |
A similar problem occurs here:
|
There are more instances of when we don't abandon the parse early when a syntax error occurs, like this here:
I will have a closer look at this this week. |
@markuspf : There are many, many places where we don't abandon parsing when a syntax error occurs, that is I think "standard behaviour". If we wanted to fix that, we should introduce some kind of general method of cleaning that up -- some kind of "empty out the input stream" (that needs planning better before we start it) |
If the first Match in ReadEvalCommand leads to an error just return. This fixes issue gap-system#995.
If the first Match in ReadEvalCommand leads to an error just return. This fixes issue #995.
I think the fact that parsing goes on here is in general meant as a feature: we try to keep parsing through files, even if they contain a syntax error; this is useful if e.g. you change the library, and your change has a typo; then you only break the method you modified, but not everything else in that file. But for interactive input, perhaps we should abort parsing immediately when there is a syntax error... OTOH, if one copy&pastes a longer function into a terminal, it might end up being pretty confusing if it contains a syntax error... |
@fingolfin said
+10. To prevent flooding the tracker with mass issue migration, would be good if those who had created them would go through them themselves and either close or migrate them... |
@alex-konovalov note that the comment you are quoting is from Dec 7, 2016 ;-) |
@fingolfin figured that out 5 minutes ago ;-) |
Fixes a mild regression introduce by PR gap-system#1015, which in turn attempted to fix parts of issue gap-system#995. With GAP 4.8 and also with this fix: gap> 1.2\3; Syntax error: Badly formed number 1.2\3; ^ In GAP 4.9: gap> 1.2\3; Syntax error: Badly formed number 1.2\3; ^ 3
Fixes a mild regression introduce by PR gap-system#1015, which in turn attempted to fix parts of issue gap-system#995. With GAP 4.8 and also with this fix: gap> 1.2\3; Syntax error: Badly formed number 1.2\3; ^ In GAP 4.9: gap> 1.2\3; Syntax error: Badly formed number 1.2\3; ^ 3
Fixes a mild regression introduce by PR gap-system#1015, which in turn attempted to fix parts of issue gap-system#995. With GAP 4.8 and also with this fix: gap> 1.2\3; Syntax error: Badly formed number 1.2\3; ^ In GAP 4.9: gap> 1.2\3; Syntax error: Badly formed number 1.2\3; ^ 3
Fixes a mild regression introduce by PR gap-system#1015, which in turn attempted to fix parts of issue gap-system#995. With GAP 4.8 and also with this fix: gap> 1.2\3; Syntax error: Badly formed number 1.2\3; ^ In GAP 4.9: gap> 1.2\3; Syntax error: Badly formed number 1.2\3; ^ 3
Personally, I consider this fixed, now that PR #2445 is merged. People may still dislike aspects of the current behaviour, but I am not aware of anything actively buggy or misleading. If somebody is, please open a new issue. |
I was looking at our old private tracker (we really should go through all issues there, and migrate any sensible issues to this tracker).
One of them was by @markuspf (see http://tracker.gap-system.org/issues/470) and reported the following buggy behavior: Enter a single quote, then press return twice and you get this:
So it look as if GAP did never finish parsing that character constant, despite already showing a syntax error (that first syntax error was not present in Markus' original report, so it has been added since then).
Apparently Markus even managed to get it to crash.
The text was updated successfully, but these errors were encountered: