antlr / antlr/antlr4

add rule context object factory?

Open
#30 4 comments 1 reaction 0 assignees View on GitHub
comp:runtime type:feature
Dominant language
Java
Stars
19k
Forks
3.5k
PR merge metrics
No merged PRs in 30d

Description

``` java
public static class LExprBaseContextFactory {
public SContext createS(ParserRuleContext parent, int state) {
return new SContext(parent, state);
}
public EContext createE(ParserRuleContext parent, int state, int _p) {
return new EContext(parent, state, _p);
}
public MultContext createMult(EContext parent) { return new MultContext(parent); }
public AddContext createAdd(EContext parent) { return new AddContext(parent); }
public IntContext createInt(EContext parent) { return new IntContext(parent); }
}
```

Contributor guide

Open the contributing guide

Research direction

Start by investigating how generated parser rule context classes are currently constructed, using the LExprBaseContextFactory example in the issue as the starting point. The issue names no files, tests, entry points, or acceptance criteria, so the intended factory design and definition of done require clarification before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.