diff --git a/lib/nearley.js b/lib/nearley.js
index <HASH>..<HASH> 100644
--- a/lib/nearley.js
+++ b/lib/nearley.js
@@ -69,8 +69,9 @@ State.prototype.process = function(location, ind, table, rules, addedRules) {
             this.data = this.rule.postprocess(this.data, this.reference, Parser.fail);
         }
         if (!(this.data === Parser.fail)) {
+            var findLeo;
             // LEO THE LION SAYS GER
-            function findLeo(idx, rulename, finalData) {
+            findLeo = function findLeo(idx, rulename, finalData) {
                 // performance optimization, avoid high order functions(map/filter) in hotspot code.
                 var items = [];
                 var row = table[idx];
Fix for strict mode

Line <I> causes the following error in strict mode: `In strict mode, function declarations cannot be nested inside a statement or block. They may only appear at the top level or directly inside a function body.`



This is simply fixed by assigning the function to a variable.