<commit_before>require 'formula'

class Ragel < Formula
  homepage 'http://www.complang.org/ragel/'
  url 'http://www.complang.org/ragel/ragel-6.8.tar.gz'
  sha1 '95cabbcd52bd25d76c588ddf11e1fd242d7cbcc7'

  resource 'pdf' do
    url 'http://www.complang.org/ragel/ragel-guide-6.8.pdf'
    sha1 'e57ee7f740dd395d4d5330949594a02c91ad0308'
  end

  def install
    system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
    system "make install"
    doc.install resource('pdf')
  end
end
<commit_msg>ragel: add patch to fix compilation with recent clang<commit_after>require 'formula'

class Ragel < Formula
  homepage 'http://www.complang.org/ragel/'
  url 'http://www.complang.org/ragel/ragel-6.8.tar.gz'
  sha1 '95cabbcd52bd25d76c588ddf11e1fd242d7cbcc7'

  resource 'pdf' do
    url 'http://www.complang.org/ragel/ragel-guide-6.8.pdf'
    sha1 'e57ee7f740dd395d4d5330949594a02c91ad0308'
  end

  def patches
    # Fix compilation with clang
    # http://www.complang.org/pipermail/ragel-users/2013-October/003007.html
    DATA
  end

  def install
    system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
    system "make install"
    doc.install resource('pdf')
  end
end

__END__
diff --git a/ragel/javacodegen.cpp b/ragel/javacodegen.cpp
index adff67e..2152b35 100644
--- a/ragel/javacodegen.cpp
+++ b/ragel/javacodegen.cpp
@@ -1184,7 +1184,7 @@ std::ostream &JavaTabCodeGen::ARRAY_ITEM( string item, bool last )
 {
 	item_count++;
 
-	out << setw(5) << setiosflags(ios::right) << item;
+	out << setw(5) << std::setiosflags(ios::right) << item;
 	
 	if ( !last ) {
 		if ( item_count % SAIIC == 0 ) {

{'fraction_non_alphanumeric': 0.1485748938750758, 'fraction_numerical': 0.08671922377198302, 'mean_word_length': 3.7413793103448274, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 7, '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': '6852803', 'n_tokens_mistral': 745, 'n_tokens_neox': 647, 'n_words': 114}