<commit_before>#!/home/tewk/srcs/parrot/perl6

# $Id$

use v6;

evalfile('./ncigen.pbc', lang => 'Parrot');
evalfile('./compreg.pir', lang => 'Parrot');

my $fn = @*ARGS[0];
my $pp_fn = mktempfile('ptemp');

run("gcc -x c -E $fn > $pp_fn");
my $compiler = compreg('NCIGEN');
my $ast = $compiler.parse(slurp($pp_fn));
say +$ast;
for $ast.item() -> $x {<commit_msg>[cage] copyright statement for sqlite_interface_generator.pl<commit_after>#!/home/tewk/srcs/parrot/perl6

# $Id$
# Copyright (C) 2008, The Perl Foundation.

use v6;

evalfile('./ncigen.pbc', lang => 'Parrot');
evalfile('./compreg.pir', lang => 'Parrot');

my $fn = @*ARGS[0];
my $pp_fn = mktempfile('ptemp');

run("gcc -x c -E $fn > $pp_fn");
my $compiler = compreg('NCIGEN');
my $ast = $compiler.parse(slurp($pp_fn));
say +$ast;
for $ast.item() -> $x {
{'fraction_non_alphanumeric': 0.23529411764705882, 'fraction_numerical': 0.012254901960784314, 'mean_word_length': 4.835714285714285, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '2003760', 'n_tokens_mistral': 360, 'n_tokens_neox': 342, 'n_words': 76}