You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that there is a single line feed character at the end of this input, which looks like an empty line here.
The parser works as documented. Now, when I remove the last line feed character at the end of the file, which is often the case in real world input files, the parser throws the following error:
--> 5:1
|
5 | 65537
| ^---
|
= expected EOI
I have tried to remove the EOI from these 3 lines of grammar definition. Then, I get no more error messages, but then, the output lacks the last line with the value 65537:
- file
- record
- field: "65279"
- field: "1179403647"
- field: "1463895090"
- record
- field: "3.1415927"
- field: "2.7182817"
- field: "1.618034"
- record
- field: "-40"
- field: "-273.15"
- record
- field: "13"
- field: "42"
So the parser seems to stop at the very last line feed character as the EOI, although there is more valid input. Is this a bug or a feature?
If it is a feature, how do I have to modify the grammar so that I also get the 65537 in the output?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have tried the CSV Example in the documentation. I have used the online editor.
The grammar definition is
and the input is
Note that there is a single line feed character at the end of this input, which looks like an empty line here.
The parser works as documented. Now, when I remove the last line feed character at the end of the file, which is often the case in real world input files, the parser throws the following error:
I have tried to remove the EOI from these 3 lines of grammar definition. Then, I get no more error messages, but then, the output lacks the last line with the value
65537
:So the parser seems to stop at the very last line feed character as the EOI, although there is more valid input. Is this a bug or a feature?
If it is a feature, how do I have to modify the grammar so that I also get the
65537
in the output?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions