<commit_before>#! /usr/bin/env python

from Synopsis.process import process
from Synopsis.Processor import *
from Synopsis.Parsers import Cxx
from Synopsis.Processors import *
from Synopsis.Formatters import Dump
from Synopsis.Formatters import HTML
from Synopsis.Formatters.HTML.Views import *
from Synopsis.Formatters import SXR

from distutils import sysconfig
import sys, os.path

# the python include path can be obtained from distutils.sysconfig,
# assuming that the python version used to run synopsis is the same
# boost should be compiled with
parser = Cxx.Parser(cppflags = ['-DPYTHON_INCLUDE=<python%s/Python.h>'%sys.version[0:3],
                                '-DBOOST_PYTHON_SYNOPSIS',
                                '-Iboost',
                                '-I%s'%(sysconfig.get_python_inc())],
                    base_path = 'boost/',
                    main_file_only = False,
                    syntax_prefix = 'links/',
                    xref_prefix = 'xref/')

xref = XRefCompiler(prefix='xref/')    # compile xref dictionary


linker = Linker(SSComments(),       # filter out any non-'//' comments
                Grouper1(),         # group declarations according to '@group' tags
                Previous(),         # attach '//<' comments
                CommentStripper(),  # strip any 'suspicious' comments
                AccessRestrictor()) # filter out unwanted ('private', say) declarations

html = HTML.Formatter(views = [FramesIndex(),
                               Scope(),
                               ModuleListing(),
                               ModuleIndexer(),
                               FileListing(),
                               FileIndexer(),
                               FileDetails(),
                               InheritanceTree(),
                               InheritanceGraph(),
                               Source(prefix = 'links'),
                               NameIndex(),
                               XRef(xref_file = 'bpl.xref')])

sxr = SXR.Formatter(url = '/sxr.cgi',
                    src_dir = 'boost/',<commit_msg>fix bug15<commit_after>#! /usr/bin/env python

from Synopsis.process import process
from Synopsis.Processor import *
from Synopsis.Parsers import Cxx
from Synopsis.Processors import *
from Synopsis.Formatters import Dump
from Synopsis.Formatters import HTML
from Synopsis.Formatters.HTML.Views import *
from Synopsis.Formatters import SXR

from distutils import sysconfig
import sys, os.path

# the python include path can be obtained from distutils.sysconfig,
# assuming that the python version used to run synopsis is the same
# boost should be compiled with
parser = Cxx.Parser(cppflags = ['-DPYTHON_INCLUDE=<python%s/Python.h>'%sys.version[0:3],
                                '-DBOOST_PYTHON_SYNOPSIS',
                                '-Iboost',
                                '-I%s'%(sysconfig.get_python_inc())],
                    base_path = 'boost/',
                    main_file_only = False,
                    syntax_prefix = 'links/',
                    xref_prefix = 'xref/')

xref = XRefCompiler(prefix='xref/')    # compile xref dictionary


linker = Linker(SSComments(),       # filter out any non-'//' comments
                Grouper1(),         # group declarations according to '@group' tags
                Previous(),         # attach '//<' comments
                CommentStripper(),  # strip any 'suspicious' comments
                Summarizer(),       # separate summary (first phrase) from detail (everything)
                AccessRestrictor()) # filter out unwanted ('private', say) declarations

html = HTML.Formatter(views = [FramesIndex(),
                               Scope(),
                               ModuleListing(),
                               ModuleIndexer(),
                               FileListing(),
                               FileIndexer(),
                               FileDetails(),
                               InheritanceTree(),
                               InheritanceGraph(),
                               Source(prefix = 'links'),
                               NameIndex(),
                               XRef(xref_file = 'bpl.xref')])

sxr = SXR.Formatter(url = '/sxr.cgi',
                    src_dir = 'boost/',
{'fraction_non_alphanumeric': 0.09393164380376656, 'fraction_numerical': 0.001860032550569635, 'mean_word_length': 1.526130358191427, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '327687', 'n_tokens_mistral': 1101, 'n_tokens_neox': 1035, 'n_words': 276}