-
Notifications
You must be signed in to change notification settings - Fork 152
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
kast --debug-tokens #3660
Merged
Merged
kast --debug-tokens #3660
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
2d47e48
Show scanner tokens
radumereuta 2552184
Add option to kast
radumereuta 7a9b1ac
Add test
radumereuta fd5d0b1
Code review
radumereuta 81a8dff
More unmodifiable collections
radumereuta c473a29
Update test output
radumereuta c1d257d
Refactor code
radumereuta 8b2b24e
Remove imports
radumereuta 31ceb50
Update Nix lock files
d2e62d7
Merge branch 'develop' into showTokens
radumereuta 1601fad
Fix output
radumereuta a7b84d8
Merge branch 'develop' into showTokens
radumereuta b87588e
Unmodifiable list
radumereuta c275067
Output Markdown table
radumereuta 237eb52
Update cmd option description
radumereuta 2b07cd1
Merge branch 'develop' into showTokens
rv-jenkins 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
15 changes: 14 additions & 1 deletion
15
k-distribution/tests/regression-new/issue-3647-debugTokens/a.test.kast
This file contains 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 +1,14 @@ | ||
a + 100 + 2 | ||
1 + 2 + aaaaaaaaaaaa | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
+ 10000000 | ||
+ "str" | ||
+ "long str that breaks alighnment" |
20 changes: 13 additions & 7 deletions
20
k-distribution/tests/regression-new/issue-3647-debugTokens/a.test.kast.out
This file contains 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,9 +1,15 @@ | ||
`Match` (location), Terminal | ||
(location) "Match" Terminal | ||
------------------------------------ | ||
`a` (1,1,1,2), r"[a-z][a-zA-Z0-9]*" | ||
`+` (1,3,1,4), "+" | ||
`100` (1,5,1,8), r"[\\+-]?[0-9]+" | ||
`+` (1,9,1,10), "+" | ||
`2` (1,11,1,12), r"[\\+-]?[0-9]+" | ||
`` (2,1,2,1), "<eof>" | ||
(1,1,1,2), "1" r"[\\+-]?[0-9]+" | ||
(1,3,1,4), "+" "+" | ||
(1,5,1,6), "2" r"[\\+-]?[0-9]+" | ||
(1,7,1,8), "+" "+" | ||
(1,9,1,21), "aaaaaaaaaaaa" r"[a-z][a-zA-Z0-9]*" | ||
(12,1,12,2), "+" "+" | ||
(12,3,12,11), "10000000" r"[\\+-]?[0-9]+" | ||
(13,1,13,2), "+" "+" | ||
(13,3,13,8), "\"str\"" r"[\\\"](([^\\\"\\n\\r\\\\])|([\\\\][nrtf\\\"\\\\])|([\\\\][x][0-9a-fA-F]{2})|([\\\\][u][0-9a-fA-F]{4})|([\\\\][U][0-9a-fA-F]{8}))*[\\\"]" | ||
(14,1,14,2), "+" "+" | ||
(14,3,14,36), "\"long str that breaks alighnment\"" r"[\\\"](([^\\\"\\n\\r\\\\])|([\\\\][nrtf\\\"\\\\])|([\\\\][x][0-9a-fA-F]{2})|([\\\\][u][0-9a-fA-F]{4})|([\\\\][U][0-9a-fA-F]{8}))*[\\\"]" | ||
(15,1,15,1), "" "<eof>" | ||
|
This file contains 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 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 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be wrapped in Collections.unmodifiableList because Ints.asList returns a mutable list.