Bug 380748 - FIXED IN SVN: Two successive ops marked as incorrect syntax
Summary: FIXED IN SVN: Two successive ops marked as incorrect syntax
Status: RESOLVED FIXED
Alias: None
Product: rkward
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified All
: NOR normal
Target Milestone: ---
Assignee: RKWard Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-08 12:12 UTC by RKWard Team
Modified: 2012-11-21 12:08 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description RKWard Team 2011-12-08 12:12:58 UTC
-- Originally posted by (AT sourceforge.net): nalimilan --

-- This ticket was imported from http://sourceforge.net/p/rkward/bugs/115 on 2017-05-30 15:26:50 +0100 --
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 1 Thomas Friedrichsmeier 2011-12-08 18:47:49 UTC
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
Comment 2 Thomas Friedrichsmeier 2011-12-08 18:47:49 UTC
- **assigned_to**: nobody --> tfry
- **summary**: Two successive operators are considered incorrect syntax --> FIXED IN SVN: Two successive ops marked as incorrect syntax
- **status**: open --> open-fixed
Comment 3 RKWard Team 2011-12-14 10:15:15 UTC
-- Originally posted by (AT sourceforge.net): nalimilan --
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 4 Thomas Friedrichsmeier 2011-12-14 11:09:19 UTC
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 5 Thomas Friedrichsmeier 2012-11-21 12:08:42 UTC
- **status**: open-fixed --> closed-fixed