forked from antlr/antlr4
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sebastian Bachem
authored and
Sebastian Bachem
committed
Mar 19, 2024
1 parent
4e8a6bb
commit 65bd754
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
...me-testsuite/resources/org/antlr/v4/test/runtime/expected-tokens/java-ambiguous-parse.yml
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# hypothetical complete class A) | ||
# input: "public class Foo { public static boolean myAttribute = 42; }" | ||
# hypothetical complete class B) | ||
# input: "public class Foo { public static class Inner {} }" | ||
# actual partial input (suppose the user has not typed out the full class yet: | ||
input: "public class Foo { public static " | ||
caret: | ||
line: 1 | ||
column: 34 | ||
expected: | ||
- int # expected with context chain: ClassDeclarationContext --parent--> MemberDeclarationContext ... | ||
- class # expected with context chain: PrimitiveTypeContext --parent--> TypeContext --parent--> FieldDeclarationContext ... | ||
# list incomplete, but at least both of the above should be suggested | ||
|
||
|
||
# currently, I get the following instead of the expected tokens and contexts: | ||
# tokens: @, private, static, protected, public, final, abstract, strictfp | ||
# context chain: ClassOrInterfaceModifierContext --parent--> ModifierContext --parent--> ... |