Mismatched and expecting the same token
- Dominant language
- Java
- Stars
- 19k
- Forks
- 3.5k
- PR merge metrics
- No merged PRs in 30d
Description
Hello, I have been testing in the [ANTLR LAB](http://lab.antlr.org/) and I cannot understand this error. The screenshot I attach below shows a simple grammar and an error indicating that the token it found is different from the one it was expecting, but it is the same, it doesn't make sense.
Why is it like this?
Thank you

The example grammar:
grammar Example;
class:
ABSTRACT 'class' IDENTIFIER;
IDENTIFIER: [A-Za-z_][A-Za-z0-9_]*;
ABSTRACT: 'abstract';
// Ignore
WS: [ \r\n\t]+ -> skip;
The example input:
abstract class Plane
Contributor guide
Research direction
Reproduce the report in the ANTLR LAB using the Example grammar and input `abstract class Plane`. Inspect the generated token and parser output to determine whether the mismatch is an ANTLR defect or expected grammar behavior; done should be a confirmed explanation with a narrowly defined follow-up change if a defect is found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- compilers, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100