I have finally gotten FL to work with my NP++ Unicode 5.6.3 by finding the 200911 beta release. :)
But now when I open a c file and enable the function list pane it lists stuff that definitely are not functions! :(
It looks like the parser is looking inside comment blocks as well as in active code, why is this so?
Examples of lines listed as functions:
#include"defines3R.h" => Shows up in the list as "defines3R.h"*Input:Portasstructandbittochange(0..7)=>Showsupasfunctionchange(thisisinsideacommentblock*Input:-AHBPerip:AHBperipherals(__USB,__DMA,...)=>Showsupasfunctionperipherals,butispartofcomment
Generally our comments that are placed right before the start of a function look like this example:
/******************************************************************************** Function Name : SCU_AHBPeriphClockConfig* Description : Enable the clock for an AHB peripheral* Input : -AHBPerip: AHB peripherals(__USB, __DMA,...)* -NewState : ENABLE or DISABLE* Output : None* Return : None*******************************************************************************/
I think that FunctionList should skip everything inside a comment block when parsing for functions, don't you?
Is there some kind of setting I am missing here?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
From another forum entry I found where the author also is getting too many hits I found the reply to add ^ in front of the regexp for function begin. This reduces the number of extra functions but not completely!
The begin regexp is now like this:
^\s*\w+[\s\*]+
But I am still getting hits from the file header comment block, which looks like this:
/*********************************************************************** System 3R International AB** (c) Copyright System 3R International AB 2009. All rights reserved.***********************************************************************----------------------------------------------------------------------File : InitWMC4MI.cPurpose : Board support for WMC4 Machine Interface boardAuthor : Bo BerglundDate : 2009-12-04Rev : 1.1-------- END-OF-HEADER ---------------------------------------------*/
From this FunctionList extracts the following bogus functions:
File
Purpose
Author
Date
Rev
Additionally it gets a function from this code line:
//#define SCU ((SCU_TypeDef *)SCU_BASE)
The function is named ((SCU_TypeDef *)SCU_BASE), which obviously is totally wrong. This line should not even be part of parsing since it is commented out!
I have used the FunctionListRules.xml file that is contained within the zipfile for FunctionList 20091109 and I have no real clue as to how one modifies the rules that are present in regexp form. Simply looks like a foreign language to me. But I thought that at least for the C language the rules would be working….
But not, I found that for comments rules were set up for comment delimiters such as " and ' whereas i only know of // and the /* */ pair as comment delimiters for C. So it seems like the xml file is wrong.
How to get a correctly working xml file defining the rules? Surely not everyone is expected to be creating his own???
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have finally gotten FL to work with my NP++ Unicode 5.6.3 by finding the 200911 beta release. :)
But now when I open a c file and enable the function list pane it lists stuff that definitely are not functions! :(
It looks like the parser is looking inside comment blocks as well as in active code, why is this so?
Examples of lines listed as functions:
Generally our comments that are placed right before the start of a function look like this example:
I think that FunctionList should skip everything inside a comment block when parsing for functions, don't you?
Is there some kind of setting I am missing here?
From another forum entry I found where the author also is getting too many hits I found the reply to add ^ in front of the regexp for function begin. This reduces the number of extra functions but not completely!
The begin regexp is now like this:
But I am still getting hits from the file header comment block, which looks like this:
From this FunctionList extracts the following bogus functions:
File
Purpose
Author
Date
Rev
Additionally it gets a function from this code line:
The function is named ((SCU_TypeDef *)SCU_BASE), which obviously is totally wrong. This line should not even be part of parsing since it is commented out!
I have used the FunctionListRules.xml file that is contained within the zipfile for FunctionList 20091109 and I have no real clue as to how one modifies the rules that are present in regexp form. Simply looks like a foreign language to me. But I thought that at least for the C language the rules would be working….
But not, I found that for comments rules were set up for comment delimiters such as " and ' whereas i only know of // and the /* */ pair as comment delimiters for C. So it seems like the xml file is wrong.
How to get a correctly working xml file defining the rules? Surely not everyone is expected to be creating his own???