Skip to content

Commit 28544a3

Browse files
committed
WIP
1 parent 0a7c101 commit 28544a3

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

ExtensibleParaser/Parser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ private void Log(string message, LogImportance importance = LogImportance.Normal
4141

4242
private readonly Dictionary<(int pos, string rule, int precedence), Result> _memo = new();
4343

44-
public void BuildTdoppRules()
44+
public void BuildTdoppRules(string startRule)
4545
{
4646
var inlineableRules = TdoppRules
4747
.Where(kvp => kvp.Value.Postfix.Length == 0 && kvp.Value.Prefix.Length == 1)

Parsers/Dot/DotParser/DotParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public DotParser()
102102
DotTerminals.Number()
103103
];
104104

105-
_parser.BuildTdoppRules();
105+
_parser.BuildTdoppRules("Graph");
106106
}
107107

108108
public Result Parse(string input)

Tests/ParaserTests/Calc/CalcTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void Initialize()
7171
new Seq([new Literal("-"), new ReqRef("Expr", Precedence: 100)], Kind: "Neg"),
7272
};
7373

74-
_parser.BuildTdoppRules();
74+
_parser.BuildTdoppRules("Expr");
7575
}
7676

7777
[TestMethod] public void TestSimpleAddition() => TestExpression("1+2", "(1 + 2)", 3);

Tests/ParaserTests/MiniC/MiniCTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public void Initialize()
9191

9292
_parser.Rules["Module"] = [new ZeroOrMany(new Ref("Function"), "ModuleFunctions")];
9393

94-
_parser.BuildTdoppRules();
94+
_parser.BuildTdoppRules("Module");
9595
}
9696

9797
[TestMethod]

Tests/ParaserTests/NitraConstruction/NitraSeparatedList/SeparatedListTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public void Initialize()
4545
Terminals.ErrorEmpty(),
4646
};
4747

48-
_parser.BuildTdoppRules();
48+
_parser.BuildTdoppRules("ExpRequired");
4949
}
5050

5151
// Optional

0 commit comments

Comments
 (0)