FunctionList issues
-
I have other parsers setup that are working, some are parsing for things like
Procedure Something
$Something
and they work fine.
They have a special setup in my overrideMap as does the one below:
They are based off of UDL.I am trying to parse for all items at the first level object
OBJECT_FirstSomething_Something { OBJECT_IndentedSomething { Detail_lines } }
I am only wanting to see the lines that are at the beginning of the line that start with OBJECT.*
here is my function setup…<parser displayName="ldd" id ="99" commentExpr="(?m-s:;.*$)" > <function mainExpr="^OBJECT.*" /> </parser>
This is not accomplishing anything, I am not getting any results back.
My override file looks like this:
<association id= "lddfile.xml" userDefinedLangName="LDDFILE"/>
Any suggestions?
Appreciate any help in advance.
Pat -
You might try this instead, since when I copied your code, I could only highlight one line, removing the
^
allowed the two ‘Object’ lines to be found. With the caret there, it only found the one.Find:
OBJECT.+
Here’s a screenshot of Find/Mark in NPP to show my results:
-
@lycan-thrope said in FunctionList issues:
removing the ^ allowed the two ‘Object’ lines to be found
@Pat-Sinclair , with @Lycan-Thrope’s suggestion, it might match a line that says
SomethingElse_OBJECT_Here
that you don’t want it to match.if I were changing your expression to work with
OBJECT_IndentedSomething
, I would actually change it tomainExpr="^\h*OBJECT.*"
, which will still anchor to the beginning of line, but allows whitespace (spaces and tabs) between the beginning of the line and theOBJECT
. This prevents anything but whitespace to be between the beginning of the line and theOBJECT
,which I think is what you want.