Community
    • Login

    FunctionList issues

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 3 Posters 190 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.
    • Pat SinclairP
      Pat Sinclair
      last edited by

      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

      Lycan ThropeL 1 Reply Last reply Reply Quote 0
      • Lycan ThropeL
        Lycan Thrope @Pat Sinclair
        last edited by Lycan Thrope

        @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

        PeterJonesP 1 Reply Last reply Reply Quote 1
        • PeterJonesP
          PeterJones @Lycan Thrope
          last edited by

          @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
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors