add: _1e=k<AMnames.length&&str.slice(0,AMnames[k].length)>=AMnames[k]; } AMpreviousSymbol=AMcurrentSymbol; if(_1d!=""){ AMcurrentSymbol=AMsymbols[mk].ttype; return AMsymbols[mk]; } AMcurrentSymbol=CONST; k=1; st=str.slice(0,1); var _20=true; while("0"<=st&&st<="9"&&k<=str.length){ st=str.slice(k,k+1); k++; } if(st==decimalsign){ st=str.slice(k,k+1); if("0"<=st&&st<="9"){ _20=false; k++; while("0"<=st&&st<="9"&&k<=str.length){ st=str.slice(k,k+1); k++; } } } if((_20&&k>1)||k>2){ st=str.slice(0,k-1); _1c="mn"; }else{ k=2; st=str.slice(0,1); _1c=(("A">st||st>"Z")&&("a">st||st>"z")?"mo":"mi"); } if(st=="-"&&AMpreviousSymbol==INFIX){ return {input:st,tag:_1c,output:st,ttype:UNARY,func:true}; } return {input:st,tag:_1c,output:st,ttype:CONST}; } 
context: function AMgetSymbol(str) {//return maximal initial substring of str that appears in names//return null if there is none  var k = 0; //new pos  var j = 0; //old pos  var mk; //match pos  var st;  var tagst;  var match = "";  var more = true;  for (var i=1; i<=str.length && more; i++) {    st = str.slice(0,i); //initial substring of length i    j = k;    k = AMposition(AMnames, st, j);    if (k<AMnames.length && str.slice(0,AMnames[k].length)==AMnames[k]){      match = AMnames[k];      mk = k;      i = match.length;    }    more = k<AMnames.length && str.slice(0,AMnames[k].length)>=AMnames[k];  }  AMpreviousSymbol=AMcurrentSymbol;  if (match!=""){    AMcurrentSymbol=AMsymbols[mk].ttype;    return AMsymbols[mk];   }// if str[0] is a digit or - return maxsubstring of digits.digits  AMcurrentSymbol=CONST;  k = 1;  st = str.slice(0,1);  var integ = true;  while ("0"<=st && st<="9" && k<=str.length) {    st = str.slice(k,k+1);    k++;  }  if (st == decimalsign) {    st = str.slice(k,k+1);    if ("0"<=st && st<="9") {      integ = false;      k++;      while ("0"<=st && st<="9" && k<=str.length) {        st = str.slice(k,k+1);        k++;      }    }  }  if ((integ && k>1) || k>2) {    st = str.slice(0,k-1);    tagst = "mn";  } else {    k = 2;    st = str.slice(0,1); //take 1 character    tagst = (("A">st || st>"Z") && ("a">st || st>"z")?"mo":"mi");  }  if (st=="-" && AMpreviousSymbol==INFIX)    return {input:st, tag:tagst, output:st, ttype:UNARY, func:true};  return {input:st, tag:tagst, output:st, ttype:CONST};}
meta: 6015	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6015/d8776708e0e10dfa0ab6ee1d0fa9e512d8d16348/ASCIIMathML.js/clean/packages/acs-templating/www/resources/xinha-nightly/plugins/Equation/ASCIIMathML.js