GtkSourceView regexps syntax changed



Hi,

I've committed a patch to gtksourceview which changes the syntax for the
regular expressions used in the library to POSIX Extended (as opposed to
GNU Emacs syntax).  You can still use GNU operators, such as word
boundaries.

All .lang files included in gtksourceview have already been ported.  If
you wrote some custom .lang file you should update it to the new
syntax.  In practice, unless you use some very complex expression, this
means you need to change your alternation and subexpression operators to
their non-backslashed versions.  I.e. from this: "\(foo\|bar\)" into
this "(foo|bar)"

A full description of the POSIX extended syntax can be found at
http://www.opengroup.org/onlinepubs/007908799/xbd/re.html.  GNU
operators description can be found at the info pages for the regular
expressions library (info regex).

There's now also a DTD (language.dtd) for the .lang file format, though
it could have errors since it hasn't been revised.

Regards,
Gustavo





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]