Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor code of left-recursive rules processing and get rid of LeftRecursiveRuleWalker.g #38

Merged
merged 3 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions tool/src/org/antlr/v5/analysis/AltType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Copyright (c) 2012-present The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/

package org.antlr.v5.analysis;

public enum AltType {
other,
binaryLR,
suffixLR,
prefix,
}
12 changes: 12 additions & 0 deletions tool/src/org/antlr/v5/analysis/AssocType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Copyright (c) 2012-present The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/

package org.antlr.v5.analysis;

public enum AssocType {
left,
right
}
4 changes: 0 additions & 4 deletions tool/src/org/antlr/v5/analysis/LeftRecursiveRuleAltInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ public class LeftRecursiveRuleAltInfo {
public AltAST originalAltAST;
public int nextPrec;

public LeftRecursiveRuleAltInfo(int altNum, String altText) {
this(altNum, altText, null, null, false, null);
}

public LeftRecursiveRuleAltInfo(int altNum, String altText,
String leftRecursiveRuleRefLabel,
String altLabel,
Expand Down
Loading
Loading