[rkward-tracker] [ rkward-Bugs-3454372 ] FIXED IN SVN: Two successive ops marked as incorrect syntax
SourceForge.net
noreply at sourceforge.net
Wed Nov 21 13:08:42 UTC 2012
Bugs item #3454372, was opened at 2011-12-08 05:12
Message generated for change (Settings changed) made by tfry
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=459007&aid=3454372&group_id=50231
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Milan Bouchet-Valat (nalimilan)
Assigned to: Thomas Friedrichsmeier (tfry)
Summary: FIXED IN SVN: Two successive ops marked as incorrect syntax
Initial Comment:
RKward considers a few syntactic peculiarities as incorrect (and highlights them in red), while they work perfectly well if run in R. They are not always advisable, but that's another question. The common factor to all these cases is apparently that two arithmetic operators are juxtaposed.
1) Repetition of the multiplication sign
** like in 2**2
2) Juxtaposition of + or - and another operator
<-- like in: a<--2
/- like in: a/-2
*- like in: a*-2
**- like in: a**-2
^- like in: a^-2
-- like in: a--2
-+ like in: a+-2
(same with +)
----------------------------------------------------------------------
Comment By: Thomas Friedrichsmeier (tfry)
Date: 2011-12-14 04:09
Message:
Indeed. I did not think of unary !. This should be fixed in r4121,
highlighting version 2.07.
Note: This still leaves a wrong markup of ~ in some special cases:
f <- ~ a
I can't think of a good solution to that, ATM.
----------------------------------------------------------------------
Comment By: Milan Bouchet-Valat (nalimilan)
Date: 2011-12-14 03:15
Message:
I've spotted what looks like a regression to me: a single ! is marked in
red when it appears after <-, even when preceded with a space.
The other fixes are great!
----------------------------------------------------------------------
Comment By: Thomas Friedrichsmeier (tfry)
Date: 2011-12-08 11:47
Message:
Hi!
The syntax highlighting will always remain an approximation, not a real R
parser. But, of course, false positives are bad. These should all be fixed,
now, in r4084, version 2.06 of the "R Script" highlighting.
The new version also detects a few more problems, esp. when there are
spaces between operators as in "x <- * 2". There are also some minor
regressions, e.g. "->+" is no longer marked as an error. But see above: The
highlighting is only an approximation.
Regards
Thomas
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=459007&aid=3454372&group_id=50231
More information about the rkward-tracker
mailing list