How to highlight 'range different to range?

How to highlight 'range different to range?

46
Basic UserBasic User
46

    Feb 21, 2005#1

    Hi all,

    I have a word which is either a keyword or an attribute the difference between the two case is if the word is preceded by a space it's a keyword, if it is preceded by a ' its an attribute.

    Does some one know how to make the syntax highlight to correctly handle this case?

    Code: Select all

    example:
    variable   t : integer range 0 to 127;       -- range is a keyword
    variable   s : std_logic_vector(sign'range); -- range is an attribute
    Thank's,
    Alain
    Never forget: "Above the clouds, The sky is blue and the sun shine"

    6,686585
    Grand MasterGrand Master
    6,686585

      Jul 23, 2006#2

      A really not perfect solution would be to highlight 'range with a marker character specification:

      /Marker Characters = "'e"
      /C1"keywords"
      range
      /C2"attributes"
      'e

      But this would work only if the ' character is used only for 'range and nothing else in the whole file.

      The problem here is that there is no other delimiter between sign and 'range. So the ' must be also a delimiter and this makes it impossible to specify 'range as a highlighting "word".
      Best regards from an UC/UE/UES for Windows user from Austria

      46
      Basic UserBasic User
      46

        Aug 02, 2006#3

        Thank's Mofi for this "not perfect solution" I'll try it.

        Regards from Switzerland,
        Alain
        Never forget: "Above the clouds, The sky is blue and the sun shine"