• Login
Community
  • Login

FunctionList issues

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
3 Posts 3 Posters 200 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P
    Pat Sinclair
    last edited by Mar 28, 2022, 7:21 PM

    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

    L 1 Reply Last reply Mar 29, 2022, 8:20 AM Reply Quote 0
    • L
      Lycan Thrope @Pat Sinclair
      last edited by Lycan Thrope Mar 29, 2022, 8:21 AM Mar 29, 2022, 8:20 AM

      @pat-sinclair ,

      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:

      ObjectseekNPPMark.PNG

      P 1 Reply Last reply Mar 29, 2022, 1:03 PM Reply Quote 1
      • P
        PeterJones @Lycan Thrope
        last edited by Mar 29, 2022, 1:03 PM

        @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 to mainExpr="^\h*OBJECT.*", which will still anchor to the beginning of line, but allows whitespace (spaces and tabs) between the beginning of the line and the OBJECT. This prevents anything but whitespace to be between the beginning of the line and the OBJECT,which I think is what you want.

        1 Reply Last reply Reply Quote 2
        2 out of 3
        • First post
          2/3
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors