[lasem: 1/2] itex2mml: update to 1.3.22.



commit 5615ba81451335983c0c5addf34218408021f0a0
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Wed Apr 21 10:34:03 2010 +0200

    itex2mml: update to 1.3.22.

 itex2mml/COPYING.itex2MML |    2 +-
 itex2mml/README.itex2MML  |    6 +++---
 itex2mml/itex2MML.h       |    6 +++---
 itex2mml/itex2MML.l       |   41 +++++++++++++++++++++++++++++++++++++----
 itex2mml/itex2MML.y       |   27 ++++++++++++++++++---------
 5 files changed, 62 insertions(+), 20 deletions(-)
---
diff --git a/itex2mml/COPYING.itex2MML b/itex2mml/COPYING.itex2MML
index 44bf66e..9b29b13 100644
--- a/itex2mml/COPYING.itex2MML
+++ b/itex2mml/COPYING.itex2MML
@@ -1,3 +1,3 @@
 http://golem.ph.utexas.edu/~distler/blog/itex2MML.html
 
-itex2MML is Open Source software, released under a dual license: GPL and MPL.
+itex2MML is Open Source software, released under a triple license: GPL, MPL and LGPL.
diff --git a/itex2mml/README.itex2MML b/itex2mml/README.itex2MML
index dc3f3a3..6d0b5fb 100644
--- a/itex2mml/README.itex2MML
+++ b/itex2mml/README.itex2MML
@@ -1,8 +1,8 @@
-itex2MML[1] transforms itex (a dialect of latex) into MathML.
+itex2MML[1] transforms itex (a dialect of latex) into MathML. itex2MML is developed by
+Paul Gartside and Jacques Distler.
 
-Currently, we include itex2MML 1.3.5, without the following modifications:
+Currently, we include itex2MML 1.3.22, with the following modification:
 
-  - a return value wasn't used, leading to a compilation warning in itex2MML.y ;
   - printf use is removed from itex2MML.y.
 
 Some documentation can be found here [4].
diff --git a/itex2mml/itex2MML.h b/itex2mml/itex2MML.h
index 41bfe20..d2cf4d8 100644
--- a/itex2mml/itex2MML.h
+++ b/itex2mml/itex2MML.h
@@ -1,11 +1,11 @@
-/*             itex2MML 1.3.15
- *   itex2MML.h last modified 10/11/2009
+/*             itex2MML 1.3.22
+ *   itex2MML.h last modified 4/18/2010
  */
 
 #ifndef ITEX2MML_H
 #define ITEX2MML_H
 
-#define ITEX2MML_VERSION "1.3.15"
+#define ITEX2MML_VERSION "1.3.22"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/itex2mml/itex2MML.l b/itex2mml/itex2MML.l
index a3c96e8..3ba725b 100644
--- a/itex2mml/itex2MML.l
+++ b/itex2mml/itex2MML.l
@@ -1,5 +1,5 @@
-/*             itex2MML 1.3.14
- *   itex2MML.l last modified 10/11/2009
+/*             itex2MML 1.3.22
+ *   itex2MML.l last modified 4/18/2010
  */
 
 %{
@@ -181,13 +181,13 @@ int itex2MML_displaymode = 0;
 "\\psi"  |
 "\\omega" |
 "\\backepsilon"   |
-"\\varepsilon" |
 "\\varkappa" |
 "\\varpi" |
 "\\varrho" |
 "\\varsigma" |
 "\\vartheta"      {yylval=itex2MML_copy2(yytext, ";"); if (yylval != itex2MML_empty_string) yylval[0]='&'; return MI;}
 
+"\\varepsilon" {yylval=itex2MML_copy_string("&#x03B5;"); return MI;}
 "\\phi"  {yylval=itex2MML_copy_string("&#x03D5;"); return MI;}
 "\\varphi"  {yylval=itex2MML_copy_string("&#x03C6;"); return MI;}
 
@@ -408,11 +408,25 @@ int itex2MML_displaymode = 0;
 "\\Colonsim"     {yylval=itex2MML_copy_string("&#x2237;&#x223C;"); return MOS;}
 "\\dblcolon"     {yylval=itex2MML_copy_string("&Colon;"); return MOL;}
 
+"\\ast"  |
+"\\Cap"  |
+"\\Cup"  |
+"\\circledast"  |
+"\\circledcirc" |
+"\\curlyvee"    |
+"\\curlywedge"  |
+"\\divideontimes" |
+"\\dotplus" |
+"\\leftthreetimes" |
+"\\rightthreetimes" |
+"\\veebar" |
 "\\gt"   |
 "\\lt"   |
 "\\approxeq"   |
 "\\backsim"   |
 "\\backsimeq"   |
+"\\barwedge"    |
+"\\doublebarwedge" |
 "\\subset"  |
 "\\subseteq" |
 "\\subseteqq" |
@@ -589,7 +603,18 @@ int itex2MML_displaymode = 0;
 "\\lozenge" |
 "\\blacksquare" |
 "\\blacktriangle" |
+"\\blacktriangleleft" |
+"\\blacktriangleright" |
 "\\blacktriangledown" |
+"\\ntriangleleft" |
+"\\ntriangleright" |
+"\\ntrianglelefteq" |
+"\\ntrianglerighteq" |
+"\\trianglelefteq" |
+"\\trianglerighteq" |
+"\\triangleq" |
+"\\vartriangleleft" |
+"\\vartriangleright" |
 "\\forall" |
 "\\bigtriangleup" |
 "\\bigtriangledown" |
@@ -608,6 +633,7 @@ int itex2MML_displaymode = 0;
 
 "\\Perp" |
 "\\Vbar" {yylval=itex2MML_copy_string("&Vbar;"); return MOL;}
+"\\boxdot" {yylval=itex2MML_copy_string("&sdotb;"); return MOL;}
 "\\Box" |
 "\\square" {yylval=itex2MML_copy_string("&square;"); return MOL;}
 "\\emptyset" |
@@ -664,6 +690,10 @@ int itex2MML_displaymode = 0;
 "\\circleddash" |
 "\\odash"   {yylval=itex2MML_copy_string("&odash;"); return MOL;}
 
+"\\intercal"   {yylval=itex2MML_copy_string("&intcal;"); return MOL;}
+"\\smallfrown"   {yylval=itex2MML_copy_string("&sfrown;"); return MOL;}
+"\\smallsmile"   {yylval=itex2MML_copy_string("&ssmile;"); return MOL;}
+
 "\\boxminus" |
 "\\minusb"   {yylval=itex2MML_copy_string("&boxminus;"); return MOL;}
 "\\boxplus" |
@@ -683,6 +713,8 @@ int itex2MML_displaymode = 0;
 "\\Otimes"       {yylval=itex2MML_copy_string("&Otimes;"); return MOL;}
 "\\bigotimes"     {yylval=itex2MML_copy_string("&bigotimes;"); return MOL;}
 
+"\\ominus"       {yylval=itex2MML_copy_string("&ominus;"); return MOL;}
+"\\oslash"       {yylval=itex2MML_copy_string("&osol;"); return MOL;}
 
 "\\oplus"       {yylval=itex2MML_copy_string("&oplus;"); return MOL;}
 "\\Oplus"   |
@@ -760,6 +792,7 @@ int itex2MML_displaymode = 0;
 "\\text"          {BEGIN(PLAINTEXT); return TEXTBOX;}
 
 "\\statusline"    {BEGIN(PLAINTEXT); return STATLINE;}
+"\\tooltip"       {BEGIN(PLAINTEXT); return TOOLTIP;}
 
 "\\toggle"        {return TOGGLE;}
 
@@ -869,7 +902,7 @@ int itex2MML_displaymode = 0;
 "\&#x"[a-fA-F0-9]+";"  {yylval=itex2MML_copy_string(yytext); return MI;}
 
 "\n"             itex2MML_lineno++;
-[\r\t ]+         ;
+[\r\t ]+           ;
 
 
 .              {return UNKNOWNCHAR;}
diff --git a/itex2mml/itex2MML.y b/itex2mml/itex2MML.y
index 378077a..223de3b 100644
--- a/itex2mml/itex2MML.y
+++ b/itex2mml/itex2MML.y
@@ -1,8 +1,8 @@
-/*             itex2MML 1.3.15
- *   itex2MML.y last modified 10/11/2009
+/*             itex2MML 1.3.21
+ *   itex2MML.y last modified 4/4/2010
  */
 
-%expect 218
+%expect 220
 
 %{
 #include <stdio.h>
@@ -279,7 +279,7 @@
 %}
 
 %left TEXOVER TEXATOP
-%token CHAR STARTMATH STARTDMATH ENDMATH MI MIB MN MO SUP SUB MROWOPEN MROWCLOSE LEFT RIGHT BIG BBIG BIGG BBIGG BIGL BBIGL BIGGL BBIGGL FRAC TFRAC OPERATORNAME MATHOP MATHBIN MATHREL MOP MOL MOLL MOF MOR PERIODDELIM OTHERDELIM LEFTDELIM RIGHTDELIM MOS MOB SQRT ROOT BINOM UNDER OVER OVERBRACE UNDERLINE UNDERBRACE UNDEROVER TENSOR MULTI ARRAY COLSEP ROWSEP ARRAYOPTS COLLAYOUT COLALIGN ROWALIGN ALIGN EQROWS EQCOLS ROWLINES COLLINES FRAME PADDING ATTRLIST ITALICS BOLD SLASHED RM BB ST END BBLOWERCHAR BBUPPERCHAR BBDIGIT CALCHAR FRAKCHAR CAL FRAK CLAP LLAP RLAP ROWOPTS TEXTSIZE SCSIZE SCSCSIZE DISPLAY TEXTSTY TEXTBOX TEXTSTRING XMLSTRING CELLOPTS ROWSPAN COLSPAN THINSPACE MEDSPACE THICKSPACE QUAD QQUAD NEGSPACE PHANTOM HREF UNKNOWNCHAR EMPTYMROW STATLINE TOGGLE FGHIGHLIGHT BGHIGHLIGHT SPACE INTONE INTTWO INTTHREE BAR WIDEBAR VEC WIDEVEC HAT WIDEHAT CHECK WIDECHECK TILDE WIDETILDE DOT DDOT DDDOT DDDDOT UNARYMINUS UNARYPLUS BEGINENV ENDENV MATRIX PMATRIX BMATRIX BBMATRIX VMATRIX VV
 MATRIX SVG ENDSVG SMALLMATRIX CASES ALIGNED GATHERED SUBSTACK PMOD RMCHAR COLOR BGCOLOR
+%token CHAR STARTMATH STARTDMATH ENDMATH MI MIB MN MO SUP SUB MROWOPEN MROWCLOSE LEFT RIGHT BIG BBIG BIGG BBIGG BIGL BBIGL BIGGL BBIGGL FRAC TFRAC OPERATORNAME MATHOP MATHBIN MATHREL MOP MOL MOLL MOF MOR PERIODDELIM OTHERDELIM LEFTDELIM RIGHTDELIM MOS MOB SQRT ROOT BINOM UNDER OVER OVERBRACE UNDERLINE UNDERBRACE UNDEROVER TENSOR MULTI ARRAY COLSEP ROWSEP ARRAYOPTS COLLAYOUT COLALIGN ROWALIGN ALIGN EQROWS EQCOLS ROWLINES COLLINES FRAME PADDING ATTRLIST ITALICS BOLD SLASHED RM BB ST END BBLOWERCHAR BBUPPERCHAR BBDIGIT CALCHAR FRAKCHAR CAL FRAK CLAP LLAP RLAP ROWOPTS TEXTSIZE SCSIZE SCSCSIZE DISPLAY TEXTSTY TEXTBOX TEXTSTRING XMLSTRING CELLOPTS ROWSPAN COLSPAN THINSPACE MEDSPACE THICKSPACE QUAD QQUAD NEGSPACE PHANTOM HREF UNKNOWNCHAR EMPTYMROW STATLINE TOOLTIP TOGGLE FGHIGHLIGHT BGHIGHLIGHT SPACE INTONE INTTWO INTTHREE BAR WIDEBAR VEC WIDEVEC HAT WIDEHAT CHECK WIDECHECK TILDE WIDETILDE DOT DDOT DDDOT DDDDOT UNARYMINUS UNARYPLUS BEGINENV ENDENV MATRIX PMATRIX BMATRIX BBMATRIX VM
 ATRIX VVMATRIX SVG ENDSVG SMALLMATRIX CASES ALIGNED GATHERED SUBSTACK PMOD RMCHAR COLOR BGCOLOR
 
 %%
 
@@ -292,7 +292,7 @@ xmlmmlTermList:
 | xmlmmlTermList char {/* all proc. in body*/}
 | xmlmmlTermList expression {/* all proc. in body*/};
 
-char: CHAR {printf("%s", $1);};
+char: CHAR {};
 
 expression: STARTMATH ENDMATH {/* empty math group - ignore*/}
 | STARTDMATH ENDMATH {/* ditto */}
@@ -574,6 +574,7 @@ closedTerm: array
 | phantom
 | href
 | statusline
+| tooltip
 | toggle
 | fghighlight
 | bghighlight
@@ -848,6 +849,14 @@ statusline: STATLINE TEXTSTRING closedTerm {
   itex2MML_free_string($3);
 };
 
+tooltip: TOOLTIP TEXTSTRING closedTerm {
+  char * s1 = itex2MML_copy3("<maction actiontype=\"tooltip\">", $3, "<mtext>");
+  $$ = itex2MML_copy3(s1, $2, "</mtext></maction>");
+  itex2MML_free_string(s1);
+  itex2MML_free_string($2);
+  itex2MML_free_string($3);
+};
+
 toggle: TOGGLE closedTerm closedTerm {
   char * s1 = itex2MML_copy3("<maction actiontype=\"toggle\" selection=\"2\">", $2, " ");
   $$ = itex2MML_copy3(s1, $3, "</maction>");
@@ -1216,7 +1225,7 @@ munderbrace: UNDERBRACE closedTerm {
 };
 
 munderline: UNDERLINE closedTerm {
-  $$ = itex2MML_copy3("<munder>", $2, "<mo>&UnderBar;</mo></munder>");
+  $$ = itex2MML_copy3("<munder>", $2, "<mo>&#x00332;</mo></munder>");
   itex2MML_free_string($2);
 };
 
@@ -1226,11 +1235,11 @@ moverbrace: OVERBRACE closedTerm {
 };
 
 bar: BAR closedTerm {
-  $$ = itex2MML_copy3("<mover>", $2, "<mo stretchy=\"false\">&OverBar;</mo></mover>");
+  $$ = itex2MML_copy3("<mover>", $2, "<mo stretchy=\"false\">&#x000AF;</mo></mover>");
   itex2MML_free_string($2);
 }
 | WIDEBAR closedTerm {
-  $$ = itex2MML_copy3("<mover>", $2, "<mo>&OverBar;</mo></mover>");
+  $$ = itex2MML_copy3("<mover>", $2, "<mo>&#x000AF;</mo></mover>");
   itex2MML_free_string($2);
 };
 
@@ -1690,7 +1699,7 @@ int itex2MML_do_html_filter (const char * buffer, unsigned long length, const in
 	}
       ++ptr2;
     }
-  if (itex2MML_write)
+  if (itex2MML_write && ptr2 > ptr1)
     (*itex2MML_write) (ptr1, ptr2 - ptr1);
 
   if (ptr2 == end) goto _finish;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]