Here you go:
Comment above org.eclipse.jdt.internal.compiler.parser.Scanner.VanguardParser.parse(Goal) says:
// Canonical LALR pushdown automaton identical to Parser.parse() minus side effects of any kind, returns the rule reduced.
So if Parser.parse has any side effects visible to the scanner, they are going to be absent in VanguardParser.parse.
So the setting of this.scanner.multiCaseLabelComma =
this.currentToken == TerminalTokens.TokenNameCOMMA;
happens only in normal parse. And to the extent this flags steers subsequent tokenization, things are going to break!!!
Srikanth
From:
jdt-dev <jdt-dev-bounces@xxxxxxxxxxx> On Behalf Of Sankaran, Srikanth via jdt-dev
Sent: 24 September 2024 12:06
To: jdt-dev@xxxxxxxxxxx
Cc: Sankaran, Srikanth <srikanth.sankaran@xxxxxxxxxxxxx>
Subject: [jdt-dev] Anyone spot a problem here ?
CAUTION:
This email was sent from outside of Advantest.
In org.eclipse.jdt.internal.compiler.parser.Parser.consumeCaseLabelElement(CaseLabelKind) ?
Hint: in the line this.scanner.multiCaseLabelComma =
this.currentToken == TerminalTokens.TokenNameCOMMA; ??
Srikanth