Skip to content

feat(compiler): migrate to ANTLR4#169

Merged
rohanku merged 29 commits intomainfrom
antlr4-integration
Mar 20, 2026
Merged

feat(compiler): migrate to ANTLR4#169
rohanku merged 29 commits intomainfrom
antlr4-integration

Conversation

@rohanku
Copy link
Contributor

@rohanku rohanku commented Mar 18, 2026

No description provided.

| primaryExpr
;

primaryExpr
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge these productions into nonBlockExpr if possible

Comment on lines +203 to +232
kwArgs
: kwArgsTrailingComma
| kwArgsNoComma
;

kwArgsTrailingComma
: kwArgValue COMMA
| kwArgsTrailingComma kwArgValue COMMA
;

kwArgsNoComma
: kwArgValue
| kwArgsTrailingComma kwArgValue
;

posArgs
: posArgsTrailingComma
| posArgsNoComma
;

posArgsTrailingComma
: expr COMMA
| posArgsTrailingComma expr COMMA
;

posArgsNoComma
:
| expr
| posArgsTrailingComma expr
;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this more idiomatic for ANTLR (e.g. by using ?). Reduce the number of non-terminals and productions where possible.

@rohanku rohanku merged commit e5448d6 into main Mar 20, 2026
6 checks passed
@rohanku rohanku deleted the antlr4-integration branch March 20, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants