Skip to content

Commit 25e851b

Browse files
committed
fix
1 parent fe1490d commit 25e851b

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

‎JavaScript/dist/toolgood.algorithm.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎JavaScript/src/math/mathParser.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tools/Antlr4Helper.JavaScriptHelper/Program.cs‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,12 @@ static void Main(string[] args)
8585
text = Regex.Replace(text, @"this\.match\((\d+)\);", "this.A($1);");
8686
text = Regex.Replace(text, @"this\.state = (\d+);[\r\n\t ]*this\.expr\((\d+)\);", "this.E($1,$2);");
8787
text = Regex.Replace(text, @"this\._errHandler\.sync\(this\);[\r\n\t ]*_la = this\._input\.LA\(1\);", "_la = this.Z();");
88-
text = Regex.Replace(text, @"_la = this\._input\.LA\(1\);", "_la = this.Y();");
88+
//text = Regex.Replace(text, @"this\._input\.LA\(1\);", "this.Y();");
8989
text = Regex.Replace(text, @"this\._errHandler\.sync\(this\);", "this.X();");
9090
text = text.Replace("this.pushNewRecursionContext(localctx, _startState, 1);", "this.W(localctx, _startState, 1);");
9191
text = Regex.Replace(text, @"this\._errHandler\.reportMatch\(this\);[\r\n\t ]*this\.consume\(\);", "this.Q();");
92-
92+
text = text.Replace("this._input.LA(1);", "this.Y();");
93+
text = text.Replace("this._input.LT(1);", "this.R();");
9394

9495

9596
text = Regex.Replace(text, @"sempred\(localctx, ruleIndex, predIndex\) \{[\s\S]+?\};", @" sempred(localctx, ruleIndex, predIndex){return true;};
@@ -104,7 +105,7 @@ static void Main(string[] args)
104105
J(a,e,f){this.match(a);this.state=e;this.expr(f);}
105106
106107
107-
108+
R(){return this._input.LT(1);}
108109
Q(){this._errHandler.reportMatch(this);this.consume();}
109110
W(a,b,c){this.pushNewRecursionContext(a, b, c);}
110111
X(){this._errHandler.sync(this);}

0 commit comments

Comments
 (0)