itextomml 1.3.23 → 1.3.24
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.
- data/ext/itex2MML.h +3 -3
- data/ext/lex.yy.c +90 -35
- data/ext/y.tab.c +4 -4
- metadata +5 -12
data/ext/itex2MML.h
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
/* itex2MML 1.3.
|
2
|
-
* itex2MML.h last modified
|
1
|
+
/* itex2MML 1.3.24
|
2
|
+
* itex2MML.h last modified 5/24/2010
|
3
3
|
*/
|
4
4
|
|
5
5
|
#ifndef ITEX2MML_H
|
6
6
|
#define ITEX2MML_H
|
7
7
|
|
8
|
-
#define ITEX2MML_VERSION "1.3.
|
8
|
+
#define ITEX2MML_VERSION "1.3.24"
|
9
9
|
|
10
10
|
#ifdef __cplusplus
|
11
11
|
extern "C" {
|
data/ext/lex.yy.c
CHANGED
@@ -6,10 +6,29 @@
|
|
6
6
|
|
7
7
|
/* A lexical scanner generated by flex */
|
8
8
|
|
9
|
+
#define yy_create_buffer itex2MML_yy_create_buffer
|
10
|
+
#define yy_delete_buffer itex2MML_yy_delete_buffer
|
11
|
+
#define yy_flex_debug itex2MML_yy_flex_debug
|
12
|
+
#define yy_init_buffer itex2MML_yy_init_buffer
|
13
|
+
#define yy_flush_buffer itex2MML_yy_flush_buffer
|
14
|
+
#define yy_load_buffer_state itex2MML_yy_load_buffer_state
|
15
|
+
#define yy_switch_to_buffer itex2MML_yy_switch_to_buffer
|
16
|
+
#define yyin itex2MML_yyin
|
17
|
+
#define yyleng itex2MML_yyleng
|
18
|
+
#define yylex itex2MML_yylex
|
19
|
+
#define yylineno itex2MML_yylineno
|
20
|
+
#define yyout itex2MML_yyout
|
21
|
+
#define yyrestart itex2MML_yyrestart
|
22
|
+
#define yytext itex2MML_yytext
|
23
|
+
#define yywrap itex2MML_yywrap
|
24
|
+
#define yyalloc itex2MML_yyalloc
|
25
|
+
#define yyrealloc itex2MML_yyrealloc
|
26
|
+
#define yyfree itex2MML_yyfree
|
27
|
+
|
9
28
|
#define FLEX_SCANNER
|
10
29
|
#define YY_FLEX_MAJOR_VERSION 2
|
11
30
|
#define YY_FLEX_MINOR_VERSION 5
|
12
|
-
#define YY_FLEX_SUBMINOR_VERSION
|
31
|
+
#define YY_FLEX_SUBMINOR_VERSION 35
|
13
32
|
#if YY_FLEX_SUBMINOR_VERSION > 0
|
14
33
|
#define FLEX_BETA
|
15
34
|
#endif
|
@@ -31,7 +50,7 @@
|
|
31
50
|
|
32
51
|
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
|
33
52
|
|
34
|
-
#if __STDC_VERSION__ >= 199901L
|
53
|
+
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
35
54
|
|
36
55
|
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
|
37
56
|
* if you want the limit (max/min) macros for int types.
|
@@ -94,11 +113,12 @@ typedef unsigned int flex_uint32_t;
|
|
94
113
|
|
95
114
|
#else /* ! __cplusplus */
|
96
115
|
|
97
|
-
|
116
|
+
/* C99 requires __STDC__ to be defined as 1. */
|
117
|
+
#if defined (__STDC__)
|
98
118
|
|
99
119
|
#define YY_USE_CONST
|
100
120
|
|
101
|
-
#endif /* __STDC__ */
|
121
|
+
#endif /* defined (__STDC__) */
|
102
122
|
#endif /* ! __cplusplus */
|
103
123
|
|
104
124
|
#ifdef YY_USE_CONST
|
@@ -152,7 +172,12 @@ typedef unsigned int flex_uint32_t;
|
|
152
172
|
typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
153
173
|
#endif
|
154
174
|
|
155
|
-
|
175
|
+
#ifndef YY_TYPEDEF_YY_SIZE_T
|
176
|
+
#define YY_TYPEDEF_YY_SIZE_T
|
177
|
+
typedef size_t yy_size_t;
|
178
|
+
#endif
|
179
|
+
|
180
|
+
extern yy_size_t itex2MML_yyleng;
|
156
181
|
|
157
182
|
extern FILE *itex2MML_yyin, *itex2MML_yyout;
|
158
183
|
|
@@ -178,16 +203,6 @@ extern FILE *itex2MML_yyin, *itex2MML_yyout;
|
|
178
203
|
|
179
204
|
#define unput(c) yyunput( c, (yytext_ptr) )
|
180
205
|
|
181
|
-
/* The following is because we cannot portably get our hands on size_t
|
182
|
-
* (without autoconf's help, which isn't available because we want
|
183
|
-
* flex-generated scanners to compile on their own).
|
184
|
-
*/
|
185
|
-
|
186
|
-
#ifndef YY_TYPEDEF_YY_SIZE_T
|
187
|
-
#define YY_TYPEDEF_YY_SIZE_T
|
188
|
-
typedef unsigned int yy_size_t;
|
189
|
-
#endif
|
190
|
-
|
191
206
|
#ifndef YY_STRUCT_YY_BUFFER_STATE
|
192
207
|
#define YY_STRUCT_YY_BUFFER_STATE
|
193
208
|
struct yy_buffer_state
|
@@ -205,7 +220,7 @@ struct yy_buffer_state
|
|
205
220
|
/* Number of characters read into yy_ch_buf, not including EOB
|
206
221
|
* characters.
|
207
222
|
*/
|
208
|
-
|
223
|
+
yy_size_t yy_n_chars;
|
209
224
|
|
210
225
|
/* Whether we "own" the buffer - i.e., we know we created it,
|
211
226
|
* and can realloc() it to grow it, and should free() it to
|
@@ -275,8 +290,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
|
|
275
290
|
|
276
291
|
/* yy_hold_char holds the character lost when itex2MML_yytext is formed. */
|
277
292
|
static char yy_hold_char;
|
278
|
-
static
|
279
|
-
|
293
|
+
static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
|
294
|
+
yy_size_t itex2MML_yyleng;
|
280
295
|
|
281
296
|
/* Points to current character in buffer. */
|
282
297
|
static char *yy_c_buf_p = (char *) 0;
|
@@ -304,7 +319,7 @@ static void itex2MML_yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
|
|
304
319
|
|
305
320
|
YY_BUFFER_STATE itex2MML_yy_scan_buffer (char *base,yy_size_t size );
|
306
321
|
YY_BUFFER_STATE itex2MML_yy_scan_string (yyconst char *yy_str );
|
307
|
-
YY_BUFFER_STATE itex2MML_yy_scan_bytes (yyconst char *bytes,
|
322
|
+
YY_BUFFER_STATE itex2MML_yy_scan_bytes (yyconst char *bytes,yy_size_t len );
|
308
323
|
|
309
324
|
void *itex2MML_yyalloc (yy_size_t );
|
310
325
|
void *itex2MML_yyrealloc (void *,yy_size_t );
|
@@ -2219,7 +2234,7 @@ int itex2MML_lineno = 1;
|
|
2219
2234
|
|
2220
2235
|
int itex2MML_rowposn = 0;
|
2221
2236
|
int itex2MML_displaymode = 0;
|
2222
|
-
#line
|
2237
|
+
#line 2238 "lex.yy.c"
|
2223
2238
|
|
2224
2239
|
#define INITIAL 0
|
2225
2240
|
#define MATH 1
|
@@ -2250,6 +2265,35 @@ int itex2MML_displaymode = 0;
|
|
2250
2265
|
|
2251
2266
|
static int yy_init_globals (void );
|
2252
2267
|
|
2268
|
+
/* Accessor methods to globals.
|
2269
|
+
These are made visible to non-reentrant scanners for convenience. */
|
2270
|
+
|
2271
|
+
int itex2MML_yylex_destroy (void );
|
2272
|
+
|
2273
|
+
int itex2MML_yyget_debug (void );
|
2274
|
+
|
2275
|
+
void itex2MML_yyset_debug (int debug_flag );
|
2276
|
+
|
2277
|
+
YY_EXTRA_TYPE itex2MML_yyget_extra (void );
|
2278
|
+
|
2279
|
+
void itex2MML_yyset_extra (YY_EXTRA_TYPE user_defined );
|
2280
|
+
|
2281
|
+
FILE *itex2MML_yyget_in (void );
|
2282
|
+
|
2283
|
+
void itex2MML_yyset_in (FILE * in_str );
|
2284
|
+
|
2285
|
+
FILE *itex2MML_yyget_out (void );
|
2286
|
+
|
2287
|
+
void itex2MML_yyset_out (FILE * out_str );
|
2288
|
+
|
2289
|
+
yy_size_t itex2MML_yyget_leng (void );
|
2290
|
+
|
2291
|
+
char *itex2MML_yyget_text (void );
|
2292
|
+
|
2293
|
+
int itex2MML_yyget_lineno (void );
|
2294
|
+
|
2295
|
+
void itex2MML_yyset_lineno (int line_number );
|
2296
|
+
|
2253
2297
|
/* Macros after this point can all be overridden by user definitions in
|
2254
2298
|
* section 1.
|
2255
2299
|
*/
|
@@ -2292,7 +2336,7 @@ static int input (void );
|
|
2292
2336
|
/* This used to be an fputs(), but since the string might contain NUL's,
|
2293
2337
|
* we now use fwrite().
|
2294
2338
|
*/
|
2295
|
-
#define ECHO
|
2339
|
+
#define ECHO fwrite( itex2MML_yytext, itex2MML_yyleng, 1, itex2MML_yyout )
|
2296
2340
|
#endif
|
2297
2341
|
|
2298
2342
|
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
|
@@ -2303,7 +2347,7 @@ static int input (void );
|
|
2303
2347
|
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
|
2304
2348
|
{ \
|
2305
2349
|
int c = '*'; \
|
2306
|
-
|
2350
|
+
yy_size_t n; \
|
2307
2351
|
for ( n = 0; n < max_size && \
|
2308
2352
|
(c = getc( itex2MML_yyin )) != EOF && c != '\n'; ++n ) \
|
2309
2353
|
buf[n] = (char) c; \
|
@@ -2391,7 +2435,7 @@ YY_DECL
|
|
2391
2435
|
if (itex2MML_rowposn==2) itex2MML_rowposn=1;
|
2392
2436
|
|
2393
2437
|
|
2394
|
-
#line
|
2438
|
+
#line 2439 "lex.yy.c"
|
2395
2439
|
|
2396
2440
|
if ( !(yy_init) )
|
2397
2441
|
{
|
@@ -4981,7 +5025,7 @@ YY_RULE_SETUP
|
|
4981
5025
|
#line 1001 "itex2MML.l"
|
4982
5026
|
ECHO;
|
4983
5027
|
YY_BREAK
|
4984
|
-
#line
|
5028
|
+
#line 5029 "lex.yy.c"
|
4985
5029
|
case YY_STATE_EOF(INITIAL):
|
4986
5030
|
case YY_STATE_EOF(MATH):
|
4987
5031
|
case YY_STATE_EOF(ATTRIBUTELIST):
|
@@ -5180,7 +5224,7 @@ static int yy_get_next_buffer (void)
|
|
5180
5224
|
|
5181
5225
|
else
|
5182
5226
|
{
|
5183
|
-
|
5227
|
+
yy_size_t num_to_read =
|
5184
5228
|
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
|
5185
5229
|
|
5186
5230
|
while ( num_to_read <= 0 )
|
@@ -5194,7 +5238,7 @@ static int yy_get_next_buffer (void)
|
|
5194
5238
|
|
5195
5239
|
if ( b->yy_is_our_buffer )
|
5196
5240
|
{
|
5197
|
-
|
5241
|
+
yy_size_t new_size = b->yy_buf_size * 2;
|
5198
5242
|
|
5199
5243
|
if ( new_size <= 0 )
|
5200
5244
|
b->yy_buf_size += b->yy_buf_size / 8;
|
@@ -5249,6 +5293,14 @@ static int yy_get_next_buffer (void)
|
|
5249
5293
|
else
|
5250
5294
|
ret_val = EOB_ACT_CONTINUE_SCAN;
|
5251
5295
|
|
5296
|
+
if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
|
5297
|
+
/* Extend the array by 50%, plus the number we really need. */
|
5298
|
+
yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
|
5299
|
+
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) itex2MML_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
|
5300
|
+
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
|
5301
|
+
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
|
5302
|
+
}
|
5303
|
+
|
5252
5304
|
(yy_n_chars) += number_to_move;
|
5253
5305
|
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
|
5254
5306
|
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
|
@@ -5327,7 +5379,7 @@ static int yy_get_next_buffer (void)
|
|
5327
5379
|
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
|
5328
5380
|
{ /* need to shift things up to make room */
|
5329
5381
|
/* +2 for EOB chars. */
|
5330
|
-
register
|
5382
|
+
register yy_size_t number_to_move = (yy_n_chars) + 2;
|
5331
5383
|
register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
|
5332
5384
|
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
|
5333
5385
|
register char *source =
|
@@ -5376,7 +5428,7 @@ static int yy_get_next_buffer (void)
|
|
5376
5428
|
|
5377
5429
|
else
|
5378
5430
|
{ /* need more input */
|
5379
|
-
|
5431
|
+
yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
|
5380
5432
|
++(yy_c_buf_p);
|
5381
5433
|
|
5382
5434
|
switch ( yy_get_next_buffer( ) )
|
@@ -5652,7 +5704,7 @@ void itex2MML_yypop_buffer_state (void)
|
|
5652
5704
|
*/
|
5653
5705
|
static void itex2MML_yyensure_buffer_stack (void)
|
5654
5706
|
{
|
5655
|
-
|
5707
|
+
yy_size_t num_to_alloc;
|
5656
5708
|
|
5657
5709
|
if (!(yy_buffer_stack)) {
|
5658
5710
|
|
@@ -5664,7 +5716,9 @@ static void itex2MML_yyensure_buffer_stack (void)
|
|
5664
5716
|
(yy_buffer_stack) = (struct yy_buffer_state**)itex2MML_yyalloc
|
5665
5717
|
(num_to_alloc * sizeof(struct yy_buffer_state*)
|
5666
5718
|
);
|
5667
|
-
|
5719
|
+
if ( ! (yy_buffer_stack) )
|
5720
|
+
YY_FATAL_ERROR( "out of dynamic memory in itex2MML_yyensure_buffer_stack()" );
|
5721
|
+
|
5668
5722
|
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
|
5669
5723
|
|
5670
5724
|
(yy_buffer_stack_max) = num_to_alloc;
|
@@ -5682,6 +5736,8 @@ static void itex2MML_yyensure_buffer_stack (void)
|
|
5682
5736
|
((yy_buffer_stack),
|
5683
5737
|
num_to_alloc * sizeof(struct yy_buffer_state*)
|
5684
5738
|
);
|
5739
|
+
if ( ! (yy_buffer_stack) )
|
5740
|
+
YY_FATAL_ERROR( "out of dynamic memory in itex2MML_yyensure_buffer_stack()" );
|
5685
5741
|
|
5686
5742
|
/* zero only the new slots.*/
|
5687
5743
|
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
|
@@ -5726,7 +5782,7 @@ YY_BUFFER_STATE itex2MML_yy_scan_buffer (char * base, yy_size_t size )
|
|
5726
5782
|
|
5727
5783
|
/** Setup the input buffer state to scan a string. The next call to itex2MML_yylex() will
|
5728
5784
|
* scan from a @e copy of @a str.
|
5729
|
-
* @param
|
5785
|
+
* @param yystr a NUL-terminated string to scan
|
5730
5786
|
*
|
5731
5787
|
* @return the newly allocated buffer state object.
|
5732
5788
|
* @note If you want to scan bytes that may contain NUL values, then use
|
@@ -5745,12 +5801,11 @@ YY_BUFFER_STATE itex2MML_yy_scan_string (yyconst char * yystr )
|
|
5745
5801
|
*
|
5746
5802
|
* @return the newly allocated buffer state object.
|
5747
5803
|
*/
|
5748
|
-
YY_BUFFER_STATE itex2MML_yy_scan_bytes (yyconst char * yybytes,
|
5804
|
+
YY_BUFFER_STATE itex2MML_yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
|
5749
5805
|
{
|
5750
5806
|
YY_BUFFER_STATE b;
|
5751
5807
|
char *buf;
|
5752
|
-
yy_size_t n;
|
5753
|
-
int i;
|
5808
|
+
yy_size_t n, i;
|
5754
5809
|
|
5755
5810
|
/* Get memory for full buffer, including space for trailing EOB's. */
|
5756
5811
|
n = _yybytes_len + 2;
|
@@ -5832,7 +5887,7 @@ FILE *itex2MML_yyget_out (void)
|
|
5832
5887
|
/** Get the length of the current token.
|
5833
5888
|
*
|
5834
5889
|
*/
|
5835
|
-
|
5890
|
+
yy_size_t itex2MML_yyget_leng (void)
|
5836
5891
|
{
|
5837
5892
|
return itex2MML_yyleng;
|
5838
5893
|
}
|
data/ext/y.tab.c
CHANGED
@@ -738,7 +738,7 @@ typedef short int yytype_int16;
|
|
738
738
|
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
|
739
739
|
|
740
740
|
#ifndef YY_
|
741
|
-
# if YYENABLE_NLS
|
741
|
+
# if defined YYENABLE_NLS && YYENABLE_NLS
|
742
742
|
# if ENABLE_NLS
|
743
743
|
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
|
744
744
|
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
@@ -2172,7 +2172,7 @@ while (YYID (0))
|
|
2172
2172
|
we won't break user code: when these are the locations we know. */
|
2173
2173
|
|
2174
2174
|
#ifndef YY_LOCATION_PRINT
|
2175
|
-
# if YYLTYPE_IS_TRIVIAL
|
2175
|
+
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
2176
2176
|
# define YY_LOCATION_PRINT(File, Loc) \
|
2177
2177
|
fprintf (File, "%d.%d-%d.%d", \
|
2178
2178
|
(Loc).first_line, (Loc).first_column, \
|
@@ -4411,7 +4411,7 @@ yyreduce:
|
|
4411
4411
|
case 230:
|
4412
4412
|
#line 1291 "itex2MML.y"
|
4413
4413
|
{
|
4414
|
-
(yyval) = itex2MML_copy3("<mover>", (yyvsp[(2) - (2)]), "<mo stretchy=\"false\">&#
|
4414
|
+
(yyval) = itex2MML_copy3("<mover>", (yyvsp[(2) - (2)]), "<mo stretchy=\"false\">^</mo></mover>");
|
4415
4415
|
itex2MML_free_string((yyvsp[(2) - (2)]));
|
4416
4416
|
}
|
4417
4417
|
break;
|
@@ -4419,7 +4419,7 @@ yyreduce:
|
|
4419
4419
|
case 231:
|
4420
4420
|
#line 1295 "itex2MML.y"
|
4421
4421
|
{
|
4422
|
-
(yyval) = itex2MML_copy3("<mover>", (yyvsp[(2) - (2)]), "<mo>&#
|
4422
|
+
(yyval) = itex2MML_copy3("<mover>", (yyvsp[(2) - (2)]), "<mo>^</mo></mover>");
|
4423
4423
|
itex2MML_free_string((yyvsp[(2) - (2)]));
|
4424
4424
|
}
|
4425
4425
|
break;
|
metadata
CHANGED
@@ -1,12 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itextomml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
segments:
|
6
|
-
- 1
|
7
|
-
- 3
|
8
|
-
- 23
|
9
|
-
version: 1.3.23
|
4
|
+
version: 1.3.24
|
10
5
|
platform: ruby
|
11
6
|
authors:
|
12
7
|
- Jacques Distler
|
@@ -14,7 +9,7 @@ autorequire:
|
|
14
9
|
bindir: bin
|
15
10
|
cert_chain: []
|
16
11
|
|
17
|
-
date: 2010-
|
12
|
+
date: 2010-05-24 00:00:00 -05:00
|
18
13
|
default_executable:
|
19
14
|
dependencies: []
|
20
15
|
|
@@ -49,20 +44,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
49
44
|
requirements:
|
50
45
|
- - ">="
|
51
46
|
- !ruby/object:Gem::Version
|
52
|
-
segments:
|
53
|
-
- 0
|
54
47
|
version: "0"
|
48
|
+
version:
|
55
49
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
50
|
requirements:
|
57
51
|
- - ">="
|
58
52
|
- !ruby/object:Gem::Version
|
59
|
-
segments:
|
60
|
-
- 0
|
61
53
|
version: "0"
|
54
|
+
version:
|
62
55
|
requirements: []
|
63
56
|
|
64
57
|
rubyforge_project:
|
65
|
-
rubygems_version: 1.3.
|
58
|
+
rubygems_version: 1.3.5
|
66
59
|
signing_key:
|
67
60
|
specification_version: 3
|
68
61
|
summary: Native Ruby bindings to itex2MML.
|