Bug 3512 - Sourcewindow parses comments as variables
Summary: Sourcewindow parses comments as variables
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Rick Moseley
Depends on:
Blocks: 1633 3392
  Show dependency treegraph
Reported: 2006-11-12 20:24 UTC by Mike Cvet
Modified: 2006-11-22 19:22 UTC (History)
0 users

See Also:
Last reconfirmed:

A look at the text (84.02 KB, image/png)
2006-11-12 20:25 UTC, Mike Cvet

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Cvet 2006-11-12 20:24:51 UTC
I've just opened the SourceWindow on funit-rt-threader.c, and it seems to have 
found some variables in the big Frysk license at the top of the file. When you 
hover over the text, the following is printed:

   at java.lang.String.substring(libgcj.so.7rh)
   at frysk.gui.srcwin.SourceBuffer.getVariable(FryskGui)
   at frysk.gui.srcwin.SourceView.mousedOverText(FryskGui)
   at frysk.gui.srcwin.SourceView$SourceViewListener.mouseMotionEvent(FryskGui)
   at org.gnu.gtk.Widget.fireMouseMotionEvent(libgtkjava-2.8.so)
   at org.gnu.gtk.Widget.handleMouseMotion(libgtkjava-2.8.so)
   at org.gnu.gtk.Gtk.gtk_main(libgtkjava-2.8.so)
   at frysk.gui.Gui.gui(FryskGui)
   at frysk.gui.FryskGui.main(FryskGui)
Comment 1 Mike Cvet 2006-11-12 20:25:17 UTC
Created attachment 1415 [details]
A look at the text
Comment 2 Mike Cvet 2006-11-12 20:33:04 UTC
Also appears to print:

<AST>:0:0: unexpected end of subtree
<AST>:0:0: unexpected end of subtree

Futher down, may highlight the '++' of a variable increment such as 'a++;' red 
instead of green.
Comment 3 Rick Moseley 2006-11-22 19:22:18 UTC
This was an error in CDTParser.java where the callbacks were being called for
symbols/variables found inside of #include files which were inside #include
files.  Now the symbol being returned is checked against the current line being
parsed in the source file and if it is not there, the callback immediately
returns with no marking up being done.