• Login
Community
  • Login

Wrong parsing for C function

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
5 Posts 3 Posters 643 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.
  • N
    neacsum
    last edited by neacsum Aug 14, 2019, 6:08 PM Aug 14, 2019, 6:06 PM

    I hope the image below is visible and can explain my problem:
    img

    A eth_configure function invocation is shown as a function definition in the function list pane.
    Any clues?

    1 Reply Last reply Reply Quote 0
    • M
      MAPJe71
      last edited by MAPJe71 Aug 14, 2019, 9:33 PM Aug 14, 2019, 9:32 PM

      Clue?
      Attach the source file or a representative snippet so we don’t have to do all the typing.
      Where does the if (ifconfig (... reside? In the body of main (), init (), eth_configure (...) or …?

      1 Reply Last reply Reply Quote 2
      • N
        neacsum
        last edited by Aug 15, 2019, 1:29 PM

        OK, I narrowed it down to this fragment:
        img

        Seems the problem appears when the function call is in an if statement. The source file can be downloaded from this link .

        This is Notepad++ V7.7.1 (64-bit).

        1 Reply Last reply Reply Quote 1
        • P
          PeterJones
          last edited by Aug 15, 2019, 3:04 PM

          My guess is that this is related to https://github.com/notepad-plus-plus/notepad-plus-plus/issues/4794 and thus https://github.com/notepad-plus-plus/notepad-plus-plus/issues/4575

          1 Reply Last reply Reply Quote 1
          • N
            neacsum
            last edited by Aug 15, 2019, 4:02 PM

            Yes, it seems that way. One more thing: if I change the language to C++ the issue goes away. It is probably related to the horrendous regexps used for parsing C function definitions but I’m not smart enough to figure it out.

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