<br><br><div class="gmail_quote">On 19 February 2010 21:10, Jon Senior <span dir="ltr"><<a href="mailto:jon@restlesslemon.co.uk">jon@restlesslemon.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Fri, 19 Feb 2010 10:02:22 +0000<br>
<div class="im">Liviu Andronic <<a href="mailto:landronimirc@gmail.com">landronimirc@gmail.com</a>> wrote:<br>
</div><div class="im">> Nice. Thanks for bringing up the patch.<br>
<br>
</div>No problem... it had been bugging me for a while. It's in the tracker<br>
now so hopefully we'll see it in geany-0.19.<br>
<div class="im"><br>
> I have couple more issues with the current support for R in Geany.<br>
> It's mostly minor, but it affects readability of the code. The syntax<br>
> highlighting fails in some cases:<br>
> - for the line below, "sum" and "length" are both functions but will<br>
> be highlighted with different colours<br>
> > sum(mtcars$cyl); length(mtcars$cyl)<br>
<br>
</div>That's the syntax highlighting. geany is recognising one as a function<br>
name and the other as a reserved keyword. Not sure why "sum" is being<br>
seen as a keyword though.<br></blockquote><div><br>Thats because sum is listed as a keyword in Geanys filetypes.r file.  Someone who is knowledgeable in R should have a look and check the filetypes.r file and submit a patch.<br>
<br>Theer are also lots of packages listed, probably need checking.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
> - a function similar to the one below will have "trim" and "qt"<br>
> highlighted differently.<br>
> > trim.qt <- function(x) sum(x)<br>
> > trim.qt(mtcars$cyl)<br>
<br>
</div>geany doesn't seem to recognise that a . in R can be used as part of a<br>
variable / function name.<br></blockquote><div><br>A quick look at the lexer in LexR.cxx from the Scintilla project looks like it explicitly excludes '.' from identifiers, maybe the test is backward.  Again someone knowledgeable in R (and C++) should check it.<br>
<br>The lexer comes from the Scintilla project and is only used by Geany.  Geany usually likes to keep an unmodified Scintilla version, so if you are sure its a bug or if you actually make a patch, please submit it to the Scintilla project <a href="http://www.scintilla.org">www.scintilla.org</a><br>
<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
> - so will an object, say,<br>
> > get.smth <- iris<br>
><br>
> - objects don't seem recognised at all.<br>
<br>
</div>In what sense? I think it doesn't highlight objects that you've<br>
created, although I could be wrong. To be honest I only really notice<br>
the highlighting for strings and the bracket closing.<br></blockquote><div><br>AFAICT identifiers "should" be recognised as such but there is no distinction between uses of the identifiers.<br><br>Cheers<br>Lex<br>
 </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
> Are these failures of the current parser implementation, or is this<br>
> something that one should expect? Thanks<br>
<br>
</div>It's the syntax highlighting, not the tag parser (tags are things like<br>
function definitions or global variable definitions). I've not really<br>
looked at it enough to see how tuneable it is. It's been a while since<br>
I delved into the R template files. Maybe later today.<br>
<font color="#888888"><br>
Jon<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Geany-devel mailing list<br>
<a href="mailto:Geany-devel@uvena.de">Geany-devel@uvena.de</a><br>
<a href="http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel" target="_blank">http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel</a><br>
</div></div></blockquote></div><br>