Merge branch 'master' into gh-pages

This commit is contained in:
Jeff Parsons 2017-03-31 18:43:29 -07:00
commit e3c11d0bb8
3 changed files with 23 additions and 23 deletions

View file

@ -1644,9 +1644,8 @@ class DebuggerPDP10 extends Debugger {
if (!sOpcode) {
/*
* MACRO-10 permits instructions to be assembled without an explicit opcode;
* an address expression is sufficient. This is done to generate UUO opcodes,
* for example.
* MACRO-10 also allows instructions to be assembled without an opcode (ie, just an address expression),
* so if that's all we have, skip the opcode parsing.
*/
if (sOperands) opCode = opMask = 0;
}
@ -1710,10 +1709,10 @@ class DebuggerPDP10 extends Debugger {
if (opCode >= 0) break;
}
/*
* MACRO-10 also allows instructions to be assembled without an opcode (ie, just an address reference),
* MACRO-10 also allows instructions to be assembled without an opcode (ie, just an address expression),
* so we'll give that a try next (as long as we're not mashing two symbols together).
*/
if (opCode < 0 && sOperands && !sOperands.match(/^[0-9A-Z$%.?]/i)) {
if (opCode < 0 && (!sOperands || !sOperands.match(/^[0-9A-Z$%.?]/i))) {
sOperands = sOpcode + sOperands;
sOpcode = "";
opCode = 0;

View file

@ -526,7 +526,7 @@ class Macro10 {
/*
* And last but not least, perform all fixups.
*/
this.aFixups.forEach(function processFixup(sValue, nLocation){
this.aFixups.forEach(function processFixup(sValue, nLocation) {
let value = macro10.parseExpression(sValue, undefined, nLocation);
if (value === undefined) {
macro10.error("unable to parse expression '" + sValue + "'");
@ -657,6 +657,7 @@ class Macro10 {
var sLiteral = this.getLiteral(sOperands);
if (sLiteral) {
sOperands = sOperands.replace(sLiteral, this.defMacro(Macro10.PSEUDO_OP.LITERAL, this.getLiteral(sRemainder)));
if (!sSeparator) sSeparator = "\t";
}
/*
@ -785,7 +786,7 @@ class Macro10 {
if (nLocation < this.nLocation) {
/*
* An OPDEF invokation *may* have operands, but it's not required to.
* An OPDEF invocation *may* have operands, but it's not required to.
*/
if (!sOperands) return true;
@ -995,7 +996,7 @@ class Macro10 {
}
/**
* parseExpression(sOperand, fPass1, nLocation)
* parseExpression(sExp, fPass1, nLocation)
*
* This is a wrapper around the Debugger's parseExpression() function to take care of some
* additional requirements we have, such as interpreting a period as the current location and
@ -1003,19 +1004,19 @@ class Macro10 {
* of a 36-bit value.
*
* @this {Macro10}
* @param {string} sOperand
* @param {string} sExp
* @param {boolean|undefined} [fPass1]
* @param {number|undefined} [nLocation]
* @return {number|undefined}
*/
parseExpression(sOperand, fPass1, nLocation)
parseExpression(sExp, fPass1, nLocation)
{
var result;
/*
* Check for the "double comma" syntax that MACRO-10 uses to express a 36-bit value as two 18-bit halves,
* and invoke ourselves recursively for each half.
*/
var match = sOperand.match(/^([^,]*),,([^,]*)$/);
var match = sExp.match(/^([^,]*),,([^,]*)$/);
if (!match) {
if (nLocation === undefined) {
nLocation = (this.nLocationScope >= 0? this.nLocationScope : this.nLocation);
@ -1025,11 +1026,11 @@ class Macro10 {
* (or at least assignments), so we check for those in the given expression and convert them to quoted
* sequences that the Debugger's parseExpression() understands.
*/
sOperand = sOperand.replace(/SIXBIT\s*(\S)(.*?)\1/g, "'$2'").replace(/ASCII\s*(\S)(.*?)\1/g, '"$2"');
sExp = sExp.replace(/SIXBIT\s*(\S)(.*?)\1/g, "'$2'").replace(/ASCII\s*(\S)(.*?)\1/g, '"$2"');
var sOperator = "";
var sOperands = sOperand;
if (match = sOperand.match(/^([^\s]+)\s+(.+?)\s*$/)) {
var sOperands = sExp;
if (match = sExp.match(/^([^\s]+)\s*(.*?)\s*$/)) {
sOperator = match[1];
sOperands = match[2];
}
@ -1046,9 +1047,9 @@ class Macro10 {
* is (I think) as the decimal point within a floating-point number, so here we only replace
* periods that are not FOLLOWED by a decimal digit.
*/
result = this.dbg.parseExpression(sOperand.replace(/\.([^0-9]|$)/g, this.dbg.toStrBase(nLocation, -1) + "$1"), fPass1);
result = this.dbg.parseExpression(sExp.replace(/\.([^0-9]|$)/g, this.dbg.toStrBase(nLocation, -1) + "$1"), fPass1);
if (result === undefined) {
this.error("unable to parse expression '" + sOperand + "'");
this.error("unable to parse expression '" + sExp + "'");
}
}
} else {

View file

@ -201,9 +201,9 @@ m.stop=function(a,b){if(this.A.P){this.A.P=!1;this.F=b-this.La;if(!this.O){b="st
function ud(a,b,c){var d=-1;c||(d=a.v.f(b),2756==d>>23&&a.v.Ea==b&&(b=sd(a.v,1)));if(0<c&&(a.qa&&!--a.qa||Xc(a,b,1,a.b)))return!0;0<=c&&a.j.length&&(a.oa++,0>d&&(d=a.v.f(b)),0<=d&&(cf(a.j[a.W],b),++a.W==a.j.length&&(a.W=0)));return!1}
function Cf(a,b,c,d){var e=Z(b.B),f=a.Na(b,1),g,h,k,l=0,p=f/Yb|0,u;for(u in Df)if(g=Df[u][p&u]){h=+u;p>>=6;switch(h){case 32512:k=Ef;l=p&3;break;case 32256:k=Ff;l=p&7;break;case 29248:k=Gf,l=(p&48)>>2|(p&6)>>1}break}k=k&&k[l]||"";"S"==k&&g>Hf&&(k="B");k=If[g||0]+k;if(g){if(28700==h)h=f/Zb&127,l=K(a,h,-1);else for(h=f>>23&15,l=K(a,h,-1),p=0;l&&p<Jf.length;p++)if(g==Jf[p][0]&&(u=Jf[p][h])){k=If[u];l="";break}k=Ba(k,8)+(l?l+",":"");f&4194304&&(k+="@");k+=K(a,f&262143,-1);(f=f>>18&15)&&(k+="("+K(a,f,
-1)+")")}else k=Ba(k,8)+kf(a,f);f=k;g="";h=K(a,e.B,18)+":";if(-1!==e.B&&-1!==b.B){do if(k=a.Na(e,1),g+=" "+kf(a,k),null==e.B)break;while(e.B!=b.B)}h+=Ba(g,16)+f;c&&(h=Ba(h,48)+";"+(c||""),h=a.v.A.Va?h+("cycles="+fd(a.v).toString()+" cs="+n(a.v.Ha)):h+(null!=d?"="+d.toString():""));return h}
function Kf(a,b,c,d,e){var f=-1,g,h;a.ja=null;if(b){for(var k=b.toUpperCase(),l=0;l<Jf.length;l++)for(var p in Jf[l])if(+p&&(h=Jf[l][p],k==If[h])){k=If[Jf[l][0]];c&&(c=K(a,+p)+","+c);break}for(var u in Df){g=+u;p=Df[u];switch(g){case 32512:l=Ef;break;case 32256:l=Ff;break;case 29248:l=Gf;break;default:l=[""]}for(var D in p){h=p[D];for(var I=0;I<l.length;I++){var P=l[I];"S"==P&&h>Hf&&(P="B");if(k==If[h]+P){f=29248!=g?I:(I&3)<<1|(I&12)<<2;f=(D|f<<6)*Yb;break}}if(0<=f)break}if(0<=f)break}0>f&&c&&!c.match(/^[0-9A-Z$%.?]/i)&&
(c=b+c,b="",f=0)}else c&&(f=g=0);if(0<=f&&c)for(k=c.split(","),u=0;u<k.length;u++)if(h=k[u].trim()){if(1<u){a.u("too many operands: "+c);f=-1;break}D=h.match(/(@?)([^(]*)\(?([^)]*)\)?/);if(!D){a.u("unknown operand: "+h);f=-1;break}D[1]&&(f+=4194304);if(h=D[3]){h=Ue(a,h,e);if(void 0==h){f=-1;break}if(0>h||15<h)h&=15;f+=h<<18}h=D[2];if(u||1==k.length)h=h?h.replace(/(^|[^0-9])\./g,"$1"+K(a,d,18)):"0";h=Ue(a,h,e);if(void 0==h){f=-1;break}if(!u&&1<k.length)if(28700==g){if(0>h||127<h)h&=127;f+=h*Zb}else{if(0>
h||15<h)h&=15;f+=h<<23}else{if(b||u)if(0>h||262143<h)h&=Sb;f+=h}}0>f&&!e&&a.u("unknown instruction: "+b+" "+c);return f}function Ze(a){var b,c;a.b=["bp"];if(a.N)for(b=1;b<a.N.length;b++){c=a.N[b];c=bf(c);var d=a.G;Wc(d.b[c>>>d.i],!1)}a.N=["br"];if(a.K)for(b=1;b<a.K.length;b++)c=a.K[b],c=bf(c),d=a.G,Wc(d.b[c>>>d.i],!0);a.K=["bw"];a.Ca=0;a.qa=0}
function Kf(a,b,c,d,e){var f=-1,g,h;a.ja=null;if(b){for(var k=b.toUpperCase(),l=0;l<Jf.length;l++)for(var p in Jf[l])if(+p&&(h=Jf[l][p],k==If[h])){k=If[Jf[l][0]];c&&(c=K(a,+p)+","+c);break}for(var u in Df){g=+u;p=Df[u];switch(g){case 32512:l=Ef;break;case 32256:l=Ff;break;case 29248:l=Gf;break;default:l=[""]}for(var D in p){h=p[D];for(var I=0;I<l.length;I++){var P=l[I];"S"==P&&h>Hf&&(P="B");if(k==If[h]+P){f=29248!=g?I:(I&3)<<1|(I&12)<<2;f=(D|f<<6)*Yb;break}}if(0<=f)break}if(0<=f)break}!(0>f)||c&&
c.match(/^[0-9A-Z$%.?]/i)||(c=b+c,b="",f=0)}else c&&(f=g=0);if(0<=f&&c)for(k=c.split(","),u=0;u<k.length;u++)if(h=k[u].trim()){if(1<u){a.u("too many operands: "+c);f=-1;break}D=h.match(/(@?)([^(]*)\(?([^)]*)\)?/);if(!D){a.u("unknown operand: "+h);f=-1;break}D[1]&&(f+=4194304);if(h=D[3]){h=Ue(a,h,e);if(void 0==h){f=-1;break}if(0>h||15<h)h&=15;f+=h<<18}h=D[2];if(u||1==k.length)h=h?h.replace(/(^|[^0-9])\./g,"$1"+K(a,d,18)):"0";h=Ue(a,h,e);if(void 0==h){f=-1;break}if(!u&&1<k.length)if(28700==g){if(0>
h||127<h)h&=127;f+=h*Zb}else{if(0>h||15<h)h&=15;f+=h<<23}else{if(b||u)if(0>h||262143<h)h&=Sb;f+=h}}0>f&&!e&&a.u("unknown instruction: "+b+" "+c);return f}function Ze(a){var b,c;a.b=["bp"];if(a.N)for(b=1;b<a.N.length;b++){c=a.N[b];c=bf(c);var d=a.G;Wc(d.b[c>>>d.i],!1)}a.N=["br"];if(a.K)for(b=1;b<a.K.length;b++)c=a.K[b],c=bf(c),d=a.G,Wc(d.b[c>>>d.i],!0);a.K=["bw"];a.Ca=0;a.qa=0}
m.Ra=function(a,b,c){var d=!0;c||Lf(this,a,b,!1,!0);if(a!=this.b){var e=bf(b);if(-1===e)this.u("invalid address: "+K(this,b.B,18)),d=!1;else{var f=this.G;f.b[e>>>f.i].Ra(e&16383,a==this.K)}}d&&(a.push(b),c?b.ra=!0:(Mf(this,a,a.length-1,"set"),$e(this)));return d};function Lf(a,b,c,d,e){var f=!1;c=bf(c);for(var g=1;g<b.length;g++){var h=b[g];if(c==bf(h)&&(!d||h.ra)){f=!0;h.ra||e||Mf(a,b,g,"cleared");b.splice(g,1);b!=a.b&&(d=a.G,Wc(d.b[c>>>d.i],b==a.K));h.ra||$e(a);break}}return f}
function Nf(a,b){for(var c=1;c<b.length;c++)Mf(a,b,c);return b.length-1}function Mf(a,b,c,d){c=b[c];a.u(b[0]+" "+K(a,c.B,18)+(d?" "+d:c.ib?' "'+c.ib+'"':""))}function Bf(a,b){if(void 0!==b)Xc(a,b,1,a.b,!0),a.O=0;else for(b=1;b<a.b.length;b++){var c=a.b[b];if(c.ra){if(!Lf(a,a.b,c,!0))break;b=0}}}
function Xc(a,b,c,d,e){var f=!1;if(!a.Ca++)for(var g=1;!f&&g<d.length;g++){var h=d[g];if(!e||h.ra)for(var k=bf(h)&(d==a.b?65535:-1),l=0;l<c;l++)if(b+l==k){var p,f=!0;h.ra&&(Lf(a,d,h,!0),e=!0);if(p=h.Ab){for(var f=!1,u=0;u<p.length;u++)if(!Of(a,p[u],!0)){if(p[u].indexOf("if")){f=!0;break}for(var D=u+1;D<p.length&&p[D].indexOf("else");D++)u++;if(D==p.length){f=!0;break}}a.v.A.P||(f=!0)}if(f){e||Mf(a,d,g,"hit");break}}}a.Ca--;return f}
@ -244,14 +244,14 @@ function Dg(a){if(0<=a.W.indexOf("p"))return a.u(a.G.join("")),0;var b=We(a.b);t
d;f+c.Ta<=a.X;f++){for(var g=void 0,g=0;g<c.Ta&&c.S[g]===a.S[f+g]&&c.Aa.ea[g]==a.ea[f];g++);if(g==c.Ta){Hg(a,c.Aa.name,f,Ig);c.Aa=null;break}}c.Aa&&(Hg(a,c.Aa.name,a.X,Ig),c.Aa.S.forEach(function(b){return function(c,d){Jg(a,c,b.Aa.ea[d])}}(c)))}for(d=0;d<a.O.length;d++){var h=a.O[d],k=a.v[h];k?Kg(a,k.ma):a.error("missing definition for variable '"+h+"'")}a.ea.forEach(function(b,c){var d=Lg(a,b,void 0,c);void 0===d?a.error("unable to parse expression '"+b+"'"):(d+=a.S[c],a.S[c]=Mg(a,d,c))})}catch(l){a.u(l.message),
a.V=-1}a.b.i=b;return a.V}
function Gg(a,b,c,d,e){var f;if(a.i&&(1==a.i&&(f=b.indexOf(a.J),0<=f?(a.i++,b=b.substr(f+1)):a.error("expected "+a.M+" definition in '"+b+"'")),1<a.i&&(b=Ng(a,b)),a.i))return!0;null!=a.D&&(b=Og(a,b));var g=!0;f="";for(var h;g;){h=b.match(a.ga);if(!h||h[5]&&";"!=h[5].slice(0,1))return a.error("failed to parse line '"+b+"'"),!1;g=!1;f=h[2].toUpperCase();if(f==Pg||f==Qg)c=null;if(c){for(var k=0;k<c.length;k++)for(var l=c[k],p=d[k]||e[k]||"",u=0,D=b.length-h[5].length;u<D;){var I=b.indexOf(l,u);if(0>
I)break;var u=I+1,P=I+l.length,fb="",Ab="";I&&(fb=b[I-1]).match(/[0-9A-Z$%.]/i)||!(P>=b.length)&&(Ab=b[P]).match(/[0-9A-Z$%.]/i)||("'"==fb&&I--,"'"==Ab&&P++,b=b.substr(0,I)+p+b.substr(P),u=I+p.length,g=!0)}c=null}}d=h[1];b=h[3];c=h[4].trim();h=h[4]+h[5];d&&(d=d.slice(0,-1),Hg(a,d,a.X,Ig));var G;f&&(G=c.match(/^([=:]+)(.*)/))&&(e=0,d=f,f=G[1],c=G[2],"=="==f?e|=Rg:"=:"==f&&(e|=Sg),Hg(a,d,c,e),f=c="");if(!f&&!c)return!0;a.M=f;for((G=Tg(a,c))&&(c=c.replace(G,Ug(a,Vg,Tg(a,h))));G=Wg(a,c);)c=c.replace(G,
G.slice(0,-1));if(!Xg(a,f,c))switch(f){case Yg:case Zg:case $g:Og(a,h);break;case ah:f=c;G=Lg(a,f);void 0!==G&&null==a.b.ja&&0<=G&&262143>=G?a.X+=G:a.error("unrecognized BLOCK expression '"+f+"'");break;case bh:(f=c)?(a.H=Lg(a,f,!0),void 0===a.H&&a.error("unrecognized END expression '"+f+"'")):a.H=a.la;break;case ch:dh(a,c);break;case eh:a.X=Lg(a,c)||0;break;case fh:dh(a,c.replace(",",",,"));break;case gh:case hh:case ih:case jh:case kh:case lh:case mh:case Pg:case Qg:case nh:case oh:Ug(a,f,h);break;
case ph:case qh:case rh:case sh:case th:case uh:case vh:break;default:f=(f+b+c).trim(),G=Lg(a,f,!0),void 0!==G?Jg(a,G,a.b.ja):a.error("unrecognized word expression '"+f+"'")}return!0}
I)break;var u=I+1,P=I+l.length,fb="",Ab="";I&&(fb=b[I-1]).match(/[0-9A-Z$%.]/i)||!(P>=b.length)&&(Ab=b[P]).match(/[0-9A-Z$%.]/i)||("'"==fb&&I--,"'"==Ab&&P++,b=b.substr(0,I)+p+b.substr(P),u=I+p.length,g=!0)}c=null}}d=h[1];b=h[3];c=h[4].trim();h=h[4]+h[5];d&&(d=d.slice(0,-1),Hg(a,d,a.X,Ig));var G;f&&(G=c.match(/^([=:]+)(.*)/))&&(e=0,d=f,f=G[1],c=G[2],"=="==f?e|=Rg:"=:"==f&&(e|=Sg),Hg(a,d,c,e),f=c="");if(!f&&!c)return!0;a.M=f;if(G=Tg(a,c))c=c.replace(G,Ug(a,Vg,Tg(a,h))),b||(b="\t");for(;G=Wg(a,c);)c=
c.replace(G,G.slice(0,-1));if(!Xg(a,f,c))switch(f){case Yg:case Zg:case $g:Og(a,h);break;case ah:f=c;G=Lg(a,f);void 0!==G&&null==a.b.ja&&0<=G&&262143>=G?a.X+=G:a.error("unrecognized BLOCK expression '"+f+"'");break;case bh:(f=c)?(a.H=Lg(a,f,!0),void 0===a.H&&a.error("unrecognized END expression '"+f+"'")):a.H=a.la;break;case ch:dh(a,c);break;case eh:a.X=Lg(a,c)||0;break;case fh:dh(a,c.replace(",",",,"));break;case gh:case hh:case ih:case jh:case kh:case lh:case mh:case Pg:case Qg:case nh:case oh:Ug(a,
f,h);break;case ph:case qh:case rh:case sh:case th:case uh:case vh:break;default:f=(f+b+c).trim(),G=Lg(a,f,!0),void 0!==G?Jg(a,G,a.b.ja):a.error("unrecognized word expression '"+f+"'")}return!0}
function Xg(a,b,c){var d=a.v[b];if(!d)return!1;if(null!=c){if(d.Sa==wh){var e=a.X;Kg(a,d.ma);if(e<a.X){if(!c)return!0;xh(a);Kg(a,c);var d=a.S[0],f=a.ea[0];yh(a);if(void 0!==d)return a.S[e]+=d&130023423,a.S[e]|=d&4194304,f&&(a.ea[e]=a.ea[e]?a.ea[e]+("+"+f):f),!0}a.error("OPDEF '"+b+"' ("+c+") failed");return!1}b=a.j;a.j=d;d.Qa=zh(a,c,!0);Kg(a,d.ma,d.Ua,d.Qa,d.Bb);a.j=b;return!0}if("?"!=b[0])return!1;switch(b.substr(1)){case ih:case mh:d.Sa||Kg(a,d.ma);break;case jh:0<d.Sa&&Kg(a,d.ma);break;case kh:0>
d.Sa&&Kg(a,d.ma);break;case lh:case hh:d.Sa&&Kg(a,d.ma);break;case Pg:case Qg:for(b=0;b<d.Qa.length;b++)Kg(a,d.ma,d.Ua,[d.Qa[b]],[]);break;case oh:for(;0<d.Sa--;)Kg(a,d.ma);break;default:c=d.ma,xh(a,b),Kg(a,c),yh(a)}return!0}function Kg(a,b,c,d,e){b=b.split(/\r?\n/);for(var f=0;f<b.length&&Gg(a,b[f]+"\r\n",c,d,e);f++);}function xh(a,b){a.w.push({name:b,S:a.S,ea:a.ea,X:a.X,Fa:a.Fa,ia:a.ia});a.S=[];a.ea=[];0>a.Fa&&(a.Fa=a.X);a.X=0}
function yh(a){if(a.w.length){var b=a.w[a.w.length-1].name;b&&a.R.push({name:b,S:a.S,ea:a.ea});b=a.w.pop();a.S=b.S;a.ea=b.ea;a.X=b.X;a.Fa=b.Fa;a.w.length||-1==a.Fa||a.error("scope restore error")}else a.error("scope nesting error")}
function Ah(a,b){var c;c=void 0===c?",":c;for(var d=0,e=!1,f=null,g=0;d<b.length;){var h=b[d++];if('"'==h)e=!e;else if(!e){if(!g&&0<=c.indexOf(h)){d--;break}if("<"==h)g++;else if(">"==h&&0>--g){a.error("missing bracket(s) in '"+b+"'");break}}}g?0<g&&a.error("extra bracket(s) in '"+b+"'"):f=b.substr(0,d);return f}
function Lg(a,b,c,d){var e,f=b.match(/^([^,]*),,([^,]*)$/);if(f)b=f[1]?Lg(a,f[1],c,d):0,void 0!==b&&(c=f[2]?Lg(a,f[2],c,d):0,void 0!==c&&(e=Y(a.b,b,18,!0)*Math.pow(2,18)+Y(a.b,c,18,!0)));else{void 0===d&&(d=0<=a.Fa?a.Fa:a.X);b=b.replace(/SIXBIT\s*(\S)(.*?)\1/g,"'$2'").replace(/ASCII\s*(\S)(.*?)\1/g,'"$2"');e="";var g=b;if(f=b.match(/^([^\s]+)\s+(.+?)\s*$/))e=f[1],g=f[2];e=Kf(a.b,e,g,d,!0);0>e&&(e=Ue(a.b,b.replace(/\.([^0-9]|$)/g,K(a.b,d,-1)+"$1"),c),void 0===e&&a.error("unable to parse expression '"+
function Lg(a,b,c,d){var e,f=b.match(/^([^,]*),,([^,]*)$/);if(f)b=f[1]?Lg(a,f[1],c,d):0,void 0!==b&&(c=f[2]?Lg(a,f[2],c,d):0,void 0!==c&&(e=Y(a.b,b,18,!0)*Math.pow(2,18)+Y(a.b,c,18,!0)));else{void 0===d&&(d=0<=a.Fa?a.Fa:a.X);b=b.replace(/SIXBIT\s*(\S)(.*?)\1/g,"'$2'").replace(/ASCII\s*(\S)(.*?)\1/g,'"$2"');e="";var g=b;if(f=b.match(/^([^\s]+)\s*(.*?)\s*$/))e=f[1],g=f[2];e=Kf(a.b,e,g,d,!0);0>e&&(e=Ue(a.b,b.replace(/\.([^0-9]|$)/g,K(a.b,d,-1)+"$1"),c),void 0===e&&a.error("unable to parse expression '"+
b+"'"))}return e}function Tg(a,b){for(var c=0,d="",e=0,f=-1,g=b.length;e<b.length;){var h=b[e];if(";"==h)break;"["==h&&(c++||(f=e));e++;if("]"==h&&0>=--c){g=e;break}}0>c&&a.error("missing bracket(s) in '"+b+"'");0<=f&&(d=b.substr(f,g-f));return d}function Fg(a,b){b=void 0===b?a.ia:b;for(var c=0;b>a.T[c];)if(b-=a.T[c],c<a.F.length-1)c++;else break;return wa(a.F[c]+" line "+b)}
function Wg(a,b){var c=null;if(b=b.match(/([A-Z$%.][0-9A-Z$%.]*)#/i)){c=b[0];b=b[1];var d="?"+b;if(!a.v[d]){var e,f,g;e=f=g=[];a.v[d]={name:d,Sa:Bh,Ua:e,Bb:f,Qa:g,ma:b+": 0",ia:a.ia};a.O.push(d)}}return c}
function zh(a,b,c){var d=[];for(c&&(b=b.replace(/^\(?(.*?)\)?$/,"$1"));b;){b=b.trim();c=Ah(a,b);if(!c)break;var e=c;if("\\"==c[0]){var f=1,g=0;"'"==c[1]?(f++,g=6):'"'==c[1]&&(f++,g=7);var e=a,f=c.substr(f),g=void 0===g?0:g,h=Lg(e,f);if(void 0!==h){var k=5;switch(g){case 0:f=K(e.b,h,-1);break;case 6:k++;case 7:for(;h&&k--;)h=Math.trunc(h/Math.pow(2,g))}}e=f}d.push(e);b=b.substr(c.length+1)}return d}