/itexToMML

To download this project, use:
bzr branch http://golem.ph.utexas.edu/~distler/code/itexToMML/

« back to all changes in this revision

Viewing changes to itex-src/itex2MML.l

  • Committer: Jacques Distler
  • Date: 2011-07-07 14:47:43 UTC
  • Revision ID: distler@golem.ph.utexas.edu-20110707144743-3yb92952nkjti5ha
Tags: 1.4.6
itex2MML 1.4.6

* Emit MathML3  @href attribute (along with
MathML2 @xlink:href).
* More intelligent number parsing.
* New itex command: \itexnum{} (forces
itex2MML to interpret the argument as
a number)
* Some C fixes (in IFDEFed code, which is
*not* normally used) from Alexandre P.

Show diffs side-by-side

added added

removed removed

1
 
/*             itex2MML 1.4.5
2
 
 *   itex2MML.l last modified 10/2/2010
 
1
/*             itex2MML 1.4.6
 
2
 *   itex2MML.l last modified 7/7/2011
3
3
 */
4
4
 
5
5
%{
97
97
 
98
98
[a-zA-Z]+       {yylval=itex2MML_copy_string(yytext); return MI;}
99
99
 
100
 
[0-9,.]*[0-9]+          {yylval=itex2MML_copy_string(yytext); return MN;}
 
100
[0-9]{1,3}(,[0-9]{3,3})*(\.[0-9]+)? |
 
101
[0-9]*[\.][0-9]+                   |
 
102
[0-9]+           {yylval=itex2MML_copy_string(yytext); return MN;}
101
103
"\\infty"   |
102
104
"\\infinity"     {yylval=itex2MML_copy_string("∞"); return MN;}
103
105
 
911
913
"\\mathop"        {BEGIN(PLAINTEXT); return MATHOP;}
912
914
"\\mathbin"       {BEGIN(PLAINTEXT); return MATHBIN;}
913
915
"\\mathrel"       {BEGIN(PLAINTEXT); return MATHREL;}
 
916
"\\itexnum"       {BEGIN(PLAINTEXT); return ITEXNUM;}
914
917
 
915
918
"\\includegraphics"(\[[^\]]*\])?\{[^}]*\}       ;
916
919