-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Use signed ints for ATN serialization not uint16, except for java #3591
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
Merged
Merged
Changes from all commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
b06fdc5
refactor serialize so we don't need comments
parrt 68145b2
more cleanup during refactor
parrt 7587346
store language in serializer obj
parrt a77e743
A lexer rule token type should never be -1 (EOF). 0 is fragment but t…
parrt 9eb1f83
Go uses int not uint16 for ATN now. java/go/python3 pass
parrt b4148b8
remove checks for 0xFFFF in Go.
parrt 4d2ebbf
C++ uint16_t to int for ATN.
parrt 14ce0cd
add mac php dir; fix type on accept() for generated code to be mixed.
parrt 9b6db61
Add test from @kvanTTT. This PR fixes https://github.com/antlr/antlr4…
parrt 4bc9e38
cleanup and add big lexer from https://github.com/antlr/antlr4/pull/3546
parrt 2cf2015
increase mvn mem size to 2G
parrt 986f597
increase mvn mem size to 8G
parrt 4087846
turn off the big ATN lexer test as we have memory issues during testing.
parrt 82ef98b
Fixes #3592
parrt 7b86e1f
Revert "C++ uint16_t to int for ATN."
parrt dd829bd
C++ uint16_t to int32_t for ATN.
parrt c82ace5
rm unnecessary include file, updating project file. get rid of the 0x…
parrt 544baa5
rm refs to 0xFFFF in swift
parrt ac25b86
javascript tests were running as Node...added to ignore list.
parrt 6643786
don't distinguish between 16 and 32 bit char sets in serialization; P…
parrt 3f579ba
update C++ to deserialize only 32-bit sets
parrt d782c68
0xFFFF -> -1 for C++ target.
parrt 3754457
Merge branch 'dev' into ATN-to-signed-ints
parrt a70605b
get other targets to use 32-bit sets in serialization. tests pass loc…
parrt f966345
refactor to reduce code size
parrt 41896ef
add comment
parrt 525198a
oops. comment out call to writeSerializedATNIntegerHistogram(). I won…
parrt e154984
all but Java, Node, PHP, Go work now for the huge lexer file; I have …
parrt 46b5166
all but Java, Node, PHP, Go work now for the huge lexer file; I have …
parrt bef2f0a
Turn off this big lexer because we get memory errors during continuou…
parrt fcef8c9
Intermediate commit where I have shuffled around all of the -1 flippi…
parrt 7f7cb03
convert decode to use int[]; remove dead code. don't use serializeAsC…
parrt fe06578
more tests passing. simplify. When copying atn, must run ATN through …
parrt 985f5d9
0xFFFD+ are not valid char
parrt bb0d06a
clean up. tests passing now
parrt 437f9b6
huge clean up. Got Java working with 32-bit ATNs!Still working on cle…
parrt 6f30e75
Cleanup the hack I did earlier; everything still seems to work
parrt b0f8551
Use linux DCO not our old contributors certificate of origin
parrt a2cf73f
remove bump-by-2 code
parrt d7293dd
clean up per @kvanTTT. Can't test locally on this box. Will see what …
parrt 40c035e
tweak comment
parrt 1c66fae
Merge branch 'dev' of github.com:antlr/antlr4 into dev
parrt 11ae041
Merge branch 'dev' into ATN-to-signed-ints
parrt db76a47
Revert "Use linux DCO not our old contributors certificate of origin"
parrt 6b2b6a2
Merge branch 'dev' into ATN-to-signed-ints
parrt 1aa5f18
see if C++ works in CI for huge ATN
parrt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| dotnet build runtime/CSharp/src/Antlr4.csproj -c Release | ||
| dotnet pack runtime/CSharp/src/Antlr4.csproj -c Release | ||
| cd runtime-testsuite | ||
| export MAVEN_OPTS="-Xmx8g" | ||
| mvn -Dparallel=classes -DthreadCount=2 -Dtest=csharp.** test | ||
| cd .. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| C:\ProgramData\chocolatey\bin\choco.exe -y install dart-sdk | ||
|
|
||
| cd runtime-testsuite | ||
| export MAVEN_OPTS="-Xmx8g" | ||
| mvn -Dtest=dart.** test -Dantlr-dart-dart="C:\tools\dart-sdk\bin\dart.exe" -Dantlr-dart-pub="C:\tools\dart-sdk\bin\pub.bat" -Dantlr-dart-dart2native="C:\tools\dart-sdk\bin\dart2native.bat" | ||
| cd .. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| cd runtime-testsuite | ||
| export MAVEN_OPTS="-Xmx8g" | ||
| mvn -Dparallel=classes -DthreadCount=2 -Dtest=go.** test | ||
| cd .. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| cd runtime-testsuite | ||
| export MAVEN_OPTS="-Xmx8g" | ||
| mvn -Dparallel=classes -DthreadCount=2 -Dtest=java.** test | ||
| cd .. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| cd runtime-testsuite | ||
| export MAVEN_OPTS="-Xmx8g" | ||
| mvn -Dparallel=classes -DthreadCount=2 -Dtest=javascript.** test | ||
| cd .. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| cd runtime-testsuite | ||
| export MAVEN_OPTS="-Xmx8g" | ||
| mvn -Dparallel=classes -DthreadCount=2 -Dantlr-python2-python="C:\Python27\python.exe" -Dtest=python2.** test | ||
| cd .. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| cd runtime-testsuite | ||
| export MAVEN_OPTS="-Xmx8g" | ||
| mvn -Dparallel=classes -DthreadCount=2 -Dantlr-python3-python="C:\Python310\python.exe" -Dtest=python3.** test | ||
| cd .. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...e-testsuite/resources/org/antlr/v4/test/runtime/descriptors/LexerExec/TokenType0xFFFF.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| [type] | ||
| Lexer | ||
|
|
||
| [grammar] | ||
| lexer grammar L; | ||
| T_FFFF: 'FFFF' -> type(65535); | ||
|
|
||
| [input] | ||
| FFFF | ||
|
|
||
| [output] | ||
| [@0,0:3='FFFF',<65535>,1:0] | ||
| [@1,4:3='<EOF>',<-1>,1:4] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.