From f40ce5a18861e25c0299dd466cec59ef77e9cfff Mon Sep 17 00:00:00 2001 From: David Tymon Date: Thu, 24 Dec 2015 13:01:40 +1100 Subject: [PATCH] JS: LL1Analyzer passing PredictionContext incorrectly to ATNConfig constructor The PredictionContext should be passed to the ATNConfig constructor in the first argument, the params object. Instead, it is being passed as the second argument which is intended to be the config. --- runtime/JavaScript/src/antlr4/LL1Analyzer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/JavaScript/src/antlr4/LL1Analyzer.js b/runtime/JavaScript/src/antlr4/LL1Analyzer.js index c0270bb55..42d521268 100644 --- a/runtime/JavaScript/src/antlr4/LL1Analyzer.js +++ b/runtime/JavaScript/src/antlr4/LL1Analyzer.js @@ -145,7 +145,7 @@ LL1Analyzer.prototype.LOOK = function(s, stopState, ctx) { // is {@code null}. /// LL1Analyzer.prototype._LOOK = function(s, stopState , ctx, look, lookBusy, calledRuleStack, seeThruPreds, addEOF) { - var c = new ATNConfig({state:s, alt:0}, ctx); + var c = new ATNConfig({state:s, alt:0, context: ctx}, null); if (lookBusy.contains(c)) { return; }