[bug report] C syntax broken with anonymous arrays

2007-06-05 Thread marc chantreux

Hi all,

After reading
http://www.run.montefiore.ulg.ac.be/~martin/resources/kung-f00.html
I now use anonymous arrays in C. This is an exemple of use:

result = ldap_search_s( ld
, dc=u-strasbg,dc=fr
, LDAP_SCOPE_ONELEVEL
, NULL
, (char *[]){ objectClass,dc, NULL }
, 0
, msg
);

Unfortunatly, the { of the array and all the following { and } are 
marked as cErrInParen and i'm not skilled enougth to fix the problem. So 
i'm sorry to just report it.


Regards,
mc


Re: perl x modifier regex ?

2007-01-02 Thread Marc Chantreux

Hi Theerasak,

my problem is not to read the regExp but maintain them so your script 
don't help here. It sounds good btw.


Regards,
mc

Theerasak Photha a écrit :

On 12/28/06, Marc Chantreux [EMAIL PROTECTED] wrote:

hi all,

Is there a way to obtain the perl x modifier behaviour in vim regex
(spaces are non significants, comments are allowed). This is very
usefull to make a regexp more readable.


No, but there is this:

http://www.vim.org/scripts/script.php?script_id=1091





Re: perl x modifier regex ?

2007-01-02 Thread Marc Chantreux

A.J.Mechelynck a écrit :
You can always add one or more lines of comments above or below the 
line including the pattern in a Vim script, or even, in most cases, at 
the end of the line; but IIUC you cannot insert comments in the middle 
of a pattern.
Ok. There is no solution so i decided to write functions that returns RE 
chunks in vimfiles/autoload/RE{,/XML}.vim


2 advantages to proceed like this :
- readable.
- reusable

For Exemple, the way to match an XML tag is almost a FAQ on this list. 
Why not provide something like the awsome Regexp::Common perl module ?


I wrote :

function RE#Magic()
   return '\v'
endfunction

function RE#Submatch( regExp )
   return '('.a:regExp.')'
endfunction

function RE#OptionnalSubmatch( regExp )
   return '(%('.a:regExp.'){0,1})'
endfunction

function RE#XML#Ident()
   return '[[:alpha:]][[:alnum:]]*'
endfunction

function RE#XML#NSIdent()
   let ident = RE#XML#Ident()
a namespace
: separator
a tagname
   return
   \ RE#OptionnalSubmatch( ident ) .
   \ RE#OptionnalSubmatch( ':' ) .
   \ RE#OptionnalSubmatch( ident ) .
endfunction

Comments and advices about it would be really nice.

To use perl regexps, you can of course embed perl statements in a 
perl-enabled version of Vim; but of course at the cost of making the 
script less portable.
I gave this solution away a long time ago. I think that all alien 
langages (langages other than viml) is the worst idea of the vim 
developper team.


regards
mc


perl x modifier regex ?

2006-12-28 Thread Marc Chantreux

hi all,

Is there a way to obtain the perl x modifier behaviour in vim regex 
(spaces are non significants, comments are allowed). This is very 
usefull to make a regexp more readable.



regards
mc


Re: patched ctags

2006-04-17 Thread Marc Chantreux

Hi Bram,

You're right : it works when i make my structure global.

thanks and regards!


I think that for a structure local to a function ctags doesn't store
information.  You would have to move it outside of the function.