The new version of QCodeEdit bringing a new approach on generic definitions is now available. The spec has evolved a lot :
  • Each syntax element is represented by an "entity", which can be of various type
  • Entity have a name which correspond to the tag name of an XML element
  • There are no built-in entities... Entities implementation (actually they are private components) are loaded from plugins
  • The syntactic rules and formatting data are now split into two XML files
  • Formats can be inherited. i.e if an entity do not specify a format key it automatically grabs one from its first parent that supply one.
The entities are of two types. "Primitives" which, just like in gfx, are small elements that perform "real" tasks and "complex" which combines several "primitives" according to predefined rules.

Available "primitive" standards entities are :
  • Sequence entity (<sequence> tag) : match a character sequence
  • Word entity (<word> tag) : match a word i.e. a sequence of word characters delimited by non words characters
  • Special entity (<special> tag) : match a special character (e.g an end-of-line)
Available "primitive" standards entities are :
  • Context entity (<context> tag) : the most interesting one. match a start entity (if any specified) then processes children until a stop entity (if any) is matched. Supports two other handy special children : escape and jump. The first one should be self explanatory. The second corresponds to an entity that MUST be matched in order to span over several lines if stop entity is valid but did not match in the current line.
  • List entity (<list> tag) : a list of entities among which one must match (i.e it's basically a convinient OR). In addition it supports prefix and suffix which may or may not be mandatory
Along with these (already sufficient to craft a syntax definition for most (if not all) existing programming languages) come another that can't be classified easily :
  • Href entity (<href> tag) : all entities can have an id attribute and this entity allow reducing code duplication by referencing an existing entity through its id. For more flexibility the href can be resolved either on build or on first call to one of its method or every time a method is called.
The code available on SVN already handle highlighting very well but do not yet perform any of the other generic tasks (parenthesis matching, text indenting and code folding) thus, due to some internal dependencies, completion is no longer working but don't worry... it'll come back soon (maybe next monday if I find enough time to hack it back )

Note : the plugin system used by QCodeEdit generic components is very flexible and light-weight. For convinience I did not put it directly inside QCodeEdit but as another Edyuk 3rdparty module. You can grab it this way :
$ svn checkout http://edyuk.svn.sourceforge.net/svn.../qpluginsystem qpluginsystem
Also note that for compilation to succeed, qpluginsystem and qcodeedit dirs grabbed from SVN must be at the same level i.e. a dir tree might look like this :
prog
|-- qcodeedit
|-- qpluginsystem
|-- etc..