edward-crazy_ivan 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. data/.gitignore +7 -0
  2. data/LICENSE +20 -0
  3. data/README.rdoc +94 -0
  4. data/Rakefile +63 -0
  5. data/TODO +33 -0
  6. data/VERSION +1 -0
  7. data/bin/crazy_ivan +114 -0
  8. data/crazy_ivan.gemspec +182 -0
  9. data/lib/crazy_ivan.rb +5 -0
  10. data/lib/html_asset_crush.rb +56 -0
  11. data/lib/report_assembler.rb +78 -0
  12. data/lib/test_runner.rb +71 -0
  13. data/templates/css/ci.css +11 -0
  14. data/templates/index.html +105 -0
  15. data/templates/javascript/json-template.js +544 -0
  16. data/templates/javascript/prototype.js +4917 -0
  17. data/test/crazy_ivan_test.rb +4 -0
  18. data/test/test_helper.rb +9 -0
  19. data/vendor/json-1.1.7/CHANGES +119 -0
  20. data/vendor/json-1.1.7/GPL +340 -0
  21. data/vendor/json-1.1.7/README +78 -0
  22. data/vendor/json-1.1.7/RUBY +58 -0
  23. data/vendor/json-1.1.7/Rakefile +270 -0
  24. data/vendor/json-1.1.7/TODO +1 -0
  25. data/vendor/json-1.1.7/VERSION +1 -0
  26. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkComparison.log +52 -0
  27. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast-autocorrelation.dat +1000 -0
  28. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast.dat +1001 -0
  29. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty-autocorrelation.dat +900 -0
  30. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty.dat +901 -0
  31. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe-autocorrelation.dat +1000 -0
  32. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe.dat +1001 -0
  33. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt.log +261 -0
  34. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast-autocorrelation.dat +1000 -0
  35. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast.dat +1001 -0
  36. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty-autocorrelation.dat +1000 -0
  37. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty.dat +1001 -0
  38. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe-autocorrelation.dat +1000 -0
  39. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe.dat +1001 -0
  40. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure.log +262 -0
  41. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator-autocorrelation.dat +1000 -0
  42. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator.dat +1001 -0
  43. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails.log +82 -0
  44. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkComparison.log +34 -0
  45. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser-autocorrelation.dat +900 -0
  46. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser.dat +901 -0
  47. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt.log +81 -0
  48. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser-autocorrelation.dat +1000 -0
  49. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser.dat +1001 -0
  50. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure.log +82 -0
  51. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser-autocorrelation.dat +1000 -0
  52. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser.dat +1001 -0
  53. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails.log +82 -0
  54. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser-autocorrelation.dat +1000 -0
  55. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser.dat +1001 -0
  56. data/vendor/json-1.1.7/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML.log +82 -0
  57. data/vendor/json-1.1.7/benchmarks/generator_benchmark.rb +165 -0
  58. data/vendor/json-1.1.7/benchmarks/parser_benchmark.rb +197 -0
  59. data/vendor/json-1.1.7/bin/edit_json.rb +9 -0
  60. data/vendor/json-1.1.7/bin/prettify_json.rb +75 -0
  61. data/vendor/json-1.1.7/data/example.json +1 -0
  62. data/vendor/json-1.1.7/data/index.html +38 -0
  63. data/vendor/json-1.1.7/data/prototype.js +4184 -0
  64. data/vendor/json-1.1.7/doc-templates/main.txt +283 -0
  65. data/vendor/json-1.1.7/ext/json/ext/generator/extconf.rb +11 -0
  66. data/vendor/json-1.1.7/ext/json/ext/generator/generator.c +919 -0
  67. data/vendor/json-1.1.7/ext/json/ext/generator/unicode.c +182 -0
  68. data/vendor/json-1.1.7/ext/json/ext/generator/unicode.h +53 -0
  69. data/vendor/json-1.1.7/ext/json/ext/parser/extconf.rb +11 -0
  70. data/vendor/json-1.1.7/ext/json/ext/parser/parser.c +1829 -0
  71. data/vendor/json-1.1.7/ext/json/ext/parser/parser.rl +686 -0
  72. data/vendor/json-1.1.7/ext/json/ext/parser/unicode.c +154 -0
  73. data/vendor/json-1.1.7/ext/json/ext/parser/unicode.h +58 -0
  74. data/vendor/json-1.1.7/install.rb +26 -0
  75. data/vendor/json-1.1.7/lib/json/Array.xpm +21 -0
  76. data/vendor/json-1.1.7/lib/json/FalseClass.xpm +21 -0
  77. data/vendor/json-1.1.7/lib/json/Hash.xpm +21 -0
  78. data/vendor/json-1.1.7/lib/json/Key.xpm +73 -0
  79. data/vendor/json-1.1.7/lib/json/NilClass.xpm +21 -0
  80. data/vendor/json-1.1.7/lib/json/Numeric.xpm +28 -0
  81. data/vendor/json-1.1.7/lib/json/String.xpm +96 -0
  82. data/vendor/json-1.1.7/lib/json/TrueClass.xpm +21 -0
  83. data/vendor/json-1.1.7/lib/json/add/core.rb +135 -0
  84. data/vendor/json-1.1.7/lib/json/add/rails.rb +58 -0
  85. data/vendor/json-1.1.7/lib/json/common.rb +354 -0
  86. data/vendor/json-1.1.7/lib/json/editor.rb +1371 -0
  87. data/vendor/json-1.1.7/lib/json/ext.rb +15 -0
  88. data/vendor/json-1.1.7/lib/json/json.xpm +1499 -0
  89. data/vendor/json-1.1.7/lib/json/pure/generator.rb +430 -0
  90. data/vendor/json-1.1.7/lib/json/pure/parser.rb +269 -0
  91. data/vendor/json-1.1.7/lib/json/pure.rb +77 -0
  92. data/vendor/json-1.1.7/lib/json/version.rb +8 -0
  93. data/vendor/json-1.1.7/lib/json.rb +10 -0
  94. data/vendor/json-1.1.7/tests/fixtures/fail1.json +1 -0
  95. data/vendor/json-1.1.7/tests/fixtures/fail10.json +1 -0
  96. data/vendor/json-1.1.7/tests/fixtures/fail11.json +1 -0
  97. data/vendor/json-1.1.7/tests/fixtures/fail12.json +1 -0
  98. data/vendor/json-1.1.7/tests/fixtures/fail13.json +1 -0
  99. data/vendor/json-1.1.7/tests/fixtures/fail14.json +1 -0
  100. data/vendor/json-1.1.7/tests/fixtures/fail18.json +1 -0
  101. data/vendor/json-1.1.7/tests/fixtures/fail19.json +1 -0
  102. data/vendor/json-1.1.7/tests/fixtures/fail2.json +1 -0
  103. data/vendor/json-1.1.7/tests/fixtures/fail20.json +1 -0
  104. data/vendor/json-1.1.7/tests/fixtures/fail21.json +1 -0
  105. data/vendor/json-1.1.7/tests/fixtures/fail22.json +1 -0
  106. data/vendor/json-1.1.7/tests/fixtures/fail23.json +1 -0
  107. data/vendor/json-1.1.7/tests/fixtures/fail24.json +1 -0
  108. data/vendor/json-1.1.7/tests/fixtures/fail25.json +1 -0
  109. data/vendor/json-1.1.7/tests/fixtures/fail27.json +2 -0
  110. data/vendor/json-1.1.7/tests/fixtures/fail28.json +2 -0
  111. data/vendor/json-1.1.7/tests/fixtures/fail3.json +1 -0
  112. data/vendor/json-1.1.7/tests/fixtures/fail4.json +1 -0
  113. data/vendor/json-1.1.7/tests/fixtures/fail5.json +1 -0
  114. data/vendor/json-1.1.7/tests/fixtures/fail6.json +1 -0
  115. data/vendor/json-1.1.7/tests/fixtures/fail7.json +1 -0
  116. data/vendor/json-1.1.7/tests/fixtures/fail8.json +1 -0
  117. data/vendor/json-1.1.7/tests/fixtures/fail9.json +1 -0
  118. data/vendor/json-1.1.7/tests/fixtures/pass1.json +56 -0
  119. data/vendor/json-1.1.7/tests/fixtures/pass15.json +1 -0
  120. data/vendor/json-1.1.7/tests/fixtures/pass16.json +1 -0
  121. data/vendor/json-1.1.7/tests/fixtures/pass17.json +1 -0
  122. data/vendor/json-1.1.7/tests/fixtures/pass2.json +1 -0
  123. data/vendor/json-1.1.7/tests/fixtures/pass26.json +1 -0
  124. data/vendor/json-1.1.7/tests/fixtures/pass3.json +6 -0
  125. data/vendor/json-1.1.7/tests/test_json.rb +312 -0
  126. data/vendor/json-1.1.7/tests/test_json_addition.rb +164 -0
  127. data/vendor/json-1.1.7/tests/test_json_fixtures.rb +34 -0
  128. data/vendor/json-1.1.7/tests/test_json_generate.rb +106 -0
  129. data/vendor/json-1.1.7/tests/test_json_rails.rb +146 -0
  130. data/vendor/json-1.1.7/tests/test_json_unicode.rb +62 -0
  131. data/vendor/json-1.1.7/tools/fuzz.rb +139 -0
  132. data/vendor/json-1.1.7/tools/server.rb +61 -0
  133. metadata +186 -0
