code folding for assembly language...

code folding for assembly language...

2
NewbieNewbie
2

    Jul 29, 2006#1

    Is anyone able to achieve code folding for assembly language?

    I came across several issues while trying to do the same. I imported the language syntax file into wordfile.txt. My .ASM files are correctly recognized as an assembly file and syntax highlighting works as expected. Although code folding does not work and that with assembly language becomes most important feature - since this files can grow pretty large quickly.

    I created following lines for code folding.

    Code: Select all

    /L20"Assembler x86" Nocase Line Comment = ; File Extensions = ASM
    /Function String = "%[a-zA-Z0-9_@?$]+[ ^t]+proc+[ ^t^p]"
    /Open Fold Strings = ";{"
    /Close Fold Strings = ";}"
    I am trying to use ;{ and ;} as my open/close folder marks since ; is the comment character. Once saved - I hoped that UE will recognize my code blocks and show the block begin/close section on the gutter with "-" and "+" characters.

    UE does not recognize code folder begin/end characters.

    Also each time I need to fold a block of code, I need to select it - then do - View->Hide/Show Lines->Hide/Show Selection. This is getting tedious.

    Can anyone help? What am I doing wrong here?

    Thanks!

    6,683583
    Grand MasterGrand Master
    6,683583

      Jul 29, 2006#2

      ueisok wrote:UE does not recognize code folder begin/end characters.
      UE will not recognize your open and fold strings because they are inside a line comment. Line comments are ignored for standard code folding. But I think you don't need to add line comments for code folding. I'm not familiar with the x86 assembler syntax, but I have modified my wordfiles for the C166/ST10 assembler of TASKING with open/close fold strings. Here are my definitions for this assembler:

      /L20"C166 ASM Tasking" Nocase Line Comment = ; String Chars = "' EnableMLS File Extensions = ASM LST SRC
      /Delimiters = " #tab'()+,-:;?[]
      /Function String = "%^([0-9a-z_]+^)[ ^t]+PROC"
      /Open Brace Strings = "("
      /Close Brace Strings = ")"
      /Open Fold Strings = "PROC" "@IF" "@ELSE" "SECTION"
      /Close Fold Strings = "ENDP" "@ELSE" "@ENDI" "ENDS"

      tab is a place holder for a real horizontal tab (hex code 0x09) which is displayed as normal space by WWW browsers.

      According to your function string the x86 assembler has also PROC as keyword for a new procedure (function). Maybe it also has ENDP as keyword for end of a procedure. And I guess, the x86 assembler also knows the other keywords I have used for the Tasking C166/ST10 assembler.

      Hm, that post reminds me to sent IDM my updated wordfiles for their collection.
      Best regards from an UC/UE/UES for Windows user from Austria

      2
      NewbieNewbie
      2

        Aug 01, 2006#3

        Nice!

        Really. I was thinking on the wrong direction. I should have used PROC, ENP and ENDS as they are truely blocking strings for assembly language.

        Thanks for replying.

        DP