Re: Bug in Javascript parsing

"Alexander Fairley" <[email protected]> Sun, 26 Mar 2006 11:46:04 -0500
Newsgroups gmane.emacs.xemacs.windows
Message-ID <[email protected]>
------=_Part_11334_30382302.1143391564139
Content-Type: multipart/alternative; 
	boundary="----=_Part_11335_4006139.1143391564139"

------=_Part_11335_4006139.1143391564139
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

My apologies, that attached .js file actually had a syntax error in it that
caused the
"wrong type argument:
integer-or-marker-p, nil" message. However, the incorrect highlighting is
independant of that, here's a fixed version of the test case

On 3/25/06, Alexander Fairley <[email protected]> wrote:
>
> I suppose this is really a bug in an .el file, so I don't know if this is
> the ideal group of folks to send this to, but hopefully you guys know whe=
re
> this belongs if it doesn't belong to you and can help it find it's way ho=
me
>
> I'm using the windoze XEmacs version 21.4 (Patch 19)"Constant Variable"
> Lucid
> First of all, in the windoze FAQ on reporting bugs at:
>
> http://www.xemacs.org/Documentation/21.5/html/xemacs-faq_3.html#SEC102
>
> The instructions on how to read the Bugs section of the manual says:
> 2. With Info. First, start XEmacs. From the menu, select `Help->Info
> (Online Docs)->Info Contents' to enter Info, then click on `XEmacs',
> then on `Bugs'. Or, use the keyboard: do C-h i to enter Info, then m
> XEmacs RET to get to the Emacs manual, then m Bugs RET to get to the
> section on bugs. Or use standalone Info in a like manner. (Standalone
> Info is part of the Texinfo distribution, not part of the XEmacs
> distribution.)
>
> There's no top level Help menu, so this is obsolete! There is an info
> button now. Going to the info button, finding the bugs section and
> clicking on the link leads me to the text of version one of the
> GPL. Moving the caret to the node and pressing enter works though.
>
> Now, without further blather, the FACTS.
>  Attached is a javascript file. If you turn on syntax highlighting and
> scroll down to Dataset.prototype =3D <blah blah blah>, you will see that
> the first function, addDataRange: <blah blah blah> is correctly
> highlighted. The next function, getDataRange: is not. Pressing tab
> within the afflicted region of the parsed text will produce a beep,
> and a message in the message window which says "wrong type argument:
> integer-or-marker-p, nil". Furthermore, this breaks the parse when you
> move back into pre-bug regions of the text.
>
> My apologies on not tracking down the bug further, hope that this is
> helpful.
>
> Alex
>
>

------=_Part_11335_4006139.1143391564139
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

My apologies, that attached .js file actually had a syntax error in it that=
 caused the<br> &quot;wrong type argument:<br>
integer-or-marker-p, nil&quot; message. However, the incorrect highlighting=
 is independant of that, here's a fixed version of the test case<br><br><di=
v><span class=3D"gmail_quote">On 3/25/06, <b class=3D"gmail_sendername">Ale=
xander Fairley
</b> &lt;<a href=3D"mailto:[email protected]">alexander.fairley@g=
mail.com</a>&gt; wrote:</span><blockquote class=3D"gmail_quote" style=3D"bo=
rder-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding=
-left: 1ex;">
<div style=3D"direction: ltr;">I suppose this is really a bug in an .el fil=
e, so I don't know if this is the ideal group of folks to send this to, but=
 hopefully you guys know where this belongs if it doesn't belong to you and=
 can help it find it's way home
<br><br>I'm using the windoze XEmacs version 21.4 (Patch 19)&quot;Constant =
Variable&quot; Lucid<br>First of all, in the windoze FAQ on reporting bugs =
at:<br><br><a href=3D"http://www.xemacs.org/Documentation/21.5/html/xemacs-=
faq_3.html#SEC102" target=3D"_blank" onclick=3D"return top.js.OpenExtLink(w=
indow,event,this)">

http://www.xemacs.org/Documentation/21.5/html/xemacs-faq_3.html#SEC102</a><=
br><br>The instructions on how to read the Bugs section of the manual says:=
<br>2. With Info. First, start XEmacs. From the menu, select `Help-&gt;Info
<br>(Online Docs)-&gt;Info Contents' to enter Info, then click on `XEmacs',=
<br>then on `Bugs'. Or, use the keyboard: do C-h i to enter Info, then m<br=
>XEmacs RET to get to the Emacs manual, then m Bugs RET to get to the<br>

section on bugs. Or use standalone Info in a like manner. (Standalone<br>In=
fo is part of the Texinfo distribution, not part of the XEmacs<br>distribut=
ion.)<br><br>There's no top level Help menu, so this is obsolete! There is =
an info
<br>button now. Going to the info button, finding the bugs section and<br>c=
licking on the link leads me to the text of version one of the<br>GPL. Movi=
ng the caret to the node and pressing enter works though.<br><br>Now, witho=
ut further blather, the FACTS.
<br>&nbsp;Attached is a javascript file. If you turn on syntax highlighting=
 and<br>scroll down to Dataset.prototype =3D &lt;blah blah blah&gt;, you wi=
ll see that<br>the first function, addDataRange: &lt;blah blah blah&gt; is =
correctly
<br>highlighted. The next function, getDataRange: is not. Pressing tab<br>w=
ithin the afflicted region of the parsed text will produce a beep,<br>and a=
 message in the message window which says &quot;wrong type argument:<br>

integer-or-marker-p, nil&quot;. Furthermore, this breaks the parse when you=
<br>move back into pre-bug regions of the text. <br><br>My apologies on not=
 tracking down the bug further, hope that this is helpful.<br><br>Alex
<br>

</div><br clear=3D"all"></blockquote></div><br>

------=_Part_11335_4006139.1143391564139--

------=_Part_11334_30382302.1143391564139
Content-Type: application/x-javascript; name="test_dataset.js"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test_dataset.js"
X-Attachment-Id: f_el9lssu0

LyoNCiAqdGVzdF9kYXRhc2V0LmpzDQogKg0KICpBIHNpbXBsZSB0ZXN0IG9mIHRoZSBkYXRhc2V0
IG9iamVjdA0KICpDcmVhdGVzIGEgbmV3IFhZX2RhdGFzZXQuICBBZGRzIHNvbWUgZGF0YSwgcmV0
cmlldmVzIGl0Lg0KICpVc2VyIGlucHV0IHNob3VsZCBiZSBkaXNwbGF5ZWQvcmV0dXJuZWQgcHJv
cGVybHkNCiAqLw0KDQp2YXIgZW0gPSBuZXcgRXZlbnRNb24oKTsNCnZhciBkbSA9IG5ldyB4eV9E
YXRhTWFuYWdlcigpOw0KdmFyIGRzID0gbmV3IERhdGFzZXQoZW0sIGRtLCAieHlfZHMiKTsNCg0K
Ly9kYXRhIGlzIHRoZSB3aGF0IHdpbGwgYmUgYWRkZWQgdG8gYWN0dWFsIERhdGFTZXQNCnZhciBk
YXRhID0gW107DQoNCi8vY3VycmVudCBpbmRleCBpbnRvIGRhdGENCnZhciBkX2lkeCA9IDA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