viernes, 15 de junio de 2007

Third Report

* Accomplished this week:
Changed how the compiler command is executed, instead of calling gcc/g++ directly now it calls bash.
Finished the package selection dialog.
Finished the package folder node and package nodes.
C/C++ project templates can now specify more options like arguments to send to the linker and compiler.
`pkg-config --cflags` is now only sent to the compiler and `pkg-config --libs` to the linker.
Implemented DoExecute ().
Source files are only compiled if the object code is outdated.
Created the output options panel.

* Plans for upcoming week:
Change CreateErrorFromErrorString and CreateLinkerErrorFromErrorString to use regular expressions.
Start work on integrating makefile integration. Michael suggested and I agreed to start working on makefile integration before code completion.

* Challanges I might be facing:
I started looking into regular expressions with C# and msdn seems to have very little documentation on the subject, if someone has some good resources on this I would appreciate it.

4 comentarios:

Itai Bar-Haim dijo...

Hi Marcos.
About regular expressions in C# - this is quite easy, easier than it looks actually.
Take this regex for example:

Error: In line (?'LINE'[0-9]+):(?'MESSAGE'.*)

The parentheses define groups. The question mark defines a group name - coming next in quotes. Than the expression arrives.

In the above example I want to find any line that looks like:

Error: In line 123: something is wrong.

In addition, I want the line number to be held in the group I named "LINE" and the message to be held in the group I named "MESSAGE".
Than I can easily retrieve them by using the Groups property of the Match class (returned as a result of a Regex.Match call), either by an index or a name.

Some more info I found at:
http://www.regular-expressions.info/named.html

Hope it helps, keep up the good work (I'm waiting for this addin quite badly... ;)

Itai.

Marcos Marin dijo...

Thanks Itai, that really helped and I have now implemented working regular expressions.

knocte dijo...

You should also check:

http://flimflan.com/blog/ReadableRegularExpressions.aspx

Regards, and congratulations for your SoC project.

knocte dijo...

It seems the URL didn't get printed correctly.

This is the link