Skip to content

Instantly share code, notes, and snippets.

@vkz
Created August 19, 2014 11:10
Show Gist options
  • Save vkz/9124cb02c78acd596751 to your computer and use it in GitHub Desktop.
Save vkz/9124cb02c78acd596751 to your computer and use it in GitHub Desktop.
anything*:binding
var ometajs_ = require('ometajs');
var AbstractGrammar = ometajs_.grammars.AbstractGrammar;
var BSJSParser = ometajs_.grammars.BSJSParser;
var BSJSIdentity = ometajs_.grammars.BSJSIdentity;
var BSJSTranslator = ometajs_.grammars.BSJSTranslator;
var ometajs = require('ometajs');
var G = function G(source, opts) {
AbstractGrammar.call(this, source, opts);
};
G.grammarName = 'G';
G.match = AbstractGrammar.match;
G.matchAll = AbstractGrammar.matchAll;
exports.G = G;
require('util').inherits(G, AbstractGrammar);
G.prototype['bhBody1'] = function $bhBody1() {
var ss;
return this._list(function () {
return this._match('body') && this._list(function () {
return this._match('begin') && this._any(function () {
return this._atomic(function () {
return this._skip();
});
}) && (ss = this._getIntermediate(), true);
});
}) && this._exec(['seqStmts'].concat(ss));
};
G.prototype['bhBody2'] = function $bhBody2() {
var ss;
return this._list(function () {
return this._match('body') && this._list(function () {
return this._match('begin') && this._atomic(function () {
return this._any(function () {
return this._atomic(function () {
return this._skip();
});
});
}) && (ss = this._getIntermediate(), true);
});
}) && this._exec(['seqStmts'].concat(ss));
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment