itextomml 1.5.2 → 1.5.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,14 +1,13 @@
1
- /* A Bison parser, made by GNU Bison 2.3. */
1
+ /* A Bison parser, made by GNU Bison 3.0.4. */
2
2
 
3
- /* Skeleton interface for Bison's Yacc-like parsers in C
3
+ /* Bison interface for Yacc-like parsers in C
4
4
 
5
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6
- Free Software Foundation, Inc.
5
+ Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
7
6
 
8
- This program is free software; you can redistribute it and/or modify
7
+ This program is free software: you can redistribute it and/or modify
9
8
  it under the terms of the GNU General Public License as published by
10
- the Free Software Foundation; either version 2, or (at your option)
11
- any later version.
9
+ the Free Software Foundation, either version 3 of the License, or
10
+ (at your option) any later version.
12
11
 
13
12
  This program is distributed in the hope that it will be useful,
14
13
  but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,9 +15,7 @@
16
15
  GNU General Public License for more details.
17
16
 
18
17
  You should have received a copy of the GNU General Public License
19
- along with this program; if not, write to the Free Software
20
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
21
- Boston, MA 02110-1301, USA. */
18
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
22
19
 
23
20
  /* As a special exception, you may create a larger work that contains
24
21
  part or all of the Bison parser skeleton and distribute that work
@@ -33,183 +30,192 @@
33
30
  This special exception was added by the Free Software Foundation in
34
31
  version 2.2 of Bison. */
35
32
 
36
- /* Tokens. */
33
+ #ifndef YY_ITEX2MML_YY_Y_TAB_H_INCLUDED
34
+ # define YY_ITEX2MML_YY_Y_TAB_H_INCLUDED
35
+ /* Debug traces. */
36
+ #ifndef YYDEBUG
37
+ # define YYDEBUG 0
38
+ #endif
39
+ #if YYDEBUG
40
+ extern int itex2MML_yydebug;
41
+ #endif
42
+
43
+ /* Token type. */
37
44
  #ifndef YYTOKENTYPE
38
45
  # define YYTOKENTYPE
39
- /* Put the tokens into the symbol table, so that GDB and other debuggers
40
- know about them. */
41
- enum yytokentype {
42
- TEXATOP = 258,
43
- TEXOVER = 259,
44
- CHAR = 260,
45
- STARTMATH = 261,
46
- STARTDMATH = 262,
47
- ENDMATH = 263,
48
- MI = 264,
49
- MIB = 265,
50
- MN = 266,
51
- MO = 267,
52
- SUP = 268,
53
- SUB = 269,
54
- MROWOPEN = 270,
55
- MROWCLOSE = 271,
56
- LEFT = 272,
57
- RIGHT = 273,
58
- BIG = 274,
59
- BBIG = 275,
60
- BIGG = 276,
61
- BBIGG = 277,
62
- BIGL = 278,
63
- BBIGL = 279,
64
- BIGGL = 280,
65
- BBIGGL = 281,
66
- FRAC = 282,
67
- TFRAC = 283,
68
- OPERATORNAME = 284,
69
- MATHOP = 285,
70
- MATHBIN = 286,
71
- MATHREL = 287,
72
- MOP = 288,
73
- MOL = 289,
74
- MOLL = 290,
75
- MOF = 291,
76
- MOR = 292,
77
- PERIODDELIM = 293,
78
- OTHERDELIM = 294,
79
- LEFTDELIM = 295,
80
- RIGHTDELIM = 296,
81
- MOS = 297,
82
- MOB = 298,
83
- SQRT = 299,
84
- ROOT = 300,
85
- BINOM = 301,
86
- TBINOM = 302,
87
- UNDER = 303,
88
- OVER = 304,
89
- OVERBRACE = 305,
90
- UNDERLINE = 306,
91
- UNDERBRACE = 307,
92
- UNDEROVER = 308,
93
- TENSOR = 309,
94
- MULTI = 310,
95
- ARRAYALIGN = 311,
96
- COLUMNALIGN = 312,
97
- ARRAY = 313,
98
- COLSEP = 314,
99
- ROWSEP = 315,
100
- ARRAYOPTS = 316,
101
- COLLAYOUT = 317,
102
- COLALIGN = 318,
103
- ROWALIGN = 319,
104
- ALIGN = 320,
105
- EQROWS = 321,
106
- EQCOLS = 322,
107
- ROWLINES = 323,
108
- COLLINES = 324,
109
- FRAME = 325,
110
- PADDING = 326,
111
- ATTRLIST = 327,
112
- ITALICS = 328,
113
- SANS = 329,
114
- TT = 330,
115
- BOLD = 331,
116
- BOXED = 332,
117
- SLASHED = 333,
118
- RM = 334,
119
- BB = 335,
120
- ST = 336,
121
- END = 337,
122
- BBLOWERCHAR = 338,
123
- BBUPPERCHAR = 339,
124
- BBDIGIT = 340,
125
- CALCHAR = 341,
126
- FRAKCHAR = 342,
127
- CAL = 343,
128
- FRAK = 344,
129
- CLAP = 345,
130
- LLAP = 346,
131
- RLAP = 347,
132
- ROWOPTS = 348,
133
- TEXTSIZE = 349,
134
- SCSIZE = 350,
135
- SCSCSIZE = 351,
136
- DISPLAY = 352,
137
- TEXTSTY = 353,
138
- TEXTBOX = 354,
139
- TEXTSTRING = 355,
140
- XMLSTRING = 356,
141
- CELLOPTS = 357,
142
- ROWSPAN = 358,
143
- COLSPAN = 359,
144
- THINSPACE = 360,
145
- MEDSPACE = 361,
146
- THICKSPACE = 362,
147
- QUAD = 363,
148
- QQUAD = 364,
149
- NEGSPACE = 365,
150
- NEGMEDSPACE = 366,
151
- NEGTHICKSPACE = 367,
152
- PHANTOM = 368,
153
- HREF = 369,
154
- UNKNOWNCHAR = 370,
155
- EMPTYMROW = 371,
156
- STATLINE = 372,
157
- TOOLTIP = 373,
158
- TOGGLE = 374,
159
- TOGGLESTART = 375,
160
- TOGGLEEND = 376,
161
- FGHIGHLIGHT = 377,
162
- BGHIGHLIGHT = 378,
163
- SPACE = 379,
164
- INTONE = 380,
165
- INTTWO = 381,
166
- INTTHREE = 382,
167
- BAR = 383,
168
- WIDEBAR = 384,
169
- VEC = 385,
170
- WIDEVEC = 386,
171
- HAT = 387,
172
- WIDEHAT = 388,
173
- CHECK = 389,
174
- WIDECHECK = 390,
175
- TILDE = 391,
176
- WIDETILDE = 392,
177
- DOT = 393,
178
- DDOT = 394,
179
- DDDOT = 395,
180
- DDDDOT = 396,
181
- UNARYMINUS = 397,
182
- UNARYPLUS = 398,
183
- BEGINENV = 399,
184
- ENDENV = 400,
185
- MATRIX = 401,
186
- PMATRIX = 402,
187
- BMATRIX = 403,
188
- BBMATRIX = 404,
189
- VMATRIX = 405,
190
- VVMATRIX = 406,
191
- SVG = 407,
192
- ENDSVG = 408,
193
- SMALLMATRIX = 409,
194
- CASES = 410,
195
- ALIGNED = 411,
196
- GATHERED = 412,
197
- SUBSTACK = 413,
198
- PMOD = 414,
199
- RMCHAR = 415,
200
- COLOR = 416,
201
- BGCOLOR = 417,
202
- XARROW = 418,
203
- OPTARGOPEN = 419,
204
- OPTARGCLOSE = 420,
205
- ITEXNUM = 421,
206
- RAISEBOX = 422,
207
- NEG = 423
208
- };
46
+ enum yytokentype
47
+ {
48
+ TEXOVER = 258,
49
+ TEXATOP = 259,
50
+ CHAR = 260,
51
+ STARTMATH = 261,
52
+ STARTDMATH = 262,
53
+ ENDMATH = 263,
54
+ MI = 264,
55
+ MIB = 265,
56
+ MN = 266,
57
+ MO = 267,
58
+ SUP = 268,
59
+ SUB = 269,
60
+ MROWOPEN = 270,
61
+ MROWCLOSE = 271,
62
+ LEFT = 272,
63
+ RIGHT = 273,
64
+ BIG = 274,
65
+ BBIG = 275,
66
+ BIGG = 276,
67
+ BBIGG = 277,
68
+ BIGL = 278,
69
+ BBIGL = 279,
70
+ BIGGL = 280,
71
+ BBIGGL = 281,
72
+ FRAC = 282,
73
+ TFRAC = 283,
74
+ OPERATORNAME = 284,
75
+ MATHOP = 285,
76
+ MATHBIN = 286,
77
+ MATHREL = 287,
78
+ MOP = 288,
79
+ MOL = 289,
80
+ MOLL = 290,
81
+ MOF = 291,
82
+ MOR = 292,
83
+ PERIODDELIM = 293,
84
+ OTHERDELIM = 294,
85
+ LEFTDELIM = 295,
86
+ RIGHTDELIM = 296,
87
+ MOS = 297,
88
+ MOB = 298,
89
+ SQRT = 299,
90
+ ROOT = 300,
91
+ BINOM = 301,
92
+ TBINOM = 302,
93
+ UNDER = 303,
94
+ OVER = 304,
95
+ OVERBRACE = 305,
96
+ UNDERLINE = 306,
97
+ UNDERBRACE = 307,
98
+ UNDEROVER = 308,
99
+ TENSOR = 309,
100
+ MULTI = 310,
101
+ ARRAYALIGN = 311,
102
+ COLUMNALIGN = 312,
103
+ ARRAY = 313,
104
+ COLSEP = 314,
105
+ ROWSEP = 315,
106
+ ARRAYOPTS = 316,
107
+ COLLAYOUT = 317,
108
+ COLALIGN = 318,
109
+ ROWALIGN = 319,
110
+ ALIGN = 320,
111
+ EQROWS = 321,
112
+ EQCOLS = 322,
113
+ ROWLINES = 323,
114
+ COLLINES = 324,
115
+ FRAME = 325,
116
+ PADDING = 326,
117
+ ATTRLIST = 327,
118
+ ITALICS = 328,
119
+ SANS = 329,
120
+ TT = 330,
121
+ BOLD = 331,
122
+ BOXED = 332,
123
+ SLASHED = 333,
124
+ RM = 334,
125
+ BB = 335,
126
+ ST = 336,
127
+ END = 337,
128
+ BBLOWERCHAR = 338,
129
+ BBUPPERCHAR = 339,
130
+ BBDIGIT = 340,
131
+ CALCHAR = 341,
132
+ FRAKCHAR = 342,
133
+ CAL = 343,
134
+ FRAK = 344,
135
+ CLAP = 345,
136
+ LLAP = 346,
137
+ RLAP = 347,
138
+ ROWOPTS = 348,
139
+ TEXTSIZE = 349,
140
+ SCSIZE = 350,
141
+ SCSCSIZE = 351,
142
+ DISPLAY = 352,
143
+ TEXTSTY = 353,
144
+ TEXTBOX = 354,
145
+ TEXTSTRING = 355,
146
+ XMLSTRING = 356,
147
+ CELLOPTS = 357,
148
+ ROWSPAN = 358,
149
+ COLSPAN = 359,
150
+ THINSPACE = 360,
151
+ MEDSPACE = 361,
152
+ THICKSPACE = 362,
153
+ QUAD = 363,
154
+ QQUAD = 364,
155
+ NEGSPACE = 365,
156
+ NEGMEDSPACE = 366,
157
+ NEGTHICKSPACE = 367,
158
+ PHANTOM = 368,
159
+ HREF = 369,
160
+ UNKNOWNCHAR = 370,
161
+ EMPTYMROW = 371,
162
+ STATLINE = 372,
163
+ TOOLTIP = 373,
164
+ TOGGLE = 374,
165
+ TOGGLESTART = 375,
166
+ TOGGLEEND = 376,
167
+ FGHIGHLIGHT = 377,
168
+ BGHIGHLIGHT = 378,
169
+ SPACE = 379,
170
+ INTONE = 380,
171
+ INTTWO = 381,
172
+ INTTHREE = 382,
173
+ BAR = 383,
174
+ WIDEBAR = 384,
175
+ VEC = 385,
176
+ WIDEVEC = 386,
177
+ HAT = 387,
178
+ WIDEHAT = 388,
179
+ CHECK = 389,
180
+ WIDECHECK = 390,
181
+ TILDE = 391,
182
+ WIDETILDE = 392,
183
+ DOT = 393,
184
+ DDOT = 394,
185
+ DDDOT = 395,
186
+ DDDDOT = 396,
187
+ UNARYMINUS = 397,
188
+ UNARYPLUS = 398,
189
+ BEGINENV = 399,
190
+ ENDENV = 400,
191
+ MATRIX = 401,
192
+ PMATRIX = 402,
193
+ BMATRIX = 403,
194
+ BBMATRIX = 404,
195
+ VMATRIX = 405,
196
+ VVMATRIX = 406,
197
+ SVG = 407,
198
+ ENDSVG = 408,
199
+ SMALLMATRIX = 409,
200
+ CASES = 410,
201
+ ALIGNED = 411,
202
+ GATHERED = 412,
203
+ SUBSTACK = 413,
204
+ PMOD = 414,
205
+ RMCHAR = 415,
206
+ COLOR = 416,
207
+ BGCOLOR = 417,
208
+ XARROW = 418,
209
+ OPTARGOPEN = 419,
210
+ OPTARGCLOSE = 420,
211
+ ITEXNUM = 421,
212
+ RAISEBOX = 422,
213
+ NEG = 423
214
+ };
209
215
  #endif
210
216
  /* Tokens. */
211
- #define TEXATOP 258
212
- #define TEXOVER 259
217
+ #define TEXOVER 258
218
+ #define TEXATOP 259
213
219
  #define CHAR 260
214
220
  #define STARTMATH 261
215
221
  #define STARTDMATH 262
@@ -375,15 +381,16 @@
375
381
  #define RAISEBOX 422
376
382
  #define NEG 423
377
383
 
378
-
379
-
380
-
384
+ /* Value type. */
381
385
  #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
382
386
  typedef int YYSTYPE;
383
- # define yystype YYSTYPE /* obsolescent; will be withdrawn */
384
- # define YYSTYPE_IS_DECLARED 1
385
387
  # define YYSTYPE_IS_TRIVIAL 1
388
+ # define YYSTYPE_IS_DECLARED 1
386
389
  #endif
387
390
 
391
+
388
392
  extern YYSTYPE itex2MML_yylval;
389
393
 
394
+ int itex2MML_yyparse (char **ret_str);
395
+
396
+ #endif /* !YY_ITEX2MML_YY_Y_TAB_H_INCLUDED */
@@ -1,5 +1,5 @@
1
1
  # Some useful additions to the String class
2
- # Copyright (C) 2010, Jacques Distler. All rights reserved.
2
+ # Copyright (C) 2010-16, Jacques Distler. All rights reserved.
3
3
  # Licensed under a triple GPL/MPL/LGPL License.
4
4
 
5
5
  class String
@@ -564,7 +564,6 @@ end
564
564
  'daleth' => '&#x02138;',
565
565
  'demptyv' => '&#x029B1;',
566
566
  'ell' => '&#x02113;',
567
- 'empty' => '&#x02205;',
568
567
  'emptyv' => '&#x02205;',
569
568
  'gimel' => '&#x02137;',
570
569
  'iiota' => '&#x02129;',
@@ -813,7 +812,6 @@ end
813
812
  'upsi' => '&#x003C5;',
814
813
  'Xi' => '&#x0039E;',
815
814
  'xi' => '&#x003BE;',
816
- 'zeta' => '&#x003B6;',
817
815
  'Afr' => '&#x1D504;',
818
816
  'afr' => '&#x1D51E;',
819
817
  'Bfr' => '&#x1D505;',
@@ -1521,8 +1519,6 @@ end
1521
1519
  'clubs' => '&#x02663;',
1522
1520
  'copysr' => '&#x02117;',
1523
1521
  'cross' => '&#x02717;',
1524
- 'Dagger' => '&#x02021;',
1525
- 'dagger' => '&#x02020;',
1526
1522
  'dash' => '&#x02010;',
1527
1523
  'diams' => '&#x02666;',
1528
1524
  'dlcrop' => '&#x0230D;',
@@ -2002,7 +1998,7 @@ end
2002
1998
  'NotExists' => '&#x02204;',
2003
1999
  'NotGreater' => '&#x0226F;',
2004
2000
  'NotGreaterEqual' => '&#x02271;',
2005
- 'NotGreaterFullEqual' => '&#x02266;&#x00338;',
2001
+ 'NotGreaterFullEqual' => '&#x02267;&#x00338;',
2006
2002
  'NotGreaterGreater' => '&#x0226B;&#x00338;',
2007
2003
  'NotGreaterLess' => '&#x02279;',
2008
2004
  'NotGreaterSlantEqual' => '&#x02A7E;&#x00338;',
@@ -2315,7 +2311,7 @@ end
2315
2311
  "'" => '&#39;',
2316
2312
  '"' => '&quot;',
2317
2313
  }
2318
- TO_ESCAPE_PATTERN = Regexp.union(TO_ESCAPE.keys)
2314
+ TO_ESCAPE_PATTERN = Regexp.union(*TO_ESCAPE.keys)
2319
2315
 
2320
2316
  def escapeHTML
2321
2317
  self.gsub(TO_ESCAPE_PATTERN){|m| TO_ESCAPE[m]}
@@ -2331,24 +2327,16 @@ end
2331
2327
  when /\Aquot\z/ni then '"'
2332
2328
  when /\Aapos\z/ni then "'"
2333
2329
  when /\A#0*(\d+)\z/n then
2334
- if Integer($1) < 256
2335
- Integer($1).chr
2330
+ if Integer($1) < 1114111
2331
+ [Integer($1)].pack("U")
2336
2332
  else
2337
- if Integer($1) < 1114111
2338
- [Integer($1)].pack("U")
2339
- else
2340
- "&##{$1};"
2341
- end
2333
+ "&##{$1};"
2342
2334
  end
2343
2335
  when /\A#x([0-9a-f]+)\z/ni then
2344
- if $1.hex < 256
2336
+ if $1.hex < 1114111
2345
2337
  [$1.hex].pack("U")
2346
2338
  else
2347
- if $1.hex < 1114111
2348
- [$1.hex].pack("U")
2349
- else
2350
- "&#x#{$1};"
2351
- end
2339
+ "&#x#{$1};"
2352
2340
  end
2353
2341
  else
2354
2342
  "&#{match};"