Problem with highlighting

Problem with highlighting

2
NewbieNewbie
2

    Mar 24, 2006#1

    Trying out V12.00. I have the following for my wordfile.txt

    Code: Select all

    /L19"FX" Line Comment = # File Extensions = PSL FSL
    /Delimiters = ~!@%^&*()+=|\/{}[]:;"'	<> ,    ?
    /Function String = "%[^t ]++procedure[^t ]+^([a-z0-9_&]+^)"
    /Function String 1 = "%[^t ]++procedure[^t ]+^([~{]+^)"
    /Function String 2 = "%[^t ]++frame[^t ]+^([a-z0-9_&]+^)"
    /Function String 3 = "%[^t ]++frame[^t ]+^([~{]+^)"
    /Open Fold Strings = "{"
    /Close Fold Strings = "}"
    /Open Brace Strings = "{" "(" "["
    /Close Brace Strings = "}" ")" "]"
    /Indent Strings = "{" "repeat"
    /Unindent Strings = "}" "repend"
    /C1"Keywords"
    abort add append arp arp_answer_range arp_destaddr arp_reply arp_retries autohide autorun
    begin break buffer button
    call clear connect convert
    debug decr destipaddr destmacaddr disconnect disp div
    end exit
    find flushbuffer flushtcp flushudp fontcolor fontsize frameburst framecapture frameupdate
    gets getstrlen
    if include incr interpacketdelay
    mod mtu mul myipaddr mymacaddr
    pause puts
    recv recvflush recvframe remote_address remote_interval remote_keepalive remote_keepalivecommand remote_keepaliveresponse remote_listener remote_missthreshold remote_name remote_password remote_port repeat repend resendframe reset resolve restart rputs
    send sendframe set skew snag statetable step stepped strcount sub
    title
    update
    /C2"System Variables"
    $time
    $date
    $repeat
    $reptime
    $dec2hex
    $hex2dec
    $substr
    $offset
    $timer
    $rnd
    $strlen
    $grabstring
    $scount
    $snagfield
    $snagoffset
    $snagfname
    $runtimer
    $totaltxfrags
    $fragboundry
    $mtusize
    $mymacaddr
    $secmacaddr
    $myipaddr
    $arp_reply
    $arp_retries
    $arp_timeout
    $arp_answer_range
    $arp_destaddr
    $remote_ipaddress
    $remote_port
    $remote_name
    $frametablelen
    $frametableptr
    $framesunread
    $frametxpps
    $frametxbps
    $framerxpps
    $framerxbps
    $autoport
    $autoport
    $autoport
    $framelen
    $framerec
    $frametxmac
    $framerxmac
    $frameptype
    $framepadlen
    $framepadding
    $frametablelen
    $frametableptr
    $framesunread
    $time
    $ip_ttl
    $ip_dscp
    $ip_totallen
    $ip_txtotallen
    $ip_idhex
    $ip_iddec
    $ip_idtxhex
    $ip_idtxdec
    $ip_flags
    $ip_fragoffset
    $ip_fragoffsetval
    $ip_ttl
    $ip_proto
    $ip_checksum
    $ip_rxipaddr
    $ip_txipaddr
    $ip_options
    $ip_optlen
    $ip_totallen
    $tcp_recvtrue
    $tcp_dstportnum
    $tcp_srcportnum
    $tcp_seqnum
    $tcp_rxseqnum
    $tcp_rxacknum
    $tcp_acknum
    $tcp_nextseqnum
    $tcp_headerlen
    $tcp_flags
    $tcp_flagval
    $tcp_windowsize
    $tcp_windowsizeval
    $tcp_checksum
    $tcp_reserved
    $tcp_txdatalen
    $tcp_options
    $tcp_datahex
    $tcp_dataasc
    $tcp_datasub40
    $tcp_datasub20
    $tcp_dataraw
    $tcp_datalen
    $tcp_options
    $tcp_optlen
    $udp_srcportnum
    $udp_dstportnum
    $udp_hdrlen
    $udp_checksum
    $udp_datalen
    $udp_srcportnum
    $udp_dstportnum
    $udp_dataraw
    $udp_datahex
    $udp_dataasc
    $udp_datasub40
    $udp_datasub20
    /C3"Subs"
    frame procedure
    /C4"Operators"
    +
    -
    =
    %
    >
    <
    !
    /C5"Brackets"
    [
    ]
    /C6"Parens"
    (
    )
    /C7"Variables"
    ** $
    /C8"Elements"
    mac_dstaddr mac_srcaddr mac_payload_type mac_padding
    ip_verhdr_len ip_tos_value ip_length ip_id ip_flags ip_frag_offset ip_ttl ip_protocol ip_checksum ip_sourceaddr ip_destaddr ip_options
    tcp_sourceport
    tcp_destport
    tcp_seqnum
    tcp_acknum
    tcp_headerlen
    tcp_flags
    tcp_windowsize
    tcp_checksum
    tcp_reserved
    tcp_options
    data
    udp_sourceport udp_destport udp_hdrlen udp_checksum
    timestamp
    And have each element in a test file.
    The problem is that the following items are not being highlighted:

    procedure
    tcp_sourceport
    tcp_destport
    tcp_seqnum
    tcp_acknum
    tcp_headerlen
    tcp_flags
    tcp_windowsize
    tcp_checksum
    tcp_reserved
    tcp_options

    Cannot figure out why. Rest of the highlighting is working fine. Anyone see my error???

    thanks
    -DK

    29
    Basic UserBasic User
    29

      Mar 24, 2006#2

      In each /CX section the words that start with the same letter need to be grouped together. In your /C8 section you have all of the "tcp_*" keywords grouped together, but then you have "timestamp" separate at the end. Since they all start with the letter "t" they need to be grouped together. Move "timestamp" to just after "tcp_options" and it should work.

      Mofi, a user who helps a lot in these forums, has written an UltraEdit macro to sort wordfile definitions: The ultimate word definitions sorting macro.

      Personally, I really hate this sorting requirement because it causes a lot of problems like this. I don't know why UltraEdit can't sort things itself when it loads the wordfile.

      112
      Power UserPower User
      112

        Mar 24, 2006#3

        scallanh wrote:Personally, I really hate this sorting requirement because it causes a lot of problems like this. I don't know why UltraEdit can't sort things itself when it loads the wordfile.
        Well, since the wordfile doesn't change very much, it can be considered an unnecessary burden to sort it all the time - especially since UE doesn't write out the file once sorted.

        HOWEVER, that having been said, I had a very similar issue in one of my word term files in an Expert System application.

        I don't sort it either, but it IS very easy to check for words in the right order and issue a message so that the incorrect order can be fixed. Given the havoc that can occur when it's not sorted properly (my application had similar issues), it would seem a small impost on UE to do this.

        Report it to IDM - with this suggestion if you think it's useful...

        HTH,
        Paolo
        There is no such thing as an inconsistently correct system...
        Therefore, aim for consistency; in the expectation of reaching correctness!

        2
        NewbieNewbie
        2

          Mar 24, 2006#4

          Yep, that was the problem with the tcp ones. For the procedure one, I moved the definition to the next line for the procedure one and it works now.

          This is a weird requirement, but oh well..

          Thanks for the help....

          -DK