@@ -0,0 +1,182 @@
1
+ #include "unicode.h"
2
+
3
+ #define unicode_escape(buffer, character) \
4
+ snprintf(buf, 7, "\\u%04x", (unsigned int) (character)); \
5
+ rb_str_buf_cat(buffer, buf, 6);
6
+
7
+ /*
8
+ * Copyright 2001-2004 Unicode, Inc.
9
+ *
10
+ * Disclaimer
11
+ *
12
+ * This source code is provided as is by Unicode, Inc. No claims are
13
+ * made as to fitness for any particular purpose. No warranties of any
14
+ * kind are expressed or implied. The recipient agrees to determine
15
+ * applicability of information provided. If this file has been
16
+ * purchased on magnetic or optical media from Unicode, Inc., the
17
+ * sole remedy for any claim will be exchange of defective media
18
+ * within 90 days of receipt.
19
+ *
20
+ * Limitations on Rights to Redistribute This Code
21
+ *
22
+ * Unicode, Inc. hereby grants the right to freely use the information
23
+ * supplied in this file in the creation of products supporting the
24
+ * Unicode Standard, and to make copies of this file in any form
25
+ * for internal or external distribution as long as this notice
26
+ * remains attached.
27
+ */
28
+
29
+ /*
30
+ * Index into the table below with the first byte of a UTF-8 sequence to
31
+ * get the number of trailing bytes that are supposed to follow it.
32
+ * Note that *legal* UTF-8 values can't have 4 or 5-bytes. The table is
33
+ * left as-is for anyone who may want to do such conversion, which was
34
+ * allowed in earlier algorithms.
35
+ */
36
+ static const char trailingBytesForUTF8[256] = {
37
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
38
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
39
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
40
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
41
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
42
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
43
+ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
44
+ 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5
45
+ };
46
+
47
+ /*
48
+ * Magic values subtracted from a buffer value during UTF8 conversion.
49
+ * This table contains as many values as there might be trailing bytes
50
+ * in a UTF-8 sequence.
51
+ */
52
+ static const UTF32 offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL,
53
+ 0x03C82080UL, 0xFA082080UL, 0x82082080UL };
54
+
55
+ /*
56
+ * Once the bits are split out into bytes of UTF-8, this is a mask OR-ed
57
+ * into the first byte, depending on how many bytes follow. There are
58
+ * as many entries in this table as there are UTF-8 sequence types.
59
+ * (I.e., one byte sequence, two byte... etc.). Remember that sequencs
60
+ * for *legal* UTF-8 will be 4 or fewer bytes total.
61
+ */
62
+ static const UTF8 firstByteMark[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC };
63
+
64
+ /*
65
+ * Utility routine to tell whether a sequence of bytes is legal UTF-8.
66
+ * This must be called with the length pre-determined by the first byte.
67
+ * If not calling this from ConvertUTF8to*, then the length can be set by:
68
+ * length = trailingBytesForUTF8[*source]+1;
69
+ * and the sequence is illegal right away if there aren't that many bytes
70
+ * available.
71
+ * If presented with a length > 4, this returns 0. The Unicode
72
+ * definition of UTF-8 goes up to 4-byte sequences.
73
+ */
74
+
75
+ inline static unsigned char isLegalUTF8(const UTF8 *source, int length)
76
+ {
77
+ UTF8 a;
78
+ const UTF8 *srcptr = source+length;
79
+ switch (length) {
80
+ default: return 0;
81
+ /* Everything else falls through when "1"... */
82
+ case 4: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return 0;
83
+ case 3: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return 0;
84
+ case 2: if ((a = (*--srcptr)) > 0xBF) return 0;
85
+
86
+ switch (*source) {
87
+ /* no fall-through in this inner switch */
88
+ case 0xE0: if (a < 0xA0) return 0; break;
89
+ case 0xED: if (a > 0x9F) return 0; break;
90
+ case 0xF0: if (a < 0x90) return 0; break;
91
+ case 0xF4: if (a > 0x8F) return 0; break;
92
+ default: if (a < 0x80) return 0;
93
+ }
94
+
95
+ case 1: if (*source >= 0x80 && *source < 0xC2) return 0;
96
+ }
97
+ if (*source > 0xF4) return 0;
98
+ return 1;
99
+ }
100
+
101
+ void JSON_convert_UTF8_to_JSON(VALUE buffer, VALUE string, ConversionFlags flags)
102
+ {
103
+ char buf[7];
104
+ const UTF8* source = (UTF8 *) RSTRING_PTR(string);
105
+ const UTF8* sourceEnd = source + RSTRING_LEN(string);
106
+
107
+ while (source < sourceEnd) {
108
+ UTF32 ch = 0;
109
+ unsigned short extraBytesToRead = trailingBytesForUTF8[*source];
110
+ if (source + extraBytesToRead >= sourceEnd) {
111
+ rb_raise(rb_path2class("JSON::GeneratorError"),
112
+ "partial character in source, but hit end");
113
+ }
114
+ if (!isLegalUTF8(source, extraBytesToRead+1)) {
115
+ rb_raise(rb_path2class("JSON::GeneratorError"),
116
+ "source sequence is illegal/malformed");
117
+ }
118
+ /*
119
+ * The cases all fall through. See "Note A" below.
120
+ */
121
+ switch (extraBytesToRead) {
122
+ case 5: ch += *source++; ch <<= 6; /* remember, illegal UTF-8 */
123
+ case 4: ch += *source++; ch <<= 6; /* remember, illegal UTF-8 */
124
+ case 3: ch += *source++; ch <<= 6;
125
+ case 2: ch += *source++; ch <<= 6;
126
+ case 1: ch += *source++; ch <<= 6;
127
+ case 0: ch += *source++;
128
+ }
129
+ ch -= offsetsFromUTF8[extraBytesToRead];
130
+
131
+ if (ch <= UNI_MAX_BMP) { /* Target is a character <= 0xFFFF */
132
+ /* UTF-16 surrogate values are illegal in UTF-32 */
133
+ if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) {
134
+ if (flags == strictConversion) {
135
+ source -= (extraBytesToRead+1); /* return to the illegal value itself */
136
+ rb_raise(rb_path2class("JSON::GeneratorError"),
137
+ "source sequence is illegal/malformed");
138
+ } else {
139
+ unicode_escape(buffer, UNI_REPLACEMENT_CHAR);
140
+ }
141
+ } else {
142
+ /* normal case */
143
+ if (ch == '"') {
144
+ rb_str_buf_cat2(buffer, "\\\"");
145
+ } else if (ch == '\\') {
146
+ rb_str_buf_cat2(buffer, "\\\\");
147
+ } else if (ch == '/') {
148
+ rb_str_buf_cat2(buffer, "\\/");
149
+ } else if (ch >= 0x20 && ch <= 0x7f) {
150
+ rb_str_buf_cat(buffer, (char *) source - 1, 1);
151
+ } else if (ch == '\n') {
152
+ rb_str_buf_cat2(buffer, "\\n");
153
+ } else if (ch == '\r') {
154
+ rb_str_buf_cat2(buffer, "\\r");
155
+ } else if (ch == '\t') {
156
+ rb_str_buf_cat2(buffer, "\\t");
157
+ } else if (ch == '\f') {
158
+ rb_str_buf_cat2(buffer, "\\f");
159
+ } else if (ch == '\b') {
160
+ rb_str_buf_cat2(buffer, "\\b");
161
+ } else if (ch < 0x20) {
162
+ unicode_escape(buffer, (UTF16) ch);
163
+ } else {
164
+ unicode_escape(buffer, (UTF16) ch);
165
+ }
166
+ }
167
+ } else if (ch > UNI_MAX_UTF16) {
168
+ if (flags == strictConversion) {
169
+ source -= (extraBytesToRead+1); /* return to the start */
170
+ rb_raise(rb_path2class("JSON::GeneratorError"),
171
+ "source sequence is illegal/malformed");
172
+ } else {
173
+ unicode_escape(buffer, UNI_REPLACEMENT_CHAR);
174
+ }
175
+ } else {
176
+ /* target is a character in range 0xFFFF - 0x10FFFF. */
177
+ ch -= halfBase;
178
+ unicode_escape(buffer, (UTF16)((ch >> halfShift) + UNI_SUR_HIGH_START));
179
+ unicode_escape(buffer, (UTF16)((ch & halfMask) + UNI_SUR_LOW_START));
180
+ }
181
+ }
182
+ }
@@ -0,0 +1,53 @@
1
+ #include "ruby.h"
2
+
3
+ #ifndef _GENERATOR_UNICODE_H_
4
+ #define _GENERATOR_UNICODE_H_
5
+
6
+ typedef enum {
7
+ conversionOK = 0, /* conversion successful */
8
+ sourceExhausted, /* partial character in source, but hit end */
9
+ targetExhausted, /* insuff. room in target for conversion */
10
+ sourceIllegal /* source sequence is illegal/malformed */
11
+ } ConversionResult;
12
+
13
+ typedef enum {
14
+ strictConversion = 0,
15
+ lenientConversion
16
+ } ConversionFlags;
17
+
18
+ typedef unsigned long UTF32; /* at least 32 bits */
19
+ typedef unsigned short UTF16; /* at least 16 bits */
20
+ typedef unsigned char UTF8; /* typically 8 bits */
21
+
22
+ #define UNI_REPLACEMENT_CHAR (UTF32)0x0000FFFD
23
+ #define UNI_MAX_BMP (UTF32)0x0000FFFF
24
+ #define UNI_MAX_UTF16 (UTF32)0x0010FFFF
25
+ #define UNI_MAX_UTF32 (UTF32)0x7FFFFFFF
26
+ #define UNI_MAX_LEGAL_UTF32 (UTF32)0x0010FFFF
27
+
28
+ #define UNI_SUR_HIGH_START (UTF32)0xD800
29
+ #define UNI_SUR_HIGH_END (UTF32)0xDBFF
30
+ #define UNI_SUR_LOW_START (UTF32)0xDC00
31
+ #define UNI_SUR_LOW_END (UTF32)0xDFFF
32
+
33
+ static const int halfShift = 10; /* used for shifting by 10 bits */
34
+
35
+ static const UTF32 halfBase = 0x0010000UL;
36
+ static const UTF32 halfMask = 0x3FFUL;
37
+
38
+ void JSON_convert_UTF8_to_JSON(VALUE buffer, VALUE string, ConversionFlags flags);
39
+
40
+ #ifndef RARRAY_PTR
41
+ #define RARRAY_PTR(ARRAY) RARRAY(ARRAY)->ptr
42
+ #endif
43
+ #ifndef RARRAY_LEN
44
+ #define RARRAY_LEN(ARRAY) RARRAY(ARRAY)->len
45
+ #endif
46
+ #ifndef RSTRING_PTR
47
+ #define RSTRING_PTR(string) RSTRING(string)->ptr
48
+ #endif
49
+ #ifndef RSTRING_LEN
50
+ #define RSTRING_LEN(string) RSTRING(string)->len
51
+ #endif
52
+
53
+ #endif
@@ -0,0 +1,11 @@
1
+ require 'mkmf'
2
+ require 'rbconfig'
3
+
4
+ if CONFIG['CC'] =~ /gcc/
5
+ $CFLAGS += ' -Wall'
6
+ #$CFLAGS += ' -O0 -ggdb'
7
+ end
8
+
9
+ have_header("ruby/st.h") || have_header("st.h")
10
+ have_header("re.h")
11
+ create_makefile 'parser'