Skip to content

Conversation

@sarowe
Copy link
Contributor

@sarowe sarowe commented Mar 12, 2019

make yychar long to enable scanners with the %char option to consume files larger than 2GB. Closes #536

@sarowe
Copy link
Contributor Author

sarowe commented May 9, 2019

Hi @lsf37 or @regisd I'd appreciate a review before I merge.

Markdown syntax
## [JFlex 1.8.0](https://github.com/jflex-de/jflex/milestone/11)
- Unicode 10.0 and 11.0 are supported (#540, #555)
- Unicode Emoji properties are supported for Unicode versions 8.0+ (#546)
- make yychar long to enable scanners with the %char option to consume files larger than 2GB (#536)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you could also format yychar and %char was coe with ``

@@ -0,0 +1 @@
Over2GbInput.java
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generated files shouldn't be in src/test

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is the over-2GB input file generator; it is not itself generated.

@@ -0,0 +1 @@
Over2GbInput.java
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I think you didn't intent to submit Over2GbInput-0.input

Copy link
Contributor Author

@sarowe sarowe May 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did mean to, actually. This is the input file that is over 2GB. It would be better to generate it at test time, though that will slow the test down quite a bit. I'll look into generating at test time.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I think such a large file in git is not a good idea. I think a quick workaround is to zip that file, and open the zipped version in the test.

@regisd
Copy link
Member

regisd commented Nov 24, 2019

Hmmm, I've been trying to reproduce the bug, and if the consumer doesn't read yychar, then nothing bad happens.
Are you sure the given test would fail today?

@regisd regisd mentioned this pull request Nov 24, 2019
@regisd
Copy link
Member

regisd commented Nov 25, 2019

Please see #605

@regisd regisd closed this Nov 25, 2019
@regisd regisd deleted the long-yychar-squashed branch November 26, 2019 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lexer has negative yychar when processing files larger than 2 GiB

3 participants