UDF2 problem (or not?)



  • I’m trying to recreate the default Look and Feel of the old Borland Pascal IDE, and I’m running into a wall.

    My main problem is the fact that there is or seems to be no way to define single characters as separators, without forcing them to become part of the markup. If you look at the default Pascal highlighting source in langs.model.xml, you will see that there are entries for both end and end.

    Now if it would be possible to define any non-alphanumeric character as first and foremost, but only for parsing purposes as a separator, without forcing it into a specific role, I think it might simplify things a little - many years ago I wrote a number of REXX edit macro’s for use on z/OS (and theoretically they should run under other REXX interpreters on Windoze and Linux) that convert legacy languages (PL/I, COBOL, JCL, HLASM and SuperC output) into fancy scrollable HTML that looks exactly like it’s displayed in the z/OS ISPF editor. For PL/I, the language closest to Pascal, I’ve simply defined

    • the space,
    • the plus ( + ) character
    • the minus ( - ) character,
    • the asterisk ( * ) character,
    • the slash ( / ) character,
    • the equals ( = ) character,
    • the greater-than ( > ) character,
    • the less-than ( < ) character,
    • the ampersand ( & ) character,
    • the (z/OS) not ( ^ ) character,
    • the (z/OS) or ( | ) character,
    • the decimal point ( . ) character,
    • the comma ( , ) character,
    • the colon ( : ) character,
    • the semicolon ( ; ) character,
    • the single quote ( ’ ) character,
    • the double quote ( " ) character,
    • the left parenthesis ( ( ) character and
    • the right parenthesis ( ) ) character

    as word separators. For Pascal, which no longer seems to be in use on z/OS, an equivalent routine would add

    • the left square bracket ( [ ) character, and
    • the right square bracket ( ] ) character.

    Doing the same in UDL2++ would for eaxample alleviate the need to store ‘end’ end ‘end.’ in word lists, and the need to fiddle around with [eax, eax], or [eax] keywords - I can now only color these (the Borland/Virtual Pascal IDE’s don’t do this) by designating ‘,’, ‘[’ and ‘]’ as operators, but that results in them getting global colors, also in Pascal code. I also don’t really want the ‘asm’ and ‘end’ keywords that bracket in-line assembler to get the color for the block. They are the delimiters, and “Pascal” keywords, only the text between the delimiters should have a designated color.

    Final problem, not UDL2 related, I don’t want to see a little bit of blue, followed by lots of white, so to get the authentic Borland “Look & Feel”, I need to enable, but only for this particular type of file “.PAS”, a global background color. It would be ever so nice if UDL coloring could do this.

    Robert

    PS: For those interested in the REXX code mentioned above, feel free to PM me.


Log in to reply