Community
    • Login

    UDL Folding Sought

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    1 Posts 1 Posters 82 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.
    • Lycan ThropeL
      Lycan Thrope
      last edited by Lycan Thrope

      While trying to work out some issues in the dBASE Plus UDL I did, I’ve recently discovered that I need some kind of solution for the language that has folding words in other folding words.

      For instance, in dBASE Plus (all variants of dBASE for that matter) is a couple of control statements that create a problem for use with the UDL like this:

      DO CASE
      CASE <condition expL 1>
        <statements>
      [CASE <condition expL 2>
        <statements>...]
      [OTHERWISE
        <statements>]
      ENDCASE
      

      As you can see, right at the beginning there is a problem, as the DO CASE has to be enclosed in single quotes to force this to be recognized when it’s on a single line only, but then each following section starts with CASE which is part of that folding keyword and is not allowed, per the UDL documents.

      dBASE’s DO keyword also has additional syntax uses and makes it much worse. There are 3 uses of this keyword, 2 have closing pair words without conflict, one with additional conflict such as:

      DO <filename> | ? | <filename skeleton> |
       <function name>
      [WITH <parameter list>]
      
      DO WHILE <condition expL>
       [ <statements> ]
      ENDDO
      
      DO
       [ <statements> ]
      UNTIL <condition expL>
      
      

      DO WHILE and DO UNTIL luckily have closing words that don’t conflict, but the first one, DO WITH uses a closing word, that unfortunately, is also part of another folding keyword pair, WITH/ENDWITH that is used to enclose object constructor code and when the DO WITH construct is used, it leaves an open condition waiting for the closing ENDWITH keyword.

      The problem, is that the UDL keyword rules only allow a multipart keyword if it’s not used elsewhere. This is mentioned in the Keywords section of the UDL description, but it apparently applies to folding keywords, as well.

      Being able to make DO be a Prefix Mode keyword might work to allow the CASE keyword to work for folding both as a standalone word and with DO, but Prefix Mode isn’t available for folding keywords.

      This is probably the last issue I’m having getting the UDL to work with dBASE’s syntax, and it’s a high hurdle, that doesn’t seem like it will be able to be overcome without writing a parser plugin to handle this ambiguity, unless someone else has some ideas.

      I’m just putting this out here, if someone else has any ideas, or have overcome this situation with language issues using the UDL, or if they have ideas for making the code folding work correctly for this type of ambiguity.

      Thanks for any help.

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