Regular Expression Error Parser for CDT

Ver: 1.0.4

This page describes the open source Regular Expressions Parser plug-in for Eclipse, provided by iSYSTEM AG.

Description

This plug-in implements error parsing for Eclipse/CDT. Error parsers are used to parse output of build tools (compiler, linker, ...) and report warnings and errors to CDT, which shows them to the user in editors and Problems view.

Unlike most other error parsers, this error parser is configurable. Regular expressions used to detect warnings and errors are read from a text file in the Java properties format.

How to install it

To install this plugin, use Eclipse standard installation procedure (Help | Software updates...).

The installation URL is: http://www.isystem.si/eclipseUpdate/regExErrorParser/

 

 

 

Once installed, it is necessary to select this parser in the project settings. Select the project in the Package explorer, then select the menu option Project | Properties | C/C++ Build | Settings. Select the Error parsers tab in the right pane and check required error parsers.

 

 

 

 

 

 

 

Sources

Sources can be found at http://www.isystem.si/eclipseUpdate/regExErrorParser

How to write regular expressions

Regular expressions are a very powerful tool. If you have no experience, there are many tutorials on the web, for example http://en.wikipedia.org/wiki/Regular_expression and http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html The regular expresisons default configuration file for RegExErrorParser is located in the eclipse installation directory, plugins/si.isystem.regExErrorParser_/regEx/errParserExpresions.properties

The configuration file contains the following properties:

  • logLevel
  • skip
  • warning
  • error
  • variable

All properties are described in the configuration file.

You can easily add new configuration files and have more than one instance of RegExErrorParser in the system, each one with its own configuration. To achieve this, create configuration files, then edit the plugin.xml file of the RegExErrorParser plug-in. This file also contains an example.

 

Note: RegEx parser configuration file is normally read on each build, so each change should be visible immediately. However, it may happen that Eclipse caching prevents this. Restart Eclipse and use '-clean' command line switch in such case.

 

Who should use it

RegExErorrParser plug-in is intended for:

  • all users of Eclipse/CDT, who want to use a compiler, which is not supported by available tool-chains
  • all implementers of custom error parsers. It can be used as a starting point, which also enables quick write and test cycle.

How to write your own error parser

RegExErrorParser was written with simplicity in mind. If you need something faster or something with more advanced logic, for example to support multi-line messages, then you can use this plugin as a starting point. There are several suggestions for improvements:

  • Copy regular expressions into the source code, as static final variables, so that they will compile only once.
  • Add advanced logic if necessary
  • If handling of multiline messages is required, add a state machine

History of Changes

  • 2008-12-03 Version 1.04 released. Configuration file name can now be set in plugin.xml file.
  • 2008-11-26 The first public version, 1.0.3 released

License

iSYSTEM AG provides this plug-in to you under the terms and conditions of the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available at http://www.eclipse.org/legal/epl-v10.html.

 

Site Map | Powered by Impressum.