-
Notifications
You must be signed in to change notification settings - Fork 149
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
Space around "E" in float number input #1172
Comments
Well, this is not even that hard. I would not change the parser one bit. Instead, there would be an AST filter that would note (i.e. add errors and invalidate the relevant part of the input) certain patterns and that filter could be added into the filter chain for inputs allowing floats. Basically, there are a few patterns:
The tricky bit is to identify those subtrees when operator precedence may bind some of the relevant terms to something adjacent. For simple number inputs, though, simply dealing with prefix operators should be enough. |
Are digits valid at the end of variable names? How would you cope with |
Depending on the insert starts rules, digits may be present in variable names. The obvious example is "assume single char variable names", which would lead to the following due to the forced insertion of that "star":
Other than that,
|
From a user:
"One minor issue I've been meaning to contact you about is in regard to scientific notation using E. If a student inadvertently inserts a space on either side of E, for example 5.25 E8 instead of 5.25E8, the value is not correctly read and creates an error in the PRT. (We generally use the setting "Insert stars for implied multiplication and for spaces".) It would be helpful if the parser would ignore spaces on either side of E and allow this input, or provide a specific error message for this situation."
The text was updated successfully, but these errors were encountered: