Hello everyone,

Thank you for your help ...

> 
>  syn keyword Error inte[ger] inte[rval]
> 

Unfortunately I need to use matches because the 'words' contain the '.'
character, and I also need to be able to use a look-behind assertion.  The
thing is, I wanted to be able to write each match so that it is fairly
independent of the previous one, because it is very easy to generate this
automatically from an array of strings:

  syntax match phpIniKey /['"]\@<=s\%[ession\.cache_expire]/
  syntax match phpIniKey /['"]\@<=s\%[ession\.cache_limiter]/
  syntax match phpIniKey /['"]\@<=s\%[ession\.cookie_domain]/
  syntax match phpIniKey /['"]\@<=s\%[ession\.cookie_httponly]/
  syntax match phpIniKey /['"]\@<=s\%[ession\.cookie_lifetime]/
  syntax match phpIniKey /['"]\@<=s\%[ession\.cookie_path]/
  syntax match phpIniKey /['"]\@<=s\%[ession\.cookie_secure]/

Unfortunately, the last match always takes priority, so something like this:

  'session.cache_ex'

it gets matched by the last item and the highlighting goes as far as
'session.c'.  The only solution I can come up with is to write the patterns
like this:

  syntax match phpIniKey /['"]\@<=s\%[ession\.cache_expire]/
  syntax match phpIniKey /['"]\@<=session\.cache_l\%[imiter]/
  syntax match phpIniKey /['"]\@<=session\.co\%[okie_domain]/
  syntax match phpIniKey /['"]\@<=session\.cookie_h\%[ttponly]/
  syntax match phpIniKey /['"]\@<=session\.cookie_l\%[ifetime]/
  syntax match phpIniKey /['"]\@<=session\.cookie_p\%[ath]/
  syntax match phpIniKey /['"]\@<=session\.cookie_s\%[ecure]/

This way, the newer matches only take priority when they are long enough to be
different from the previous match.  But that is much more complicated to
generate, and I really wanted to avoid comlexity.

regards,
Peter



                
____________________________________________________ 
On Yahoo!7 
Check out the new Great Outdoors site with video highlights and more 
http://au.travel.yahoo.com/great-outdoors/index.html

Reply via email to