docs: function registerGrammar(grammarName, grammar, defaultRule) {
          for (var k in grammar) {
              if (grammar[k] instanceof Rule) {
                  var rule = grammar[k];
                  rule.setName(grammarName, k);
                  Myna.allRules[rule.fullName] = rule;
              }
          }
          Myna.grammars[grammarName] = grammar;
          if (defaultRule) {
              Myna.parsers[grammarName] = function (text) { return parse(defaultRule, text); };
          }
          return grammar;
      }