[Mono-devel-list] Parsing MCS errors

A Rafael D Teixeira rafaelteixeirabr at hotmail.com
Mon Jul 12 16:16:59 EDT 2004


You can see what the CSharpCompiler class does. It's in System assembly in 
Namespace Microsoft.CSharp (in code you can't access it directly, but must 
use the CreateCompiler method from CSharpCodeProvider class) so check the 
source in the mcs/class/System/Microsoft.CSharp/ directory.

The encapsulated compiler returned from CreateCompiler, already parses the 
errors/warnings and return them as an array of CompilerError. It may easy 
your work to use it, if possible.

Have Fun,


Rafael "Monoman" Teixeira
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
MonoBrasil Founding Member - Membro Fundador do MonoBrasil 
http://monobrasil.softwarelivre.org
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/




>From: Joe Ante <joe at uti.is>
>To: Mono Dev <mono-devel-list at lists.ximian.com>
>Subject: [Mono-devel-list] Parsing MCS errors
>Date: Mon, 12 Jul 2004 21:56:06 +0200
>
>Hi,
>
>I want to parse the MCS errors which means:
>I need to separate the string into separate errors, Extract the line 
>number,
>extract the file name.
>
>Is there some sample code for doing this?
>Or what is the pattern that the error messages follow which I can look out
>for to separate the errors.
>
>Joe Ante
>
>_______________________________________________
>Mono-devel-list mailing list
>Mono-devel-list at lists.ximian.com
>http://lists.ximian.com/mailman/listinfo/mono-devel-list

_________________________________________________________________
MSN Messenger: instale grátis e converse com seus amigos. 
http://messenger.msn.com.br




More information about the Mono-devel-list mailing list