eclipse-jdt / eclipse-jdt/eclipse.jdt.core

Should we merge Parser's diagnostic output gate-valves `DEBUG` & `DEBUG_AUTOMATON` ?

Open
#4,741 0 comments 0 reactions 1 assignee Claimed by @srikanth-sankaran View on GitHub
Dominant language
Java
Stars
237
Forks
195
Avg merge
1d 10h
Merged PRs (30d)
49

Description

Follow up from https://github.com/eclipse-jdt/eclipse.jdt.core/pull/4667#discussion_r2688166542 :

Investigate if we should merge DEBUG and DEBUG_AUTOMATON - In all my debugging, I very much want to see the rules being reduced. I don't see value in splitting it into two control variables.

https://github.com/eclipse-jdt/eclipse.jdt.core/pull/4667 significantly improves the logging. If we find a way to print the RHS of the rules textually, we can further improve the logging - see that presently, rules with identical "long enough" prefixes cannot be discriminated based on the logging output.

For example:

```
case 94 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration"); } //$NON-NLS-1$
consumeInternalCompilationUnit(); break;

case 95 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); } //$NON-NLS-1$
consumeInternalCompilationUnit(); break;

case 96 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); } //$NON-NLS-1$
consumeInternalCompilationUnitWithTypes(); break;

case 97 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); } //$NON-NLS-1$
consumeInternalCompilationUnitWithTypes(); break;

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.