-
Notifications
You must be signed in to change notification settings - Fork 163
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
Float parsing bug related to line continuations #1992
Labels
Comments
fingolfin
added
kind: bug
Issues describing general bugs, and PRs fixing them
topic: kernel
labels
Dec 5, 2017
Actually, this doesn't seem to be a bug (or at least not one specific to floats), but rather it seems GAP always acts like this:
vs.
I still think there should be a continuation prompt, in all cases... Thoughts? |
fingolfin
added a commit
to fingolfin/gap
that referenced
this issue
Apr 10, 2018
This ensures that line continuations inside of e.g. integer and float expressions propery show a line continuation prompt. Fixes gap-system#1992
fingolfin
added a commit
to fingolfin/gap
that referenced
this issue
Apr 10, 2018
This ensures that line continuations inside of e.g. integer and float expressions propery show a line continuation prompt. Fixes gap-system#1992
fingolfin
added a commit
to fingolfin/gap
that referenced
this issue
Apr 10, 2018
This ensures that line continuations inside of e.g. integer and float expressions properly show a line continuation prompt. Fixes gap-system#1992
fingolfin
added a commit
to fingolfin/gap
that referenced
this issue
Apr 10, 2018
This ensures that line continuations inside of e.g. integer and float expressions properly show a line continuation prompt. Fixes gap-system#1992
fingolfin
added a commit
to fingolfin/gap
that referenced
this issue
Apr 11, 2018
This ensures that line continuations inside of e.g. integer and float expressions properly show a line continuation prompt. Fixes gap-system#1992
fingolfin
added a commit
that referenced
this issue
Apr 12, 2018
This ensures that line continuations inside of e.g. integer and float expressions properly show a line continuation prompt. Fixes #1992
ChrisJefferson
pushed a commit
to ChrisJefferson/gap
that referenced
this issue
Jun 14, 2018
This ensures that line continuations inside of e.g. integer and float expressions properly show a line continuation prompt. Fixes gap-system#1992
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Observed behaviour
In the following example, I press enter twice after entering the backslash:
or
Expected behaviour
A continuation prompt should appear immediately in both cases, e.g.
resp.
Analysis
Part of the problem here is that dealing with line continuations is not handled in a uniform manner, but rather the relevant logic has to be replicated everywhere; and it is easy to forget that, or do it wrong.
As a long-term fix, I think we could add a "line reader" as an additional layer between
io.c
andscanner.c
. It would take care of reading the input line by line, keeping track of the current line number, but also of automatically and transparently handling line continuations (including transparent support for CR, CR/LF or LF line ends).The text was updated successfully, but these errors were encountered: