[Mono-dev] GSoC - AST Verifier for C# compiler
Mike Krüger
mkrueger at xamarin.com
Tue Mar 27 21:56:29 UTC 2012
Hi
Try to look at NRefactory git://github.com/icsharpcode/NRefactory.git
The structural visitor was built for that. NRefactory does:
Text -> Mcs AST -> NRefactory AST
That AST can generate C# code as text - using the output visitor, or
just node.GetText(). Therefore it's half way done,
however I'm sure that there are still things not fully correct, any help
improving that would be appreciated.
The NRefactory AST holds lexical informations about the tokens as well,
they could be checked against the input text. There are 2 projects
inside the NRefactory solution that may be helful: ConsistencyCheck and
AstVerifier (it's very, very basic).
Regards
Mike
> Hi,
>
> as a backup if my first proposed project doesn't get selected,
> I'm looking into implementing the project “AST Verifier for C# compiler”.
>
> The project statement says to implement an AST visitor and I have
> looked around and found the class StructuralVisitor.
> It seems to be exactly what I need, except it doesn't do anything by itself.
> I would expect it to visit the whole tree (just like ExpressionVisitor
> does for Expressions),
> so that I can implement only the parts that are relevant to me (in
> this case, generating the C# code).
>
> Is there some code that already does that?
> Or at least some code that implements StructuralVisitor that I could look at?
>
> If not, that's fine, and I can do it myself. I just don't want to
> duplicate work already done by others.
>
> Petr Onderka
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
More information about the Mono-devel-list
mailing list