<commit_before>from ometa.grammar import OMeta
from ometa.runtime import OMetaBase
from parsley import wrapGrammar


with open('cyder/search/compiler/search.parsley') as g:
    B = OMeta.makeGrammar(g.read()).createParserClass(OMetaBase, globals())


class ICompiler(B):
    def directive(self, d, v):
        raise NotImplemented()

    def mac_addr(self, addr):
        raise NotImplemented()

    def regexpr(self, r):
        raise NotImplemented()

    def text(self, t):
        raise NotImplemented()

    def compile(self, initial, values):
        raise NotImplemented()

    def OR_op(self, a, b):
        raise NotImplemented()<commit_msg>Use ROOT in grammar file path<commit_after>from os import path

from ometa.grammar import OMeta
from ometa.runtime import OMetaBase
from parsley import wrapGrammar

from lib.path_utils import ROOT


with open(path.join(ROOT, 'cyder/search/compiler/search.parsley')) as g:
    B = OMeta.makeGrammar(g.read()).createParserClass(OMetaBase, globals())


class ICompiler(B):
    def directive(self, d, v):
        raise NotImplemented()

    def mac_addr(self, addr):
        raise NotImplemented()

    def regexpr(self, r):
        raise NotImplemented()

    def text(self, t):
        raise NotImplemented()

    def compile(self, initial, values):
        raise NotImplemented()

    def OR_op(self, a, b):
        raise NotImplemented()
{'fraction_non_alphanumeric': 0.10310021629416005, 'fraction_numerical': 0.0, 'mean_word_length': 3.4063492063492062, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3074263', 'n_tokens_mistral': 446, 'n_tokens_neox': 424, 'n_words': 121}