[Monodevelop-patches-list] r2023 - in trunk/MonoDevelop/Core: . build/AddIns/AddIns/BackendBindings build/AddIns/AddIns/BackendBindings/templates data/resources/glade src/AddIns/BackendBindings src/AddIns/BackendBindings/CSharpBinding src/AddIns/BackendBindings/CSharpBinding/Parser src/AddIns/BackendBindings/JavaBinding src/AddIns/BackendBindings/JavaBinding/Parser src/AddIns/BackendBindings/VBNetBinding src/AddIns/BackendBindings/VBNetBinding/FormattingStrategy src/AddIns/BackendBindings/VBNetBinding/Gui src/AddIns/BackendBindings/VBNetBinding/Parser src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree src/AddIns/BackendBindings/VBNetBinding/Project src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/CSharpConverter src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/CodeDom src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer src/Add Ins/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist src/Main/Base src/Main/Base/Internal/Parser src/Main/Base/Services/ParserService

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Wed Nov 10 13:03:33 EST 2004


Author: levibard
Date: 2004-11-10 13:03:32 -0500 (Wed, 10 Nov 2004)
New Revision: 2023

Added:
   trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/VBNetBinding.addin.xml
   trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/EmptyVBFile.xft.xml
   trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/EmptyVBProject.xpt.xml
   trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/VBConsoleApplicationProject.xpt.xml
   trunk/MonoDevelop/Core/data/resources/glade/VB.glade
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/AssemblyInfo.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/ChangeLog
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/FormattingStrategy/
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/FormattingStrategy/VBFormattingStrategy.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/ChooseRuntimePanel.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/CodeGenerationPanel.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/GuiMessageRecipient.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/OutputOptionsPanel.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/TextEditorOptionsPanel.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/VBCompilerPanel.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/VBDocConfigurationPanel.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Makefile.am
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/ExpressionFinder.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/Parser.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/Resolver.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/AttributeSection.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Class.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/CompilationUnit.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Constructor.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Event.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Field.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Indexer.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Method.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Parameter.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Property.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/ReturnType.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/TypeVisitor.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/VBNetVisitor.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Project/
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Project/VBCompilerParameters.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Project/VBProject.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/ProjectNodeBuilder.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/Makefile.am
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/SharpRefactoryVB.cmbx
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/SharpRefactoryVB.prjx
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/AssemblyInfo.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/CSharpConverter/
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/CSharpConverter/CSharpVisitor.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/CodeDom/
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/CodeDom/CodeDOMVisitor.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Lexer.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/FileReader.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/IReader.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/StringReader.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/Comment.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/CommentType.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/NewLine.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/PreProcessingDirective.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/SpecialTracker.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/TagComment.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Main.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/AbstractASTVisitor.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/AbstractNode.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/CompilationUnit.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Enums.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/AddressOfExpression.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ArrayCreateExpression.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ArrayInitializerExpression.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/AssignmentExpression.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/BaseReferenceExpression.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/BinaryOperatorExpression.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/CastExpression.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ClassReferenceExpression.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/Expression.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/FieldReferenceOrInvocationExpression.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/GetTypeExpression.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/IdentifierExpression.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/InvocationExpression.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/LoopControlVariableExpression.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/NamedArgumentExpression.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ObjectCreateExpression.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ParameterDeclarationExpression.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ParenthesizedExpression.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/PrimitiveExpression.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/StatementExpression.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ThisReferenceExpression.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/TypeOfExpression.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/TypeReferenceExpression.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/UnaryOperatorExpression.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/AttributeDeclaration.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/DelegateDeclaration.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/ImportsAliasDeclaration.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/ImportsDeclaration.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/ImportsStatement.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/NamespaceDeclaration.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/OptionCompareDeclaration.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/OptionExplicitDeclaration.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/OptionStrictDeclaration.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/TypeDeclaration.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/IASTVisitor.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/INode.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/LookupTableVisitor.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Modifier.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/AddHandlerStatement.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/BlockStatement.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/DoLoopStatement.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/EndStatement.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/EraseStatements.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ErrorStatement.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ExitStatement.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ForStatement.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ForeachStatement.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/GoToStatement.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/IfStatement.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/LabelStatement.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/LocalVariableDeclaration.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/LockStatement.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/OnErrorStatement.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/RaiseEventStatement.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ReDimStatement.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/RemoveHandlerStatement.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ResumeStatement.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ReturnStatement.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/SelectStatement.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/Statement.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/StopStatement.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ThrowStatement.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/TryCatchStatement.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/WhileStatement.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/WithStatement.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/ConstructorDeclaration.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/DeclareDeclaration.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/EventDeclaration.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/FieldDeclaration.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/HandlesClause.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/ImplementsClause.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/MethodDeclaration.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/PropertyDeclaration.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/PropertyGetRegion.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/PropertySetRegion.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/TypeReference.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/VariableDeclaration.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Errors.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Modifiers.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/ParamModifiers.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Parser.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Parser.frame
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Scanner.frame
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/VBNET.ATG
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/buildparser.cmd
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/BuildKeywords.pl
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/KeywordList.txt
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/Keywords.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/Tokens.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/SharpRefactory.prjx
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/SharpRefactoryVB.cmbx
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/SharpRefactoryVB.mdsx
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/SharpRefactoryVB.prjx
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VB.glade
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBAmbience.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBBindingCompilerServices.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBBindingExecutionServices.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBDOCCommand.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBLanguageBinding.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBNetBinding.cmbx
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBNetBinding.mdsx
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBNetBinding.prjx
Modified:
   trunk/MonoDevelop/Core/ChangeLog
   trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/Makefile.am
   trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/Makefile.am
   trunk/MonoDevelop/Core/configure.in
   trunk/MonoDevelop/Core/monodevelop.xml
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/CSharpBinding/ChangeLog
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/CSharpBinding/Parser/Parser.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/ChangeLog
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/Parser/Parser.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/Makefile.am
   trunk/MonoDevelop/Core/src/Main/Base/ChangeLog
   trunk/MonoDevelop/Core/src/Main/Base/Internal/Parser/IParser.cs
   trunk/MonoDevelop/Core/src/Main/Base/Services/ParserService/DefaultParserService.cs
Log:
Adds project management, compilation, and rudimentary code completion support for vb.net.


Modified: trunk/MonoDevelop/Core/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/ChangeLog	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/ChangeLog	2004-11-10 18:03:32 UTC (rev 2023)
@@ -1,3 +1,8 @@
+2004-11-05  Levi Bard  <taktaktaktaktaktaktaktaktaktak at gmail.com>
+
+	* *: Large changeset, adds project management, compilation, and
+	rudimentary code completion support for vb.net
+
 2004-10-27  Todd Berman  <tberman at off.net>
 
 	* configure.in: Make sure a valid gnome prefix is returned, error out

Modified: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/Makefile.am
===================================================================
--- trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/Makefile.am	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/Makefile.am	2004-11-10 18:03:32 UTC (rev 2023)
@@ -4,9 +4,9 @@
 monodevelopdir = $(libdir)/monodevelop
 backendbindingsdir = $(monodevelopdir)/AddIns/AddIns/BackendBindings
 
-backendbindings_DATA = BackendBindings.addin.xml ILAsmBinding.addin.xml JavaBinding.addin.xml NemerleBinding.addin.xml
+backendbindings_DATA = BackendBindings.addin.xml ILAsmBinding.addin.xml JavaBinding.addin.xml NemerleBinding.addin.xml VBNetBinding.addin.xml
 
 EXTRA_DIST = $(backendbindings_DATA)
 
-CLEANFILES = CSharpBinding.dll JavaBinding.dll NemerleBinding.dll ILAsmBinding.dll
+CLEANFILES = CSharpBinding.dll JavaBinding.dll NemerleBinding.dll ILAsmBinding.dll VBNetBinding.dll
 

Added: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/VBNetBinding.addin.xml
===================================================================
--- trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/VBNetBinding.addin.xml	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/VBNetBinding.addin.xml	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,81 @@
+<AddIn name        = "VB.NET Language Binding"
+       author      = "Levi Bard"
+       copyright   = "GPL"
+       url         = "http://bard.sytes.net/vbnetbinding"
+       description = "VB.NET Language Binding"
+       version     = "0.1">
+
+  <Runtime>
+    <Import assembly = "VBNetBinding.dll"/>
+  </Runtime>
+
+  <Extension path = "/SharpDevelop/Workbench/FileFilter">
+    <FileFilter id = "VBNet"
+                insertbefore = "AllFiles"
+                name = "VB.NET Files (*.vb)"
+                extensions = "*.vb"/>
+  </Extension>
+
+  <Extension path = "/MonoDevelop/FileTemplates">
+    <FileTemplate id = "EmptyVBFile"
+                  location = "templates/EmptyVBFile.xft.xml"/>
+  </Extension>
+
+  <Extension path = "/MonoDevelop/ProjectTemplates">
+    <ProjectTemplate id = "EmptyVBProject"
+                     location = "templates/EmptyVBProject.xpt.xml"/>
+    <ProjectTemplate id = "VBConsoleApplicationProject"
+                     location = "templates/VBConsoleApplicationProject.xpt.xml"/>
+  </Extension>
+  
+	<Extension path = "/Workspace/Parser">
+		<Class id    = "VBParser" 
+		       class = "VBBinding.Parser.TParser"/>
+	</Extension>
+  
+  <Extension path = "/SharpDevelop/Workbench/ProjectOptions/ConfigurationProperties">
+    <Conditional activeproject = "VBNet">
+      <DialogPanel id = "VBNetCodeGenerationPanel"
+                   _label = "Code Generation"
+                   class = "VBBinding.CodeGenerationPanel"/>
+    </Conditional>
+  </Extension>
+  
+  <Extension path = "/SharpDevelop/Workbench/ProjectOptions/ConfigurationProperties">
+    <Conditional activeproject = "VBNet">
+      <DialogPanel id = "VBNetOutputOptionsPanel"
+                   _label = "Output Options"
+                   class = "VBBinding.OutputOptionsPanel"/>
+    </Conditional>
+  </Extension>
+
+  <!-- <Extension path = "/SharpDevelop/Workbench/ProjectOptions/ConfigurationProperties">
+    <Conditional activeproject = "VBNet">
+      <DialogPanel id = "VBNetChooseRuntimePanel"
+                   _label = "Choose Runtime"
+                   class = "VBBinding.ChooseRuntimePanel"/>
+    </Conditional>
+  </Extension> -->
+
+
+  <Extension path = "/Workspace/Icons">
+    <Icon id = "VBPrj"
+          language = "VBNet"
+          resource = "VB.ProjectIcon"/>
+    <Icon id = "VBFile"
+          extensions = ".vb"
+          resource = "VB.FileIcon"/>
+  </Extension>
+	
+	<!-- <Extension path = "/AddIns/DefaultTextEditor/Formatter">  
+  		<Conditional textcontent = "VBNet">
+			<Class id ="VBNetFormatter" insertbefore="DefaultFormatter" class ="VBBinding.FormattingStrategy.VBFormattingStrategy"/>
+		</Conditional>
+	</Extension> -->
+
+  <Extension path = "/SharpDevelop/Workbench/LanguageBindings">
+    <LanguageBinding id = "VBNet"
+                     supportedextensions = ".vb"
+                     class = "VBBinding.VBLanguageBinding" />
+  </Extension>
+</AddIn>

Added: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/EmptyVBFile.xft.xml
===================================================================
--- trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/EmptyVBFile.xft.xml	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/EmptyVBFile.xft.xml	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<Template Originator="Levi Bard" Language="VBNet" Created="10/19/2004" LastModified="10/19/2004">
+	
+	<TemplateConfiguration>
+                <_Name>Empty VB File</_Name>
+                <Icon>VB.File.EmptyFile</Icon>
+                <Category>VBNet</Category>
+                <LanguageName>VBNet</LanguageName>
+                <_Description>Creates an empty VB.Net file.</_Description>
+	</TemplateConfiguration>
+	
+	<TemplateFiles>
+        <File DefaultExtension=".vb" DefaultName="EmptyVBfile">
+			<![CDATA['created on ${Date} at ${Time}]]>
+		</File>
+	</TemplateFiles>
+	
+	<FileOptions/>
+	
+</Template>

Added: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/EmptyVBProject.xpt.xml
===================================================================
--- trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/EmptyVBProject.xpt.xml	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/EmptyVBProject.xpt.xml	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<Template originator   = "Levi Bard" 
+          created      = "10/19/2004"
+          lastModified = "10/19/2004">
+	
+	<!-- Template Header -->
+	<TemplateConfiguration>
+                <_Name>Empty VB.NET Project</_Name>
+                <Category>VBNet</Category>
+                <Icon>VB.Project.EmptyProject</Icon>
+                <LanguageName>VBNet</LanguageName>
+                <_Description>Creates an empty VB.Net solution.</_Description>
+	</TemplateConfiguration>
+	
+	<!-- Template Content -->
+	<Combine name = "${ProjectName}" directory = ".">
+		<Project name = "${ProjectName}" directory = "."/>
+	</Combine>
+</Template>

Modified: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/Makefile.am
===================================================================
--- trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/Makefile.am	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/Makefile.am	2004-11-10 18:03:32 UTC (rev 2023)
@@ -36,6 +36,9 @@
 NemerleEmptyProject.xpt.xml \
 NemerleGtkSharpProject.xpt.xml \
 NemerleGtkSharpWindow.xft.xml \
-AppConfigFile.xft.xml
+AppConfigFile.xft.xml \
+EmptyVBFile.xft.xml \
+EmptyVBProject.xpt.xml \
+VBConsoleApplicationProject.xpt.xml
 
 EXTRA_DIST = $(template_DATA)

Added: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/VBConsoleApplicationProject.xpt.xml
===================================================================
--- trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/VBConsoleApplicationProject.xpt.xml	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/VBConsoleApplicationProject.xpt.xml	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<Template originator   = "Levi Bard" 
+          created      = "10/19/2004"
+          lastModified = "10/23/2004">
+	
+	<!-- Template Header -->
+	<TemplateConfiguration>
+		<_Name>VB.NET Console Project</_Name>
+		<Category>VBNet</Category>
+		<Icon>VB.Project.DOSProject</Icon>
+		<LanguageName>VBNet</LanguageName>
+		<_Description>Create a console VB.Net project</_Description>
+	</TemplateConfiguration>
+	
+	<!-- Actions -->
+	<Actions>
+		<Open filename = "application.vb"/>
+	</Actions>
+
+	<!-- Template Content -->
+	<Combine name = "${ProjectName}" directory = ".">
+		<Options>
+			<StartupProject>${ProjectName}</StartupProject>
+		</Options>
+		
+		<Project name = "${ProjectName}" directory = ".">
+			<!--  <Options Target = "Class" PauseConsoleOutput = "True" /> -->
+	
+			<Files>
+				<File name = "application.vb">
+<![CDATA['''''
+'  application.vb
+' 
+'  created on ${Date} at ${Time}
+'''''
+
+Public Class application
+	Public Shared Sub Main()
+		System.Console.WriteLine("Hello world!")
+	End Sub
+End Class
+]]></File>		
+			</Files>
+		</Project>
+	</Combine>
+</Template>

Modified: trunk/MonoDevelop/Core/configure.in
===================================================================
--- trunk/MonoDevelop/Core/configure.in	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/configure.in	2004-11-10 18:03:32 UTC (rev 2023)
@@ -157,6 +157,8 @@
 src/AddIns/BackendBindings/JavaBinding/Makefile
 src/AddIns/BackendBindings/ILAsmBinding/Makefile
 src/AddIns/BackendBindings/NemerleBinding/Makefile
+src/AddIns/BackendBindings/VBNetBinding/Makefile
+src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/Makefile
 src/AddIns/DisplayBindings/Makefile
 src/AddIns/DisplayBindings/SourceEditor/Makefile
 src/AddIns/DisplayBindings/SourceEditor/MonoDevelop.SourceEditor.dll.config

Added: trunk/MonoDevelop/Core/data/resources/glade/VB.glade
===================================================================
--- trunk/MonoDevelop/Core/data/resources/glade/VB.glade	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/data/resources/glade/VB.glade	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,1017 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+<requires lib="gnome"/>
+
+<widget class="GtkWindow" id="CodeGenerationPanel">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">CodeGenerationPanel</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+
+  <child>
+    <widget class="GtkVBox" id="vbox62">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">12</property>
+
+      <child>
+	<widget class="GtkLabel" id="label82">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">&lt;b&gt;Code Generation&lt;/b&gt;</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">True</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox56">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">6</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label81">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">    </property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkVBox" id="vbox65">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">6</property>
+
+	      <child>
+		<widget class="GtkTable" id="table7">
+		  <property name="visible">True</property>
+		  <property name="n_rows">3</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">6</property>
+		  <property name="column_spacing">6</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label86">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Compile _Target</property>
+		      <property name="use_underline">True</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="mnemonic_widget">CompileTargetOptionMenu</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label87">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Define S_ymbols</property>
+		      <property name="use_underline">True</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="mnemonic_widget">symbolsEntry</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label88">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_Main Class</property>
+		      <property name="use_underline">True</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="mnemonic_widget">mainClassEntry</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="symbolsEntry">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">False</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="mainClassEntry">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">False</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkOptionMenu" id="CompileTargetOptionMenu">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label90">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">&lt;b&gt;Warnings&lt;/b&gt;</property>
+	  <property name="use_underline">True</property>
+	  <property name="use_markup">True</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox47">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label72">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">    </property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkVBox" id="vbox64">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">6</property>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox55">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">6</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label80">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_Warning Level</property>
+		      <property name="use_underline">True</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="mnemonic_widget">warningLevelSpinButton</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="warningLevelSpinButton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">1</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">False</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">2 0 4 1 1 1</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="generateOverflowChecksCheckButton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">_Generate overflow checks</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="allowUnsafeCodeCheckButton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Allow '_unsafe' code</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="enableOptimizationCheckButton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Enable _optimizations</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="warningsAsErrorsCheckButton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Treat warnings as _errors</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="generateXmlOutputCheckButton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Generate _xml documentation</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="OutputOptionsPanel">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">OutputOptionsPanel</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+
+  <child>
+    <widget class="GtkVBox" id="vbox66">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">12</property>
+
+      <child>
+	<widget class="GtkVBox" id="vbox67">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">6</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label93">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">&lt;b&gt;Output&lt;/b&gt;</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">True</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox57">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">6</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label91">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">    </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox69">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">6</property>
+
+		  <child>
+		    <widget class="GtkTable" id="table10">
+		      <property name="visible">True</property>
+		      <property name="n_rows">3</property>
+		      <property name="n_columns">3</property>
+		      <property name="homogeneous">False</property>
+		      <property name="row_spacing">6</property>
+		      <property name="column_spacing">6</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label98">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Assembly _name</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="mnemonic_widget">assemblyNameEntry</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">0</property>
+			  <property name="right_attach">1</property>
+			  <property name="top_attach">0</property>
+			  <property name="bottom_attach">1</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label99">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Output _path</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="mnemonic_widget">outputDirectoryEntry</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">0</property>
+			  <property name="right_attach">1</property>
+			  <property name="top_attach">1</property>
+			  <property name="bottom_attach">2</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label100">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Paramet_ers</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="mnemonic_widget">parametersEntry</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">0</property>
+			  <property name="right_attach">1</property>
+			  <property name="top_attach">2</property>
+			  <property name="bottom_attach">3</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkEntry" id="outputDirectoryEntry">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">True</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char" translatable="yes">*</property>
+			  <property name="activates_default">False</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">1</property>
+			  <property name="right_attach">2</property>
+			  <property name="top_attach">1</property>
+			  <property name="bottom_attach">2</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkButton" id="browseButton">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">...</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">2</property>
+			  <property name="right_attach">3</property>
+			  <property name="top_attach">1</property>
+			  <property name="bottom_attach">2</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkEntry" id="assemblyNameEntry">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">True</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char" translatable="yes">*</property>
+			  <property name="activates_default">False</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">1</property>
+			  <property name="right_attach">3</property>
+			  <property name="top_attach">0</property>
+			  <property name="bottom_attach">1</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkEntry" id="parametersEntry">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">True</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char" translatable="yes">*</property>
+			  <property name="activates_default">False</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">1</property>
+			  <property name="right_attach">3</property>
+			  <property name="top_attach">2</property>
+			  <property name="bottom_attach">3</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkCheckButton" id="pauseConsoleOutputCheckButton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Pause _console output</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox68">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">6</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label94">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">&lt;b&gt;Execute scripts &lt;/b&gt;</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">True</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox58">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">6</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label92">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">    </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkTable" id="table9">
+		  <property name="visible">True</property>
+		  <property name="n_rows">3</property>
+		  <property name="n_columns">3</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">6</property>
+		  <property name="column_spacing">6</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label95">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Execute Command</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label96">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_After Build</property>
+		      <property name="use_underline">True</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="mnemonic_widget">executeAfterEntry</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label97">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_Before build</property>
+		      <property name="use_underline">True</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="mnemonic_widget">executeBeforeEntry</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="executeScriptEntry">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">False</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="executeAfterEntry">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">False</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="executeBeforeEntry">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">False</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="browseButton2">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">...</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="browseButton3">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">...</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="browseButton4">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">...</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>

Modified: trunk/MonoDevelop/Core/monodevelop.xml
===================================================================
--- trunk/MonoDevelop/Core/monodevelop.xml	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/monodevelop.xml	2004-11-10 18:03:32 UTC (rev 2023)
@@ -12,7 +12,7 @@
     <comment xml:lang="en">Nemerle source</comment>
     <glob pattern="*.n"/>
   </mime-type>
-  <mime-type type="text/x-vbnet">
+  <mime-type type="text/x-vb">
     <comment xml:lang="en">VB source</comment>
     <glob pattern="*.vb"/>
   </mime-type>

Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/CSharpBinding/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/CSharpBinding/ChangeLog	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/CSharpBinding/ChangeLog	2004-11-10 18:03:32 UTC (rev 2023)
@@ -3,6 +3,11 @@
 	* CSharpBindingCompilerManager.cs: Use SAS for assembly detection.
 	This doesnt seem to break anything for me.
 
+2004-11-05  Levi Bard  <taktaktaktaktaktaktaktaktaktak at gmail.com>
+      
+      * Parser/Parser.cs: Added HandlesFileExtension to work with new
+      IParser
+
 2004-11-01  Todd Berman  <tberman at off.net>
 
 	* CSharpBindingExecutionManager.cs.in: Add fu to actually properly run

Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/CSharpBinding/Parser/Parser.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/CSharpBinding/Parser/Parser.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/CSharpBinding/Parser/Parser.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -113,6 +113,12 @@
 		{
 			return new Resolver (project).MonodocResolver (parserService, expression, caretLineNumber, caretColumn, fileName, fileContent);
 		}
+
+
+		public bool HandlesFileExtension(string fileExtension){
+			if(fileExtension == null) return false;
+			return (fileExtension.ToLower() == ".cs");
+		}
 		
 		///////// IParser Interface END
 	}

Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/ChangeLog	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/ChangeLog	2004-11-10 18:03:32 UTC (rev 2023)
@@ -1,3 +1,8 @@
+2004-11-05  Levi Bard  <taktaktaktaktaktaktaktaktaktak at gmail.com>
+
+	* Parser/Parser.cs: Added HandlesFileExtension() to work with new
+	IParser
+
 2004-07-05  John Luke  <jluke at cfl.rr.com>
 
 	* *.cs: cleanup everything

Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/Parser/Parser.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/Parser/Parser.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/Parser/Parser.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -98,6 +98,13 @@
 		{
 			return new Resolver().Resolve(parserService, expression, caretLineNumber, caretColumn, fileName, fileContent);
 		}
+
+
+		public bool HandlesFileExtension(string fileExtension){
+			if(fileExtension == null) return false;
+			return (fileExtension.ToLower() == ".java");
+		}
+
 		
 		///////// IParser Interface END
 	}

Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/Makefile.am
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/Makefile.am	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/Makefile.am	2004-11-10 18:03:32 UTC (rev 2023)
@@ -1,3 +1,3 @@
 
-SUBDIRS = CSharpBinding JavaBinding NemerleBinding ILAsmBinding
+SUBDIRS = CSharpBinding JavaBinding NemerleBinding ILAsmBinding VBNetBinding
 

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/AssemblyInfo.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/AssemblyInfo.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/AssemblyInfo.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,32 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following
+// attributes.
+//
+// change them to the information which is associated with the assembly
+// you compile.
+
+[assembly: AssemblyTitle("VB.NET Binding")]
+[assembly: AssemblyDescription("VB.NET language binding for monodevelop")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("www.monodevelop.com")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("(c) 2004 Markus Palme, MonoDevelop team, Levi Bard")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has following format :
+//
+// Major.Minor.Build.Revision
+//
+// You can specify all values by your own or you can build default build and revision
+// numbers with the '*' character (the default):
+
+[assembly: AssemblyVersion("1.0.1.1649")]
+
+// The following attributes specify the key for the sign of your assembly. See the
+// .NET Framework documentation for more information about signing.
+// This is not required, if you don't want signing let these attributes like they're.
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/ChangeLog	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/ChangeLog	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,3 @@
+2004-11-05  Levi Bard  <taktaktaktaktaktaktaktaktaktak at gmail.com>
+
+	* Imported from #D and made to work with MD tools and namespaces

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/FormattingStrategy/VBFormattingStrategy.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/FormattingStrategy/VBFormattingStrategy.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/FormattingStrategy/VBFormattingStrategy.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,476 @@
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Markus Palme" email="MarkusPalme at gmx.de"/>
+//     <version value="$version"/>
+// </file>
+
+using System;
+using System.Collections;
+using System.Collections.Specialized;
+using System.Text.RegularExpressions;
+using System.Diagnostics;
+using System.Drawing;
+using System.Text;
+
+using MonoDevelop.TextEditor.Document;
+using MonoDevelop.TextEditor.Actions;
+using MonoDevelop.TextEditor;
+
+using MonoDevelop.Core.Properties;
+using MonoDevelop.Core.Services;
+
+using MonoDevelop.EditorBindings.FormattingStrategy;
+
+namespace VBBinding.FormattingStrategy
+{
+	/// <summary>
+	/// This class handles the auto and smart indenting in the textbuffer while
+	/// you type.
+	/// </summary>
+	public class VBFormattingStrategy : DefaultFormattingStrategy
+	{
+		ArrayList statements;
+		StringCollection keywords;
+		
+		bool doCasing;
+		bool doInsertion;
+		
+		public VBFormattingStrategy()
+		{
+			
+			statements = new ArrayList();
+			statements.Add(new VBStatement("^if.*?then$", "^end ?if$", "End If", 1));
+			statements.Add(new VBStatement("\\bclass \\w+$", "^end class$", "End Class", 1));
+			statements.Add(new VBStatement("\\bnamespace \\w+$", "^end namespace$", "End Namespace", 1));
+			statements.Add(new VBStatement("\\bmodule \\w+$", "^end module$", "End Module", 1));
+			statements.Add(new VBStatement("\\bstructure \\w+$", "^end structure$", "End Structure", 1));
+			statements.Add(new VBStatement("^while ", "^end while$", "End While", 1));
+			statements.Add(new VBStatement("^select case", "^end select$", "End Select", 2));
+			statements.Add(new VBStatement("(?<!\\bmustoverride )\\bsub \\w+", "^end sub$", "End Sub", 1));
+			statements.Add(new VBStatement("(?<!\\bmustoverride (readonly |writeonly )?)\\bproperty \\w+", "^end property$", "End Property", 1));
+			statements.Add(new VBStatement("(?<!\\bmustoverride )\\bfunction \\w+", "^end function$", "End Function", 1));
+			statements.Add(new VBStatement("\\bfor .*?$", "^next( \\w+)?$", "Next", 1));
+			statements.Add(new VBStatement("^synclock .*?$", "^end synclock$", "End SyncLock", 1));
+			statements.Add(new VBStatement("^get$", "^end get$", "End Get", 1));
+			statements.Add(new VBStatement("^with \\w+$", "^end with$", "End With", 1));
+			statements.Add(new VBStatement("^set\\s*\\(.*?\\)$", "^end set$", "End Set", 1));
+			statements.Add(new VBStatement("^try$", "^end try$", "End Try", 1));
+			statements.Add(new VBStatement("^do .+?$", "^loop$", "Loop", 1));
+			statements.Add(new VBStatement("^do$", "^loop .+?$", "Loop While ", 1));
+			statements.Add(new VBStatement("\\benum .*?$", "^end enum$", "End Enum", 1));
+			
+			keywords = new StringCollection();
+			keywords.AddRange(new string[] {
+				"AddHandler", "AddressOf", "Alias", "And", "AndAlso", "Ansi", "As", "Assembly",
+				"Auto", "Boolean", "ByRef", "Byte", "ByVal", "Call", "Case", "Catch",
+				"CBool", "CByte", "CChar", "CDate", "CDec", "CDbl", "Char", "CInt", "Class",
+				"CLng", "CObj", "Const", "CShort", "CSng", "CStr", "CType",
+				"Date", "Decimal", "Declare", "Default", "Delegate", "Dim", "DirectCast", "Do",
+				"Double", "Each", "Else", "ElseIf", "End", "Enum", "Erase", "Error",
+				"Event", "Exit", "False", "Finally", "For", "Friend", "Function", "Get",
+				"GetType", "GoSub", "GoTo", "Handles", "If", "Implements", "Imports", "In",
+				"Inherits", "Integer", "Interface", "Is", "Let", "Lib", "Like", "Long",
+				"Loop", "Me", "Mod", "Module", "MustInherit", "MustOverride", "MyBase", "MyClass",
+				"Namespace", "New", "Next", "Not", "Nothing", "NotInheritable", "NotOverridable", "Object",
+				"On", "Option", "Optional", "Or", "OrElse", "Overloads", "Overridable", "Overrides",
+				"ParamArray", "Preserve", "Private", "Property", "Protected", "Public", "RaiseEvent", "ReadOnly",
+				"ReDim", "Region", "REM", "RemoveHandler", "Resume", "Return", "Select", "Set", "Shadows",
+				"Shared", "Short", "Single", "Static", "Step", "Stop", "String", "Structure",
+				"Sub", "SyncLock", "Then", "Throw", "To", "True", "Try", "TypeOf",
+				"Unicode", "Until", "Variant", "When", "While", "With", "WithEvents", "WriteOnly", "Xor"
+			});
+		}
+		
+		/// <summary>
+		/// Define VB.net specific smart indenting for a line :)
+		/// </summary>
+		protected override int SmartIndentLine(IFormattableDocument textArea, int lineNr)
+		{
+			PropertyService propertyService = (PropertyService)ServiceManager.GetService(typeof(PropertyService));
+			doCasing = propertyService.GetProperty("VBBinding.TextEditor.EnableCasing", true);
+			IFormattableDocument document = textArea;
+			if (lineNr <= 0)
+				return AutoIndentLine(textArea, lineNr);
+			//LineSegment lineAbove = document.GetLineSegment(lineNr - 1);
+			//string lineAboveText = document.GetText(lineAbove.Offset, lineAbove.Length).Trim();
+			string lineAboveText=document.GetLineAsString(lineNr-1).Trim();
+			
+			//LineSegment curLine = document.GetLineSegment(lineNr);
+			//string oldLineText = document.GetText(curLine.Offset, curLine.Length);
+			string oldLineText=document.GetLineAsString(lineNr);
+			string curLineText = oldLineText.Trim();
+			
+			// remove comments
+			string texttoreplace = Regex.Replace(lineAboveText, "'.*$", "", RegexOptions.Singleline).Trim();
+			// remove string content
+			foreach (Match match in Regex.Matches(texttoreplace, "\"[^\"]*?\"")) {
+				texttoreplace = texttoreplace.Remove(match.Index, match.Length).Insert(match.Index, new String('-', match.Length));
+			}
+			
+			string curLineReplace = Regex.Replace(curLineText, "'.*$", "", RegexOptions.Singleline).Trim();
+			// remove string content
+			foreach (Match match in Regex.Matches(curLineReplace, "\"[^\"]*?\"")) {
+				curLineReplace = curLineReplace.Remove(match.Index, match.Length).Insert(match.Index, new String('-', match.Length));
+			}
+			
+			StringBuilder b = new StringBuilder(GetIndentation(textArea, lineNr - 1));
+			
+			//string indentString = Tab.GetIndentationString(document);
+			string indentString="\t";
+			
+			if (texttoreplace.IndexOf(':') > 0)
+				texttoreplace = texttoreplace.Substring(0, texttoreplace.IndexOf(':')).TrimEnd();
+			
+			bool matched = false;
+			foreach (VBStatement statement in statements) {
+				if (statement.IndentPlus == 0) continue;
+				if (Regex.IsMatch(curLineReplace, statement.EndRegex, RegexOptions.IgnoreCase)) {
+					for (int i = 0; i < statement.IndentPlus; ++i) {
+						RemoveIndent(b);
+					}
+					if (doCasing && !statement.EndStatement.EndsWith(" "))
+						curLineText = statement.EndStatement;
+					matched = true;
+				}
+				if (Regex.IsMatch(texttoreplace, statement.StartRegex, RegexOptions.IgnoreCase)) {
+					for (int i = 0; i < statement.IndentPlus; ++i) {
+						b.Append(indentString);
+					}
+					matched = true;
+				}
+				if (matched)
+					break;
+			}
+			
+			if (lineNr >= 2) {
+				if (texttoreplace.EndsWith("_")) {
+					// Line continuation
+					char secondLastChar = ' ';
+					for (int i = texttoreplace.Length - 2; i >= 0; --i) {
+						secondLastChar = texttoreplace[i];
+						if (!Char.IsWhiteSpace(secondLastChar))
+							break;
+					}
+					if (secondLastChar != '>') {
+						// is not end of attribute
+						//LineSegment line2Above = document.GetLineSegment(lineNr - 2);
+						//string lineAboveText2 = document.GetText(line2Above.Offset, line2Above.Length).Trim();
+						string lineAboveText2=document.GetLineAsString(lineNr-2).Trim();
+						lineAboveText2 = Regex.Replace(lineAboveText2, "'.*$", "", RegexOptions.Singleline).Trim();
+						if (!lineAboveText2.EndsWith("_")) {
+							b.Append(indentString);
+						}
+					}
+				} else {
+					//LineSegment line2Above = document.GetLineSegment(lineNr - 2);
+					//string lineAboveText2 = document.GetText(line2Above.Offset, line2Above.Length).Trim();
+					string lineAboveText2=document.GetLineAsString(lineNr-2).Trim();
+					lineAboveText2 = StripComment(lineAboveText2);
+					if (lineAboveText2.EndsWith("_")) {
+						char secondLastChar = ' ';
+						for (int i = texttoreplace.Length - 2; i >= 0; --i) {
+							secondLastChar = texttoreplace[i];
+							if (!Char.IsWhiteSpace(secondLastChar))
+								break;
+						}
+						if (secondLastChar != '>')
+							RemoveIndent(b);
+					}
+				}
+			}
+			
+			if (IsElseConstruct(curLineText))
+				RemoveIndent(b);
+			
+			if (IsElseConstruct(lineAboveText))
+				b.Append(indentString);
+			
+			int indentLength = b.Length;
+			b.Append(curLineText);
+			if (b.ToString() != oldLineText)
+				textArea.ReplaceLine(lineNr, b.ToString());
+			return indentLength;
+		}
+		
+		bool IsElseConstruct(string line)
+		{
+			string t = StripComment(line).ToLower();
+			if (t.StartsWith("case ")) return true;
+			if (t == "else" || t.StartsWith("elseif ")) return true;
+			if (t == "catch" || t.StartsWith("catch ")) return true;
+			if (t == "finally") return true;
+			
+			return false;
+		}
+		
+		string StripComment(string text)
+		{
+			return Regex.Replace(text, "'.*$", "", RegexOptions.Singleline).Trim();
+		}
+		
+		void RemoveIndent(StringBuilder b)
+		{
+			if (b.Length == 0) return;
+			if (b[b.Length - 1] == '\t') {
+				b.Remove(b.Length - 1, 1);
+			} else {
+				for (int j = 0; j < 4; ++j) {
+					if (b.Length == 0) return;
+					if (b[b.Length - 1] != ' ')
+						break;
+					b.Remove(b.Length - 1, 1);
+				}
+			}
+		}
+		
+		public override int FormatLine(IFormattableDocument textArea, int lineNr, int cursorOffset, char ch)
+		{
+			PropertyService propertyService = (PropertyService)ServiceManager.GetService(typeof(PropertyService));
+			doCasing = propertyService.GetProperty("VBBinding.TextEditor.EnableCasing", true);
+			doInsertion = propertyService.GetProperty("VBBinding.TextEditor.EnableEndConstructs", true);
+			
+			if (lineNr > 0) {
+				//LineSegment curLine = textArea.Document.GetLineSegment(lineNr);
+				//LineSegment lineAbove = lineNr > 0 ? textArea.Document.GetLineSegment(lineNr - 1) : null;
+				
+				//string curLineText = textArea.Document.GetText(curLine.Offset, curLine.Length);
+				//string lineAboveText = textArea.Document.GetText(lineAbove.Offset, lineAbove.Length);
+				string curLineText=textArea.GetLineAsString(lineNr).Trim();
+				string lineAboveText=textArea.GetLineAsString(lineNr-1).Trim();
+				
+				if (ch == '\n' && lineAboveText != null) {
+					int undoCount = 1;
+					
+					// remove comments
+					string texttoreplace = Regex.Replace(lineAboveText, "'.*$", "", RegexOptions.Singleline);
+					// remove string content
+					MatchCollection strmatches = Regex.Matches(texttoreplace, "\"[^\"]*?\"", RegexOptions.Singleline);
+					foreach (Match match in strmatches) {
+						texttoreplace = texttoreplace.Remove(match.Index, match.Length).Insert(match.Index, new String('-', match.Length));
+					}
+					
+					if (doCasing) {
+						foreach (string keyword in keywords) {
+							string regex = "(?:\\W|^)(" + keyword + ")(?:\\W|$)";
+							MatchCollection matches = Regex.Matches(texttoreplace, regex, RegexOptions.IgnoreCase | RegexOptions.Singleline);
+							foreach (Match match in matches) {
+								textArea.ReplaceLine(lineNr-1 + match.Groups[1].Index, keyword);
+								++undoCount;
+							}
+						}
+					}
+					
+					if (doInsertion) {
+						foreach (VBStatement statement in statements) {
+							if (Regex.IsMatch(texttoreplace.Trim(), statement.StartRegex, RegexOptions.IgnoreCase)) {
+								string indentation = GetIndentation(textArea, lineNr - 1);
+								if (isEndStatementNeeded(textArea, statement, lineNr)) {
+									//textArea.Insert(textArea.Caret.Offset, "\n" + indentation + statement.EndStatement);
+									//++undoCount;
+								}
+								for (int i = 0; i < statement.IndentPlus; i++) {
+									indentation += "\t";	//Tab.GetIndentationString(textArea.Document);
+								}
+								
+								textArea.ReplaceLine(lineNr, indentation + curLineText.Trim());
+								//Is this automagic now?
+								//textArea.Document.UndoStack.UndoLast(undoCount + 1);	
+								return indentation.Length;
+							}
+						}
+					}
+					
+					
+					if (IsInString(lineAboveText)) {
+						if (IsFinishedString(curLineText)) {
+							textArea.Insert(lineNr-1 + lineAboveText.Length,
+							                         "\" & _");
+							curLineText = textArea.GetLineAsString(lineNr);
+							textArea.Insert(lineNr, "\"");
+							
+							if (IsElseConstruct(lineAboveText))
+								SmartIndentLine(textArea, lineNr - 1);
+							int result = SmartIndentLine(textArea, lineNr) + 1;
+							//textArea.UndoStack.UndoLast(undoCount + 3);
+							return result;
+						} else {
+							textArea.Insert(lineNr-1 + lineAboveText.Length,
+							                         "\"");
+							if (IsElseConstruct(lineAboveText))
+								SmartIndentLine(textArea, lineNr - 1);
+							int result = SmartIndentLine(textArea, lineNr);
+							//textArea.Document.UndoStack.UndoLast(undoCount + 2);
+							return result;
+						}
+					} else {
+						string indent = GetIndentation(textArea, lineNr - 1);
+						if (indent.Length > 0) {
+							//string newLineText = indent + TextUtilities.GetLineAsString(textArea.Document, lineNr).Trim();
+							string newLineText=indent + textArea.GetLineAsString(lineNr).Trim();
+							//curLine = textArea.GetLineAsString(lineNr);
+							textArea.ReplaceLine(lineNr, newLineText);
+							//++undoCount;
+						}
+						if (IsElseConstruct(lineAboveText))
+							SmartIndentLine(textArea, lineNr - 1);
+						//textArea.Document.UndoStack.UndoLast(undoCount);
+						return indent.Length;
+					}
+				}
+			}
+			return 0;
+		}
+		
+		bool IsInString(string start)
+		{
+			bool inString = false;
+			for (int i = 0; i < start.Length; i++) {
+				if (start[i] == '"')
+					inString = !inString;
+				if (!inString && start[i] == '\'')
+					return false;
+			}
+			return inString;
+		}
+		bool IsFinishedString(string end)
+		{
+			bool inString = true;
+			for (int i = 0; i < end.Length; i++) {
+				if (end[i] == '"')
+					inString = !inString;
+				if (!inString && end[i] == '\'')
+					break;
+			}
+			return !inString;
+		}
+		
+		bool isEndStatementNeeded(IFormattableDocument textArea, VBStatement statement, int lineNr)
+		{
+			int count = 0;
+			int i=0;
+			
+			//for (int i = 0; i < textArea.TotalNumberOfLines; i++) {
+			try{
+				while(true){
+					//LineSegment line = textArea.Document.GetLineSegment(i);
+					//string lineText = textArea.Document.GetText(line.Offset, line.Length).Trim();
+					string lineText=textArea.GetLineAsString(i++).Trim();
+					
+					if (lineText.StartsWith("'")) {
+						continue;
+					}
+					
+					if (Regex.IsMatch(lineText, statement.StartRegex, RegexOptions.IgnoreCase)) {
+						count++;
+					} else if (Regex.IsMatch(lineText, statement.EndRegex, RegexOptions.IgnoreCase)) {
+						count--;
+					}
+				}
+			} catch(Exception ex){
+				//exit while
+			}//try
+			return count > 0;
+		}
+		
+		class VBStatement
+		{
+			public string StartRegex   = "";
+			public string EndRegex     = "";
+			public string EndStatement = "";
+			
+			public int IndentPlus = 0;
+			
+			public VBStatement()
+			{
+			}
+			
+			public VBStatement(string startRegex, string endRegex, string endStatement, int indentPlus)
+			{
+				StartRegex = startRegex;
+				EndRegex   = endRegex;
+				EndStatement = endStatement;
+				IndentPlus   = indentPlus;
+			}
+		}
+		
+		
+		#region SearchBracket
+		public int SearchBracketBackward(IFormattableDocument document, int offset, char openBracket, char closingBracket)
+		{
+			bool inString  = false;
+			char ch;
+			int brackets = -1;
+			for (int i = offset; i > 0; --i) {
+				ch = document.GetCharAt(i);
+				if (ch == openBracket && !inString) {
+					++brackets;
+					if (brackets == 0) return i;
+				} else if (ch == closingBracket && !inString) {
+					--brackets;
+				} else if (ch == '"') {
+					inString = !inString;
+				} else if (ch == '\n') {
+					int lineStart = ScanLineStart(document, i);
+					if (lineStart >= 0) { // line could have a comment
+						inString = false;
+						for (int j = lineStart; j < i; ++j) {
+							ch = document.GetCharAt(j);
+							if (ch == '"') inString = !inString;
+							if (ch == '\'' && !inString) {
+								// comment found!
+								// Skip searching in the comment:
+								i = j;
+								break;
+							}
+						}
+					}
+					inString = false;
+				}
+			}
+			return -1;
+		}
+		
+		static int ScanLineStart(IFormattableDocument document, int offset)
+		{
+			bool hasComment = false;
+			for (int i = offset - 1; i > 0; --i) {
+				char ch = document.GetCharAt(i);
+				if (ch == '\n') {
+					if (!hasComment) return -1;
+					return i + 1;
+				} else if (ch == '\'') {
+					hasComment = true;
+				}
+			}
+			return 0;
+		}
+		
+		public int SearchBracketForward(IFormattableDocument document, int offset, char openBracket, char closingBracket)
+		{
+			bool inString  = false;
+			bool inComment = false;
+			int  brackets  = 1;
+			for (int i = offset; i < document.TextLength; ++i) {
+				char ch = document.GetCharAt(i);
+				if (ch == '\n') {
+					inString  = false;
+					inComment = false;
+				}
+				if (inComment) continue;
+				if (ch == '"') inString = !inString;
+				if (inString)  continue;
+				if (ch == '\'') {
+					inComment = true;
+				} else if (ch == openBracket) {
+					++brackets;
+				} else if (ch == closingBracket) {
+					--brackets;
+					if (brackets == 0) return i;
+				}
+			}
+			return -1;
+		}
+		#endregion
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/ChooseRuntimePanel.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/ChooseRuntimePanel.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/ChooseRuntimePanel.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,136 @@
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
+//     <version value="$version"/>
+// </file>
+
+using System;
+using System.IO;
+using System.Collections;
+
+using MonoDevelop.Internal.Project;
+using MonoDevelop.Core.Properties;
+using MonoDevelop.Core.AddIns.Codons;
+using MonoDevelop.Gui.Dialogs;
+using MonoDevelop.Core.Services;
+using MonoDevelop.Services;
+
+using Gtk;
+using GLib;
+
+namespace VBBinding
+{
+	public class ChooseRuntimePanel : AbstractOptionPanel
+	{
+		VBCompilerParameters config = null;
+		// FIXME: set the right rb groups
+		RadioButton monoRadioButton;
+		RadioButton mintRadioButton;
+		RadioButton msnetRadioButton;
+	
+		RadioButton mbasRadioButton;
+		RadioButton vbcRadioButton;
+		
+		Label labelCompiler=new Label(GettextCatalog.GetString("Compiler:"));
+		Label labelRuntime=new Label(GettextCatalog.GetString("Runtime:"));
+
+		//For grouping
+		//SList compilers=new SList(null);
+		//SList runtimes=new SList(null);
+		
+		public ChooseRuntimePanel(): base(){
+			InitializeComponent ();						
+			VBox vbox = new VBox ();
+			//HBox hboxTitle = new HBox ();
+			//hboxTitle.PackStart (titleLabel, false, false, 0);
+			//vbox.PackStart (hboxTitle);
+			//vbox.PackStart (outputAssembly);
+			
+			HBox hboxCompiler = new HBox ();
+			hboxCompiler.PackStart (labelCompiler, false, false, 0);
+			vbox.PackStart (hboxCompiler);
+			VBox comps = new VBox ();
+			comps.PackStart (mbasRadioButton);
+			comps.PackStart (vbcRadioButton);
+			vbox.PackStart (comps);
+			//vbox.PackStart (compilerPath);
+			HBox hboxRuntime = new HBox ();
+			hboxRuntime.PackStart (labelRuntime, false, false, 0);
+			VBox runs=new VBox();
+			runs.PackStart(monoRadioButton);
+			runs.PackStart(mintRadioButton);
+			runs.PackStart(msnetRadioButton);
+			vbox.PackStart (hboxRuntime);
+			vbox.PackStart(runs);
+			/* HBox hboxClasspath = new HBox ();
+			hboxClasspath.PackStart (labelClasspath, false, false, 0);
+			vbox.PackStart (hboxClasspath);
+			vbox.PackStart (classPath);
+			HBox hboxMainClass = new HBox ();
+			hboxMainClass.PackStart (labelMainClass, false, false, 0);
+			vbox.PackStart (hboxMainClass);
+			vbox.PackStart (mainClass);
+			HBox hboxWarnings = new HBox ();
+			hboxWarnings.PackStart (labelWarnings, false, false, 0);
+			vbox.PackStart (hboxWarnings);
+			HBox hbox = new HBox ();
+			hbox.PackStart (checkDeprecation);
+			hbox.PackStart (checkDebug);
+			hbox.PackStart (checkOptimize);
+			vbox.PackStart (hbox);
+			HBox hboxOutput = new HBox ();
+			hboxOutput.PackStart (labelOutput, false, false, 0);
+			vbox.PackStart (hboxOutput);
+			vbox.PackStart (outputDirectory); */
+			this.Add (vbox);
+		}
+		
+		private void InitializeComponent(){
+		/*	runtimes.Append(monoRadioButton);
+			runtimes.Append(mintRadioButton);
+			runtimes.Append(msnetRadioButton);
+			compilers.Append(mbasRadioButton);
+			compilers.Append(vbcRadioButton);
+			
+			msnetRadioButton.Group=runtimes;
+			monoRadioButton.Group=runtimes;
+			mintRadioButton.Group=runtimes;
+			vbcRadioButton.Group=compilers;
+			mbasRadioButton.Group=compilers; */
+			
+			monoRadioButton = new RadioButton ("Mono");
+			mintRadioButton = new RadioButton (monoRadioButton,"Mint");
+			msnetRadioButton = new RadioButton (monoRadioButton,"Msnet");
+		
+			mbasRadioButton = new RadioButton ("MBAS");
+			vbcRadioButton = new RadioButton (mbasRadioButton,"VBC");
+		}
+		
+		public override void LoadPanelContents()
+		{
+			this.config = (VBCompilerParameters)((IProperties)CustomizationObject).GetProperty("Config");
+			
+			msnetRadioButton.Active = config.NetRuntime == NetRuntime.MsNet;
+			monoRadioButton.Active  = config.NetRuntime == NetRuntime.Mono;
+			mintRadioButton.Active  = config.NetRuntime == NetRuntime.MonoInterpreter;
+			
+			vbcRadioButton.Active = config.VBCompiler == VBCompiler.Vbc;
+			mbasRadioButton.Active = config.VBCompiler == VBCompiler.Mbas;
+		}
+		
+		public override bool StorePanelContents()
+		{
+			if (msnetRadioButton.Active) {
+				config.NetRuntime =  NetRuntime.MsNet;
+			} else if (monoRadioButton.Active) {
+				config.NetRuntime =  NetRuntime.Mono;
+			} else {
+				config.NetRuntime =  NetRuntime.MonoInterpreter;
+			}
+			config.VBCompiler = vbcRadioButton.Active ? VBCompiler.Vbc : VBCompiler.Mbas;
+			
+			return true;
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/CodeGenerationPanel.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/CodeGenerationPanel.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/CodeGenerationPanel.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,215 @@
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Markus Palme" email="MarkusPalme at gmx.de"/>
+//     <version value="$version"/>
+// </file>
+
+using System;
+using System.IO;
+using System.Drawing;
+
+using MonoDevelop.Internal.Project;
+using MonoDevelop.Internal.ExternalTool;
+using MonoDevelop.Gui.Dialogs;
+using MonoDevelop.Core.Services;
+using MonoDevelop.Core.Properties;
+using MonoDevelop.Core.AddIns.Codons;
+
+using Gtk;
+using MonoDevelop.Gui.Widgets;
+using MonoDevelop.Services;
+
+namespace VBBinding
+{
+	public class CodeGenerationPanel : AbstractOptionPanel
+	{
+		VBCompilerParameters compilerParameters = null;
+	
+		/*
+		
+		ResourceService resourceService = (ResourceService)ServiceManager.GetService(typeof(IResourceService));
+		static FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
+		
+		public override bool ReceiveDialogMessage(DialogMessage message)
+		{
+			if (message == DialogMessage.OK) {
+				if (compilerParameters == null) {
+					return true;
+				}
+				FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
+				
+				
+				compilerParameters.DefineSymbols = ControlDictionary["symbolsTextBox"].Text;
+				compilerParameters.MainClass     = ControlDictionary["mainClassTextBox"].Text;
+				compilerParameters.Imports       = ControlDictionary["importsTextBox"].Text;
+				compilerParameters.RootNamespace = ControlDictionary["RootNamespaceTextBox"].Text;
+				
+				compilerParameters.Debugmode = ((CheckBox)ControlDictionary["generateDebugInformationCheckBox"]).Checked;
+				compilerParameters.Optimize = ((CheckBox)ControlDictionary["enableOptimizationCheckBox"]).Checked;
+				compilerParameters.GenerateOverflowChecks = ((CheckBox)ControlDictionary["generateOverflowChecksCheckBox"]).Checked;
+				compilerParameters.TreatWarningsAsErrors  = ((CheckBox)ControlDictionary["warningsAsErrorsCheckBox"]).Checked;
+				
+				compilerParameters.OptionExplicit = ((CheckBox)ControlDictionary["optionExplicitCheckBox"]).Checked ;
+				compilerParameters.OptionStrict = ((CheckBox)ControlDictionary["optionStrictCheckBox"]).Checked;
+			}
+			return true;
+		}
+		
+		void SetValues(object sender, EventArgs e)
+		{
+			this.compilerParameters = (VBCompilerParameters)((IProperties)CustomizationObject).GetProperty("Config");
+			
+			ControlDictionary["symbolsTextBox"].Text = compilerParameters.DefineSymbols;
+			ControlDictionary["mainClassTextBox"].Text = compilerParameters.MainClass;
+			ControlDictionary["importsTextBox"].Text = compilerParameters.Imports;
+			ControlDictionary["RootNamespaceTextBox"].Text = compilerParameters.RootNamespace;
+			
+			
+			((CheckBox)ControlDictionary["generateDebugInformationCheckBox"]).Checked = compilerParameters.Debugmode;
+			((CheckBox)ControlDictionary["enableOptimizationCheckBox"]).Checked = compilerParameters.Optimize;
+			((CheckBox)ControlDictionary["generateOverflowChecksCheckBox"]).Checked = compilerParameters.GenerateOverflowChecks;
+			((CheckBox)ControlDictionary["warningsAsErrorsCheckBox"]).Checked = compilerParameters.TreatWarningsAsErrors;
+			
+			((CheckBox)ControlDictionary["optionExplicitCheckBox"]).Checked = compilerParameters.OptionExplicit;
+			((CheckBox)ControlDictionary["optionStrictCheckBox"]).Checked = compilerParameters.OptionStrict;
+		}
+		
+		static PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService));
+		public CodeGenerationPanel() : base(propertyService.DataDirectory + @"\resources\panels\ProjectOptions\VBNetCodeGenerationPanel.xfrm")
+		{
+			CustomizationObjectChanged += new EventHandler(SetValues);
+			
+		}
+		*/
+		
+			/* public override bool ReceiveDialogMessage(DialogMessage message)
+			{
+				if (message == DialogMessage.OK) {
+					return widget.Store();
+				}
+				return true;
+			}
+
+		
+			void SetValues(object sender, EventArgs e){
+				LoadPanelContents();		
+			}
+			
+		public CodeGenerationPanel() : base()
+		{
+			CustomizationObjectChanged += new EventHandler(SetValues);
+		} */
+
+
+		
+		class CodeGenerationPanelWidget : GladeWidgetExtract 
+		{
+			//
+			// Gtk Controls	
+			//
+ 			[Glade.Widget] Entry symbolsEntry;
+ 			[Glade.Widget] Entry mainClassEntry;
+			[Glade.Widget] OptionMenu CompileTargetOptionMenu;
+ 			[Glade.Widget] CheckButton generateOverflowChecksCheckButton;
+			[Glade.Widget] CheckButton allowUnsafeCodeCheckButton;
+ 			[Glade.Widget] CheckButton enableOptimizationCheckButton;
+ 			[Glade.Widget] CheckButton warningsAsErrorsCheckButton;
+//			[Glade.Widget] CheckButton generateDebugInformationCheckButton;
+ 			[Glade.Widget] CheckButton generateXmlOutputCheckButton;
+ 			[Glade.Widget] SpinButton warningLevelSpinButton;
+
+			//
+			// services needed
+			//
+			StringParserService StringParserService = (StringParserService)ServiceManager.GetService (
+				typeof (StringParserService));
+
+			VBCompilerParameters compilerParameters = null;
+			
+			//static PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService));
+			
+
+ 			public  CodeGenerationPanelWidget(IProperties CustomizationObject) : base ("VB.glade", "CodeGenerationPanel")
+ 			{	
+ 				compilerParameters=(VBCompilerParameters)((IProperties)CustomizationObject).GetProperty("Config");
+				SetValues();
+				//CustomizationObjectChanged += new EventHandler(SetValues);
+ 			}
+ 			
+			public void SetValues(){
+				//this.compilerParameters = (VBCompilerParameters)((IProperties)CustomizationObject).GetProperty("Config");
+
+				// FIXME: Enable when mbas has this feature
+				generateXmlOutputCheckButton.Sensitive = false;
+				
+
+				//string[] compileTargets=new string[]{GettextCatalog.GetString ("Executable"),GettextCatalog.GetString("WinEXE"),	GettextCatalog.GetString ("Library"),GettextCatalog.GetString ("Module")};
+
+				Menu CompileTargetMenu = new Menu ();
+				CompileTargetMenu.Add(new MenuItem(GettextCatalog.GetString ("Executable")));
+				CompileTargetMenu.Add(new MenuItem(GettextCatalog.GetString("WinEXE")));
+				CompileTargetMenu.Add(new MenuItem(GettextCatalog.GetString ("Library")));
+				CompileTargetMenu.Add(new MenuItem(GettextCatalog.GetString ("Module"))); 
+				// FIXME commented until the Module capability is ported
+// 				CompileTargetMenu.Append(new MenuItem(
+// 								 StringParserService.Parse(
+// 									 "${res:Dialog.Options.PrjOptions.Configuration.CompileTarget.Module}")));
+
+				CompileTargetOptionMenu.Menu=CompileTargetMenu;
+				CompileTargetOptionMenu.SetHistory ( (uint) compilerParameters.CompileTarget);
+				//CompileTargetOptionMenu.Active=(int)compilerParameters.CompileTarget;
+
+				symbolsEntry.Text = compilerParameters.DefineSymbols;
+				mainClassEntry.Text = compilerParameters.MainClass;
+
+//				generateDebugInformationCheckButton.Active = compilerParameters.Debugmode;
+				generateXmlOutputCheckButton.Active        = compilerParameters.GenerateXmlDocumentation;
+				enableOptimizationCheckButton.Active       = compilerParameters.Optimize;
+				allowUnsafeCodeCheckButton.Active          = compilerParameters.UnsafeCode;
+				generateOverflowChecksCheckButton.Active   = compilerParameters.GenerateOverflowChecks;
+				warningsAsErrorsCheckButton.Active         = ! compilerParameters.RunWithWarnings;
+				warningLevelSpinButton.Value               = compilerParameters.WarningLevel;		
+			} 
+
+
+			public bool Store ()
+			{	
+				if (compilerParameters == null) {
+					System.Console.WriteLine("NULL compiler parameters for VBNet!");
+					return true;
+				}
+				//compilerParameters.CompileTarget =  (CompileTarget)  CompileTargetOptionMenu.History;
+				compilerParameters.CompileTarget=(CompileTarget)CompileTargetOptionMenu.History;
+				compilerParameters.DefineSymbols =  symbolsEntry.Text;
+				compilerParameters.MainClass     =  mainClassEntry.Text;
+
+//				compilerParameters.Debugmode                = generateDebugInformationCheckButton.Active;
+				compilerParameters.GenerateXmlDocumentation = generateXmlOutputCheckButton.Active;
+				compilerParameters.Optimize                 = enableOptimizationCheckButton.Active;
+				compilerParameters.UnsafeCode               = allowUnsafeCodeCheckButton.Active;
+				compilerParameters.GenerateOverflowChecks   = generateOverflowChecksCheckButton.Active;
+				compilerParameters.RunWithWarnings          = ! warningsAsErrorsCheckButton.Active;
+
+				compilerParameters.WarningLevel = warningLevelSpinButton.ValueAsInt;
+
+				return true;
+			}
+		}//CodeGenerationPanelWidget
+				
+		CodeGenerationPanelWidget widget;
+		
+		public override void LoadPanelContents()
+		{
+			Add (widget = new  CodeGenerationPanelWidget ((IProperties) CustomizationObject));
+		}
+		
+		public override bool StorePanelContents()
+		{
+			bool result = true;
+			result = widget.Store ();
+ 			return result;
+		}
+		
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/GuiMessageRecipient.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/GuiMessageRecipient.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/GuiMessageRecipient.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,66 @@
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Markus Palme" email="MarkusPalme at gmx.de"/>
+//     <version value="$version"/>
+// </file>
+
+using System;
+using System.Windows.Forms;
+
+namespace VBBinding
+{
+	[Serializable()]
+	class GuiMessageRecipient : IMessageRecipient
+	{
+		class StatusForm : Form
+		{
+			Label statusLabel;
+			
+			public StatusForm()
+			{
+				this.Text = "VB.DOC status";
+				this.ControlBox = false;
+				this.StartPosition = FormStartPosition.CenterScreen;
+				this.ShowInTaskbar = false;
+				
+				this.Size = new System.Drawing.Size(400, 50);
+				
+				statusLabel = new Label();
+				statusLabel.Dock = DockStyle.Fill;
+				statusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+				Controls.Add(statusLabel);
+			}
+			
+			public void Status(string statusMessage)
+			{
+				statusLabel.Text = statusMessage;
+				Application.DoEvents();
+			}
+		}
+		
+		StatusForm messageForm;
+		
+		public GuiMessageRecipient()
+		{
+			messageForm = new StatusForm();
+			messageForm.Show();
+		}
+		
+		public void Finished()
+		{
+			messageForm.Close();
+		}
+		
+		public void DisplayStatusMessage(string message)
+		{
+			messageForm.Status(message);
+		}
+		
+		public void DisplayErrorMessage(string message)
+		{
+			// message doesn't work in this app domain
+			System.Windows.Forms.MessageBox.Show(message);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/OutputOptionsPanel.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/OutputOptionsPanel.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/OutputOptionsPanel.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,303 @@
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Mike Krger" email="mike at icsharpcode.net"/>
+//     <version value="$version"/>
+// </file>
+
+using System;
+using System.IO;
+using System.Drawing;
+
+using Gtk;
+
+using MonoDevelop.Internal.Project;
+using MonoDevelop.Internal.ExternalTool;
+using MonoDevelop.Gui.Dialogs;
+using MonoDevelop.Gui.Widgets;
+using MonoDevelop.Core.Services;
+using MonoDevelop.Core.Properties;
+using MonoDevelop.Core.AddIns.Codons;
+using MonoDevelop.Services;
+
+namespace VBBinding
+{
+	public class OutputOptionsPanel : AbstractOptionPanel
+	{
+		VBCompilerParameters compilerParameters;
+		static FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
+		StringParserService stringParserService = (StringParserService)ServiceManager.GetService(typeof(StringParserService));
+		
+		/* public override bool ReceiveDialogMessage(DialogMessage message)
+		{
+			if (message == DialogMessage.OK) {
+				if (compilerParameters == null) {
+					return true;
+				}
+				
+				FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
+				if (!fileUtilityService.IsValidFileName(ControlDictionary["assemblyNameTextBox"].Text)) {
+					MessageBox.Show("Invalid assembly name specified", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1);
+					return false;
+				}
+				if (!fileUtilityService.IsValidFileName(ControlDictionary["outputDirectoryTextBox"].Text)) {
+					MessageBox.Show("Invalid output directory specified", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1);
+					return false;
+				}
+				
+				if (ControlDictionary["win32IconTextBox"].Text.Length > 0) {
+					if (!fileUtilityService.IsValidFileName(ControlDictionary["win32IconTextBox"].Text)) {
+						MessageBox.Show("Invalid Win32Icon specified", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1);
+						return false;
+					}
+					if (!File.Exists(ControlDictionary["win32IconTextBox"].Text)) {
+						MessageBox.Show("Win32Icon doesn't exists", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1);
+						return false;
+					}
+				}
+				
+				compilerParameters.CompileTarget               = (CompileTarget)((ComboBox)ControlDictionary["compileTargetComboBox"]).SelectedIndex;
+				compilerParameters.OutputAssembly              = ControlDictionary["assemblyNameTextBox"].Text;
+				compilerParameters.OutputDirectory             = ControlDictionary["outputDirectoryTextBox"].Text;
+				compilerParameters.CommandLineParameters       = ControlDictionary["parametersTextBox"].Text;
+				compilerParameters.ExecuteBeforeBuild          = ControlDictionary["executeBeforeTextBox"].Text;
+				compilerParameters.ExecuteAfterBuild           = ControlDictionary["executeAfterTextBox"].Text;
+				compilerParameters.ExecuteScript               = ControlDictionary["executeScriptTextBox"].Text;
+				compilerParameters.Win32Icon                   = ControlDictionary["win32IconTextBox"].Text;
+				compilerParameters.ExecuteBeforeBuildArguments = ControlDictionary["executeBeforeArgumentsTextBox"].Text;
+				compilerParameters.ExecuteAfterBuildArguments  = ControlDictionary["executeAfterArgumentsTextBox"].Text;
+				
+				compilerParameters.PauseConsoleOutput = ((CheckBox)ControlDictionary["pauseConsoleOutputCheckBox"]).Checked;
+			}
+			return true;
+		}
+	
+		void SetValues(object sender, EventArgs e)
+		{
+			this.compilerParameters = (VBCompilerParameters)((IProperties)CustomizationObject).GetProperty("Config");
+			
+			((ComboBox)ControlDictionary["compileTargetComboBox"]).SelectedIndex = (int)compilerParameters.CompileTarget;
+			ControlDictionary["win32IconTextBox"].Text              = compilerParameters.Win32Icon;
+			ControlDictionary["assemblyNameTextBox"].Text           = compilerParameters.OutputAssembly;
+			ControlDictionary["outputDirectoryTextBox"].Text        = compilerParameters.OutputDirectory;
+			ControlDictionary["parametersTextBox"].Text             = compilerParameters.CommandLineParameters;
+			ControlDictionary["executeScriptTextBox"].Text          = compilerParameters.ExecuteScript;
+			ControlDictionary["executeBeforeTextBox"].Text          = compilerParameters.ExecuteBeforeBuild;
+			ControlDictionary["executeAfterTextBox"].Text           = compilerParameters.ExecuteAfterBuild;
+			ControlDictionary["executeBeforeArgumentsTextBox"].Text = compilerParameters.ExecuteBeforeBuildArguments;
+			ControlDictionary["executeAfterArgumentsTextBox"].Text  = compilerParameters.ExecuteAfterBuildArguments;
+			
+			((CheckBox)ControlDictionary["pauseConsoleOutputCheckBox"]).Checked = compilerParameters.PauseConsoleOutput;
+		}
+		
+		void SelectFolder(object sender, EventArgs e)
+		{
+			FolderDialog fdiag = new  FolderDialog();
+			
+			if (fdiag.DisplayDialog("${res:Dialog.Options.PrjOptions.Configuration.FolderBrowserDescription}") == DialogResult.OK) {
+				ControlDictionary["outputDirectoryTextBox"].Text = fdiag.Path;
+			}
+		}
+		
+		void SelectFile2(object sender, EventArgs e)
+		{
+			OpenFileDialog fdiag = new OpenFileDialog();
+			fdiag.Filter      = stringParserService.Parse("${res:SharpDevelop.FileFilter.AllFiles}|*.*");
+			fdiag.Multiselect = false;
+			
+			if(fdiag.ShowDialog() == DialogResult.OK) {
+				ControlDictionary["executeBeforeTextBox"].Text = fdiag.FileName;
+			}
+		}
+		
+		void SelectFile3(object sender, EventArgs e)
+		{
+			OpenFileDialog fdiag = new OpenFileDialog();
+			fdiag.Filter      = stringParserService.Parse("${res:SharpDevelop.FileFilter.AllFiles}|*.*");
+			fdiag.Multiselect = false;
+			
+			if(fdiag.ShowDialog() == DialogResult.OK) {
+				ControlDictionary["executeAfterTextBox"].Text = fdiag.FileName;
+			}
+		}
+		void SelectFile4(object sender, EventArgs e)
+		{
+			OpenFileDialog fdiag = new OpenFileDialog();
+			fdiag.Filter      = stringParserService.Parse("${res:SharpDevelop.FileFilter.AllFiles}|*.*");
+			fdiag.Multiselect = false;
+			
+			if(fdiag.ShowDialog() == DialogResult.OK) {
+				ControlDictionary["executeScriptTextBox"].Text = fdiag.FileName;
+			}
+		}
+		void SelectWin32Icon(object sender, EventArgs e) 
+		{
+			using (OpenFileDialog fdiag  = new OpenFileDialog()) {
+				fdiag.AddExtension    = true;
+				fdiag.Filter = stringParserService.Parse("${res:SharpDevelop.FileFilter.Icons}|*.ico|${res:SharpDevelop.FileFilter.AllFiles}|*.*");
+				fdiag.Multiselect     = false;
+				fdiag.CheckFileExists = true;
+				
+				if (fdiag.ShowDialog() == DialogResult.OK) {
+					ControlDictionary["win32IconTextBox"].Text = fdiag.FileName;
+				}
+			}
+		}
+		
+		static PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService));
+		public OutputOptionsPanel() : base(propertyService.DataDirectory + @"\resources\panels\ProjectOptions\OutputPanel.xfrm")
+		{
+			CustomizationObjectChanged += new EventHandler(SetValues);
+			ControlDictionary["browseButton"].Click += new EventHandler(SelectFolder);
+			ControlDictionary["browseButton2"].Click += new EventHandler(SelectFile2);
+			ControlDictionary["browseButton3"].Click += new EventHandler(SelectFile3);
+			ControlDictionary["browseButton4"].Click += new EventHandler(SelectFile4);
+			ControlDictionary["browseWin32IconButton"].Click += new EventHandler(SelectWin32Icon);
+			
+			ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
+			((ComboBox)ControlDictionary["compileTargetComboBox"]).Items.Add(resourceService.GetString("Dialog.Options.PrjOptions.Configuration.CompileTarget.Exe"));
+			((ComboBox)ControlDictionary["compileTargetComboBox"]).Items.Add(resourceService.GetString("Dialog.Options.PrjOptions.Configuration.CompileTarget.WinExe"));
+			((ComboBox)ControlDictionary["compileTargetComboBox"]).Items.Add(resourceService.GetString("Dialog.Options.PrjOptions.Configuration.CompileTarget.Library"));
+			((ComboBox)ControlDictionary["compileTargetComboBox"]).Items.Add(resourceService.GetString("Dialog.Options.PrjOptions.Configuration.CompileTarget.Module"));
+			
+		}
+	} */
+	
+			static MessageService messageService = (MessageService) ServiceManager.GetService (typeof (MessageService));
+
+		class OutputOptionsPanelWidget : GladeWidgetExtract 
+		{
+			//
+			// Gtk Controls	
+			//
+			[Glade.Widget] Entry assemblyNameEntry;
+			[Glade.Widget] Entry outputDirectoryEntry;
+			[Glade.Widget] Entry parametersEntry;
+			[Glade.Widget] Entry executeBeforeEntry;
+			[Glade.Widget] Entry executeScriptEntry;
+			[Glade.Widget] Entry executeAfterEntry;
+			[Glade.Widget] CheckButton pauseConsoleOutputCheckButton;			
+			[Glade.Widget] Button browseButton;
+			[Glade.Widget] Button browseButton2;
+			[Glade.Widget] Button browseButton3;
+			[Glade.Widget] Button browseButton4;
+			
+			VBCompilerParameters compilerParameters;
+
+			public  OutputOptionsPanelWidget(IProperties CustomizationObject) : base ("VB.glade", "OutputOptionsPanel")
+ 			{			
+				this.compilerParameters = (VBCompilerParameters)((IProperties)CustomizationObject).GetProperty("Config");
+				browseButton.Clicked += new EventHandler (SelectFolder);
+				browseButton2.Clicked += new EventHandler (SelectFile4);
+				browseButton3.Clicked += new EventHandler (SelectFile3);
+				browseButton4.Clicked += new EventHandler (SelectFile2);
+				
+				assemblyNameEntry.Text = compilerParameters.OutputAssembly;
+				outputDirectoryEntry.Text = compilerParameters.OutputDirectory;
+				parametersEntry.Text      = compilerParameters.CommandLineParameters;
+				executeScriptEntry.Text   = compilerParameters.ExecuteScript;
+ 				executeBeforeEntry.Text   = compilerParameters.ExecuteBeforeBuild;
+ 				executeAfterEntry.Text    = compilerParameters.ExecuteAfterBuild;
+				
+ 				pauseConsoleOutputCheckButton.Active = compilerParameters.PauseConsoleOutput;
+			}
+
+			public bool Store ()
+			{	
+				if (compilerParameters == null) {
+					return true;
+				}
+				
+				FileUtilityService fileUtilityService = (FileUtilityService) ServiceManager.GetService (typeof (FileUtilityService));
+
+				if (!fileUtilityService.IsValidFileName(assemblyNameEntry.Text)) {
+					messageService.ShowError (GettextCatalog.GetString ("Invalid assembly name specified"));
+					return false;
+				}
+
+				if (!fileUtilityService.IsValidFileName (outputDirectoryEntry.Text)) {
+					messageService.ShowError (GettextCatalog.GetString ("Invalid output directory specified"));
+					return false;
+				}
+				
+				compilerParameters.OutputAssembly = assemblyNameEntry.Text;
+				compilerParameters.OutputDirectory = outputDirectoryEntry.Text;
+				compilerParameters.CommandLineParameters = parametersEntry.Text;
+				compilerParameters.ExecuteBeforeBuild = executeBeforeEntry.Text;
+				compilerParameters.ExecuteAfterBuild = executeAfterEntry.Text;
+				compilerParameters.ExecuteScript = executeScriptEntry.Text;
+				
+				compilerParameters.PauseConsoleOutput = pauseConsoleOutputCheckButton.Active;
+				return true;
+			}
+			
+			void SelectFolder(object sender, EventArgs e)
+			{
+				using (FileSelector fdiag = new FileSelector (GettextCatalog.GetString ("Select the directory in which the assembly will be created"))) {
+					if (fdiag.Run () == (int) ResponseType.Ok) {
+						outputDirectoryEntry.Text = fdiag.Filename;
+					}
+				
+					fdiag.Hide ();
+				}
+			}
+		
+			void SelectFile2(object sender, EventArgs e)
+			{
+				using (FileSelector fdiag = new FileSelector ("")) {
+					//fdiag.Filter = StringParserService.Parse("${res:SharpDevelop.FileFilter.AllFiles}|*.*");
+					fdiag.SelectMultiple = false;
+				
+					if(fdiag.Run () == (int) ResponseType.Ok) {
+						executeBeforeEntry.Text = fdiag.Filename;
+					}
+
+					fdiag.Hide ();
+				}
+			}
+			
+			void SelectFile3(object sender, EventArgs e)
+			{
+				using (FileSelector fdiag = new FileSelector ("")) {
+					//fdiag.Filter = StringParserService.Parse("${res:SharpDevelop.FileFilter.AllFiles}|*.*");
+					fdiag.SelectMultiple = false;
+				
+					if(fdiag.Run () == (int) ResponseType.Ok) {
+						executeAfterEntry.Text = fdiag.Filename;
+					}
+
+					fdiag.Hide ();
+				}
+			}
+		
+			void SelectFile4(object sender, EventArgs e)
+			{
+				using (FileSelector fdiag = new FileSelector ("")) {
+					//fdiag.Filter = StringParserService.Parse("${res:SharpDevelop.FileFilter.AllFiles}|*.*");
+					fdiag.SelectMultiple = false;
+				
+					if(fdiag.Run () == (int) ResponseType.Ok) {
+						executeScriptEntry.Text = fdiag.Filename;
+					}
+
+					fdiag.Hide ();
+				}
+			}
+		}
+
+		OutputOptionsPanelWidget  widget;
+
+		public override void LoadPanelContents()
+		{
+			Add (widget = new  OutputOptionsPanelWidget ((IProperties) CustomizationObject));
+		}
+		
+		public override bool StorePanelContents()
+		{
+			bool result = true;
+			result = widget.Store ();
+ 			return result;
+		}
+	}
+
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/TextEditorOptionsPanel.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/TextEditorOptionsPanel.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/TextEditorOptionsPanel.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,39 @@
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Markus Palme" email="MarkusPalme at gmx.de"/>
+//     <version value="$version"/>
+// </file>
+
+using System;
+using System.IO;
+using System.Drawing;
+
+using MonoDevelop.Internal.Project;
+using MonoDevelop.Internal.ExternalTool;
+using MonoDevelop.Gui.Dialogs;
+using MonoDevelop.Core.Services;
+using MonoDevelop.Core.Properties;
+using MonoDevelop.Core.AddIns.Codons;
+
+namespace VBBinding
+{
+	public class TextEditorOptionsPanel : AbstractOptionPanel
+	{
+		public override void LoadPanelContents()
+		{
+			SetupFromXml(Path.Combine(PropertyService.DataDirectory, 
+			                          @"resources\panels\VBSpecificTextEditorOptions.xfrm"));
+			((CheckBox)ControlDictionary["enableEndConstructsCheckBox"]).Checked   = PropertyService.GetProperty("VBBinding.TextEditor.EnableEndConstructs", true);
+			((CheckBox)ControlDictionary["enableCasingCheckBox"]).Checked = PropertyService.GetProperty("VBBinding.TextEditor.EnableCasing", true);
+		}
+		
+		public override bool StorePanelContents()
+		{
+			PropertyService.SetProperty("VBBinding.TextEditor.EnableEndConstructs", ((CheckBox)ControlDictionary["enableEndConstructsCheckBox"]).Checked);
+			PropertyService.SetProperty("VBBinding.TextEditor.EnableCasing", ((CheckBox)ControlDictionary["enableCasingCheckBox"]).Checked);
+			
+			return true;
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/VBCompilerPanel.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/VBCompilerPanel.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/VBCompilerPanel.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,49 @@
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Markus Palme" email="MarkusPalme at gmx.de"/>
+//     <version value="$version"/>
+// </file>
+
+using System;
+using System.IO;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+
+using MonoDevelop.Internal.Project;
+using MonoDevelop.Core.Properties;
+
+using MonoDevelop.Core.AddIns.Codons;
+using MonoDevelop.Gui.Dialogs;
+using MonoDevelop.Core.Services;
+
+namespace VBBinding
+{
+	public class VBCompilerPanel : AbstractOptionPanel
+	{
+		VBCompilerParameters config = null;
+		
+		public override void LoadPanelContents()
+		{
+			SetupFromXml(Path.Combine(PropertyService.DataDirectory, 
+			                          @"resources\panels\VBCompilerPanel.xfrm"));
+			
+			this.config = (VBCompilerParameters)((IProperties)CustomizationObject).GetProperty("Config");
+			
+			FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
+			((ComboBox)ControlDictionary["compilerVersionComboBox"]).Items.Add("Standard");
+			foreach (string runtime in fileUtilityService.GetAvaiableRuntimeVersions()) {
+				((ComboBox)ControlDictionary["compilerVersionComboBox"]).Items.Add(runtime);
+			}
+			
+			((ComboBox)ControlDictionary["compilerVersionComboBox"]).Text = config.VBCompilerVersion.Length == 0 ? "Standard" : config.VBCompilerVersion;
+		}
+
+		public override bool StorePanelContents()
+		{
+			config.VBCompilerVersion = ControlDictionary["compilerVersionComboBox"].Text;
+			return true;
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/VBDocConfigurationPanel.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/VBDocConfigurationPanel.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/VBDocConfigurationPanel.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,90 @@
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Markus Palme" email="MarkusPalme at gmx.de"/>
+//     <version value="$version"/>
+// </file>
+
+using System;
+using System.Drawing;
+
+using MonoDevelop.Internal.Project;
+using MonoDevelop.Internal.ExternalTool;
+using MonoDevelop.Gui.Dialogs;
+using MonoDevelop.Core.AddIns.Codons;
+
+using MonoDevelop.Core.Services;
+using MonoDevelop.Core.Properties;
+
+namespace VBBinding
+{
+	public class VBDOCConfigurationPanel  : AbstractOptionPanel
+	{
+		VBCompilerParameters compilerParameters = null;
+		VBProject project = null;
+		ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
+		static FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
+		static PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService));
+		
+		///<summary>
+		/// Returns if the filename will be parsed when running VB.DOC.
+		/// </summary>
+		public static bool IsFileIncluded(string filename, VBProject project)
+		{
+			VBCompilerParameters compilerparameters = (VBCompilerParameters)project.ActiveConfiguration;
+			return Array.IndexOf(compilerparameters.VBDOCFiles, filename) == -1;
+		}
+		
+		
+		public VBDOCConfigurationPanel() : base(propertyService.DataDirectory + @"\resources\panels\ProjectOptions\VBDOCConfigurationPanel.xfrm")
+		{
+			CustomizationObjectChanged += new EventHandler(SetValues);
+			ControlDictionary["BrowseOutputFileButton"].Click += new EventHandler(BrowseOutputFileButton_Click);
+		}
+		
+		private void BrowseOutputFileButton_Click(object sender, EventArgs e) {
+			SaveFileDialog dialog = new SaveFileDialog();
+			dialog.Filter = "XML files (*.xml)|*.xml";
+			if(dialog.ShowDialog() == DialogResult.OK) {
+				((TextBox)ControlDictionary["OutputFileTextBox"]).Text = dialog.FileName;
+			}
+		}
+		
+		public override bool ReceiveDialogMessage(DialogMessage message)
+		{
+			if (message == DialogMessage.OK) {
+				if (compilerParameters == null) {
+					return true;
+				}
+				
+				compilerParameters.VBDOCOutputFile = ((TextBox)ControlDictionary["OutputFileTextBox"]).Text;
+				compilerParameters.VBDOCCommentPrefix = ((TextBox)ControlDictionary["CommentPrefixTextBox"]).Text;
+				
+				string[] files = new string[((CheckedListBox)ControlDictionary["FileListBox"]).Items.Count - ((CheckedListBox)ControlDictionary["FileListBox"]).CheckedIndices.Count];
+				int count = 0;
+				for(int index = 0; index < ((CheckedListBox)ControlDictionary["FileListBox"]).Items.Count; index++) {
+					if(((CheckedListBox)ControlDictionary["FileListBox"]).GetItemChecked(index) == false) {
+						files[count] = (string)((CheckedListBox)ControlDictionary["FileListBox"]).Items[index];
+						count++;
+					}
+				}
+				compilerParameters.VBDOCFiles = files;
+			}
+			return true;
+		}
+		
+		void SetValues(object sender, EventArgs e)
+		{
+			this.compilerParameters = (VBCompilerParameters)((IProperties)CustomizationObject).GetProperty("Config");
+			project = (VBProject)((IProperties)CustomizationObject).GetProperty("Project");
+			
+			((TextBox)ControlDictionary["OutputFileTextBox"]).Text = compilerParameters.VBDOCOutputFile;
+			((TextBox)ControlDictionary["CommentPrefixTextBox"]). Text = compilerParameters.VBDOCCommentPrefix;
+			
+			foreach(ProjectFile pfile in project.ProjectFiles) {
+				bool included = IsFileIncluded(pfile.Name, project);
+				((CheckedListBox)ControlDictionary["FileListBox"]).Items.Add(pfile.Name, included);
+			}
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Makefile.am
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Makefile.am	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Makefile.am	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,61 @@
+ASSEMBLY = VBNetBinding.dll
+
+SUBDIRS = SharpRefactoryVB
+
+DLLS = /r:System.Drawing.dll \
+	/r:../../../../build/bin/MonoDevelop.Core.dll \
+	/r:../../../../build/bin/MonoDevelop.SourceEditor.dll \
+	/r:../../../../build/bin/MonoDevelop.Base.dll \
+	/r:../../../../build/bin/ICSharpCode.SharpRefactory.dll \
+	/r:../../../../build/bin/ICSharpCode.SharpRefactory.VB.dll \
+	/r:../../../../build/bin/ICSharpCode.SharpAssembly.dll \
+	/r:../../../../build/bin/MonoDevelop.Gui.Widgets.dll  \
+	$(BASE_DEPENDENCIES_LIBS)
+
+FILES = \
+./AssemblyInfo.cs \
+./VBAmbience.cs \
+./VBBindingCompilerServices.cs \
+./VBBindingExecutionServices.cs \
+./VBLanguageBinding.cs \
+./Gui/CodeGenerationPanel.cs \
+./Gui/OutputOptionsPanel.cs \
+./Parser/ExpressionFinder.cs \
+./Parser/Parser.cs \
+./Parser/Resolver.cs \
+./Parser/TypeVisitor.cs \
+./Parser/VBNetVisitor.cs \
+./Parser/SharpDevelopTree/AttributeSection.cs \
+./Parser/SharpDevelopTree/Class.cs \
+./Parser/SharpDevelopTree/CompilationUnit.cs \
+./Parser/SharpDevelopTree/Constructor.cs \
+./Parser/SharpDevelopTree/Event.cs \
+./Parser/SharpDevelopTree/Field.cs \
+./Parser/SharpDevelopTree/Indexer.cs \
+./Parser/SharpDevelopTree/Method.cs \
+./Parser/SharpDevelopTree/Parameter.cs \
+./Parser/SharpDevelopTree/Property.cs \
+./Parser/SharpDevelopTree/ReturnType.cs \
+./Project/VBCompilerParameters.cs \
+./Project/VBProject.cs
+
+build_sources = $(addprefix $(srcdir)/, $(FILES))
+
+all: $(ASSEMBLY)
+
+$(ASSEMBLY): $(build_sources)
+	cd SharpRefactoryVB && make
+	$(CSC) /out:$(ASSEMBLY) /target:library $(DLLS) \
+		/resource:$(srcdir)/../../../../data/resources/glade/VB.glade,VB.glade \
+		$(build_sources) \
+	&& cp $(ASSEMBLY) ../../../../build/AddIns/AddIns/BackendBindings/.
+
+vbnetbindinglibdir = $(libdir)/monodevelop/AddIns/AddIns/BackendBindings
+vbnetbindinglib_DATA = $(ASSEMBLY)
+
+CLEANFILES = $(ASSEMBLY) $(ASSEMBLY).mdb
+
+DISTCLEANFILES =
+
+EXTRA_DIST = $(FILES)
+

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/ExpressionFinder.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/ExpressionFinder.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/ExpressionFinder.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,371 @@
+using System;
+using System.Text;
+using MonoDevelop.Internal.Parser;
+
+namespace VBBinding.Parser
+{
+	/// <summary>
+	/// Description of ExpressionFinder.	
+	/// </summary>
+	public class ExpressionFinder  : IExpressionFinder
+	{
+		public string FindExpression(string inText, int offset)
+		{
+			this.text = FilterComments(inText, ref offset);
+			this.text   = text;
+			this.offset = this.lastAccept = offset;
+			this.state  = START;
+			if (this.text == null) {
+				return null;
+			}
+			while (state != ERROR) {
+				ReadNextToken();
+				//Console.WriteLine("cur state {0} got token {1}/{3} going to {2}", GetStateName(state), GetTokenName(curTokenType), GetStateName(stateTable[state, curTokenType]), curTokenType);
+				state = stateTable[state, curTokenType];
+				
+				if (state == ACCEPT || state == ACCEPT2) {
+					lastAccept = this.offset;
+				}
+				if (state == ACCEPTNOMORE) {
+					return this.text.Substring(this.offset + 1, offset - this.offset);
+				}
+			}
+			return this.text.Substring(this.lastAccept + 1, offset - this.lastAccept);
+		}
+		
+		#region Comment Filter and 'inside string watcher'
+		int initialOffset;
+		public string FilterComments(string text, ref int offset)
+		{
+			this.initialOffset = offset;
+			StringBuilder outText = new StringBuilder();
+			int curOffset = 0;
+			while (curOffset <= initialOffset) {
+				char ch = text[curOffset];
+				
+				switch (ch) {
+					case '@':
+						if (curOffset + 1 < text.Length && text[curOffset + 1] == '"') {
+							outText.Append(text[curOffset++]); // @
+							outText.Append(text[curOffset++]); // "
+							if (!ReadVerbatimString(outText, text, ref curOffset)) {
+								return null;
+							}
+						}else{
+							outText.Append(ch);
+							++curOffset;
+						}
+						break;
+					case '"':
+						outText.Append(ch);
+						curOffset++;
+						if (!ReadString(outText, text, ref curOffset)) {
+							return null;
+						}
+						break;
+					case '\'':
+						offset    -= 1;
+						curOffset += 1;
+						if (!ReadToEOL(text, ref curOffset, ref offset)) {
+							return null;
+						}
+						break;
+					default:
+						outText.Append(ch);
+						++curOffset;
+						break;
+				}
+			}
+			
+			return outText.ToString();
+		}
+		
+		bool ReadToEOL(string text, ref int curOffset, ref int offset)
+		{
+			while (curOffset <= initialOffset) {
+				char ch = text[curOffset++];
+				--offset;
+				if (ch == '\n') {
+					return true;
+				}
+			}
+			return false;
+		}
+		
+		bool ReadString(StringBuilder outText, string text, ref int curOffset)
+		{
+			while (curOffset <= initialOffset) {
+				char ch = text[curOffset++];
+				outText.Append(ch);
+				if (ch == '"') {
+					return true;
+				}
+			}
+			return false;
+		}
+		
+		bool ReadVerbatimString(StringBuilder outText, string text, ref int curOffset)
+		{
+			while (curOffset <= initialOffset) {
+				char ch = text[curOffset++];
+				outText.Append(ch);
+				if (ch == '"') {
+					if (curOffset < text.Length && text[curOffset] == '"') {
+						outText.Append(text[curOffset++]);
+					} else {
+						return true;
+					}
+				}
+			}
+			return false;
+		}
+		
+		bool ReadMultiLineComment(string text, ref int curOffset, ref int offset)
+		{
+			while (curOffset <= initialOffset) {
+				char ch = text[curOffset++];
+				--offset;
+				if (ch == '*') {
+					if (curOffset < text.Length && text[curOffset] == '/') {
+						++curOffset;
+						--offset;
+						return true;
+					}
+				}
+			}
+			return false;
+		}
+		#endregion
+		
+		#region mini backward lexer
+		string text;
+		int    offset;
+		
+		char GetNext()
+		{
+			if (offset >= 0) {
+				return text[offset--];
+			}
+			return '\0';
+		}
+		
+		char Peek()
+		{
+			if (offset >= 0) {
+				return text[offset];
+			}
+			return '\0';
+		}
+		
+		void UnGet()
+		{
+			++offset;
+		}
+		
+		// tokens for our lexer
+		static int Err     = 0;
+		static int Dot     = 1;
+		static int StrLit  = 2;
+		static int Ident   = 3;
+		static int New     = 4;
+//		static int Bracket = 5;
+		static int Parent  = 6;
+		static int Curly   = 7;
+		static int Using   = 8;
+		int curTokenType;
+		
+		readonly static string[] tokenStateName = new string[] {
+			"Err", "Dot", "StrLit", "Ident", "New", "Bracket", "Paren", "Curly", "Using"
+		};
+		string GetTokenName(int state)
+		{
+			return tokenStateName[state];
+		}
+		
+		void ReadNextToken()
+		{
+			char ch = GetNext();
+				
+			curTokenType = Err;
+			if (ch == '\0' || ch == '\n' || ch == '\r') {
+				return;
+			}
+			while (Char.IsWhiteSpace(ch)) {
+				ch = GetNext();
+				if (ch == '\n' || ch == '\r') {
+					return;
+				}
+			}
+			
+			switch (ch) {
+				case '}':
+					if (ReadBracket('{', '}')) {
+						curTokenType = Curly;
+					}
+					break;
+				case ')':
+					if (ReadBracket('(', ')')) {
+						curTokenType = Parent;
+					}
+					break;
+				case ']':
+					if (ReadBracket('[', ']')) {
+						curTokenType = Ident;
+					}
+					break;
+				case '.':
+					curTokenType = Dot;
+					break;
+				case '\'':
+				case '"':
+					if (ReadStringLiteral(ch)) {
+						curTokenType = StrLit;
+					}
+					break;
+				default:
+					if (IsIdentifierPart(ch)) {
+						string ident = ReadIdentifier(ch);
+						if (ident != null) {
+							switch (ident.ToLower()) {
+								case "new":
+									curTokenType = New;
+									break;
+								case "imports":
+									curTokenType = Using;
+									break;
+								default:
+									curTokenType = Ident;
+									break;
+							}
+						}
+					}
+					break;
+			}
+		}
+		
+		bool ReadStringLiteral(char litStart)
+		{
+			while (true) {
+				char ch = GetNext();
+				if (ch == '\0') {
+					return false;
+				}
+				if (ch == litStart) {
+					if (Peek() == '@' && litStart == '"') {
+						GetNext();
+					}
+					return true;
+				}
+			}
+		}
+		
+		bool ReadBracket(char openBracket, char closingBracket)
+		{
+			int curlyBraceLevel    = 0;
+			int squareBracketLevel = 0;
+			int parenthesisLevel   = 0;
+			switch (openBracket) {
+				case '(':
+					parenthesisLevel++;
+					break;
+				case '[':
+					squareBracketLevel++;
+					break;
+				case '{':
+					curlyBraceLevel++;
+					break;
+			}
+			
+			while (parenthesisLevel != 0 || squareBracketLevel != 0 || curlyBraceLevel != 0) {
+				char ch = GetNext();
+				if (ch == '\0') {
+					return false;
+				}
+				switch (ch) {
+					case '(':
+						parenthesisLevel--;
+						break;
+					case '[':
+						squareBracketLevel--;
+						break;
+					case '{':
+						curlyBraceLevel--;
+						break;
+					case ')':
+						parenthesisLevel++;
+						break;
+					case ']':
+						squareBracketLevel++;
+						break;
+					case '}':
+						curlyBraceLevel++;
+						break;
+				}
+			}
+			return true;
+		}
+		
+		string ReadIdentifier(char ch)
+		{
+			string identifier = ch.ToString();
+			while (IsIdentifierPart(Peek())) {
+				identifier = GetNext() + identifier;
+			}
+			return identifier;
+		}
+		
+		bool IsIdentifierPart(char ch)
+		{
+			return Char.IsLetterOrDigit(ch) || ch == '_';
+		}
+		#endregion
+		
+		#region finite state machine 
+		readonly static int ERROR  = 0;
+		readonly static int START  = 1;
+		readonly static int DOT    = 2;
+		readonly static int MORE   = 3;
+		readonly static int CURLY  = 4;
+		readonly static int CURLY2 = 5;
+		readonly static int CURLY3 = 6;
+		
+		readonly static int ACCEPT = 7;
+		readonly static int ACCEPTNOMORE = 8;
+		readonly static int ACCEPT2 = 9;
+		
+		readonly static string[] stateName = new string[] {
+			"ERROR",
+			"START",
+			"DOT",
+			"MORE",
+			"CURLY",
+			"CURLY2",
+			"CURLY3",
+			"ACCEPT",
+			"ACCEPTNOMORE",
+			"ACCEPT2"
+		};
+			
+		string GetStateName(int state)
+		{
+			return stateName[state];
+		}
+		
+		int state = 0;
+		int lastAccept = 0;
+		static int[,] stateTable = new int[,] {
+			//                   Err,     Dot,     Str,      ID,         New,     Brk,     Par,     Cur,   Using
+			/*ERROR*/        { ERROR,   ERROR,   ERROR,   ERROR,        ERROR,  ERROR,   ERROR,   ERROR,   ERROR},
+			/*START*/        { ERROR,     DOT,  ACCEPT,  ACCEPT,        ERROR,   MORE, ACCEPT2,   CURLY,   ACCEPTNOMORE},
+			/*DOT*/          { ERROR,   ERROR,  ACCEPT,  ACCEPT,        ERROR,   MORE,  ACCEPT,   CURLY,   ERROR},
+			/*MORE*/         { ERROR,   ERROR,  ACCEPT,  ACCEPT,        ERROR,   MORE, ACCEPT2,   CURLY,   ERROR},
+			/*CURLY*/        { ERROR,   ERROR,   ERROR,   ERROR,        ERROR, CURLY2,   ERROR,   ERROR,   ERROR},
+			/*CURLY2*/       { ERROR,   ERROR,   ERROR,  CURLY3,        ERROR,  ERROR,   ERROR,   ERROR,   ERROR},
+			/*CURLY3*/       { ERROR,   ERROR,   ERROR,   ERROR, ACCEPTNOMORE,  ERROR,   ERROR,   ERROR,   ERROR},
+			/*ACCEPT*/       { ERROR,    MORE,   ERROR,   ERROR,       ACCEPT,  ERROR,   ERROR,   ERROR,   ACCEPTNOMORE},
+			/*ACCEPTNOMORE*/ { ERROR,   ERROR,   ERROR,   ERROR,        ERROR,  ERROR,   ERROR,   ERROR,   ERROR},
+			/*ACCEPT2*/      { ERROR,    MORE,   ERROR,  ACCEPT,       ACCEPT,  ERROR,   ERROR,   ERROR,   ERROR},
+		};
+		#endregion 
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/Parser.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/Parser.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/Parser.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,153 @@
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Andrea Paatz" email="andrea at icsharpcode.net"/>
+//     <version value="$version"/>
+// </file>
+using System;
+using System.Drawing;
+using System.Collections;
+using MonoDevelop.Services;
+using MonoDevelop.Internal.Parser;
+using MonoDevelop.Internal.Project;
+using VBBinding.Parser.SharpDevelopTree;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+
+namespace VBBinding.Parser
+{
+	public class TParser : IParser
+	{
+	
+		public TParser() : base(){
+			//Keep this one for now, just as a basic verification of parser detection/loading
+			Console.WriteLine("Entering VB.NET parser");
+		}//constructor
+	
+		///<summary>IParser Interface</summary> 
+		string[] lexerTags;
+		public string[] LexerTags {
+//// Alex: get accessor needed
+			get {
+				return lexerTags;
+			}
+			set {
+				lexerTags = value;
+			}
+		}
+		public IExpressionFinder ExpressionFinder {
+			get {
+				return new ExpressionFinder();
+			}
+		}
+		
+		void RetrieveRegions(CompilationUnit cu, SpecialTracker tracker)
+		{
+			for (int i = 0; i < tracker.CurrentSpecials.Count; ++i) {
+				PreProcessingDirective directive = tracker.CurrentSpecials[i] as PreProcessingDirective;
+				if (directive != null) {
+					if (directive.Cmd.ToLower() == "#region") {
+						int deep = 1; 
+						for (int j = i + 1; j < tracker.CurrentSpecials.Count; ++j) {
+							PreProcessingDirective nextDirective = tracker.CurrentSpecials[j] as PreProcessingDirective;
+							if(nextDirective != null) {
+								switch (nextDirective.Cmd.ToLower()) {
+									case "#region":
+										++deep;
+										break;
+									case "#end":
+										if (nextDirective.Arg.ToLower() == "region") {
+											--deep;
+											if (deep == 0) {
+												cu.FoldingRegions.Add(new FoldingRegion(directive.Arg.Trim('"'), new DefaultRegion(directive.Start, nextDirective.End)));
+												goto end;
+											}
+										}
+										break;
+								}
+							}
+						}
+						end: ;
+					}
+				}
+			}
+		}
+		
+		public ICompilationUnitBase Parse(string fileName)
+		{
+			ICSharpCode.SharpRefactory.Parser.VB.Parser p = new ICSharpCode.SharpRefactory.Parser.VB.Parser();
+			
+			Lexer lexer = new Lexer(new FileReader(fileName));
+			lexer.SpecialCommentTags = lexerTags;
+			p.Parse(lexer);
+			
+			VBNetVisitor visitor = new VBNetVisitor();
+			visitor.Visit(p.compilationUnit, null);
+			//visitor.Cu.FileName = fileName;
+			visitor.Cu.ErrorsDuringCompile = p.Errors.count > 0;
+			RetrieveRegions(visitor.Cu, lexer.SpecialTracker);
+			
+			AddCommentTags(visitor.Cu, lexer.TagComments);
+			return visitor.Cu;
+		}
+		
+		public ICompilationUnitBase Parse(string fileName, string fileContent)
+		{
+			ICSharpCode.SharpRefactory.Parser.VB.Parser p = new ICSharpCode.SharpRefactory.Parser.VB.Parser();
+			
+			Lexer lexer = new Lexer(new StringReader(fileContent));
+			lexer.SpecialCommentTags = lexerTags;
+			p.Parse(lexer);
+			
+			VBNetVisitor visitor = new VBNetVisitor();
+			visitor.Visit(p.compilationUnit, null);
+			//visitor.Cu.FileName = fileName;
+			visitor.Cu.ErrorsDuringCompile = p.Errors.count > 0;
+			visitor.Cu.Tag = p.compilationUnit;
+			RetrieveRegions(visitor.Cu, lexer.SpecialTracker);
+			AddCommentTags(visitor.Cu, lexer.TagComments);
+			return visitor.Cu;
+		}
+		
+		void AddCommentTags(ICompilationUnit cu, ArrayList tagComments)
+		{
+			foreach (ICSharpCode.SharpRefactory.Parser.VB.TagComment tagComment in tagComments) {
+				DefaultRegion tagRegion = new DefaultRegion(tagComment.StartPosition.Y, tagComment.StartPosition.X);
+				MonoDevelop.Internal.Parser.Tag tag = new MonoDevelop.Internal.Parser.Tag(tagComment.Tag, tagRegion);
+				tag.CommentString = tagComment.CommentText;
+				cu.TagComments.Add(tag);
+			}
+		}
+		
+		
+		
+		public ArrayList CtrlSpace(IParserService parserService,IProject proj, int caretLine, int caretColumn, string fileName)
+		{
+			return new Resolver(proj).CtrlSpace(parserService, caretLine, caretColumn, fileName);
+		}
+		
+		public ResolveResult Resolve(IParserService parserService,IProject proj, string expression, int caretLineNumber, int caretColumn, string fileName, string fileContent)
+		{
+			return new Resolver(proj).Resolve(parserService,expression, caretLineNumber, caretColumn, fileName, fileContent);
+		}
+		
+		public ArrayList IsAsResolve (IParserService parserService, IProject project, string expression, int caretLineNumber, int caretColumn, string fileName, string fileContent)
+		{
+			return new Resolver (project).IsAsResolve (parserService, expression, caretLineNumber, caretColumn, fileName, fileContent);
+		}
+		
+		public string MonodocResolver (IParserService parserService, IProject project, string expression, int caretLineNumber, int caretColumn, string fileName, string fileContent)
+		{
+			return new Resolver (project).MonodocResolver (parserService, expression, caretLineNumber, caretColumn, fileName, fileContent);
+		}
+		
+		
+		public bool HandlesFileExtension(string fileExtension){
+        	if(fileExtension == null) return false;
+			return (fileExtension.ToLower() == ".vb");
+		}
+
+		
+		///////// IParser Interface END
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/Resolver.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/Resolver.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/Resolver.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,1253 @@
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Andrea Paatz" email="andrea at icsharpcode.net"/>
+//     <version value="$version"/>
+// </file>
+
+using System;
+using System.Collections;
+using System.Drawing;
+
+using MonoDevelop.Services;
+using MonoDevelop.Internal.Parser;
+using MonoDevelop.Internal.Project;
+using VBBinding.Parser.SharpDevelopTree;
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace VBBinding.Parser
+{
+	public class Resolver
+	{
+		IParserService parserService;
+		ICompilationUnit cu;
+		IClass callingClass;
+		LookupTableVisitor lookupTableVisitor;
+		IProject project;
+		
+		public Resolver (IProject project)
+		{
+			this.project = project;
+		}
+		
+		public IParserService ParserService {
+			get {
+				return parserService;
+			}
+		}
+		
+		public ICompilationUnit CompilationUnit {
+			get {
+				return cu;
+			}
+		}
+		
+		public IClass CallingClass {
+			get {
+				return callingClass;
+			}
+		}
+		
+		bool showStatic = false;
+		
+		bool inNew = false;
+		
+		public bool ShowStatic {
+			get {
+				return showStatic;
+			}
+			
+			set {
+				showStatic = value;
+			}
+		}
+		
+		int caretLine;
+		int caretColumn;
+		
+		public IReturnType internalResolve(IParserService parserService, string expression, int caretLineNumber, int caretColumn, string fileName, string fileContent)
+		{
+			try{
+			//Console.WriteLine("Start Resolving " + expression);
+			if (expression == null) {
+				return null;
+			}
+			expression = expression.TrimStart(null);
+			if (expression == "") {
+				return null;
+			}
+			this.caretLine     = caretLineNumber;
+			this.caretColumn   = caretColumn;
+			
+			this.parserService = parserService;
+			IParseInformation parseInfo = parserService.GetParseInformation(fileName);
+			ICSharpCode.SharpRefactory.Parser.AST.VB.CompilationUnit fileCompilationUnit = parseInfo.MostRecentCompilationUnit.Tag as ICSharpCode.SharpRefactory.Parser.AST.VB.CompilationUnit;
+			if (fileCompilationUnit == null) {
+				ICSharpCode.SharpRefactory.Parser.VB.Parser fileParser = new ICSharpCode.SharpRefactory.Parser.VB.Parser();
+				fileParser.Parse(new Lexer(new StringReader(fileContent)));
+				//Console.WriteLine("!Warning: no parseinformation!");
+				return null;
+			}
+			/*
+			//// try to find last expression in original string, it could be like " if (act!=null) act"
+			//// in this case only "act" should be parsed as expression  
+			!!is so!! don't change things that work
+			Expression expr=null;	// tentative expression
+			Lexer l=null;
+			ICSharpCode.SharpRefactory.Parser.Parser p = new ICSharpCode.SharpRefactory.Parser.Parser();
+			while (expression.Length > 0) {
+				l = new Lexer(new StringReader(expression));
+				expr = p.ParseExpression(l);
+				if (l.LookAhead.val != "" && expression.LastIndexOf(l.LookAhead.val) >= 0) {
+					if (expression.Substring(expression.LastIndexOf(l.LookAhead.val) + l.LookAhead.val.Length).Length > 0) 
+						expression=expression.Substring(expression.LastIndexOf(l.LookAhead.val) + l.LookAhead.val.Length).Trim();
+					else {
+						expression=l.LookAhead.val.Trim();
+						l=new Lexer(new StringReader(expression));
+						expr=p.ParseExpression(l);
+						break;
+					}
+				} else {
+					if (l.Token.val!="" || expr!=null) break;
+				}
+			}
+			//// here last subexpression should be fixed in expr
+			if it should be changed in expressionfinder don't fix it here
+			*/
+			ICSharpCode.SharpRefactory.Parser.VB.Parser p = new ICSharpCode.SharpRefactory.Parser.VB.Parser();
+			Lexer l = new Lexer(new StringReader(expression));
+			Expression expr = p.ParseExpression(l);
+			if (expr == null) {
+				return null;
+			//}else{
+				//Console.WriteLine(expr.ToString());
+			}
+			lookupTableVisitor = new LookupTableVisitor();
+			lookupTableVisitor.Visit(fileCompilationUnit, null);
+			//Console.WriteLine("Visited lookup table");
+			
+			TypeVisitor typeVisitor = new TypeVisitor(this);
+			
+			VBNetVisitor vbVisitor = new VBNetVisitor();
+			cu = (ICompilationUnit)vbVisitor.Visit(fileCompilationUnit, null);
+			//Console.WriteLine("Visited VBNetVisitor");
+			if (cu != null) {
+				callingClass = GetInnermostClass();
+				//Console.WriteLine("CallingClass is " + callingClass == null ? "null" : callingClass.Name);
+			}
+//			Console.WriteLine("expression = " + expr.ToString());
+			IReturnType type = expr.AcceptVisitor(typeVisitor, null) as IReturnType;
+			//Console.WriteLine("type visited");
+			if (type == null || type.PointerNestingLevel != 0) {
+				//Console.WriteLine("Type == null || type.PointerNestingLevel != 0");
+				//if (type != null) {
+					//Console.WriteLine("Accepted visitor: " + type.FullyQualifiedName);
+					//Console.WriteLine("PointerNestingLevel is " + type.PointerNestingLevel);
+				//} else {
+					//Console.WriteLine("Type == null");
+				//}
+				
+				//// when type is null might be file needs to be reparsed - some vars were lost
+				fileCompilationUnit=parserService.ParseFile(fileName, fileContent).MostRecentCompilationUnit.Tag 
+					as ICSharpCode.SharpRefactory.Parser.AST.VB.CompilationUnit;
+				lookupTableVisitor.Visit(fileCompilationUnit,null);
+				//Console.WriteLine("Lookup table visited again");
+				
+				cu = (ICompilationUnit)vbVisitor.Visit(fileCompilationUnit, null);
+				if (cu != null) {
+					callingClass = GetInnermostClass();
+					//Console.WriteLine("Got new cu, calling class = " + callingClass.FullyQualifiedName);
+				}
+				type=expr.AcceptVisitor(typeVisitor,null) as IReturnType;
+				//Console.WriteLine("Type visited again");
+				if (type==null)	return null;
+			}
+			if (type.ArrayDimensions != null && type.ArrayDimensions.Length > 0) {
+				type = new ReturnType("System.Array");
+			}
+			//Console.WriteLine("Here: Type is " + type.FullyQualifiedName);
+			return type;
+			}catch(Exception ex){
+				//Console.WriteLine("Exception in internalResolve: " + ex.Message);
+				//Console.WriteLine(ex.StackTrace);
+				return null;
+			}
+		}
+		
+		/// <remarks>
+		/// Returns the innerst class in which the carret currently is, returns null
+		/// if the carret is outside any class boundaries.
+		/// </remarks>
+		IClass GetInnermostClass()
+		{
+			if (cu != null) {
+				foreach (IClass c in cu.Classes) {
+					if (c != null && c.Region != null && c.Region.IsInside(caretLine, caretColumn)) {
+						return GetInnermostClass(c);
+					}
+				}
+			}
+			return null;
+		}
+		
+		IClass GetInnermostClass(IClass curClass)
+		{
+			if (curClass == null) {
+				return null;
+			}
+			if (curClass.InnerClasses == null) {
+				return GetResolvedClass (curClass);
+			}
+			foreach (IClass c in curClass.InnerClasses) {
+				if (c != null && c.Region != null && c.Region.IsInside(caretLine, caretColumn)) {
+					return GetInnermostClass(c);
+				}
+			}
+			return GetResolvedClass (curClass);
+		}
+		
+		
+		public IClass GetResolvedClass (IClass cls)
+		{
+			// Returns an IClass in which all type names have been properly resolved
+			return parserService.GetClass (project, cls.FullyQualifiedName,true,false);
+		}
+
+
+		
+		public string MonodocResolver (IParserService parserService, string expression, int caretLineNumber, int caretColumn, string fileName, string fileContent) 
+		{
+			//Console.WriteLine("Entering MonodocResolver for " + expression);
+			if (expression == null) {
+				return null;
+			}
+			expression = expression.TrimStart (null);
+			if (expression == "") {
+				return null;
+			}
+			IReturnType retType = internalResolve (parserService, expression, caretLineNumber, caretColumn, fileName, fileContent);
+			IClass retClass = parserService.SearchType (project, retType.FullyQualifiedName, null, cu);
+			if (retClass == null) {
+				//Console.WriteLine ("Retclass was null");
+				return null;
+			}
+			
+			//Console.WriteLine (retClass.FullyQualifiedName);
+			return "T:" + retClass.FullyQualifiedName;
+		}
+		
+		public ArrayList IsAsResolve (IParserService parserService, string expression, int caretLine, int caretColumn, string fileName, string fileContent)
+		{
+			//Console.WriteLine("Entering IsAsResolve for " + expression);
+			ArrayList result = new ArrayList ();
+			this.parserService = parserService;
+			this.caretLine = caretLine;
+			this.caretColumn = caretColumn;
+			
+			IParseInformation parseInfo = parserService.GetParseInformation (fileName);
+			ICSharpCode.SharpRefactory.Parser.AST.VB.CompilationUnit fcu = parseInfo.MostRecentCompilationUnit.Tag as ICSharpCode.SharpRefactory.Parser.AST.VB.CompilationUnit;
+			if (fcu == null)
+				return null;
+			ICSharpCode.SharpRefactory.Parser.VB.Parser p = new ICSharpCode.SharpRefactory.Parser.VB.Parser ();
+			Lexer l = new Lexer (new StringReader (expression));
+			Expression expr = p.ParseExpression(l);
+			if (expr == null)
+				return null;
+
+			lookupTableVisitor = new LookupTableVisitor ();
+			lookupTableVisitor.Visit (fcu, null);
+
+			TypeVisitor typeVisitor = new TypeVisitor (this);
+
+			VBNetVisitor vbVisitor = new VBNetVisitor ();
+			cu = (ICompilationUnit)vbVisitor.Visit (fcu, null);
+			if (cu != null) {
+				callingClass = GetInnermostClass ();
+			}
+
+			IReturnType type = expr.AcceptVisitor (typeVisitor, null) as IReturnType;
+			if (type == null || type.PointerNestingLevel != 0) {
+				fcu = parserService.ParseFile (fileName, fileContent).MostRecentCompilationUnit.Tag as ICSharpCode.SharpRefactory.Parser.AST.VB.CompilationUnit;
+				lookupTableVisitor.Visit (fcu, null);
+				cu = (ICompilationUnit)vbVisitor.Visit (fcu, null);
+
+				if (cu != null) {
+					callingClass = GetInnermostClass ();
+				}
+				type = expr.AcceptVisitor (typeVisitor, null) as IReturnType;
+				if (type == null)
+					return null;
+			}
+			if (type.ArrayDimensions != null && type.ArrayDimensions.Length > 0)
+				type = new ReturnType ("System.Array");
+
+//			IClass returnClass = SearchType (type.FullyQualifiedName, null, cu);
+			IClass returnClass = parserService.SearchType (project, type.FullyQualifiedName, null, cu);
+			if (returnClass == null)
+				return null;
+
+			foreach (IClass iclass in parserService.GetClassInheritanceTree (project, returnClass)) {
+				if (!result.Contains (iclass))
+					result.Add (iclass);
+			}
+			return result;
+		}
+		
+/***** #D Legacy Code - remove once replacement code is verified *****
+
+		public ResolveResult Resolve(IParserService parserService, string expression, int caretLineNumber, int caretColumn, string fileName, string fileContent)
+		{
+			Console.WriteLine("Entering Resolve for " + expression);
+			expression = expression.TrimStart(null);
+			expression = expression.ToLower();
+			if (expression.StartsWith("new ")) {
+				inNew = true;
+				expression = expression.Substring(4);
+			} else {
+				inNew = false;
+			}
+			//Console.WriteLine("\nStart Resolving expression : >{0}<", expression);
+			
+			Expression expr = null;
+			this.caretLine     = caretLineNumber;
+			this.caretColumn   = caretColumn;
+			this.parserService = parserService;
+			IParseInformation parseInfo = parserService.GetParseInformation(fileName);
+			ICSharpCode.SharpRefactory.Parser.AST.VB.CompilationUnit fileCompilationUnit = parseInfo.MostRecentCompilationUnit.Tag as ICSharpCode.SharpRefactory.Parser.AST.VB.CompilationUnit;
+			if (fileCompilationUnit == null) {
+				ICSharpCode.SharpRefactory.Parser.VB.Parser fileParser = new ICSharpCode.SharpRefactory.Parser.VB.Parser();
+				fileParser.Parse(new Lexer(new StringReader(fileContent)));
+				Console.WriteLine("!Warning: no parseinformation!");
+				return null;
+			}
+			VBNetVisitor vBNetVisitor = new VBNetVisitor();
+			cu = (ICompilationUnit)vBNetVisitor.Visit(fileCompilationUnit, null);
+			if (cu != null) {
+				callingClass = GetInnermostClass();
+				Console.WriteLine("CallingClass is " + callingClass == null ? "null" : callingClass.Name);
+			}else{
+				Console.WriteLine("NULL compilation unit!");
+			}
+			lookupTableVisitor = new LookupTableVisitor();
+			lookupTableVisitor.Visit(fileCompilationUnit, null);
+			
+			if (expression == null || expression == "") {
+				expr = WithResolve();
+				if (expr == null) {
+					return null;
+				}
+			}
+			
+			if (expression.StartsWith("imports ")) {
+				return ImportsResolve(expression);
+			}
+			Console.WriteLine("Not in imports >{0}<", expression);
+			
+			if (InMain()) {
+				showStatic = true;
+			}
+			
+			// MyBase and MyClass are no expressions, only MyBase.Identifier and MyClass.Identifier
+			if (expression == "mybase") {
+				expr = new BaseReferenceExpression();
+			} else if (expression == "myclass") {
+				expr = new ClassReferenceExpression();
+			}
+			
+			if (expr == null) {
+				Lexer l = new Lexer(new StringReader(expression));
+				ICSharpCode.SharpRefactory.Parser.VB.Parser p = new ICSharpCode.SharpRefactory.Parser.VB.Parser();
+				expr = p.ParseExpression(l);
+				if (expr == null) {
+					Console.WriteLine("Warning: No Expression from parsing!");
+					return null;
+				}
+			}
+			
+			Console.WriteLine(expr.ToString());
+			//TypeVisitor typeVisitor = new TypeVisitor(this);
+			//TypeVisitor typeVisitor = new VBBinding.Parser.TypeVisitor(this);
+			//IReturnType type = expr.AcceptVisitor(typeVisitor, null) as IReturnType;
+			//Console.WriteLine("type visited");
+			
+			IReturnType type = internalResolve (parserService, expression, caretLineNumber, caretColumn, fileName, fileContent);
+			//IClass returnClass = SearchType (type.FullyQualifiedName, cu);
+			
+			if (type == null || type.PointerNestingLevel != 0) {
+				Console.WriteLine("Type == null || type.PointerNestingLevel != 0");
+				if (type != null) {
+					Console.WriteLine("PointerNestingLevel is " + type.PointerNestingLevel);
+				} else {
+					Console.WriteLine("Type == null");
+				}
+				return null;
+			}
+			if (type.ArrayDimensions != null && type.ArrayDimensions.Length > 0) {
+				type = new ReturnType("System.Array");
+			}
+			Console.WriteLine("Here: Type is " + type.FullyQualifiedName);
+			//IClass returnClass = SearchType(type.FullyQualifiedName, callingClass, cu);
+			IClass returnClass = parserService.GetClass(project,type.FullyQualifiedName);
+			if (returnClass == null) {
+				Console.WriteLine("IClass is null! Trying namespace!");
+				// Try if type is Namespace:
+				string n = SearchNamespace(type.FullyQualifiedName, cu);
+				if (n == null) {
+					return null;
+				}
+				ArrayList content = parserService.GetNamespaceContents(project,n, true,false);
+				ArrayList classes = new ArrayList();
+				for (int i = 0; i < content.Count; ++i) {
+					if (content[i] is IClass) {
+						if (inNew) {
+							IClass c = (IClass)content[i];
+//							Console.WriteLine("Testing " + c.Name);
+							if ((c.ClassType == ClassType.Class) || (c.ClassType == ClassType.Struct)) {
+								classes.Add(c);
+//								Console.WriteLine("Added");
+							}
+						} else {
+							classes.Add((IClass)content[i]);
+						}
+					}
+				}
+				
+				Console.WriteLine("Checking subnamespace " + n);
+				string[] namespaces = parserService.GetNamespaceList(project,n, false);
+				Console.WriteLine("Got " + namespaces);
+				return new ResolveResult(namespaces, classes);
+			}
+			Console.WriteLine("Returning Result!");
+			if (inNew) {
+				return new ResolveResult(returnClass, ListTypes(new ArrayList(), returnClass));
+			} else {
+				return new ResolveResult(returnClass,ListMembers(new ArrayList(), returnClass));
+			}
+//			return new ResolveResult(returnClass, ListMembers(new ArrayList(),returnClass));
+		}
+*/
+		
+		
+		
+		
+		
+		public ResolveResult Resolve(IParserService parserService, string expression, int caretLineNumber, int caretColumn, string fileName, string fileContent) 
+		{
+			if (expression == null) {
+				return null;
+			}
+			expression = expression.TrimStart(null);
+			if (expression == "") {
+				return null;
+			}
+			if (expression.ToLower().StartsWith("imports")) {
+				// expression[expression.Length - 1] != '.'
+				// the period that causes this Resove() is not part of the expression
+				if (expression[expression.Length - 1] == '.') {
+					return null;
+				}
+				int i;
+				for (i = expression.Length - 1; i >= 0; --i) {
+					if (!(Char.IsLetterOrDigit(expression[i]) || expression[i] == '_' || expression[i] == '.')) {
+						break;
+					}
+				}
+				// no Identifier before the period
+				if (i == expression.Length - 1) {
+					return null;
+				}
+				string t = expression.Substring(i + 1);
+//				Console.WriteLine("in Imports Statement");
+				string[] namespaces = parserService.GetNamespaceList(project, t);
+				if (namespaces == null || namespaces.Length <= 0) {
+					return null;
+				}
+				return new ResolveResult(namespaces);
+			}
+			
+			//Console.WriteLine("Not in Imports");
+			IReturnType type = internalResolve (parserService, expression, caretLineNumber, caretColumn, fileName, fileContent);
+			IClass returnClass = SearchType (type.FullyQualifiedName, cu);
+			if (returnClass == null) {
+				// Try if type is Namespace:
+				string n = SearchNamespace(type.FullyQualifiedName, cu);
+				if (n == null) {
+					return null;
+				}
+				ArrayList content = parserService.GetNamespaceContents(project,n,true,false);
+				ArrayList classes = new ArrayList();
+				for (int i = 0; i < content.Count; ++i) {
+					if (content[i] is IClass) {
+						classes.Add((IClass)content[i]);
+					}
+				}
+				string[] namespaces = parserService.GetNamespaceList(project, n, false);
+				return new ResolveResult(namespaces, classes);
+			}
+			//Console.WriteLine("Returning Result!");
+			if (returnClass.FullyQualifiedName == "System.Void")
+				return null;
+			return new ResolveResult(returnClass, ListMembers(new ArrayList(), returnClass));
+		}
+		
+		
+		
+		
+		
+		
+		
+		
+		ArrayList ListMembers(ArrayList members, IClass curType)
+		{
+			//Console.WriteLine("LIST MEMBERS!!!");
+			//Console.WriteLine("showStatic = " + showStatic);
+			//Console.WriteLine(curType.InnerClasses.Count + " classes");
+			//Console.WriteLine(curType.Properties.Count + " properties");
+			//Console.WriteLine(curType.Methods.Count + " methods");
+			//Console.WriteLine(curType.Events.Count + " events");
+			//Console.WriteLine(curType.Fields.Count + " fields");
+			if (showStatic) {
+				foreach (IClass c in curType.InnerClasses) {
+					if (IsAccessible(curType, c)) {
+						members.Add(c);
+//						Console.WriteLine("Member added");
+					}
+				}
+			}
+			foreach (IProperty p in curType.Properties) {
+				if (MustBeShown(curType, p)) {
+					members.Add(p);
+//					Console.WriteLine("Member added");
+				} else {
+					//// for some public static properties msutbeshowen is false, so additional check
+					//// this is lame fix because curType doesn't allow to find out if to show only
+					//// static public or simply public properties
+					if (((AbstractMember)p).ReturnType!=null) {
+						// if public add it to completion window
+						if (((AbstractDecoration)p).IsPublic) members.Add(p);
+//						Console.WriteLine("Property {0} added", p.FullyQualifiedName);
+					}
+				}
+			}
+//			Console.WriteLine("ADDING METHODS!!!");
+			foreach (IMethod m in curType.Methods) {
+//				Console.WriteLine("Method : " + m);
+				if (MustBeShown(curType, m)) {
+					members.Add(m);
+//					Console.WriteLine("Member added");
+				}
+			}
+			foreach (IEvent e in curType.Events) {
+				if (MustBeShown(curType, e)) {
+					members.Add(e);
+//					Console.WriteLine("Member added");
+				}
+			}
+			foreach (IField f in curType.Fields) {
+				if (MustBeShown(curType, f)) {
+					members.Add(f);
+//					Console.WriteLine("Member added");
+				} else {
+					//// enum fields must be shown here if present
+					if (curType.ClassType == ClassType.Enum) {
+						if (IsAccessible(curType,f)) members.Add(f);
+//						Console.WriteLine("Member {0} added", f.FullyQualifiedName);
+					}
+				}
+			}
+//			Console.WriteLine("ClassType = " + curType.ClassType);
+			if (curType.ClassType == ClassType.Interface && !showStatic) {
+				foreach (string s in curType.BaseTypes) {
+					IClass baseClass = parserService.GetClass (project, s, true, false);
+					if (baseClass != null && baseClass.ClassType == ClassType.Interface) {
+						ListMembers(members, baseClass);
+					}
+				}
+			} else {
+				IClass baseClass = BaseClass(curType);
+				if (baseClass != null) {
+//					Console.WriteLine("Base Class = " + baseClass.FullyQualifiedName);
+					ListMembers(members, baseClass);
+				}
+			}
+//			Console.WriteLine("listing finished");
+			return members;
+		}
+		
+		
+		//Hacked from ListMembers - not sure if entirely correct or necessary
+		ArrayList ListTypes(ArrayList members, IClass curType)
+		{
+			//Console.WriteLine("LIST TYPES!!!");
+			//Console.WriteLine("showStatic = " + showStatic);
+			//Console.WriteLine(curType.InnerClasses.Count + " classes");
+			if (showStatic) {
+				foreach (IClass c in curType.InnerClasses) {
+					if (IsAccessible(curType, c)) {
+						members.Add(c);
+//						Console.WriteLine("Member added");
+					}
+				}
+			}
+//			Console.WriteLine("ClassType = " + curType.ClassType);
+			if (curType.ClassType == ClassType.Interface && !showStatic) {
+				foreach (string s in curType.BaseTypes) {
+					IClass baseClass = parserService.GetClass (project, s, true, false);
+					if (baseClass != null && baseClass.ClassType == ClassType.Interface) {
+						ListTypes(members, baseClass);
+					}
+				}
+			} else {
+				IClass baseClass = BaseClass(curType);
+				if (baseClass != null) {
+//					Console.WriteLine("Base Class = " + baseClass.FullyQualifiedName);
+					ListTypes(members, baseClass);
+				}
+			}
+//			Console.WriteLine("listing finished");
+			return members;
+		}
+		
+		bool InMain()
+		{
+			return false;
+		}
+		
+		Expression WithResolve()
+		{
+			//Console.WriteLine("in WithResolve");
+			Expression expr = null;
+			if (lookupTableVisitor.WithStatements != null) {
+				//Console.WriteLine("{0} WithStatements", lookupTableVisitor.WithStatements.Count);
+				foreach (WithStatement with in lookupTableVisitor.WithStatements) {
+//					Console.WriteLine("Position: ({0}/{1})", with.StartLocation, with.EndLocation);
+					if (IsInside(new Point(caretColumn, caretLine), with.StartLocation, with.EndLocation)) {
+						expr = with.WithExpression;
+					}
+				}
+			}
+//			if (expr == null) {
+//				Console.WriteLine("No WithStatement found");
+//			} else {
+//				Console.WriteLine("WithExpression : " + expr);
+//			}
+			return expr;
+		}
+		
+		ResolveResult ImportsResolve(string expression)
+		{
+			// expression[expression.Length - 1] != '.'
+			// the period that causes this Resove() is not part of the expression
+			if (expression[expression.Length - 1] == '.') {
+				return null;
+			}
+			int i;
+			for (i = expression.Length - 1; i >= 0; --i) {
+				if (!(Char.IsLetterOrDigit(expression[i]) || expression[i] == '_' || expression[i] == '.')) {
+					break;
+				}
+			}
+			// no Identifier before the period
+			if (i == expression.Length - 1) {
+				return null;
+			}
+			string t = expression.Substring(i + 1);
+//			Console.WriteLine("in imports Statement");
+			string[] namespaces = parserService.GetNamespaceList(project,t, false);
+			if (namespaces == null || namespaces.Length <= 0) {
+				return null;
+			}
+			return new ResolveResult(namespaces);
+		}
+		
+		bool InStatic()
+		{
+			IProperty property = GetProperty();
+			if (property != null) {
+				return property.IsStatic;
+			}
+			IMethod method = GetMethod();
+			if (method != null) {
+				return method.IsStatic;
+			}
+			return false;
+		}
+		
+		public ArrayList SearchMethod(IReturnType type, string memberName)
+		{
+			if (type == null || type.PointerNestingLevel != 0) {
+				return new ArrayList();
+			}
+			IClass curType;
+			if (type.ArrayDimensions != null && type.ArrayDimensions.Length > 0) {
+				curType = SearchType("System.Array", null, null);
+			} else {
+				curType = SearchType(type.FullyQualifiedName, null, null);
+				if (curType == null) {
+					return new ArrayList();
+				}
+			}
+			return SearchMethod(new ArrayList(), curType, memberName);
+		}
+		
+		ArrayList SearchMethod(ArrayList methods, IClass curType, string memberName)
+		{
+			bool isClassInInheritanceTree = IsClassInInheritanceTree(curType, callingClass);
+			
+			foreach (IMethod m in curType.Methods) {
+				if (m.Name.ToLower() == memberName.ToLower() &&
+				    MustBeShown(curType, m) &&  //,  callingClass, showStatic, isClassInInheritanceTree) &&
+				    !((m.Modifiers & ModifierEnum.Override) == ModifierEnum.Override)) {
+					methods.Add(m);
+				}
+			}
+			IClass baseClass = BaseClass(curType); //, false);
+			if (baseClass != null) {
+				return SearchMethod(methods, baseClass, memberName);
+			}
+			showStatic = false;
+			return methods;
+		}
+		
+		public ArrayList SearchIndexer(IReturnType type)
+		{
+			IClass curType = SearchType(type.FullyQualifiedName, null, null);
+			if (curType != null) {
+				return SearchIndexer(new ArrayList(), curType);
+			}
+			return new ArrayList();
+		}
+		
+		public ArrayList SearchIndexer(ArrayList indexer, IClass curType)
+		{
+			bool isClassInInheritanceTree =IsClassInInheritanceTree(curType, callingClass);
+			foreach (IIndexer i in curType.Indexer) {
+				if (MustBeShown(curType, i) /* , callingClass, showStatic, isClassInInheritanceTree) */ 
+				&& !((i.Modifiers & ModifierEnum.Override) == ModifierEnum.Override)) {
+					indexer.Add(i);
+				}
+			}
+			IClass baseClass = BaseClass(curType);
+			if (baseClass != null) {
+				return SearchIndexer(indexer, baseClass);
+			}
+			showStatic = false;
+			return indexer;
+		}
+		
+		// no methods or indexer
+		public IReturnType SearchMember(IReturnType type, string memberName)
+		{
+			if (type == null || memberName == null || memberName == "") {
+				return null;
+			}
+//			Console.WriteLine("searching member {0} in {1}", memberName, type.Name);
+			IClass curType = SearchType(type.FullyQualifiedName, callingClass, cu);
+			bool isClassInInheritanceTree =IsClassInInheritanceTree(curType, callingClass);
+			
+			if (curType == null) {
+//				Console.WriteLine("Type not found in SearchMember");
+				return null;
+			}
+			if (type.PointerNestingLevel != 0) {
+				return null;
+			}
+			if (type.ArrayDimensions != null && type.ArrayDimensions.Length > 0) {
+				curType = SearchType("System.Array", null, null);
+			}
+			if (curType.ClassType == ClassType.Enum) {
+				foreach (IField f in curType.Fields) {
+					if (f.Name.ToLower() == memberName.ToLower() && MustBeShown(curType, f) /* , callingClass, showStatic, isClassInInheritanceTree) */ ) {
+						showStatic = false;
+						return type; // enum members have the type of the enum
+					}
+				}
+			}
+			if (showStatic) {
+//				Console.WriteLine("showStatic == true");
+				foreach (IClass c in curType.InnerClasses) {
+					if (c.Name.ToLower() == memberName.ToLower()  && IsAccessible(curType, c) /*, callingClass, isClassInInheritanceTree) */) {
+						return new ReturnType(c.FullyQualifiedName);
+					}
+				}
+			}
+//			Console.WriteLine("#Properties " + curType.Properties.Count);
+			foreach (IProperty p in curType.Properties) {
+//				Console.WriteLine("checke Property " + p.Name);
+//				Console.WriteLine("member name " + memberName);
+				if (p.Name.ToLower() == memberName.ToLower() && MustBeShown(curType, p) /*, callingClass, showStatic, isClassInInheritanceTree)*/) {
+//					Console.WriteLine("Property found " + p.Name);
+					showStatic = false;
+					return p.ReturnType;
+				}
+			}
+			foreach (IField f in curType.Fields) {
+//				Console.WriteLine("checke Feld " + f.Name);
+//				Console.WriteLine("member name " + memberName);
+				if (f.Name.ToLower() == memberName.ToLower() && MustBeShown(curType, f) /*, callingClass, showStatic, isClassInInheritanceTree)*/) {
+//					Console.WriteLine("Field found " + f.Name);
+					showStatic = false;
+					return f.ReturnType;
+				}
+			}
+			foreach (IEvent e in curType.Events) {
+				if (e.Name.ToLower() == memberName.ToLower() && MustBeShown(curType, e) /*, callingClass, showStatic, isClassInInheritanceTree)*/) {
+					showStatic = false;
+					return e.ReturnType;
+				}
+			}
+			foreach (IMethod m in curType.Methods) {
+//				Console.WriteLine("checke Method " + m.Name);
+//				Console.WriteLine("member name " + memberName);
+				if (m.Name.ToLower() == memberName.ToLower() && MustBeShown(curType, m) /*, callingClass, showStatic, isClassInInheritanceTree) /* check if m has no parameters && m.*/) {
+//					Console.WriteLine("Method found " + m.Name);
+					showStatic = false;
+					return m.ReturnType;
+				}
+			}
+			foreach (string baseType in curType.BaseTypes) {
+				IClass c = SearchType(baseType, curType);
+				if (c != null) {
+					IReturnType erg = SearchMember(new ReturnType(c.FullyQualifiedName), memberName);
+					if (erg != null) {
+						return erg;
+					}
+				}
+			}
+			return null;
+		}
+		
+		bool IsInside(Point between, Point start, Point end)
+		{
+			if (between.Y < start.Y || between.Y > end.Y) {
+//				Console.WriteLine("Y = {0} not between {1} and {2}", between.Y, start.Y, end.Y);
+				return false;
+			}
+			if (between.Y > start.Y) {
+				if (between.Y < end.Y) {
+					return true;
+				}
+				// between.Y == end.Y
+//				Console.WriteLine("between.Y = {0} == end.Y = {1}", between.Y, end.Y);
+//				Console.WriteLine("returning {0}:, between.X = {1} <= end.X = {2}", between.X <= end.X, between.X, end.X);
+				return between.X <= end.X;
+			}
+			// between.Y == start.Y
+//			Console.WriteLine("between.Y = {0} == start.Y = {1}", between.Y, start.Y);
+			if (between.X < start.X) {
+				return false;
+			}
+			// start is OK and between.Y <= end.Y
+			return between.Y < end.Y || between.X <= end.X;
+		}
+		
+		ReturnType SearchVariable(string name)
+		{
+//			Console.WriteLine("Searching Variable");
+//			
+//			Console.WriteLine("LookUpTable has {0} entries", lookupTableVisitor.variables.Count);
+//			Console.WriteLine("Listing Variables:");
+//			IDictionaryEnumerator enumerator = lookupTableVisitor.variables.GetEnumerator();
+//			while (enumerator.MoveNext()) {
+//				Console.WriteLine(enumerator.Key);
+//			}
+//			Console.WriteLine("end listing");
+			ArrayList variables = (ArrayList)lookupTableVisitor.Variables[name.ToLower()];
+//			if (variables == null || variables.Count <= 0) {
+//				Console.WriteLine(name + " not in LookUpTable");
+//				return null;
+//			}
+			
+			ReturnType found = null;
+			if (variables != null) {
+				foreach (LocalLookupVariable v in variables) {
+//					Console.WriteLine("Position: ({0}/{1})", v.StartPos, v.EndPos);
+					if (IsInside(new Point(caretColumn, caretLine), v.StartPos, v.EndPos)) {
+						found = new ReturnType(v.TypeRef);
+//						Console.WriteLine("Variable found");
+						break;
+					}
+				}
+			}
+//			if (found == null) {
+//				Console.WriteLine("No Variable found");
+//				return null;
+//			}
+			return found;
+		}
+		
+		/// <remarks>
+		/// does the dynamic lookup for the typeName
+		/// </remarks>
+		public IReturnType DynamicLookup(string typeName)
+		{
+//			Console.WriteLine("starting dynamic lookup");
+//			Console.WriteLine("name == " + typeName);
+			
+			// try if it exists a variable named typeName
+			ReturnType variable = SearchVariable(typeName);
+			if (variable != null) {
+				showStatic = false;
+				return variable;
+			}
+//			Console.WriteLine("No Variable found");
+			
+			if (callingClass == null) {
+				return null;
+			}
+			//// somehow search in callingClass fields is not returning anything, so I am searching here once again
+			foreach (IField f in callingClass.Fields) {
+				if (f.Name.ToLower() == typeName.ToLower()) {
+//					Console.WriteLine("Field found " + f.Name);
+					return f.ReturnType;
+				}
+			}
+			//// end of mod for search in Fields
+		
+			// try if typeName is a method parameter
+			IReturnType p = SearchMethodParameter(typeName);
+			if (p != null) {
+//				Console.WriteLine("MethodParameter Found");
+				showStatic = false;
+				return p;
+			}
+//			Console.WriteLine("No Parameter found");
+			
+			// check if typeName == value in set method of a property
+			if (typeName == "value") {
+				p = SearchProperty();
+				if (p != null) {
+					showStatic = false;
+					return p;
+				}
+			}
+//			Console.WriteLine("No Property found");
+			
+			// try if there exists a nonstatic member named typeName
+			showStatic = false;
+			IReturnType t = SearchMember(callingClass == null ? null : new ReturnType(callingClass.FullyQualifiedName), typeName);
+			if (t != null) {
+				return t;
+			}
+//			Console.WriteLine("No nonstatic member found");
+			
+			// try if there exists a static member named typeName
+			showStatic = true;
+			t = SearchMember(callingClass == null ? null : new ReturnType(callingClass.FullyQualifiedName), typeName);
+			if (t != null) {
+				showStatic = false;
+				return t;
+			}
+//			Console.WriteLine("No static member found");
+			
+			// try if there exists a static member in outer classes named typeName
+			ClassCollection classes = GetOuterClasses(); //cu, caretLine, caretColumn);
+			foreach (IClass c in classes) {
+				t = SearchMember(callingClass == null ? null : new ReturnType(c.FullyQualifiedName), typeName);
+				if (t != null) {
+					showStatic = false;
+					return t;
+				}
+			}
+//			Console.WriteLine("No static member in outer classes found");
+//			Console.WriteLine("DynamicLookUp resultless");
+			return null;
+		}
+		
+		IProperty GetProperty()
+		{
+			foreach (IProperty property in callingClass.Properties) {
+				if (property.BodyRegion != null && property.BodyRegion.IsInside(caretLine, caretColumn)) {
+					return property;
+				}
+			}
+			return null;
+		}
+		
+		IMethod GetMethod()
+		{
+			foreach (IMethod method in callingClass.Methods) {
+				if (method.BodyRegion != null && method.BodyRegion.IsInside(caretLine, caretColumn)) {
+					return method;
+				}
+			}
+			return null;
+		}
+		
+		IReturnType SearchProperty()
+		{
+			IProperty property = GetProperty();
+			if (property == null) {
+				return null;
+			}
+			if (property.SetterRegion != null && property.SetterRegion.IsInside(caretLine, caretColumn)) {
+				return property.ReturnType;
+			}
+			return null;
+		}
+		
+		IReturnType SearchMethodParameter(string parameter)
+		{
+			IMethod method = GetMethod();
+			if (method == null) {
+				//Console.WriteLine("Method not found");
+				return null;
+			}
+			foreach (IParameter p in method.Parameters) {
+				if (p.Name.ToLower() == parameter.ToLower()) {
+				//	Console.WriteLine("Parameter found");
+					return p.ReturnType;
+				}
+			}
+			return null;
+		}
+		
+		public string SearchNamespace(string name, ICompilationUnit unit)
+		{
+			try{
+			//return parserService.SearchNamespace(project,null,name,false); //, unit, caretLine, caretColumn, false);
+			if (parserService.NamespaceExists(project, name)) {
+				return name;
+			}
+			if (unit == null) {
+				//Console.WriteLine("done, resultless");
+				//return null;
+				return parserService.SearchNamespace(project,null,name,false); //, unit, caretLine, caretColumn, false);
+			}
+			foreach (IUsing u in unit.Usings) {
+				if (u != null && (u.Region == null || u.Region.IsInside(caretLine, caretColumn))) {
+					string nameSpace = parserService.SearchNamespace (project, u, name);
+					if (nameSpace != null) {
+						return nameSpace;
+					}
+				}
+			}
+ 			//Console.WriteLine("done, resultless");
+			//return null;
+			return parserService.SearchNamespace(project,null,name,false); //, unit, caretLine, caretColumn, false);
+			}catch(Exception ex){
+				//Console.WriteLine("done, resultless");
+				return null;
+			}
+		}
+		
+		
+		/// <remarks>
+		/// use the usings and the name of the namespace to find a class
+		/// </remarks>
+		public IClass SearchType(string name, ICompilationUnit unit)
+		{
+//			Console.WriteLine("Searching Type " + name);
+			if (name == null || name == String.Empty) {
+//				Console.WriteLine("No Name!");
+				return null;
+			}
+			IClass c;
+			c = parserService.GetClass(project, name,true,false);
+			if (c != null) {
+//				Console.WriteLine("Found!");
+				return c;
+			}
+			//Console.WriteLine("No FullName");
+			if (unit != null) {
+				//Console.WriteLine(unit.Usings.Count + " Usings");
+				foreach (IUsing u in unit.Usings) {
+					if (u != null && (u.Region == null || u.Region.IsInside(caretLine, caretColumn))) {
+//						Console.WriteLine("In UsingRegion");
+						c = parserService.SearchType(project, u, name);
+						if (c != null) {
+//							Console.WriteLine("SearchType Successfull!!!");
+							return c;
+						}
+					}
+				}
+			}
+			if (callingClass == null) {
+				//Console.WriteLine("NULL calling class!");
+				return null;
+			}
+			string fullname = callingClass.FullyQualifiedName;
+			string[] namespaces = fullname.Split(new char[] {'.'});
+			string curnamespace = "";
+			int i = 0;
+			
+			do {
+				curnamespace += namespaces[i] + '.';
+				c = parserService.GetClass(project, curnamespace + name,true,false);
+				if (c != null) {
+					return c;
+				}
+				i++;
+			}
+			while (i < namespaces.Length);
+			
+			return null;
+		}
+		
+		/// <remarks>
+		/// use the usings and the name of the namespace to find a class
+		/// </remarks>
+		public IClass SearchType(string name, IClass curType)
+		{
+			return parserService.SearchType(project,name, curType,null); //, caretLine, caretColumn, false);
+		}
+		
+		/// <remarks>
+		/// use the usings and the name of the namespace to find a class
+		/// </remarks>
+		public IClass SearchType(string name, IClass curType, ICompilationUnit unit)
+		{
+			return parserService.SearchType(project,name, curType,unit); //, unit, caretLine, caretColumn, false);
+		}
+		
+		public ArrayList CtrlSpace(IParserService parserService, int caretLine, int caretColumn, string fileName)
+		{
+			//Console.WriteLine("Entering CtrlSpace for " + caretLine + ":" + caretColumn + " in " + fileName);
+			ArrayList result = new ArrayList(TypeReference.PrimitiveTypes);
+			this.parserService = parserService;
+			IParseInformation parseInfo = parserService.GetParseInformation(fileName);
+			ICSharpCode.SharpRefactory.Parser.AST.VB.CompilationUnit fileCompilationUnit = parseInfo.MostRecentCompilationUnit.Tag as ICSharpCode.SharpRefactory.Parser.AST.VB.CompilationUnit;
+			if (fileCompilationUnit == null) {
+				//Console.WriteLine("!Warning: no parseinformation!");
+				return null;
+			}
+			LookupTableVisitor lookupTableVisitor = new LookupTableVisitor();
+			lookupTableVisitor.Visit(fileCompilationUnit, null);
+			VBNetVisitor vBNetVisitor = new VBNetVisitor();
+			cu = (ICompilationUnit)vBNetVisitor.Visit(fileCompilationUnit, null);
+			if (cu != null) {
+				callingClass = GetInnermostClass();
+				//Console.WriteLine("CallingClass is " + callingClass == null ? "null" : callingClass.Name);
+			}
+			foreach (string name in lookupTableVisitor.Variables.Keys) {
+				ArrayList variables = (ArrayList)lookupTableVisitor.Variables[name.ToLower()];
+				if (variables != null && variables.Count > 0) {
+					foreach (LocalLookupVariable v in variables) {
+						if (IsInside(new Point(caretColumn, caretLine), v.StartPos, v.EndPos)) {
+							result.Add(v);
+							break;
+						}
+					}
+				}
+			}
+			if (callingClass != null) {
+				//result = parserService.ListMembers(result, callingClass, callingClass, InStatic());
+				result=ListMembers(result,callingClass);
+			}
+			string n = "";
+			result.AddRange(parserService.GetNamespaceContents(project,n, true,false));
+			foreach (IUsing u in cu.Usings) {
+				if (u != null && (u.Region == null || u.Region.IsInside(caretLine, caretColumn))) {
+					foreach (string name in u.Usings) {
+						result.AddRange(parserService.GetNamespaceContents(project,name,true, false));
+					}
+					foreach (string alias in u.Aliases.Keys) {
+						result.Add(alias);
+					}
+				}
+			}
+			return result;
+		}
+	
+	
+		public IClass BaseClass(IClass curClass)
+		{
+			foreach (string s in curClass.BaseTypes) {
+				IClass baseClass = parserService.GetClass (project, s, true, false);
+				if (baseClass != null && baseClass.ClassType != ClassType.Interface) {
+					return baseClass;
+				}
+			}
+			return null;
+		}
+		
+		bool IsAccessible(IClass c, IDecoration member)
+		{
+//			Console.WriteLine("member.Modifiers = " + member.Modifiers);
+			if ((member.Modifiers & ModifierEnum.Internal) == ModifierEnum.Internal) {
+				return false;
+			}
+			if ((member.Modifiers & ModifierEnum.Public) == ModifierEnum.Public) {
+//				Console.WriteLine("IsAccessible");
+				return true;
+			}
+			if ((member.Modifiers & ModifierEnum.Protected) == ModifierEnum.Protected && IsClassInInheritanceTree(c, callingClass)) {
+//				Console.WriteLine("IsAccessible");
+				return true;
+			}
+			return c.FullyQualifiedName == callingClass.FullyQualifiedName;
+		}
+		
+		bool MustBeShown(IClass c, IDecoration member)
+		{
+//			Console.WriteLine("member:" + member.Modifiers);
+			if ((!showStatic &&  ((member.Modifiers & ModifierEnum.Static) == ModifierEnum.Static)) ||
+			    ( showStatic && !((member.Modifiers & ModifierEnum.Static) == ModifierEnum.Static))) {
+				//// enum type fields are not shown here - there is no info in member about enum field
+				return false;
+			}
+//			Console.WriteLine("Testing Accessibility");
+			return IsAccessible(c, member);
+		}
+		
+		/// <remarks>
+		/// Returns true, if class possibleBaseClass is in the inheritance tree from c
+		/// </remarks>
+		bool IsClassInInheritanceTree(IClass possibleBaseClass, IClass c)
+		{
+			if (possibleBaseClass == null || c == null) {
+				return false;
+			}
+			if (possibleBaseClass.FullyQualifiedName == c.FullyQualifiedName) {
+				return true;
+			}
+			foreach (string baseClass in c.BaseTypes) {
+				IClass bc = parserService.GetClass (project, baseClass, true, false);
+				if (IsClassInInheritanceTree(possibleBaseClass, bc)) {
+					return true;
+				}
+			}
+			return false;
+		}
+		
+		/// <remarks>
+		/// Returns all (nestet) classes in which the carret currently is exept
+		/// the innermost class, returns an empty collection if the carret is in 
+		/// no class or only in the innermost class.
+		/// the most outer class is the last in the collection.
+		/// </remarks>
+		ClassCollection GetOuterClasses()
+		{
+			ClassCollection classes = new ClassCollection();
+			if (cu != null) {
+				foreach (IClass c in cu.Classes) {
+					if (c != null && c.Region != null && c.Region.IsInside(caretLine, caretColumn)) {
+						if (c != GetInnermostClass()) {
+							GetOuterClasses(classes, c);
+							classes.Add(GetResolvedClass (c));
+						}
+						break;
+					}
+				}
+			}
+			
+			return classes;
+		}
+		
+		void GetOuterClasses(ClassCollection classes, IClass curClass)
+		{
+			if (curClass != null) {
+				foreach (IClass c in curClass.InnerClasses) {
+					if (c != null && c.Region != null && c.Region.IsInside(caretLine, caretColumn)) {
+						if (c != GetInnermostClass()) {
+							GetOuterClasses(classes, c);
+							classes.Add(GetResolvedClass (c));
+						}
+						break;
+					}
+				}
+			}
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/AttributeSection.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/AttributeSection.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/AttributeSection.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,27 @@
+// created on 08.09.2003 at 16:17
+
+using MonoDevelop.Internal.Parser;
+using System.Collections;
+
+namespace VBBinding.Parser.SharpDevelopTree
+{
+	public class AttributeSection : AbstractAttributeSection
+	{
+		public AttributeSection(AttributeTarget attributeTarget,
+		                        AttributeCollection attributes) {
+			this.attributeTarget = attributeTarget;
+			this.attributes = attributes;
+		}
+	}
+	public class ASTAttribute : AbstractAttribute
+	{
+		public ASTAttribute(string name, ArrayList positionalArguments, SortedList namedArguments)
+		{
+			this.name = name;
+			this.positionalArguments = positionalArguments;
+			this.namedArguments = namedArguments;
+		}
+	}
+	
+	
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Class.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Class.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Class.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,65 @@
+// created on 06.08.2003 at 12:37
+
+using System.Diagnostics;
+
+using MonoDevelop.Internal.Parser;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace VBBinding.Parser.SharpDevelopTree
+{
+	public class Class : AbstractClass
+	{
+		ICompilationUnit cu;
+		
+		public Class(CompilationUnit cu, ClassType t, Modifier m, IRegion region)
+		{
+			this.cu = cu;
+			classType = t;
+			this.region = region;
+			modifiers = (ModifierEnum)m;
+		}
+		
+		public void UpdateModifier()
+		{
+			if (classType == ClassType.Enum) {
+				foreach (Field f in Fields) {
+					f.AddModifier(ModifierEnum.Public);
+				}
+				return;
+			}
+			if (classType != ClassType.Interface) {
+				return;
+			}
+			foreach (Class c in InnerClasses) {
+				c.modifiers = c.modifiers | ModifierEnum.Public;
+			}
+			foreach (IMethod m in Methods) {
+				if (m is Constructor) {
+					((Constructor)m).AddModifier(ModifierEnum.Public);
+				} else if (m is Method) {
+					((Method)m).AddModifier(ModifierEnum.Public);
+				} else {
+					Debug.Assert(false, "Unexpected type in method of interface. Can not set modifier to public!");
+				}
+			}
+			foreach (Event e in Events) {
+				e.AddModifier(ModifierEnum.Public);
+			}
+			foreach (Field f in Fields) {
+				f.AddModifier(ModifierEnum.Public);
+			}
+			foreach (Indexer i in Indexer) {
+				i.AddModifier(ModifierEnum.Public);
+			}
+			foreach (Property p in Properties) {
+				p.AddModifier(ModifierEnum.Public);
+			}
+			
+		}
+		public override ICompilationUnit CompilationUnit {
+			get {
+				return cu;
+			}
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/CompilationUnit.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/CompilationUnit.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/CompilationUnit.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,26 @@
+// created on 04.08.2003 at 17:31
+
+using MonoDevelop.Internal.Parser;
+
+namespace VBBinding.Parser.SharpDevelopTree
+{
+	public class CompilationUnit : AbstractCompilationUnit
+	{
+		
+		public override CommentCollection MiscComments {
+			get {
+				return null;
+			}
+		}
+		public override CommentCollection DokuComments {
+			get {
+				return null;
+			}
+		}
+		public override TagCollection TagComments {
+			get {
+				return null;
+			}
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Constructor.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Constructor.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Constructor.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,23 @@
+// created on 06.08.2003 at 12:35
+
+using MonoDevelop.Internal.Parser;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace VBBinding.Parser.SharpDevelopTree
+{
+	public class Constructor : AbstractMethod
+	{
+		public void AddModifier(ModifierEnum m)
+		{
+			modifiers = modifiers | m;
+		}
+		
+		public Constructor(Modifier m, IRegion region, IRegion bodyRegion)
+		{
+			FullyQualifiedName = "#ctor";
+			this.region     = region;
+			this.bodyRegion = bodyRegion;
+			modifiers = (ModifierEnum)m;
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Event.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Event.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Event.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,24 @@
+// created on 06.08.2003 at 12:30
+
+using MonoDevelop.Internal.Parser;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace VBBinding.Parser.SharpDevelopTree
+{
+	public class Event : AbstractEvent
+	{
+		public void AddModifier(ModifierEnum m)
+		{
+			modifiers = modifiers | m;
+		}
+		
+		public Event(string name, ReturnType type, Modifier m, IRegion region, IRegion bodyRegion)
+		{
+			FullyQualifiedName = name;
+			returnType         = type;
+			this.region        = region;
+			this.bodyRegion    = bodyRegion;
+			modifiers          = (ModifierEnum)m;
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Field.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Field.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Field.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,29 @@
+// created on 04.08.2003 at 18:06
+using System;
+using MonoDevelop.Internal.Parser;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace VBBinding.Parser.SharpDevelopTree
+{
+	public class Field : AbstractField
+	{
+		public void AddModifier(ModifierEnum m)
+		{
+			modifiers = modifiers | m;
+		}
+		
+		public Field(ReturnType type, string fullyQualifiedName, Modifier m, IRegion region)
+		{
+			this.returnType = type;
+			this.FullyQualifiedName = fullyQualifiedName;
+			this.region = region;
+			modifiers = (ModifierEnum)m;
+//			Console.WriteLine("modifiers for field {0} are {1} were {2}", fullyQualifiedName, modifiers, m);
+		}
+		
+		public void SetModifiers(ModifierEnum m)
+		{
+			modifiers = m;
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Indexer.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Indexer.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Indexer.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,24 @@
+// created on 06.08.2003 at 12:34
+
+using MonoDevelop.Internal.Parser;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace VBBinding.Parser.SharpDevelopTree
+{
+	public class Indexer : AbstractIndexer
+	{
+		public void AddModifier(ModifierEnum m)
+		{
+			modifiers = modifiers | m;
+		}
+		
+		public Indexer(ReturnType type, ParameterCollection parameters, Modifier m, IRegion region, IRegion bodyRegion)
+		{
+			returnType      = type;
+			this.parameters = parameters;
+			this.region     = region;
+			this.bodyRegion = bodyRegion;
+			modifiers = (ModifierEnum)m;
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Method.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Method.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Method.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,24 @@
+// created on 06.08.2003 at 12:35
+using System;
+using MonoDevelop.Internal.Parser;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace VBBinding.Parser.SharpDevelopTree
+{
+	public class Method : AbstractMethod
+	{
+		public void AddModifier(ModifierEnum m)
+		{
+			modifiers = modifiers | m;
+		}
+		
+		public Method(string name, ReturnType type, Modifier m, IRegion region, IRegion bodyRegion)
+		{
+			FullyQualifiedName = name;
+			returnType = type;
+			this.region     = region;
+			this.bodyRegion = bodyRegion;
+			modifiers = (ModifierEnum)m;
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Parameter.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Parameter.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Parameter.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,15 @@
+// created on 07.08.2003 at 20:12
+
+using MonoDevelop.Internal.Parser;
+
+namespace VBBinding.Parser.SharpDevelopTree
+{
+	public class Parameter : AbstractParameter
+	{
+		public Parameter(string name, ReturnType type)
+		{
+			Name = name;
+			returnType = type;
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Property.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Property.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Property.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,24 @@
+// created on 06.08.2003 at 12:36
+
+using MonoDevelop.Internal.Parser;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace VBBinding.Parser.SharpDevelopTree
+{
+	public class Property : AbstractProperty
+	{
+		public void AddModifier(ModifierEnum m)
+		{
+			modifiers = modifiers | m;
+		}
+		
+		public Property(string fullyQualifiedName, ReturnType type, Modifier m, IRegion region, IRegion bodyRegion)
+		{
+			this.FullyQualifiedName = fullyQualifiedName;
+			returnType = type;
+			this.region = region;
+			this.bodyRegion = bodyRegion;
+			modifiers = (ModifierEnum)m;
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/ReturnType.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/ReturnType.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/ReturnType.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,52 @@
+// created on 04.08.2003 at 18:08
+using System;
+using MonoDevelop.Internal.Parser;
+
+namespace VBBinding.Parser.SharpDevelopTree
+{
+	public class ReturnType : AbstractReturnType
+	{
+		public new int PointerNestingLevel {
+			get {
+				return base.pointerNestingLevel;
+			}
+			set {
+				base.pointerNestingLevel = value;
+			}
+		}
+		
+		public new int[] ArrayDimensions {
+			get {
+				return base.arrayDimensions;
+			}
+			set {
+				base.arrayDimensions = value;
+			}
+		}
+		
+		public ReturnType(string fullyQualifiedName)
+		{
+			base.FullyQualifiedName = fullyQualifiedName;
+//			Console.WriteLine("NEW RETURN TYPE WITH : " + fullyQualifiedName);
+		}
+		
+		public ReturnType(string fullyQualifiedName, int[] arrayDimensions, int pointerNestingLevel)
+		{
+			this.FullyQualifiedName  = fullyQualifiedName;
+			this.arrayDimensions     = arrayDimensions;
+			this.pointerNestingLevel = pointerNestingLevel;
+		}
+		
+		public ReturnType(ICSharpCode.SharpRefactory.Parser.AST.VB.TypeReference type)
+		{
+			base.FullyQualifiedName  = type.SystemType == null ? type.Type : type.SystemType;
+			base.arrayDimensions     = type.RankSpecifier == null ? new int[] { } : (int[])type.RankSpecifier.ToArray(typeof(int));
+			base.pointerNestingLevel = 0;
+		}
+		
+		public ReturnType Clone()
+		{
+			return new ReturnType(FullyQualifiedName, arrayDimensions, pointerNestingLevel);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/TypeVisitor.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/TypeVisitor.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/TypeVisitor.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,272 @@
+// created on 22.08.2003 at 19:02
+
+using System;
+using System.Collections;
+
+//using ICSharpCode.SharpRefactory.Parser;
+using ICSharpCode.SharpRefactory.Parser.VB;
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+using VBBinding.Parser.SharpDevelopTree;
+
+using MonoDevelop.Internal.Parser;
+
+namespace VBBinding.Parser
+{
+	
+	public class TypeVisitor : AbstractASTVisitor
+	{
+		Resolver resolver;
+		
+		public TypeVisitor(Resolver resolver)
+		{
+			this.resolver = resolver;
+		}
+		
+		public override object Visit(PrimitiveExpression primitiveExpression, object data)
+		{
+			if (primitiveExpression.Value != null) {
+//				Console.WriteLine("Visiting " + primitiveExpression.Value);
+				return new ReturnType(primitiveExpression.Value.GetType().FullName);
+			}
+			return null;
+		}
+		
+		public override object Visit(BinaryOperatorExpression binaryOperatorExpression, object data)
+		{
+			// TODO : Operators 
+			return binaryOperatorExpression.Left.AcceptVisitor(this, data);
+		}
+		
+		public override object Visit(ParenthesizedExpression parenthesizedExpression, object data)
+		{
+			if (parenthesizedExpression == null) {
+				return null;
+			}
+			return parenthesizedExpression.Expression.AcceptVisitor(this, data);
+		}
+		
+		public override object Visit(InvocationExpression invocationExpression, object data)
+		{
+			if (invocationExpression.TargetObject is FieldReferenceOrInvocationExpression) {
+				FieldReferenceOrInvocationExpression field = (FieldReferenceOrInvocationExpression)invocationExpression.TargetObject;
+				IReturnType type = field.TargetObject.AcceptVisitor(this, data) as IReturnType;
+				ArrayList methods = resolver.SearchMethod(type, field.FieldName);
+				resolver.ShowStatic = false;
+				if (methods.Count <= 0) {
+					return null;
+				}
+				// TODO: Find the right method
+				return ((IMethod)methods[0]).ReturnType;
+			} else if (invocationExpression.TargetObject is IdentifierExpression) {
+				string id = ((IdentifierExpression)invocationExpression.TargetObject).Identifier;
+				if (resolver.CallingClass == null) {
+					return null;
+				}
+				IReturnType type = new ReturnType(resolver.CallingClass.FullyQualifiedName);
+				ArrayList methods = resolver.SearchMethod(type, id);
+				resolver.ShowStatic = false;
+				if (methods.Count <= 0) {
+					return null;
+				}
+				// TODO: Find the right method
+				return ((IMethod)methods[0]).ReturnType;
+			}
+			// invocationExpression is delegate call
+			IReturnType t = invocationExpression.AcceptChildren(this, data) as IReturnType;
+			if (t == null) {
+				return null;
+			}
+			IClass c = resolver.SearchType(t.FullyQualifiedName, resolver.CallingClass, resolver.CompilationUnit);
+			if (c.ClassType == ClassType.Delegate) {
+				ArrayList methods = resolver.SearchMethod(t, "invoke");
+				if (methods.Count <= 0) {
+					return null;
+				}
+				return ((IMethod)methods[0]).ReturnType;
+			}
+			return null;
+		}
+		
+		
+		//TODO - Verify logic; did a lot of "just make it work" hacking in this method
+		public override object Visit(FieldReferenceOrInvocationExpression fieldReferenceExpression, object data)
+		{
+			if (fieldReferenceExpression == null) {
+				return null;
+			}
+			
+			IReturnType returnType = fieldReferenceExpression.TargetObject.AcceptVisitor(this, data) as IReturnType;
+			if (returnType != null) {
+				//Console.WriteLine("Got type: " + returnType.FullyQualifiedName);
+				string name = resolver.SearchNamespace(returnType.FullyQualifiedName, resolver.CompilationUnit);
+				if (name != null) {
+					//Console.WriteLine("Got subtype: " + name + "." + fieldReferenceExpression.FieldName);
+					string n = resolver.SearchNamespace(string.Concat(name, ".", fieldReferenceExpression.FieldName), null);
+					if (n != null) {
+						return new ReturnType(n);
+					}
+					//Console.WriteLine("Trying classes");
+					IClass c = resolver.SearchType(string.Concat(name, ".", fieldReferenceExpression.FieldName), resolver.CallingClass, resolver.CompilationUnit);
+					//IClass c = resolver.SearchType(string.Concat(name, ".", fieldReferenceExpression.FieldName),  resolver.CompilationUnit);
+					if (c != null) {
+						resolver.ShowStatic = true;
+						return new ReturnType(c.FullyQualifiedName);
+					}
+					
+					//FIXME?
+					try{
+						return new ReturnType(name + "." + fieldReferenceExpression.FieldName);
+					}catch(Exception ex){
+						return null;	
+					}
+				}
+				//Console.WriteLine("Trying Members");
+				return resolver.SearchMember(returnType, fieldReferenceExpression.FieldName);
+			}
+//			Console.WriteLine("returnType of child is null!");
+			return null;
+		}
+		
+		public override object Visit(IdentifierExpression identifierExpression, object data)
+		{
+			//Console.WriteLine("visiting IdentifierExpression");
+			if (identifierExpression == null) {
+				//Console.WriteLine("identifierExpression == null");
+				return null;
+			}
+			string name = resolver.SearchNamespace(identifierExpression.Identifier, resolver.CompilationUnit);
+			if (name != null) {
+				return new ReturnType(name);
+			}
+			//Console.WriteLine("no namespace found");
+			IClass c = resolver.SearchType(identifierExpression.Identifier, resolver.CallingClass, resolver.CompilationUnit);
+			if (c != null) {
+				resolver.ShowStatic = true;
+				return new ReturnType(c.FullyQualifiedName);
+			}
+			//Console.WriteLine("no type found");
+			return resolver.DynamicLookup(identifierExpression.Identifier);
+		}
+		
+		public override object Visit(TypeReferenceExpression typeReferenceExpression, object data)
+		{
+			return new ReturnType(typeReferenceExpression.TypeReference);
+		}
+		
+		public override object Visit(UnaryOperatorExpression unaryOperatorExpression, object data)
+		{
+			if (unaryOperatorExpression == null) {
+				return null;
+			}
+			ReturnType expressionType = unaryOperatorExpression.Expression.AcceptVisitor(this, data) as ReturnType;
+			// TODO: Little bug: unary operator MAY change the return type,
+			//                   but that is only a minor issue
+			switch (unaryOperatorExpression.Op) {
+				case UnaryOperatorType.Not:
+					break;
+				case UnaryOperatorType.BitNot:
+					break;
+				case UnaryOperatorType.Minus:
+					break;
+				case UnaryOperatorType.Plus:
+					break;
+				case UnaryOperatorType.Increment:
+				case UnaryOperatorType.PostIncrement:
+					break;
+				case UnaryOperatorType.Decrement:
+				case UnaryOperatorType.PostDecrement:
+					break;
+				case UnaryOperatorType.Star:       // dereference
+					--expressionType.PointerNestingLevel;
+					break;
+				case UnaryOperatorType.BitWiseAnd: // get reference
+					++expressionType.PointerNestingLevel; 
+					break;
+				case UnaryOperatorType.None:
+					break;
+			}
+			return expressionType;
+		}
+		
+		public override object Visit(AssignmentExpression assignmentExpression, object data)
+		{
+			return assignmentExpression.Left.AcceptVisitor(this, data);
+		}
+		
+		public override object Visit(GetTypeExpression getTypeExpression, object data)
+		{
+			return new ReturnType("System.Type");
+		}
+		
+		public override object Visit(TypeOfExpression typeOfExpression, object data)
+		{
+			return new ReturnType("System.Type");
+		}
+		
+		public override object Visit(AddressOfExpression addressOfExpression, object data)
+		{
+			// no calls allowed !!!
+			return null;
+		}
+		
+		public override object Visit(CastExpression castExpression, object data)
+		{
+			return new ReturnType(castExpression.CastTo.Type);
+		}
+		
+		public override object Visit(ThisReferenceExpression thisReferenceExpression, object data)
+		{
+			if (resolver.CallingClass == null) {
+				return null;
+			}
+			return new ReturnType(resolver.CallingClass.FullyQualifiedName);
+		}
+		
+		public override object Visit(ClassReferenceExpression classReferenceExpression, object data)
+		{
+			if (resolver.CallingClass == null) {
+				return null;
+			}
+			return new ReturnType(resolver.CallingClass.FullyQualifiedName);
+		}
+		
+		public override object Visit(BaseReferenceExpression baseReferenceExpression, object data)
+		{
+			if (resolver.CallingClass == null) {
+				return null;
+			}
+			IClass baseClass = resolver.BaseClass(resolver.CallingClass);
+			if (baseClass == null) {
+				return null;
+			}
+			return new ReturnType(baseClass.FullyQualifiedName);
+		}
+		
+		public override object Visit(ObjectCreateExpression objectCreateExpression, object data)
+		{
+			string name = resolver.SearchType(objectCreateExpression.CreateType.Type, resolver.CallingClass, resolver.CompilationUnit).FullyQualifiedName;
+			return new ReturnType(name, (int[])objectCreateExpression.CreateType.RankSpecifier.ToArray(typeof(int)), 0);
+		}
+		
+		public override object Visit(ArrayCreateExpression arrayCreateExpression, object data)
+		{
+			ReturnType type = new ReturnType(arrayCreateExpression.CreateType);
+			if (arrayCreateExpression.Parameters != null && arrayCreateExpression.Parameters.Count > 0) {
+				int[] newRank = new int[arrayCreateExpression.CreateType.RankSpecifier.Count + 1];
+				newRank[0] = arrayCreateExpression.Parameters.Count - 1;
+				for (int i = 0; i < type.ArrayDimensions.Length; ++i) {
+					newRank[i + 1] = type.ArrayDimensions[i];
+				}
+				Array.Copy(type.ArrayDimensions, 0, newRank, 1, type.ArrayDimensions.Length);
+				type.ArrayDimensions = newRank;
+			}
+			return type;
+		}
+		
+		public override object Visit(ArrayInitializerExpression arrayInitializerExpression, object data)
+		{
+			// no calls allowed !!!
+			return null;
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/VBNetVisitor.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/VBNetVisitor.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/VBNetVisitor.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,230 @@
+// created on 04.08.2003 at 17:49
+using System;
+using System.Drawing;
+using System.Diagnostics;
+using System.Collections;
+
+using RefParser = ICSharpCode.SharpRefactory.Parser.VB;
+using AST = ICSharpCode.SharpRefactory.Parser.AST.VB;
+using MonoDevelop.Internal.Parser;
+using VBBinding.Parser.SharpDevelopTree;
+
+namespace VBBinding.Parser
+{
+	public class Using : AbstractUsing
+	{
+	}
+	
+	public class VBNetVisitor : RefParser.AbstractASTVisitor
+	{
+		CompilationUnit cu = new CompilationUnit();
+		Stack currentNamespace = new Stack();
+		Stack currentClass = new Stack();
+		
+		public CompilationUnit Cu {
+			get {
+				return cu;
+			}
+		}
+		
+		public override object Visit(AST.CompilationUnit compilationUnit, object data)
+		{
+			//TODO: Imports, Comments
+			compilationUnit.AcceptChildren(this, data);
+			return cu;
+		}
+		
+		public override object Visit(AST.ImportsDeclaration usingDeclaration, object data)
+		{
+			Using u = new Using();
+			u.Usings.Add(usingDeclaration.Namespace);
+			cu.Usings.Add(u);
+			return data;
+		}
+		
+		public override object Visit(AST.ImportsAliasDeclaration usingAliasDeclaration, object data)
+		{
+			Using u = new Using();
+			u.Aliases[usingAliasDeclaration.Alias] = usingAliasDeclaration.Namespace;
+			cu.Usings.Add(u);
+			return data;
+		}
+		
+		AttributeSectionCollection VisitAttributes(ArrayList attributes)
+		{
+			// TODO Expressions???
+			AttributeSectionCollection result = new AttributeSectionCollection();
+			foreach (AST.AttributeSection section in attributes) {
+				AttributeCollection resultAttributes = new AttributeCollection();
+				foreach (AST.Attribute attribute in section.Attributes) {
+					IAttribute a = new ASTAttribute(attribute.Name, new ArrayList(attribute.PositionalArguments), new SortedList());
+					foreach (AST.NamedArgumentExpression n in attribute.NamedArguments) {
+						a.NamedArguments[n.Parametername] = n.Expression;
+					}
+				}
+				IAttributeSection s = new AttributeSection((AttributeTarget)Enum.Parse(typeof (AttributeTarget), section.AttributeTarget), resultAttributes);
+			}
+			return null;
+		}
+		
+//		ModifierEnum VisitModifier(ICSharpCode.SharpRefactory.Parser.Modifier m)
+//		{
+//			return (ModifierEnum)m;
+//		}
+		
+		public override object Visit(AST.NamespaceDeclaration namespaceDeclaration, object data)
+		{
+			string name;
+			if (currentNamespace.Count == 0) {
+				name = namespaceDeclaration.NameSpace;
+			} else {
+				name = String.Concat((string)currentNamespace.Peek(), '.', namespaceDeclaration.NameSpace);
+			}
+			currentNamespace.Push(name);
+			object ret = namespaceDeclaration.AcceptChildren(this, data);
+			currentNamespace.Pop();
+			return ret;
+		}
+		
+		ClassType TranslateClassType(RefParser.Types type)
+		{
+			switch (type) {
+				case RefParser.Types.Class:
+					return ClassType.Class;
+				case RefParser.Types.Enum:
+					return ClassType.Enum;
+				case RefParser.Types.Interface:
+					return ClassType.Interface;
+				case RefParser.Types.Structure:
+					return ClassType.Struct;
+			}
+			return ClassType.Class;
+		}
+		
+		public override object Visit(AST.TypeDeclaration typeDeclaration, object data)
+		{
+			DefaultRegion region = GetRegion(typeDeclaration.StartLocation, typeDeclaration.EndLocation);
+			Class c = new Class(cu, TranslateClassType(typeDeclaration.Type), typeDeclaration.Modifier, region);
+			if (currentClass.Count > 0) {
+				Class cur = ((Class)currentClass.Peek());
+				cur.InnerClasses.Add(c);
+				c.FullyQualifiedName = String.Concat(cur.FullyQualifiedName, '.', typeDeclaration.Name);
+			} else {
+				if (currentNamespace.Count == 0) {
+					c.FullyQualifiedName = typeDeclaration.Name;
+				} else {
+					c.FullyQualifiedName = String.Concat(currentNamespace.Peek(), '.', typeDeclaration.Name);
+				}
+				cu.Classes.Add(c);
+			}
+			if (typeDeclaration.BaseType != null) {
+				c.BaseTypes.Add(typeDeclaration.BaseType);
+			}
+			if (typeDeclaration.BaseInterfaces != null) {
+				foreach (AST.TypeReference type in typeDeclaration.BaseInterfaces) {
+					c.BaseTypes.Add(type.Type);
+				}
+			}
+			currentClass.Push(c);
+			object ret = typeDeclaration.AcceptChildren(this, data);
+			currentClass.Pop();
+			c.UpdateModifier();
+			return ret;
+		}
+		
+		DefaultRegion GetRegion(Point start, Point end)
+		{
+			return new DefaultRegion(start.Y, start.X, end.Y, end.X);
+		}
+		
+		public override object Visit(AST.MethodDeclaration methodDeclaration, object data)
+		{
+			DefaultRegion region     = GetRegion(methodDeclaration.StartLocation, methodDeclaration.EndLocation);
+			DefaultRegion bodyRegion = GetRegion(methodDeclaration.EndLocation,   methodDeclaration.Body != null ? methodDeclaration.Body.EndLocation : new Point(-1, -1));
+			
+			ReturnType type = methodDeclaration.TypeReference == null ? new ReturnType("System.Void") : new ReturnType(methodDeclaration.TypeReference);
+			Class c       = (Class)currentClass.Peek();
+			
+			
+			Method method = new Method(String.Concat(methodDeclaration.Name), type, methodDeclaration.Modifier, region, bodyRegion);
+			ParameterCollection parameters = new ParameterCollection();
+			if (methodDeclaration.Parameters != null) {
+				foreach (AST.ParameterDeclarationExpression par in methodDeclaration.Parameters) {
+					ReturnType parType = new ReturnType(par.TypeReference);
+					Parameter p = new Parameter(par.ParameterName, parType);
+					parameters.Add(p);
+				}
+			}
+			method.Parameters = parameters;
+			c.Methods.Add(method);
+			return null;
+		}
+		
+		public override object Visit(AST.ConstructorDeclaration constructorDeclaration, object data)
+		{
+			DefaultRegion region     = GetRegion(constructorDeclaration.StartLocation, constructorDeclaration.EndLocation);
+			DefaultRegion bodyRegion = GetRegion(constructorDeclaration.EndLocation, constructorDeclaration.Body != null ? constructorDeclaration.Body.EndLocation : new Point(-1, -1));
+			
+			Class c       = (Class)currentClass.Peek();
+			
+			Constructor constructor = new Constructor(constructorDeclaration.Modifier, region, bodyRegion);
+			ParameterCollection parameters = new ParameterCollection();
+			if (constructorDeclaration.Parameters != null) {
+				foreach (AST.ParameterDeclarationExpression par in constructorDeclaration.Parameters) {
+					ReturnType parType = new ReturnType(par.TypeReference);
+					Parameter p = new Parameter(par.ParameterName, parType);
+					parameters.Add(p);
+				}
+			}
+			constructor.Parameters = parameters;
+			c.Methods.Add(constructor);
+			return null;
+		}
+		
+		
+		public override object Visit(AST.FieldDeclaration fieldDeclaration, object data)
+		{
+			DefaultRegion region     = GetRegion(fieldDeclaration.StartLocation, fieldDeclaration.EndLocation);
+			Class c = (Class)currentClass.Peek();
+			if (currentClass.Count > 0) {
+				foreach (AST.VariableDeclaration field in fieldDeclaration.Fields) {
+					ReturnType type = null;
+					if (field.Type != null) {
+						type = new ReturnType(field.Type);
+					}
+					Field f = new Field(type, field.Name, fieldDeclaration.Modifier, region);
+					if (type == null) {
+						f.SetModifiers(ModifierEnum.Const | ModifierEnum.SpecialName);
+					}
+					c.Fields.Add(f);
+				}
+			}
+			return null;
+		}
+		
+		public override object Visit(AST.PropertyDeclaration propertyDeclaration, object data)
+		{
+			DefaultRegion region     = GetRegion(propertyDeclaration.StartLocation, propertyDeclaration.EndLocation);
+			DefaultRegion bodyRegion = GetRegion(propertyDeclaration.BodyStart,     propertyDeclaration.BodyEnd);
+			
+			ReturnType type = propertyDeclaration.TypeReference == null ? new ReturnType("System.Void") : new ReturnType(propertyDeclaration.TypeReference);
+			Class c = (Class)currentClass.Peek();
+			
+			Property property = new Property(propertyDeclaration.Name, type, propertyDeclaration.Modifier, region, bodyRegion);
+			c.Properties.Add(property);
+			return null;
+		}
+		
+		public override object Visit(AST.EventDeclaration eventDeclaration, object data)
+		{
+			DefaultRegion region     = GetRegion(eventDeclaration.StartLocation, eventDeclaration.EndLocation);
+			DefaultRegion bodyRegion = null;
+			
+			ReturnType type = eventDeclaration.TypeReference != null ? new ReturnType(eventDeclaration.TypeReference) : null;
+			Class c = (Class)currentClass.Peek();
+			Event e = new Event(eventDeclaration.Name, type, eventDeclaration.Modifier, region, bodyRegion);
+			c.Events.Add(e);
+			return null;
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Project/VBCompilerParameters.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Project/VBCompilerParameters.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Project/VBCompilerParameters.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,368 @@
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Markus Palme" email="MarkusPalme at gmx.de"/>
+//     <version value="$version"/>
+// </file>
+
+using System;
+using System.Xml;
+using System.Diagnostics;
+using System.ComponentModel;
+
+using MonoDevelop.Internal.Project;
+
+namespace VBBinding {
+	
+	public enum CompileTarget
+	{
+		Exe,
+		WinExe,
+		Library,
+		Module
+	};
+	
+	public enum VBCompiler {
+		Vbc,
+		Mbas
+	};
+	
+	public enum NetRuntime {
+		Mono,
+		MonoInterpreter,
+		MsNet
+	};
+	
+	/// <summary>
+	/// This class handles project specific compiler parameters
+	/// </summary>
+	public class VBCompilerParameters : AbstractProjectConfiguration
+	{
+		[XmlNodeName("CodeGeneration")]
+		class CodeGeneration 
+		{
+			[XmlAttribute("compilerversion")]
+			public string vbCompilerVersion = String.Empty;
+			
+			[XmlAttribute("runtime")]
+			public NetRuntime netRuntime         = NetRuntime.Mono;
+			
+			[XmlAttribute("compiler")]
+			public VBCompiler vbCompiler = VBCompiler.Mbas;
+			
+			[XmlAttribute("warninglevel")]
+			public int  warninglevel       = 4;
+			
+			[XmlAttribute("nowarn")]
+			public string noWarnings      = String.Empty;
+			
+			//[XmlAttribute("includedebuginformation")]
+			//public bool debugmode = false;
+			
+			[XmlAttribute("optimize")]
+			public bool optimize = true;
+			
+			[XmlAttribute("unsafecodeallowed")]
+			public bool unsafecode         = false;
+			
+			[XmlAttribute("generateoverflowchecks")]
+			public bool generateOverflowChecks = true;
+			
+			[XmlAttribute("rootnamespace")]
+			public string rootnamespace = String.Empty;
+			
+			[XmlAttribute("mainclass")]
+			public string mainclass = null;
+			
+			[XmlAttribute("target")]
+			public CompileTarget  compiletarget = CompileTarget.Exe;
+			
+			[XmlAttribute("definesymbols")]
+			public string definesymbols = String.Empty;
+			
+			[XmlAttribute("generatexmldocumentation")]
+			public bool generateXmlDocumentation = false;
+			
+			[XmlAttribute("optionexplicit")]
+			public bool optionExplicit = true;
+			
+			[XmlAttribute("optionstrict")]
+			public bool optionStrict = false;
+			
+			[ConvertToRelativePathAttribute()]
+			[XmlAttribute("win32Icon")]
+			public string win32Icon = String.Empty;
+			
+			[XmlAttribute("imports")]
+			public string imports = String.Empty;
+		}
+		
+		[XmlNodeName("Execution")]
+		class Execution
+		{
+			[XmlAttribute("consolepause")]
+			public bool pauseconsoleoutput = true;
+			
+			[XmlAttribute("commandlineparameters")]
+			public string commandLineParameters = String.Empty;
+			
+		}
+		
+		[XmlNodeName("VBDOC")]
+		class VBDOC
+		{
+			[XmlAttribute("outputfile")]
+			[ConvertToRelativePathAttribute()]
+			public string outputfile = String.Empty;
+			
+			[XmlAttribute("filestoparse")]
+			public string filestoparse = String.Empty;
+			
+			[XmlAttribute("commentprefix")]
+			public string commentprefix = "'";
+		}
+		
+		CodeGeneration codeGeneration = new CodeGeneration();
+		VBDOC		   vbdoc		  = new VBDOC();
+		Execution      execution      = new Execution();
+		
+		[Browsable(false)]
+		public string VBCompilerVersion
+		{
+			get {
+				return codeGeneration.vbCompilerVersion;
+			}
+			set {
+				codeGeneration.vbCompilerVersion = value;
+			}
+		} 
+		
+		[Browsable(false)]
+		public VBCompiler VBCompiler {
+			get {
+				return codeGeneration.vbCompiler;
+			}
+			set {
+				codeGeneration.vbCompiler = value;
+			}
+		}
+		
+		[Browsable(false)]
+		public NetRuntime NetRuntime {
+			get {
+				return codeGeneration.netRuntime;
+			}
+			set {
+				codeGeneration.netRuntime = value;
+			}
+		}
+		
+		public string CommandLineParameters
+		{
+			get {
+				return execution.commandLineParameters;
+			}
+			set {
+				execution.commandLineParameters = value;
+			}
+		}
+		public bool GenerateOverflowChecks
+		{
+			get {
+				return codeGeneration.generateOverflowChecks;
+			}
+			set {
+				codeGeneration.generateOverflowChecks = value;
+			}
+		}
+		
+		[DefaultValue(false)]
+//		[LocalizedProperty("${res:BackendBindings.CompilerOptions.CodeGeneration.UnsafeCode}",
+//		                   Category    = "${res:BackendBindings.CompilerOptions.CodeGeneration}",
+//		                   Description = "${res:BackendBindings.CompilerOptions.CodeGeneration.UnsafeCode.Description}")]
+		public bool UnsafeCode {
+			get {
+				return codeGeneration.unsafecode;
+			}
+			set {
+				codeGeneration.unsafecode = value;
+			}
+		}
+		
+		[DefaultValue(false)]
+//		[LocalizedProperty("${res:BackendBindings.CompilerOptions.CodeGeneration.GenerateXmlDocumentation}",
+//		                   Category    = "${res:BackendBindings.CompilerOptions.CodeGeneration}",
+//		                   Description = "${res:BackendBindings.CompilerOptions.CodeGeneration.GenerateXmlDocumentation.Description}")]
+		public bool GenerateXmlDocumentation {
+			get {
+				return codeGeneration.generateXmlDocumentation;
+			}
+			set {
+				codeGeneration.generateXmlDocumentation = value;
+			}
+		}
+		
+		
+		[DefaultValue(4)]
+//		[LocalizedProperty("${res:BackendBindings.CompilerOptions.WarningAndErrorCategory.WarningLevel}",
+//		                   Category    = "${res:BackendBindings.CompilerOptions.WarningAndErrorCategory}",
+//		                   Description = "${res:BackendBindings.CompilerOptions.WarningAndErrorCategory.WarningLevel.Description}")]
+		public int WarningLevel {
+			get {
+				return codeGeneration.warninglevel;
+			}
+			set {
+				codeGeneration.warninglevel = value;
+			}
+		}
+		
+		public string Imports
+		{
+			get {
+				return codeGeneration.imports;
+			}
+			set {
+				codeGeneration.imports = value;
+			}
+		}
+		
+		public string Win32Icon
+		{
+			get {
+				return codeGeneration.win32Icon;
+			}
+			set {
+				codeGeneration.win32Icon = value;
+			}
+		}
+		
+		public string RootNamespace
+		{
+			get {
+				return codeGeneration.rootnamespace;
+			}
+			set {
+				codeGeneration.rootnamespace = value;
+			}
+		}
+		
+		public string DefineSymbols
+		{
+			get {
+				return codeGeneration.definesymbols;
+			}
+			set {
+				codeGeneration.definesymbols = value;
+			}
+		}
+		
+		public bool PauseConsoleOutput
+		{
+			get {
+				return execution.pauseconsoleoutput;
+			}
+			set {
+				execution.pauseconsoleoutput = value;
+			}
+		}
+		
+		//public bool Debugmode
+		//{
+		//	get {
+		//		return codeGeneration.debugmode;
+		//	}
+		//	set {
+		//		codeGeneration.debugmode = value;
+		//	}
+		//}
+		
+		public bool Optimize
+		{
+			get {
+				return codeGeneration.optimize;
+			}
+			set {
+				codeGeneration.optimize = value;
+			}
+		}
+		
+		public string MainClass
+		{
+			get {
+				return codeGeneration.mainclass;
+			}
+			set {
+				codeGeneration.mainclass = value;
+			}
+		}
+		
+		public CompileTarget CompileTarget
+		{
+			get {
+				return codeGeneration.compiletarget;
+			}
+			set {
+				codeGeneration.compiletarget = value;
+			}
+		}
+		
+		public bool OptionExplicit
+		{
+			get {
+				return codeGeneration.optionExplicit;
+			}
+			set {
+				codeGeneration.optionExplicit = value;
+			}
+		}
+		
+		public bool OptionStrict
+		{
+			get {
+				return codeGeneration.optionStrict;
+			}
+			set {
+				codeGeneration.optionStrict = value;
+			}
+		}
+		
+		public string VBDOCOutputFile
+		{
+			get {
+				return vbdoc.outputfile;
+			}
+			set {
+				vbdoc.outputfile = value;
+			}
+		}
+		
+		public string[] VBDOCFiles
+		{
+			get {
+				return vbdoc.filestoparse.Split(';');
+			}
+			set {
+				vbdoc.filestoparse = System.String.Join(";", value);
+			}
+		}
+		
+		public string VBDOCCommentPrefix
+		{
+			get {
+				return vbdoc.commentprefix;
+			}
+			set {
+				vbdoc.commentprefix = value;
+			}
+		}
+		
+		public VBCompilerParameters()
+		{
+		}
+		
+		public VBCompilerParameters(string name)
+		{
+			this.name = name;
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Project/VBProject.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Project/VBProject.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Project/VBProject.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,80 @@
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Markus Palme" email="MarkusPalme at gmx.de"/>
+//     <version value="$version"/>
+// </file>
+
+using System;
+using System.IO;
+using System.Collections;
+using System.Diagnostics;
+using System.ComponentModel;
+using System.Xml;
+
+using MonoDevelop.Internal.Project;
+using MonoDevelop.Internal.Templates;
+
+namespace VBBinding
+{
+	/// <summary>
+	/// This class describes a VB.NET project and it compilation options.
+	/// </summary>
+	public class VBProject : AbstractProject
+	{		
+		public override string ProjectType {
+			get {
+				return VBLanguageBinding.LanguageName;
+			}
+		}
+		
+		public override IConfiguration CreateConfiguration()
+		{
+			return new VBCompilerParameters();
+		}
+		
+		public VBProject()
+		{
+		}
+		
+		public VBProject(ProjectCreateInformation info, XmlElement projectOptions)
+		{
+			if (info != null) {
+				Name              = info.ProjectName;
+				
+				//VBCompilerParameters debug = (VBCompilerParameters)CreateConfiguration("Debug");
+				//debug.Optimize = false;
+				//release.Debugmode=false;
+				//Configurations.Add(debug);
+				
+				VBCompilerParameters release = (VBCompilerParameters)CreateConfiguration("Release");
+				//release.Optimize = true;
+				//release.Debugmode = false;
+				//release.GenerateOverflowChecks = false;
+				//release.TreatWarningsAsErrors = false;
+				Configurations.Add(release);
+
+				XmlElement el = projectOptions;
+				
+				foreach (VBCompilerParameters parameter in Configurations) {
+					parameter.OutputDirectory = info.BinPath + Path.DirectorySeparatorChar + parameter.Name;
+					parameter.OutputAssembly  = Name;
+					
+					if (el != null) {
+						System.Console.WriteLine("ProjectOptions " + el.OuterXml);
+						if (el.Attributes["Target"] != null) {
+							parameter.CompileTarget = (CompileTarget)Enum.Parse(typeof(CompileTarget), el.Attributes["Target"].InnerText);
+						}
+						if (el.Attributes["PauseConsoleOutput"] != null) {
+							parameter.PauseConsoleOutput = Boolean.Parse(el.Attributes["PauseConsoleOutput"].InnerText);
+						}
+					}else{
+						System.Console.WriteLine("ProjectOptions XML is NULL!");
+					}
+				}
+			}else{
+				System.Console.WriteLine("NULL Projectinfo!");
+			}
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/ProjectNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/ProjectNodeBuilder.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/ProjectNodeBuilder.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,148 @@
+// created on 10/20/2004 at 10:29 AM
+
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
+//     <version value="$version"/>
+// </file>
+
+using System;
+using System.IO;
+using System.Diagnostics;
+using System.Collections;
+using System.Reflection;
+using System.Resources;
+using System.Xml;
+
+using MonoDevelop.Core.Properties;
+using MonoDevelop.Core.Services;
+using MonoDevelop.Internal.Project;
+using MonoDevelop.Gui;
+using MonoDevelop.Gui.Pads.ProjectBrowser;
+using MonoDevelop.Gui.Widgets;
+
+namespace VBBinding
+{
+	public class VBNodeBuilder : IProjectNodeBuilder
+	{
+		FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
+		IconService iconService = (IconService)ServiceManager.GetService(typeof(IconService));
+		
+		public bool CanBuildProjectTree(IProject project)
+		{
+			return project.ProjectType == VBLanguageBinding.LanguageName;
+		}
+		
+		public AbstractBrowserNode BuildProjectTreeNode(IProject project)
+		{
+			ProjectBrowserNode projectNode = new ProjectBrowserNode(project);
+			
+			//projectNode.IconImage = iconService.GetImageForProjectType(project.ProjectType);
+			
+			// create 'empty' directories			
+			for (int i = 0; i < project.ProjectFiles.Count; ++i) {
+				if (project.ProjectFiles[i].Subtype == Subtype.Directory) {
+					string directoryName   = fileUtilityService.AbsoluteToRelativePath(project.BaseDirectory, project.ProjectFiles[i].Name);
+
+					// if directoryname starts with ./ oder .\
+					if (directoryName.StartsWith(".")) {
+						directoryName =  directoryName.Substring(2);
+					}
+					
+					string parentDirectory = Path.GetFileName(directoryName);
+					
+					AbstractBrowserNode currentPathNode = GetPath(directoryName, projectNode, true);
+					
+					DirectoryNode newFolderNode  = new DirectoryNode(project.ProjectFiles[i].Name);
+					//newFolderNode.OpenedImage = resourceService.GetBitmap ("Icons.16x16.OpenFolderBitmap");
+					//newFolderNode.ClosedImage = resourceService.GetBitmap ("Icons.16x16.ClosedFolderBitmap");
+					
+					currentPathNode.Nodes.Add(newFolderNode);
+				
+				}
+			}
+			
+			// create file tree
+			for (int i = 0; i < project.ProjectFiles.Count; ++i) {
+				if (project.ProjectFiles[i].Subtype != Subtype.Directory) {
+					ProjectFile fileInformation = project.ProjectFiles[i];
+					
+					string relativeFile = fileUtilityService.AbsoluteToRelativePath(project.BaseDirectory, fileInformation.Name);
+					
+					string fileName     = Path.GetFileName(fileInformation.Name);
+					
+					switch (fileInformation.BuildAction) {
+						
+						case BuildAction.Exclude:
+							break;
+						
+						default:
+							AbstractBrowserNode currentPathNode = GetPath(relativeFile, projectNode, true);
+							
+							AbstractBrowserNode newNode = new FileNode(fileInformation);
+							newNode.ContextmenuAddinTreePath = FileNode.ProjectFileContextMenuPath;
+							currentPathNode.Nodes.Add(newNode);
+							break;
+					}
+				}
+			}
+			
+			return projectNode;
+		}
+
+		AbstractBrowserNode GetNodeFromCollection (TreeNodeCollection collection, string title)
+		{
+			foreach (AbstractBrowserNode node in collection) {
+				if (node.Text == title) {
+					return node;
+				}
+			}
+			return null;
+		}
+		
+		public AbstractBrowserNode GetPath(string filename, AbstractBrowserNode root, bool create)
+		{
+			string directory    = Path.GetDirectoryName(filename);
+			string[] treepath   = directory.Split(new char[] { Path.DirectorySeparatorChar });
+			AbstractBrowserNode curpathnode = root;
+			
+			foreach (string path in treepath) {
+				if (path.Length == 0 || path[0] == '.') {
+					continue;
+				}
+				
+				AbstractBrowserNode node = null;
+				//AbstractBrowserNode node = GetNodeFromCollection(curpathnode.Nodes, path);
+				
+				if (node == null) {
+					if (create) {
+						DirectoryNode newFolderNode  = new DirectoryNode(fileUtilityService.GetDirectoryNameWithSeparator(ConstructFolderName(curpathnode)) + path);
+						curpathnode.Nodes.Add(newFolderNode);
+						curpathnode = newFolderNode;
+						continue;
+					} else {
+						return null;
+					}
+				}
+				curpathnode = node;
+			}
+			
+			return curpathnode;
+		}
+		
+		public string ConstructFolderName(AbstractBrowserNode folderNode)
+		{
+			if (folderNode is DirectoryNode) {
+				return ((DirectoryNode)folderNode).FolderName;
+			}
+			
+			if (folderNode is ProjectBrowserNode) {
+				return ((ProjectBrowserNode)folderNode).Project.BaseDirectory;
+			}
+			
+			throw new ApplicationException("Folder name construction failed, got unexpected parent node :" +  folderNode);
+		}
+		
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/Makefile.am
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/Makefile.am	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/Makefile.am	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,130 @@
+CSC = mcs /debug
+
+FILES = \
+./src/AssemblyInfo.cs \
+./src/CodeDom/CodeDOMVisitor.cs \
+./src/CSharpConverter/CSharpVisitor.cs \
+./src/Lexer/Lexer.cs \
+./src/Lexer/Reader/FileReader.cs \
+./src/Lexer/Reader/IReader.cs \
+./src/Lexer/Reader/StringReader.cs \
+./src/Lexer/Specials/Comment.cs \
+./src/Lexer/Specials/CommentType.cs \
+./src/Lexer/Specials/NewLine.cs \
+./src/Lexer/Specials/PreProcessingDirective.cs \
+./src/Lexer/Specials/SpecialTracker.cs \
+./src/Lexer/Specials/TagComment.cs \
+./src/Main.cs \
+./src/Parser/AST/AbstractASTVisitor.cs \
+./src/Parser/AST/AbstractNode.cs \
+./src/Parser/AST/CompilationUnit.cs \
+./src/Parser/AST/Enums.cs \
+./src/Parser/AST/Expressions/AddressOfExpression.cs \
+./src/Parser/AST/Expressions/ArrayCreateExpression.cs \
+./src/Parser/AST/Expressions/ArrayInitializerExpression.cs \
+./src/Parser/AST/Expressions/AssignmentExpression.cs \
+./src/Parser/AST/Expressions/BaseReferenceExpression.cs \
+./src/Parser/AST/Expressions/BinaryOperatorExpression.cs \
+./src/Parser/AST/Expressions/CastExpression.cs \
+./src/Parser/AST/Expressions/ClassReferenceExpression.cs \
+./src/Parser/AST/Expressions/Expression.cs \
+./src/Parser/AST/Expressions/FieldReferenceOrInvocationExpression.cs \
+./src/Parser/AST/Expressions/GetTypeExpression.cs \
+./src/Parser/AST/Expressions/IdentifierExpression.cs \
+./src/Parser/AST/Expressions/InvocationExpression.cs \
+./src/Parser/AST/Expressions/LoopControlVariableExpression.cs \
+./src/Parser/AST/Expressions/NamedArgumentExpression.cs \
+./src/Parser/AST/Expressions/ObjectCreateExpression.cs \
+./src/Parser/AST/Expressions/ParameterDeclarationExpression.cs \
+./src/Parser/AST/Expressions/ParenthesizedExpression.cs \
+./src/Parser/AST/Expressions/PrimitiveExpression.cs \
+./src/Parser/AST/Expressions/StatementExpression.cs \
+./src/Parser/AST/Expressions/ThisReferenceExpression.cs \
+./src/Parser/AST/Expressions/TypeOfExpression.cs \
+./src/Parser/AST/Expressions/TypeReferenceExpression.cs \
+./src/Parser/AST/Expressions/UnaryOperatorExpression.cs \
+./src/Parser/AST/GlobalScope/AttributeDeclaration.cs \
+./src/Parser/AST/GlobalScope/DelegateDeclaration.cs \
+./src/Parser/AST/GlobalScope/ImportsAliasDeclaration.cs \
+./src/Parser/AST/GlobalScope/ImportsDeclaration.cs \
+./src/Parser/AST/GlobalScope/ImportsStatement.cs \
+./src/Parser/AST/GlobalScope/NamespaceDeclaration.cs \
+./src/Parser/AST/GlobalScope/OptionCompareDeclaration.cs \
+./src/Parser/AST/GlobalScope/OptionExplicitDeclaration.cs \
+./src/Parser/AST/GlobalScope/OptionStrictDeclaration.cs \
+./src/Parser/AST/GlobalScope/TypeDeclaration.cs \
+./src/Parser/AST/IASTVisitor.cs \
+./src/Parser/AST/INode.cs \
+./src/Parser/AST/LookupTableVisitor.cs \
+./src/Parser/AST/Modifier.cs \
+./src/Parser/AST/Statements/AddHandlerStatement.cs \
+./src/Parser/AST/Statements/BlockStatement.cs \
+./src/Parser/AST/Statements/DoLoopStatement.cs \
+./src/Parser/AST/Statements/EndStatement.cs \
+./src/Parser/AST/Statements/EraseStatements.cs \
+./src/Parser/AST/Statements/ErrorStatement.cs \
+./src/Parser/AST/Statements/ExitStatement.cs \
+./src/Parser/AST/Statements/ForeachStatement.cs \
+./src/Parser/AST/Statements/ForStatement.cs \
+./src/Parser/AST/Statements/GoToStatement.cs \
+./src/Parser/AST/Statements/IfStatement.cs \
+./src/Parser/AST/Statements/LabelStatement.cs \
+./src/Parser/AST/Statements/LocalVariableDeclaration.cs \
+./src/Parser/AST/Statements/LockStatement.cs \
+./src/Parser/AST/Statements/OnErrorStatement.cs \
+./src/Parser/AST/Statements/RaiseEventStatement.cs \
+./src/Parser/AST/Statements/ReDimStatement.cs \
+./src/Parser/AST/Statements/RemoveHandlerStatement.cs \
+./src/Parser/AST/Statements/ResumeStatement.cs \
+./src/Parser/AST/Statements/ReturnStatement.cs \
+./src/Parser/AST/Statements/SelectStatement.cs \
+./src/Parser/AST/Statements/Statement.cs \
+./src/Parser/AST/Statements/StopStatement.cs \
+./src/Parser/AST/Statements/ThrowStatement.cs \
+./src/Parser/AST/Statements/TryCatchStatement.cs \
+./src/Parser/AST/Statements/WhileStatement.cs \
+./src/Parser/AST/Statements/WithStatement.cs \
+./src/Parser/AST/TypeLevel/ConstructorDeclaration.cs \
+./src/Parser/AST/TypeLevel/DeclareDeclaration.cs \
+./src/Parser/AST/TypeLevel/EventDeclaration.cs \
+./src/Parser/AST/TypeLevel/FieldDeclaration.cs \
+./src/Parser/AST/TypeLevel/HandlesClause.cs \
+./src/Parser/AST/TypeLevel/ImplementsClause.cs \
+./src/Parser/AST/TypeLevel/MethodDeclaration.cs \
+./src/Parser/AST/TypeLevel/PropertyDeclaration.cs \
+./src/Parser/AST/TypeLevel/PropertyGetRegion.cs \
+./src/Parser/AST/TypeLevel/PropertySetRegion.cs \
+./src/Parser/AST/TypeLevel/TypeReference.cs \
+./src/Parser/AST/TypeLevel/VariableDeclaration.cs \
+./src/Parser/generated/Errors.cs \
+./src/Parser/generated/keywordlist/Keywords.cs \
+./src/Parser/generated/keywordlist/Tokens.cs \
+./src/Parser/generated/Modifiers.cs \
+./src/Parser/generated/ParamModifiers.cs \
+./src/Parser/generated/Parser.cs
+
+build_sources = $(addprefix $(srcdir)/, $(FILES))
+
+DLL = ICSharpCode.SharpRefactory.VB.dll
+
+REFS = /r:System.Drawing.dll
+
+all: $(DLL)
+
+$(DLL): $(FILES)
+	@ $(CSC) /out:$(DLL) /target:library $(REFS) $(build_sources) \
+	&& cp $(DLL) ../../../../../build/bin/.
+
+test-parser.exe : $(DLL) src/Main.cs
+	@ $(CSC) /out:$@ /r:$(DLL) src/Main.cs
+
+run : test-parser.exe
+	@ MONO_PATH=`dirname $(DLL)` $(RUNTIME) test-parser.exe $(TEST_SOURCE)
+
+assemblydir = $(libdir)/monodevelop/bin
+assembly_DATA = $(DLL)
+
+CLEANFILES = $(DLL) $(DLL).mdb
+
+EXTRA_DIST = $(FILES)
+

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/SharpRefactoryVB.cmbx
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/SharpRefactoryVB.cmbx	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/SharpRefactoryVB.cmbx	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,16 @@
+<Combine fileversion="1.0" name="SharpRefactoryVB" description="">
+  <StartMode startupentry="SharpRefactoryVB" single="True">
+    <Execute entry="SharpRefactoryVB" type="None" />
+  </StartMode>
+  <Entries>
+    <Entry filename=".\src\SharpRefactory.prjx" />
+  </Entries>
+  <Configurations active="Debug">
+    <Configuration name="Release">
+      <Entry name="SharpRefactoryVB" configurationname="Debug" build="False" />
+    </Configuration>
+    <Configuration name="Debug">
+      <Entry name="SharpRefactoryVB" configurationname="Debug" build="False" />
+    </Configuration>
+  </Configurations>
+</Combine>
\ No newline at end of file

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/SharpRefactoryVB.prjx
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/SharpRefactoryVB.prjx	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/SharpRefactoryVB.prjx	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,22 @@
+<Project name="SharpRefactoryVB" description="" newfilesearch="None" enableviewstate="True" version="1.1" projecttype="C#">
+  <Contents />
+  <References />
+  <DeploymentInformation target="" script="" strategy="File" />
+  <Configuration runwithwarnings="False" name="Debug">
+    <CodeGeneration runtime="MsNet" compiler="Csc" warninglevel="4" nowarn="" includedebuginformation="True" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="Exe" definesymbols="" generatexmldocumentation="False" win32Icon="" />
+    <Execution commandlineparameters="" consolepause="True" />
+    <Output directory="./bin/Debug" assembly="SharpRefactoryVB" executeScript="" executeBeforeBuild="" executeAfterBuild="" />
+  </Configuration>
+  <Configurations active="Debug">
+    <Configuration runwithwarnings="False" name="Debug">
+      <CodeGeneration runtime="MsNet" compiler="Csc" warninglevel="4" nowarn="" includedebuginformation="True" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="Exe" definesymbols="" generatexmldocumentation="False" win32Icon="" />
+      <Execution commandlineparameters="" consolepause="True" />
+      <Output directory="./bin/Debug" assembly="SharpRefactoryVB" executeScript="" executeBeforeBuild="" executeAfterBuild="" />
+    </Configuration>
+    <Configuration runwithwarnings="False" name="Release">
+      <CodeGeneration runtime="MsNet" compiler="Csc" warninglevel="4" nowarn="" includedebuginformation="True" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="Exe" definesymbols="" generatexmldocumentation="False" win32Icon="" />
+      <Execution commandlineparameters="" consolepause="True" />
+      <Output directory="./bin/Release" assembly="SharpRefactoryVB" executeScript="" executeBeforeBuild="" executeAfterBuild="" />
+    </Configuration>
+  </Configurations>
+</Project>
\ No newline at end of file

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/AssemblyInfo.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/AssemblyInfo.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/AssemblyInfo.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: System.CLSCompliantAttribute(true)]
+
+// Information about this assembly is defined by the following
+// attributes.
+//
+// change them to the information which is associated with the assembly
+// you compile.
+[assembly: AssemblyTitle("SharpRefactoryVB")]
+[assembly: AssemblyDescription("Parser for VB.NET")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("Markus Palme, Andrea Paatz, Mike Krueger, Levi Bard")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has following format :
+//
+// Major.Minor.Build.Revision
+//
+// You can specify all values by your own or you can build default build and revision
+// numbers with the '*' character (the default):
+
+[assembly: AssemblyVersion("1.0.1.1649")]
+
+// The following attributes specify the key for the sign of your assembly. See the
+// .NET Framework documentation for more information about signing.
+// This is not required, if you don't want signing let these attributes like they're.
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/CSharpConverter/CSharpVisitor.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/CSharpConverter/CSharpVisitor.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/CSharpConverter/CSharpVisitor.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,1861 @@
+// CSharpVisitor.cs
+// Copyright (C) 2004 Markus Palme (markuspalme at gmx.de)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Reflection;
+using System.CodeDom;
+using System.Text;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+
+namespace ICSharpCode.SharpRefactory.PrettyPrinter.VB
+{
+	public class CSharpVisitor : IASTVisitor
+	{
+		readonly string newLineSep  = Environment.NewLine;
+		StringBuilder   sourceText  = new StringBuilder();
+		int             indentLevel = 0;
+		Errors          errors      = new Errors();
+		TypeDeclaration currentType = null;		
+		Stack   withExpressionStack = new Stack();
+		
+		public StringBuilder SourceText {
+			get {
+				return sourceText;
+			}
+		}
+		
+		public void AppendIndentation()
+		{
+			for (int i = 0; i < indentLevel; ++i) {
+				sourceText.Append("\t");
+			}
+		}
+		
+		public void AppendNewLine()
+		{
+			sourceText.Append(newLineSep);
+		}
+		
+		public void AppendStatementEnd()
+		{
+			sourceText.Append(";");
+			AppendNewLine();
+		}
+		
+		void DebugOutput(object o)
+		{
+//			Console.WriteLine(o.ToString());
+		}
+		
+		#region ICSharpCode.SharpRefactory.Parser.VB.IASTVisitor interface implementation
+		public object Visit(INode node, object data)
+		{
+			AppendIndentation();
+			sourceText.Append("// warning visited unknown node :");
+			sourceText.Append(node);
+			AppendNewLine();
+			return String.Empty;
+		}
+		
+		public object Visit(CompilationUnit compilationUnit, object data)
+		{
+			DebugOutput(compilationUnit);
+			compilationUnit.AcceptChildren(this, data);
+			return null;
+		}
+		
+#region GlobalScope
+		public object Visit(NamespaceDeclaration namespaceDeclaration, object data)
+		{
+			DebugOutput(namespaceDeclaration);
+			AppendIndentation();
+			sourceText.Append("namespace ");
+			sourceText.Append(namespaceDeclaration.NameSpace);
+			AppendNewLine();
+			sourceText.Append("{");
+			AppendNewLine();
+			++indentLevel;
+			namespaceDeclaration.AcceptChildren(this, data);
+			--indentLevel;
+			AppendIndentation();
+			sourceText.Append("}");
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(ImportsStatement importsStatement, object data)
+		{
+			foreach (INode node in importsStatement.ImportClauses) {
+				node.AcceptVisitor(this, data);
+			}
+			return null;
+		}
+		
+		
+		public object Visit(ImportsDeclaration importsDeclaration, object data)
+		{
+			DebugOutput(importsDeclaration);
+			AppendIndentation();
+			sourceText.Append("using ");
+			sourceText.Append(importsDeclaration.Namespace);
+			sourceText.Append(";");
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(ImportsAliasDeclaration importsAliasDeclaration, object data)
+		{
+			DebugOutput(importsAliasDeclaration);
+			AppendIndentation();
+			sourceText.Append("using ");
+			sourceText.Append(importsAliasDeclaration.Alias);
+			sourceText.Append(" = ");
+			sourceText.Append(importsAliasDeclaration.Namespace);
+			sourceText.Append(";");
+			AppendNewLine();
+			return null;
+		}
+		
+		
+		public object Visit(TypeDeclaration typeDeclaration, object data)
+		{
+			DebugOutput(typeDeclaration);
+			AppendAttributes(typeDeclaration.Attributes);
+			string modifier =  GetModifier(typeDeclaration.Modifier);
+			string type = String.Empty;
+			
+			switch (typeDeclaration.Type) {
+				case Types.Class:
+					type = "class ";
+					break;
+				case Types.Enum:
+					type = "enum ";
+					break;
+				case Types.Interface:
+					type = "interface ";
+					break;
+				case Types.Module:
+				case Types.Structure:
+					type = "struct ";
+					break;
+			}
+			AppendIndentation();
+			sourceText.Append(modifier);
+			sourceText.Append(type);
+			sourceText.Append(typeDeclaration.Name);
+			
+			bool hasBaseType = typeDeclaration.BaseType != null;
+			if (hasBaseType) {
+				sourceText.Append(" : "); 
+				sourceText.Append(ConvertTypeString(typeDeclaration.BaseType)); 
+			}
+			
+			if (typeDeclaration.BaseInterfaces != null && typeDeclaration.BaseInterfaces.Count > 0) {
+				if (!hasBaseType) {
+					sourceText.Append(" : "); 
+				} else {
+					sourceText.Append(", "); 
+				}
+				for (int i = 0; i < typeDeclaration.BaseInterfaces.Count; ++i) {
+					if (typeDeclaration.BaseInterfaces[i] is TypeReference) {
+						sourceText.Append((typeDeclaration.BaseInterfaces[i] as TypeReference).Type);
+					} else {
+						sourceText.Append(typeDeclaration.BaseInterfaces[i].ToString());
+					}
+					if (i + 1 < typeDeclaration.BaseInterfaces.Count) {
+						sourceText.Append(", "); 
+					}
+				}
+			}
+			AppendNewLine();
+			AppendIndentation();
+			sourceText.Append("{");
+			AppendNewLine();
+			++indentLevel;
+			TypeDeclaration oldType = currentType;
+			currentType = typeDeclaration;
+			typeDeclaration.AcceptChildren(this, data);
+			currentType = oldType;
+			--indentLevel;
+			AppendIndentation();
+			sourceText.Append("}");
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(DelegateDeclaration delegateDeclaration, object data)
+		{
+			DebugOutput(delegateDeclaration);
+			AppendAttributes(delegateDeclaration.Attributes);
+			AppendIndentation();
+			sourceText.Append(GetModifier(delegateDeclaration.Modifier));
+			sourceText.Append("delegate ");
+			sourceText.Append(GetTypeString(delegateDeclaration.ReturnType));
+			sourceText.Append(" ");
+			sourceText.Append(delegateDeclaration.Name);
+			sourceText.Append("(");
+			AppendParameters(delegateDeclaration.Parameters);
+			sourceText.Append(");");
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(EventDeclaration eventDeclaration, object data)
+		{
+			DebugOutput(eventDeclaration);
+			AppendAttributes(eventDeclaration.Attributes);
+			AppendIndentation();
+			sourceText.Append(GetModifier(eventDeclaration.Modifier));
+			sourceText.Append("event ");
+			
+			if (eventDeclaration.TypeReference == null) {
+				sourceText.Append(eventDeclaration.Name);
+				sourceText.Append("EventHandler");
+			} else {
+				sourceText.Append(GetTypeString(eventDeclaration.TypeReference));
+			}
+			sourceText.Append(" ");
+			sourceText.Append(eventDeclaration.Name);
+			sourceText.Append(";");
+			AppendNewLine();
+			return null;
+		}
+#endregion
+
+#region TypeLevel
+		public object Visit(VariableDeclaration variableDeclaration, object data)
+		{
+			// called inside ENUMS
+//			AppendAttributes(field.Attributes);
+			AppendIndentation();
+			sourceText.Append(variableDeclaration.Name);
+			if (variableDeclaration.Initializer != null) {
+				sourceText.Append(" = ");
+				sourceText.Append(variableDeclaration.Initializer.AcceptVisitor(this, data));
+			}
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(FieldDeclaration fieldDeclaration, object data)
+		{
+			DebugOutput(fieldDeclaration);
+			
+			foreach (VariableDeclaration field in fieldDeclaration.Fields) {
+				AppendAttributes(fieldDeclaration.Attributes);
+				AppendIndentation();
+				if (currentType.Type == Types.Enum) {
+					if (fieldDeclaration.Fields.IndexOf(field) > 0) {
+						sourceText.Append(", ");
+					}
+					sourceText.Append(field.Name);
+					if (field.Initializer != null) {
+						sourceText.Append(" = ");
+						sourceText.Append(field.Initializer.AcceptVisitor(this, data).ToString());
+					}
+				} else {
+					if (fieldDeclaration.Modifier == Modifier.None) {
+						sourceText.Append(" private ");
+					} else {
+						sourceText.Append(GetModifier(fieldDeclaration.Modifier));
+					}
+					if (field.Type == null)
+						sourceText.Append("object");
+					else	
+						sourceText.Append(GetTypeString(field.Type));
+					sourceText.Append(" ");
+					sourceText.Append(field.Name);
+					if (field.Initializer != null) {
+						sourceText.Append(" = ");
+						sourceText.Append(field.Initializer.AcceptVisitor(this, data).ToString());
+					} else {
+						if (field.Type != null && field.Type.Dimension != null) {
+							sourceText.Append(" = new ");
+							sourceText.Append(ConvertTypeString(field.Type.Type));
+							sourceText.Append("[");
+							sourceText.Append(GetExpressionList(field.Type.Dimension));
+							sourceText.Append("]");
+						}
+					}
+					sourceText.Append(";");
+					AppendNewLine();
+				}
+			}
+			
+			// if that's not the last enum member, add a comma
+			if (currentType.Type == Types.Enum) {
+				int pos = currentType.Children.IndexOf(fieldDeclaration);
+				if (pos >= 0) {
+					for (int i = pos+1; i < currentType.Children.Count; i++) {
+						if (currentType.Children[i] is FieldDeclaration) {
+							sourceText.Append(",");
+							break;
+						}
+					}
+				}
+				AppendNewLine();
+			}
+			return null;
+		}
+		
+		public object Visit(MethodDeclaration methodDeclaration, object data)
+		{
+			DebugOutput(methodDeclaration);
+			exitConstructStack.Push(new DictionaryEntry(typeof(MethodDeclaration), null));
+			
+			AppendNewLine();
+			AppendAttributes(methodDeclaration.Attributes);
+			AppendIndentation();
+			sourceText.Append(GetModifier(methodDeclaration.Modifier));
+			sourceText.Append(GetTypeString(methodDeclaration.TypeReference));
+			sourceText.Append(" ");
+			sourceText.Append(methodDeclaration.Name);
+			sourceText.Append("(");
+			AppendParameters(methodDeclaration.Parameters);
+			sourceText.Append(")");
+			
+			if (currentType.Type != Types.Interface &&
+				(methodDeclaration.Modifier & Modifier.MustOverride) != Modifier.MustOverride)
+			{
+				AppendNewLine();
+				AppendIndentation();
+				sourceText.Append("{");
+				AppendNewLine();
+				if (methodDeclaration.Body != null) {
+					++indentLevel;
+					methodDeclaration.Body.AcceptVisitor(this, data);
+					GenerateExitConstructLabel();
+					--indentLevel;
+				}
+				AppendIndentation();
+				sourceText.Append("}");
+			} else {
+				sourceText.Append(";");
+			}
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(ConstructorDeclaration constructorDeclaration, object data)
+		{
+			DebugOutput(constructorDeclaration);
+			exitConstructStack.Push(new DictionaryEntry(typeof(MethodDeclaration), null));
+			AppendNewLine();
+			AppendAttributes(constructorDeclaration.Attributes);
+			AppendIndentation();
+			sourceText.Append(GetModifier(constructorDeclaration.Modifier));
+			sourceText.Append(this.currentType.Name);
+			sourceText.Append("(");
+			AppendParameters(constructorDeclaration.Parameters);
+			sourceText.Append(")");
+			
+			AppendNewLine();
+			AppendIndentation();
+			sourceText.Append("{");
+			AppendNewLine();
+			if (constructorDeclaration.Body != null) {
+				++indentLevel;
+				constructorDeclaration.Body.AcceptVisitor(this, data);
+				GenerateExitConstructLabel();
+				--indentLevel;
+			}
+			AppendIndentation();
+			sourceText.Append("}");
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(DeclareDeclaration declareDeclaration, object data)
+		{
+			DebugOutput(declareDeclaration);
+			AppendAttributes(declareDeclaration.Attributes);
+			AppendIndentation();
+			sourceText.Append(String.Format("[System.Runtime.InteropServices.DllImport({0}", declareDeclaration.Library));
+			if (declareDeclaration.Alias != null) {
+				sourceText.Append(String.Format(", EntryPoint={0}", declareDeclaration.Alias));
+			}
+			
+			switch (declareDeclaration.Charset) {
+				case CharsetModifier.ANSI:
+					sourceText.Append(", CharSet=System.Runtime.InteropServices.CharSet.Ansi");
+					break;
+				case CharsetModifier.Unicode:
+					sourceText.Append(", CharSet=System.Runtime.InteropServices.CharSet.Unicode");
+					break;
+				case CharsetModifier.Auto:
+					sourceText.Append(", CharSet=System.Runtime.InteropServices.CharSet.Auto");
+					break;
+			}
+			
+			sourceText.Append(")]");
+			AppendNewLine();
+			AppendIndentation();
+			sourceText.Append(GetModifier(declareDeclaration.Modifier));
+			sourceText.Append("static extern ");
+			sourceText.Append(GetTypeString(declareDeclaration.ReturnType));
+			sourceText.Append(" ");
+			sourceText.Append(declareDeclaration.Name);
+			sourceText.Append("(");
+			AppendParameters(declareDeclaration.Parameters);
+			sourceText.Append(");");
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(PropertyDeclaration propertyDeclaration, object data)
+		{
+			DebugOutput(propertyDeclaration);
+			AppendNewLine();
+			AppendAttributes(propertyDeclaration.Attributes);
+			AppendIndentation();
+			sourceText.Append(GetModifier(propertyDeclaration.Modifier & ~Modifier.ReadOnly));
+			
+			sourceText.Append(GetTypeString(propertyDeclaration.TypeReference));
+			sourceText.Append(" ");
+			sourceText.Append(propertyDeclaration.Name);
+			sourceText.Append(" {");
+			AppendNewLine();
+			
+			if (currentType.Type != Types.Interface) {
+				if (propertyDeclaration.GetRegion != null) {
+					++indentLevel;
+					propertyDeclaration.GetRegion.AcceptVisitor(this, data);
+					--indentLevel;
+				}
+				
+				if (propertyDeclaration.SetRegion != null) {
+					++indentLevel;
+					propertyDeclaration.SetRegion.AcceptVisitor(this, data);
+					--indentLevel;
+				}
+				
+			}
+			// if abstract, add default get/set
+			if ((propertyDeclaration.Modifier & Modifier.MustOverride) == Modifier.MustOverride &&
+			    propertyDeclaration.GetRegion == null &&
+			    propertyDeclaration.SetRegion == null) {
+				AppendIndentation();
+				sourceText.Append("get;");
+				AppendNewLine();
+				AppendIndentation();
+				sourceText.Append("set;");
+				AppendNewLine();
+			}			
+			AppendIndentation();
+			sourceText.Append("}");
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(PropertyGetRegion propertyGetRegion, object data)
+		{
+			DebugOutput(propertyGetRegion);
+			exitConstructStack.Push(new DictionaryEntry(typeof(PropertyDeclaration), null));
+			AppendAttributes(propertyGetRegion.Attributes);
+			AppendIndentation();
+			sourceText.Append("get {");
+			AppendNewLine();
+			if (propertyGetRegion.Block != null) {
+				++indentLevel;
+				propertyGetRegion.Block.AcceptVisitor(this, data);
+				--indentLevel;
+			} 
+			AppendIndentation();
+			sourceText.Append("}");
+			AppendNewLine();
+			GenerateExitConstructLabel();
+			return null;
+		}
+		
+		public object Visit(PropertySetRegion propertySetRegion, object data)
+		{
+			DebugOutput(propertySetRegion);
+			exitConstructStack.Push(new DictionaryEntry(typeof(PropertyDeclaration), null));
+			AppendAttributes(propertySetRegion.Attributes);
+			AppendIndentation();
+			sourceText.Append("set {");
+			AppendNewLine();
+			if (propertySetRegion.Block != null) {
+				++indentLevel;
+				propertySetRegion.Block.AcceptVisitor(this, data);
+				--indentLevel;
+			}
+			AppendIndentation();
+			sourceText.Append("}");
+			AppendNewLine();
+			GenerateExitConstructLabel();
+			return null;
+		}
+		
+		public object Visit(TypeReference typeReference, object data)
+		{
+			return ConvertTypeString(typeReference.Type);
+		}
+#endregion
+
+#region Statements
+		public object Visit(Statement statement, object data)
+		{
+			AppendIndentation();
+			sourceText.Append("// warning visited unknown statment :");
+			sourceText.Append(statement);
+			AppendNewLine();
+			return String.Empty;
+		}
+		
+		public object Visit(BlockStatement blockStatement, object data)
+		{
+			DebugOutput(blockStatement);
+			blockStatement.AcceptChildren(this, data);
+			return null;
+		}
+		
+		public object Visit(StatementExpression statementExpression, object data)
+		{
+			DebugOutput(statementExpression);
+			AppendIndentation();
+			if (statementExpression.Expression == null) {
+				sourceText.Append("// warning got empty statement expression :");
+				sourceText.Append(statementExpression);
+			} else {
+				sourceText.Append(statementExpression.Expression.AcceptVisitor(this, data).ToString());
+				sourceText.Append(";");
+			}
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(LocalVariableDeclaration localVariableDeclaration, object data)
+		{
+			DebugOutput(localVariableDeclaration);
+			for (int i = 0; i < localVariableDeclaration.Variables.Count; ++i) {
+				VariableDeclaration localVar = (VariableDeclaration)localVariableDeclaration.Variables[i];
+				AppendIndentation();
+				sourceText.Append(GetModifier(localVariableDeclaration.Modifier));
+				ArrayCreateExpression ace = localVar.Initializer as ArrayCreateExpression;
+				if (ace != null && (ace.ArrayInitializer == null || ace.ArrayInitializer.CreateExpressions == null)) {
+					sourceText.Append(ConvertTypeString(ace.CreateType.Type));
+					sourceText.Append(" ");
+					sourceText.Append(localVar.Name);
+					sourceText.Append("[");
+					sourceText.Append(GetExpressionList(ace.Parameters));
+					sourceText.Append("]");
+					
+				} else {
+					if (localVar.Type == null) {
+						bool foundType = false;
+						for (int j = i + 1; j < localVariableDeclaration.Variables.Count; ++j) {
+							VariableDeclaration nextLocalVar = (VariableDeclaration)localVariableDeclaration.Variables[j];
+							if (nextLocalVar.Type != null) {
+								sourceText.Append(GetTypeString(nextLocalVar.Type));
+								foundType = true;
+								break;
+							}
+						}
+						if (!foundType) {
+							sourceText.Append("object");
+						}
+					} else {
+						sourceText.Append(GetTypeString(localVar.Type));
+					}
+					sourceText.Append(" ");
+					sourceText.Append(localVar.Name);
+					if (localVar.Initializer != null) {
+						sourceText.Append(" = ");
+						sourceText.Append(localVar.Initializer.AcceptVisitor(this, data).ToString());
+					} else {
+						if (localVar.Type != null && localVar.Type.Dimension != null) {
+							sourceText.Append(" = new ");
+							sourceText.Append(ConvertTypeString(localVar.Type.Type));
+							sourceText.Append("[");
+							sourceText.Append(GetExpressionList(localVar.Type.Dimension));
+							sourceText.Append("]");
+						}
+					}
+				}
+				sourceText.Append(";");
+				AppendNewLine();
+			}
+			return null;
+		}
+		
+		public object Visit(SimpleIfStatement ifStatement, object data)
+		{
+			AppendIndentation();
+			sourceText.Append("if (");
+			sourceText.Append(ifStatement.Condition.AcceptVisitor(this, data).ToString());
+			sourceText.Append(") {");
+			AppendNewLine();
+			++indentLevel;
+			foreach(Statement statement in ifStatement.Statements) {
+				statement.AcceptVisitor(this, data);
+			}
+			--indentLevel;
+			AppendIndentation();
+			sourceText.Append("}");
+			
+			if(ifStatement.ElseStatements != null && ifStatement.ElseStatements.Count > 0) {
+				sourceText.Append(" else {");
+				AppendNewLine();
+				++indentLevel;
+				foreach(Statement statement in ifStatement.ElseStatements) {
+					statement.AcceptVisitor(this, data);
+				}
+				--indentLevel;
+				AppendIndentation();
+				sourceText.Append("}");
+			}
+			
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(IfStatement ifStatement, object data)
+		{
+			DebugOutput(ifStatement);
+			AppendIndentation();
+			sourceText.Append("if (");
+			sourceText.Append(ifStatement.Condition.AcceptVisitor(this, data).ToString());
+			sourceText.Append(") {");
+			AppendNewLine();
+			++indentLevel;
+			ifStatement.EmbeddedStatement.AcceptVisitor(this, data);
+			--indentLevel;
+			
+			AppendIndentation();
+			sourceText.Append("}");
+			
+			if (ifStatement.ElseIfStatements != null) {
+				foreach (ElseIfSection elseIfSection in ifStatement.ElseIfStatements) {
+					sourceText.Append(" else if (");
+					sourceText.Append(elseIfSection.Condition.AcceptVisitor(this, data).ToString());
+					sourceText.Append(") {");
+					AppendNewLine();
+					++indentLevel;
+					elseIfSection.EmbeddedStatement.AcceptVisitor(this, data);
+					--indentLevel;
+					AppendIndentation();
+					sourceText.Append("}");
+				}
+			}
+			
+			if (ifStatement.EmbeddedElseStatement != null) {
+				sourceText.Append(" else {");
+				AppendNewLine();
+				++indentLevel;
+				ifStatement.EmbeddedElseStatement.AcceptVisitor(this, data);
+				--indentLevel;
+				AppendIndentation();
+				sourceText.Append("}");
+			}
+			
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(LabelStatement labelStatement, object data)
+		{
+			DebugOutput(labelStatement);
+			AppendIndentation();
+			sourceText.Append(labelStatement.Label);
+			sourceText.Append(":");
+			AppendNewLine();
+			if (labelStatement.EmbeddedStatement != null) {
+				labelStatement.EmbeddedStatement.AcceptVisitor(this, data);
+			}
+			return null;
+		}
+		
+		public object Visit(GoToStatement goToStatement, object data)
+		{
+			DebugOutput(goToStatement);
+			AppendIndentation();
+			sourceText.Append("goto");
+			sourceText.Append(goToStatement.LabelName);
+			sourceText.Append(";");
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(SelectStatement selectStatement, object data)
+		{
+			DebugOutput(selectStatement);
+			exitConstructStack.Push(new DictionaryEntry(typeof(SelectStatement), null));
+			string selectExpression = selectStatement.SelectExpression.AcceptVisitor(this, data).ToString();
+			AppendIndentation();
+			for (int j = 0; j < selectStatement.SelectSections.Count; ++j) {
+				SelectSection selectSection = (SelectSection)selectStatement.SelectSections[j];
+				if (selectSection.CaseClauses.Count == 1 && ((CaseClause)selectSection.CaseClauses[0]).IsDefaultCase) {
+					sourceText.Append("{");
+				} else {
+					sourceText.Append("if (");
+					for (int i = 0; i < selectSection.CaseClauses.Count; ++i) {
+						CaseClause caseClause = (CaseClause)selectSection.CaseClauses[i];
+						if (caseClause.BoundaryExpression != null) {
+							sourceText.Append(caseClause.ComparisonExpression.AcceptVisitor(this, data));
+							sourceText.Append(" <= ");
+							sourceText.Append(selectExpression);
+							sourceText.Append(" && ");
+							sourceText.Append(selectExpression);
+							sourceText.Append(" <= ");
+							sourceText.Append(caseClause.BoundaryExpression.AcceptVisitor(this, data));
+						} else {
+							if (caseClause.ComparisonExpression != null) {
+								sourceText.Append(selectExpression);
+								sourceText.Append(" == ");
+								sourceText.Append(caseClause.ComparisonExpression.AcceptVisitor(this, data));
+							} else {
+								// dummy default should never evaluate (only for default case)
+								sourceText.Append(" true ");
+							}
+						}
+						if (i + 1 < selectSection.CaseClauses.Count) {
+							sourceText.Append(" || ");
+						}
+					}
+					sourceText.Append(") {");
+				}
+				AppendNewLine();
+				++indentLevel;
+				selectSection.EmbeddedStatement.AcceptChildren(this, data);
+				--indentLevel;
+				AppendIndentation();
+				sourceText.Append("}");
+				if (j + 1 < selectStatement.SelectSections.Count) {
+					sourceText.Append(" else ");
+				} 
+			}
+			AppendNewLine();
+			GenerateExitConstructLabel();
+			return null;
+		}
+		
+		public object Visit(StopStatement stopStatement, object data)
+		{
+			DebugOutput(stopStatement);
+			AppendIndentation();
+			sourceText.Append("Debugger.Break();");
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(ResumeStatement resumeStatement, object data)
+		{
+			DebugOutput(resumeStatement);
+			AppendIndentation();
+			sourceText.Append("// TODO: NotImplemented statement: ");
+			sourceText.Append(resumeStatement);
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(EraseStatement eraseStatement, object data)
+		{
+			DebugOutput(eraseStatement);
+			AppendIndentation();
+			sourceText.Append("// TODO: NotImplemented statement: ");
+			sourceText.Append(eraseStatement);
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(ErrorStatement errorStatement, object data)
+		{
+			DebugOutput(errorStatement);
+			AppendIndentation();
+			sourceText.Append("// TODO: NotImplemented statement: ");
+			sourceText.Append(errorStatement);
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(OnErrorStatement onErrorStatement, object data)
+		{
+			DebugOutput(onErrorStatement);
+			AppendIndentation();
+			sourceText.Append("// TODO: NotImplemented statement: ");
+			sourceText.Append(onErrorStatement);
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(ReDimStatement reDimStatement, object data)
+		{
+			DebugOutput(reDimStatement);
+			AppendIndentation();
+			sourceText.Append("// TODO: NotImplemented statement: ");
+			sourceText.Append(reDimStatement);
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(AddHandlerStatement addHandlerStatement, object data)
+		{
+			DebugOutput(addHandlerStatement);
+			AppendIndentation();
+			sourceText.Append(addHandlerStatement.EventExpression.AcceptVisitor(this, data));
+			sourceText.Append(" += ");
+			sourceText.Append(addHandlerStatement.HandlerExpression.AcceptVisitor(this, data));
+			sourceText.Append(";");
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(RemoveHandlerStatement removeHandlerStatement, object data)
+		{
+			DebugOutput(removeHandlerStatement);
+			AppendIndentation();
+			sourceText.Append(removeHandlerStatement.EventExpression.AcceptVisitor(this, data));
+			sourceText.Append(" -= ");
+			sourceText.Append(removeHandlerStatement.HandlerExpression.AcceptVisitor(this, data));
+			sourceText.Append(";");
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(DoLoopStatement doLoopStatement, object data)
+		{
+			DebugOutput(doLoopStatement);
+			exitConstructStack.Push(new DictionaryEntry(typeof(DoLoopStatement), null));
+			if (doLoopStatement.ConditionPosition == ConditionPosition.Start) {
+				AppendIndentation();
+				sourceText.Append("while (");
+				if (doLoopStatement.ConditionType == ConditionType.Until) {
+					sourceText.Append("!(");
+				}
+				sourceText.Append(doLoopStatement.Condition.AcceptVisitor(this, data).ToString());
+				if (doLoopStatement.ConditionType == ConditionType.Until) {
+					sourceText.Append(")");
+				}
+				sourceText.Append(") {");
+				
+				AppendNewLine();
+				
+				++indentLevel;
+				doLoopStatement.EmbeddedStatement.AcceptVisitor(this, data);
+				--indentLevel;
+				
+				AppendIndentation();
+				sourceText.Append("}");
+				AppendNewLine();
+			} else {
+				AppendIndentation();
+				sourceText.Append("do {");
+				AppendNewLine();
+				
+				++indentLevel;
+				doLoopStatement.EmbeddedStatement.AcceptVisitor(this, data);
+				--indentLevel;
+				
+				AppendIndentation();
+				sourceText.Append("} while (");
+				if (doLoopStatement.Condition == null) {
+					sourceText.Append("true");
+				} else {
+					if (doLoopStatement.ConditionType == ConditionType.Until) {
+						sourceText.Append("!(");
+					}
+					sourceText.Append(doLoopStatement.Condition.AcceptVisitor(this, data).ToString());
+					if (doLoopStatement.ConditionType == ConditionType.Until) {
+						sourceText.Append(")");
+					}
+				}
+				sourceText.Append(");");
+				AppendNewLine();
+			}
+			GenerateExitConstructLabel();
+			return null;
+		}
+		
+		public object Visit(EndStatement endStatement, object data)
+		{
+			DebugOutput(endStatement);
+			AppendIndentation();
+			sourceText.Append("System.Environment.Exit(0);");
+			AppendNewLine();
+			return null;
+		}
+		
+		Stack exitConstructStack = new Stack();
+		int   exitLabelCount     = 0;
+		public string AddExitOnConstructStack(Type exitType)
+		{
+			string labelName = String.Concat("exit" + exitType.Name, exitLabelCount++);
+			if (exitConstructStack.Count > 0) {
+				object[] exitArray = exitConstructStack.ToArray();
+				for (int i = exitArray.Length - 1; i >= 0; --i) {
+					if ((Type)((DictionaryEntry)exitArray[i]).Key == exitType) {
+						exitArray[i] = new DictionaryEntry(((DictionaryEntry)exitArray[i]).Key, labelName);
+					}
+				}
+				Array.Reverse(exitArray);
+				exitConstructStack = new Stack(exitArray);
+			}
+			return String.Concat(labelName);
+		}
+		
+		public void GenerateExitConstructLabel()
+		{
+			if (exitConstructStack.Count > 0) {
+				DictionaryEntry entry = (DictionaryEntry)exitConstructStack.Pop();
+				if (entry.Value != null) {
+					AppendIndentation();
+					sourceText.Append(entry.Value.ToString());
+					sourceText.Append(": ;");
+					AppendNewLine();
+				}
+			}
+		}
+		
+		public object Visit(ExitStatement exitStatement, object data)
+		{
+			DebugOutput(exitStatement);
+			Type   exitType  = null;
+			switch (exitStatement.ExitType) {
+				case ExitType.Sub:
+					sourceText.Append("return;");
+					AppendNewLine();
+					return null;
+				case ExitType.Function:
+					sourceText.Append("return null;");
+					AppendNewLine();
+					return null;
+				case ExitType.Property:
+					exitType = typeof(PropertyDeclaration);
+					break;
+				case ExitType.Do:
+					exitType = typeof(DoLoopStatement);
+					break;
+				case ExitType.For:
+					exitType = typeof(ForStatement);
+					break;
+				case ExitType.While:
+					exitType = typeof(WhileStatement);
+					break;
+				case ExitType.Select:
+					exitType = typeof(SelectStatement);
+					break;
+				case ExitType.Try:
+					exitType = typeof(TryCatchStatement);
+					break;
+			}
+			if (exitType != null) {
+				AppendIndentation();
+				sourceText.Append("goto ");
+				sourceText.Append(AddExitOnConstructStack(exitType));
+				sourceText.Append(";");
+				AppendNewLine();
+			} else {
+				AppendIndentation();
+				sourceText.Append("ERROR IN GENERATION: EXIT TO ");
+				sourceText.Append(exitStatement.ExitType);
+				sourceText.Append(" FAILED!!!");
+				AppendNewLine();
+			}
+			return null;
+		}
+		
+		public object Visit(ForeachStatement foreachStatement, object data)
+		{
+			DebugOutput(foreachStatement);
+			exitConstructStack.Push(new DictionaryEntry(typeof(ForStatement), null));
+			
+			AppendIndentation();
+			sourceText.Append("foreach (");
+			if (foreachStatement.LoopControlVariable.Type != null) {
+				sourceText.Append(this.GetTypeString(foreachStatement.LoopControlVariable.Type));
+				sourceText.Append(" ");
+			}
+			sourceText.Append(foreachStatement.LoopControlVariable.Name);
+			sourceText.Append(" in ");
+			sourceText.Append(foreachStatement.Expression.AcceptVisitor(this, data));
+			sourceText.Append(") {");
+			AppendNewLine();
+			
+			++indentLevel;
+			foreachStatement.EmbeddedStatement.AcceptVisitor(this, data);
+			--indentLevel;
+			
+			AppendIndentation();
+			sourceText.Append("}");
+			AppendNewLine();
+			GenerateExitConstructLabel();
+			return null;
+		}
+		
+		public object Visit(ForStatement forStatement, object data)
+		{
+			DebugOutput(forStatement);
+			exitConstructStack.Push(new DictionaryEntry(typeof(ForStatement), null));
+			bool   stepIsNegative = false;
+			string step           = null;
+			if (forStatement.Step != null) {
+				step = forStatement.Step.AcceptVisitor(this, data).ToString();
+				stepIsNegative = step.StartsWith("-");
+			}
+			
+			AppendIndentation();
+			sourceText.Append("for (");
+			
+			
+			if (forStatement.LoopControlVariable.Type != null) {
+				sourceText.Append(this.GetTypeString(forStatement.LoopControlVariable.Type));
+				sourceText.Append(" ");
+			}
+			sourceText.Append(forStatement.LoopControlVariable.Name);
+			sourceText.Append(" = ");
+			
+			sourceText.Append(forStatement.Start.AcceptVisitor(this, data));
+			sourceText.Append("; ");
+			sourceText.Append(forStatement.LoopControlVariable.Name);
+			sourceText.Append(stepIsNegative ? " >= " : " <= ");
+			sourceText.Append(forStatement.End.AcceptVisitor(this, data));
+			sourceText.Append("; ");
+			if (forStatement.Step == null) {
+				sourceText.Append(forStatement.LoopControlVariable.Name);
+				sourceText.Append("++");
+			} else {
+				sourceText.Append(forStatement.LoopControlVariable.Name);
+				if (stepIsNegative) {
+					if (step == "-1") {
+						sourceText.Append("--");
+					} else {
+						sourceText.Append(" -= ");
+						sourceText.Append(step.Substring(1));
+					}
+				} else {
+					sourceText.Append(" += ");
+					sourceText.Append(step);
+				}
+			}
+			sourceText.Append(") {");
+			AppendNewLine();
+			
+			++indentLevel;
+			forStatement.EmbeddedStatement.AcceptVisitor(this, data);
+			--indentLevel;
+			AppendIndentation();
+			sourceText.Append("}");
+			AppendNewLine();
+			GenerateExitConstructLabel();
+			
+			return null;
+		}
+		
+		public object Visit(LockStatement lockStatement, object data)
+		{
+			DebugOutput(lockStatement);
+			AppendIndentation();
+			sourceText.Append("lock (");
+			sourceText.Append(lockStatement.LockExpression.AcceptVisitor(this, data));
+			sourceText.Append(") {");
+			AppendNewLine();
+			
+			++indentLevel;
+			lockStatement.EmbeddedStatement.AcceptVisitor(this, data);
+			--indentLevel;
+			
+			AppendIndentation();
+			sourceText.Append("}");
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(RaiseEventStatement raiseEventStatement, object data)
+		{
+			DebugOutput(raiseEventStatement);
+			AppendIndentation();
+			sourceText.Append("if (");
+			sourceText.Append(raiseEventStatement.EventName);
+			sourceText.Append(" != null) {");
+			AppendNewLine();
+			
+			++indentLevel;
+			AppendIndentation();
+			sourceText.Append(raiseEventStatement.EventName);
+			sourceText.Append(GetParameters(raiseEventStatement.Parameters));
+			sourceText.Append(";");
+			AppendNewLine();
+			--indentLevel;
+			
+			AppendIndentation();
+			sourceText.Append("}");
+			AppendNewLine();
+			return null;
+		}
+		
+		
+		public object Visit(ReturnStatement returnStatement, object data)
+		{
+			DebugOutput(returnStatement);
+			AppendIndentation();
+			sourceText.Append("return");
+			if (returnStatement.ReturnExpression != null) {
+				sourceText.Append(" ");
+				sourceText.Append(returnStatement.ReturnExpression.AcceptVisitor(this,data));
+			}
+			sourceText.Append(";");
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(ThrowStatement throwStatement, object data)
+		{
+			DebugOutput(throwStatement);
+			AppendIndentation();
+			sourceText.Append("throw");
+			if (throwStatement.ThrowExpression != null) {
+				sourceText.Append(" ");
+				sourceText.Append(throwStatement.ThrowExpression.AcceptVisitor(this, data).ToString());
+			}
+			sourceText.Append(";");
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(TryCatchStatement tryCatchStatement, object data)
+		{
+			DebugOutput(tryCatchStatement);
+			exitConstructStack.Push(new DictionaryEntry(typeof(TryCatchStatement), null));
+			AppendIndentation();
+			sourceText.Append("try {");
+			AppendNewLine();
+			
+			++indentLevel;
+			tryCatchStatement.StatementBlock.AcceptVisitor(this, data);
+			--indentLevel;
+			AppendIndentation();
+			sourceText.Append("}");
+			if (tryCatchStatement.CatchClauses != null) {
+				foreach (CatchClause catchClause in tryCatchStatement.CatchClauses) {
+					sourceText.Append(" catch ");
+					if (catchClause.Type != null) {
+						sourceText.Append("(");
+						sourceText.Append(GetTypeString(catchClause.Type));
+						if (catchClause.VariableName != null) {
+							sourceText.Append(" ");
+							sourceText.Append(catchClause.VariableName);
+						}
+						sourceText.Append(") ");
+					}
+					sourceText.Append("{");
+					AppendNewLine();
+					++indentLevel;
+					if (catchClause.Condition != null) {
+						AppendIndentation();
+						sourceText.Append("//TODO: review the original conditional catch clause");
+						AppendNewLine();
+						AppendIndentation();
+						sourceText.Append("if (");
+						sourceText.Append(catchClause.Condition.AcceptVisitor(this, data));
+						sourceText.Append(") {");
+						AppendNewLine();
+						++indentLevel;
+						catchClause.StatementBlock.AcceptVisitor(this, data);
+						--indentLevel;
+						AppendIndentation();
+						sourceText.Append("}");
+						AppendNewLine();
+					} else {
+						catchClause.StatementBlock.AcceptVisitor(this, data);
+					}
+					--indentLevel;
+					AppendIndentation();
+					sourceText.Append("}");
+				}
+			}
+			
+			if (tryCatchStatement.FinallyBlock != null) {
+				sourceText.Append(" finally {");
+				AppendNewLine();
+				
+				++indentLevel;
+				tryCatchStatement.FinallyBlock.AcceptVisitor(this, data);
+				--indentLevel;
+				AppendIndentation();
+				sourceText.Append("}");
+			}
+			AppendNewLine();
+			GenerateExitConstructLabel();
+			return null;
+		}
+		
+		public object Visit(WhileStatement whileStatement, object data)
+		{
+			DebugOutput(whileStatement);
+			exitConstructStack.Push(new DictionaryEntry(typeof(WhileStatement), null));
+			AppendIndentation();
+			sourceText.Append("while (");
+			sourceText.Append(whileStatement.Condition.AcceptVisitor(this, data).ToString());
+			sourceText.Append(") {");
+			AppendNewLine();
+			
+			++indentLevel;
+			whileStatement.EmbeddedStatement.AcceptVisitor(this, data);
+			--indentLevel;
+			
+			AppendIndentation();
+			sourceText.Append("}");
+			AppendNewLine();
+			GenerateExitConstructLabel();
+			return null;
+		}
+		
+		public object Visit(WithStatement withStatement, object data)
+		{
+			DebugOutput(withStatement);
+			withExpressionStack.Push(withStatement.WithExpression);
+			withStatement.Body.AcceptVisitor(this, data);
+			withExpressionStack.Pop();
+			return null;
+		}
+		
+		public object Visit(ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute attribute, object data)
+		{
+			DebugOutput(attribute);
+			AppendIndentation();
+			sourceText.Append("// Should never happen (this is handled in AttributeSection) attribute was:");
+			sourceText.Append(attribute);
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(AttributeSection attributeSection, object data)
+		{
+			DebugOutput(attributeSection);
+			AppendIndentation();
+			sourceText.Append("[");
+			if (attributeSection.AttributeTarget != null && attributeSection.AttributeTarget.Length > 0) {
+				sourceText.Append(attributeSection.AttributeTarget);
+				sourceText.Append(": ");
+			}
+			for (int j = 0; j < attributeSection.Attributes.Count; ++j) {
+				ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute attr = (ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute)attributeSection.Attributes[j];
+				
+				sourceText.Append(attr.Name);
+				sourceText.Append("(");
+				for (int i = 0; i < attr.PositionalArguments.Count; ++i) {
+					Expression expr = (Expression)attr.PositionalArguments[i];
+					sourceText.Append(expr.AcceptVisitor(this, data).ToString());
+					if (i + 1 < attr.PositionalArguments.Count | attr.NamedArguments.Count > 0) { 
+						sourceText.Append(", ");
+					}
+				}
+
+				for (int i = 0; i < attr.NamedArguments.Count; ++i) {
+					NamedArgumentExpression named = (NamedArgumentExpression)attr.NamedArguments[i];
+					sourceText.Append(named.AcceptVisitor(this, data).ToString());
+					if (i + 1 < attr.NamedArguments.Count) { 
+						sourceText.Append(", ");
+					}
+				}
+				sourceText.Append(")");
+				if (j + 1 < attributeSection.Attributes.Count) {
+					sourceText.Append(", ");
+				}
+			}
+			sourceText.Append("]");
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(OptionCompareDeclaration optionCompareDeclaration, object data)
+		{
+			DebugOutput(optionCompareDeclaration);
+			AppendIndentation();
+			sourceText.Append("// TODO: NotImplemented statement: ");
+			sourceText.Append(optionCompareDeclaration);
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(OptionExplicitDeclaration optionExplicitDeclaration, object data)
+		{
+			DebugOutput(optionExplicitDeclaration);
+			AppendIndentation();
+			sourceText.Append("// TODO: NotImplemented statement: ");
+			sourceText.Append(optionExplicitDeclaration);
+			AppendNewLine();
+			return null;
+		}
+		
+		public object Visit(OptionStrictDeclaration optionStrictDeclaration, object data)
+		{
+			DebugOutput(optionStrictDeclaration);
+			AppendIndentation();
+			sourceText.Append("// TODO: NotImplemented statement: ");
+			sourceText.Append(optionStrictDeclaration);
+			AppendNewLine();
+			return null;
+		}
+#endregion
+
+#region Expressions
+		public object Visit(PrimitiveExpression primitiveExpression, object data)
+		{
+			DebugOutput(primitiveExpression);
+			if (primitiveExpression.Value == null) {
+				return "null";
+			}
+			if (primitiveExpression.Value is bool) {
+				if ((bool)primitiveExpression.Value) {
+					return "true";
+				}
+				return "false";
+			}
+			
+			if (primitiveExpression.Value is string) {
+				string s = primitiveExpression.Value.ToString();
+				s = s.Replace("\\","\\\\");
+				s = s.Replace("\"","\\\"");
+				return String.Concat('"', s, '"');
+			}
+			
+			if (primitiveExpression.Value is char) {
+				string s = primitiveExpression.Value.ToString();
+				s = s.Replace("\\","\\\\");
+				s = s.Replace("\'","\\\'");
+				return String.Concat("'", s, "'");
+			}
+			
+			if (primitiveExpression.Value is System.DateTime) {
+				string s = primitiveExpression.StringValue;
+				s = s.Replace("\\","\\\\");
+				s = s.Replace("\"","\\\"");
+				return String.Concat("System.DateTime.Parse(\"", s, "\")");
+			}
+
+			return primitiveExpression.Value;
+		}
+		
+		public object Visit(BinaryOperatorExpression binaryOperatorExpression, object data)
+		{
+			DebugOutput(binaryOperatorExpression);
+			string op   = null;
+			string left = binaryOperatorExpression.Left.AcceptVisitor(this, data).ToString();
+			string right = binaryOperatorExpression.Right.AcceptVisitor(this, data).ToString();
+			
+			switch (binaryOperatorExpression.Op) {
+				case BinaryOperatorType.Concat:
+					op = " + ";
+					break;
+				
+				case BinaryOperatorType.Add:
+					op = " + ";
+					break;
+				
+				case BinaryOperatorType.Subtract:
+					op = " - ";
+					break;
+				
+				case BinaryOperatorType.Multiply:
+					op = " * ";
+					break;
+				
+				case BinaryOperatorType.DivideInteger:
+				case BinaryOperatorType.Divide:
+					op = " / ";
+					break;
+				
+				case BinaryOperatorType.Modulus:
+					op = " % ";
+					break;
+				
+				case BinaryOperatorType.ShiftLeft:
+					op = " << ";
+					break;
+				
+				case BinaryOperatorType.ShiftRight:
+					op = " >> ";
+					break;
+				
+				case BinaryOperatorType.BitwiseAnd:
+					op = " & ";
+					break;
+				case BinaryOperatorType.BitwiseOr:
+					op = " | ";
+					break;
+				case BinaryOperatorType.ExclusiveOr:
+					op = " ^ ";
+					break;
+				
+				case BinaryOperatorType.BooleanAnd:
+					op = " && ";
+					break;
+				case BinaryOperatorType.BooleanOr:
+					op = " || ";
+					break;
+				
+				case BinaryOperatorType.Equality:
+					op = " == ";
+					break;
+				case BinaryOperatorType.GreaterThan:
+					op = " > ";
+					break;
+				case BinaryOperatorType.GreaterThanOrEqual:
+					op = " >= ";
+					break;
+				case BinaryOperatorType.InEquality:
+					op = " != ";
+					break;
+				case BinaryOperatorType.LessThan:
+					op = " < ";
+					break;
+				case BinaryOperatorType.IS:
+					op = " == ";
+					break;
+				case BinaryOperatorType.LessThanOrEqual:
+					op = " <= ";
+					break;
+				case BinaryOperatorType.Power:
+					return "Math.Pow(" + left + ", " + right + ")";
+				default:
+					throw new Exception("Unknown binary operator:" + binaryOperatorExpression.Op);
+			}
+			
+			return String.Concat(left,
+			                     op,
+			                     right);
+		}
+		
+		public object Visit(ParenthesizedExpression parenthesizedExpression, object data)
+		{
+			DebugOutput(parenthesizedExpression);
+			string innerExpr = parenthesizedExpression.Expression.AcceptVisitor(this, data).ToString();
+			return String.Concat("(", innerExpr, ")");
+		}
+		
+		public object Visit(InvocationExpression invocationExpression, object data)
+		{
+			DebugOutput(invocationExpression);
+			return String.Concat(invocationExpression.TargetObject.AcceptVisitor(this, data),
+			                     GetParameters(invocationExpression.Parameters)
+			                     );
+		}
+		
+		public object Visit(IdentifierExpression identifierExpression, object data)
+		{
+			DebugOutput(identifierExpression);
+			return identifierExpression.Identifier;
+		}
+		
+		public object Visit(TypeReferenceExpression typeReferenceExpression, object data)
+		{
+			DebugOutput(typeReferenceExpression);
+			return GetTypeString(typeReferenceExpression.TypeReference);
+		}
+		
+		public object Visit(UnaryOperatorExpression unaryOperatorExpression, object data)
+		{
+			DebugOutput(unaryOperatorExpression);
+			switch (unaryOperatorExpression.Op) {
+				case UnaryOperatorType.BitNot:
+					return String.Concat("~", unaryOperatorExpression.Expression.AcceptVisitor(this, data));
+				case UnaryOperatorType.Decrement:
+					return String.Concat("--", unaryOperatorExpression.Expression.AcceptVisitor(this, data), ")");
+				case UnaryOperatorType.Increment:
+					return String.Concat("++", unaryOperatorExpression.Expression.AcceptVisitor(this, data), ")");
+				case UnaryOperatorType.Minus:
+					return String.Concat("-", unaryOperatorExpression.Expression.AcceptVisitor(this, data));
+				case UnaryOperatorType.Not:
+					return String.Concat("!(", unaryOperatorExpression.Expression.AcceptVisitor(this, data), ")");
+				case UnaryOperatorType.Plus:
+					return String.Concat("+", unaryOperatorExpression.Expression.AcceptVisitor(this, data));
+				case UnaryOperatorType.PostDecrement:
+					return String.Concat(unaryOperatorExpression.Expression.AcceptVisitor(this, data), "--");
+				case UnaryOperatorType.PostIncrement:
+					return String.Concat(unaryOperatorExpression.Expression.AcceptVisitor(this, data), "++");
+			}
+			throw new System.NotSupportedException();
+		}
+		
+		public object Visit(AssignmentExpression assignmentExpression, object data)
+		{
+			DebugOutput(assignmentExpression);
+			string op    = null;
+			string left  = assignmentExpression.Left.AcceptVisitor(this, data).ToString();
+			string right = assignmentExpression.Right.AcceptVisitor(this, data).ToString();
+			
+			switch (assignmentExpression.Op) {
+				case AssignmentOperatorType.Assign:
+					op = " = ";
+					break;
+				case AssignmentOperatorType.ConcatString:
+				case AssignmentOperatorType.Add:
+					op = " += ";
+					break;
+				case AssignmentOperatorType.Subtract:
+					op = " -= ";
+					break;
+				case AssignmentOperatorType.Multiply:
+					op = " *= ";
+					break;
+				case AssignmentOperatorType.Divide:
+					op = " /= ";
+					break;
+				case AssignmentOperatorType.ShiftLeft:
+					op = " <<= ";
+					break;
+				case AssignmentOperatorType.ShiftRight:
+					op = " >>= ";
+					break;
+				
+				case AssignmentOperatorType.ExclusiveOr:
+					op = " ^= ";
+					break;
+				case AssignmentOperatorType.Modulus:
+					op = " %= ";
+					break;
+				case AssignmentOperatorType.BitwiseAnd:
+					op = " &= ";
+					break;
+				case AssignmentOperatorType.BitwiseOr:
+					op = " |= ";
+					break;
+			}
+			return String.Concat(left,
+			                     op,
+			                     right);
+		}
+		
+		public object Visit(CastExpression castExpression, object data)
+		{
+			DebugOutput(castExpression);
+			string type     = ConvertTypeString(castExpression.CastTo.Type);
+			string castExpr = castExpression.Expression.AcceptVisitor(this, data).ToString();
+			
+			if (castExpression.IsSpecializedCast) {
+				switch (type) {
+					case "System.Object":
+						break;
+					default:
+						string convToType = type.Substring("System.".Length);
+						return String.Format("System.Convert.To{0}({1})", convToType, castExpr);
+				}
+			}
+			return String.Format("(({0})({1}))", type, castExpr);
+		}
+		
+		public object Visit(ThisReferenceExpression thisReferenceExpression, object data)
+		{
+			DebugOutput(thisReferenceExpression);
+			return "this";
+		}
+		
+		public object Visit(BaseReferenceExpression baseReferenceExpression, object data)
+		{
+			DebugOutput(baseReferenceExpression);
+			return "base";
+		}
+		
+		public object Visit(ObjectCreateExpression objectCreateExpression, object data)
+		{
+			return String.Format("new {0}{1}",
+			                     GetTypeString(objectCreateExpression.CreateType),
+			                     GetParameters(objectCreateExpression.Parameters)
+			                     );
+		}
+		
+		public object Visit(ParameterDeclarationExpression parameterDeclarationExpression, object data)
+		{
+			DebugOutput(parameterDeclarationExpression);
+			// Is handled in the AppendParameters method
+			return "// should never happen" + parameterDeclarationExpression;
+		}
+		
+		public object Visit(FieldReferenceOrInvocationExpression fieldReferenceOrInvocationExpression, object data)
+		{
+			DebugOutput(fieldReferenceOrInvocationExpression);
+			INode target = fieldReferenceOrInvocationExpression.TargetObject;
+			if (target == null && withExpressionStack.Count > 0) {
+				target = withExpressionStack.Peek() as INode;
+			}
+			return String.Concat(target.AcceptVisitor(this, data),
+			                     '.',
+			                     fieldReferenceOrInvocationExpression.FieldName);
+		}
+		
+		public object Visit(ArrayInitializerExpression arrayInitializerExpression, object data)
+		{
+			DebugOutput(arrayInitializerExpression);
+			if (arrayInitializerExpression.CreateExpressions.Count > 0) {
+				return String.Concat("{",
+				                     GetExpressionList(arrayInitializerExpression.CreateExpressions),
+				                     "}");
+			}
+			return String.Empty;
+		}
+		
+		public object Visit(GetTypeExpression getTypeExpression, object data)
+		{
+			DebugOutput(getTypeExpression);
+			return String.Concat("typeof(",
+			                     this.GetTypeString(getTypeExpression.Type),
+			                     ")");
+		}
+		
+		public object Visit(ClassReferenceExpression classReferenceExpression, object data)
+		{
+			// ALMOST THE SAME AS '.this' but ignores all overridings from virtual
+			// members. How can this done in C# ?
+			DebugOutput(classReferenceExpression);
+			return "TODO : " + classReferenceExpression;
+		}
+		
+		public object Visit(LoopControlVariableExpression loopControlVariableExpression, object data)
+		{
+			// I think the LoopControlVariableExpression is only used in the for statement
+			// and there it is handled
+			DebugOutput(loopControlVariableExpression);
+			return "Should Never happen : " + loopControlVariableExpression;
+		}
+		
+		public object Visit(NamedArgumentExpression namedArgumentExpression, object data)
+		{
+			return String.Concat(namedArgumentExpression.Parametername,
+			                     "=",
+			                    namedArgumentExpression.Expression.AcceptVisitor(this, data));
+		}
+		
+		public object Visit(AddressOfExpression addressOfExpression, object data)
+		{
+			DebugOutput(addressOfExpression);
+			string procedureName    = addressOfExpression.Procedure.AcceptVisitor(this, data).ToString();
+			string eventHandlerType = "EventHandler";
+			bool   foundEventHandler = false;
+			// try to resolve the type of the eventhandler using a little trick :)
+			foreach (INode node in currentType.Children) {
+				MethodDeclaration md = node as MethodDeclaration;
+				if (md != null && md.Parameters != null && md.Parameters.Count > 0) {
+					if (procedureName == md.Name || procedureName.EndsWith("." + md.Name)) {
+						ParameterDeclarationExpression pde = (ParameterDeclarationExpression)md.Parameters[md.Parameters.Count - 1];
+						string typeName = GetTypeString(pde.TypeReference);
+						if (typeName.EndsWith("Args")) {
+							eventHandlerType = typeName.Substring(0, typeName.Length - "Args".Length) + "Handler";
+							foundEventHandler = true;
+						}
+					}
+				}
+			}
+			return String.Concat(foundEventHandler ? "new " : "/* might be wrong, please check */ new ",
+			                     eventHandlerType,
+			                     "(",
+			                     procedureName,
+			                     ")");
+		}
+		
+		public object Visit(TypeOfExpression typeOfExpression, object data)
+		{
+			DebugOutput(typeOfExpression);
+			return String.Concat(typeOfExpression.Expression.AcceptVisitor(this, data),
+			                     " is ",
+			                     GetTypeString(typeOfExpression.Type));
+		}
+		
+		public object Visit(ArrayCreateExpression ace, object data)
+		{
+			DebugOutput(ace);
+			
+			return String.Concat("new ",
+			                     GetTypeString(ace.CreateType),
+			                     "[",
+			                     GetExpressionList(ace.Parameters),
+			                     "]",
+			                     ace.ArrayInitializer.AcceptVisitor(this, data));
+		}
+#endregion
+#endregion
+		
+		public void AppendAttributes(ArrayList attr)
+		{
+			if (attr != null) {
+				foreach (AttributeSection section in attr) {
+					section.AcceptVisitor(this, null);
+				}
+			}
+		}
+		
+		public void AppendParameters(ArrayList parameters)
+		{
+			if (parameters == null) {
+				return;
+			}
+			for (int i = 0; i < parameters.Count; ++i) {
+				ParameterDeclarationExpression pde = (ParameterDeclarationExpression)parameters[i];
+				AppendAttributes(pde.Attributes);
+				
+				if ((pde.ParamModifiers.Modifier & ParamModifier.ByRef) == ParamModifier.ByRef) {
+					sourceText.Append("ref ");
+				} else if ((pde.ParamModifiers.Modifier & ParamModifier.ParamArray) == ParamModifier.ParamArray) {
+					sourceText.Append("params ");
+				}
+				
+				sourceText.Append(GetTypeString(pde.TypeReference));
+				sourceText.Append(" ");
+				sourceText.Append(pde.ParameterName);
+				if (i + 1 < parameters.Count) {
+					sourceText.Append(", ");
+				}
+			}
+		}
+		
+		string ConvertTypeString(string typeString)
+		{
+			switch (typeString.ToLower()) {
+				case "boolean":
+					return "bool";
+				case "string":
+					return "string";
+				case "char":
+					return "char";
+				case "double":
+					return "double";
+				case "single":
+					return "float";
+				case "decimal":
+					return "decimal";
+				case "date":
+					return "System.DateTime";
+				case "long":
+					return "long";
+				case "integer":
+					return "int";
+				case "short":
+					return "short";
+				case "byte":
+					return "byte";
+				case "void":
+					return "void";
+				case "system.object":
+				case "object":
+					return "object";
+				case "system.uint64":
+					return "ulong";
+				case "system.uint32":
+					return "uint";
+				case "system.uint16":
+					return "ushort";
+			}
+			return typeString;
+		}
+		
+		string GetTypeString(TypeReference typeRef)
+		{
+			if (typeRef == null) {
+				return "void";
+			}
+			
+			string typeStr = ConvertTypeString(typeRef.Type);
+		
+			StringBuilder arrays = new StringBuilder();
+
+			if (typeRef.RankSpecifier != null) {
+				for (int i = 0; i < typeRef.RankSpecifier.Count; ++i) {
+					arrays.Append("[");
+					arrays.Append(new String(',', (int)typeRef.RankSpecifier[i]));
+					arrays.Append("]");
+				}
+			} else {
+				if (typeRef.Dimension != null) {
+					arrays.Append("[");
+					if (typeRef.Dimension.Count > 0) {
+						arrays.Append(new String(',', typeRef.Dimension.Count - 1));
+					}
+					arrays.Append("]");
+				}
+			}
+			
+			return typeStr + arrays.ToString();
+		}
+		
+		string GetModifier(Modifier modifier)
+		{
+			StringBuilder builder = new StringBuilder();
+			
+			if ((modifier & Modifier.Public) == Modifier.Public) {
+				builder.Append("public ");
+			} else if ((modifier & Modifier.Private) == Modifier.Private) {
+				builder.Append("private ");
+			} else if ((modifier & (Modifier.Protected | Modifier.Friend)) == (Modifier.Protected | Modifier.Friend)) {
+				builder.Append("protected internal ");
+			} else if ((modifier & Modifier.Friend) == Modifier.Friend) {
+				builder.Append("internal ");
+			} else if ((modifier & Modifier.Protected) == Modifier.Protected) {
+				builder.Append("protected ");
+			}
+			
+			if ((modifier & Modifier.MustInherit) == Modifier.MustInherit) {
+				builder.Append("abstract ");
+			}
+			if ((modifier & Modifier.Shared) == Modifier.Shared) {
+				builder.Append("static ");
+			}
+			if ((modifier & Modifier.Overridable) == Modifier.Overridable) {
+				builder.Append("virtual ");
+			}
+			if ((modifier & Modifier.MustOverride) == Modifier.MustOverride) {
+				builder.Append("abstract ");
+			}
+			if ((modifier & Modifier.Overrides) == Modifier.Overrides) {
+				builder.Append("override ");
+			}
+			if ((modifier & Modifier.Shadows) == Modifier.Shadows) {
+				builder.Append("new ");
+			}
+			
+			if ((modifier & Modifier.NotInheritable) == Modifier.NotInheritable) {
+				builder.Append("sealed ");
+			}
+			
+			if ((modifier & Modifier.Constant) == Modifier.Constant) {
+				builder.Append("const ");
+			}
+			if ((modifier & Modifier.ReadOnly) == Modifier.ReadOnly) {
+				builder.Append("readonly ");
+			}
+			return builder.ToString();
+		}
+
+		string GetParameters(ArrayList list)
+		{
+			return String.Concat("(",
+			                     GetExpressionList(list),
+			                     ")");
+		}
+		
+		string GetExpressionList(ArrayList list)
+		{
+			StringBuilder sb = new StringBuilder();
+			if (list != null) {
+				for (int i = 0; i < list.Count; ++i) {
+					Expression exp = (Expression)list[i];
+					if (exp != null) {
+						sb.Append(exp.AcceptVisitor(this, null));
+						if (i + 1 < list.Count) {
+							sb.Append(", ");
+						}
+					}
+				}
+			}
+			return sb.ToString();
+		}
+		
+	}
+}	

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/CodeDom/CodeDOMVisitor.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/CodeDom/CodeDOMVisitor.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/CodeDom/CodeDOMVisitor.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,895 @@
+// CodeDOMVisitor.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Reflection;
+using System.CodeDom;
+using System.Text;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+	public class CodeDOMVisitor : AbstractASTVisitor
+	{
+		Stack namespaceDeclarations = new Stack();
+		Stack typeDeclarations     = new Stack();
+		CodeMemberMethod currentMethod = null;
+		TypeDeclaration currentTypeDeclaration;
+		
+		public CodeCompileUnit codeCompileUnit = new CodeCompileUnit();
+		public ArrayList namespaces = new ArrayList();
+		
+		static string[,] typeConversionList = new string[,] {
+			{"System.Object",	"OBJECT"},
+			{"System.Boolean",	"BOOLEAN"},
+			{"System.Byte",		"BYTE"},
+			{"System.Char",		"CHAR"},
+			{"System.Int16",	"SHORT"},
+			{"System.Int32",	"INTEGER"},
+			{"System.Int64",	"LONG"},
+			{"System.Single",	"SINGLE"},
+			{"System.Double",	"DOUBLE"},
+			{"System.Decimal",	"DECIMAL"},
+			{"System.String",	"STRING"},
+			{"System.DateTime",	"DATE"}
+		};
+		
+		static Hashtable typeConversionTable = new Hashtable();
+		
+		static CodeDOMVisitor()
+		{
+			for (int i = 0; i < typeConversionList.GetLength(0); ++i) {
+				typeConversionTable[typeConversionList[i, 1]] = typeConversionList[i, 0];
+			}
+		}
+		string ConvType(string type) 
+		{
+			string upperType = type.ToUpper();
+			if (typeConversionTable[upperType] != null) {
+				return typeConversionTable[upperType].ToString();
+			}
+			return type;
+		}
+		// FIXME: map all modifiers correctly
+		MemberAttributes ConvMemberAttributes(Modifier modifier) 
+		{
+			MemberAttributes attr = (MemberAttributes)0;
+			
+			if ((modifier & Modifier.Private) != 0) {
+				attr |=  MemberAttributes.Private;
+			}
+			if ((modifier & Modifier.Public) != 0) {
+				attr |=  MemberAttributes.Public;
+			}
+			if ((modifier & Modifier.Protected) != 0) {
+				attr |=  MemberAttributes.Family;
+			}
+			if ((modifier & Modifier.Friend) != 0) {
+				attr |=  MemberAttributes.Assembly;
+			}
+			if ((modifier & Modifier.Static) != 0) {
+				attr |=  MemberAttributes.Static;
+			}
+			return attr;
+		}
+		
+#region ICSharpCode.SharpRefactory.Parser.IASTVisitor interface implementation
+		public override object Visit(INode node, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(CompilationUnit compilationUnit, object data)
+		{
+			CodeNamespace globalNamespace = new CodeNamespace("Global");
+			namespaces.Add(globalNamespace);
+			namespaceDeclarations.Push(globalNamespace);
+			compilationUnit.AcceptChildren(this, data);
+			codeCompileUnit.Namespaces.Add(globalNamespace);
+			return globalNamespace;
+		}
+		
+		public override object Visit(NamespaceDeclaration namespaceDeclaration, object data)
+		{
+			CodeNamespace currentNamespace = new CodeNamespace(namespaceDeclaration.NameSpace);
+			namespaces.Add(currentNamespace);
+			// add imports from mother namespace
+			foreach (CodeNamespaceImport import in ((CodeNamespace)namespaceDeclarations.Peek()).Imports) {
+				currentNamespace.Imports.Add(import);
+			}
+			namespaceDeclarations.Push(currentNamespace);
+			namespaceDeclaration.AcceptChildren(this, data);
+			namespaceDeclarations.Pop();
+			codeCompileUnit.Namespaces.Add(currentNamespace);
+			
+			// TODO : Nested namespaces allowed in CodeDOM ? Doesn't seem so :(
+			return null;
+		}
+		
+		public override object Visit(ImportsDeclaration importsDeclaration, object data)
+		{
+			((CodeNamespace)namespaceDeclarations.Peek()).Imports.Add(new CodeNamespaceImport(importsDeclaration.Namespace));
+			return null;
+		}
+		
+		public override object Visit(ImportsAliasDeclaration importsAliasDeclaration, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(AttributeSection attributeSection, object data)
+		{
+			return null;
+		}
+		
+		// TODO: OptionCompareDeclaration, OptionExplicitDeclaration, OptionStrictDeclaration
+		
+		public override object Visit(TypeDeclaration typeDeclaration, object data)
+		{
+			// skip nested types.
+			if (currentTypeDeclaration != null) {
+				return data;
+			}
+			if (typeDeclaration.Type == Types.Enum) {
+				return data;
+			}
+			this.currentTypeDeclaration = typeDeclaration;
+			CodeTypeDeclaration codeTypeDeclaration = new CodeTypeDeclaration(typeDeclaration.Name);
+			codeTypeDeclaration.IsClass     = typeDeclaration.Type == Types.Class;
+			codeTypeDeclaration.IsEnum      = typeDeclaration.Type == Types.Enum;
+			codeTypeDeclaration.IsInterface = typeDeclaration.Type == Types.Interface;
+			codeTypeDeclaration.IsStruct    = typeDeclaration.Type == Types.Structure;
+			
+			if (typeDeclaration.BaseType != null) {
+				codeTypeDeclaration.BaseTypes.Add(new CodeTypeReference(typeDeclaration.BaseType));
+			}
+			
+			if (typeDeclaration.BaseInterfaces != null) {
+				foreach (object o in typeDeclaration.BaseInterfaces) {
+					codeTypeDeclaration.BaseTypes.Add(new CodeTypeReference(o.ToString()));
+				}
+			}
+			
+			typeDeclarations.Push(codeTypeDeclaration);
+			typeDeclaration.AcceptChildren(this,data);
+//			((INode)typeDeclaration.Children[0]).(this, data);
+			
+			typeDeclarations.Pop();
+			
+			((CodeNamespace)namespaceDeclarations.Peek()).Types.Add(codeTypeDeclaration);
+			this.currentTypeDeclaration = null;
+			return null;
+		}
+		
+		//FIXME
+		public override object Visit(DelegateDeclaration delegateDeclaration, object data)
+		{
+//			CodeTypeDelegate codeTypeDelegate = new CodeTypeDelegate(delegateDeclaration.Name);
+//			codeTypeDelegate.Parameters
+//			
+//			((CodeNamespace)namespaceDeclarations.Peek()).Types.Add(codeTypeDelegate);
+			return null;
+		}
+		
+		public override object Visit(VariableDeclaration variableDeclaration, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(FieldDeclaration fieldDeclaration, object data)
+		{
+			for (int i = 0; i < fieldDeclaration.Fields.Count; ++i) {
+				VariableDeclaration field = (VariableDeclaration)fieldDeclaration.Fields[i];
+				if (field.Type != null) {
+					CodeMemberField memberField = new CodeMemberField(new CodeTypeReference(ConvType(field.Type.Type)), field.Name);
+					memberField.Attributes = ConvMemberAttributes(fieldDeclaration.Modifier);
+					if (field.Initializer != null) {
+						memberField.InitExpression =  (CodeExpression)((INode)field.Initializer).AcceptVisitor(this, data);
+					}
+					((CodeTypeDeclaration)typeDeclarations.Peek()).Members.Add(memberField);
+				}
+			}
+			
+			return null;
+		}
+		
+		public override object Visit(MethodDeclaration methodDeclaration, object data)
+		{
+			CodeMemberMethod memberMethod = new CodeMemberMethod();
+			memberMethod.Name = methodDeclaration.Name;
+			currentMethod = memberMethod;
+			((CodeTypeDeclaration)typeDeclarations.Peek()).Members.Add(memberMethod);
+			if (memberMethod.Name.ToUpper() == "INITIALIZECOMPONENT") {
+				methodDeclaration.Body.AcceptChildren(this, data);
+			}
+			currentMethod = null;
+			return null;
+		}
+		
+		public override object Visit(PropertyDeclaration propertyDeclaration, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(PropertyGetRegion propertyGetRegion, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(PropertySetRegion PropertySetRegion, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(EventDeclaration eventDeclaration, object data)
+		{
+			return null;
+		}
+		
+		// TODO: HandlesClause, ImplementsClause
+		
+		public override object Visit(ConstructorDeclaration constructorDeclaration, object data)
+		{
+			CodeConstructor memberMethod = new CodeConstructor();
+			// HACK: fake public constructor
+			memberMethod.Attributes = MemberAttributes.Public;
+			currentMethod = memberMethod;
+			((CodeTypeDeclaration)typeDeclarations.Peek()).Members.Add(memberMethod);
+			constructorDeclaration.Body.AcceptChildren(this, data);
+			currentMethod = null;
+			return null;
+		}
+		
+		public override object Visit(BlockStatement blockStatement, object data)
+		{
+			blockStatement.AcceptChildren(this, data);
+			return null;
+		}
+		
+		public override object Visit(StatementExpression statementExpression, object data)
+		{
+			if (statementExpression.Expression == null) {
+				//Console.WriteLine("Warning: Got empty statement expression!!!");
+				return null;
+			}
+			CodeExpression expr = (CodeExpression)statementExpression.Expression.AcceptVisitor(this, data);
+			if (expr == null) {
+				//if (!(statementExpression.Expression is AssignmentExpression)) {
+					//Console.WriteLine("NULL EXPRESSION : " + statementExpression.Expression);
+				//}
+			} else {
+				currentMethod.Statements.Add(new CodeExpressionStatement(expr));
+			}
+			
+			return null;
+		}
+		
+		public string Convert(TypeReference typeRef)
+		{
+			StringBuilder builder = new StringBuilder();
+			builder.Append(ConvType(typeRef.Type));
+			
+			if (typeRef.RankSpecifier != null) {
+				for (int i = 0; i < typeRef.RankSpecifier.Count; ++i) {
+					builder.Append('[');
+					for (int j = 1; j < (int)typeRef.RankSpecifier[i]; ++j) {
+						builder.Append(',');
+					}
+					builder.Append(']');
+				}
+			}
+			
+			return builder.ToString();
+		}
+		
+		public override object Visit(LocalVariableDeclaration localVariableDeclaration, object data)
+		{
+			foreach (VariableDeclaration var in localVariableDeclaration.Variables) {
+				CodeTypeReference type = new CodeTypeReference(Convert(var.Type));
+				if (var.Initializer != null) {
+					currentMethod.Statements.Add(new CodeVariableDeclarationStatement(type,
+					                                                                  var.Name,
+					                                                                  (CodeExpression)((INode)var.Initializer).AcceptVisitor(this, data)));
+				} else {
+					currentMethod.Statements.Add(new CodeVariableDeclarationStatement(type,
+					                                                                  var.Name));
+				}
+			}
+			return null;
+		}
+		
+		public override object Visit(ReturnStatement returnStatement, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(IfStatement ifStatement, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(WhileStatement doWhileStatement, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(DoLoopStatement doWhileStatement, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(ForStatement forStatement, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(LabelStatement labelStatement, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(GoToStatement gotoStatement, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(SelectStatement switchStatement, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(ForeachStatement foreachStatement, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(LockStatement lockStatement, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(TryCatchStatement tryCatchStatement, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(AddHandlerStatement addHandlerStatement, object data)
+		{
+			CodeExpression methodInvoker = (CodeExpression)addHandlerStatement.HandlerExpression.AcceptVisitor(this, null);
+			
+			if (addHandlerStatement.EventExpression is IdentifierExpression) {
+				currentMethod.Statements.Add(new CodeAttachEventStatement(new CodeEventReferenceExpression(new CodeThisReferenceExpression(), ((IdentifierExpression)addHandlerStatement.EventExpression).Identifier),
+				                                                          methodInvoker));
+			} else {
+				FieldReferenceOrInvocationExpression fr = (FieldReferenceOrInvocationExpression)addHandlerStatement.EventExpression;
+				currentMethod.Statements.Add(new CodeAttachEventStatement(new CodeEventReferenceExpression((CodeExpression)fr.TargetObject.AcceptVisitor(this, data), fr.FieldName),
+				                                                          methodInvoker));
+			}
+			return null;
+		}
+		
+		public override object Visit(RemoveHandlerStatement removeHandlerStatement, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(EndStatement endStatement, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(ExitStatement exitStatement, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(StopStatement stopStatement, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(ResumeStatement resumeStatement, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(EraseStatement eraseStatement, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(ErrorStatement errorStatement, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(OnErrorStatement onErrorStatement, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(RaiseEventStatement raiseEventStatement, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(ReDimStatement reDimStatement, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(ThrowStatement throwStatement, object data)
+		{
+			return new CodeThrowExceptionStatement((CodeExpression)throwStatement.ThrowExpression.AcceptVisitor(this, data));
+		}
+		
+		public override object Visit(PrimitiveExpression expression, object data)
+		{
+//			if (expression.Value is string) {
+//				return new CodePrimitiveExpression(expression.Value);
+//			} else if (expression.Value is char) {
+//				return new CodePrimitiveExpression((char)expression.Value);
+//			} else if (expression.Value == null) {
+//				return new CodePrimitiveExpression(null);
+//			}
+			return new CodePrimitiveExpression(expression.Value);
+		}
+		
+		public override object Visit(BinaryOperatorExpression expression, object data)
+		{
+			CodeBinaryOperatorType op = CodeBinaryOperatorType.Add;
+			switch (expression.Op) {
+				case BinaryOperatorType.Add:
+					op = CodeBinaryOperatorType.Add;
+					break;
+				case BinaryOperatorType.BitwiseAnd:
+					op = CodeBinaryOperatorType.BitwiseAnd;
+					break;
+				case BinaryOperatorType.BitwiseOr:
+					op = CodeBinaryOperatorType.BitwiseOr;
+					break;
+				case BinaryOperatorType.Concat:
+					// CodeDOM suxx
+					op = CodeBinaryOperatorType.Add;
+					break;
+				case BinaryOperatorType.BooleanAnd:
+					op = CodeBinaryOperatorType.BooleanAnd;
+					break;
+				case BinaryOperatorType.BooleanOr:
+					op = CodeBinaryOperatorType.BooleanOr;
+					break;
+				case BinaryOperatorType.Divide:
+					op = CodeBinaryOperatorType.Divide;
+					break;
+				case BinaryOperatorType.DivideInteger:
+					// CodeDOM suxx
+					op = CodeBinaryOperatorType.Divide;
+					break;
+				case BinaryOperatorType.GreaterThan:
+					op = CodeBinaryOperatorType.GreaterThan;
+					break;
+				case BinaryOperatorType.GreaterThanOrEqual:
+					op = CodeBinaryOperatorType.GreaterThanOrEqual;
+					break;
+				case BinaryOperatorType.Equality:
+					op = CodeBinaryOperatorType.IdentityEquality;
+					break;
+				case BinaryOperatorType.InEquality:
+					op = CodeBinaryOperatorType.IdentityInequality;
+					break;
+				case BinaryOperatorType.LessThan:
+					op = CodeBinaryOperatorType.LessThan;
+					break;
+				case BinaryOperatorType.LessThanOrEqual:
+					op = CodeBinaryOperatorType.LessThanOrEqual;
+					break;
+				case BinaryOperatorType.Modulus:
+					op = CodeBinaryOperatorType.Modulus;
+					break;
+				case BinaryOperatorType.Multiply:
+					op = CodeBinaryOperatorType.Multiply;
+					break;
+				case BinaryOperatorType.Subtract:
+					op = CodeBinaryOperatorType.Subtract;
+					break;
+				case BinaryOperatorType.ShiftLeft:
+					// CodeDOM suxx
+					op = CodeBinaryOperatorType.Multiply;
+					break;
+				case BinaryOperatorType.ShiftRight:
+					// CodeDOM suxx
+					op = CodeBinaryOperatorType.Multiply;
+					break;
+				case BinaryOperatorType.IS:
+					op = CodeBinaryOperatorType.IdentityEquality;
+					break;
+				case BinaryOperatorType.Like:
+					// CodeDOM suxx
+					op = CodeBinaryOperatorType.IdentityEquality;
+					break;
+				case BinaryOperatorType.ExclusiveOr:
+					// CodeDOM suxx
+					op = CodeBinaryOperatorType.BitwiseOr;
+					break;
+			}
+			return new CodeBinaryOperatorExpression((CodeExpression)expression.Left.AcceptVisitor(this, data),
+			                                        op,
+			                                        (CodeExpression)expression.Right.AcceptVisitor(this, data));
+		}
+		
+		public override object Visit(ParenthesizedExpression expression, object data)
+		{
+			return expression.Expression.AcceptVisitor(this, data);
+		}
+		
+		public override object Visit(InvocationExpression invocationExpression, object data)
+		{
+			Expression     target     = invocationExpression.TargetObject;
+			CodeExpression targetExpr;
+			string         methodName = null;
+			if (target == null) {
+				targetExpr = new CodeThisReferenceExpression();
+			} else if (target is FieldReferenceOrInvocationExpression) {
+				FieldReferenceOrInvocationExpression fRef = (FieldReferenceOrInvocationExpression)target;
+				targetExpr = (CodeExpression)fRef.TargetObject.AcceptVisitor(this, data);
+				if (fRef.TargetObject is FieldReferenceOrInvocationExpression) {
+					FieldReferenceOrInvocationExpression fRef2 = (FieldReferenceOrInvocationExpression)fRef.TargetObject;
+					if (fRef2.FieldName != null && Char.IsUpper(fRef2.FieldName[0])) {
+						// an exception is thrown if it doesn't end in an indentifier exception
+						// for example for : this.MyObject.MyMethod() leads to an exception, which 
+						// is correct in this case ... I know this is really HACKY :)
+						try {
+							CodeExpression tExpr = ConvertToIdentifier(fRef2);
+							if (tExpr != null) {
+								targetExpr = tExpr;
+							}
+						} catch (Exception) {}
+					}
+				}
+				methodName = fRef.FieldName;
+				// HACK for : Microsoft.VisualBasic.ChrW(NUMBER)
+				//Console.WriteLine(methodName);
+				if (methodName == "ChrW") {
+					//Console.WriteLine("Return CAST EXPRESSION" + GetExpressionList(invocationExpression.Parameters)[0]);
+					
+					return new CodeCastExpression("System.Char", GetExpressionList(invocationExpression.Parameters)[0]);
+				}
+			} else {
+				targetExpr = (CodeExpression)target.AcceptVisitor(this, data);
+			}
+			return new CodeMethodInvokeExpression(targetExpr, methodName, GetExpressionList(invocationExpression.Parameters));
+		}
+		
+		public override object Visit(IdentifierExpression expression, object data)
+		{
+			if (IsField(expression.Identifier)) {
+				return new CodeFieldReferenceExpression(new CodeThisReferenceExpression(),
+				                                        expression.Identifier);
+			}
+			return new CodeVariableReferenceExpression(expression.Identifier);
+		}
+		
+		public override object Visit(GetTypeExpression getTypeExpression, object data)
+		{
+			// TODO
+			return null;
+		}
+		
+		public override object Visit(TypeReferenceExpression typeReferenceExpression, object data)
+		{
+			return null;
+		}
+		
+		public override object Visit(ClassReferenceExpression classReferenceExpression, object data)
+		{
+			//TODO
+			return null;
+		}
+		
+		public override object Visit(LoopControlVariableExpression loopControlVariableExpression, object data)
+		{
+			//TODO
+			return null;
+		}
+		
+		public override object Visit(NamedArgumentExpression namedParameterExpression, object data)
+		{
+			//TODO
+			return null;
+		}
+		
+		public override object Visit(UnaryOperatorExpression unaryOperatorExpression, object data)
+		{
+			switch (unaryOperatorExpression.Op) {
+				case UnaryOperatorType.Minus:
+					if (unaryOperatorExpression.Expression is PrimitiveExpression) {
+						PrimitiveExpression expression = (PrimitiveExpression)unaryOperatorExpression.Expression;
+						if (expression.Value is int) {
+							return new CodePrimitiveExpression(- (int)expression.Value);
+						}
+						if (expression.Value is long) {
+							return new CodePrimitiveExpression(- (long)expression.Value);
+						}
+						if (expression.Value is double) {
+							return new CodePrimitiveExpression(- (double)expression.Value);
+						}
+						if (expression.Value is float) {
+							return new CodePrimitiveExpression(- (float)expression.Value);
+						}
+						
+					} 
+					return  new CodeBinaryOperatorExpression(new CodePrimitiveExpression(0),
+			                                        CodeBinaryOperatorType.Subtract,
+			                                        (CodeExpression)unaryOperatorExpression.Expression.AcceptVisitor(this, data));
+				case UnaryOperatorType.Plus:
+					return unaryOperatorExpression.Expression.AcceptVisitor(this, data);
+			}
+			return null;
+		}
+		bool methodReference = false;
+		public override object Visit(AssignmentExpression assignmentExpression, object data)
+		{
+			if (assignmentExpression.Op == AssignmentOperatorType.Add) {
+				
+				methodReference = true;
+				CodeExpression methodInvoker = (CodeExpression)assignmentExpression.Right.AcceptVisitor(this, null);
+				methodReference = false;
+				
+				if (assignmentExpression.Left is IdentifierExpression) {
+					currentMethod.Statements.Add(new CodeAttachEventStatement(new CodeEventReferenceExpression(new CodeThisReferenceExpression(), ((IdentifierExpression)assignmentExpression.Left).Identifier),
+					                                                          methodInvoker));
+				} else {
+					FieldReferenceOrInvocationExpression fr = (FieldReferenceOrInvocationExpression)assignmentExpression.Left;
+					
+					currentMethod.Statements.Add(new CodeAttachEventStatement(new CodeEventReferenceExpression((CodeExpression)fr.TargetObject.AcceptVisitor(this, data), fr.FieldName),
+					                                                          methodInvoker));
+				}
+			} else {
+				if (assignmentExpression.Left is IdentifierExpression) {
+					currentMethod.Statements.Add(new CodeAssignStatement((CodeExpression)assignmentExpression.Left.AcceptVisitor(this, null), (CodeExpression)assignmentExpression.Right.AcceptVisitor(this, null)));
+				} else {
+					currentMethod.Statements.Add(new CodeAssignStatement((CodeExpression)assignmentExpression.Left.AcceptVisitor(this, null), (CodeExpression)assignmentExpression.Right.AcceptVisitor(this, null)));
+					
+				}
+			}
+			return null;
+		}
+		
+		public override object Visit(AddressOfExpression addressOfExpression, object data)
+		{
+			if (addressOfExpression.Procedure is FieldReferenceOrInvocationExpression) {
+				FieldReferenceOrInvocationExpression fr = (FieldReferenceOrInvocationExpression)addressOfExpression.Procedure;
+				return new CodeObjectCreateExpression("System.EventHandler", new CodeExpression[] {
+					new CodeMethodReferenceExpression((CodeExpression)fr.TargetObject.AcceptVisitor(this, null),
+					                                        fr.FieldName)
+				});
+			}
+			return addressOfExpression.Procedure.AcceptVisitor(this, null);
+		}
+		
+		public override object Visit(TypeOfExpression typeOfExpression, object data)
+		{
+			return new CodeTypeOfExpression(ConvType(typeOfExpression.Type.Type));
+		}
+		
+		public override object Visit(CastExpression castExpression, object data)
+		{
+			string typeRef = ConvType(castExpression.CastTo.Type);
+			return new CodeCastExpression(typeRef, (CodeExpression)castExpression.Expression.AcceptVisitor(this, data));
+		}
+		
+		public override object Visit(ThisReferenceExpression thisReferenceExpression, object data)
+		{
+			return new CodeThisReferenceExpression();
+		}
+		
+		public override object Visit(BaseReferenceExpression baseReferenceExpression, object data)
+		{
+			return new CodeBaseReferenceExpression();
+		}
+		
+		public override object Visit(ArrayCreateExpression arrayCreateExpression, object data)
+		{
+			if (arrayCreateExpression.ArrayInitializer == null) {
+				return new CodeArrayCreateExpression(ConvType(arrayCreateExpression.CreateType.Type),
+				                                     0);
+			}
+			return new CodeArrayCreateExpression(ConvType(arrayCreateExpression.CreateType.Type),
+			                                     GetExpressionList(arrayCreateExpression.ArrayInitializer.CreateExpressions));
+		}
+		
+		public override object Visit(ObjectCreateExpression objectCreateExpression, object data)
+		{
+			return new CodeObjectCreateExpression(ConvType(objectCreateExpression.CreateType.Type),
+			                                      GetExpressionList(objectCreateExpression.Parameters));
+		}
+		
+		public override object Visit(ParameterDeclarationExpression parameterDeclarationExpression, object data)
+		{
+			return new CodeParameterDeclarationExpression(new CodeTypeReference(ConvType(parameterDeclarationExpression.TypeReference.Type)), parameterDeclarationExpression.ParameterName);
+		}
+		
+		bool IsField(string type, string fieldName)
+		{
+			Type t       = null;
+			Assembly asm = null;
+			
+			t = this.GetType(type);
+			if (t == null) {
+				asm = typeof(System.Drawing.Point).Assembly;
+				t = asm.GetType(type);
+			}
+			
+			//necessary?
+//			if (t == null) {
+//				asm = typeof(System.Windows.Forms.Control).Assembly;
+//				t = asm.GetType(type);
+//			}
+			
+			if (t == null) {
+				asm = typeof(System.String).Assembly;
+				t = asm.GetType(type);
+			}
+			
+			bool isField = t != null && (t.IsEnum || t.GetField(fieldName) != null);
+			if (!isField) {
+				int idx = type.LastIndexOf('.');
+				if (idx >= 0) {
+					type = type.Substring(0, idx) + "+" + type.Substring(idx + 1);
+					isField = IsField(type, fieldName);
+				}
+			}
+			return isField;
+		}
+		
+		bool IsFieldReferenceExpression(FieldReferenceOrInvocationExpression fieldReferenceExpression)
+		{
+			if (fieldReferenceExpression.TargetObject is ThisReferenceExpression) {
+				foreach (object o in this.currentTypeDeclaration.Children) {
+					if (o is FieldDeclaration) {
+						FieldDeclaration fd = (FieldDeclaration)o;
+						foreach (VariableDeclaration field in fd.Fields) {
+							if (fieldReferenceExpression.FieldName.ToUpper() == field.Name.ToUpper()) {
+								return true;
+							}
+						}
+					}
+				}
+			}
+			return false; //Char.IsLower(fieldReferenceExpression.FieldName[0]);
+		}
+		
+		public override object Visit(FieldReferenceOrInvocationExpression fieldReferenceExpression, object data)
+		{
+			if (methodReference) {
+				methodReference = false;
+				return new CodeMethodReferenceExpression((CodeExpression)fieldReferenceExpression.TargetObject.AcceptVisitor(this, data), fieldReferenceExpression.FieldName);
+			}
+			if (IsFieldReferenceExpression(fieldReferenceExpression)) {
+				return new CodeFieldReferenceExpression((CodeExpression)fieldReferenceExpression.TargetObject.AcceptVisitor(this, data),
+				                                        fieldReferenceExpression.FieldName);
+			} else {
+				if (fieldReferenceExpression.TargetObject is FieldReferenceOrInvocationExpression) {
+					if (IsQualIdent((FieldReferenceOrInvocationExpression)fieldReferenceExpression.TargetObject)) {
+						CodeTypeReferenceExpression typeRef = ConvertToIdentifier((FieldReferenceOrInvocationExpression)fieldReferenceExpression.TargetObject);
+						if (IsField(typeRef.Type.BaseType, fieldReferenceExpression.FieldName)) {
+							return new CodeFieldReferenceExpression(typeRef,
+							                                        fieldReferenceExpression.FieldName);
+						} else {
+							return new CodePropertyReferenceExpression(typeRef,
+							                                           fieldReferenceExpression.FieldName);
+						}
+					}
+				}
+				
+				CodeExpression codeExpression = (CodeExpression)fieldReferenceExpression.TargetObject.AcceptVisitor(this, data);
+				return new CodePropertyReferenceExpression(codeExpression,
+				                                           fieldReferenceExpression.FieldName);
+			}
+		}
+		
+		public override object Visit(ArrayInitializerExpression arrayInitializerExpression, object data)
+		{
+			return null;
+		}
+#endregion
+		
+		bool IsQualIdent(FieldReferenceOrInvocationExpression fieldReferenceExpression)
+		{
+			while (fieldReferenceExpression.TargetObject is FieldReferenceOrInvocationExpression) {
+				fieldReferenceExpression = (FieldReferenceOrInvocationExpression)fieldReferenceExpression.TargetObject;
+			}
+			return fieldReferenceExpression.TargetObject is IdentifierExpression;
+		}
+		
+		bool IsField(string identifier)
+		{
+			foreach (INode node in currentTypeDeclaration.Children) {
+				if (node is FieldDeclaration) {
+					FieldDeclaration fd = (FieldDeclaration)node;
+					if (fd.GetVariableDeclaration(identifier) != null) {
+						return true;
+					}
+				}
+			}
+			return false;
+		}
+		
+		CodeTypeReferenceExpression ConvertToIdentifier(FieldReferenceOrInvocationExpression fieldReferenceExpression)
+		{
+			string type = String.Empty;
+			
+			while (fieldReferenceExpression.TargetObject is FieldReferenceOrInvocationExpression) {
+				type = "."  + fieldReferenceExpression.FieldName + type;
+				fieldReferenceExpression = (FieldReferenceOrInvocationExpression)fieldReferenceExpression.TargetObject;
+			}
+			
+			type = "."  + fieldReferenceExpression.FieldName + type;
+			
+			if (fieldReferenceExpression.TargetObject is IdentifierExpression) {
+				type = ((IdentifierExpression)fieldReferenceExpression.TargetObject).Identifier + type;
+				string oldType = type;
+				int idx = type.LastIndexOf('.');
+				while (idx >= 0) {
+					if (Type.GetType(type) != null) {
+						break;
+					}
+					type = type.Substring(0, idx) + "+" + type.Substring(idx + 1);
+					idx = type.LastIndexOf('.');
+				}
+				if (Type.GetType(type) == null) {
+					type = oldType;
+				}
+				return new CodeTypeReferenceExpression(type);
+			} else {
+				throw new Exception();
+			}
+		}
+		
+		CodeExpression[] GetExpressionList(ArrayList expressionList)
+		{
+			if (expressionList == null) {
+				return new CodeExpression[0];
+			}
+			CodeExpression[] list = new CodeExpression[expressionList.Count];
+			for (int i = 0; i < expressionList.Count; ++i) {
+				if (expressionList[i] != null) {
+					list[i] = (CodeExpression)((Expression)expressionList[i]).AcceptVisitor(this, null);
+				}
+				if (list[i] == null) {
+					list[i] = new CodePrimitiveExpression(0);
+				}
+			}
+			return list;
+		}
+
+		Type GetType(string typeName)
+		{
+			foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies()) 
+			{
+				Type type = asm.GetType(typeName);
+				if (type != null) 
+				{
+					return type;
+				}
+			}
+			return Type.GetType(typeName);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Lexer.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Lexer.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Lexer.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,887 @@
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Andrea Paatz" email="andrea at icsharpcode.net"/>
+//     <version value="$version"/>
+// </file>
+
+using System;
+using System.Collections;
+using System.Drawing;
+using System.Diagnostics;
+using System.Globalization;
+using System.Text;
+using ICSharpCode.SharpRefactory.Parser;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+	public class Token
+	{
+		public int kind;
+		
+		public int col;
+		public int line;
+		
+		public object    literalValue = null;
+		public string    val;
+		public Token     next;
+		public ArrayList specials;
+		
+		public Point EndLocation {
+			get {
+				return new Point(col + val.Length - 1, line);
+			}
+		}
+		
+		public Point Location {
+			get {
+				return new Point(col, line);
+			}
+		}
+		
+		public Token()
+		{
+		}
+		
+		public Token(int kind)
+		{
+			this.kind = kind;
+		}
+		
+		public Token(int kind, int col, int line, string val)
+		{
+			this.kind = kind;
+			this.col  = col;
+			this.line = line;
+			this.val  = val;
+		}
+		
+		public Token(int kind, int col, int line, string val, object literalValue)
+		{
+			this.kind         = kind;
+			this.col          = col;
+			this.line         = line;
+			this.val          = val;
+			this.literalValue = literalValue;
+		}
+	}
+	
+	public class Lexer
+	{
+		IReader reader;
+		static  Hashtable keywords = new Hashtable();
+		
+		int col  = 1;
+		int line = 1;
+		
+		bool lineEnd = false;
+		
+		Errors errors   = new Errors();
+		
+		SpecialTracker specialTracker = new SpecialTracker();
+		
+		Token lastToken = null;
+		Token curToken  = null;
+		Token peekToken = null;
+		
+		string[]       specialCommentTags = null;
+		Hashtable      specialCommentHash = null;
+		ArrayList      tagComments = new ArrayList();
+		
+		public ArrayList TagComments
+		{
+			get {
+				return tagComments;
+			}
+		}
+		
+		public string[] SpecialCommentTags
+		{
+			get {
+				return specialCommentTags;
+			}
+			set {
+				specialCommentTags = value;
+				specialCommentHash = new Hashtable();
+				if (specialCommentTags != null) {
+					foreach (string str in specialCommentTags) {
+						specialCommentHash[str] = 0;
+					}
+				}
+			}
+		}
+		
+		public SpecialTracker SpecialTracker
+		{
+			get {
+				return specialTracker;
+			}
+		}
+		
+		public Errors Errors
+		{
+			get {
+				return errors;
+			}
+		}
+		
+		public Token Token
+		{
+			get {
+				return lastToken;
+			}
+		}
+		
+		public Token LookAhead
+		{
+			get {
+				return curToken;
+			}
+		}
+		
+		public void StartPeek()
+		{
+			peekToken = curToken;
+		}
+		
+		public Token Peek()
+		{
+			if (peekToken.next == null) {
+				peekToken.next = Next();
+				specialTracker.InformToken(peekToken.next.kind);
+			}
+			peekToken = peekToken.next;
+			return peekToken;
+		}
+		
+		public Token NextToken()
+		{
+			if (curToken == null) { // first call of NextToken()
+				curToken = Next();
+				specialTracker.InformToken(curToken.kind);
+				return curToken;
+			}
+			
+			lastToken = curToken;
+			
+			if (curToken.next == null) {
+				curToken.next = Next();
+				specialTracker.InformToken(curToken.next.kind);
+			}
+			
+			curToken = curToken.next;
+			
+			if (curToken.kind == Tokens.EOF && !(lastToken.kind == Tokens.EOL)) { // be sure that before EOF there is an EOL token
+				curToken = new Token(Tokens.EOL, curToken.col, curToken.line, "\n");
+				curToken.next = new Token(Tokens.EOF, curToken.col, curToken.line, "\n");
+				specialTracker.InformToken(curToken.next.kind);
+			}
+			
+			return curToken;
+		}
+		
+		public ArrayList RetriveComments()
+		{
+			return specialTracker.RetrieveSpecials();
+		}
+		
+//		public ArrayList RetrieveSpecials()
+//		{
+//			if (lastToken == null) {
+//				return this.specialTracker.RetrieveSpecials();
+//			}
+//			
+//			Debug.Assert(lastToken.specials != null);
+//			
+//			ArrayList tmp = lastToken.specials;
+//			lastToken.specials = null;
+//			return tmp;
+//		}
+//		
+		public Lexer(IReader reader)
+		{
+			this.reader = reader;
+		}
+		
+		public Token Next()
+		{
+			while (!reader.Eos()) {
+
+				char ch = reader.GetNext();
+		
+				++col;
+				if (Char.IsWhiteSpace(ch)) {
+				
+					if (ch == '\n') {
+						int x = col - 1;
+						int y = line;
+						++line;
+						col = 1;
+						if (reader.Peek() == '\r') {
+							reader.GetNext();
+							if (!lineEnd) {
+								lineEnd = true;
+								return new Token(Tokens.EOL, x -1 , y, "\n\r");
+							}
+						}
+						if (!lineEnd) {
+							lineEnd = true;
+							return new Token(Tokens.EOL, x, y, "\n");
+						}
+					}
+					continue;
+
+				}
+				if (ch == '_') {
+					if (reader.Eos()) {
+						errors.Error(line, col, String.Format("No EOF expected after _"));
+					}
+					ch = reader.GetNext();
+					++col;
+					if (!Char.IsWhiteSpace(ch)) {
+						reader.UnGet();
+						--col;
+						int x = col;
+						int y = line;
+						string s = ReadIdent('_');
+						lineEnd = false;
+
+						return new Token(Tokens.Identifier, x, y, s);
+					}
+					while (Char.IsWhiteSpace(ch)) {
+						if (ch == '\n') {
+							++line;
+							col = 0;
+							break;
+						}
+						if (!reader.Eos()) {
+							ch = reader.GetNext();
+							++col;
+						}
+					}
+					if (ch != '\n') {
+						errors.Error(line, col, String.Format("Return expected"));
+					}
+					continue;
+				}
+				
+				if (ch == '#') {
+					while (Char.IsWhiteSpace(reader.Peek())) {
+						++col;
+						reader.GetNext();
+					}
+					if (Char.IsDigit(reader.Peek())) {
+						int x = col;
+						int y = line;
+						string s = ReadDate();
+						DateTime time = DateTime.Now;
+						try {
+							time = System.DateTime.Parse(s, System.Globalization.CultureInfo.InvariantCulture);
+						} catch (Exception e) {
+							errors.Error(line, col, String.Format("Invalid date time {0}", e));
+						}
+						return new Token(Tokens.LiteralDate, x, y, s, time);
+					} else {
+						ReadPreprocessorDirective();
+						continue;
+					}
+				}
+				
+				if (ch == '[') { // Identifier
+					lineEnd = false;
+					if (reader.Eos()) {
+						errors.Error(line, col, String.Format("Identifier expected"));
+					}
+					ch = reader.GetNext();
+					++col;
+					if (ch == ']' || Char.IsWhiteSpace(ch)) {
+						errors.Error(line, col, String.Format("Identifier expected"));
+					}
+					int x = col - 1;
+					int y = line;
+					string s = ReadIdent(ch);
+					if (reader.Eos()) {
+						errors.Error(line, col, String.Format("']' expected"));
+					}
+					ch = reader.GetNext();
+					++col;
+					if (!(ch == ']')) {
+						errors.Error(line, col, String.Format("']' expected"));
+					}
+//					Console.WriteLine(">" + s + "<");
+					return new Token(Tokens.Identifier, x, y, s);
+				}
+				if (Char.IsLetter(ch)) {
+					int x = col - 1;
+					int y = line;
+					string s = ReadIdent(ch);
+					if (Keywords.IsKeyword(s)) {
+						lineEnd = false;
+						return new Token(Keywords.GetToken(s), x, y, s);
+					}
+					
+					// handle 'REM' comments 
+					if (s.ToUpper() == "REM") {
+						ReadComment();
+						if (!lineEnd) {
+							lineEnd = true;
+							return new Token(Tokens.EOL, x, y, "\n");
+						}
+						continue;
+					}
+						
+					lineEnd = false;
+					return new Token(Tokens.Identifier, x, y, s);
+				
+				}
+				if (Char.IsDigit(ch)) {
+					lineEnd = false;
+					return ReadDigit(ch, col);
+				}
+				if (ch == '&') {
+					lineEnd = false;
+					if (reader.Eos()) {
+						return ReadOperator('&');
+					}
+					ch = reader.GetNext();
+					++col;
+					if (Char.ToUpper(ch) == 'H' || Char.ToUpper(ch) == 'O') {
+						reader.UnGet();
+						--col;
+						return ReadDigit('&', col);
+					} else {
+						reader.UnGet();
+						return ReadOperator('&');
+					}
+				}
+				if (ch == '\'') {
+					int x = col - 1;
+					int y = line;
+					ReadComment();
+					if (!lineEnd) {
+						lineEnd = true;
+						return new Token(Tokens.EOL, x, y, "\n");
+					}
+					continue;
+				}
+				if (ch == '"') {
+					lineEnd = false;
+					int x = col - 1;
+					int y = line;
+					string s = ReadString();
+					if (!reader.Eos() && (reader.Peek() == 'C' || reader.Peek() == 'c')) {
+						reader.GetNext();
+						++col;
+						if (s.Length != 1) {
+							errors.Error(line, col, String.Format("Chars can only have Length 1 "));
+						}
+						return new Token(Tokens.LiteralCharacter, x, y, String.Concat('"', s , "\"C") , s[0]);
+					}
+					return new Token(Tokens.LiteralString, x, y,  String.Concat('"', s , '"'), s);
+				}
+				Token token = ReadOperator(ch);
+				if (token != null) {
+					lineEnd = false;
+					return token;
+				}
+				errors.Error(line, col, String.Format("Unknown char({0}) which can't be read", ch));
+			}
+			
+			return new Token(Tokens.EOF);
+		}
+		
+		string ReadIdent(char ch) 
+		{
+			StringBuilder s = new StringBuilder(ch.ToString());
+			while (!reader.Eos() && (Char.IsLetterOrDigit(ch = reader.GetNext()) || ch == '_')) {
+				++col;
+				s.Append(ch.ToString());
+			}
+			++col;
+			if (reader.Eos()) {
+				--col;
+				return s.ToString();
+			}
+			reader.UnGet();
+			--col;
+			if (!reader.Eos() && "%&@!#$".IndexOf(Char.ToUpper(reader.Peek())) != -1) {
+				reader.GetNext();
+				++col;
+			}
+			return s.ToString();
+		}
+		
+		Token ReadDigit(char ch, int x)
+		{
+			StringBuilder sb = new StringBuilder(ch.ToString());
+			int y = line;
+			string digit = "";
+			if (ch != '&') {
+				digit += ch;
+			}
+			
+			bool ishex      = false;
+			bool isokt      = false;
+			bool issingle   = false;
+			bool isdouble   = false;
+			bool isdecimal  = false;
+			
+			if (reader.Eos()) {
+				if (ch == '&') {
+					errors.Error(line, col, String.Format("digit expected"));
+				}
+				return new Token(Tokens.LiteralInteger, x, y, sb.ToString() ,ch - '0');
+			}
+			if (ch == '&' && Char.ToUpper(reader.Peek()) == 'H') {
+				const string hex = "0123456789ABCDEF";
+				sb.Append(reader.GetNext()); // skip 'H'
+				++col;
+				while (!reader.Eos() && hex.IndexOf(Char.ToUpper(reader.Peek())) != -1) {
+					ch = reader.GetNext();
+					sb.Append(ch); 
+					digit += Char.ToUpper(ch);
+					++col;
+				}
+				ishex = true;
+			} else if (!reader.Eos() && ch == '&' && Char.ToUpper(reader.Peek()) == 'O') {
+				const string okt = "01234567";
+				sb.Append(reader.GetNext()); // skip 'O'
+				++col;
+				while (!reader.Eos() && okt.IndexOf(Char.ToUpper(reader.Peek())) != -1) {
+					ch = reader.GetNext();
+					sb.Append(ch); 
+					digit += Char.ToUpper(ch);
+					++col;
+				}
+				isokt = true;
+			} else {
+				while (!reader.Eos() && Char.IsDigit(reader.Peek())) {
+					ch = reader.GetNext();;
+					digit += ch;
+					sb.Append(ch);
+					++col;
+				}
+			}
+			if (!reader.Eos() && "%&SIL".IndexOf(Char.ToUpper(reader.Peek())) != -1 || ishex || isokt) {
+				ch = reader.GetNext();
+				sb.Append(ch); 
+				ch = Char.ToUpper(ch);
+				++col;
+				if (isokt) {
+					long number = 0L;
+					for (int i = 0; i < digit.Length; ++i) {
+						number = number * 8 + digit[i] - '0';
+					}
+					if (ch == 'S') {
+						return new Token(Tokens.LiteralSingle, x, y, sb.ToString(), (short)number);
+					} else if (ch == '%' || ch == 'I') {
+						return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), (int)number);
+					} else if (ch == '&' || ch == 'L') {
+						return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), (long)number);
+					} else {
+						if (number > int.MaxValue || number < int.MinValue) {
+							return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), (long)number);
+						} else {
+							return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), (int)number);
+						}
+					}
+				}
+				if (ch == 'S') {
+					return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), Int16.Parse(digit, ishex ? NumberStyles.HexNumber : NumberStyles.Number));
+				} else if (ch == '%' || ch == 'I') {
+					return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), Int32.Parse(digit, ishex ? NumberStyles.HexNumber : NumberStyles.Number));
+				} else if (ch == '&' || ch == 'L') {
+					return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), Int64.Parse(digit, ishex ? NumberStyles.HexNumber : NumberStyles.Number));
+				} else if (ishex) {
+					reader.UnGet();
+					--col;
+					long number = Int64.Parse(digit, NumberStyles.HexNumber);
+					if (number > int.MaxValue || number < int.MinValue) {
+						return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), number);
+					} else {
+						return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), (int)number);
+					}
+				}
+			}
+			if (!reader.Eos() && reader.Peek() == '.') { // read floating point number
+				reader.GetNext();
+				if (!Char.IsDigit(reader.Peek())) {
+					reader.UnGet();
+				} else {
+					isdouble = true; // double is default
+					if (ishex || isokt) {
+						errors.Error(line, col, String.Format("No hexadecimal or oktadecimal floating point values allowed"));
+					}
+					digit += '.';
+					++col;
+					while (!reader.Eos() && Char.IsDigit(reader.Peek())){ // read decimal digits beyond the dot
+						digit += reader.GetNext();
+						++col;
+					}
+				}
+			}
+			
+			if (!reader.Eos() && Char.ToUpper(reader.Peek()) == 'E') { // read exponent
+				isdouble = true;
+				digit +=  reader.GetNext();
+				++col;
+				if (!reader.Eos() && (reader.Peek() == '-' || reader.Peek() == '+')) {
+					digit += reader.GetNext();
+					++col;
+				}
+				while (!reader.Eos() && Char.IsDigit(reader.Peek())) { // read exponent value
+					digit += reader.GetNext();
+					++col;
+				}
+			}
+			
+			if (!reader.Eos()) {
+				if (Char.ToUpper(reader.Peek()) == 'R' || Char.ToUpper(reader.Peek()) == '#') { // double type suffix (obsolete, double is default)
+					reader.GetNext();
+					++col;
+					isdouble = true;
+				} else if (Char.ToUpper(reader.Peek()) == 'D' || Char.ToUpper(reader.Peek()) == '@') { // decimal value
+					reader.GetNext();
+					++col;
+					isdecimal = true;
+				} else if (Char.ToUpper(reader.Peek()) == 'F' || Char.ToUpper(reader.Peek()) == '!') { // decimal value
+					reader.GetNext();
+					++col;
+					issingle = true;
+				}
+			}
+			
+			if (issingle) {
+				NumberFormatInfo mi = new NumberFormatInfo();
+				mi.CurrencyDecimalSeparator = ".";
+				return new Token(Tokens.LiteralSingle, x, y, sb.ToString(), Single.Parse(digit, mi));
+			}
+			if (isdecimal) {
+				NumberFormatInfo mi = new NumberFormatInfo();
+				mi.CurrencyDecimalSeparator = ".";
+				return new Token(Tokens.LiteralDecimal, x, y, sb.ToString(), Decimal.Parse(digit, mi));
+			}
+			if (isdouble) {
+				NumberFormatInfo mi = new NumberFormatInfo();
+				mi.CurrencyDecimalSeparator = ".";
+				return new Token(Tokens.LiteralDouble, x, y, sb.ToString(), Double.Parse(digit, mi));
+			}
+			try {
+				return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), Int32.Parse(digit, ishex ? NumberStyles.HexNumber : NumberStyles.Number));
+			} catch (Exception) {
+				try {
+					return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), Int64.Parse(digit, ishex ? NumberStyles.HexNumber : NumberStyles.Number));
+				} catch (Exception) {
+					errors.Error(line, col, String.Format("{0} is not a parseable number (too long?)", sb.ToString()));
+					// fallback, when nothing helps :)
+					return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), 0);
+				}
+			}
+		}
+		
+		void ReadPreprocessorDirective()
+		{
+			Point start = new Point(col - 1, line);
+			string directive = ReadIdent('#');
+			string argument  = ReadToEOL();
+			this.specialTracker.AddPreProcessingDirective(directive, argument.Trim(), start, new Point(start.X + directive.Length + argument.Length, start.Y));
+		}
+		
+		string ReadToEOL()
+		{
+			StringBuilder sb = new StringBuilder();
+			if (!reader.Eos()) {
+				char ch = reader.GetNext();
+				while (!reader.Eos()) {
+					if (ch == '\r') {
+						if (reader.Peek() == '\n') {
+							ch = reader.GetNext();
+						}
+					}
+					if (ch == '\n') {
+						++line;
+						col = 1;
+						return sb.ToString();
+					} else {
+						sb.Append(ch);
+					}
+					ch = reader.GetNext();
+					++col;
+				}
+			}
+			return sb.ToString();
+		}
+		
+		string ReadDate()
+		{
+			char ch = '\0';
+			StringBuilder sb = new StringBuilder();
+			while (!reader.Eos()) {
+				ch = reader.GetNext();
+				++col;
+				if (ch == '#') {
+					break;
+				} else if (ch == '\n') {
+					errors.Error(line, col, String.Format("No return allowed inside Date literal"));
+				} else {
+					sb.Append(ch);
+				}
+			}
+			if (ch != '#') {
+				errors.Error(line, col, String.Format("End of File reached before Date literal terminated"));
+			}
+			return sb.ToString();
+		}
+		
+		string ReadString()
+		{
+			char ch = '\0';
+			StringBuilder s = new StringBuilder();
+			while (!reader.Eos()) {
+				ch = reader.GetNext();
+				++col;
+				if (ch == '"') {
+					if (!reader.Eos() && reader.Peek() == '"') {
+						s.Append('"');
+						reader.GetNext();
+						++col;
+					} else {
+						break;
+					}
+				} else if (ch == '\n') {
+					errors.Error(line, col, String.Format("No return allowed inside String literal"));
+				} else {
+					s.Append(ch);
+				}
+			}
+			if (ch != '"') {
+				errors.Error(line, col, String.Format("End of File reached before String terminated "));
+			}
+			return s.ToString();
+		}
+		
+		protected bool HandleLineEnd(char ch)
+		{
+			if (WasLineEnd(ch)) {
+				++line;
+				col = 1;
+				return true;
+			}
+			return false;
+		}
+		
+		protected bool WasLineEnd(char ch)
+		{
+			// Handle MS-DOS or MacOS line ends.
+			if (ch == '\r') {
+				if (reader.Peek() == '\n') { // MS-DOS line end '\r\n'
+					ch = (char)reader.GetNext();
+				} else { // assume MacOS line end which is '\r'
+					ch = '\n';
+				}
+			}
+			return ch == '\n';
+		}
+		
+		void ReadComment()
+		{
+			StringBuilder curWord = new StringBuilder();
+			StringBuilder comment = new StringBuilder();
+			
+			int x = col;
+			int y = line;
+			int nextChar;
+			while ((nextChar = reader.GetNext()) != -1) {
+				char ch = (char)nextChar;
+				comment.Append(ch);
+				++col;
+				if (HandleLineEnd(ch) || nextChar == 0) {
+					specialTracker.StartComment(CommentType.SingleLine, new Point(col, line));
+					specialTracker.AddString(comment.ToString());
+					specialTracker.FinishComment();
+					return;
+				}
+				
+				if (Char.IsLetter(ch)) {
+					curWord.Append(ch);
+				} else {
+					string tag = curWord.ToString();
+					curWord = new StringBuilder();
+					if (specialCommentHash != null && specialCommentHash[tag] != null) {
+						Point p = new Point(col, line);
+						string commentStr = ReadToEOL();
+						tagComments.Add(new TagComment(tag, commentStr, p));
+						return;
+					}
+				}
+			}
+		}
+		
+		Token ReadOperator(char ch)
+		{
+			int x = col;
+			int y = line;
+			switch(ch) {
+				case '+':
+					if (!reader.Eos()) {
+						switch (reader.GetNext()) {
+							case '=':
+								++col;
+								return new Token(Tokens.PlusAssign, x, y, "+=");
+							default:
+								reader.UnGet();
+								break;
+						}
+					}
+					return new Token(Tokens.Plus, x, y, "+");
+				case '-':
+					if (!reader.Eos()) {
+						switch (reader.GetNext()) {
+							case '=':
+								++col;
+								return new Token(Tokens.MinusAssign, x, y, "-=");
+							default:
+								reader.UnGet();
+								break;
+						}
+					}
+					return new Token(Tokens.Minus, x, y, "-");
+				case '*':
+					if (!reader.Eos()) {
+						switch (reader.GetNext()) {
+							case '=':
+								++col;
+								return new Token(Tokens.TimesAssign, x, y, "*=");
+							default:
+								reader.UnGet();
+								break;
+						}
+					}
+					return new Token(Tokens.Times, x, y, "*");
+				case '/':
+					if (!reader.Eos()) {
+						switch (reader.GetNext()) {
+							case '=':
+								++col;
+								return new Token(Tokens.DivAssign, x, y, "/=");
+							default:
+								reader.UnGet();
+								break;
+						}
+					}
+					return new Token(Tokens.Div, x, y, "/");
+				case '\\':
+					switch (reader.GetNext()) {
+							case '=':
+								++col;
+								return new Token(Tokens.DivIntegerAssign, x, y, "\\=");
+							default:
+								reader.UnGet();
+								break;
+						}
+					return new Token(Tokens.DivInteger, x, y, "\\");
+				case '&':
+					if (!reader.Eos()) {
+						switch (reader.GetNext()) {
+							case '=':
+								++col;
+								return new Token(Tokens.ConcatStringAssign, x, y, "&=");
+							default:
+								reader.UnGet();
+								break;
+						}
+					}
+					return new Token(Tokens.ConcatString, x, y, "&");
+				case '^':
+					switch (reader.GetNext()) {
+							case '=':
+								++col;
+								return new Token(Tokens.PowerAssign, x, y, "^=");
+							default:
+								reader.UnGet();
+								break;
+						}
+					return new Token(Tokens.Power, x, y, "^");
+				case ':':
+					return new Token(Tokens.Colon, x, y, ":");
+				case '=':
+					return new Token(Tokens.Assign, x, y, "=");
+				case '<':
+					if (!reader.Eos()) {
+						switch (reader.GetNext()) {
+							case '=':
+								++col;
+								return new Token(Tokens.LessEqual, x, y, "<=");
+							case '>':
+								++col;
+								return new Token(Tokens.NotEqual, x, y, "<>");
+							case '<':
+								if (!reader.Eos()) {
+									switch (reader.GetNext()) {
+										case '=':
+											col += 2;
+											return new Token(Tokens.ShiftLeftAssign, x, y, "<<=");
+										default:
+											++col;
+											reader.UnGet();
+											break;
+									}
+								}
+								return new Token(Tokens.ShiftLeft, x, y, "<<");
+							default:
+								reader.UnGet();
+								return new Token(Tokens.LessThan, x, y, "<");
+						}
+					}
+					return new Token(Tokens.LessThan, x, y, "<");
+				case '>':
+					if (!reader.Eos()) {
+						switch (reader.GetNext()) {
+							case '=':
+								++col;
+								return new Token(Tokens.GreaterEqual, x, y, ">=");
+							case '>':
+								if (!reader.Eos()) {
+									switch (reader.GetNext()) {
+										case '=':
+											col += 2;
+											return new Token(Tokens.ShiftRightAssign, x, y, ">>=");
+										default:
+											++col;
+											reader.UnGet();
+											break;
+									}
+								}
+								return new Token(Tokens.ShiftRight, x, y, ">>");
+							default:
+								reader.UnGet();
+								return new Token(Tokens.GreaterThan, x, y, ">");
+						}
+					}
+					return new Token(Tokens.GreaterThan, x, y, "<=");
+				case ',':
+					return new Token(Tokens.Comma, x, y, ",");
+				case '.':
+					if (Char.IsDigit(reader.Peek())) {
+						 reader.UnGet();
+						 --col;
+						 return ReadDigit('0', col);
+					}
+					return new Token(Tokens.Dot, x, y, ".");
+				case '(':
+					return new Token(Tokens.OpenParenthesis, x, y, "(");
+				case ')':
+					return new Token(Tokens.CloseParenthesis, x, y, ")");
+				case '{':
+					return new Token(Tokens.OpenCurlyBrace, x, y, "{");
+				case '}':
+					return new Token(Tokens.CloseCurlyBrace, x, y, "}");
+				case '[':
+					return new Token(Tokens.OpenSquareBracket, x, y, "[");
+				case ']':
+					return new Token(Tokens.CloseSquareBracket, x, y, "]");
+			}
+			return null;
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/FileReader.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/FileReader.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/FileReader.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,53 @@
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Andrea Paatz" email="andrea at icsharpcode.net"/>
+//     <version value="$version"/>
+// </file>
+
+using System;
+using System.IO;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+	public class FileReader : IReader
+	{
+		string file = null;
+		int    ptr  = 0;
+		
+		public FileReader(string filename)
+		{
+			StreamReader sreader = File.OpenText(filename);
+			file = sreader.ReadToEnd();
+			sreader.Close();
+		}
+		
+		public char GetNext()
+		{
+			if (Eos()) {
+				return '\0';
+//				throw new ParserException("warning : FileReader.GetNext : Read char over eos.", 0, 0);
+			}
+			return file[ptr++];
+		}
+		
+		public char Peek()
+		{
+			if (Eos()) {
+				return '\0';
+//				throw new ParserException("warning : FileReader.Peek : Read char over eos.", 0, 0);
+			}
+			return file[ptr];
+		}
+		
+		public void UnGet()
+		{
+			ptr = Math.Max(0, ptr -1);
+		}
+		
+		public bool Eos()
+		{
+			return ptr >= file.Length;
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/IReader.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/IReader.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/IReader.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,19 @@
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Andrea Paatz" email="andrea at icsharpcode.net"/>
+//     <version value="$version"/>
+// </file>
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+	public interface IReader
+	{
+		char GetNext();
+		char Peek();
+		
+		void UnGet();
+		
+		bool Eos();
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/StringReader.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/StringReader.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/StringReader.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,49 @@
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Andrea Paatz" email="andrea at icsharpcode.net"/>
+//     <version value="$version"/>
+// </file>
+
+using System;
+using System.IO;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+	public class StringReader : IReader
+	{
+		string data = null;
+		int    ptr  = 0;
+		
+		public StringReader(string data)
+		{
+			this.data = data;
+		}
+		
+		public char GetNext()
+		{
+			if (Eos()) {
+				return '\n';
+			}
+			return data[ptr++];
+		}
+		
+		public char Peek()
+		{
+			if (Eos()) {
+				return '\n';
+			}
+			return data[ptr];
+		}
+		
+		public void UnGet()
+		{
+			ptr = Math.Max(0, ptr -1);
+		}
+		
+		public bool Eos()
+		{
+			return ptr >= data.Length;
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/Comment.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/Comment.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/Comment.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,49 @@
+using System;
+using System.Text;
+using System.CodeDom;
+using System.Collections;
+using System.Drawing;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+	public class Comment
+	{
+		CommentType   commentType;
+		string        comment;
+		Point         startPosition;
+		
+		public CommentType CommentType {
+			get {
+				return commentType;
+			}
+			set {
+				commentType = value;
+			}
+		}
+		
+		public string CommentText {
+			get {
+				return comment;
+			}
+			set {
+				comment = value;
+			}
+		}
+		
+		public Point StartPosition {
+			get {
+				return startPosition;
+			}
+			set {
+				startPosition = value;
+			}
+		}
+		
+		public Comment(CommentType commentType, string comment, Point startPosition)
+		{
+			this.commentType   = commentType;
+			this.comment       = comment;
+			this.startPosition = startPosition;
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/CommentType.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/CommentType.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/CommentType.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,13 @@
+using System;
+using System.Text;
+using System.CodeDom;
+using System.Collections;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+	public enum CommentType
+	{
+		REM,
+		SingleLine
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/NewLine.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/NewLine.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/NewLine.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,14 @@
+using System;
+using System.Text;
+using System.CodeDom;
+using System.Collections;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+	public class NewLine
+	{
+		public NewLine()
+		{
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/PreProcessingDirective.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/PreProcessingDirective.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/PreProcessingDirective.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,61 @@
+using System;
+using System.Drawing;
+using System.Text;
+using System.CodeDom;
+using System.Collections;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+	public class PreProcessingDirective
+	{
+		string cmd;
+		string arg;
+		Point  start;
+		Point  end;
+		
+		public Point Start {
+			get {
+				return start;
+			}
+			set {
+				start = value;
+			}
+		}
+		
+		public Point End {
+			get {
+				return end;
+			}
+			set {
+				end = value;
+			}
+		}
+		
+		public string Cmd {
+			get {
+				return cmd;
+			}
+			set {
+				cmd = value;
+			}
+		}
+		
+		public string Arg {
+			get {
+				return arg;
+			}
+			set {
+				arg = value;
+			}
+		}
+		
+		public PreProcessingDirective(string cmd, string arg, Point start, Point end)
+		{
+			this.cmd = cmd;
+			this.arg = arg;
+			this.start = start;
+			this.end = end;
+		}
+	}
+}
+

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/SpecialTracker.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/SpecialTracker.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/SpecialTracker.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,79 @@
+using System;
+using System.Text;
+using System.CodeDom;
+using System.Collections;
+using System.Drawing;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+	public class SpecialTracker
+	{
+		ArrayList currentSpecials = new ArrayList();
+		ArrayList tempComments = new ArrayList();
+		
+		CommentType currentCommentType;
+		StringBuilder sb = new StringBuilder();
+		Point startPosition;
+		
+		public ArrayList CurrentSpecials
+		{
+			get {
+				return currentSpecials;
+			}
+		}
+		
+		public void InformToken(int kind)
+		{
+			currentSpecials.Add(kind);
+		}
+		
+		public ArrayList RetrieveSpecials()
+		{
+			ArrayList tmp = currentSpecials;
+			currentSpecials = new ArrayList();
+			return tmp;
+		}
+		
+		public ArrayList RetreiveComments()
+		{
+			ArrayList tmp = tempComments;
+			tempComments = new ArrayList();
+			return tmp;
+		}
+		
+		public void AddEndOfLine()
+		{
+			currentSpecials.Add(new NewLine());
+		}
+		
+		public void AddPreProcessingDirective(string cmd, string arg, Point start, Point end)
+		{
+			currentSpecials.Add(new PreProcessingDirective(cmd, arg, start, end));
+		}
+		
+		// used for comment tracking
+		public void StartComment(CommentType commentType, Point startPosition)
+		{
+			this.currentCommentType = commentType;
+			this.startPosition      = startPosition;
+			this.sb.Length          = 0; 
+		}
+		
+		public void AddChar(char c)
+		{
+			sb.Append(c);
+		}
+		
+		public void AddString(string s)
+		{
+			sb.Append(s);
+		}
+		
+		public void FinishComment()
+		{
+			Comment comment = new Comment(currentCommentType, sb.ToString(), startPosition);
+			currentSpecials.Add(comment);
+			tempComments.Add(comment);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/TagComment.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/TagComment.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/TagComment.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,30 @@
+using System;
+using System.Text;
+using System.CodeDom;
+using System.Collections;
+using System.Drawing;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+	/// <summary>
+	/// Description of TagComment.	
+	/// </summary>
+	public class TagComment : Comment
+	{
+		string tag;
+		
+		public string Tag {
+			get {
+				return tag;
+			}
+			set {
+				tag = value;
+			}
+		}
+		
+		public TagComment(string tag, string comment, Point startPosition) : base(CommentType.SingleLine, comment, startPosition)
+		{
+			this.tag = tag;
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Main.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Main.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Main.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,41 @@
+/*using System;
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+class MainClass
+{
+	public static void Main (string[] args) {
+		
+		string fileName = args[0];
+		
+		Console.WriteLine("Parsing source file {0}", fileName);
+		IReader reader = new FileReader(fileName);
+		Lexer lexer = new Lexer(reader);
+		
+//		while(true)
+//		{
+//			Token t = lexer.NextToken();
+//			if(t.kind == Tokens.EOF) break;
+//			
+//			System.Console.WriteLine(t.val + "\t" + t.kind);
+//		}
+		
+		Parser p = new Parser();
+		p.Parse(lexer);
+		if(p.Errors.count == 0) {
+//			p.compilationUnit.AcceptVisitor(new DebugVisitor(), null);
+		}
+		
+		System.Console.WriteLine("=======================");
+		if (p.Errors.count == 1)
+			Console.WriteLine("1 error dectected");
+		else {
+			Console.WriteLine("{0} errors dectected", p.Errors.count);
+		}
+		
+		if(p.Errors.count != 0) {
+			System.Console.WriteLine(p.Errors.ErrorOutput);
+		}
+		System.Console.WriteLine("=======================");
+	}
+}*/

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/AbstractASTVisitor.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/AbstractASTVisitor.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/AbstractASTVisitor.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,678 @@
+using System;
+using System.Collections;
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+	public abstract class AbstractASTVisitor : IASTVisitor
+	{
+		protected Stack blockStack = new Stack();
+		
+		public BlockStatement CurrentBlock {
+			get {
+				if (blockStack.Count == 0) {
+					return null;
+				}
+				return (BlockStatement)blockStack.Peek();
+			}
+		}
+		
+		public virtual object Visit(INode node, object data)
+		{
+			Console.WriteLine("Warning, INode visited!");
+			Console.WriteLine("Type is " + node.GetType());
+			Console.WriteLine("Visitor is " + this.GetType());
+			return node.AcceptChildren(this, data);
+		}
+		
+		public virtual object Visit(CompilationUnit compilationUnit, object data)
+		{
+			if (compilationUnit == null) {
+				return data;
+			}
+			return compilationUnit.AcceptChildren(this, data);
+		}
+		
+		public virtual object Visit(NamespaceDeclaration namespaceDeclaration, object data)
+		{
+			return namespaceDeclaration.AcceptChildren(this, data);
+		}
+		
+		public virtual object Visit(OptionExplicitDeclaration optionExplicitDeclaration, object data)
+		{
+			return data;
+		}
+		
+		public virtual object Visit(OptionStrictDeclaration optionStrictDeclaration, object data)
+		{
+			return data;
+		}
+		
+		public virtual object Visit(OptionCompareDeclaration optionCompareDeclaration, object data)
+		{
+			return data;
+		}
+		
+		public virtual object Visit(ImportsStatement importsStatement, object data)
+		{
+			object ret = data;
+			foreach (INode n in importsStatement.ImportClauses) {
+				ret = n.AcceptVisitor(this, data);
+			}
+			return ret;
+		}
+		
+		public virtual object Visit(ImportsAliasDeclaration importsAliasDeclaration, object data)
+		{
+			return data;
+		}
+		
+		public virtual object Visit(ImportsDeclaration importsDeclaration, object data)
+		{
+			return data;
+		}
+		
+		public virtual object Visit(AttributeSection attributeSection, object data)
+		{
+			object ret = data;
+			foreach (ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute a in attributeSection.Attributes) {
+				ret = a.AcceptVisitor(this, data);
+			}
+			return ret;
+		}
+		
+		public virtual object Visit(ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute attribute, object data)
+		{
+			object ret = data;
+			foreach (Expression e in attribute.PositionalArguments) {
+				ret = e.AcceptVisitor(this, data);
+			}
+			foreach (NamedArgumentExpression n in attribute.NamedArguments) {
+				ret = n.AcceptVisitor(this, data);
+			}
+			return ret;
+		}
+		
+		public virtual object Visit(NamedArgumentExpression namedArgumentExpression, object data)
+		{
+			return namedArgumentExpression.Expression.AcceptVisitor(this, data);
+		}
+		
+		public virtual object Visit(TypeReference typeReference, object data)
+		{
+			return data;
+		}
+		
+		public virtual object Visit(TypeDeclaration typeDeclaration, object data)
+		{
+			foreach (AttributeSection a in typeDeclaration.Attributes) {
+				a.AcceptVisitor(this, data);
+			}
+			return typeDeclaration.AcceptChildren(this, data);
+		}
+		
+		public virtual object Visit(DelegateDeclaration delegateDeclaration, object data)
+		{
+			foreach (AttributeSection a in delegateDeclaration.Attributes) {
+				a.AcceptVisitor(this, data);
+			}
+			if (delegateDeclaration.Parameters != null) {
+				foreach (ParameterDeclarationExpression p in delegateDeclaration.Parameters) {
+					p.AcceptVisitor(this, data);
+				}
+			}
+			if (delegateDeclaration.ReturnType == null) {
+				return data;
+			}
+			return delegateDeclaration.ReturnType.AcceptVisitor(this, data);
+		}
+		
+		public virtual object Visit(FieldDeclaration fieldDeclaration, object data)
+		{
+			foreach (AttributeSection a in fieldDeclaration.Attributes) {
+				a.AcceptVisitor(this, data);
+			}
+			if (fieldDeclaration.Fields != null) {
+				foreach (VariableDeclaration v in fieldDeclaration.Fields) {
+					v.AcceptVisitor(this, data);
+				}
+			}
+			if (fieldDeclaration.TypeReference == null) {
+				return data;
+			}
+			return fieldDeclaration.TypeReference.AcceptVisitor(this, data);
+		}
+		
+		public virtual object Visit(VariableDeclaration variableDeclaration, object data)
+		{
+			if (variableDeclaration.Initializer == null) {
+				return data;
+			}
+			return variableDeclaration.Initializer.AcceptVisitor(this, data);
+		}
+		
+		public virtual object Visit(ParameterDeclarationExpression parameterDeclarationExpression, object data)
+		{
+			object ret = data;
+			foreach (AttributeSection a in parameterDeclarationExpression.Attributes) {
+				a.AcceptVisitor(this, data);
+			}
+			ret = parameterDeclarationExpression.TypeReference.AcceptVisitor(this, data);
+			if (parameterDeclarationExpression.DefaultValue != null) {
+				ret = parameterDeclarationExpression.DefaultValue.AcceptVisitor(this, data);
+			}
+			return ret;
+		}
+		
+		public virtual object Visit(ConstructorDeclaration constructorDeclaration, object data)
+		{
+			blockStack.Push(constructorDeclaration.Body);
+			foreach (AttributeSection a in constructorDeclaration.Attributes) {
+				a.AcceptVisitor(this, data);
+			}
+			if (constructorDeclaration.Parameters != null) {
+				foreach (ParameterDeclarationExpression p in constructorDeclaration.Parameters) {
+					p.AcceptVisitor(this, data);
+				}
+			}
+			object ret = null;
+			if (constructorDeclaration.Body != null) {
+				ret = constructorDeclaration.Body.AcceptChildren(this, data);
+			}
+			blockStack.Pop();
+			return ret;
+		}
+		
+		public virtual object Visit(MethodDeclaration methodDeclaration, object data)
+		{
+			blockStack.Push(methodDeclaration.Body);
+			foreach (AttributeSection a in methodDeclaration.Attributes) {
+				a.AcceptVisitor(this, data);
+			}
+			if (methodDeclaration.TypeReference != null) {
+				methodDeclaration.TypeReference.AcceptVisitor(this, data);
+			}
+			
+			if (methodDeclaration.Parameters != null) {
+				foreach (ParameterDeclarationExpression p in methodDeclaration.Parameters) {
+					p.AcceptVisitor(this, data);
+				}
+			}
+			
+			if (methodDeclaration.HandlesClause != null) {
+				methodDeclaration.HandlesClause.AcceptVisitor(this, data);
+			}
+			if (methodDeclaration.ImplementsClause != null) {
+				methodDeclaration.ImplementsClause.AcceptVisitor(this, data);
+			}
+			object ret = null;
+			if (methodDeclaration.Body != null) {
+				methodDeclaration.Body.AcceptChildren(this, data);
+			}
+			blockStack.Pop();
+			return ret;
+		}
+		
+		public virtual object Visit(DeclareDeclaration declareDeclaration, object data)
+		{
+			if (declareDeclaration != null) {
+				if (declareDeclaration.Attributes != null) {
+					foreach (AttributeSection a in declareDeclaration.Attributes) {
+						a.AcceptVisitor(this, data);
+					}
+				}
+				
+				if (declareDeclaration.ReturnType != null) {
+					declareDeclaration.ReturnType.AcceptVisitor(this, data);
+				}
+				
+				if (declareDeclaration.Parameters != null) {
+					foreach (ParameterDeclarationExpression p in declareDeclaration.Parameters) {
+						p.AcceptVisitor(this, data);
+					}
+				}
+			}
+			return data;
+		}
+		
+		public virtual object Visit(PropertyDeclaration propertyDeclaration, object data)
+		{
+			foreach (AttributeSection a in propertyDeclaration.Attributes) {
+				a.AcceptVisitor(this, data);
+			}
+			propertyDeclaration.TypeReference.AcceptVisitor(this, data);
+			if (propertyDeclaration.Parameters != null) {
+				foreach (ParameterDeclarationExpression p in propertyDeclaration.Parameters) {
+					p.AcceptVisitor(this, data);
+				}
+			}
+			if (propertyDeclaration.ImplementsClause != null) {
+				propertyDeclaration.ImplementsClause.AcceptVisitor(this, data);
+			}
+			if (propertyDeclaration.HasGetRegion) {
+				propertyDeclaration.GetRegion.AcceptVisitor(this, data);
+			}
+			if (propertyDeclaration.HasSetRegion) {
+				propertyDeclaration.SetRegion.AcceptVisitor(this, data);
+			}
+			return data;
+		}
+		
+		public virtual object Visit(PropertyGetRegion propertyGetRegion, object data)
+		{
+			blockStack.Push(propertyGetRegion.Block);
+			foreach (AttributeSection a in propertyGetRegion.Attributes) {
+				a.AcceptVisitor(this, data);
+			}
+			object ret = null;
+			if (propertyGetRegion.Block != null) {
+				ret = propertyGetRegion.Block.AcceptChildren(this, data);
+			}
+			blockStack.Pop();
+			return ret;
+		}
+		
+		public virtual object Visit(PropertySetRegion propertySetRegion, object data)
+		{
+			blockStack.Push(propertySetRegion.Block);
+			foreach (AttributeSection a in propertySetRegion.Attributes) {
+				a.AcceptVisitor(this, data);
+			}
+			object ret = null;
+			if (propertySetRegion.Block != null) {
+				ret = propertySetRegion.Block.AcceptChildren(this, data);
+			}
+			blockStack.Pop();
+			return ret;
+		}
+		
+		public virtual object Visit(EventDeclaration eventDeclaration, object data)
+		{
+			foreach (AttributeSection a in eventDeclaration.Attributes) {
+				a.AcceptVisitor(this, data);
+			}
+			eventDeclaration.TypeReference.AcceptVisitor(this, data);
+			if (eventDeclaration.Parameters != null) {
+				foreach (ParameterDeclarationExpression p in eventDeclaration.Parameters) {
+					p.AcceptVisitor(this, data);
+				}
+			}
+			if (eventDeclaration.ImplementsClause != null) {
+				eventDeclaration.ImplementsClause.AcceptVisitor(this, data);
+			}
+			return data;
+		}
+		
+		public virtual object Visit(BlockStatement blockStatement, object data)
+		{
+			if (blockStatement == null) {
+				return null;
+			}
+			blockStack.Push(blockStatement);
+			object ret = blockStatement.AcceptChildren(this, data);
+			blockStack.Pop();
+			return ret;
+		}
+		
+		public virtual object Visit(Statement statement, object data)
+		{
+			Console.WriteLine("Warning, visited Statement!");
+			return data;
+		}
+		
+		public virtual object Visit(StatementExpression statementExpression, object data)
+		{
+			if (statementExpression.Expression == null) {
+				return data;
+			}
+			return statementExpression.Expression.AcceptVisitor(this, data);
+		}
+		
+		public virtual object Visit(LocalVariableDeclaration localVariableDeclaration, object data)
+		{
+			object ret = data;
+			if (localVariableDeclaration.Variables != null) {
+				foreach (VariableDeclaration v in localVariableDeclaration.Variables) {
+					ret = v.AcceptVisitor(this, data);
+				}
+			}
+			return ret;
+		}
+		
+		public virtual object Visit(SimpleIfStatement ifStatement, object data)
+		{
+			object ret = ifStatement.Condition.AcceptVisitor(this, data);
+			if(ifStatement.Statements != null) {
+				foreach (Statement s in ifStatement.Statements) {
+					ret = s.AcceptVisitor(this, data);
+				}
+			}
+			if(ifStatement.ElseStatements != null) {
+				foreach (Statement s in ifStatement.ElseStatements) {
+					ret = s.AcceptVisitor(this, data);
+				}
+			}
+			return ret;
+		}
+		
+		public virtual object Visit(IfStatement ifStatement, object data)
+		{
+			object ret = ifStatement.Condition.AcceptVisitor(this, data);
+			if(ifStatement.ElseIfStatements != null) {
+				foreach (Statement s in ifStatement.ElseIfStatements) {
+					ret = s.AcceptVisitor(this, data);
+				}
+			}
+			if (ifStatement.EmbeddedElseStatement != null) {
+				ret = ifStatement.EmbeddedElseStatement.AcceptVisitor(this, data);
+			}
+			return ret;
+		}
+		
+		public virtual object Visit(LabelStatement labelStatement, object data)
+		{
+			if (labelStatement.EmbeddedStatement == null) {
+				return null;
+			}
+			return labelStatement.EmbeddedStatement.AcceptVisitor(this, data);
+		}
+		
+		public virtual object Visit(GoToStatement goToStatement, object data)
+		{
+			return data;
+		}
+		
+		public virtual object Visit(SelectStatement selectStatement, object data)
+		{
+			selectStatement.SelectExpression.AcceptVisitor(this, data);
+			if (selectStatement.SelectSections != null) {
+				foreach (SelectSection s in selectStatement.SelectSections) {
+					s.AcceptVisitor(this, data);
+				}
+			}
+			return data;
+		}
+		
+		public virtual object Visit(SelectSection selectSection, object data)
+		{
+			if (selectSection.CaseClauses != null) {
+				foreach (CaseClause c in selectSection.CaseClauses) {
+					c.AcceptVisitor(this, data);
+				}
+			}
+			return data;
+		}
+		
+		public virtual object Visit(CaseClause caseClause, object data)
+		{
+			caseClause.ComparisonExpression.AcceptVisitor(this, data);
+			return caseClause.BoundaryExpression.AcceptVisitor(this, data);
+		}
+		
+		public virtual object Visit(ExitStatement exitStatement, object data)
+		{
+			return data;
+		}
+		
+		public virtual object Visit(EndStatement endStatement, object data)
+		{
+			return data;
+		}
+		
+		public virtual object Visit(StopStatement stopStatement, object data)
+		{
+			return data;
+		}
+		
+		public virtual object Visit(ResumeStatement resumeStatement, object data)
+		{
+			return data;
+		}
+		
+		public virtual object Visit(ErrorStatement errorStatement, object data)
+		{
+			return errorStatement.Expression.AcceptVisitor(this, data);
+		}
+		
+		public virtual object Visit(OnErrorStatement onErrorStatement, object data)
+		{
+			return onErrorStatement.EmbeddedStatement.AcceptVisitor(this, data);
+		}
+		
+		public virtual object Visit(EraseStatement eraseStatement, object data)
+		{
+			return data;
+		}
+		
+		public virtual object Visit(ReDimStatement reDimStatement, object data)
+		{
+			return data;
+		}
+		
+		public virtual object Visit(AddHandlerStatement addHandlerStatement, object data)
+		{
+			addHandlerStatement.EventExpression.AcceptVisitor(this, data);
+			addHandlerStatement.HandlerExpression.AcceptVisitor(this, data);
+			return data;
+		}
+		
+		public virtual object Visit(RemoveHandlerStatement removeHandlerStatement, object data)
+		{
+			removeHandlerStatement.EventExpression.AcceptVisitor(this, data);
+			removeHandlerStatement.HandlerExpression.AcceptVisitor(this, data);
+			return data;
+		}
+		
+		public virtual object Visit(ReturnStatement returnStatement, object data)
+		{
+			return returnStatement.ReturnExpression.AcceptVisitor(this, data);
+		}
+		
+		public virtual object Visit(RaiseEventStatement raiseEventStatement, object data)
+		{
+			if (raiseEventStatement.Parameters != null) {
+				foreach (INode node in raiseEventStatement.Parameters) {
+					node.AcceptVisitor(this, data);
+				}
+			}
+			return data;
+		}
+		
+		public virtual object Visit(WhileStatement whileStatement, object data)
+		{
+			if (whileStatement.EmbeddedStatement == null) {
+				return null;
+			}
+			return whileStatement.EmbeddedStatement.AcceptVisitor(this, data);
+		}
+		
+		public virtual object Visit(WithStatement withStatement, object data)
+		{
+			if (withStatement.WithExpression != null) {
+				withStatement.WithExpression.AcceptVisitor(this, data);
+			}
+			
+			if (withStatement.Body == null) {
+				return null;
+			}
+			return withStatement.Body.AcceptVisitor(this, data);
+		}
+		
+		public virtual object Visit(DoLoopStatement doLoopStatement, object data)
+		{
+			if (doLoopStatement.EmbeddedStatement == null) {
+				return null;
+			}
+			return doLoopStatement.EmbeddedStatement.AcceptVisitor(this, data);
+		}
+		public virtual object Visit(ForStatement forStatement, object data)
+		{
+			if (forStatement.EmbeddedStatement == null) {
+				return null;
+			}
+			return forStatement.EmbeddedStatement.AcceptVisitor(this, data);
+		}
+		
+		public virtual object Visit(ForeachStatement foreachStatement, object data)
+		{
+			if (foreachStatement.EmbeddedStatement == null) {
+				return null;
+			}
+			return foreachStatement.EmbeddedStatement.AcceptVisitor(this, data);
+		}
+		public virtual object Visit(LockStatement lockStatement, object data)
+		{
+			if (lockStatement.EmbeddedStatement == null) {
+				return null;
+			}
+			return lockStatement.EmbeddedStatement.AcceptVisitor(this, data);
+		}
+		
+		public virtual object Visit(TryCatchStatement tryCatchStatement, object data)
+		{
+			if (tryCatchStatement.StatementBlock == null) {
+				return null;
+			}
+			return tryCatchStatement.StatementBlock.AcceptVisitor(this, data);
+		}
+		public virtual object Visit(ThrowStatement throwStatement, object data)
+		{
+			if (throwStatement.ThrowExpression == null) {
+				return null;
+			}
+			return throwStatement.ThrowExpression.AcceptVisitor(this, data);
+		}
+		
+#region Expressions
+		public virtual object Visit(FieldReferenceOrInvocationExpression fieldReferenceOrInvocationExpression, object data)
+		{
+			if (fieldReferenceOrInvocationExpression.TargetObject == null) {
+				return null;
+			}
+			return fieldReferenceOrInvocationExpression.TargetObject.AcceptVisitor(this, data);
+		}
+		
+		public virtual object Visit(PrimitiveExpression primitiveExpression, object data)
+		{
+			// nothing to visit
+			return data;
+		}
+		
+		public virtual object Visit(BinaryOperatorExpression binaryOperatorExpression, object data)
+		{
+			// visit but can't give back 2 values
+			binaryOperatorExpression.Left.AcceptVisitor(this, data);
+			binaryOperatorExpression.Right.AcceptVisitor(this, data);
+			
+			return data;
+		}
+		public virtual object Visit(ParenthesizedExpression parenthesizedExpression, object data)
+		{
+			return parenthesizedExpression.Expression.AcceptVisitor(this, data);
+		}
+		
+		public virtual object Visit(InvocationExpression invocationExpression, object data)
+		{
+			if (invocationExpression.TargetObject == null) {
+				return data;
+			}
+			return invocationExpression.TargetObject.AcceptVisitor(this, data);
+		}
+		
+		public virtual object Visit(IdentifierExpression identifierExpression, object data)
+		{
+			// nothing to visit
+			return data;
+		}
+		
+		public virtual object Visit(TypeReferenceExpression typeReferenceExpression, object data)
+		{
+			// nothing to visit
+			return data;
+		}
+		
+		public virtual object Visit(UnaryOperatorExpression unaryOperatorExpression, object data)
+		{
+			return unaryOperatorExpression.Expression.AcceptVisitor(this, data);
+		}
+		
+		public virtual object Visit(AssignmentExpression assignmentExpression, object data)
+		{
+			// visit but can't give back 2 values
+			assignmentExpression.Left.AcceptVisitor(this, data);
+			assignmentExpression.Right.AcceptVisitor(this, data);
+			
+			return data;
+		}
+		
+		public virtual object Visit(CastExpression castExpression, object data)
+		{
+			return castExpression.Expression.AcceptVisitor(this, data);
+		}
+		
+		public virtual object Visit(ThisReferenceExpression thisReferenceExpression, object data)
+		{
+			// nothing to visit
+			return data;
+		}
+		
+		public virtual object Visit(BaseReferenceExpression baseReferenceExpression, object data)
+		{
+			// nothing to visit
+			return data;
+		}
+		
+		public virtual object Visit(ObjectCreateExpression objectCreateExpression, object data)
+		{
+			// nothing to visit
+			return data;
+		}
+		
+		public virtual object Visit(ArrayInitializerExpression arrayInitializerExpression, object data)
+		{
+			if (arrayInitializerExpression.CreateExpressions != null) {
+				foreach (INode node in arrayInitializerExpression.CreateExpressions) {
+					node.AcceptVisitor(this, data);
+				}
+			}
+			
+			return data;
+		}
+		
+		public virtual object Visit(GetTypeExpression getTypeExpression, object data)
+		{
+			// nothing to visit
+			return data;
+		}
+		
+		public virtual object Visit(ClassReferenceExpression classReferenceExpression, object data)
+		{
+			// nothing to visit
+			return data;
+		}
+		
+		public virtual object Visit(LoopControlVariableExpression loopControlVariableExpression, object data)
+		{
+			return loopControlVariableExpression.Expression.AcceptVisitor(this, data);
+		}
+		
+		public virtual object Visit(AddressOfExpression addressOfExpression, object data)
+		{
+			return addressOfExpression.Procedure.AcceptVisitor(this, data);
+		}
+		
+		public virtual object Visit(TypeOfExpression typeOfExpression, object data)
+		{
+			return typeOfExpression.Expression.AcceptVisitor(this, data);
+		}
+		
+		public virtual object Visit(ArrayCreateExpression arrayCreateExpression, object data)
+		{
+			if (arrayCreateExpression.ArrayInitializer == null) {
+				return data;
+			}
+			return arrayCreateExpression.ArrayInitializer.AcceptVisitor(this, data);
+		}
+#endregion
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/AbstractNode.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/AbstractNode.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/AbstractNode.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,125 @@
+// AbstractNode.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Drawing;
+using System.Text;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public abstract class AbstractNode : INode
+	{
+		INode     parent;
+		ArrayList children = new ArrayList();
+		Hashtable specials = new Hashtable();
+		Point     startLocation;
+		Point     endLocation;
+		
+		public INode Parent {
+			get	{
+				return parent;
+			}
+			set {
+				parent = value;
+			}
+		}
+		
+		public Point StartLocation {
+			get {
+				return startLocation;
+			}
+			set {
+				startLocation = value;
+			}
+		}
+		
+		public Point EndLocation {
+			get {
+				return endLocation;
+			}
+			set {
+				endLocation = value;
+			}
+		}
+		
+		public Hashtable Specials {
+			get {
+				return specials;
+			}
+		}
+		
+		public ArrayList Children {
+			get {
+				return children;
+			}
+		}
+		
+		public virtual void AddChild(INode childNode)
+		{
+			children.Add(childNode);
+		}
+		
+		public virtual object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public object AcceptChildren(IASTVisitor visitor, object data)
+		{
+			foreach (INode child in children) {
+				if (child != null) {
+					child.AcceptVisitor(visitor, data);
+				}
+			}
+			return data;
+		}
+		
+		public static string GetCollectionString(ICollection collection)
+		{
+			if (collection == null) {
+				return "null";
+			}
+			StringBuilder output = new StringBuilder();
+			output.Append('{');
+			
+			if (collection != null) {
+				IEnumerator en = collection.GetEnumerator();
+				bool isFirst = true;
+				while (en.MoveNext()) {
+					if (!isFirst) {
+						output.Append(", ");
+					} else {
+						isFirst = false;
+					}
+					if (en.Current == null) {
+						output.Append("null");
+					} else {
+						output.Append(en.Current.ToString());
+					}
+				}
+			} else {
+				return "null";
+			}
+			
+			output.Append('}');
+			return output.ToString();
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/CompilationUnit.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/CompilationUnit.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/CompilationUnit.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,81 @@
+// CompilationUnit.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Collections;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class CompilationUnit : AbstractNode
+	{
+		Stack blockStack = new Stack();
+		INode lastChild = null;
+		
+		public CompilationUnit()
+		{
+			blockStack.Push(this);
+		}
+		
+		public void BlockStart(INode block)
+		{
+			blockStack.Push(block);
+		}
+		
+		public void BlockEnd()
+		{
+			lastChild = (INode)blockStack.Pop();
+		}
+		
+		public INode TakeBlock()
+		{
+			return (INode)blockStack.Pop();
+		}
+		
+		public override void AddChild(INode childNode)
+		{
+			if (childNode != null) {
+				INode parent = (INode)blockStack.Peek();
+				parent.Children.Add(childNode);
+				childNode.Parent = parent;
+				lastChild = childNode;
+			}
+		}
+		
+		ArrayList specials = new ArrayList();
+		public void AddSpecial(string key, object val)
+		{
+			specials.Add(new DictionaryEntry(key, val));
+		}
+		
+		public void CommitSpecials()
+		{
+			if (lastChild == null) {
+				return;
+			}
+			foreach (DictionaryEntry entry in specials) {
+				lastChild.Specials[entry.Key] = entry.Value;
+			}
+			specials.Clear();
+		}
+			
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Enums.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Enums.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Enums.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,160 @@
+using System;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+	/// <summary>
+	/// The type of a type declaration.
+	/// </summary>
+	public enum Types
+	{
+		Class,
+		Interface,
+		Structure,
+		Module,
+		Enum
+	}
+	
+	///<summary>
+	/// Compare type, used in the <c>Option Compare</c>
+	/// pragma.
+	///</summary>
+	public enum CompareType
+	{
+		Binary,
+		Text
+	}
+	
+	///<summary>
+	/// Charset types, used in external mehtods
+	/// declarations.
+	///</summary>
+	public enum CharsetModifier
+	{
+		None,
+		Auto,
+		Unicode,
+		ANSI
+	}
+	
+	public enum ParentType
+	{
+		ClassOrStruct,
+		InterfaceOrEnum,
+		Namespace,
+		Unknown
+	}
+	
+	public enum Members
+	{
+		Constant,
+		Field,
+		Method,
+		Property,
+		Event,
+		Constructor,
+		StaticConstructor,
+		NestedType
+	}
+	
+	///<summary>
+	/// Used at the exit statement.
+	///</summary>
+	public enum ExitType
+	{
+		None,
+		Sub,
+		Function,
+		Property,
+		Do,
+		For,
+		While,
+		Select,
+		Try
+	}
+	
+	public enum ConditionType
+	{
+		None,
+		Until,
+		While
+	}
+	
+	public enum ConditionPosition
+	{
+		None,
+		Start,
+		End
+	}
+	
+	public enum UnaryOperatorType
+	{
+		None,
+		Not,
+		BitNot,
+		
+		Minus,
+		Plus,
+		
+		Increment,
+		Decrement,
+		
+		PostIncrement,
+		PostDecrement,
+		
+		Star,
+		BitWiseAnd
+	}
+	
+	public enum AssignmentOperatorType
+	{
+		None,
+		Assign,
+		
+		Add,
+		Subtract,
+		Multiply,
+		Divide,
+		Modulus,
+		
+		ConcatString,
+		
+		ShiftLeft,
+		ShiftRight,
+		
+		BitwiseAnd,
+		BitwiseOr,
+		ExclusiveOr,
+		Power,
+		DivideInteger
+	}
+	
+	public enum BinaryOperatorType
+	{
+		None,
+		Add,
+		Concat,
+		BitwiseAnd,
+		BitwiseOr,
+		BooleanAnd,
+		BooleanOr,
+		Divide,
+		GreaterThan,
+		GreaterThanOrEqual,
+		Equality,
+		InEquality,
+		LessThan,
+		LessThanOrEqual,
+		Modulus,
+		Multiply,
+		Subtract,
+		DivideInteger,
+		Power,
+		
+		// additional
+		ShiftLeft,
+		ShiftRight,
+		IS,
+		ExclusiveOr,
+		Like,
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/AddressOfExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/AddressOfExpression.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/AddressOfExpression.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,31 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class AddressOfExpression : Expression
+	{
+		Expression procedure;
+		
+		public Expression Procedure {
+			get {
+				return procedure;
+			}
+			set {
+				procedure = value;
+			}
+		}
+		
+		public AddressOfExpression(Expression Procedure)
+		{
+			this.Procedure = Procedure;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ArrayCreateExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ArrayCreateExpression.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ArrayCreateExpression.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,60 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class ArrayCreateExpression : Expression
+	{
+		TypeReference              createType       = null;
+		ArrayList                  parameters       = null; // Expressions
+		ArrayInitializerExpression arrayInitializer = null; // Array Initializer OR NULL
+		
+		public TypeReference CreateType {
+			get {
+				return createType;
+			}
+			set {
+				createType = value;
+			}
+		}
+		
+		public ArrayList Parameters {
+			get {
+				return parameters;
+			}
+			set {
+				parameters = value;
+			}
+		}
+		
+		public ArrayInitializerExpression ArrayInitializer
+		{
+			get {
+				return arrayInitializer;
+			}
+			set {
+				arrayInitializer = value;
+			}
+		}
+		
+		public ArrayCreateExpression(TypeReference createType, ArrayList parameters)
+		{
+			this.createType = createType;
+			this.parameters = parameters;
+		}
+		
+		public ArrayCreateExpression(TypeReference createType, ArrayInitializerExpression arrayInitializer)
+		{
+			this.createType = createType;
+			this.arrayInitializer = arrayInitializer;
+		}
+		
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ArrayInitializerExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ArrayInitializerExpression.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ArrayInitializerExpression.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,33 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class ArrayInitializerExpression : Expression
+	{
+		ArrayList     createExpressions = new ArrayList();
+		
+		public ArrayList CreateExpressions {
+			get {
+				return createExpressions;
+			}
+			set {
+				createExpressions = value;
+			}
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[ArrayInitializerExpression: CreateExpressions={0}]", 
+			                     GetCollectionString(createExpressions));
+		}
+		
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/AssignmentExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/AssignmentExpression.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/AssignmentExpression.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,60 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class AssignmentExpression : Expression
+	{
+		Expression left;
+		AssignmentOperatorType op;
+		Expression right;
+		
+		public Expression Left {
+			get {
+				return left;
+			}
+			set {
+				left = value;
+			}
+		}
+		
+		public AssignmentOperatorType Op {
+			get {
+				return op;
+			}
+			set {
+				op = value;
+			}
+		}
+		
+		public Expression Right {
+			get {
+				return right;
+			}
+			set {
+				right = value;
+			}
+		}
+		
+		public AssignmentExpression(Expression left, AssignmentOperatorType op, Expression right)
+		{
+			this.left  = left;
+			this.op    = op;
+			this.right = right;
+		}
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[AssignmentExpression: Op={0}, Left={1}, Right={2}]",
+			                     op,
+			                     left,
+			                     right);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/BaseReferenceExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/BaseReferenceExpression.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/BaseReferenceExpression.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,20 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class BaseReferenceExpression : Expression
+	{
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[BaseReferenceExpression]");
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/BinaryOperatorExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/BinaryOperatorExpression.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/BinaryOperatorExpression.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,61 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class BinaryOperatorExpression : Expression
+	{
+		Expression left;
+		BinaryOperatorType op;
+		Expression right;
+		
+		public Expression Left {
+			get {
+				return left;
+			}
+			set {
+				left = value;
+			}
+		}
+		
+		public BinaryOperatorType Op {
+			get {
+				return op;
+			}
+			set {
+				op = value;
+			}
+		}
+		
+		public Expression Right {
+			get {
+				return right;
+			}
+			set {
+				right = value;
+			}
+		}
+		
+		public BinaryOperatorExpression(Expression left, BinaryOperatorType op, Expression right)
+		{
+			this.left  = left;
+			this.op    = op;
+			this.right = right;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[BinaryOperatorExpression: Op={0}, Left={1}, Right={2}]",
+			                     op,
+			                     left,
+			                     right);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/CastExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/CastExpression.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/CastExpression.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,68 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class CastExpression : Expression
+	{
+		TypeReference castTo;
+		Expression expression;
+		bool       isSpecializedCast = false;
+		
+		
+		public TypeReference CastTo {
+			get {
+				return castTo;
+			}
+			set {
+				castTo = value;
+			}
+		}
+		
+		public Expression Expression {
+			get {
+				return expression;
+			}
+			set {
+				expression = value;
+			}
+		}
+		
+		public bool IsSpecializedCast {
+			get {
+				return isSpecializedCast;
+			}
+			set {
+				isSpecializedCast = value;
+			}
+		}
+		
+		
+		public CastExpression(TypeReference castTo, Expression expression)
+		{
+			this.castTo = castTo;
+			this.expression = expression;
+		}
+		
+		public CastExpression(TypeReference castTo, Expression expression, bool isSpecializedCast)
+		{
+			this.castTo = castTo;
+			this.expression = expression;
+			this.isSpecializedCast = isSpecializedCast;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[CastExpression: CastTo={0}, Expression={1}]",
+			                     castTo,
+			                     expression);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ClassReferenceExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ClassReferenceExpression.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ClassReferenceExpression.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,20 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class ClassReferenceExpression : Expression
+	{
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[ClassReferenceExpression]");
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/Expression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/Expression.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/Expression.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,29 @@
+// Expression.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Collections;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB 
+{
+	public class Expression : AbstractNode
+	{
+		public Expression()
+		{
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/FieldReferenceOrInvocationExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/FieldReferenceOrInvocationExpression.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/FieldReferenceOrInvocationExpression.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,51 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	
+	public class FieldReferenceOrInvocationExpression : Expression
+	{
+		Expression targetObject;
+		string fieldName;
+		
+		public Expression TargetObject {
+			get {
+				return targetObject;
+			}
+			set {
+				targetObject = value;
+			}
+		}
+		
+		public string FieldName {
+			get {
+				return fieldName;
+			}
+			set {
+				fieldName = value;
+			}
+		}
+		
+		public FieldReferenceOrInvocationExpression(Expression targetObject, string fieldName)
+		{
+			this.targetObject = targetObject;
+			this.fieldName = fieldName;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			if(visitor==null) return null;
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[FieldReferenceOrInvocationExpression: FieldName={0}, TargetObject={1}]",
+			                     fieldName,
+			                     targetObject);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/GetTypeExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/GetTypeExpression.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/GetTypeExpression.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,31 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class GetTypeExpression : Expression
+	{
+		TypeReference type;
+		
+		public TypeReference Type {
+			get {
+				return type;
+			}
+			set {
+				type = value;
+			}
+		}
+		
+		public GetTypeExpression(TypeReference type)
+		{
+			this.type = type;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/IdentifierExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/IdentifierExpression.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/IdentifierExpression.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,38 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class IdentifierExpression : Expression
+	{
+		string identifier;
+		
+		public string Identifier {
+			get {
+				return identifier;
+			}
+			set {
+				identifier = value;
+			}
+		}
+		
+		public IdentifierExpression(string identifier)
+		{
+			this.identifier = identifier;
+		}
+		
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[IdentifierExpression: Identifier={0}]",
+			                     identifier);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/InvocationExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/InvocationExpression.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/InvocationExpression.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,49 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class InvocationExpression : Expression
+	{
+		Expression  targetObject;
+		ArrayList   parameters; // Expression list
+		
+		public Expression TargetObject {
+			get {
+				return targetObject;
+			}
+			set {
+				targetObject = value;
+			}
+		}
+		public ArrayList Parameters {
+			get {
+				return parameters;
+			}
+			set {
+				parameters = value;
+			}
+		}
+		
+		public InvocationExpression(Expression targetObject, ArrayList parameters)
+		{
+			this.targetObject = targetObject;
+			this.parameters = parameters;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[InvocationExpression: TargetObject={0}, parameters={1}]",
+			                     targetObject,
+			                     GetCollectionString(parameters));
+		}
+	}
+}
+

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/LoopControlVariableExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/LoopControlVariableExpression.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/LoopControlVariableExpression.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,60 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class LoopControlVariableExpression : Expression
+	{
+		Expression expression = null;
+		string name;
+		TypeReference type;
+		
+		public LoopControlVariableExpression(string name, TypeReference type)
+		{
+			this.name = name;
+			this.type = type;
+		}
+		
+		public LoopControlVariableExpression(Expression expression)
+		{
+			this.expression = expression;
+		}
+		
+		public string Name
+		{
+			get {
+				return name;
+			}
+			set {
+				name = value;
+			}
+		}
+		
+		public TypeReference Type
+		{
+			get {
+				return type;
+			}
+			set {
+				type = value;
+			}
+		}
+		
+		public Expression Expression
+		{
+			get {
+				return expression;
+			}
+			set {
+				expression = value;
+			}
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/NamedArgumentExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/NamedArgumentExpression.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/NamedArgumentExpression.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,44 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB {
+	
+	public class NamedArgumentExpression : Expression
+	{
+		string parametername;
+		Expression     expression;
+		
+		public string Parametername {
+			get {
+				return parametername;
+			}
+			set {
+				parametername = value;
+			}
+		}
+		
+		public Expression Expression {
+			get {
+				return expression;
+			}
+			set {
+				expression = value;
+			}
+		}
+		
+		public NamedArgumentExpression(string parametername, Expression expression)
+		{
+			this.parametername = parametername;
+			this.expression = expression;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}
+

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ObjectCreateExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ObjectCreateExpression.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ObjectCreateExpression.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,48 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class ObjectCreateExpression : Expression
+	{
+		TypeReference createType;
+		ArrayList     parameters;
+		
+		public TypeReference CreateType {
+			get {
+				return createType;
+			}
+			set {
+				createType = value;
+			}
+		}
+		public ArrayList Parameters {
+			get {
+				return parameters;
+			}
+			set {
+				parameters = value;
+			}
+		}
+		
+		public ObjectCreateExpression(TypeReference createType, ArrayList parameters)
+		{
+			this.createType = createType;
+			this.parameters = parameters;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[ObjectCreateExpression: CreateType={0}, Parameters={1}]",
+			                     createType,
+			                     GetCollectionString(parameters));
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ParameterDeclarationExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ParameterDeclarationExpression.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ParameterDeclarationExpression.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,90 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB {
+	
+	public class ParameterDeclarationExpression : Expression
+	{
+		TypeReference  typeReference;
+		string         parameterName;
+		ParamModifiers paramModifiers;
+		ArrayList      attributes = new ArrayList();
+		Expression	   defaultValue;
+		
+		public override string ToString()
+		{
+			return String.Format("[ParameterDeclarationExpression: DefaultValue={0}, TypeReference={1}, ParameterName={2}, ParamModifiers={3}, Attributes=TODO]",
+			                     defaultValue,
+			                     typeReference,
+			                     parameterName,
+			                     paramModifiers);
+		}
+		
+		public Expression DefaultValue {
+			get {
+				return defaultValue;
+			}
+			set {
+				defaultValue = value;
+			}
+		}
+		
+		public TypeReference TypeReference {
+			get {
+				return typeReference;
+			}
+			set {
+				typeReference = value;
+			}
+		}
+		
+		public string ParameterName {
+			get {
+				return parameterName;
+			}
+			set {
+				parameterName = value;
+			}
+		}
+		
+		public ParamModifiers ParamModifiers {
+			get {
+				return paramModifiers;
+			}
+			set {
+				paramModifiers = value;
+			}
+		}
+		
+		public ArrayList Attributes {
+			get {
+				return attributes;
+			}
+			set {
+				attributes = value;
+			}
+		}
+		
+		public ParameterDeclarationExpression(TypeReference typeReference, string parameterName, ParamModifiers paramModifiers, Expression defaultValue)
+		{
+			this.typeReference = typeReference;
+			this.parameterName = parameterName;
+			this.paramModifiers = paramModifiers;
+			this.attributes = attributes;
+			this.defaultValue = defaultValue;
+		}
+		
+		public ParameterDeclarationExpression(TypeReference typeReference, string parameterName, ParamModifiers paramModifiers)
+		{
+			this.typeReference  = typeReference;
+			this.parameterName  = parameterName;
+			this.paramModifiers = paramModifiers;
+		}
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ParenthesizedExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ParenthesizedExpression.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ParenthesizedExpression.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,37 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class ParenthesizedExpression : Expression
+	{
+		Expression expression;
+		
+		public Expression Expression {
+			get {
+				return expression;
+			}
+			set {
+				expression = value;
+			}
+		}
+		
+		public ParenthesizedExpression(Expression expression)
+		{
+			this.expression  = expression;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[ParenthesizedExpression: Expression={0}]",
+			                     expression);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/PrimitiveExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/PrimitiveExpression.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/PrimitiveExpression.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,51 @@
+using System;
+using System.Collections;
+using System.Globalization;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class PrimitiveExpression : Expression
+	{
+		object val;
+		string stringValue;
+		
+		public object Value {
+			get {
+				return val;
+			}
+			set {
+				val = value;
+			}
+		}
+		
+		public string StringValue {
+			get {
+				return stringValue;
+			}
+			set {
+				stringValue = value;
+			}
+		}
+		
+		public PrimitiveExpression(object val, string stringValue)
+		{
+			this.val = val;
+			this.stringValue = stringValue;
+		}
+		
+		static NumberFormatInfo nfi = new CultureInfo( "en-US", false ).NumberFormat;
+
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[PrimitiveExpression: StringValue={0}]",
+			                     stringValue);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/StatementExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/StatementExpression.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/StatementExpression.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,54 @@
+// StatementExpression.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class StatementExpression : Statement
+	{
+		Expression expression;
+		
+		public Expression Expression
+		{
+			get {
+				return expression;
+			}
+			set {
+				expression = value;
+			}
+		}
+		
+		public StatementExpression(Expression expression)
+		{
+			this.expression = expression;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[StatementExpression: Expression={0}]", expression);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ThisReferenceExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ThisReferenceExpression.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ThisReferenceExpression.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,21 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class ThisReferenceExpression : Expression
+	{
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[ThisReferenceExpression]");
+		}
+
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/TypeOfExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/TypeOfExpression.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/TypeOfExpression.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,43 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class TypeOfExpression : Expression
+	{
+		TypeReference type;
+		
+		Expression expression;
+		
+		public Expression Expression {
+			get {
+				return expression;
+			}
+			set {
+				expression = value;
+			}
+		}
+		
+		public TypeReference Type {
+			get {
+				return type;
+			}
+			set {
+				type = value;
+			}
+		}
+		
+		public TypeOfExpression(Expression expression, TypeReference type)
+		{
+			this.type = type;
+			this.expression = expression;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/TypeReferenceExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/TypeReferenceExpression.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/TypeReferenceExpression.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,41 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class TypeReferenceExpression : Expression
+	{
+		TypeReference  typeReference;
+		
+		public TypeReference TypeReference {
+			get {
+				return typeReference;
+			}
+			set {
+				typeReference = value;
+			}
+		}
+		
+		public TypeReferenceExpression(string type)
+		{
+			this.typeReference = new TypeReference(type);
+		}
+		public TypeReferenceExpression(TypeReference  typeReference)
+		{
+			this.typeReference = typeReference;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[TypeReferenceExpression: TypeReference={0}]", 
+			                     typeReference);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/UnaryOperatorExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/UnaryOperatorExpression.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/UnaryOperatorExpression.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,48 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class UnaryOperatorExpression : Expression
+	{
+		Expression        expression;
+		UnaryOperatorType op;
+		
+		public Expression Expression {
+			get {
+				return expression;
+			}
+			set {
+				expression = value;
+			}
+		}
+		public UnaryOperatorType Op {
+			get {
+				return op;
+			}
+			set {
+				op = value;
+			}
+		}
+		
+		public UnaryOperatorExpression(Expression expression, UnaryOperatorType op)
+		{
+			this.expression  = expression;
+			this.op    = op;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[UnaryOperatorExpression: Op={0}, Expression={1}]",
+			                     op,
+			                     expression);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/AttributeDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/AttributeDeclaration.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/AttributeDeclaration.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,93 @@
+// AttributeDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class Attribute : AbstractNode
+	{
+		string name;
+		ArrayList positionalArguments; // [Expression]
+		ArrayList namedArguments; // [NamedArgumentExpression]
+		
+		public Attribute(string name, ArrayList positionalArguments, ArrayList namedArguments)
+		{
+			this.name = name;
+			this.positionalArguments = positionalArguments;
+			this.namedArguments = namedArguments;
+		}
+		
+		public string Name {
+			get {
+				return name;
+			}
+		}
+		public ArrayList PositionalArguments {
+			get {
+				return positionalArguments;
+			}
+		}
+		public ArrayList NamedArguments {
+			get {
+				return namedArguments;
+			}
+		}
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+	
+	public class AttributeSection : AbstractNode
+	{
+		string    attributeTarget;
+		ArrayList attributes; // [Attribute]
+		
+		public string AttributeTarget {
+			get {
+				return attributeTarget;
+			}
+			set {
+				attributeTarget = value;
+			}
+		}
+		
+		public ArrayList Attributes {
+			get {
+				return attributes;
+			}
+			set {
+				attributes = value;
+			}
+		}
+		
+		public AttributeSection(string attributeTarget, ArrayList attributes)
+		{
+			this.attributeTarget = attributeTarget;
+			this.attributes = attributes;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/DelegateDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/DelegateDeclaration.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/DelegateDeclaration.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,102 @@
+// DelegateDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class DelegateDeclaration : AbstractNode
+	{
+		string          name;
+		Modifier modifier;
+		TypeReference   returnType;
+		ArrayList       parameters; // [ParameterDeclarationExpression]
+		ArrayList       attributes;
+		
+		public string Name {
+			get {
+				return name;
+			}
+			set {
+				name = value;
+			}
+		}
+		
+		public Modifier Modifier {
+			get {
+				return modifier;
+			}
+			set {
+				modifier = value;
+			}
+		}
+		
+		public TypeReference ReturnType {
+			get {
+				return returnType;
+			}
+			set {
+				returnType = value;
+			}
+		}
+		
+		public ArrayList Parameters {
+			get {
+				return parameters;
+			}
+			set {
+				parameters = value;
+			}
+		}
+		
+		public ArrayList Attributes {
+			get {
+				return attributes;
+			}
+			set {
+				attributes = value;
+			}
+		}
+		
+//		public DelegateDeclaration(string name, Modifier modifier, TypeReference returnType, ArrayList parameters, ArrayList attributes)
+//		{
+//			this.name = name;
+//			this.modifier = modifier;
+//			this.returnType = returnType;
+//			this.parameters = parameters;
+//			this.attributes = attributes;
+//		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[DelegateDeclaration: Name={0}, Modifier={1}, ReturnType={2}, parameters={3}, attributes={4}]",
+			                     name,
+			                     modifier,
+			                     returnType,
+			                     GetCollectionString(parameters),
+			                     GetCollectionString(attributes));
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/ImportsAliasDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/ImportsAliasDeclaration.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/ImportsAliasDeclaration.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,59 @@
+// UsingAliasDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Collections;
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class ImportsAliasDeclaration : AbstractNode
+	{
+		string    alias;
+		string    nameSpace;
+		
+		public string Alias {
+			get {
+				return alias;
+			}
+			set {
+				alias = value;
+			}
+		}
+		
+		public string Namespace {
+			get {
+				return nameSpace;
+			}
+			set {
+				nameSpace = value;
+			}
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public ImportsAliasDeclaration(string alias, string nameSpace)
+		{
+			this.alias     = alias;
+			this.nameSpace = nameSpace;
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/ImportsDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/ImportsDeclaration.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/ImportsDeclaration.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,48 @@
+// UsingDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Collections;
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class ImportsDeclaration : AbstractNode
+	{
+		string nameSpace;
+		
+		public string Namespace {
+			get {
+				return nameSpace;
+			}
+			set {
+				nameSpace = value;
+			}
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public ImportsDeclaration(string nameSpace)
+		{
+			this.nameSpace = nameSpace;
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/ImportsStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/ImportsStatement.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/ImportsStatement.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,48 @@
+// UsingDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Collections;
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class ImportsStatement : AbstractNode
+	{
+		ArrayList importClauses;
+		
+		public ArrayList ImportClauses {
+			get {
+				return importClauses;
+			}
+			set {
+				importClauses = value;
+			}
+		}
+		
+		public ImportsStatement(ArrayList importClauses)
+		{
+			this.importClauses = importClauses;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/NamespaceDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/NamespaceDeclaration.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/NamespaceDeclaration.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,47 @@
+// NamespaceDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Collections;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class NamespaceDeclaration : AbstractNode
+	{
+		string    nameSpace;
+		
+		public string NameSpace {
+			get {
+				return nameSpace;
+			}
+			set {
+				nameSpace = value;
+			}
+		}
+		
+		public NamespaceDeclaration(string nameSpace)
+		{
+			this.nameSpace = nameSpace;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/OptionCompareDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/OptionCompareDeclaration.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/OptionCompareDeclaration.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,57 @@
+// UsingAliasDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Collections;
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+using ICSharpCode.SharpRefactory.Parser.VB;
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class OptionCompareDeclaration : AbstractNode
+	{
+		CompareType compareType;
+		bool optionvalue;
+		
+		public CompareType CompareType {
+			get {
+				return compareType;
+			}
+			set {
+				compareType = value;
+			}
+		}
+		
+		public bool OptionValue {
+			get {
+				return optionvalue;
+			}
+			set {
+				optionvalue = value;
+			}
+		}
+		
+		public OptionCompareDeclaration(CompareType compareType)
+		{
+			this.compareType = compareType;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/OptionExplicitDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/OptionExplicitDeclaration.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/OptionExplicitDeclaration.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,48 @@
+// UsingAliasDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Collections;
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class OptionExplicitDeclaration : AbstractNode
+	{
+		bool optionvalue;
+		
+		public bool OptionValue {
+			get {
+				return optionvalue;
+			}
+			set {
+				optionvalue = value;
+			}
+		}
+		
+		public OptionExplicitDeclaration(bool optionvalue)
+		{
+			this.optionvalue = optionvalue;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/OptionStrictDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/OptionStrictDeclaration.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/OptionStrictDeclaration.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,48 @@
+// UsingAliasDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Collections;
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class OptionStrictDeclaration : AbstractNode
+	{
+		bool optionvalue;
+		
+		public bool OptionValue {
+			get {
+				return optionvalue;
+			}
+			set {
+				optionvalue = value;
+			}
+		}
+		
+		public OptionStrictDeclaration(bool optionvalue)
+		{
+			this.optionvalue = optionvalue;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/TypeDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/TypeDeclaration.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/TypeDeclaration.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,112 @@
+// TypeDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Collections;
+using System.Collections.Specialized;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class TypeDeclaration : AbstractNode
+	{
+		// Children of Enum : [Field]
+		string name;
+		Modifier modifier;
+		Types type; // Class | Interface | Structure | Enum | Module
+		string baseType = null;
+		ArrayList attributes;
+		ArrayList baseInterfaces;
+		
+		public string BaseType {
+			get {
+				return baseType;
+			}
+			set {
+				baseType = value;
+			}
+		}
+		
+		public string Name {
+			get {
+				return name;
+			}
+			set {
+				name = value;
+			}
+		}
+		public Modifier Modifier {
+			get {
+				return modifier;
+			}
+			set {
+				modifier = value;
+			}
+		}
+		public Types Type {
+			get {
+				return type;
+			}
+			set {
+				type = value;
+			}
+		}
+		public ArrayList BaseInterfaces  {
+			get {
+				return baseInterfaces;
+			}
+			set {
+				baseInterfaces = value;
+			}
+		}
+		public ArrayList Attributes {
+			get {
+				return attributes;
+			}
+			set {
+				attributes = value;
+			}
+		}
+		
+//		public TypeDeclaration(string name, Modifier modifier, Types type, StringCollection bases, ArrayList attributes)
+//		{
+//			this.name = name;
+//			this.modifier = modifier;
+//			this.type = type;
+//			this.bases = bases;
+//			this.attributes = attributes;
+//		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[TypeDeclaration: Name={0}, Modifier={1}, Type={2}, BaseType={3}]",
+			                     name,
+			                     modifier,
+			                     type,
+			                     baseType
+//			                     ,GetCollectionString(bases)
+			                     );
+		}
+		
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/IASTVisitor.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/IASTVisitor.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/IASTVisitor.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,94 @@
+using System;
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+	public interface IASTVisitor
+	{
+		// Abstract
+		object Visit(INode node, object data);
+		object Visit(CompilationUnit compilationUnit, object data);
+		
+		// Statements
+		object Visit(Statement statement, object data);
+		object Visit(StatementExpression statementExpression, object data);
+		object Visit(LocalVariableDeclaration localVariableDeclaration, object data);
+		object Visit(SimpleIfStatement ifStatement, object data);
+		object Visit(IfStatement ifStatement, object data);
+		object Visit(LabelStatement labelStatement, object data);
+		object Visit(GoToStatement goToStatement, object data);
+		object Visit(SelectStatement selectStatement, object data);
+		object Visit(StopStatement stopStatement, object data);
+		object Visit(ResumeStatement resumeStatement, object data);
+		object Visit(EraseStatement eraseStatement, object data);
+		object Visit(ErrorStatement errorStatement, object data);
+		object Visit(OnErrorStatement onErrorStatement, object data);
+		object Visit(ReDimStatement reDimStatement, object data);
+		object Visit(AddHandlerStatement addHandlerStatement, object data);
+		object Visit(BlockStatement blockStatement, object data);
+		object Visit(DoLoopStatement doLoopStatement, object data);
+		object Visit(EndStatement endStatement, object data);
+		object Visit(ExitStatement exitStatement, object data);
+		object Visit(ForeachStatement foreachStatement, object data);
+		object Visit(ForStatement forStatement, object data);
+		object Visit(LockStatement lockStatement, object data);
+		object Visit(RaiseEventStatement raiseEventStatement, object data);
+		object Visit(RemoveHandlerStatement removeHandlerStatement, object data);
+		object Visit(ReturnStatement returnStatement, object data);
+		object Visit(ThrowStatement throwStatement, object data);
+		object Visit(TryCatchStatement tryCatchStatement, object data);
+		object Visit(WhileStatement whileStatement, object data);
+		object Visit(WithStatement withStatement, object data);
+		
+		// Declarations
+		object Visit(VariableDeclaration variableDeclaration, object data);
+		object Visit(FieldDeclaration    fieldDeclaration, object data);
+		
+		object Visit(MethodDeclaration methodDeclaration, object data);
+		object Visit(ConstructorDeclaration constructorDeclaration, object data);
+		object Visit(DeclareDeclaration declareDeclaration, object data);
+		object Visit(PropertyDeclaration propertyDeclaration, object data);
+		object Visit(PropertyGetRegion propertyGetRegion, object data);
+		object Visit(PropertySetRegion PropertySetRegion, object data);
+		object Visit(EventDeclaration eventDeclaration, object data);
+		
+		// Global scope
+		object Visit(ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute attribute, object data);
+		object Visit(AttributeSection attributeDeclaration, object data);
+		object Visit(DelegateDeclaration delegateDeclaration, object data);
+		object Visit(ImportsDeclaration importsAliasDeclaration, object data);
+		object Visit(ImportsAliasDeclaration importsAliasDeclaration, object data);
+		object Visit(ImportsStatement importsStatement, object data);
+		object Visit(NamespaceDeclaration namespaceDeclaration, object data);
+		object Visit(OptionCompareDeclaration optionCompareDeclaration, object data);
+		object Visit(OptionExplicitDeclaration optionExplicitDeclaration, object data);
+		object Visit(OptionStrictDeclaration optionStrictDeclaration, object data);
+		object Visit(TypeDeclaration typeDeclaration, object data);
+		object Visit(TypeReference typeReference, object data);
+		
+		// Expressions
+		object Visit(PrimitiveExpression      primitiveExpression, object data);
+		object Visit(BinaryOperatorExpression binaryOperatorExpression, object data);
+		object Visit(ParenthesizedExpression parenthesizedExpression, object data);
+		object Visit(InvocationExpression invocationExpression, object data);
+		object Visit(IdentifierExpression identifierExpression, object data);
+		object Visit(TypeReferenceExpression typeReferenceExpression, object data);
+		object Visit(UnaryOperatorExpression unaryOperatorExpression, object data);
+		object Visit(AssignmentExpression assignmentExpression, object data);
+		object Visit(CastExpression castExpression, object data);
+		object Visit(ThisReferenceExpression thisReferenceExpression, object data);
+		object Visit(BaseReferenceExpression baseReferenceExpression, object data);
+		object Visit(ObjectCreateExpression objectCreateExpression, object data);
+		object Visit(ParameterDeclarationExpression parameterDeclarationExpression, object data);
+		object Visit(FieldReferenceOrInvocationExpression fieldReferenceOrInvocationExpression, object data);
+		object Visit(ArrayInitializerExpression arrayInitializerExpression, object data);
+		object Visit(GetTypeExpression getTypeExpression, object data);
+		object Visit(ClassReferenceExpression classReferenceExpression, object data);
+		object Visit(LoopControlVariableExpression loopControlVariableExpression, object data);
+		object Visit(NamedArgumentExpression namedArgumentExpression, object data);
+		object Visit(AddressOfExpression addressOfExpression, object data);
+		object Visit(TypeOfExpression typeOfExpression, object data);
+		object Visit(ArrayCreateExpression arrayCreateExpression, object data);
+		
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/INode.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/INode.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/INode.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,67 @@
+// INode.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Drawing;
+using System.Collections;
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public interface INode
+	{
+		INode Parent { 
+			get;
+			set;
+		}
+		
+		Hashtable Specials {
+			get;
+		}
+		
+		ArrayList Children {
+			get;
+		}
+		
+		Point StartLocation {
+			get;
+			set;
+		}
+		
+		Point EndLocation {
+			get;
+			set;
+		}
+		
+		/// <summary>
+		/// Visits all children
+		/// </summary>
+		/// <param name="visitor">The visitor to accept</param>
+		/// <param name="data">Additional data for the visitor</param>
+		/// <returns>The paremeter <paramref name="data"/></returns>
+		object AcceptChildren(IASTVisitor visitor, object data);
+		
+		/// <summary>
+		/// Accept the visitor
+		/// </summary>
+		/// <param name="visitor">The visitor to accept</param>
+		/// <param name="data">Additional data for the visitor</param>
+		/// <returns>The value the visitor returns after the visit</returns>
+		object AcceptVisitor(IASTVisitor visitor, object data);
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/LookupTableVisitor.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/LookupTableVisitor.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/LookupTableVisitor.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,98 @@
+using System;
+using System.Drawing;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+	public class LocalLookupVariable
+	{
+		TypeReference typeRef;
+		Point         startPos;
+		Point         endPos;
+		
+		public TypeReference TypeRef {
+			get {
+				return typeRef;
+			}
+		}
+		public Point StartPos {
+			get {
+				return startPos;
+			}
+		}
+		public Point EndPos {
+			get {
+				return endPos;
+			}
+		}
+		
+		public LocalLookupVariable(TypeReference typeRef, Point startPos, Point endPos)
+		{
+			this.typeRef = typeRef;
+			this.startPos = startPos;
+			this.endPos = endPos;
+		}
+	}
+	
+	public class LookupTableVisitor : AbstractASTVisitor
+	{
+		Hashtable variables      = new Hashtable();
+		ArrayList withStatements = new ArrayList();
+		
+		public Hashtable Variables {
+			get {
+				return variables;
+			}
+		}
+		
+		public ArrayList WithStatements {
+			get {
+				return withStatements;
+			}
+		}
+		
+		public void AddVariable(TypeReference typeRef, string name, Point startPos, Point endPos)
+		{
+			if (name == null || name.Length == 0) {
+				return;
+			}
+			name = name.ToLower();
+			ArrayList list;
+			if (variables[name] == null) {
+				variables[name] = list = new ArrayList();
+			} else {
+				list = (ArrayList)variables[name];
+			}
+			list.Add(new LocalLookupVariable(typeRef, startPos, endPos));
+		}
+		
+		public override object Visit(LocalVariableDeclaration localVariableDeclaration, object data)
+		{
+			foreach (VariableDeclaration varDecl in localVariableDeclaration.Variables) {
+				AddVariable(varDecl.Type, 
+				            varDecl.Name,
+				            localVariableDeclaration.StartLocation,
+				            CurrentBlock == null ? new Point(-1, -1) : CurrentBlock.EndLocation);
+			}
+			return data;
+		}
+		
+		public override object Visit(LoopControlVariableExpression loopControlVariableExpression, object data)
+		{
+			AddVariable(loopControlVariableExpression.Type, 
+			            loopControlVariableExpression.Name,
+			            loopControlVariableExpression.StartLocation,
+			            CurrentBlock == null ? new Point(-1, -1) : CurrentBlock.EndLocation);
+			return data;
+		}
+		
+		public override object Visit(WithStatement withStatement, object data)
+		{
+			withStatements.Add(withStatement);
+			return base.Visit(withStatement, data);
+		}
+		
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Modifier.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Modifier.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Modifier.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,74 @@
+using System;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+
+	[Flags()]
+	public enum ParamModifier
+	{
+		None						= 0x0000,	// 0
+		ByVal						= 0x0001,	// 1
+		ByRef						= 0x0002,	// 2
+		ParamArray					= 0x0004,	// 4
+		Optional					= 0x0008,	// 8
+		All							= ByVal | ByRef | ParamArray | Optional
+	}
+
+	[Flags()]
+	public enum Modifier
+	{
+		None						= 0x0000,	// 0
+		
+		// Access
+		Private						= 0x0001,	// 1
+		Friend						= 0x0002,	// 2
+		Protected					= 0x0004,	// 4
+		Public						= 0x0008,	// 8
+		Dim							= 0x0010,	// 16
+		
+		// Scope
+		Shadows						= 0x000020,	// 32
+		Overloads					= 0x000040,	// 64
+		Overrides					= 0x000080,	// 128
+		NotOverridable				= 0x000100,	// 256
+		MustOverride				= 0x000200,	// 512
+		MustInherit					= 0x000400,	// 1024
+		NotInheritable				= 0x000800,	// 2048
+		Shared						= 0x001000,	// 4096
+		Overridable					= 0x002000,	// 8192
+		Constant					= 0x004000,
+		// Methods and properties
+		WithEvents					= 0x008000,
+		ReadOnly					= 0x010000,
+		WriteOnly					= 0x020000,
+		Default						= 0x040000,
+		
+		// local variables
+		Static						= 0x100000,
+		
+		All							= Private | Public | Protected  | Friend | Shadows | Constant |
+									  Overloads | Overrides | NotOverridable | MustOverride |
+									  MustInherit | NotInheritable | Shared | Overridable |
+									  WithEvents | ReadOnly | WriteOnly | Default | Dim,
+		
+		Classes						= Private | Public | Protected | Friend | Shadows | MustInherit | NotInheritable,
+		Structures					= Private | Public | Protected | Friend | Shadows,
+		Enums						= Private | Public | Protected | Friend | Shadows,
+		Modules						= Private | Public | Protected | Friend,
+		Interfaces					= Private | Public | Protected | Friend | Shadows,
+		Delegates					= Private | Public | Protected | Friend | Shadows,
+		Methods						= Private | Public | Protected | Friend | Shadows | Shared | Overridable | NotOverridable | MustOverride | Overrides | Overloads,
+		ExternalMethods				= Private | Public | Protected | Friend | Shadows | Overloads,
+		Constructors				= Private | Public | Protected | Friend | Shared,
+		Events						= Private | Public | Protected | Friend | Shadows | Shared,
+		Constants					= Private | Public | Protected | Friend | Shadows,
+		Fields						= Private | Public | Protected | Friend | Shadows | Shared | ReadOnly | WithEvents | Dim ,
+		Properties					= Private | Public | Protected | Friend | Shadows | Shared | Overridable | NotOverridable | MustOverride | Overrides | Overloads | Default | ReadOnly | WriteOnly,
+		
+		// this is not documented in the spec
+		InterfaceEvents				= Shadows,
+		InterfaceMethods			= Shadows | Overloads,
+		InterfaceProperties			= Shadows | Overloads | ReadOnly | WriteOnly | Default,
+		InterfaceEnums				= Shadows,
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/AddHandlerStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/AddHandlerStatement.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/AddHandlerStatement.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,41 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class AddHandlerStatement : Statement
+	{
+		Expression eventExpression;
+		Expression handlerExpression;
+		
+		public Expression EventExpression {
+			get {
+				return eventExpression;
+			}
+			set {
+				eventExpression = value;
+			}
+		}
+		public Expression HandlerExpression {
+			get {
+				return handlerExpression;
+			}
+			set {
+				handlerExpression = value;
+			}
+		}
+		
+		public AddHandlerStatement(Expression eventExpression, Expression handlerExpression)
+		{
+			this.eventExpression = eventExpression;
+			this.handlerExpression = handlerExpression;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/BlockStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/BlockStatement.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/BlockStatement.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,21 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class BlockStatement : Statement
+	{
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[BlockStatement: Children={0}]", 
+			                     GetCollectionString(base.Children));
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/DoLoopStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/DoLoopStatement.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/DoLoopStatement.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,64 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class DoLoopStatement : Statement
+	{
+		Expression condition;
+		Statement  embeddedStatement;
+		ConditionType conditionType;
+		ConditionPosition conditionPosition;
+		
+		public ConditionPosition ConditionPosition {
+			get {
+				return conditionPosition;
+			}
+			set {
+				conditionPosition = value;
+			}
+		}
+		
+		public ConditionType ConditionType {
+			get {
+				return conditionType;
+			}
+			set {
+				conditionType = value;
+			}
+		}
+		
+		public Expression Condition {
+			get {
+				return condition;
+			}
+			set {
+				condition = value;
+			}
+		}
+		
+		public Statement EmbeddedStatement {
+			get {
+				return embeddedStatement;
+			}
+			set {
+				embeddedStatement = value;
+			}
+		}
+		
+		public DoLoopStatement(Expression condition, Statement embeddedStatement, ConditionType conditionType, ConditionPosition conditionPosition)
+		{
+			this.condition = condition;
+			this.embeddedStatement = embeddedStatement;
+			this.conditionType = conditionType;
+			this.conditionPosition = conditionPosition;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/EndStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/EndStatement.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/EndStatement.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,20 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class EndStatement : Statement
+	{
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[EndStatement]");
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/EraseStatements.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/EraseStatements.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/EraseStatements.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,31 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class EraseStatement : Statement
+	{
+		ArrayList expressions;
+		
+		public ArrayList Expressions
+		{
+			get {
+				return expressions;
+			} set {
+				expressions = value;
+			}
+		}
+		
+		public EraseStatement(ArrayList expressions)
+		{
+			this.expressions = expressions;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ErrorStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ErrorStatement.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ErrorStatement.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,31 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class ErrorStatement : Statement
+	{
+		Expression expression;
+		
+		public ErrorStatement(Expression expression)
+		{
+			this.expression = expression;
+		}
+		
+		public Expression Expression
+		{
+			get {
+				return expression;
+			}set {
+				expression = value;
+			}
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ExitStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ExitStatement.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ExitStatement.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,36 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class ExitStatement : Statement
+	{
+		ExitType exitType;
+		
+		public ExitType ExitType {
+			get {
+				return exitType;
+			}
+			set {
+				exitType = value;
+			}
+		}
+		
+		public ExitStatement(ExitType exitType)
+		{
+			this.exitType = exitType;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[ExitStatement]");
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ForStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ForStatement.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ForStatement.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,92 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class ForStatement : Statement
+	{
+		Expression start;
+		Expression end;
+		Expression step;
+		Statement embeddedStatement;
+		ArrayList nextExpressions;
+		LoopControlVariableExpression loopControlVariable;
+		
+		public LoopControlVariableExpression LoopControlVariable
+		{
+			get {
+				return loopControlVariable;
+			}
+			set {
+				loopControlVariable = value;
+			}
+		}
+		
+		public ArrayList NextExpressions
+		{
+			get {
+				return nextExpressions;
+			}
+			set {
+				nextExpressions = value;
+			}
+		}
+		
+		public Expression Start
+		{
+			get {
+				return start;
+			}
+			set {
+				start = value;
+			}
+		}
+		
+		public Expression End
+		{
+			get {
+				return end;
+			}
+			set {
+				end = value;
+			}
+		}
+		
+		public Expression Step
+		{
+			get {
+				return step;
+			}
+			set {
+				step = value;
+			}
+		}
+		
+		public Statement EmbeddedStatement
+		{
+			get {
+				return embeddedStatement;
+			}
+			set {
+				embeddedStatement = value;
+			}
+		}
+		
+		public ForStatement(LoopControlVariableExpression loopControlVariable, Expression start, Expression end, Expression step, Statement embeddedStatement, ArrayList nextExpressions)
+		{
+			this.start = start;
+			this.nextExpressions = nextExpressions;
+			this.end = end;
+			this.step = step;
+			this.embeddedStatement = embeddedStatement;
+			this.loopControlVariable = loopControlVariable;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ForeachStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ForeachStatement.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ForeachStatement.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,64 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class ForeachStatement : Statement
+	{
+		LoopControlVariableExpression loopControlVariable;
+		Expression    expression;
+		Statement     embeddedStatement;
+		Expression    element;
+		
+		public LoopControlVariableExpression LoopControlVariable
+		{
+			get {
+				return loopControlVariable;
+			}
+			set {
+				loopControlVariable = value;
+			}
+		}
+		
+		public Expression Element {
+			get {
+				return element;
+			}
+			set {
+				element = value;
+			}
+		}
+		
+		public Expression Expression {
+			get {
+				return expression;
+			}
+			set {
+				expression = value;
+			}
+		}
+		
+		public Statement EmbeddedStatement {
+			get {
+				return embeddedStatement;
+			}
+			set {
+				embeddedStatement = value;
+			}
+		}
+		
+		public ForeachStatement(LoopControlVariableExpression loopControlVariable , Expression expression, Statement embeddedStatement, Expression element)
+		{
+			this.loopControlVariable = loopControlVariable;
+			this.expression        = expression;
+			this.embeddedStatement = embeddedStatement;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/GoToStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/GoToStatement.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/GoToStatement.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,32 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class GoToStatement : Statement
+	{
+		string labelName;
+		
+		public string LabelName
+		{
+			get {
+				return labelName;
+			}
+			set {
+				labelName = value;
+			}
+		}
+		
+		public GoToStatement(string labelName)
+		{
+			this.labelName = labelName;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/IfStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/IfStatement.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/IfStatement.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,147 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB 
+{
+	public class IfStatement : Statement
+	{
+		Expression condition;
+		Statement  embeddedElseStatement;
+		Statement  embeddedStatement;
+		ArrayList elseIfStatements;
+		
+		public ArrayList ElseIfStatements
+		{
+			get {
+				return elseIfStatements;
+			}
+			set {
+				elseIfStatements = value;
+			}
+		}
+		
+		public Statement EmbeddedElseStatement
+		{
+			get {
+				return embeddedElseStatement;
+			}
+			set {
+				embeddedElseStatement = value;
+			}
+		}
+		
+		public Expression Condition
+		{
+			get {
+				return condition;
+			}
+			set {
+				condition = value;
+			}
+		}
+		
+		public Statement EmbeddedStatement
+		{
+			get {
+				return embeddedStatement;
+			}
+			set {
+				embeddedStatement = value;
+			}
+		}
+		
+		public IfStatement(Expression condition, Statement embeddedStatement)
+		{
+			this.condition = condition;
+			this.embeddedStatement = embeddedStatement;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+	
+	public class ElseIfSection : Statement
+	{
+		Expression condition;
+		Statement  embeddedStatement;
+		
+		public Expression Condition
+		{
+			get {
+				return condition;
+			}
+			set {
+				condition = value;
+			}
+		}
+		public Statement EmbeddedStatement
+		{
+			get {
+				return embeddedStatement;
+			}
+			set {
+				embeddedStatement = value;
+			}
+		}
+		
+		public ElseIfSection(Expression condition, Statement embeddedStatement)
+		{
+			this.condition = condition;
+			this.embeddedStatement = embeddedStatement;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+	
+	public class SimpleIfStatement : Statement
+	{
+		Expression condition;
+		ArrayList statements;
+		ArrayList elseStatements;
+		
+		public ArrayList ElseStatements
+		{
+			get {
+				return elseStatements;
+			}
+			set {
+				elseStatements = value;
+			}
+		}
+		
+		public Expression Condition {
+			get {
+				return condition;
+			}
+			set {
+				condition = value;
+			}
+		}
+		public ArrayList Statements {
+			get {
+				return statements;
+			}
+			set {
+				statements = value;
+			}
+		}
+		
+		public SimpleIfStatement(Expression condition)
+		{
+			this.condition = condition;
+		}
+	
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}
+

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/LabelStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/LabelStatement.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/LabelStatement.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,48 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class LabelStatement : Statement
+	{
+		string label;
+		Statement embeddedStatement;
+		
+		public Statement EmbeddedStatement
+		{
+			get {
+				return embeddedStatement;
+			}
+			set {
+				embeddedStatement = value;
+			}
+		}
+		
+		public string Label {
+			get {
+				return label;
+			}
+			set {
+				label = value;
+			}
+		}
+		
+		public LabelStatement(string label)
+		{
+			this.label = label;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[LabelStatement: Label={0}]",
+			                     label);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/LocalVariableDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/LocalVariableDeclaration.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/LocalVariableDeclaration.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,67 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class LocalVariableDeclaration : Statement
+	{
+		Modifier      modifier = Modifier.None;
+		ArrayList     variables = new ArrayList(); // [VariableDeclaration]
+		INode block;
+		
+		public Modifier Modifier {
+			get {
+				return modifier;
+			}
+			set {
+				modifier = value;
+			}
+		}
+		
+		public ArrayList Variables {
+			get {
+				return variables;
+			} set {
+				variables = value;
+			}
+		}
+		
+		public INode Block {
+			get {
+				return block;
+			}
+			set {
+				block = value;
+			}
+		}
+		
+		public LocalVariableDeclaration(Modifier modifier)
+		{
+			this.modifier = modifier;
+		}
+		
+		public VariableDeclaration GetVariableDeclaration(string variableName)
+		{
+			foreach (VariableDeclaration variableDeclaration in variables) {
+				if (variableDeclaration.Name == variableName) {
+					return variableDeclaration;
+				}
+			}
+			return null;
+		}
+				
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[LocalVariableDeclaration: Modifier ={0} Variables={1}]", 
+			                     modifier, 
+			                     GetCollectionString(variables));
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/LockStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/LockStatement.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/LockStatement.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,46 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class LockStatement : Statement
+	{
+		Expression lockExpression;
+		Statement  embeddedStatement;
+		
+		public Expression LockExpression {
+			get {
+				return lockExpression;
+			}
+			set {
+				lockExpression = value;
+			}
+		}
+		public Statement EmbeddedStatement {
+			get {
+				return embeddedStatement;
+			}
+			set {
+				embeddedStatement = value;
+			}
+		}
+		public LockStatement(Expression lockExpression, Statement embeddedStatement)
+		{
+			this.lockExpression = lockExpression;
+			this.embeddedStatement = embeddedStatement;
+		}
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[LockStatement: LockExpression={0}, EmbeddedStatement={1}]", 
+			                     lockExpression,
+			                     embeddedStatement);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/OnErrorStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/OnErrorStatement.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/OnErrorStatement.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,32 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class OnErrorStatement : Statement
+	{
+		Statement embeddedStatement;
+		
+		public Statement EmbeddedStatement
+		{
+			get {
+				return embeddedStatement;
+			}
+			set {
+				embeddedStatement = value;
+			}
+		}
+		
+		public OnErrorStatement(Statement embeddedStatement)
+		{
+			this.embeddedStatement = embeddedStatement;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/RaiseEventStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/RaiseEventStatement.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/RaiseEventStatement.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,47 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class RaiseEventStatement : Statement
+	{
+		string eventName;
+		ArrayList parameters;
+		
+		public string EventName {
+			get {
+				return eventName;
+			}
+			set {
+				eventName = value;
+			}
+		}
+		public ArrayList Parameters {
+			get {
+				return parameters;
+			}
+			set {
+				parameters = value;
+			}
+		}
+		
+		public RaiseEventStatement(string eventName, ArrayList parameters)
+		{
+			this.eventName = eventName;
+			this.parameters = parameters;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return  String.Format("[RaiseEventStatement: EventName={0}]", 
+			                     EventName);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ReDimStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ReDimStatement.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ReDimStatement.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,31 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class ReDimStatement : Statement
+	{
+		ArrayList reDimClauses;
+		
+		public ArrayList ReDimClauses
+		{
+			get {
+				return reDimClauses;
+			} set {
+				reDimClauses = value;
+			}
+		}
+		
+		public ReDimStatement(ArrayList reDimClauses)
+		{
+			this.reDimClauses = reDimClauses;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/RemoveHandlerStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/RemoveHandlerStatement.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/RemoveHandlerStatement.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,41 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class RemoveHandlerStatement : Statement
+	{
+		Expression eventExpression;
+		Expression handlerExpression;
+		
+		public Expression EventExpression {
+			get {
+				return eventExpression;
+			}
+			set {
+				eventExpression = value;
+			}
+		}
+		public Expression HandlerExpression {
+			get {
+				return handlerExpression;
+			}
+			set {
+				handlerExpression = value;
+			}
+		}
+		
+		public RemoveHandlerStatement(Expression eventExpression, Expression handlerExpression)
+		{
+			this.eventExpression = eventExpression;
+			this.handlerExpression = handlerExpression;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ResumeStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ResumeStatement.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ResumeStatement.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,48 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class ResumeStatement : Statement
+	{
+		string labelName;
+		bool next;
+		
+		public string LabelName
+		{
+			get {
+				return labelName;
+			}
+			set {
+				labelName = value;
+			}
+		}
+		
+		public bool Next
+		{
+			get {
+				return next;
+			}
+			set {
+				next = value;
+			}
+		}
+		
+		public ResumeStatement(bool next)
+		{
+			this.next = next;
+		}
+		
+		public ResumeStatement(string labelName)
+		{
+			this.labelName = labelName;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ReturnStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ReturnStatement.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ReturnStatement.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,37 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class ReturnStatement : Statement
+	{
+		Expression returnExpression;
+		
+		public Expression ReturnExpression {
+			get {
+				return returnExpression;
+			}
+			set {
+				returnExpression = value;
+			}
+		}
+		
+		public ReturnStatement(Expression returnExpression)
+		{
+			this.returnExpression = returnExpression;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[ReturnStatement: ReturnExpression={0}]", 
+			                     returnExpression);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/SelectStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/SelectStatement.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/SelectStatement.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,144 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class SelectStatement : Statement
+	{
+		Expression selectExpression;
+		ArrayList  selectSections  = new ArrayList();
+		
+		public Expression SelectExpression {
+			get {
+				return selectExpression;
+			}
+			set {
+				selectExpression = value;
+			}
+		}
+		
+		public ArrayList SelectSections
+		{
+			get {
+				return selectSections;
+			}
+			set {
+				selectSections = value;
+			}
+		}
+		
+		public SelectStatement(Expression selectExpression, ArrayList selectSections)
+		{
+			this.selectExpression = selectExpression;
+			this.selectSections = selectSections;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+	
+	public class SelectSection : Statement
+	{
+		ArrayList caseClauses = new ArrayList();
+		Statement embeddedStatement;
+		
+		public ArrayList CaseClauses
+		{
+			get {
+				return caseClauses;
+			}
+			set {
+				caseClauses = value;
+			}
+		}
+		
+		public Statement EmbeddedStatement
+		{
+			get {
+				return embeddedStatement;
+			}
+			set {
+				embeddedStatement = value;
+			}
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+	
+	public class CaseClause : AbstractNode
+	{
+		BinaryOperatorType comparisonOperator = BinaryOperatorType.None;
+		Expression comparisonExpression;
+		Expression boundaryExpression;
+		bool isDefaultCase = false;
+		
+		public bool IsDefaultCase
+		{
+			get {
+				return isDefaultCase;
+			}
+			set {
+				isDefaultCase = value;
+			}
+		}
+		
+		public BinaryOperatorType ComparisonOperator
+		{
+			get {
+				return comparisonOperator;
+			}
+			set {
+				comparisonOperator = value;
+			}
+		}
+		
+		public Expression ComparisonExpression
+		{
+			get {
+				return comparisonExpression;
+			}
+			set {
+				comparisonExpression = value;
+			}
+		}
+		
+		public Expression BoundaryExpression
+		{
+			get {
+				return boundaryExpression;
+			}
+			set {
+				boundaryExpression = value;
+			}
+		}
+		
+		public CaseClause(bool isDefaultCase)
+		{
+			this.isDefaultCase = isDefaultCase;
+		}
+		
+		public CaseClause(Expression comparisonExpression, Expression boundaryExpression)
+		{
+			this.boundaryExpression = boundaryExpression;
+			this.comparisonExpression = comparisonExpression;
+		}
+		
+		public CaseClause(BinaryOperatorType comparisonOperator, Expression comparisonExpression)
+		{
+			this.comparisonOperator = comparisonOperator;
+			this.comparisonExpression = comparisonExpression;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/Statement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/Statement.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/Statement.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,28 @@
+// Statement.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class Statement : AbstractNode
+	{
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/StopStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/StopStatement.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/StopStatement.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,20 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class StopStatement : Statement
+	{
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[StopStatement]");
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ThrowStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ThrowStatement.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ThrowStatement.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,37 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class ThrowStatement : Statement
+	{
+		Expression throwExpression;
+		
+		public Expression ThrowExpression {
+			get {
+				return throwExpression;
+			}
+			set {
+				throwExpression = value;
+			}
+		}
+		
+		public ThrowStatement(Expression throwExpression)
+		{
+			this.throwExpression = throwExpression;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[ThrowStatement: ThrowExpression={0}]", 
+			                     throwExpression);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/TryCatchStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/TryCatchStatement.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/TryCatchStatement.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,135 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class TryCatchStatement : Statement
+	{
+		Statement statementBlock;
+		ArrayList catchClauses;
+		Statement finallyBlock;
+		
+		public Statement StatementBlock {
+			get {
+				return statementBlock;
+			}
+			set {
+				statementBlock = value;
+			}
+		}
+		
+		public ArrayList CatchClauses {
+			get {
+				return catchClauses;
+			}
+			set {
+				catchClauses = value;
+			}
+		}
+		
+		public Statement FinallyBlock {
+			get {
+				return finallyBlock;
+			}
+			set {
+				finallyBlock = value;
+			}
+		}
+		
+		public TryCatchStatement(Statement statementBlock, ArrayList catchClauses, Statement finallyBlock)
+		{
+			this.statementBlock = statementBlock;
+			this.catchClauses = catchClauses;
+			this.finallyBlock = finallyBlock;
+		}
+		
+		public TryCatchStatement(Statement statementBlock, ArrayList catchClauses)
+		{
+			this.statementBlock = statementBlock;
+			this.catchClauses = catchClauses;
+			this.finallyBlock = null;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[TryCatchStatement: StatementBlock={0}, CatchClauses={1}, FinallyBlock={2}]",
+			                     statementBlock,
+			                     GetCollectionString(catchClauses),
+			                     finallyBlock);
+		}
+	}
+	
+	public class CatchClause
+	{
+		TypeReference type;
+		string variableName;
+		Statement       statementBlock;
+		Expression condition;
+		
+		public Expression Condition {
+			get {
+				return condition;
+			}
+			set {
+				condition = value;
+			}
+		}
+		
+		public TypeReference Type {
+			get {
+				return type;
+			}
+			set {
+				type = value;
+			}
+		}
+		
+		public string VariableName {
+			get {
+				return variableName;
+			}
+			set {
+				variableName = value;
+			}
+		}
+		
+		public Statement StatementBlock {
+			get {
+				return statementBlock;
+			}
+			set {
+				statementBlock = value;
+			}
+		}
+		
+		public CatchClause(TypeReference type, string variableName, Statement statementBlock, Expression condition)
+		{
+			this.type = type;
+			this.variableName = variableName;
+			this.statementBlock = statementBlock;
+			this.condition = condition;
+		}
+		
+		public CatchClause(Statement statementBlock)
+		{
+			this.type         = null;
+			this.variableName = null;
+			this.statementBlock = statementBlock;
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[CatchClause: Type={0}, VariableName={1}, StatementBlock={2}]", 
+			                     type,
+			                     variableName,
+			                     statementBlock);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/WhileStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/WhileStatement.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/WhileStatement.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,49 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class WhileStatement : Statement
+	{
+		Expression condition;
+		Statement  embeddedStatement;
+		
+		public Expression Condition {
+			get {
+				return condition;
+			}
+			set {
+				condition = value;
+			}
+		}
+		
+		public Statement EmbeddedStatement {
+			get {
+				return embeddedStatement;
+			}
+			set {
+				embeddedStatement = value;
+			}
+		}
+		
+		public WhileStatement(Expression condition, Statement embeddedStatement)
+		{
+			this.condition = condition;
+			this.embeddedStatement = embeddedStatement;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[WhileStatement: Condition={0}, EmbeddedStatement={1}]", 
+			                     condition,
+			                     embeddedStatement);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/WithStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/WithStatement.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/WithStatement.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,44 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class WithStatement : Statement
+	{
+		Expression withExpression;
+		BlockStatement body = null;
+		
+		public Expression WithExpression {
+			get {
+				return withExpression;
+			}
+		}
+		
+		public BlockStatement Body {
+			get {
+				return body;
+			}
+			set {
+				body = value;
+			}
+		}
+		
+		public WithStatement(Expression withExpression)
+		{
+			this.withExpression = withExpression;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		public override string ToString()
+		{
+			return String.Format("[WithStatment: WidthExpression={0}, Body={1}]", 
+			                     withExpression,
+			                     body);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/ConstructorDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/ConstructorDeclaration.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/ConstructorDeclaration.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,92 @@
+// ConstructorDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class ConstructorDeclaration : AbstractNode
+	{
+		string          name;
+		Modifier modifier;
+		ArrayList       parameters = new ArrayList(); // [ParameterDeclarationExpression]
+		ArrayList       attributes = new ArrayList();
+		BlockStatement  blockStatement = null;
+		
+		public string Name {
+			get {
+				return name;
+			}
+			set {
+				name = value;
+			}
+		}
+		
+		public Modifier Modifier {
+			get {
+				return modifier;
+			}
+			set {
+				modifier = value;
+			}
+		}
+		
+		public ArrayList Parameters {
+			get {
+				return parameters;
+			}
+			set {
+				parameters = value;
+			}
+		}
+		
+		public ArrayList Attributes {
+			get {
+				return attributes;
+			}
+			set {
+				attributes = value;
+			}
+		}
+		
+		public BlockStatement Body {
+			get {
+				return blockStatement;
+			}
+			set {
+				blockStatement = value;
+			}
+		}
+		
+		public ConstructorDeclaration(string name, Modifier modifier, ArrayList parameters, ArrayList attributes)
+		{
+			this.name     = name;
+			this.modifier = modifier;
+			this.parameters = parameters;
+			this.attributes = attributes;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}
+

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/DeclareDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/DeclareDeclaration.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/DeclareDeclaration.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,127 @@
+// DeclareDeclaration.cs
+// Copyright (C) 2003 Markus Palme (markuspalme at gmx.de)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Collections;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class DeclareDeclaration : AbstractNode
+	{
+		string          name;
+		string          alias;
+		string          library;
+		CharsetModifier charset = CharsetModifier.None;
+		Modifier modifier;
+		TypeReference   returnType;
+		ArrayList       parameters;
+		ArrayList       attributes;
+		
+		public string Name {
+			get {
+				return name;
+			}
+			set {
+				name = value;
+			}
+		}
+		
+		public Modifier Modifier {
+			get {
+				return modifier;
+			}
+			set {
+				modifier = value;
+			}
+		}
+		
+		public TypeReference ReturnType {
+			get {
+				return returnType;
+			}
+			set {
+				returnType = value;
+			}
+		}
+		
+		public ArrayList Parameters {
+			get {
+				return parameters;
+			}
+			set {
+				parameters = value;
+			}
+		}
+		
+		public CharsetModifier Charset
+		{
+			get {
+				return charset;
+			}
+			set {
+				charset = value;
+			}
+		}
+		
+		public string Alias
+		{
+			get {
+				return alias;
+			}
+			set {
+				alias = value;
+			}
+		}
+		
+		public string Library
+		{
+			get {
+				return library;
+			}
+			set {
+				library = value;
+			}
+		}
+		
+		public ArrayList Attributes {
+			get {
+				return attributes;
+			}
+			set {
+				attributes = value;
+			}
+		}
+		
+		public DeclareDeclaration(string name, Modifier modifier, TypeReference returnType, ArrayList parameters, ArrayList attributes, string library, string alias, CharsetModifier charset)
+		{
+			this.name = name;
+			this.modifier = modifier;
+			this.returnType = returnType;
+			this.parameters = parameters;
+			this.attributes = attributes;
+			this.library = library;
+			this.alias = alias;
+			this.charset = charset;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/EventDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/EventDeclaration.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/EventDeclaration.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,117 @@
+// EventDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Drawing;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class EventDeclaration : AbstractNode
+	{
+		TypeReference typeReference;
+		Modifier modifier;
+		ArrayList parameters;
+		ArrayList attributes;
+		string name;
+		ImplementsClause implementsClause;
+		
+		public ArrayList Parameters {
+			get {
+				return parameters;
+			}
+			set {
+				parameters = value;
+			}
+		}
+		public ImplementsClause ImplementsClause {
+			get {
+				return implementsClause;
+			}
+			set {
+				implementsClause = value;
+			}
+		}
+		
+		public TypeReference TypeReference {
+			get {
+				return typeReference;
+			}
+			set {
+				typeReference = value;
+			}
+		}
+		
+		public Modifier Modifier {
+			get {
+				return modifier;
+			}
+			set {
+				modifier = value;
+			}
+		}
+		
+		public ArrayList Attributes {
+			get {
+				return attributes;
+			}
+			set {
+				attributes = value;
+			}
+		}
+		
+		public string Name {
+			get {
+				return name;
+			}
+			set {
+				name = value;
+			}
+		}
+		
+		
+		
+		public EventDeclaration(TypeReference typeReference, Modifier modifier, ArrayList parameters, ArrayList attributes, string name, ImplementsClause implementsClause)
+		{
+			this.typeReference = typeReference;
+			this.modifier = modifier;
+			this.parameters = parameters;
+			this.attributes = attributes;
+			this.name = name;
+			this.implementsClause = implementsClause;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[EventDeclaration: typeReference = {0}, modifier = {1}, parameters = {2}, attributes = {3}, name = {4}, implementsClause = {5}]",
+			                     typeReference,
+			                     modifier,
+			                     parameters,
+			                     attributes,
+			                     name,
+			                     implementsClause);
+		}
+		
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/FieldDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/FieldDeclaration.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/FieldDeclaration.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,104 @@
+// FieldDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class FieldDeclaration : AbstractNode
+	{
+		ArrayList       attributes = null;
+		TypeReference   typeReference = null;
+		Modifier        modifier;
+		ArrayList       fields = new ArrayList(); // [VariableDeclaration]
+		
+		public ArrayList Attributes {
+			get {
+				return attributes;
+			}
+			set {
+				attributes = value;
+			}
+		}
+		public TypeReference TypeReference {
+			get {
+				return typeReference;
+			}
+			set {
+				typeReference = value;
+			}
+		}
+		public Modifier Modifier {
+			get {
+				return modifier;
+			}
+			set {
+				modifier = value;
+			}
+		}
+		public ArrayList Fields {
+			get {
+				return fields;
+			}
+			set {
+				fields = value;
+			}
+		}
+		
+		// for enum members
+		public FieldDeclaration(ArrayList attributes)
+		{
+			this.attributes = attributes;
+		}
+		
+		// for all other cases
+		public FieldDeclaration(ArrayList attributes, TypeReference typeReference, Modifier modifier)
+		{
+			this.attributes    = attributes;
+			this.typeReference = typeReference;
+			this.modifier      = modifier;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public VariableDeclaration GetVariableDeclaration(string variableName)
+		{
+			foreach (VariableDeclaration variableDeclaration in Fields) {
+				if (variableDeclaration.Name == variableName) {
+					return variableDeclaration;
+				}
+			}
+			return null;
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[FieldDeclaration: attributes = {0}, typeReference = {1}, modifier = {2}, fields = {3}]",
+			                     attributes,
+			                     typeReference,
+			                     modifier,
+			                     GetCollectionString(fields));		
+		}
+		
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/HandlesClause.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/HandlesClause.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/HandlesClause.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,27 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class HandlesClause : AbstractNode
+	{
+		ArrayList eventNames;
+		
+		public HandlesClause()
+		{
+			this.eventNames = new ArrayList();
+		}
+		
+		public ArrayList EventNames {
+			get {
+				return eventNames;
+			}
+			set {
+				eventNames = value;
+			}
+		}
+		
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/ImplementsClause.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/ImplementsClause.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/ImplementsClause.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,27 @@
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class ImplementsClause : AbstractNode
+	{
+		ArrayList baseMembers;
+		
+		public ImplementsClause()
+		{
+			this.baseMembers = new ArrayList();
+		}
+		
+		public ArrayList BaseMembers
+		{
+			get {
+				return baseMembers;
+			}
+			set {
+				baseMembers = value;
+			}
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/MethodDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/MethodDeclaration.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/MethodDeclaration.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,127 @@
+// MethodDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class MethodDeclaration : AbstractNode
+	{
+		string          name;
+		Modifier modifier;
+		TypeReference   typeReference;
+		ArrayList       parameters; // [ParameterDeclarationExpression]
+		ArrayList       attributes;
+		BlockStatement  body;
+		HandlesClause   handlesClause;
+		ImplementsClause implementsClause;
+		
+		public ImplementsClause ImplementsClause {
+			get {
+				return implementsClause;
+			}
+			set {
+				implementsClause = value;
+			}
+		}
+		
+		public HandlesClause HandlesClause {
+			get {
+				return handlesClause;
+			}
+			set {
+				handlesClause = value;
+			}
+		}
+		
+		public string Name {
+			get {
+				return name;
+			}
+			set {
+				name = value;
+			}
+		}
+		
+		public BlockStatement Body {
+			get {
+				return body;
+			}
+			set {
+				body = value;
+			}
+		}
+		
+		public Modifier Modifier {
+			get {
+				return modifier;
+			}
+			set {
+				modifier = value;
+			}
+		}
+		
+		public TypeReference TypeReference {
+			get {
+				return typeReference;
+			}
+			set {
+				typeReference = value;
+			}
+		}
+		
+		public ArrayList Parameters {
+			get {
+				return parameters;
+			}
+			set {
+				parameters = value;
+			}
+		}
+		
+		public ArrayList Attributes {
+			get {
+				return attributes;
+			}
+			set {
+				attributes = value;
+			}
+		}
+		
+		public MethodDeclaration(string name, Modifier modifier, TypeReference typeReference, ArrayList parameters, ArrayList attributes)
+		{
+			this.name = name;
+			this.modifier = modifier;
+			this.typeReference = typeReference;
+			this.parameters = parameters;
+			this.attributes = attributes;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[MethodDeclaration: Name={0}, Modifier={1}, TypeReference={2}]", name, modifier, typeReference);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/PropertyDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/PropertyDeclaration.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/PropertyDeclaration.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,167 @@
+// PropertyDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Drawing;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class PropertyDeclaration : AbstractNode
+	{
+		string          name;
+		Modifier        modifier;
+		TypeReference   typeReference;
+		ArrayList       attributes;
+		ArrayList       parameters;
+		Point           bodyStart;
+		Point           bodyEnd;
+		ImplementsClause implementsClause;
+		
+		PropertyGetRegion  propertyGetRegion = null;
+		PropertySetRegion  propertySetRegion = null;
+		
+		public ImplementsClause ImplementsClause {
+			get {
+				return implementsClause;
+			}
+			set {
+				implementsClause = value;
+			}
+		}
+		
+		public ArrayList Parameters {
+			get {
+				return parameters;
+			}
+			set {
+				parameters = value;
+			}
+		}
+		
+		public string Name {
+			get {
+				return name;
+			}
+			set {
+				name = value;
+			}
+		}
+		
+		public Modifier Modifier {
+			get {
+				return modifier;
+			}
+			set {
+				modifier = value;
+			}
+		}
+		
+		public TypeReference TypeReference {
+			get {
+				return typeReference;
+			}
+			set {
+				typeReference = value;
+			}
+		}
+		
+		public ArrayList Attributes {
+			get {
+				return attributes;
+			}
+			set {
+				attributes = value;
+			}
+		}
+		
+		public PropertyGetRegion GetRegion {
+			get {
+				return propertyGetRegion;
+			}
+			set {
+				propertyGetRegion = value;
+			}
+		}
+		public PropertySetRegion SetRegion {
+			get {
+				return propertySetRegion;
+			}
+			set {
+				propertySetRegion = value;
+			}
+		}
+		
+		public bool HasGetRegion {
+			get {
+				return propertyGetRegion != null;
+			}
+		}
+		
+		public bool HasSetRegion {
+			get {
+				return propertySetRegion != null;
+			}
+		}
+		
+		public bool IsReadOnly {
+			get {
+				return HasGetRegion && !HasSetRegion;
+			}
+		}
+		
+		public bool IsWriteOnly {
+			get {
+				return !HasGetRegion && HasSetRegion;
+			}
+		}
+		
+		
+		public Point BodyStart {
+			get {
+				return bodyStart;
+			}
+			set {
+				bodyStart = value;
+			}
+		}
+		
+		public Point BodyEnd {
+			get {
+				return bodyEnd;
+			}
+			set {
+				bodyEnd = value;
+			}
+		}
+		
+		public PropertyDeclaration(string name, TypeReference typeReference, Modifier modifier, ArrayList attributes)
+		{
+			this.name = name;
+			this.typeReference = typeReference;
+			this.modifier = modifier;
+			this.attributes = attributes;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/PropertyGetRegion.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/PropertyGetRegion.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/PropertyGetRegion.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,58 @@
+// PropertyGetRegion.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class PropertyGetRegion : AbstractNode
+	{
+		BlockStatement block;
+		ArrayList      attributes;
+		
+		public BlockStatement Block {
+			get {
+				return block;
+			}
+			set {
+				block = value;
+			}
+		}
+		public ArrayList Attributes {
+			get {
+				return attributes;
+			}
+			set {
+				attributes = value;
+			}
+		}
+		
+		public PropertyGetRegion(BlockStatement block, ArrayList attributes)
+		{
+			this.block = block;
+			this.attributes = attributes;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/PropertySetRegion.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/PropertySetRegion.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/PropertySetRegion.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,69 @@
+// PropertySetRegion.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class PropertySetRegion : AbstractNode
+	{
+		BlockStatement block;
+		ArrayList      attributes;
+		ArrayList       parameters;
+		
+		public BlockStatement Block {
+			get {
+				return block;
+			}
+			set {
+				block = value;
+			}
+		}
+		
+		public ArrayList Parameters {
+			get {
+				return parameters;
+			}
+			set {
+				parameters = value;
+			}
+		}
+		
+		public ArrayList Attributes {
+			get {
+				return attributes;
+			}
+			set {
+				attributes = value;
+			}
+		}
+			
+		public PropertySetRegion(BlockStatement block, ArrayList attributes)
+		{
+			this.block = block;
+			this.attributes = attributes;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/TypeReference.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/TypeReference.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/TypeReference.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,139 @@
+// TypeReference.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Collections;
+using System.Text;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class TypeReference : AbstractNode
+	{
+		string type;
+		string systemType;
+		ArrayList rankSpecifier;
+		ArrayList dimension;
+		AttributeSection attributes = null;
+		
+		static Hashtable types = new Hashtable();
+		static TypeReference()
+		{
+			types.Add("boolean", "System.Boolean");
+			types.Add("byte",    "System.Byte");
+			types.Add("date",	 "System.DateTime");
+			types.Add("char",    "System.Char");
+			types.Add("decimal", "System.Decimal");
+			types.Add("double",  "System.Double");
+			types.Add("single",  "System.Single");
+			types.Add("integer", "System.Int32");
+			types.Add("long",    "System.Int64");
+			types.Add("object",  "System.Object");
+			types.Add("short",   "System.Int16");
+			types.Add("string",  "System.String");
+		}
+		
+		public AttributeSection Attributes
+		{
+			get {
+				return attributes;
+			}
+			set {
+				attributes = value;
+			}
+		}
+		
+		public static ICollection PrimitiveTypes
+		{
+			get {
+				return types.Keys;
+			}
+		}
+		
+		public string Type
+		{
+			get {
+				return type;
+			}
+			set {
+				type = value;
+			}
+		}
+		
+		public string SystemType
+		{
+			get {
+				return systemType;
+			}
+		}
+		
+		public ArrayList RankSpecifier
+		{
+			get {
+				return rankSpecifier;
+			}
+			set {
+				rankSpecifier = value;
+			}
+		}
+		
+		public bool IsArrayType
+		{
+			get {
+				return rankSpecifier != null && rankSpecifier.Count> 0;
+			}
+		}
+		
+		public ArrayList Dimension
+		{
+			get {
+				return dimension;
+			}
+			set {
+				dimension = value;
+			}
+		}
+		
+		string GetSystemType(string type)
+		{
+			return (string)types[type.ToLower()];
+		}
+		
+		public TypeReference(string type)
+		{
+			this.systemType = GetSystemType(type);
+			this.type = type;
+		}
+		
+		public TypeReference(string type, ArrayList rankSpecifier)
+		{
+			this.type = type;
+			this.systemType = GetSystemType(type);
+			this.rankSpecifier = rankSpecifier;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[TypeReference: Type={0}, RankSpeifier={1}]", type, AbstractNode.GetCollectionString(rankSpecifier));
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/VariableDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/VariableDeclaration.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/VariableDeclaration.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,79 @@
+// Field.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+	public class VariableDeclaration : AbstractNode
+	{
+		string     name;
+		Expression initializer = null;
+		TypeReference type;
+		
+		public TypeReference Type {
+			get {
+				return type;
+			}
+			set {
+				type = value;
+			}
+		}
+		
+		public string Name {
+			get {
+				return name;
+			}
+			set {
+				name = value;
+			}
+		}
+		
+		public Expression Initializer {
+			get {
+				return initializer;
+			}
+			set {
+				initializer = value;
+			}
+		}
+		
+		public VariableDeclaration(string name)
+		{
+			this.name = name;
+		}
+		
+		public VariableDeclaration(string name, Expression initializer)
+		{
+			this.name = name;
+			this.initializer = initializer;
+		}
+		
+		public override object AcceptVisitor(IASTVisitor visitor, object data)
+		{
+			return visitor.Visit(this, data);
+		}
+		
+		public override string ToString()
+		{
+			return String.Format("[VariableDeclaration: Name={0}, Initializer={1}]", name, initializer);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Errors.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Errors.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Errors.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,48 @@
+using System;
+using System.Text;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+	public delegate void ErrorCodeProc(int line, int col, int n);
+	public delegate void ErrorMsgProc(int line, int col, string msg);
+	
+	public class Errors
+	{
+		public int count = 0;                                               // number of errors detected
+		public ErrorCodeProc SynErr;
+		public ErrorCodeProc SemErr;
+		public ErrorMsgProc  Error;
+		StringBuilder errorText = new StringBuilder();
+		
+		public string ErrorOutput {
+			get {
+				return errorText.ToString();
+			}
+		}
+		public Errors()
+		{
+			SynErr = new ErrorCodeProc(DefaultCodeError);  // syntactic errors
+			SemErr = new ErrorCodeProc(DefaultCodeError);  // semantic errors
+			Error  = new ErrorMsgProc(DefaultMsgError);    // user defined string based errors
+		}
+		
+	//	public void Exception (string s)
+	//	{
+	//		Console.WriteLine(s); 
+	//		System.Environment.Exit(0);
+	//	}
+	
+		void DefaultCodeError (int line, int col, int n)
+		{
+			errorText.Append(String.Format("-- line {0} col {1}: error {2}", line, col, n));
+			errorText.Append("\n");
+			count++;
+		}
+	
+		void DefaultMsgError (int line, int col, string s) {
+			errorText.Append(String.Format("-- line {0} col {1}: {2}", line, col, s));
+			errorText.Append("\n");
+			count++;
+		}
+	} // Errors
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Modifiers.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Modifiers.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Modifiers.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,51 @@
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+	public class Modifiers
+	{
+		Modifier cur;
+		Parser   parser;
+		
+		public Modifier Modifier {
+			get {
+				return cur;
+			}
+		}
+		
+		public Modifiers(Parser parser)
+		{
+			this.parser = parser;
+			cur         = Modifier.None;
+		}
+		
+		public bool isNone { get { return cur == Modifier.None; } }
+		
+		public bool Contains(Modifier m)
+		{
+			return ((cur & m) != 0);
+		}
+		
+		public void Add(Modifier m) 
+		{
+			if ((cur & m) == 0) {
+				cur |= m;
+			} else {
+				parser.Error("modifier " + m + " already defined");
+			}
+		}
+		
+		public void Add(Modifiers m)
+		{
+			Add(m.cur);
+		}
+		
+		public void Check(Modifier allowed)
+		{
+			Modifier wrong = cur & (allowed ^ Modifier.All);
+			if (wrong != Modifier.None) {
+				parser.Error("modifier(s) " + wrong + " not allowed here");
+			}
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/ParamModifiers.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/ParamModifiers.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/ParamModifiers.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,46 @@
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+	public class ParamModifiers
+	{
+		ParamModifier cur;
+		Parser   parser;
+		
+		public ParamModifier Modifier {
+			get {
+				return cur;
+			}
+		}
+		
+		public ParamModifiers(Parser parser)
+		{
+			this.parser = parser;
+			cur         = ParamModifier.None;
+		}
+		
+		public bool isNone { get { return cur == ParamModifier.None; } }
+		
+		public void Add(ParamModifier m) 
+		{
+			if ((cur & m) == 0) {
+				cur |= m;
+			} else {
+				parser.Error("param modifier " + m + " already defined");
+			}
+		}
+		
+		public void Add(ParamModifiers m)
+		{
+			Add(m.cur);
+		}
+		
+		public void Check()
+		{
+			if((cur & ParamModifier.ByVal) != 0 && (cur & ParamModifier.ByRef) != 0) {
+				parser.Error("ByRef and ByVal are not allowed at the same time.");
+			}
+		}
+	}
+}
+

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Parser.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Parser.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Parser.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,6571 @@
+
+#line  1 "VBNET.ATG" 
+using System.Drawing;
+using System.Collections;
+using System.Collections.Specialized;
+using System.Text;
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+using ICSharpCode.SharpRefactory.Parser.VB;
+using System;
+using System.Reflection;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB {
+
+
+
+public class Parser
+{
+	const int maxT = 188;
+
+	const  bool   T            = true;
+	const  bool   x            = false;
+	const  int    minErrDist   = 2;
+	const  string errMsgFormat = "-- line {0} col {1}: {2}";  // 0=line, 1=column, 2=text
+	int    errDist             = minErrDist;
+	Errors errors;
+	Lexer  lexer;
+
+	public Errors Errors {
+		get {
+			return errors;
+		}
+	}
+
+
+#line  10 "VBNET.ATG" 
+private string assemblyName = null;
+public CompilationUnit compilationUnit;
+private ArrayList importedNamespaces = null;
+private Stack withStatements;
+private bool isLabel = false;
+private LabelStatement labelStatement = null;
+
+public string ContainingAssembly
+{
+	set { assemblyName = value; }
+}
+
+Token t
+{
+	get {
+		return lexer.Token;
+	}
+}
+Token la
+{
+	get {
+		return lexer.LookAhead;
+	}
+}
+
+void updateLabelStatement(Statement stmt)
+{
+	if(isLabel) {
+		labelStatement.EmbeddedStatement = stmt;
+		isLabel = false;
+	} else {
+		compilationUnit.AddChild(stmt);
+	}
+}
+
+/* Return the n-th token after the current lookahead token */
+void StartPeek()
+{
+	lexer.StartPeek();
+}
+
+Token Peek()
+{
+	return lexer.Peek();
+}
+
+Token Peek (int n)
+{
+	lexer.StartPeek();
+	Token x = la;
+	while (n > 0) {
+		x = lexer.Peek();
+		n--;
+	}
+	return x;
+}
+
+public void Error(string s)
+{
+	if (errDist >= minErrDist) {
+		errors.Error(la.line, la.col, s);
+	}
+	errDist = 0;
+}
+
+public Expression ParseExpression(Lexer lexer)
+{
+	this.errors = lexer.Errors;
+	this.lexer = lexer;
+	errors.SynErr = new ErrorCodeProc(SynErr);
+	lexer.NextToken();
+	Expression expr;
+	Expr(out expr);
+	return expr;
+}
+
+bool IsEndStmtAhead()
+{
+	int peek = Peek(1).kind;
+	return la.kind == Tokens.End && (peek == Tokens.EOL || peek == Tokens.Colon);
+}
+
+bool IsNotClosingParenthesis() {
+	return la.kind != Tokens.CloseParenthesis;
+}
+
+/*
+	True, if ident is followed by "="
+*/
+bool IdentAndAsgn () {
+	if(la.kind == Tokens.Identifier) {
+		if(Peek(1).kind == Tokens.Assign) return true;
+		if(Peek(1).kind == Tokens.Colon && Peek(2).kind == Tokens.Assign) return true;
+	}
+	return false;
+}
+
+/*
+	True, if ident is followed by "=" or by ":" and "="
+*/
+bool IsNamedAssign() {
+//	if(Peek(1).kind == Tokens.Assign) return true; // removed: not in the lang spec
+	if(Peek(1).kind == Tokens.Colon && Peek(2).kind == Tokens.Assign) return true;
+	return false;
+}
+
+bool IsObjectCreation() {
+	return la.kind == Tokens.As && Peek(1).kind == Tokens.New;
+}
+
+/*
+	True, if "<" is followed by the ident "assembly" or "module"
+*/
+bool IsGlobalAttrTarget () {
+	Token pt = Peek(1);
+	return la.kind == Tokens.LessThan && ( pt.val.ToLower() == "assembly" || pt.val.ToLower() == "module");
+}
+
+/*
+	True if the next token is a "(" and is followed by "," or ")"
+*/
+bool IsRank()
+{
+	int peek = Peek(1).kind;
+	return la.kind == Tokens.OpenParenthesis
+						&& (peek == Tokens.Comma || peek == Tokens.CloseParenthesis);
+}
+
+bool IsDims()
+{
+	int peek = Peek(1).kind;
+	int peek_n = Peek(2).kind;
+	return la.kind == Tokens.OpenParenthesis
+						&& (peek == Tokens.LiteralInteger && peek_n == Tokens.CloseParenthesis);
+}
+
+bool IsSize()
+{
+	return la.kind == Tokens.OpenParenthesis;
+}
+
+/*
+	True, if the comma is not a trailing one,
+	like the last one in: a, b, c,
+*/
+bool NotFinalComma() {
+	int peek = Peek(1).kind;
+	return la.kind == Tokens.Comma &&
+		   peek != Tokens.CloseCurlyBrace && peek != Tokens.CloseSquareBracket;
+}
+
+/*
+	True, if the next token is "Else" and this one
+	if followed by "If"
+*/
+bool IsElseIf()
+{
+	int peek = Peek(1).kind;
+	return la.kind == Tokens.Else && peek == Tokens.If;
+}
+
+/*
+	True if the next token is goto and this one is
+	followed by minus ("-") (this is allowd in in
+	error clauses)
+*/
+bool IsNegativeLabelName()
+{
+	int peek = Peek(1).kind;
+	return la.kind == Tokens.GoTo && peek == Tokens.Minus;
+}
+
+/*
+	True if the next statement is a "Resume next" statement
+*/
+bool IsResumeNext()
+{
+	int peek = Peek(1).kind;
+	return la.kind == Tokens.Resume && peek == Tokens.Next;
+}
+
+/*
+	True, if ident/literal integer is followed by ":"
+*/
+bool IsLabel()
+{
+	return (la.kind == Tokens.Identifier || la.kind == Tokens.LiteralInteger)
+			&& Peek(1).kind == Tokens.Colon;
+}
+
+bool IsNotStatementSeparator()
+{
+	return la.kind == Tokens.Colon && Peek(1).kind == Tokens.EOL;
+}
+
+bool IsAssignment ()
+{
+	return IdentAndAsgn();
+}
+
+bool IsMustOverride(Modifiers m)
+{
+	return m.Contains(Modifier.MustOverride);
+}
+
+/*
+	True, if lookahead is a local attribute target specifier,
+	i.e. one of "event", "return", "field", "method",
+	"module", "param", "property", or "type"
+*/
+bool IsLocalAttrTarget() {
+	// TODO
+	return false;
+}
+
+
+
+/*
+
+*/
+	void SynErr(int n)
+	{
+		if (errDist >= minErrDist) {
+			errors.SynErr(lexer.LookAhead.line, lexer.LookAhead.col, n);
+		}
+		errDist = 0;
+	}
+
+	public void SemErr(string msg)
+	{
+		if (errDist >= minErrDist) {
+			errors.Error(lexer.Token.line, lexer.Token.col, msg);
+		}
+		errDist = 0;
+	}
+	
+	void Expect(int n)
+	{
+		if (lexer.LookAhead.kind == n) {
+			lexer.NextToken();
+		} else {
+			SynErr(n);
+		}
+	}
+	
+	bool StartOf(int s)
+	{
+		return set[s, lexer.LookAhead.kind];
+	}
+	
+	void ExpectWeak(int n, int follow)
+	{
+		if (lexer.LookAhead.kind == n) {
+			lexer.NextToken();
+		} else {
+			SynErr(n);
+			while (!StartOf(follow)) {
+				lexer.NextToken();
+			}
+		}
+	}
+	
+	bool WeakSeparator(int n, int syFol, int repFol)
+	{
+		bool[] s = new bool[maxT + 1];
+		
+		if (lexer.LookAhead.kind == n) {
+			lexer.NextToken();
+			return true; 
+		} else if (StartOf(repFol)) {
+			return false;
+		} else {
+			for (int i = 0; i <= maxT; i++) {
+				s[i] = set[syFol, i] || set[repFol, i] || set[0, i];
+			}
+			SynErr(n);
+			while (!s[lexer.LookAhead.kind]) {
+				lexer.NextToken();
+			}
+			return StartOf(syFol);
+		}
+	}
+	
+	void VBNET() {
+
+#line  431 "VBNET.ATG" 
+		compilationUnit = new CompilationUnit();
+		withStatements = new Stack();
+		
+		while (la.kind == 1) {
+			lexer.NextToken();
+		}
+		while (la.kind == 137) {
+			OptionStmt();
+		}
+		while (la.kind == 109) {
+			ImportsStmt();
+		}
+		while (
+#line  437 "VBNET.ATG" 
+IsGlobalAttrTarget()) {
+			GlobalAttributeSection();
+		}
+		while (StartOf(1)) {
+			NamespaceMemberDecl();
+		}
+		Expect(0);
+	}
+
+	void OptionStmt() {
+
+#line  442 "VBNET.ATG" 
+		INode node = null; bool val = true; 
+		Expect(137);
+
+#line  443 "VBNET.ATG" 
+		Point startPos = t.Location; 
+		if (la.kind == 96) {
+			lexer.NextToken();
+			if (la.kind == 135 || la.kind == 136) {
+				OptionValue(
+#line  445 "VBNET.ATG" 
+ref val);
+			}
+
+#line  446 "VBNET.ATG" 
+			node = new OptionExplicitDeclaration(val); 
+		} else if (la.kind == 166) {
+			lexer.NextToken();
+			if (la.kind == 135 || la.kind == 136) {
+				OptionValue(
+#line  448 "VBNET.ATG" 
+ref val);
+			}
+
+#line  449 "VBNET.ATG" 
+			node = new OptionStrictDeclaration(val); 
+		} else if (la.kind == 71) {
+			lexer.NextToken();
+			if (la.kind == 52) {
+				lexer.NextToken();
+
+#line  451 "VBNET.ATG" 
+				node = new OptionCompareDeclaration(CompareType.Binary); 
+			} else if (la.kind == 171) {
+				lexer.NextToken();
+
+#line  452 "VBNET.ATG" 
+				node = new OptionCompareDeclaration(CompareType.Text); 
+			} else SynErr(189);
+		} else SynErr(190);
+		EndOfStmt();
+
+#line  457 "VBNET.ATG" 
+		node.StartLocation = startPos;
+		node.EndLocation   = t.Location;
+		compilationUnit.AddChild(node);
+		
+	}
+
+	void ImportsStmt() {
+
+#line  481 "VBNET.ATG" 
+		ArrayList importClauses = new ArrayList();
+		importedNamespaces = new ArrayList();
+		object importClause;
+		
+		Expect(109);
+
+#line  487 "VBNET.ATG" 
+		Point startPos = t.Location;
+		ImportsStatement importsStatement = new ImportsStatement(null);
+		
+		ImportClause(
+#line  490 "VBNET.ATG" 
+out importClause);
+
+#line  490 "VBNET.ATG" 
+		importClauses.Add(importClause); 
+		while (la.kind == 12) {
+			lexer.NextToken();
+			ImportClause(
+#line  492 "VBNET.ATG" 
+out importClause);
+
+#line  492 "VBNET.ATG" 
+			importClauses.Add(importClause); 
+		}
+		EndOfStmt();
+
+#line  496 "VBNET.ATG" 
+		importsStatement.ImportClauses = importClauses;
+		importsStatement.StartLocation = startPos;
+		importsStatement.EndLocation   = t.Location;
+		compilationUnit.AddChild(importsStatement);
+		
+	}
+
+	void GlobalAttributeSection() {
+
+#line  1840 "VBNET.ATG" 
+		Point startPos = t.Location; 
+		Expect(28);
+		if (la.kind == 50) {
+			lexer.NextToken();
+		} else if (la.kind == 122) {
+			lexer.NextToken();
+		} else SynErr(191);
+
+#line  1843 "VBNET.ATG" 
+		string attributeTarget = t.val.ToLower();
+		ArrayList attributes = new ArrayList();
+		ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute attribute;
+		
+		Expect(13);
+		Attribute(
+#line  1847 "VBNET.ATG" 
+out attribute);
+
+#line  1847 "VBNET.ATG" 
+		attributes.Add(attribute); 
+		while (
+#line  1848 "VBNET.ATG" 
+NotFinalComma()) {
+			Expect(12);
+			Attribute(
+#line  1848 "VBNET.ATG" 
+out attribute);
+
+#line  1848 "VBNET.ATG" 
+			attributes.Add(attribute); 
+		}
+		if (la.kind == 12) {
+			lexer.NextToken();
+		}
+		Expect(27);
+		EndOfStmt();
+
+#line  1853 "VBNET.ATG" 
+		AttributeSection section = new AttributeSection(attributeTarget, attributes);
+		section.StartLocation = startPos;
+		section.EndLocation = t.EndLocation;
+		compilationUnit.AddChild(section);
+		
+	}
+
+	void NamespaceMemberDecl() {
+
+#line  526 "VBNET.ATG" 
+		Modifiers m = new Modifiers(this);
+		AttributeSection section;
+		ArrayList attributes = new ArrayList();
+		string qualident;
+		
+		if (la.kind == 127) {
+			lexer.NextToken();
+
+#line  533 "VBNET.ATG" 
+			Point startPos = t.Location;
+			
+			Qualident(
+#line  535 "VBNET.ATG" 
+out qualident);
+
+#line  537 "VBNET.ATG" 
+			INode node =  new NamespaceDeclaration(qualident);
+			node.StartLocation = startPos;
+			compilationUnit.AddChild(node);
+			compilationUnit.BlockStart(node);
+			
+			Expect(1);
+			NamespaceBody();
+
+#line  545 "VBNET.ATG" 
+			node.EndLocation = t.Location;
+			compilationUnit.BlockEnd();
+			
+		} else if (StartOf(2)) {
+			while (la.kind == 28) {
+				AttributeSection(
+#line  549 "VBNET.ATG" 
+out section);
+
+#line  549 "VBNET.ATG" 
+				attributes.Add(section); 
+			}
+			while (StartOf(3)) {
+				TypeModifier(
+#line  550 "VBNET.ATG" 
+m);
+			}
+			NonModuleDeclaration(
+#line  550 "VBNET.ATG" 
+m, attributes);
+		} else SynErr(192);
+	}
+
+	void OptionValue(
+#line  463 "VBNET.ATG" 
+ref bool val) {
+		if (la.kind == 136) {
+			lexer.NextToken();
+
+#line  465 "VBNET.ATG" 
+			val = true; 
+		} else if (la.kind == 135) {
+			lexer.NextToken();
+
+#line  467 "VBNET.ATG" 
+			val = true; 
+		} else SynErr(193);
+	}
+
+	void EndOfStmt() {
+		if (la.kind == 1) {
+			lexer.NextToken();
+		} else if (la.kind == 13) {
+			lexer.NextToken();
+		} else SynErr(194);
+	}
+
+	void ImportClause(
+#line  503 "VBNET.ATG" 
+out object importClause) {
+
+#line  505 "VBNET.ATG" 
+		string qualident = null;
+		string aliasident = null;
+		importClause = null;
+		
+		if (
+#line  509 "VBNET.ATG" 
+IsAssignment()) {
+			Identifier();
+
+#line  509 "VBNET.ATG" 
+			aliasident = t.val;  
+			Expect(11);
+		}
+		Qualident(
+#line  510 "VBNET.ATG" 
+out qualident);
+
+#line  512 "VBNET.ATG" 
+		if (qualident != null && qualident.Length > 0) {
+		if (aliasident != null) {
+			importClause = new ImportsAliasDeclaration(aliasident, qualident);
+		} else {
+			importedNamespaces.Add(qualident);
+			importClause = new ImportsDeclaration(qualident);
+		}
+		}
+		
+	}
+
+	void Identifier() {
+		if (la.kind == 2) {
+			lexer.NextToken();
+		} else if (la.kind == 171) {
+			lexer.NextToken();
+		} else if (la.kind == 52) {
+			lexer.NextToken();
+		} else if (la.kind == 71) {
+			lexer.NextToken();
+		} else SynErr(195);
+	}
+
+	void Qualident(
+#line  2527 "VBNET.ATG" 
+out string qualident) {
+
+#line  2528 "VBNET.ATG" 
+		string name = String.Empty; 
+		Identifier();
+
+#line  2529 "VBNET.ATG" 
+		StringBuilder qualidentBuilder = new StringBuilder(t.val); 
+		while (la.kind == 10) {
+			lexer.NextToken();
+			IdentifierOrKeyword(
+#line  2531 "VBNET.ATG" 
+out name);
+
+#line  2531 "VBNET.ATG" 
+			qualidentBuilder.Append('.');
+			  qualidentBuilder.Append(name); 
+			
+		}
+
+#line  2535 "VBNET.ATG" 
+		qualident = qualidentBuilder.ToString(); 
+	}
+
+	void NamespaceBody() {
+		while (StartOf(1)) {
+			NamespaceMemberDecl();
+		}
+		Expect(89);
+		Expect(127);
+		Expect(1);
+	}
+
+	void AttributeSection(
+#line  1911 "VBNET.ATG" 
+out AttributeSection section) {
+
+#line  1913 "VBNET.ATG" 
+		string attributeTarget = "";
+		ArrayList attributes = new ArrayList();
+		ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute attribute;
+		
+		
+		Expect(28);
+
+#line  1918 "VBNET.ATG" 
+		Point startPos = t.Location; 
+		if (
+#line  1919 "VBNET.ATG" 
+IsLocalAttrTarget()) {
+			if (la.kind == 94) {
+				lexer.NextToken();
+
+#line  1920 "VBNET.ATG" 
+				attributeTarget = "event";
+			} else if (la.kind == 156) {
+				lexer.NextToken();
+
+#line  1921 "VBNET.ATG" 
+				attributeTarget = "return";
+			} else {
+				Identifier();
+
+#line  1924 "VBNET.ATG" 
+				string val = t.val.ToLower();
+				if (val != "field"	|| val != "method" ||
+					val != "module" || val != "param"  ||
+					val != "property" || val != "type")
+				Error("attribute target specifier (event, return, field," +
+						"method, module, param, property, or type) expected");
+				attributeTarget = t.val;
+				
+			}
+			Expect(13);
+		}
+		Attribute(
+#line  1934 "VBNET.ATG" 
+out attribute);
+
+#line  1934 "VBNET.ATG" 
+		attributes.Add(attribute); 
+		while (
+#line  1935 "VBNET.ATG" 
+NotFinalComma()) {
+			Expect(12);
+			Attribute(
+#line  1935 "VBNET.ATG" 
+out attribute);
+
+#line  1935 "VBNET.ATG" 
+			attributes.Add(attribute); 
+		}
+		if (la.kind == 12) {
+			lexer.NextToken();
+		}
+		Expect(27);
+
+#line  1939 "VBNET.ATG" 
+		section = new AttributeSection(attributeTarget, attributes);
+		section.StartLocation = startPos;
+		section.EndLocation = t.EndLocation;
+		
+	}
+
+	void TypeModifier(
+#line  2715 "VBNET.ATG" 
+Modifiers m) {
+		switch (la.kind) {
+		case 150: {
+			lexer.NextToken();
+
+#line  2716 "VBNET.ATG" 
+			m.Add(Modifier.Public); 
+			break;
+		}
+		case 149: {
+			lexer.NextToken();
+
+#line  2717 "VBNET.ATG" 
+			m.Add(Modifier.Protected); 
+			break;
+		}
+		case 100: {
+			lexer.NextToken();
+
+#line  2718 "VBNET.ATG" 
+			m.Add(Modifier.Friend); 
+			break;
+		}
+		case 147: {
+			lexer.NextToken();
+
+#line  2719 "VBNET.ATG" 
+			m.Add(Modifier.Private); 
+			break;
+		}
+		case 160: {
+			lexer.NextToken();
+
+#line  2720 "VBNET.ATG" 
+			m.Add(Modifier.Shared); 
+			break;
+		}
+		case 159: {
+			lexer.NextToken();
+
+#line  2721 "VBNET.ATG" 
+			m.Add(Modifier.Shadows); 
+			break;
+		}
+		case 123: {
+			lexer.NextToken();
+
+#line  2722 "VBNET.ATG" 
+			m.Add(Modifier.MustInherit); 
+			break;
+		}
+		case 132: {
+			lexer.NextToken();
+
+#line  2723 "VBNET.ATG" 
+			m.Add(Modifier.NotInheritable); 
+			break;
+		}
+		default: SynErr(196); break;
+		}
+	}
+
+	void NonModuleDeclaration(
+#line  554 "VBNET.ATG" 
+Modifiers m, ArrayList attributes) {
+
+#line  556 "VBNET.ATG" 
+		string name = String.Empty;
+		ArrayList names = null;
+		
+		switch (la.kind) {
+		case 68: {
+
+#line  559 "VBNET.ATG" 
+			m.Check(Modifier.Classes); 
+			lexer.NextToken();
+
+#line  562 "VBNET.ATG" 
+			TypeDeclaration newType = new TypeDeclaration();
+			compilationUnit.AddChild(newType);
+			compilationUnit.BlockStart(newType);
+			newType.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+			newType.Type = Types.Class;
+			newType.Modifier = m.Modifier;
+			newType.Attributes = attributes;
+			
+			Identifier();
+
+#line  570 "VBNET.ATG" 
+			newType.Name = t.val; newType.StartLocation = t.EndLocation; 
+			EndOfStmt();
+			if (la.kind == 111) {
+				ClassBaseType(
+#line  572 "VBNET.ATG" 
+out name);
+
+#line  572 "VBNET.ATG" 
+				newType.BaseType = name; 
+			}
+			while (la.kind == 108) {
+				TypeImplementsClause(
+#line  573 "VBNET.ATG" 
+out names);
+
+#line  573 "VBNET.ATG" 
+				newType.BaseInterfaces = names; 
+			}
+			ClassBody(
+#line  574 "VBNET.ATG" 
+newType);
+
+#line  576 "VBNET.ATG" 
+			compilationUnit.BlockEnd();
+			
+			break;
+		}
+		case 122: {
+			lexer.NextToken();
+
+#line  580 "VBNET.ATG" 
+			m.Check(Modifier.Modules);
+			TypeDeclaration newType = new TypeDeclaration();
+			newType.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+			compilationUnit.AddChild(newType);
+			compilationUnit.BlockStart(newType);
+			newType.StartLocation = t.Location;
+			newType.Type = Types.Module;
+			newType.Modifier = m.Modifier;
+			newType.Attributes = attributes;
+			
+			Identifier();
+
+#line  590 "VBNET.ATG" 
+			newType.Name = t.val; newType.StartLocation = t.EndLocation;  
+			Expect(1);
+			ModuleBody(
+#line  592 "VBNET.ATG" 
+newType);
+
+#line  594 "VBNET.ATG" 
+			newType.EndLocation = t.Location;
+			compilationUnit.BlockEnd();
+			
+			break;
+		}
+		case 168: {
+			lexer.NextToken();
+
+#line  599 "VBNET.ATG" 
+			m.Check(Modifier.Structures);
+			TypeDeclaration newType = new TypeDeclaration();
+			compilationUnit.AddChild(newType);
+			compilationUnit.BlockStart(newType);
+			newType.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+			newType.StartLocation = t.Location;
+			newType.Type = Types.Structure;
+			newType.Modifier = m.Modifier;
+			newType.Attributes = attributes;
+			ArrayList baseInterfaces = new ArrayList();
+			
+			Identifier();
+
+#line  610 "VBNET.ATG" 
+			newType.Name = t.val; newType.StartLocation = t.EndLocation; 
+			Expect(1);
+			while (la.kind == 108) {
+				TypeImplementsClause(
+#line  611 "VBNET.ATG" 
+out baseInterfaces);
+			}
+			StructureBody(
+#line  612 "VBNET.ATG" 
+newType);
+
+#line  614 "VBNET.ATG" 
+			newType.EndLocation = t.Location;
+			compilationUnit.BlockEnd();
+			
+			break;
+		}
+		case 91: {
+			lexer.NextToken();
+
+#line  620 "VBNET.ATG" 
+			m.Check(Modifier.Enums);
+			TypeDeclaration newType = new TypeDeclaration();
+			newType.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+			compilationUnit.AddChild(newType);
+			compilationUnit.BlockStart(newType);
+			
+			newType.Type = Types.Enum;
+			newType.Modifier = m.Modifier;
+			newType.Attributes = attributes;
+			
+			Identifier();
+
+#line  631 "VBNET.ATG" 
+			newType.Name = t.val; newType.StartLocation = t.EndLocation; 
+			if (la.kind == 49) {
+				lexer.NextToken();
+				PrimitiveTypeName(
+#line  632 "VBNET.ATG" 
+out name);
+
+#line  632 "VBNET.ATG" 
+				newType.BaseType = name; 
+			}
+			Expect(1);
+			EnumBody(
+#line  634 "VBNET.ATG" 
+newType);
+
+#line  636 "VBNET.ATG" 
+			newType.EndLocation = t.Location;
+			compilationUnit.BlockEnd();
+			
+			break;
+		}
+		case 113: {
+			lexer.NextToken();
+
+#line  642 "VBNET.ATG" 
+			m.Check(Modifier.Interfaces);
+			TypeDeclaration newType = new TypeDeclaration();
+			compilationUnit.AddChild(newType);
+			compilationUnit.BlockStart(newType);
+			newType.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+			
+			newType.Type = Types.Interface;
+			newType.Modifier = m.Modifier;
+			newType.Attributes = attributes;
+			ArrayList baseInterfaces = new ArrayList();
+			
+			Identifier();
+
+#line  653 "VBNET.ATG" 
+			newType.Name = t.val; newType.StartLocation = t.EndLocation; 
+			EndOfStmt();
+			while (la.kind == 111) {
+				InterfaceBase(
+#line  654 "VBNET.ATG" 
+out baseInterfaces);
+
+#line  654 "VBNET.ATG" 
+				newType.BaseInterfaces = baseInterfaces; 
+			}
+			InterfaceBody(
+#line  655 "VBNET.ATG" 
+newType);
+
+#line  657 "VBNET.ATG" 
+			newType.EndLocation = t.Location;
+			compilationUnit.BlockEnd();
+			
+			break;
+		}
+		case 81: {
+			lexer.NextToken();
+
+#line  663 "VBNET.ATG" 
+			m.Check(Modifier.Delegates);
+			DelegateDeclaration delegateDeclr = new DelegateDeclaration();
+			ArrayList p = null;
+			TypeReference type = null;
+			delegateDeclr.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+			delegateDeclr.StartLocation = t.Location;
+			delegateDeclr.Modifier = m.Modifier;
+			delegateDeclr.Attributes = attributes;
+			
+			if (la.kind == 169) {
+				lexer.NextToken();
+				Identifier();
+
+#line  673 "VBNET.ATG" 
+				delegateDeclr.Name = t.val; 
+				if (la.kind == 25) {
+					lexer.NextToken();
+					if (StartOf(4)) {
+						FormalParameterList(
+#line  674 "VBNET.ATG" 
+out p);
+					}
+					Expect(26);
+
+#line  674 "VBNET.ATG" 
+					delegateDeclr.Parameters = p; 
+				}
+			} else if (la.kind == 101) {
+				lexer.NextToken();
+				Identifier();
+
+#line  676 "VBNET.ATG" 
+				delegateDeclr.Name = t.val; 
+				if (la.kind == 25) {
+					lexer.NextToken();
+					if (StartOf(4)) {
+						FormalParameterList(
+#line  677 "VBNET.ATG" 
+out p);
+					}
+					Expect(26);
+
+#line  677 "VBNET.ATG" 
+					delegateDeclr.Parameters = p; 
+				}
+				if (la.kind == 49) {
+					lexer.NextToken();
+					TypeName(
+#line  678 "VBNET.ATG" 
+out type);
+
+#line  678 "VBNET.ATG" 
+					delegateDeclr.ReturnType = type; 
+				}
+			} else SynErr(197);
+
+#line  680 "VBNET.ATG" 
+			delegateDeclr.EndLocation = t.EndLocation; 
+			Expect(1);
+
+#line  683 "VBNET.ATG" 
+			compilationUnit.AddChild(delegateDeclr);
+			
+			break;
+		}
+		default: SynErr(198); break;
+		}
+	}
+
+	void ClassBaseType(
+#line  873 "VBNET.ATG" 
+out string name) {
+
+#line  875 "VBNET.ATG" 
+		TypeReference type;
+		name = String.Empty;
+		
+		Expect(111);
+		TypeName(
+#line  879 "VBNET.ATG" 
+out type);
+
+#line  879 "VBNET.ATG" 
+		name = type.Type; 
+		EndOfStmt();
+	}
+
+	void TypeImplementsClause(
+#line  1408 "VBNET.ATG" 
+out ArrayList baseInterfaces) {
+
+#line  1410 "VBNET.ATG" 
+		baseInterfaces = new ArrayList();
+		TypeReference type = null;
+		
+		Expect(108);
+		TypeName(
+#line  1413 "VBNET.ATG" 
+out type);
+
+#line  1415 "VBNET.ATG" 
+		baseInterfaces.Add(type);
+		
+		while (la.kind == 12) {
+			lexer.NextToken();
+			TypeName(
+#line  1418 "VBNET.ATG" 
+out type);
+
+#line  1419 "VBNET.ATG" 
+			baseInterfaces.Add(type); 
+		}
+		EndOfStmt();
+	}
+
+	void ClassBody(
+#line  693 "VBNET.ATG" 
+TypeDeclaration newType) {
+
+#line  694 "VBNET.ATG" 
+		AttributeSection section; 
+		while (StartOf(5)) {
+
+#line  697 "VBNET.ATG" 
+			ArrayList attributes = new ArrayList();
+			Modifiers m = new Modifiers(this);
+			
+			while (la.kind == 28) {
+				AttributeSection(
+#line  700 "VBNET.ATG" 
+out section);
+
+#line  700 "VBNET.ATG" 
+				attributes.Add(section); 
+			}
+			while (StartOf(6)) {
+				MemberModifier(
+#line  701 "VBNET.ATG" 
+m);
+			}
+			ClassMemberDecl(
+#line  702 "VBNET.ATG" 
+m, attributes);
+		}
+		Expect(89);
+		Expect(68);
+
+#line  704 "VBNET.ATG" 
+		newType.EndLocation = t.EndLocation; 
+		Expect(1);
+	}
+
+	void ModuleBody(
+#line  724 "VBNET.ATG" 
+TypeDeclaration newType) {
+
+#line  725 "VBNET.ATG" 
+		AttributeSection section; 
+		while (StartOf(5)) {
+
+#line  728 "VBNET.ATG" 
+			ArrayList attributes = new ArrayList();
+			Modifiers m = new Modifiers(this);
+			
+			while (la.kind == 28) {
+				AttributeSection(
+#line  731 "VBNET.ATG" 
+out section);
+
+#line  731 "VBNET.ATG" 
+				attributes.Add(section); 
+			}
+			while (StartOf(6)) {
+				MemberModifier(
+#line  732 "VBNET.ATG" 
+m);
+			}
+			ClassMemberDecl(
+#line  733 "VBNET.ATG" 
+m, attributes);
+		}
+		Expect(89);
+		Expect(122);
+
+#line  735 "VBNET.ATG" 
+		newType.EndLocation = t.EndLocation; 
+		Expect(1);
+	}
+
+	void StructureBody(
+#line  708 "VBNET.ATG" 
+TypeDeclaration newType) {
+
+#line  709 "VBNET.ATG" 
+		AttributeSection section; 
+		while (StartOf(5)) {
+
+#line  712 "VBNET.ATG" 
+			ArrayList attributes = new ArrayList();
+			Modifiers m = new Modifiers(this);
+			
+			while (la.kind == 28) {
+				AttributeSection(
+#line  715 "VBNET.ATG" 
+out section);
+
+#line  715 "VBNET.ATG" 
+				attributes.Add(section); 
+			}
+			while (StartOf(6)) {
+				MemberModifier(
+#line  716 "VBNET.ATG" 
+m);
+			}
+			StructureMemberDecl(
+#line  717 "VBNET.ATG" 
+m, attributes);
+		}
+		Expect(89);
+		Expect(168);
+
+#line  719 "VBNET.ATG" 
+		newType.EndLocation = t.EndLocation; 
+		Expect(1);
+	}
+
+	void PrimitiveTypeName(
+#line  2693 "VBNET.ATG" 
+out string type) {
+
+#line  2694 "VBNET.ATG" 
+		type = String.Empty; 
+		switch (la.kind) {
+		case 53: {
+			lexer.NextToken();
+
+#line  2695 "VBNET.ATG" 
+			type = "Boolean"; 
+			break;
+		}
+		case 77: {
+			lexer.NextToken();
+
+#line  2696 "VBNET.ATG" 
+			type = "Date"; 
+			break;
+		}
+		case 66: {
+			lexer.NextToken();
+
+#line  2697 "VBNET.ATG" 
+			type = "Char"; 
+			break;
+		}
+		case 167: {
+			lexer.NextToken();
+
+#line  2698 "VBNET.ATG" 
+			type = "String"; 
+			break;
+		}
+		case 78: {
+			lexer.NextToken();
+
+#line  2699 "VBNET.ATG" 
+			type = "Decimal"; 
+			break;
+		}
+		case 55: {
+			lexer.NextToken();
+
+#line  2700 "VBNET.ATG" 
+			type = "Byte"; 
+			break;
+		}
+		case 161: {
+			lexer.NextToken();
+
+#line  2701 "VBNET.ATG" 
+			type = "Short"; 
+			break;
+		}
+		case 112: {
+			lexer.NextToken();
+
+#line  2702 "VBNET.ATG" 
+			type = "Integer"; 
+			break;
+		}
+		case 118: {
+			lexer.NextToken();
+
+#line  2703 "VBNET.ATG" 
+			type = "Long"; 
+			break;
+		}
+		case 162: {
+			lexer.NextToken();
+
+#line  2704 "VBNET.ATG" 
+			type = "Single"; 
+			break;
+		}
+		case 85: {
+			lexer.NextToken();
+
+#line  2705 "VBNET.ATG" 
+			type = "Double"; 
+			break;
+		}
+		default: SynErr(199); break;
+		}
+	}
+
+	void EnumBody(
+#line  739 "VBNET.ATG" 
+TypeDeclaration newType) {
+
+#line  740 "VBNET.ATG" 
+		FieldDeclaration f; 
+		while (StartOf(7)) {
+			EnumMemberDecl(
+#line  742 "VBNET.ATG" 
+out f);
+
+#line  742 "VBNET.ATG" 
+			compilationUnit.AddChild(f); 
+		}
+		Expect(89);
+		Expect(91);
+
+#line  744 "VBNET.ATG" 
+		newType.EndLocation = t.EndLocation; 
+		Expect(1);
+	}
+
+	void InterfaceBase(
+#line  1393 "VBNET.ATG" 
+out ArrayList bases) {
+
+#line  1395 "VBNET.ATG" 
+		TypeReference type;
+		bases = new ArrayList();
+		
+		Expect(111);
+		TypeName(
+#line  1399 "VBNET.ATG" 
+out type);
+
+#line  1399 "VBNET.ATG" 
+		bases.Add(type); 
+		while (la.kind == 12) {
+			lexer.NextToken();
+			TypeName(
+#line  1402 "VBNET.ATG" 
+out type);
+
+#line  1402 "VBNET.ATG" 
+			bases.Add(type); 
+		}
+		Expect(1);
+	}
+
+	void InterfaceBody(
+#line  748 "VBNET.ATG" 
+TypeDeclaration newType) {
+		while (StartOf(8)) {
+			InterfaceMemberDecl();
+		}
+		Expect(89);
+		Expect(113);
+
+#line  750 "VBNET.ATG" 
+		newType.EndLocation = t.EndLocation; 
+		Expect(1);
+	}
+
+	void FormalParameterList(
+#line  1946 "VBNET.ATG" 
+out ArrayList parameter) {
+
+#line  1948 "VBNET.ATG" 
+		parameter = new ArrayList();
+		ParameterDeclarationExpression p;
+		AttributeSection section;
+		ArrayList attributes = new ArrayList();
+		
+		while (la.kind == 28) {
+			AttributeSection(
+#line  1953 "VBNET.ATG" 
+out section);
+
+#line  1953 "VBNET.ATG" 
+			attributes.Add(section); 
+		}
+		FormalParameter(
+#line  1955 "VBNET.ATG" 
+out p);
+
+#line  1957 "VBNET.ATG" 
+		bool paramsFound = false;
+		p.Attributes = attributes;
+		parameter.Add(p);
+		
+		while (la.kind == 12) {
+			lexer.NextToken();
+
+#line  1962 "VBNET.ATG" 
+			attributes = new ArrayList(); if (paramsFound) Error("params array must be at end of parameter list"); 
+			while (la.kind == 28) {
+				AttributeSection(
+#line  1963 "VBNET.ATG" 
+out section);
+
+#line  1963 "VBNET.ATG" 
+				attributes.Add(section); 
+			}
+			FormalParameter(
+#line  1965 "VBNET.ATG" 
+out p);
+
+#line  1965 "VBNET.ATG" 
+			p.Attributes = attributes; parameter.Add(p); 
+		}
+	}
+
+	void TypeName(
+#line  1758 "VBNET.ATG" 
+out TypeReference typeref) {
+
+#line  1760 "VBNET.ATG" 
+		ArrayList rank = null;
+		
+		NonArrayTypeName(
+#line  1762 "VBNET.ATG" 
+out typeref);
+		ArrayTypeModifiers(
+#line  1763 "VBNET.ATG" 
+out rank);
+
+#line  1765 "VBNET.ATG" 
+		typeref = new TypeReference(typeref == null ? "UNKNOWN" : typeref.Type, rank);
+		
+	}
+
+	void MemberModifier(
+#line  2726 "VBNET.ATG" 
+Modifiers m) {
+		switch (la.kind) {
+		case 123: {
+			lexer.NextToken();
+
+#line  2727 "VBNET.ATG" 
+			m.Add(Modifier.MustInherit);
+			break;
+		}
+		case 80: {
+			lexer.NextToken();
+
+#line  2728 "VBNET.ATG" 
+			m.Add(Modifier.Default);
+			break;
+		}
+		case 100: {
+			lexer.NextToken();
+
+#line  2729 "VBNET.ATG" 
+			m.Add(Modifier.Friend);
+			break;
+		}
+		case 159: {
+			lexer.NextToken();
+
+#line  2730 "VBNET.ATG" 
+			m.Add(Modifier.Shadows);
+			break;
+		}
+		case 144: {
+			lexer.NextToken();
+
+#line  2731 "VBNET.ATG" 
+			m.Add(Modifier.Overrides);
+			break;
+		}
+		case 124: {
+			lexer.NextToken();
+
+#line  2732 "VBNET.ATG" 
+			m.Add(Modifier.MustOverride);
+			break;
+		}
+		case 147: {
+			lexer.NextToken();
+
+#line  2733 "VBNET.ATG" 
+			m.Add(Modifier.Private);
+			break;
+		}
+		case 149: {
+			lexer.NextToken();
+
+#line  2734 "VBNET.ATG" 
+			m.Add(Modifier.Protected);
+			break;
+		}
+		case 150: {
+			lexer.NextToken();
+
+#line  2735 "VBNET.ATG" 
+			m.Add(Modifier.Public);
+			break;
+		}
+		case 132: {
+			lexer.NextToken();
+
+#line  2736 "VBNET.ATG" 
+			m.Add(Modifier.NotInheritable);
+			break;
+		}
+		case 133: {
+			lexer.NextToken();
+
+#line  2737 "VBNET.ATG" 
+			m.Add(Modifier.NotOverridable);
+			break;
+		}
+		case 160: {
+			lexer.NextToken();
+
+#line  2738 "VBNET.ATG" 
+			m.Add(Modifier.Shared);
+			break;
+		}
+		case 142: {
+			lexer.NextToken();
+
+#line  2739 "VBNET.ATG" 
+			m.Add(Modifier.Overridable);
+			break;
+		}
+		case 141: {
+			lexer.NextToken();
+
+#line  2740 "VBNET.ATG" 
+			m.Add(Modifier.Overloads);
+			break;
+		}
+		case 152: {
+			lexer.NextToken();
+
+#line  2741 "VBNET.ATG" 
+			m.Add(Modifier.ReadOnly);
+			break;
+		}
+		case 186: {
+			lexer.NextToken();
+
+#line  2742 "VBNET.ATG" 
+			m.Add(Modifier.WriteOnly);
+			break;
+		}
+		case 185: {
+			lexer.NextToken();
+
+#line  2743 "VBNET.ATG" 
+			m.Add(Modifier.WithEvents);
+			break;
+		}
+		case 82: {
+			lexer.NextToken();
+
+#line  2744 "VBNET.ATG" 
+			m.Add(Modifier.Dim);
+			break;
+		}
+		default: SynErr(200); break;
+		}
+	}
+
+	void ClassMemberDecl(
+#line  869 "VBNET.ATG" 
+Modifiers m, ArrayList attributes) {
+		StructureMemberDecl(
+#line  870 "VBNET.ATG" 
+m, attributes);
+	}
+
+	void StructureMemberDecl(
+#line  884 "VBNET.ATG" 
+Modifiers m, ArrayList attributes) {
+
+#line  886 "VBNET.ATG" 
+		TypeReference type = null;
+		ArrayList p = null;
+		Statement stmt = null;
+		ArrayList variableDeclarators = new ArrayList();
+		
+		switch (la.kind) {
+		case 68: case 81: case 91: case 113: case 122: case 168: {
+			NonModuleDeclaration(
+#line  891 "VBNET.ATG" 
+m, attributes);
+			break;
+		}
+		case 169: {
+			lexer.NextToken();
+
+#line  895 "VBNET.ATG" 
+			Point startPos = t.Location;
+			ArrayList comments = lexer.SpecialTracker.RetreiveComments();
+			
+			if (StartOf(9)) {
+
+#line  900 "VBNET.ATG" 
+				string name = String.Empty;
+				MethodDeclaration methodDeclaration;
+				HandlesClause handlesClause = null;
+				ImplementsClause implementsClause = null;
+				
+				Identifier();
+
+#line  907 "VBNET.ATG" 
+				name = t.val;
+				m.Check(Modifier.Methods);
+				
+				if (la.kind == 25) {
+					lexer.NextToken();
+					if (StartOf(4)) {
+						FormalParameterList(
+#line  910 "VBNET.ATG" 
+out p);
+					}
+					Expect(26);
+				}
+				if (la.kind == 106 || la.kind == 108) {
+					if (la.kind == 108) {
+						ImplementsClause(
+#line  913 "VBNET.ATG" 
+out implementsClause);
+					} else {
+						HandlesClause(
+#line  915 "VBNET.ATG" 
+out handlesClause);
+					}
+				}
+
+#line  918 "VBNET.ATG" 
+				Point endLocation = t.EndLocation; 
+				Expect(1);
+				if (
+#line  922 "VBNET.ATG" 
+IsMustOverride(m)) {
+
+#line  924 "VBNET.ATG" 
+					methodDeclaration = new MethodDeclaration(name, m.Modifier,  null, p, attributes);
+					methodDeclaration.Specials["before"] = comments;
+					methodDeclaration.StartLocation = startPos;
+					methodDeclaration.EndLocation   = endLocation;
+					
+					methodDeclaration.HandlesClause = handlesClause;
+					methodDeclaration.ImplementsClause = implementsClause;
+					
+					compilationUnit.AddChild(methodDeclaration);
+					
+				} else if (StartOf(10)) {
+
+#line  936 "VBNET.ATG" 
+					methodDeclaration = new MethodDeclaration(name, m.Modifier,  null, p, attributes);
+					methodDeclaration.Specials["before"] = comments;
+					methodDeclaration.StartLocation = startPos;
+					methodDeclaration.EndLocation   = endLocation;
+					
+					methodDeclaration.HandlesClause = handlesClause;
+					methodDeclaration.ImplementsClause = implementsClause;
+					
+					compilationUnit.AddChild(methodDeclaration);
+					compilationUnit.BlockStart(methodDeclaration);
+					
+					Block(
+#line  947 "VBNET.ATG" 
+out stmt);
+
+#line  949 "VBNET.ATG" 
+					compilationUnit.BlockEnd();
+					methodDeclaration.Body  = (BlockStatement)stmt;
+					
+					Expect(89);
+					Expect(169);
+
+#line  952 "VBNET.ATG" 
+					methodDeclaration.Body.EndLocation = t.EndLocation; 
+					Expect(1);
+				} else SynErr(201);
+			} else if (la.kind == 128) {
+				lexer.NextToken();
+				if (la.kind == 25) {
+					lexer.NextToken();
+					if (StartOf(4)) {
+						FormalParameterList(
+#line  955 "VBNET.ATG" 
+out p);
+					}
+					Expect(26);
+				}
+
+#line  956 "VBNET.ATG" 
+				m.Check(Modifier.Constructors); 
+
+#line  957 "VBNET.ATG" 
+				Point constructorEndLocation = t.EndLocation; 
+				Expect(1);
+				Block(
+#line  959 "VBNET.ATG" 
+out stmt);
+				Expect(89);
+				Expect(169);
+
+#line  960 "VBNET.ATG" 
+				Point endLocation = t.EndLocation; 
+				Expect(1);
+
+#line  962 "VBNET.ATG" 
+				ConstructorDeclaration cd = new ConstructorDeclaration("New", m.Modifier, p, attributes); 
+				cd.StartLocation = startPos;
+				cd.Specials["before"] = comments;
+				cd.EndLocation   = constructorEndLocation;
+				cd.Body = (BlockStatement)stmt;
+				cd.Body.EndLocation   = endLocation;
+				compilationUnit.AddChild(cd);
+				
+			} else SynErr(202);
+			break;
+		}
+		case 101: {
+			lexer.NextToken();
+
+#line  975 "VBNET.ATG" 
+			m.Check(Modifier.Methods);
+			string name = String.Empty;
+			Point startPos = t.Location;
+			MethodDeclaration methodDeclaration;
+			HandlesClause handlesClause = null;
+			ImplementsClause implementsClause = null;
+			AttributeSection attributeSection = null;
+			
+			Identifier();
+
+#line  983 "VBNET.ATG" 
+			name = t.val; 
+			if (la.kind == 25) {
+				lexer.NextToken();
+				if (StartOf(4)) {
+					FormalParameterList(
+#line  984 "VBNET.ATG" 
+out p);
+				}
+				Expect(26);
+			}
+			if (la.kind == 49) {
+				lexer.NextToken();
+				if (la.kind == 28) {
+					AttributeSection(
+#line  985 "VBNET.ATG" 
+out attributeSection);
+				}
+				TypeName(
+#line  985 "VBNET.ATG" 
+out type);
+			}
+
+#line  987 "VBNET.ATG" 
+			if(type == null) {
+			type = new TypeReference("System.Object");
+			}
+			type.Attributes = attributeSection;
+			
+			if (la.kind == 106 || la.kind == 108) {
+				if (la.kind == 108) {
+					ImplementsClause(
+#line  994 "VBNET.ATG" 
+out implementsClause);
+				} else {
+					HandlesClause(
+#line  996 "VBNET.ATG" 
+out handlesClause);
+				}
+			}
+			Expect(1);
+			if (
+#line  1002 "VBNET.ATG" 
+IsMustOverride(m)) {
+
+#line  1004 "VBNET.ATG" 
+				methodDeclaration = new MethodDeclaration(name, m.Modifier,  type, p, attributes);
+				methodDeclaration.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+				methodDeclaration.StartLocation = startPos;
+				methodDeclaration.EndLocation   = t.EndLocation;
+				methodDeclaration.HandlesClause = handlesClause;
+				methodDeclaration.ImplementsClause = implementsClause;
+				compilationUnit.AddChild(methodDeclaration);
+				
+			} else if (StartOf(10)) {
+
+#line  1014 "VBNET.ATG" 
+				methodDeclaration = new MethodDeclaration(name, m.Modifier,  type, p, attributes);
+				methodDeclaration.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+				methodDeclaration.StartLocation = startPos;
+				methodDeclaration.EndLocation   = t.EndLocation;
+				
+				methodDeclaration.HandlesClause = handlesClause;
+				methodDeclaration.ImplementsClause = implementsClause;
+				
+				compilationUnit.AddChild(methodDeclaration);
+				compilationUnit.BlockStart(methodDeclaration);
+				
+				Block(
+#line  1025 "VBNET.ATG" 
+out stmt);
+
+#line  1027 "VBNET.ATG" 
+				compilationUnit.BlockEnd();
+				methodDeclaration.Body  = (BlockStatement)stmt;
+				
+				Expect(89);
+				Expect(101);
+
+#line  1032 "VBNET.ATG" 
+				methodDeclaration.Body.StartLocation = methodDeclaration.EndLocation;
+				methodDeclaration.Body.EndLocation   = t.EndLocation;
+				
+				Expect(1);
+			} else SynErr(203);
+			break;
+		}
+		case 79: {
+			lexer.NextToken();
+
+#line  1041 "VBNET.ATG" 
+			m.Check(Modifier.ExternalMethods);
+			Point startPos = t.Location;
+			CharsetModifier charsetModifer = CharsetModifier.None;
+			string library = String.Empty;
+			string alias = null;
+			string name = String.Empty;
+			
+			if (StartOf(11)) {
+				Charset(
+#line  1048 "VBNET.ATG" 
+out charsetModifer);
+			}
+			if (la.kind == 169) {
+				lexer.NextToken();
+				Identifier();
+
+#line  1051 "VBNET.ATG" 
+				name = t.val; 
+				Expect(116);
+				Expect(3);
+
+#line  1052 "VBNET.ATG" 
+				library = t.val; 
+				if (la.kind == 45) {
+					lexer.NextToken();
+					Expect(3);
+
+#line  1053 "VBNET.ATG" 
+					alias = t.val; 
+				}
+				if (la.kind == 25) {
+					lexer.NextToken();
+					if (StartOf(4)) {
+						FormalParameterList(
+#line  1054 "VBNET.ATG" 
+out p);
+					}
+					Expect(26);
+				}
+				Expect(1);
+
+#line  1057 "VBNET.ATG" 
+				DeclareDeclaration declareDeclaration = new DeclareDeclaration(name, m.Modifier, null, p, attributes, library, alias, charsetModifer);
+				declareDeclaration.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+				declareDeclaration.StartLocation = startPos;
+				declareDeclaration.EndLocation   = t.EndLocation;
+				compilationUnit.AddChild(declareDeclaration);
+				
+			} else if (la.kind == 101) {
+				lexer.NextToken();
+				Identifier();
+
+#line  1065 "VBNET.ATG" 
+				name = t.val; 
+				Expect(116);
+				Expect(3);
+
+#line  1066 "VBNET.ATG" 
+				library = t.val; 
+				if (la.kind == 45) {
+					lexer.NextToken();
+					Expect(3);
+
+#line  1067 "VBNET.ATG" 
+					alias = t.val; 
+				}
+				if (la.kind == 25) {
+					lexer.NextToken();
+					if (StartOf(4)) {
+						FormalParameterList(
+#line  1068 "VBNET.ATG" 
+out p);
+					}
+					Expect(26);
+				}
+				if (la.kind == 49) {
+					lexer.NextToken();
+					TypeName(
+#line  1069 "VBNET.ATG" 
+out type);
+				}
+				Expect(1);
+
+#line  1072 "VBNET.ATG" 
+				DeclareDeclaration declareDeclaration = new DeclareDeclaration(name, m.Modifier, type, p, attributes, library, alias, charsetModifer);
+				declareDeclaration.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+				declareDeclaration.StartLocation = startPos;
+				declareDeclaration.EndLocation   = t.EndLocation;
+				compilationUnit.AddChild(declareDeclaration);
+				
+			} else SynErr(204);
+			break;
+		}
+		case 94: {
+			lexer.NextToken();
+
+#line  1083 "VBNET.ATG" 
+			m.Check(Modifier.Events);
+			Point startPos = t.Location;
+			EventDeclaration eventDeclaration;
+			string name = String.Empty;
+			ImplementsClause implementsClause = null;
+			
+			Identifier();
+
+#line  1089 "VBNET.ATG" 
+			name= t.val; 
+			if (la.kind == 49) {
+				lexer.NextToken();
+				TypeName(
+#line  1091 "VBNET.ATG" 
+out type);
+			} else if (la.kind == 1 || la.kind == 25 || la.kind == 108) {
+				if (la.kind == 25) {
+					lexer.NextToken();
+					if (StartOf(4)) {
+						FormalParameterList(
+#line  1093 "VBNET.ATG" 
+out p);
+					}
+					Expect(26);
+				}
+			} else SynErr(205);
+			if (la.kind == 108) {
+				ImplementsClause(
+#line  1095 "VBNET.ATG" 
+out implementsClause);
+			}
+
+#line  1097 "VBNET.ATG" 
+			eventDeclaration = new EventDeclaration(type, m.Modifier, p, attributes, name, implementsClause);
+			eventDeclaration.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+			eventDeclaration.StartLocation = startPos;
+			eventDeclaration.EndLocation = t.EndLocation;
+			compilationUnit.AddChild(eventDeclaration);
+			
+			Expect(1);
+			break;
+		}
+		case 2: case 52: case 71: case 171: {
+
+#line  1105 "VBNET.ATG" 
+			Point startPos = t.Location; 
+
+#line  1107 "VBNET.ATG" 
+			m.Check(Modifier.Fields);
+			FieldDeclaration fd = new FieldDeclaration(attributes, type, m.Modifier);
+			ArrayList comments = lexer.SpecialTracker.RetreiveComments();
+			fd.StartLocation = startPos;
+			
+			VariableDeclarator(
+#line  1112 "VBNET.ATG" 
+variableDeclarators);
+
+#line  1114 "VBNET.ATG" 
+			((INode)variableDeclarators[0]).Specials["before"] = comments;
+			
+			while (la.kind == 12) {
+				lexer.NextToken();
+				VariableDeclarator(
+#line  1116 "VBNET.ATG" 
+variableDeclarators);
+			}
+			Expect(1);
+
+#line  1119 "VBNET.ATG" 
+			fd.EndLocation = t.EndLocation;
+			fd.Fields = variableDeclarators;
+			compilationUnit.AddChild(fd);
+			
+			break;
+		}
+		case 72: {
+
+#line  1124 "VBNET.ATG" 
+			m.Check(Modifier.Fields); 
+			lexer.NextToken();
+
+#line  1125 "VBNET.ATG" 
+			m.Add(Modifier.Constant);  
+
+#line  1127 "VBNET.ATG" 
+			FieldDeclaration fd = new FieldDeclaration(attributes, type, m.Modifier);
+			fd.StartLocation = t.Location;
+			ArrayList comments = lexer.SpecialTracker.RetreiveComments();
+			ArrayList constantDeclarators = new ArrayList();
+			
+			ConstantDeclarator(
+#line  1132 "VBNET.ATG" 
+constantDeclarators);
+
+#line  1134 "VBNET.ATG" 
+			((INode)constantDeclarators[0]).Specials["before"] = comments;
+			
+			while (la.kind == 12) {
+				lexer.NextToken();
+				ConstantDeclarator(
+#line  1136 "VBNET.ATG" 
+constantDeclarators);
+			}
+
+#line  1138 "VBNET.ATG" 
+			fd.Fields = constantDeclarators;
+			fd.EndLocation = t.Location;
+			
+			Expect(1);
+
+#line  1143 "VBNET.ATG" 
+			fd.EndLocation = t.EndLocation;
+			compilationUnit.AddChild(fd);
+			
+			break;
+		}
+		case 148: {
+			lexer.NextToken();
+
+#line  1149 "VBNET.ATG" 
+			m.Check(Modifier.Properties);
+			Point startPos = t.Location;
+			ImplementsClause implementsClause = null;
+			
+			Identifier();
+
+#line  1153 "VBNET.ATG" 
+			string propertyName = t.val; 
+			if (la.kind == 25) {
+				lexer.NextToken();
+				if (StartOf(4)) {
+					FormalParameterList(
+#line  1154 "VBNET.ATG" 
+out p);
+				}
+				Expect(26);
+			}
+			if (la.kind == 49) {
+				lexer.NextToken();
+				TypeName(
+#line  1155 "VBNET.ATG" 
+out type);
+			}
+
+#line  1157 "VBNET.ATG" 
+			if(type == null) {
+			type = new TypeReference("System.Object");
+			}
+			
+			if (la.kind == 108) {
+				ImplementsClause(
+#line  1161 "VBNET.ATG" 
+out implementsClause);
+			}
+			Expect(1);
+			if (
+#line  1165 "VBNET.ATG" 
+IsMustOverride(m)) {
+
+#line  1167 "VBNET.ATG" 
+				PropertyDeclaration pDecl = new PropertyDeclaration(propertyName, type, m.Modifier, attributes);
+				pDecl.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+				pDecl.StartLocation = startPos;
+				pDecl.EndLocation   = t.Location;
+				pDecl.TypeReference = type;
+				pDecl.ImplementsClause = implementsClause;
+				pDecl.Parameters = p;
+				compilationUnit.AddChild(pDecl);
+				
+			} else if (la.kind == 28 || la.kind == 102 || la.kind == 158) {
+
+#line  1178 "VBNET.ATG" 
+				PropertyDeclaration pDecl = new PropertyDeclaration(propertyName, type, m.Modifier, attributes);
+				pDecl.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+				pDecl.StartLocation = startPos;
+				pDecl.EndLocation   = t.Location;
+				pDecl.BodyStart   = t.Location;
+				pDecl.TypeReference = type;
+				pDecl.ImplementsClause = implementsClause;
+				pDecl.Parameters = p;
+				PropertyGetRegion getRegion;
+				PropertySetRegion setRegion;
+				
+				AccessorDecls(
+#line  1189 "VBNET.ATG" 
+out getRegion, out setRegion);
+				Expect(89);
+				Expect(148);
+				Expect(1);
+
+#line  1193 "VBNET.ATG" 
+				pDecl.GetRegion = getRegion;
+				pDecl.SetRegion = setRegion;
+				pDecl.BodyEnd = t.EndLocation;
+				compilationUnit.AddChild(pDecl);
+				
+			} else SynErr(206);
+			break;
+		}
+		default: SynErr(207); break;
+		}
+	}
+
+	void EnumMemberDecl(
+#line  849 "VBNET.ATG" 
+out FieldDeclaration f) {
+
+#line  851 "VBNET.ATG" 
+		Expression expr = null;
+		ArrayList attributes = new ArrayList();
+		AttributeSection section = null;
+		VariableDeclaration varDecl = null;
+		
+		while (la.kind == 28) {
+			AttributeSection(
+#line  856 "VBNET.ATG" 
+out section);
+
+#line  856 "VBNET.ATG" 
+			attributes.Add(section); 
+		}
+		Identifier();
+
+#line  859 "VBNET.ATG" 
+		f = new FieldDeclaration(attributes);
+		varDecl = new VariableDeclaration(t.val);
+		varDecl.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+		f.Fields.Add(varDecl);
+		f.StartLocation = t.Location;
+		
+		if (la.kind == 11) {
+			lexer.NextToken();
+			Expr(
+#line  865 "VBNET.ATG" 
+out expr);
+
+#line  865 "VBNET.ATG" 
+			varDecl.Initializer = expr; 
+		}
+		Expect(1);
+	}
+
+	void InterfaceMemberDecl() {
+
+#line  760 "VBNET.ATG" 
+		TypeReference type =null;
+		ArrayList p = null;
+		AttributeSection section;
+		Modifiers mod = new Modifiers(this);
+		ArrayList attributes = new ArrayList();
+		ArrayList parameters = new ArrayList();
+		string name;
+		
+		if (StartOf(12)) {
+			while (la.kind == 28) {
+				AttributeSection(
+#line  768 "VBNET.ATG" 
+out section);
+
+#line  768 "VBNET.ATG" 
+				attributes.Add(section); 
+			}
+			while (StartOf(6)) {
+				MemberModifier(
+#line  772 "VBNET.ATG" 
+mod);
+			}
+			if (la.kind == 94) {
+				lexer.NextToken();
+
+#line  775 "VBNET.ATG" 
+				mod.Check(Modifier.InterfaceEvents); 
+				Identifier();
+
+#line  776 "VBNET.ATG" 
+				name = t.val; 
+				if (la.kind == 25) {
+					lexer.NextToken();
+					if (StartOf(4)) {
+						FormalParameterList(
+#line  777 "VBNET.ATG" 
+out p);
+					}
+					Expect(26);
+				}
+				if (la.kind == 49) {
+					lexer.NextToken();
+					TypeName(
+#line  778 "VBNET.ATG" 
+out type);
+				}
+				Expect(1);
+
+#line  781 "VBNET.ATG" 
+				EventDeclaration ed = new EventDeclaration(type, mod.Modifier, p, attributes, name, null);
+				ed.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+				compilationUnit.AddChild(ed);
+				ed.EndLocation = t.EndLocation;
+				
+			} else if (la.kind == 169) {
+				lexer.NextToken();
+
+#line  789 "VBNET.ATG" 
+				mod.Check(Modifier.InterfaceMethods);
+				ArrayList comments = lexer.SpecialTracker.RetreiveComments();
+				
+				Identifier();
+
+#line  792 "VBNET.ATG" 
+				name = t.val; 
+				if (la.kind == 25) {
+					lexer.NextToken();
+					if (StartOf(4)) {
+						FormalParameterList(
+#line  793 "VBNET.ATG" 
+out p);
+					}
+					Expect(26);
+				}
+				Expect(1);
+
+#line  796 "VBNET.ATG" 
+				MethodDeclaration md = new MethodDeclaration(name, mod.Modifier, null, p, attributes);
+				md.Specials["before"] = comments;
+				md.EndLocation = t.EndLocation;
+				compilationUnit.AddChild(md);
+				
+			} else if (la.kind == 101) {
+				lexer.NextToken();
+
+#line  804 "VBNET.ATG" 
+				mod.Check(Modifier.InterfaceMethods);
+				AttributeSection attributeSection = null;
+				
+				Identifier();
+
+#line  807 "VBNET.ATG" 
+				name = t.val; 
+				if (la.kind == 25) {
+					lexer.NextToken();
+					if (StartOf(4)) {
+						FormalParameterList(
+#line  808 "VBNET.ATG" 
+out p);
+					}
+					Expect(26);
+				}
+				if (la.kind == 49) {
+					lexer.NextToken();
+					if (la.kind == 28) {
+						AttributeSection(
+#line  809 "VBNET.ATG" 
+out attributeSection);
+					}
+					TypeName(
+#line  809 "VBNET.ATG" 
+out type);
+				}
+
+#line  811 "VBNET.ATG" 
+				if(type == null) {
+				type = new TypeReference("System.Object");
+				}
+				type.Attributes = attributeSection;
+				MethodDeclaration md = new MethodDeclaration(name, mod.Modifier, type, p, attributes);
+				md.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+				md.EndLocation = t.EndLocation;
+				compilationUnit.AddChild(md);
+				
+				Expect(1);
+			} else if (la.kind == 148) {
+				lexer.NextToken();
+
+#line  824 "VBNET.ATG" 
+				mod.Check(Modifier.InterfaceProperties);
+				ArrayList comments = lexer.SpecialTracker.RetreiveComments();
+				
+				Identifier();
+
+#line  827 "VBNET.ATG" 
+				name = t.val;  
+				if (la.kind == 25) {
+					lexer.NextToken();
+					if (StartOf(4)) {
+						FormalParameterList(
+#line  828 "VBNET.ATG" 
+out p);
+					}
+					Expect(26);
+				}
+				if (la.kind == 49) {
+					lexer.NextToken();
+					TypeName(
+#line  829 "VBNET.ATG" 
+out type);
+				}
+
+#line  831 "VBNET.ATG" 
+				if(type == null) {
+				type = new TypeReference("System.Object");
+				}
+				
+				Expect(1);
+
+#line  837 "VBNET.ATG" 
+				PropertyDeclaration pd = new PropertyDeclaration(name, type, mod.Modifier, attributes);
+				pd.Parameters = p;
+				pd.Specials["before"] = comments;
+				pd.EndLocation = t.EndLocation;
+				compilationUnit.AddChild(pd);
+				
+			} else SynErr(208);
+		} else if (StartOf(13)) {
+			NonModuleDeclaration(
+#line  845 "VBNET.ATG" 
+mod, attributes);
+		} else SynErr(209);
+	}
+
+	void Expr(
+#line  1447 "VBNET.ATG" 
+out Expression expr) {
+
+#line  1448 "VBNET.ATG" 
+		expr = new Expression(); 
+		ConditionalOrExpr(
+#line  1449 "VBNET.ATG" 
+out expr);
+		while (StartOf(14)) {
+
+#line  1452 "VBNET.ATG" 
+			AssignmentOperatorType op; Expression val; 
+			AssignmentOperator(
+#line  1453 "VBNET.ATG" 
+out op);
+			Expr(
+#line  1453 "VBNET.ATG" 
+out val);
+
+#line  1453 "VBNET.ATG" 
+			expr = new AssignmentExpression(expr, op, val); 
+		}
+	}
+
+	void ImplementsClause(
+#line  1425 "VBNET.ATG" 
+out ImplementsClause clause) {
+
+#line  1427 "VBNET.ATG" 
+		clause = new ImplementsClause();
+		string typename = String.Empty;
+		string first;
+		
+		Expect(108);
+		Identifier();
+
+#line  1431 "VBNET.ATG" 
+		first = t.val; 
+		Expect(10);
+		Qualident(
+#line  1431 "VBNET.ATG" 
+out typename);
+
+#line  1431 "VBNET.ATG" 
+		((ImplementsClause)clause).BaseMembers.Add(first + "." + typename); 
+		while (la.kind == 12) {
+			lexer.NextToken();
+			Identifier();
+
+#line  1432 "VBNET.ATG" 
+			first = t.val; 
+			Expect(10);
+			Qualident(
+#line  1432 "VBNET.ATG" 
+out typename);
+
+#line  1432 "VBNET.ATG" 
+			((ImplementsClause)clause).BaseMembers.Add(first + "." + typename); 
+		}
+	}
+
+	void HandlesClause(
+#line  1383 "VBNET.ATG" 
+out HandlesClause handlesClause) {
+
+#line  1385 "VBNET.ATG" 
+		handlesClause = new HandlesClause();
+		string name;
+		
+		Expect(106);
+		EventMemberSpecifier(
+#line  1388 "VBNET.ATG" 
+out name);
+
+#line  1388 "VBNET.ATG" 
+		handlesClause.EventNames.Add(name); 
+		while (la.kind == 12) {
+			lexer.NextToken();
+			EventMemberSpecifier(
+#line  1389 "VBNET.ATG" 
+out name);
+
+#line  1389 "VBNET.ATG" 
+			handlesClause.EventNames.Add(name); 
+		}
+	}
+
+	void Block(
+#line  2004 "VBNET.ATG" 
+out Statement stmt) {
+
+#line  2007 "VBNET.ATG" 
+		BlockStatement blockStmt = new BlockStatement();
+		blockStmt.StartLocation = t.Location;
+		compilationUnit.BlockStart(blockStmt);
+		
+		while (StartOf(15) || 
+#line  2012 "VBNET.ATG" 
+IsEndStmtAhead()) {
+			if (StartOf(15)) {
+				Statement();
+				EndOfStmt();
+			} else {
+				Expect(89);
+				EndOfStmt();
+
+#line  2012 "VBNET.ATG" 
+				compilationUnit.AddChild(new EndStatement()); 
+			}
+		}
+
+#line  2015 "VBNET.ATG" 
+		stmt = blockStmt;
+		blockStmt.EndLocation = t.EndLocation;
+		compilationUnit.BlockEnd();
+		
+	}
+
+	void Charset(
+#line  1375 "VBNET.ATG" 
+out CharsetModifier charsetModifier) {
+
+#line  1376 "VBNET.ATG" 
+		charsetModifier = CharsetModifier.None; 
+		if (la.kind == 101 || la.kind == 169) {
+		} else if (la.kind == 48) {
+			lexer.NextToken();
+
+#line  1377 "VBNET.ATG" 
+			charsetModifier = CharsetModifier.ANSI; 
+		} else if (la.kind == 51) {
+			lexer.NextToken();
+
+#line  1378 "VBNET.ATG" 
+			charsetModifier = CharsetModifier.Auto; 
+		} else if (la.kind == 178) {
+			lexer.NextToken();
+
+#line  1379 "VBNET.ATG" 
+			charsetModifier = CharsetModifier.Unicode; 
+		} else SynErr(210);
+	}
+
+	void VariableDeclarator(
+#line  1276 "VBNET.ATG" 
+ArrayList fieldDeclaration) {
+
+#line  1278 "VBNET.ATG" 
+		Expression expr = null;
+		TypeReference type = null;
+		ObjectCreateExpression oce = null;
+		ArrayCreateExpression ace = null;
+		ArrayList rank = null;
+		ArrayList dimension = null;
+		
+		Identifier();
+
+#line  1287 "VBNET.ATG" 
+		VariableDeclaration f = new VariableDeclaration(t.val);
+		
+		if (
+#line  1289 "VBNET.ATG" 
+IsRank()) {
+			ArrayTypeModifiers(
+#line  1289 "VBNET.ATG" 
+out rank);
+		}
+		if (
+#line  1290 "VBNET.ATG" 
+IsSize()) {
+			ArrayInitializationModifier(
+#line  1290 "VBNET.ATG" 
+out dimension);
+		}
+		if (
+#line  1292 "VBNET.ATG" 
+IsObjectCreation()) {
+			Expect(49);
+			ObjectCreateExpression(
+#line  1292 "VBNET.ATG" 
+out expr);
+
+#line  1294 "VBNET.ATG" 
+			if(expr is ArrayCreateExpression) {
+			ace = expr as ArrayCreateExpression;
+			f.Initializer = ace.ArrayInitializer;
+			
+			} else {
+				oce = expr as ObjectCreateExpression;
+				f.Initializer = oce;
+				if(oce.CreateType != null) {
+					f.Type = oce.CreateType;
+				}
+			}
+			
+		} else if (StartOf(16)) {
+			if (la.kind == 49) {
+				lexer.NextToken();
+				TypeName(
+#line  1307 "VBNET.ATG" 
+out type);
+			}
+
+#line  1309 "VBNET.ATG" 
+			if(type != null) {
+			type.Dimension = dimension;
+			}
+			f.Type = type;
+			if (type != null && rank != null) {
+				if(type.RankSpecifier != null) {
+					Error("array rank only allowed one time");
+				} else {
+					type.RankSpecifier = rank;
+				}
+			}
+			
+			if (la.kind == 11) {
+				lexer.NextToken();
+				VariableInitializer(
+#line  1321 "VBNET.ATG" 
+out expr);
+
+#line  1321 "VBNET.ATG" 
+				f.Initializer = expr; 
+			}
+		} else SynErr(211);
+
+#line  1323 "VBNET.ATG" 
+		fieldDeclaration.Add(f); 
+	}
+
+	void ConstantDeclarator(
+#line  1259 "VBNET.ATG" 
+ArrayList constantDeclaration) {
+
+#line  1261 "VBNET.ATG" 
+		Expression expr = null;
+		TypeReference type = null;
+		string name = String.Empty;
+		
+		Identifier();
+
+#line  1265 "VBNET.ATG" 
+		name = t.val; 
+		if (la.kind == 49) {
+			lexer.NextToken();
+			TypeName(
+#line  1266 "VBNET.ATG" 
+out type);
+		}
+		Expect(11);
+		Expr(
+#line  1267 "VBNET.ATG" 
+out expr);
+
+#line  1269 "VBNET.ATG" 
+		VariableDeclaration f = new VariableDeclaration(name, expr);
+		f.Type = type;
+		constantDeclaration.Add(f);
+		
+	}
+
+	void AccessorDecls(
+#line  1202 "VBNET.ATG" 
+out PropertyGetRegion getBlock, out PropertySetRegion setBlock) {
+
+#line  1204 "VBNET.ATG" 
+		ArrayList attributes = new ArrayList(); 
+		AttributeSection section;
+		getBlock = null;
+		setBlock = null; 
+		
+		while (la.kind == 28) {
+			AttributeSection(
+#line  1209 "VBNET.ATG" 
+out section);
+
+#line  1209 "VBNET.ATG" 
+			attributes.Add(section); 
+		}
+		if (la.kind == 102) {
+			GetAccessorDecl(
+#line  1211 "VBNET.ATG" 
+out getBlock, attributes);
+			if (la.kind == 28 || la.kind == 158) {
+
+#line  1213 "VBNET.ATG" 
+				attributes = new ArrayList(); 
+				while (la.kind == 28) {
+					AttributeSection(
+#line  1214 "VBNET.ATG" 
+out section);
+
+#line  1214 "VBNET.ATG" 
+					attributes.Add(section); 
+				}
+				SetAccessorDecl(
+#line  1215 "VBNET.ATG" 
+out setBlock, attributes);
+			}
+		} else if (la.kind == 158) {
+			SetAccessorDecl(
+#line  1218 "VBNET.ATG" 
+out setBlock, attributes);
+			if (la.kind == 28 || la.kind == 102) {
+
+#line  1220 "VBNET.ATG" 
+				attributes = new ArrayList(); 
+				while (la.kind == 28) {
+					AttributeSection(
+#line  1221 "VBNET.ATG" 
+out section);
+
+#line  1221 "VBNET.ATG" 
+					attributes.Add(section); 
+				}
+				GetAccessorDecl(
+#line  1222 "VBNET.ATG" 
+out getBlock, attributes);
+			}
+		} else SynErr(212);
+	}
+
+	void GetAccessorDecl(
+#line  1228 "VBNET.ATG" 
+out PropertyGetRegion getBlock, ArrayList attributes) {
+
+#line  1229 "VBNET.ATG" 
+		Statement stmt = null; 
+		Expect(102);
+		Expect(1);
+		Block(
+#line  1232 "VBNET.ATG" 
+out stmt);
+
+#line  1234 "VBNET.ATG" 
+		getBlock = new PropertyGetRegion((BlockStatement)stmt, attributes);
+		
+		Expect(89);
+		Expect(102);
+		Expect(1);
+	}
+
+	void SetAccessorDecl(
+#line  1241 "VBNET.ATG" 
+out PropertySetRegion setBlock, ArrayList attributes) {
+
+#line  1243 "VBNET.ATG" 
+		Statement stmt = null;
+		ArrayList p = null;
+		
+		Expect(158);
+		if (la.kind == 25) {
+			lexer.NextToken();
+			if (StartOf(4)) {
+				FormalParameterList(
+#line  1247 "VBNET.ATG" 
+out p);
+			}
+			Expect(26);
+		}
+		Expect(1);
+		Block(
+#line  1249 "VBNET.ATG" 
+out stmt);
+
+#line  1251 "VBNET.ATG" 
+		setBlock = new PropertySetRegion((BlockStatement)stmt, attributes);
+		setBlock.Parameters = p;
+		
+		Expect(89);
+		Expect(158);
+		Expect(1);
+	}
+
+	void ArrayTypeModifiers(
+#line  1813 "VBNET.ATG" 
+out ArrayList arrayModifiers) {
+
+#line  1815 "VBNET.ATG" 
+		arrayModifiers = new ArrayList();
+		int i = 0;
+		
+		while (
+#line  1818 "VBNET.ATG" 
+IsRank()) {
+			Expect(25);
+			if (la.kind == 12 || la.kind == 26) {
+				RankList(
+#line  1820 "VBNET.ATG" 
+out i);
+			}
+
+#line  1822 "VBNET.ATG" 
+			arrayModifiers.Add(i);
+			
+			Expect(26);
+		}
+
+#line  1827 "VBNET.ATG" 
+		if(arrayModifiers.Count == 0) {
+		 arrayModifiers = null;
+		}
+		
+	}
+
+	void ArrayInitializationModifier(
+#line  1327 "VBNET.ATG" 
+out ArrayList arrayModifiers) {
+
+#line  1329 "VBNET.ATG" 
+		arrayModifiers = null;
+		
+		Expect(25);
+		InitializationRankList(
+#line  1331 "VBNET.ATG" 
+out arrayModifiers);
+		Expect(26);
+	}
+
+	void ObjectCreateExpression(
+#line  1701 "VBNET.ATG" 
+out Expression oce) {
+
+#line  1703 "VBNET.ATG" 
+		TypeReference type = null;
+		Expression initializer = null;
+		ArrayList arguments = null;
+		oce = null;
+		
+		Expect(128);
+		ArrayTypeName(
+#line  1708 "VBNET.ATG" 
+out type);
+		if (la.kind == 25) {
+			lexer.NextToken();
+			if (StartOf(17)) {
+				ArgumentList(
+#line  1710 "VBNET.ATG" 
+out arguments);
+			}
+			Expect(26);
+		}
+		if (la.kind == 21) {
+			ArrayInitializer(
+#line  1714 "VBNET.ATG" 
+out initializer);
+		}
+
+#line  1717 "VBNET.ATG" 
+		if(initializer == null) {
+		oce = new ObjectCreateExpression(type, arguments);
+		} else {
+			ArrayCreateExpression ace = new ArrayCreateExpression(type, initializer as ArrayInitializerExpression);
+			ace.Parameters = arguments;
+			oce = ace;
+		}
+		
+	}
+
+	void VariableInitializer(
+#line  1347 "VBNET.ATG" 
+out Expression initializerExpression) {
+
+#line  1349 "VBNET.ATG" 
+		initializerExpression = null;
+		
+		if (StartOf(18)) {
+			Expr(
+#line  1351 "VBNET.ATG" 
+out initializerExpression);
+		} else if (la.kind == 21) {
+			ArrayInitializer(
+#line  1352 "VBNET.ATG" 
+out initializerExpression);
+		} else SynErr(213);
+	}
+
+	void InitializationRankList(
+#line  1335 "VBNET.ATG" 
+out ArrayList rank) {
+
+#line  1337 "VBNET.ATG" 
+		rank = null;
+		Expression expr = null;
+		
+		Expr(
+#line  1340 "VBNET.ATG" 
+out expr);
+
+#line  1340 "VBNET.ATG" 
+		rank = new ArrayList(); rank.Add(expr); 
+		while (la.kind == 12) {
+			lexer.NextToken();
+			Expr(
+#line  1342 "VBNET.ATG" 
+out expr);
+
+#line  1342 "VBNET.ATG" 
+			rank.Add(expr); 
+		}
+	}
+
+	void ArrayInitializer(
+#line  1356 "VBNET.ATG" 
+out Expression outExpr) {
+
+#line  1358 "VBNET.ATG" 
+		Expression expr = null;
+		ArrayInitializerExpression initializer = new ArrayInitializerExpression();
+		
+		Expect(21);
+		if (StartOf(19)) {
+			VariableInitializer(
+#line  1363 "VBNET.ATG" 
+out expr);
+
+#line  1365 "VBNET.ATG" 
+			initializer.CreateExpressions.Add(expr);
+			
+			while (
+#line  1368 "VBNET.ATG" 
+NotFinalComma()) {
+				Expect(12);
+				VariableInitializer(
+#line  1368 "VBNET.ATG" 
+out expr);
+
+#line  1369 "VBNET.ATG" 
+				initializer.CreateExpressions.Add(expr); 
+			}
+		}
+		Expect(22);
+
+#line  1372 "VBNET.ATG" 
+		outExpr = initializer; 
+	}
+
+	void EventMemberSpecifier(
+#line  1435 "VBNET.ATG" 
+out string name) {
+
+#line  1436 "VBNET.ATG" 
+		string type; name = String.Empty; 
+		if (StartOf(9)) {
+			Identifier();
+
+#line  1437 "VBNET.ATG" 
+			type = t.val; 
+			Expect(10);
+			Identifier();
+
+#line  1439 "VBNET.ATG" 
+			name = type + "." + t.val; 
+		} else if (la.kind == 125) {
+			lexer.NextToken();
+			Expect(10);
+			if (StartOf(9)) {
+				Identifier();
+
+#line  1442 "VBNET.ATG" 
+				name = "MyBase." + t.val; 
+			} else if (la.kind == 93) {
+				lexer.NextToken();
+
+#line  1443 "VBNET.ATG" 
+				name = "MyBase.Error"; 
+			} else SynErr(214);
+		} else SynErr(215);
+	}
+
+	void ConditionalOrExpr(
+#line  1581 "VBNET.ATG" 
+out Expression outExpr) {
+
+#line  1582 "VBNET.ATG" 
+		Expression expr; 
+		ConditionalAndExpr(
+#line  1583 "VBNET.ATG" 
+out outExpr);
+		while (la.kind == 140) {
+			lexer.NextToken();
+			ConditionalAndExpr(
+#line  1583 "VBNET.ATG" 
+out expr);
+
+#line  1583 "VBNET.ATG" 
+			outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BooleanOr, expr);  
+		}
+	}
+
+	void AssignmentOperator(
+#line  1478 "VBNET.ATG" 
+out AssignmentOperatorType op) {
+
+#line  1479 "VBNET.ATG" 
+		op = AssignmentOperatorType.None; 
+		switch (la.kind) {
+		case 11: {
+			lexer.NextToken();
+
+#line  1480 "VBNET.ATG" 
+			op = AssignmentOperatorType.Assign; 
+			break;
+		}
+		case 42: {
+			lexer.NextToken();
+
+#line  1481 "VBNET.ATG" 
+			op = AssignmentOperatorType.ConcatString; 
+			break;
+		}
+		case 34: {
+			lexer.NextToken();
+
+#line  1482 "VBNET.ATG" 
+			op = AssignmentOperatorType.Add; 
+			break;
+		}
+		case 36: {
+			lexer.NextToken();
+
+#line  1483 "VBNET.ATG" 
+			op = AssignmentOperatorType.Subtract; 
+			break;
+		}
+		case 37: {
+			lexer.NextToken();
+
+#line  1484 "VBNET.ATG" 
+			op = AssignmentOperatorType.Multiply; 
+			break;
+		}
+		case 38: {
+			lexer.NextToken();
+
+#line  1485 "VBNET.ATG" 
+			op = AssignmentOperatorType.Divide; 
+			break;
+		}
+		case 39: {
+			lexer.NextToken();
+
+#line  1486 "VBNET.ATG" 
+			op = AssignmentOperatorType.DivideInteger; 
+			break;
+		}
+		case 35: {
+			lexer.NextToken();
+
+#line  1487 "VBNET.ATG" 
+			op = AssignmentOperatorType.Power; 
+			break;
+		}
+		case 40: {
+			lexer.NextToken();
+
+#line  1488 "VBNET.ATG" 
+			op = AssignmentOperatorType.ShiftLeft; 
+			break;
+		}
+		case 41: {
+			lexer.NextToken();
+
+#line  1489 "VBNET.ATG" 
+			op = AssignmentOperatorType.ShiftRight; 
+			break;
+		}
+		default: SynErr(216); break;
+		}
+	}
+
+	void UnaryExpr(
+#line  1457 "VBNET.ATG" 
+out Expression uExpr) {
+
+#line  1459 "VBNET.ATG" 
+		Expression expr;
+		UnaryOperatorType uop = UnaryOperatorType.None;
+		bool isUOp = false;
+		
+		while (la.kind == 14 || la.kind == 15 || la.kind == 16) {
+			if (la.kind == 14) {
+				lexer.NextToken();
+
+#line  1463 "VBNET.ATG" 
+				uop = UnaryOperatorType.Plus; isUOp = true; 
+			} else if (la.kind == 15) {
+				lexer.NextToken();
+
+#line  1464 "VBNET.ATG" 
+				uop = UnaryOperatorType.Minus; isUOp = true; 
+			} else {
+				lexer.NextToken();
+
+#line  1466 "VBNET.ATG" 
+				uop = UnaryOperatorType.Star;  isUOp = true;
+			}
+		}
+		SimpleExpr(
+#line  1468 "VBNET.ATG" 
+out expr);
+
+#line  1470 "VBNET.ATG" 
+		if (isUOp) {
+		uExpr = new UnaryOperatorExpression(expr, uop);
+		} else {
+			uExpr = expr;
+		}
+		
+	}
+
+	void SimpleExpr(
+#line  1493 "VBNET.ATG" 
+out Expression pexpr) {
+
+#line  1495 "VBNET.ATG" 
+		Expression expr;
+		TypeReference type = null;
+		string name = String.Empty;
+		pexpr = null;
+		
+		if (StartOf(20)) {
+			switch (la.kind) {
+			case 3: {
+				lexer.NextToken();
+
+#line  1503 "VBNET.ATG" 
+				pexpr = new PrimitiveExpression(t.literalValue, t.val);  
+				break;
+			}
+			case 4: {
+				lexer.NextToken();
+
+#line  1504 "VBNET.ATG" 
+				pexpr = new PrimitiveExpression(t.literalValue, t.val);  
+				break;
+			}
+			case 7: {
+				lexer.NextToken();
+
+#line  1505 "VBNET.ATG" 
+				pexpr = new PrimitiveExpression(t.literalValue, t.val);  
+				break;
+			}
+			case 6: {
+				lexer.NextToken();
+
+#line  1506 "VBNET.ATG" 
+				pexpr = new PrimitiveExpression(t.literalValue, t.val);  
+				break;
+			}
+			case 5: {
+				lexer.NextToken();
+
+#line  1507 "VBNET.ATG" 
+				pexpr = new PrimitiveExpression(t.literalValue, t.val);  
+				break;
+			}
+			case 9: {
+				lexer.NextToken();
+
+#line  1508 "VBNET.ATG" 
+				pexpr = new PrimitiveExpression(t.literalValue, t.val);  
+				break;
+			}
+			case 8: {
+				lexer.NextToken();
+
+#line  1509 "VBNET.ATG" 
+				pexpr = new PrimitiveExpression(t.literalValue, t.val);  
+				break;
+			}
+			case 175: {
+				lexer.NextToken();
+
+#line  1511 "VBNET.ATG" 
+				pexpr = new PrimitiveExpression(true, "true");  
+				break;
+			}
+			case 97: {
+				lexer.NextToken();
+
+#line  1512 "VBNET.ATG" 
+				pexpr = new PrimitiveExpression(false, "false"); 
+				break;
+			}
+			case 131: {
+				lexer.NextToken();
+
+#line  1513 "VBNET.ATG" 
+				pexpr = new PrimitiveExpression(null, "null");  
+				break;
+			}
+			case 25: {
+				lexer.NextToken();
+				Expr(
+#line  1514 "VBNET.ATG" 
+out expr);
+				Expect(26);
+
+#line  1514 "VBNET.ATG" 
+				pexpr = new ParenthesizedExpression(expr); 
+				break;
+			}
+			case 2: case 52: case 71: case 171: {
+				Identifier();
+
+#line  1515 "VBNET.ATG" 
+				pexpr = new IdentifierExpression(t.val); 
+				break;
+			}
+			case 53: case 55: case 66: case 77: case 78: case 85: case 112: case 118: case 161: case 162: case 167: {
+
+#line  1516 "VBNET.ATG" 
+				string val = String.Empty; 
+				PrimitiveTypeName(
+#line  1516 "VBNET.ATG" 
+out val);
+				Expect(10);
+				Identifier();
+
+#line  1517 "VBNET.ATG" 
+				pexpr = new FieldReferenceOrInvocationExpression(new TypeReferenceExpression(val), t.val); 
+				break;
+			}
+			case 120: {
+				lexer.NextToken();
+
+#line  1518 "VBNET.ATG" 
+				pexpr = new ThisReferenceExpression(); 
+				break;
+			}
+			case 125: case 126: {
+
+#line  1519 "VBNET.ATG" 
+				Expression retExpr = null; 
+				if (la.kind == 125) {
+					lexer.NextToken();
+
+#line  1520 "VBNET.ATG" 
+					retExpr = new BaseReferenceExpression(); 
+				} else if (la.kind == 126) {
+					lexer.NextToken();
+
+#line  1521 "VBNET.ATG" 
+					retExpr = new ClassReferenceExpression(); 
+				} else SynErr(217);
+				Expect(10);
+				IdentifierOrKeyword(
+#line  1523 "VBNET.ATG" 
+out name);
+
+#line  1523 "VBNET.ATG" 
+				pexpr = new FieldReferenceOrInvocationExpression(retExpr, name); 
+				break;
+			}
+			case 128: {
+				ObjectCreateExpression(
+#line  1524 "VBNET.ATG" 
+out expr);
+
+#line  1524 "VBNET.ATG" 
+				pexpr = expr; 
+				break;
+			}
+			case 76: case 83: {
+				if (la.kind == 83) {
+					lexer.NextToken();
+				} else if (la.kind == 76) {
+					lexer.NextToken();
+				} else SynErr(218);
+				Expect(25);
+				Expr(
+#line  1525 "VBNET.ATG" 
+out expr);
+				Expect(12);
+				TypeName(
+#line  1525 "VBNET.ATG" 
+out type);
+				Expect(26);
+
+#line  1525 "VBNET.ATG" 
+				pexpr = new CastExpression(type, expr); 
+				break;
+			}
+			case 60: case 61: case 62: case 63: case 64: case 65: case 67: case 69: case 70: case 73: case 74: case 75: {
+				CastTarget(
+#line  1526 "VBNET.ATG" 
+out type);
+				Expect(25);
+				Expr(
+#line  1526 "VBNET.ATG" 
+out expr);
+				Expect(26);
+
+#line  1526 "VBNET.ATG" 
+				pexpr = new CastExpression(type, expr, true); 
+				break;
+			}
+			case 44: {
+				lexer.NextToken();
+				Expr(
+#line  1527 "VBNET.ATG" 
+out expr);
+
+#line  1527 "VBNET.ATG" 
+				pexpr = new AddressOfExpression(expr); 
+				break;
+			}
+			case 103: {
+				lexer.NextToken();
+				Expect(25);
+				TypeName(
+#line  1528 "VBNET.ATG" 
+out type);
+				Expect(26);
+
+#line  1528 "VBNET.ATG" 
+				pexpr = new GetTypeExpression(type); 
+				break;
+			}
+			case 177: {
+				lexer.NextToken();
+				SimpleExpr(
+#line  1529 "VBNET.ATG" 
+out expr);
+				Expect(114);
+				TypeName(
+#line  1529 "VBNET.ATG" 
+out type);
+
+#line  1529 "VBNET.ATG" 
+				pexpr = new TypeOfExpression(expr, type); 
+				break;
+			}
+			}
+			while (la.kind == 10 || la.kind == 25) {
+				if (la.kind == 10) {
+					lexer.NextToken();
+					IdentifierOrKeyword(
+#line  1532 "VBNET.ATG" 
+out name);
+
+#line  1532 "VBNET.ATG" 
+					pexpr = new FieldReferenceOrInvocationExpression(pexpr, name); 
+				} else {
+					lexer.NextToken();
+
+#line  1533 "VBNET.ATG" 
+					ArrayList parameters = new ArrayList(); 
+					if (StartOf(21)) {
+
+#line  1535 "VBNET.ATG" 
+						expr = null; 
+						if (StartOf(18)) {
+							Argument(
+#line  1535 "VBNET.ATG" 
+out expr);
+						}
+
+#line  1535 "VBNET.ATG" 
+						parameters.Add(expr); 
+						while (la.kind == 12) {
+							lexer.NextToken();
+
+#line  1537 "VBNET.ATG" 
+							expr = null; 
+							if (StartOf(18)) {
+								Argument(
+#line  1538 "VBNET.ATG" 
+out expr);
+							}
+
+#line  1538 "VBNET.ATG" 
+							parameters.Add(expr); 
+						}
+					}
+					Expect(26);
+
+#line  1541 "VBNET.ATG" 
+					pexpr = new InvocationExpression(pexpr, parameters); 
+				}
+			}
+		} else if (la.kind == 10) {
+			lexer.NextToken();
+			IdentifierOrKeyword(
+#line  1545 "VBNET.ATG" 
+out name);
+
+#line  1545 "VBNET.ATG" 
+			pexpr = new FieldReferenceOrInvocationExpression(pexpr, name);
+			while (la.kind == 10 || la.kind == 25) {
+				if (la.kind == 10) {
+					lexer.NextToken();
+					IdentifierOrKeyword(
+#line  1547 "VBNET.ATG" 
+out name);
+
+#line  1547 "VBNET.ATG" 
+					pexpr = new FieldReferenceOrInvocationExpression(pexpr, name); 
+				} else {
+					lexer.NextToken();
+
+#line  1548 "VBNET.ATG" 
+					ArrayList parameters = new ArrayList(); 
+					if (StartOf(21)) {
+
+#line  1550 "VBNET.ATG" 
+						expr = null; 
+						if (StartOf(18)) {
+							Argument(
+#line  1550 "VBNET.ATG" 
+out expr);
+						}
+
+#line  1550 "VBNET.ATG" 
+						parameters.Add(expr); 
+						while (la.kind == 12) {
+							lexer.NextToken();
+
+#line  1552 "VBNET.ATG" 
+							expr = null; 
+							if (StartOf(18)) {
+								Argument(
+#line  1553 "VBNET.ATG" 
+out expr);
+							}
+
+#line  1553 "VBNET.ATG" 
+							parameters.Add(expr); 
+						}
+					}
+					Expect(26);
+
+#line  1556 "VBNET.ATG" 
+					pexpr = new InvocationExpression(pexpr, parameters); 
+				}
+			}
+		} else SynErr(219);
+	}
+
+	void IdentifierOrKeyword(
+#line  2547 "VBNET.ATG" 
+out string name) {
+
+#line  2549 "VBNET.ATG" 
+		name = String.Empty;
+		
+		switch (la.kind) {
+		case 2: case 52: case 71: case 171: {
+			Identifier();
+
+#line  2551 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 43: {
+			lexer.NextToken();
+
+#line  2552 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 44: {
+			lexer.NextToken();
+
+#line  2553 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 45: {
+			lexer.NextToken();
+
+#line  2554 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 46: {
+			lexer.NextToken();
+
+#line  2555 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 47: {
+			lexer.NextToken();
+
+#line  2556 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 48: {
+			lexer.NextToken();
+
+#line  2557 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 49: {
+			lexer.NextToken();
+
+#line  2558 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 50: {
+			lexer.NextToken();
+
+#line  2559 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 51: {
+			lexer.NextToken();
+
+#line  2560 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 53: {
+			lexer.NextToken();
+
+#line  2561 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 54: {
+			lexer.NextToken();
+
+#line  2562 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 55: {
+			lexer.NextToken();
+
+#line  2563 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 56: {
+			lexer.NextToken();
+
+#line  2564 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 57: {
+			lexer.NextToken();
+
+#line  2565 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 58: {
+			lexer.NextToken();
+
+#line  2566 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 59: {
+			lexer.NextToken();
+
+#line  2567 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 60: {
+			lexer.NextToken();
+
+#line  2568 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 61: {
+			lexer.NextToken();
+
+#line  2569 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 62: {
+			lexer.NextToken();
+
+#line  2570 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 63: {
+			lexer.NextToken();
+
+#line  2571 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 64: {
+			lexer.NextToken();
+
+#line  2572 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 65: {
+			lexer.NextToken();
+
+#line  2573 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 66: {
+			lexer.NextToken();
+
+#line  2574 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 67: {
+			lexer.NextToken();
+
+#line  2575 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 68: {
+			lexer.NextToken();
+
+#line  2576 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 69: {
+			lexer.NextToken();
+
+#line  2577 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 70: {
+			lexer.NextToken();
+
+#line  2578 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 72: {
+			lexer.NextToken();
+
+#line  2579 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 73: {
+			lexer.NextToken();
+
+#line  2580 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 74: {
+			lexer.NextToken();
+
+#line  2581 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 75: {
+			lexer.NextToken();
+
+#line  2582 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 76: {
+			lexer.NextToken();
+
+#line  2583 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 77: {
+			lexer.NextToken();
+
+#line  2584 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 78: {
+			lexer.NextToken();
+
+#line  2585 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 79: {
+			lexer.NextToken();
+
+#line  2586 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 80: {
+			lexer.NextToken();
+
+#line  2587 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 81: {
+			lexer.NextToken();
+
+#line  2588 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 82: {
+			lexer.NextToken();
+
+#line  2589 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 83: {
+			lexer.NextToken();
+
+#line  2590 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 84: {
+			lexer.NextToken();
+
+#line  2591 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 85: {
+			lexer.NextToken();
+
+#line  2592 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 86: {
+			lexer.NextToken();
+
+#line  2593 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 87: {
+			lexer.NextToken();
+
+#line  2594 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 88: {
+			lexer.NextToken();
+
+#line  2595 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 89: {
+			lexer.NextToken();
+
+#line  2596 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 90: {
+			lexer.NextToken();
+
+#line  2597 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 91: {
+			lexer.NextToken();
+
+#line  2598 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 92: {
+			lexer.NextToken();
+
+#line  2599 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 93: {
+			lexer.NextToken();
+
+#line  2600 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 94: {
+			lexer.NextToken();
+
+#line  2601 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 95: {
+			lexer.NextToken();
+
+#line  2602 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 97: {
+			lexer.NextToken();
+
+#line  2603 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 98: {
+			lexer.NextToken();
+
+#line  2604 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 99: {
+			lexer.NextToken();
+
+#line  2605 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 100: {
+			lexer.NextToken();
+
+#line  2606 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 101: {
+			lexer.NextToken();
+
+#line  2607 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 102: {
+			lexer.NextToken();
+
+#line  2608 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 103: {
+			lexer.NextToken();
+
+#line  2609 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 104: {
+			lexer.NextToken();
+
+#line  2610 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 105: {
+			lexer.NextToken();
+
+#line  2611 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 106: {
+			lexer.NextToken();
+
+#line  2612 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 107: {
+			lexer.NextToken();
+
+#line  2613 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 108: {
+			lexer.NextToken();
+
+#line  2614 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 109: {
+			lexer.NextToken();
+
+#line  2615 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 110: {
+			lexer.NextToken();
+
+#line  2616 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 111: {
+			lexer.NextToken();
+
+#line  2617 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 112: {
+			lexer.NextToken();
+
+#line  2618 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 113: {
+			lexer.NextToken();
+
+#line  2619 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 114: {
+			lexer.NextToken();
+
+#line  2620 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 115: {
+			lexer.NextToken();
+
+#line  2621 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 116: {
+			lexer.NextToken();
+
+#line  2622 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 117: {
+			lexer.NextToken();
+
+#line  2623 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 118: {
+			lexer.NextToken();
+
+#line  2624 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 119: {
+			lexer.NextToken();
+
+#line  2625 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 120: {
+			lexer.NextToken();
+
+#line  2626 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 121: {
+			lexer.NextToken();
+
+#line  2627 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 122: {
+			lexer.NextToken();
+
+#line  2628 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 123: {
+			lexer.NextToken();
+
+#line  2629 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 124: {
+			lexer.NextToken();
+
+#line  2630 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 125: {
+			lexer.NextToken();
+
+#line  2631 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 126: {
+			lexer.NextToken();
+
+#line  2632 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 127: {
+			lexer.NextToken();
+
+#line  2633 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 128: {
+			lexer.NextToken();
+
+#line  2634 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 129: {
+			lexer.NextToken();
+
+#line  2635 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 130: {
+			lexer.NextToken();
+
+#line  2636 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 131: {
+			lexer.NextToken();
+
+#line  2637 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 132: {
+			lexer.NextToken();
+
+#line  2638 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 133: {
+			lexer.NextToken();
+
+#line  2639 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 134: {
+			lexer.NextToken();
+
+#line  2640 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 136: {
+			lexer.NextToken();
+
+#line  2641 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 137: {
+			lexer.NextToken();
+
+#line  2642 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 138: {
+			lexer.NextToken();
+
+#line  2643 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 139: {
+			lexer.NextToken();
+
+#line  2644 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 140: {
+			lexer.NextToken();
+
+#line  2645 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 141: {
+			lexer.NextToken();
+
+#line  2646 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 142: {
+			lexer.NextToken();
+
+#line  2647 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 144: {
+			lexer.NextToken();
+
+#line  2648 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 145: {
+			lexer.NextToken();
+
+#line  2649 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 146: {
+			lexer.NextToken();
+
+#line  2650 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 147: {
+			lexer.NextToken();
+
+#line  2651 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 148: {
+			lexer.NextToken();
+
+#line  2652 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 149: {
+			lexer.NextToken();
+
+#line  2653 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 150: {
+			lexer.NextToken();
+
+#line  2654 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 151: {
+			lexer.NextToken();
+
+#line  2655 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 152: {
+			lexer.NextToken();
+
+#line  2656 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 153: {
+			lexer.NextToken();
+
+#line  2657 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 154: {
+			lexer.NextToken();
+
+#line  2658 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 155: {
+			lexer.NextToken();
+
+#line  2659 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 156: {
+			lexer.NextToken();
+
+#line  2660 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 157: {
+			lexer.NextToken();
+
+#line  2661 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 158: {
+			lexer.NextToken();
+
+#line  2662 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 159: {
+			lexer.NextToken();
+
+#line  2663 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 160: {
+			lexer.NextToken();
+
+#line  2664 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 161: {
+			lexer.NextToken();
+
+#line  2665 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 162: {
+			lexer.NextToken();
+
+#line  2666 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 163: {
+			lexer.NextToken();
+
+#line  2667 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 164: {
+			lexer.NextToken();
+
+#line  2668 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 165: {
+			lexer.NextToken();
+
+#line  2669 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 167: {
+			lexer.NextToken();
+
+#line  2670 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 168: {
+			lexer.NextToken();
+
+#line  2671 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 169: {
+			lexer.NextToken();
+
+#line  2672 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 170: {
+			lexer.NextToken();
+
+#line  2673 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 172: {
+			lexer.NextToken();
+
+#line  2674 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 173: {
+			lexer.NextToken();
+
+#line  2675 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 174: {
+			lexer.NextToken();
+
+#line  2676 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 175: {
+			lexer.NextToken();
+
+#line  2677 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 176: {
+			lexer.NextToken();
+
+#line  2678 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 177: {
+			lexer.NextToken();
+
+#line  2679 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 178: {
+			lexer.NextToken();
+
+#line  2680 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 179: {
+			lexer.NextToken();
+
+#line  2681 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 180: {
+			lexer.NextToken();
+
+#line  2682 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 181: {
+			lexer.NextToken();
+
+#line  2683 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 182: {
+			lexer.NextToken();
+
+#line  2684 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 183: {
+			lexer.NextToken();
+
+#line  2685 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 184: {
+			lexer.NextToken();
+
+#line  2686 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 185: {
+			lexer.NextToken();
+
+#line  2687 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 186: {
+			lexer.NextToken();
+
+#line  2688 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		case 187: {
+			lexer.NextToken();
+
+#line  2689 "VBNET.ATG" 
+			name = t.val; 
+			break;
+		}
+		default: SynErr(220); break;
+		}
+	}
+
+	void CastTarget(
+#line  1563 "VBNET.ATG" 
+out TypeReference type) {
+
+#line  1565 "VBNET.ATG" 
+		type = null;
+		
+		switch (la.kind) {
+		case 60: {
+			lexer.NextToken();
+
+#line  1567 "VBNET.ATG" 
+			type = new TypeReference("System.Boolean"); 
+			break;
+		}
+		case 61: {
+			lexer.NextToken();
+
+#line  1568 "VBNET.ATG" 
+			type = new TypeReference("System.Byte"); 
+			break;
+		}
+		case 62: {
+			lexer.NextToken();
+
+#line  1569 "VBNET.ATG" 
+			type = new TypeReference("System.Char"); 
+			break;
+		}
+		case 63: {
+			lexer.NextToken();
+
+#line  1570 "VBNET.ATG" 
+			type = new TypeReference("System.DateTime"); 
+			break;
+		}
+		case 65: {
+			lexer.NextToken();
+
+#line  1571 "VBNET.ATG" 
+			type = new TypeReference("System.Decimal"); 
+			break;
+		}
+		case 64: {
+			lexer.NextToken();
+
+#line  1572 "VBNET.ATG" 
+			type = new TypeReference("System.Double"); 
+			break;
+		}
+		case 67: {
+			lexer.NextToken();
+
+#line  1573 "VBNET.ATG" 
+			type = new TypeReference("System.Int32"); 
+			break;
+		}
+		case 69: {
+			lexer.NextToken();
+
+#line  1574 "VBNET.ATG" 
+			type = new TypeReference("System.Int64"); 
+			break;
+		}
+		case 70: {
+			lexer.NextToken();
+
+#line  1575 "VBNET.ATG" 
+			type = new TypeReference("System.Object"); 
+			break;
+		}
+		case 73: {
+			lexer.NextToken();
+
+#line  1576 "VBNET.ATG" 
+			type = new TypeReference("System.Int16"); 
+			break;
+		}
+		case 74: {
+			lexer.NextToken();
+
+#line  1577 "VBNET.ATG" 
+			type = new TypeReference("System.Single"); 
+			break;
+		}
+		case 75: {
+			lexer.NextToken();
+
+#line  1578 "VBNET.ATG" 
+			type = new TypeReference("System.String"); 
+			break;
+		}
+		default: SynErr(221); break;
+		}
+	}
+
+	void Argument(
+#line  1743 "VBNET.ATG" 
+out Expression argumentexpr) {
+
+#line  1745 "VBNET.ATG" 
+		Expression expr;
+		argumentexpr = null;
+		string name;
+		
+		if (
+#line  1749 "VBNET.ATG" 
+IsNamedAssign()) {
+			Identifier();
+
+#line  1749 "VBNET.ATG" 
+			name = t.val;  
+			Expect(13);
+			Expect(11);
+			Expr(
+#line  1749 "VBNET.ATG" 
+out expr);
+
+#line  1751 "VBNET.ATG" 
+			argumentexpr = new NamedArgumentExpression(name, expr);
+			
+		} else if (StartOf(18)) {
+			Expr(
+#line  1754 "VBNET.ATG" 
+out argumentexpr);
+		} else SynErr(222);
+	}
+
+	void ConditionalAndExpr(
+#line  1586 "VBNET.ATG" 
+out Expression outExpr) {
+
+#line  1587 "VBNET.ATG" 
+		Expression expr; 
+		InclusiveOrExpr(
+#line  1588 "VBNET.ATG" 
+out outExpr);
+		while (la.kind == 47) {
+			lexer.NextToken();
+			InclusiveOrExpr(
+#line  1588 "VBNET.ATG" 
+out expr);
+
+#line  1588 "VBNET.ATG" 
+			outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BooleanAnd, expr);  
+		}
+	}
+
+	void InclusiveOrExpr(
+#line  1591 "VBNET.ATG" 
+out Expression outExpr) {
+
+#line  1592 "VBNET.ATG" 
+		Expression expr; 
+		ExclusiveOrExpr(
+#line  1593 "VBNET.ATG" 
+out outExpr);
+		while (la.kind == 187) {
+			lexer.NextToken();
+			ExclusiveOrExpr(
+#line  1593 "VBNET.ATG" 
+out expr);
+
+#line  1593 "VBNET.ATG" 
+			outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.ExclusiveOr, expr);  
+		}
+	}
+
+	void ExclusiveOrExpr(
+#line  1596 "VBNET.ATG" 
+out Expression outExpr) {
+
+#line  1597 "VBNET.ATG" 
+		Expression expr; 
+		AndExpr(
+#line  1598 "VBNET.ATG" 
+out outExpr);
+		while (la.kind == 139) {
+			lexer.NextToken();
+			AndExpr(
+#line  1598 "VBNET.ATG" 
+out expr);
+
+#line  1598 "VBNET.ATG" 
+			outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BitwiseOr, expr);  
+		}
+	}
+
+	void AndExpr(
+#line  1601 "VBNET.ATG" 
+out Expression outExpr) {
+
+#line  1602 "VBNET.ATG" 
+		Expression expr; 
+		NotExpr(
+#line  1603 "VBNET.ATG" 
+out outExpr);
+		while (la.kind == 46) {
+			lexer.NextToken();
+			NotExpr(
+#line  1603 "VBNET.ATG" 
+out expr);
+
+#line  1603 "VBNET.ATG" 
+			outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BitwiseAnd, expr);  
+		}
+	}
+
+	void NotExpr(
+#line  1606 "VBNET.ATG" 
+out Expression outExpr) {
+
+#line  1607 "VBNET.ATG" 
+		UnaryOperatorType uop = UnaryOperatorType.None; 
+		while (la.kind == 130) {
+			lexer.NextToken();
+
+#line  1608 "VBNET.ATG" 
+			uop = UnaryOperatorType.Not; 
+		}
+		EqualityExpr(
+#line  1609 "VBNET.ATG" 
+out outExpr);
+
+#line  1610 "VBNET.ATG" 
+		if (uop != UnaryOperatorType.None)
+		outExpr = new UnaryOperatorExpression(outExpr, uop);
+		
+	}
+
+	void EqualityExpr(
+#line  1615 "VBNET.ATG" 
+out Expression outExpr) {
+
+#line  1617 "VBNET.ATG" 
+		Expression expr;
+		BinaryOperatorType op = BinaryOperatorType.None;
+		
+		RelationalExpr(
+#line  1620 "VBNET.ATG" 
+out outExpr);
+		while (la.kind == 11 || la.kind == 29 || la.kind == 117) {
+			if (la.kind == 29) {
+				lexer.NextToken();
+
+#line  1623 "VBNET.ATG" 
+				op = BinaryOperatorType.InEquality; 
+			} else if (la.kind == 11) {
+				lexer.NextToken();
+
+#line  1624 "VBNET.ATG" 
+				op = BinaryOperatorType.Equality; 
+			} else {
+				lexer.NextToken();
+
+#line  1625 "VBNET.ATG" 
+				op = BinaryOperatorType.Like; 
+			}
+			RelationalExpr(
+#line  1627 "VBNET.ATG" 
+out expr);
+
+#line  1627 "VBNET.ATG" 
+			outExpr = new BinaryOperatorExpression(outExpr, op, expr);  
+		}
+	}
+
+	void RelationalExpr(
+#line  1631 "VBNET.ATG" 
+out Expression outExpr) {
+
+#line  1633 "VBNET.ATG" 
+		Expression expr;
+		BinaryOperatorType op = BinaryOperatorType.None;
+		
+		ShiftExpr(
+#line  1636 "VBNET.ATG" 
+out outExpr);
+		while (StartOf(22)) {
+			if (StartOf(23)) {
+				if (la.kind == 28) {
+					lexer.NextToken();
+
+#line  1639 "VBNET.ATG" 
+					op = BinaryOperatorType.LessThan; 
+				} else if (la.kind == 27) {
+					lexer.NextToken();
+
+#line  1640 "VBNET.ATG" 
+					op = BinaryOperatorType.GreaterThan; 
+				} else if (la.kind == 31) {
+					lexer.NextToken();
+
+#line  1641 "VBNET.ATG" 
+					op = BinaryOperatorType.LessThanOrEqual; 
+				} else if (la.kind == 30) {
+					lexer.NextToken();
+
+#line  1642 "VBNET.ATG" 
+					op = BinaryOperatorType.GreaterThanOrEqual; 
+				} else SynErr(223);
+				ShiftExpr(
+#line  1644 "VBNET.ATG" 
+out expr);
+
+#line  1644 "VBNET.ATG" 
+				outExpr = new BinaryOperatorExpression(outExpr, op, expr);  
+			} else {
+				lexer.NextToken();
+
+#line  1647 "VBNET.ATG" 
+				op = BinaryOperatorType.IS; 
+				Expr(
+#line  1648 "VBNET.ATG" 
+out expr);
+
+#line  1648 "VBNET.ATG" 
+				outExpr = new BinaryOperatorExpression(outExpr, op, expr); 
+			}
+		}
+	}
+
+	void ShiftExpr(
+#line  1652 "VBNET.ATG" 
+out Expression outExpr) {
+
+#line  1654 "VBNET.ATG" 
+		Expression expr;
+		BinaryOperatorType op = BinaryOperatorType.None;
+		
+		AdditiveExpr(
+#line  1657 "VBNET.ATG" 
+out outExpr);
+		while (la.kind == 32 || la.kind == 33) {
+			if (la.kind == 32) {
+				lexer.NextToken();
+
+#line  1660 "VBNET.ATG" 
+				op = BinaryOperatorType.ShiftLeft; 
+			} else {
+				lexer.NextToken();
+
+#line  1661 "VBNET.ATG" 
+				op = BinaryOperatorType.ShiftRight; 
+			}
+			AdditiveExpr(
+#line  1663 "VBNET.ATG" 
+out expr);
+
+#line  1663 "VBNET.ATG" 
+			outExpr = new BinaryOperatorExpression(outExpr, op, expr);  
+		}
+	}
+
+	void AdditiveExpr(
+#line  1667 "VBNET.ATG" 
+out Expression outExpr) {
+
+#line  1669 "VBNET.ATG" 
+		Expression expr;
+		BinaryOperatorType op = BinaryOperatorType.None;
+		
+		MultiplicativeExpr(
+#line  1672 "VBNET.ATG" 
+out outExpr);
+		while (la.kind == 14 || la.kind == 15 || la.kind == 19) {
+			if (la.kind == 14) {
+				lexer.NextToken();
+
+#line  1675 "VBNET.ATG" 
+				op = BinaryOperatorType.Add; 
+			} else if (la.kind == 15) {
+				lexer.NextToken();
+
+#line  1676 "VBNET.ATG" 
+				op = BinaryOperatorType.Subtract; 
+			} else {
+				lexer.NextToken();
+
+#line  1677 "VBNET.ATG" 
+				op = BinaryOperatorType.Concat; 
+			}
+			MultiplicativeExpr(
+#line  1679 "VBNET.ATG" 
+out expr);
+
+#line  1679 "VBNET.ATG" 
+			outExpr = new BinaryOperatorExpression(outExpr, op, expr);  
+		}
+	}
+
+	void MultiplicativeExpr(
+#line  1683 "VBNET.ATG" 
+out Expression outExpr) {
+
+#line  1685 "VBNET.ATG" 
+		Expression expr;
+		BinaryOperatorType op = BinaryOperatorType.None;
+		
+		UnaryExpr(
+#line  1688 "VBNET.ATG" 
+out outExpr);
+		while (StartOf(24)) {
+			if (la.kind == 16) {
+				lexer.NextToken();
+
+#line  1691 "VBNET.ATG" 
+				op = BinaryOperatorType.Multiply; 
+			} else if (la.kind == 17) {
+				lexer.NextToken();
+
+#line  1692 "VBNET.ATG" 
+				op = BinaryOperatorType.Divide; 
+			} else if (la.kind == 18) {
+				lexer.NextToken();
+
+#line  1693 "VBNET.ATG" 
+				op = BinaryOperatorType.DivideInteger; 
+			} else if (la.kind == 121) {
+				lexer.NextToken();
+
+#line  1694 "VBNET.ATG" 
+				op = BinaryOperatorType.Modulus; 
+			} else {
+				lexer.NextToken();
+
+#line  1695 "VBNET.ATG" 
+				op = BinaryOperatorType.Power; 
+			}
+			UnaryExpr(
+#line  1697 "VBNET.ATG" 
+out expr);
+
+#line  1697 "VBNET.ATG" 
+			outExpr = new BinaryOperatorExpression(outExpr, op, expr); 
+		}
+	}
+
+	void ArrayTypeName(
+#line  1770 "VBNET.ATG" 
+out TypeReference typeref) {
+
+#line  1772 "VBNET.ATG" 
+		ArrayList rank = null;
+		
+		NonArrayTypeName(
+#line  1774 "VBNET.ATG" 
+out typeref);
+		ArrayInitializationModifiers(
+#line  1775 "VBNET.ATG" 
+out rank);
+
+#line  1777 "VBNET.ATG" 
+		typeref = new TypeReference(typeref == null ? "UNKNOWN" : typeref.Type, rank);
+		
+	}
+
+	void ArgumentList(
+#line  1728 "VBNET.ATG" 
+out ArrayList arguments) {
+
+#line  1730 "VBNET.ATG" 
+		arguments = new ArrayList();
+		Expression expr = null;
+		
+		if (StartOf(18)) {
+			Argument(
+#line  1734 "VBNET.ATG" 
+out expr);
+
+#line  1734 "VBNET.ATG" 
+			arguments.Add(expr); 
+			while (la.kind == 12) {
+				lexer.NextToken();
+				Argument(
+#line  1737 "VBNET.ATG" 
+out expr);
+
+#line  1737 "VBNET.ATG" 
+				arguments.Add(expr); 
+			}
+		}
+	}
+
+	void NonArrayTypeName(
+#line  1782 "VBNET.ATG" 
+out TypeReference typeref) {
+
+#line  1784 "VBNET.ATG" 
+		string name;
+		typeref = null;
+		
+		if (StartOf(9)) {
+			Qualident(
+#line  1787 "VBNET.ATG" 
+out name);
+
+#line  1787 "VBNET.ATG" 
+			typeref = new TypeReference(name); 
+		} else if (la.kind == 134) {
+			lexer.NextToken();
+
+#line  1788 "VBNET.ATG" 
+			typeref = new TypeReference("System.Object"); 
+		} else if (StartOf(25)) {
+			PrimitiveTypeName(
+#line  1789 "VBNET.ATG" 
+out name);
+
+#line  1789 "VBNET.ATG" 
+			typeref = new TypeReference(name); 
+		} else SynErr(224);
+	}
+
+	void ArrayInitializationModifiers(
+#line  1792 "VBNET.ATG" 
+out ArrayList arrayModifiers) {
+
+#line  1794 "VBNET.ATG" 
+		arrayModifiers = new ArrayList();
+		ArrayList dim = new ArrayList();
+		
+		while (
+#line  1798 "VBNET.ATG" 
+IsDims()) {
+			Expect(25);
+			if (StartOf(18)) {
+				InitializationRankList(
+#line  1799 "VBNET.ATG" 
+out dim);
+			}
+
+#line  1801 "VBNET.ATG" 
+			arrayModifiers.Add(dim);
+			
+			Expect(26);
+		}
+
+#line  1806 "VBNET.ATG" 
+		if(arrayModifiers.Count == 0) {
+		 arrayModifiers = null;
+		}
+		
+	}
+
+	void RankList(
+#line  1834 "VBNET.ATG" 
+out int i) {
+
+#line  1835 "VBNET.ATG" 
+		i = 0; 
+		while (la.kind == 12) {
+			lexer.NextToken();
+
+#line  1836 "VBNET.ATG" 
+			++i; 
+		}
+	}
+
+	void Attribute(
+#line  1861 "VBNET.ATG" 
+out ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute attribute) {
+
+#line  1862 "VBNET.ATG" 
+		string qualident; 
+		Qualident(
+#line  1863 "VBNET.ATG" 
+out qualident);
+
+#line  1865 "VBNET.ATG" 
+		ArrayList positional = new ArrayList();
+		ArrayList named      = new ArrayList();
+		string name = qualident;
+		
+		if (la.kind == 25) {
+			AttributeArguments(
+#line  1869 "VBNET.ATG" 
+ref positional, ref named);
+		}
+
+#line  1871 "VBNET.ATG" 
+		attribute  = new ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute(name, positional, named);
+		
+	}
+
+	void AttributeArguments(
+#line  1876 "VBNET.ATG" 
+ref ArrayList positional, ref ArrayList named) {
+
+#line  1878 "VBNET.ATG" 
+		bool nameFound = false;
+		string name = "";
+		Expression expr;
+		
+		Expect(25);
+		if (
+#line  1884 "VBNET.ATG" 
+IsNotClosingParenthesis()) {
+			if (
+#line  1886 "VBNET.ATG" 
+IsNamedAssign()) {
+
+#line  1886 "VBNET.ATG" 
+				nameFound = true; 
+				IdentifierOrKeyword(
+#line  1887 "VBNET.ATG" 
+out name);
+				if (la.kind == 13) {
+					lexer.NextToken();
+				}
+				Expect(11);
+			}
+			Expr(
+#line  1889 "VBNET.ATG" 
+out expr);
+
+#line  1891 "VBNET.ATG" 
+			if(name == "") positional.Add(expr);
+			else { named.Add(new NamedArgumentExpression(name, expr)); name = ""; }
+			
+			while (la.kind == 12) {
+				lexer.NextToken();
+				if (
+#line  1897 "VBNET.ATG" 
+IsNamedAssign()) {
+
+#line  1897 "VBNET.ATG" 
+					nameFound = true; 
+					IdentifierOrKeyword(
+#line  1898 "VBNET.ATG" 
+out name);
+					if (la.kind == 13) {
+						lexer.NextToken();
+					}
+					Expect(11);
+				} else if (StartOf(18)) {
+
+#line  1900 "VBNET.ATG" 
+					if (nameFound) Error("no positional argument after named argument"); 
+				} else SynErr(225);
+				Expr(
+#line  1901 "VBNET.ATG" 
+out expr);
+
+#line  1901 "VBNET.ATG" 
+				if(name == "") positional.Add(expr);
+				else { named.Add(new NamedArgumentExpression(name, expr)); name = ""; }
+				
+			}
+		}
+		Expect(26);
+	}
+
+	void FormalParameter(
+#line  1971 "VBNET.ATG" 
+out ParameterDeclarationExpression p) {
+
+#line  1973 "VBNET.ATG" 
+		TypeReference type = null;
+		ParamModifiers mod = new ParamModifiers(this);
+		Expression expr = null;
+		p = null;
+		ArrayList arrayModifiers = null;
+		
+		while (StartOf(26)) {
+			ParameterModifier(
+#line  1979 "VBNET.ATG" 
+mod);
+		}
+		Identifier();
+
+#line  1980 "VBNET.ATG" 
+		string parameterName = t.val; 
+		if (
+#line  1981 "VBNET.ATG" 
+IsRank()) {
+			ArrayTypeModifiers(
+#line  1981 "VBNET.ATG" 
+out arrayModifiers);
+		}
+		if (la.kind == 49) {
+			lexer.NextToken();
+			TypeName(
+#line  1982 "VBNET.ATG" 
+out type);
+		}
+
+#line  1984 "VBNET.ATG" 
+		if(type != null) {
+		if (arrayModifiers != null) {
+			if (type.RankSpecifier != null) {
+				Error("array rank only allowed one time");
+			} else {
+				type.RankSpecifier = arrayModifiers;
+			}
+		}
+		} else {
+			type = new TypeReference("System.Object", arrayModifiers);
+		}
+		
+		if (la.kind == 11) {
+			lexer.NextToken();
+			Expr(
+#line  1996 "VBNET.ATG" 
+out expr);
+		}
+
+#line  1998 "VBNET.ATG" 
+		mod.Check();
+		p = new ParameterDeclarationExpression(type, parameterName, mod, expr);
+		
+	}
+
+	void ParameterModifier(
+#line  2708 "VBNET.ATG" 
+ParamModifiers m) {
+		if (la.kind == 56) {
+			lexer.NextToken();
+
+#line  2709 "VBNET.ATG" 
+			m.Add(ParamModifier.ByVal); 
+		} else if (la.kind == 54) {
+			lexer.NextToken();
+
+#line  2710 "VBNET.ATG" 
+			m.Add(ParamModifier.ByRef); 
+		} else if (la.kind == 138) {
+			lexer.NextToken();
+
+#line  2711 "VBNET.ATG" 
+			m.Add(ParamModifier.Optional); 
+		} else if (la.kind == 145) {
+			lexer.NextToken();
+
+#line  2712 "VBNET.ATG" 
+			m.Add(ParamModifier.ParamArray); 
+		} else SynErr(226);
+	}
+
+	void Statement() {
+
+#line  2023 "VBNET.ATG" 
+		Statement stmt;
+		string label = String.Empty;
+		
+		
+		if (
+#line  2027 "VBNET.ATG" 
+IsLabel()) {
+			LabelName(
+#line  2027 "VBNET.ATG" 
+out label);
+
+#line  2029 "VBNET.ATG" 
+			labelStatement = new LabelStatement(t.val);
+			compilationUnit.AddChild(labelStatement);
+			
+			Expect(13);
+			if (StartOf(15)) {
+
+#line  2032 "VBNET.ATG" 
+				isLabel = true; 
+				Statement();
+			}
+		} else if (StartOf(27)) {
+			EmbeddedStatement(
+#line  2033 "VBNET.ATG" 
+out stmt);
+
+#line  2033 "VBNET.ATG" 
+			updateLabelStatement(stmt); 
+		} else if (StartOf(28)) {
+			LocalDeclarationStatement(
+#line  2034 "VBNET.ATG" 
+out stmt);
+
+#line  2034 "VBNET.ATG" 
+			updateLabelStatement(stmt); 
+		} else SynErr(227);
+	}
+
+	void LabelName(
+#line  2396 "VBNET.ATG" 
+out string name) {
+
+#line  2398 "VBNET.ATG" 
+		name = String.Empty;
+		
+		if (StartOf(9)) {
+			Identifier();
+
+#line  2400 "VBNET.ATG" 
+			name = t.val; 
+		} else if (la.kind == 5) {
+			lexer.NextToken();
+
+#line  2401 "VBNET.ATG" 
+			name = t.val; 
+		} else SynErr(228);
+	}
+
+	void EmbeddedStatement(
+#line  2071 "VBNET.ATG" 
+out Statement statement) {
+
+#line  2073 "VBNET.ATG" 
+		Statement embeddedStatement = null;
+		statement = null;
+		Expression expr = null;
+		string name = String.Empty;
+		ArrayList p = null;
+		
+		switch (la.kind) {
+		case 95: {
+			lexer.NextToken();
+
+#line  2079 "VBNET.ATG" 
+			ExitType exitType = ExitType.None; 
+			switch (la.kind) {
+			case 169: {
+				lexer.NextToken();
+
+#line  2081 "VBNET.ATG" 
+				exitType = ExitType.Sub; 
+				break;
+			}
+			case 101: {
+				lexer.NextToken();
+
+#line  2083 "VBNET.ATG" 
+				exitType = ExitType.Function; 
+				break;
+			}
+			case 148: {
+				lexer.NextToken();
+
+#line  2085 "VBNET.ATG" 
+				exitType = ExitType.Property; 
+				break;
+			}
+			case 84: {
+				lexer.NextToken();
+
+#line  2087 "VBNET.ATG" 
+				exitType = ExitType.Do; 
+				break;
+			}
+			case 99: {
+				lexer.NextToken();
+
+#line  2089 "VBNET.ATG" 
+				exitType = ExitType.For; 
+				break;
+			}
+			case 176: {
+				lexer.NextToken();
+
+#line  2091 "VBNET.ATG" 
+				exitType = ExitType.Try; 
+				break;
+			}
+			case 183: {
+				lexer.NextToken();
+
+#line  2093 "VBNET.ATG" 
+				exitType = ExitType.While; 
+				break;
+			}
+			case 157: {
+				lexer.NextToken();
+
+#line  2095 "VBNET.ATG" 
+				exitType = ExitType.Select; 
+				break;
+			}
+			default: SynErr(229); break;
+			}
+
+#line  2097 "VBNET.ATG" 
+			statement = new ExitStatement(exitType); 
+			break;
+		}
+		case 176: {
+			TryStatement(
+#line  2098 "VBNET.ATG" 
+out statement);
+			break;
+		}
+		case 173: {
+			lexer.NextToken();
+			if (StartOf(18)) {
+				Expr(
+#line  2100 "VBNET.ATG" 
+out expr);
+			}
+
+#line  2100 "VBNET.ATG" 
+			statement = new ThrowStatement(expr); 
+			break;
+		}
+		case 156: {
+			lexer.NextToken();
+			if (StartOf(18)) {
+				Expr(
+#line  2102 "VBNET.ATG" 
+out expr);
+			}
+
+#line  2102 "VBNET.ATG" 
+			statement = new ReturnStatement(expr); 
+			break;
+		}
+		case 170: {
+			lexer.NextToken();
+			Expr(
+#line  2104 "VBNET.ATG" 
+out expr);
+			EndOfStmt();
+			Block(
+#line  2104 "VBNET.ATG" 
+out embeddedStatement);
+			Expect(89);
+			Expect(170);
+
+#line  2105 "VBNET.ATG" 
+			statement = new LockStatement(expr, embeddedStatement); 
+			break;
+		}
+		case 151: {
+			lexer.NextToken();
+			Identifier();
+
+#line  2107 "VBNET.ATG" 
+			name = t.val; 
+			if (la.kind == 25) {
+				lexer.NextToken();
+				if (StartOf(17)) {
+					ArgumentList(
+#line  2108 "VBNET.ATG" 
+out p);
+				}
+				Expect(26);
+			}
+
+#line  2109 "VBNET.ATG" 
+			statement = new RaiseEventStatement(name, p); 
+			break;
+		}
+		case 184: {
+			WithStatement(
+#line  2111 "VBNET.ATG" 
+out statement);
+			break;
+		}
+		case 43: {
+			lexer.NextToken();
+
+#line  2113 "VBNET.ATG" 
+			Expression handlerExpr = null; 
+			Expr(
+#line  2114 "VBNET.ATG" 
+out expr);
+			Expect(12);
+			Expr(
+#line  2114 "VBNET.ATG" 
+out handlerExpr);
+
+#line  2116 "VBNET.ATG" 
+			statement = new AddHandlerStatement(expr, handlerExpr);
+			
+			break;
+		}
+		case 154: {
+			lexer.NextToken();
+
+#line  2119 "VBNET.ATG" 
+			Expression handlerExpr = null; 
+			Expr(
+#line  2120 "VBNET.ATG" 
+out expr);
+			Expect(12);
+			Expr(
+#line  2120 "VBNET.ATG" 
+out handlerExpr);
+
+#line  2122 "VBNET.ATG" 
+			statement = new RemoveHandlerStatement(expr, handlerExpr);
+			
+			break;
+		}
+		case 183: {
+			lexer.NextToken();
+			Expr(
+#line  2125 "VBNET.ATG" 
+out expr);
+			EndOfStmt();
+			Block(
+#line  2126 "VBNET.ATG" 
+out embeddedStatement);
+			Expect(89);
+			Expect(183);
+
+#line  2128 "VBNET.ATG" 
+			statement = new WhileStatement(expr, embeddedStatement);
+			
+			break;
+		}
+		case 84: {
+			lexer.NextToken();
+
+#line  2133 "VBNET.ATG" 
+			ConditionType conditionType = ConditionType.None;
+			
+			if (la.kind == 179 || la.kind == 183) {
+				WhileOrUntil(
+#line  2136 "VBNET.ATG" 
+out conditionType);
+				Expr(
+#line  2136 "VBNET.ATG" 
+out expr);
+				EndOfStmt();
+				Block(
+#line  2137 "VBNET.ATG" 
+out embeddedStatement);
+				Expect(119);
+
+#line  2140 "VBNET.ATG" 
+				statement = new DoLoopStatement(expr, embeddedStatement, conditionType, ConditionPosition.Start);
+				
+			} else if (la.kind == 1 || la.kind == 13) {
+				EndOfStmt();
+				Block(
+#line  2144 "VBNET.ATG" 
+out embeddedStatement);
+				Expect(119);
+				if (la.kind == 179 || la.kind == 183) {
+					WhileOrUntil(
+#line  2145 "VBNET.ATG" 
+out conditionType);
+					Expr(
+#line  2145 "VBNET.ATG" 
+out expr);
+				}
+
+#line  2147 "VBNET.ATG" 
+				statement = new DoLoopStatement(expr, embeddedStatement, conditionType, ConditionPosition.End);
+				
+			} else SynErr(230);
+			break;
+		}
+		case 99: {
+			lexer.NextToken();
+
+#line  2152 "VBNET.ATG" 
+			Expression group = null;
+			LoopControlVariableExpression loopControlExpr = null;
+			
+			if (la.kind == 86) {
+				lexer.NextToken();
+				LoopControlVariable(
+#line  2157 "VBNET.ATG" 
+out loopControlExpr);
+				Expect(110);
+				Expr(
+#line  2158 "VBNET.ATG" 
+out group);
+				EndOfStmt();
+				Block(
+#line  2159 "VBNET.ATG" 
+out embeddedStatement);
+				Expect(129);
+				if (StartOf(18)) {
+					Expr(
+#line  2160 "VBNET.ATG" 
+out expr);
+				}
+
+#line  2162 "VBNET.ATG" 
+				statement = new ForeachStatement(loopControlExpr, group, embeddedStatement, expr);
+				
+			} else if (StartOf(9)) {
+
+#line  2166 "VBNET.ATG" 
+				Expression start = null;
+				Expression end = null;
+				Expression step = null;
+				Expression nextExpr = null;
+				ArrayList nextExpressions = null;
+				
+				LoopControlVariable(
+#line  2172 "VBNET.ATG" 
+out loopControlExpr);
+				Expect(11);
+				Expr(
+#line  2173 "VBNET.ATG" 
+out start);
+				Expect(174);
+				Expr(
+#line  2173 "VBNET.ATG" 
+out end);
+				if (la.kind == 164) {
+					lexer.NextToken();
+					Expr(
+#line  2173 "VBNET.ATG" 
+out step);
+				}
+				EndOfStmt();
+				Block(
+#line  2174 "VBNET.ATG" 
+out embeddedStatement);
+				Expect(129);
+				if (StartOf(18)) {
+					Expr(
+#line  2177 "VBNET.ATG" 
+out nextExpr);
+
+#line  2177 "VBNET.ATG" 
+					nextExpressions = new ArrayList(); nextExpressions.Add(nextExpr); 
+					while (la.kind == 12) {
+						lexer.NextToken();
+						Expr(
+#line  2178 "VBNET.ATG" 
+out nextExpr);
+
+#line  2178 "VBNET.ATG" 
+						nextExpressions.Add(nextExpr); 
+					}
+				}
+
+#line  2181 "VBNET.ATG" 
+				statement = new ForStatement(loopControlExpr, start, end, step, embeddedStatement, nextExpressions);
+				
+			} else SynErr(231);
+			break;
+		}
+		case 93: {
+			lexer.NextToken();
+			Expr(
+#line  2185 "VBNET.ATG" 
+out expr);
+
+#line  2185 "VBNET.ATG" 
+			statement = new ErrorStatement(expr); 
+			break;
+		}
+		case 153: {
+			lexer.NextToken();
+
+#line  2187 "VBNET.ATG" 
+			Expression clause = null; 
+			if (la.kind == 146) {
+				lexer.NextToken();
+			}
+			Expr(
+#line  2188 "VBNET.ATG" 
+out clause);
+
+#line  2190 "VBNET.ATG" 
+			ArrayList clauses = new ArrayList();
+			clauses.Add(clause);
+			ReDimStatement reDimStatement = new ReDimStatement(clauses);
+			
+			while (la.kind == 12) {
+				lexer.NextToken();
+				Expr(
+#line  2194 "VBNET.ATG" 
+out clause);
+
+#line  2194 "VBNET.ATG" 
+				clauses.Add(clause); 
+			}
+			break;
+		}
+		case 92: {
+			lexer.NextToken();
+			Expr(
+#line  2197 "VBNET.ATG" 
+out expr);
+
+#line  2199 "VBNET.ATG" 
+			ArrayList arrays = new ArrayList();
+			arrays.Add(expr);
+			EraseStatement eraseStatement = new EraseStatement(arrays);
+			
+			
+			while (la.kind == 12) {
+				lexer.NextToken();
+				Expr(
+#line  2204 "VBNET.ATG" 
+out expr);
+
+#line  2204 "VBNET.ATG" 
+				arrays.Add(expr); 
+			}
+
+#line  2205 "VBNET.ATG" 
+			statement = eraseStatement; 
+			break;
+		}
+		case 165: {
+			lexer.NextToken();
+
+#line  2207 "VBNET.ATG" 
+			statement = new StopStatement(); 
+			break;
+		}
+		case 107: {
+			lexer.NextToken();
+			Expr(
+#line  2209 "VBNET.ATG" 
+out expr);
+			if (la.kind == 172) {
+				lexer.NextToken();
+			}
+			if (
+#line  2211 "VBNET.ATG" 
+IsEndStmtAhead()) {
+				Expect(89);
+
+#line  2211 "VBNET.ATG" 
+				statement = new IfStatement(expr, new EndStatement()); 
+			} else if (la.kind == 1 || la.kind == 13) {
+				EndOfStmt();
+				Block(
+#line  2214 "VBNET.ATG" 
+out embeddedStatement);
+
+#line  2216 "VBNET.ATG" 
+				ArrayList elseIfSections = new ArrayList();
+				IfStatement ifStatement = new IfStatement(expr, embeddedStatement);
+				
+				while (la.kind == 88 || 
+#line  2221 "VBNET.ATG" 
+IsElseIf()) {
+					if (
+#line  2221 "VBNET.ATG" 
+IsElseIf()) {
+						Expect(87);
+						Expect(107);
+					} else {
+						lexer.NextToken();
+					}
+
+#line  2224 "VBNET.ATG" 
+					Expression condition = null; Statement block = null; 
+					Expr(
+#line  2225 "VBNET.ATG" 
+out condition);
+					if (la.kind == 172) {
+						lexer.NextToken();
+					}
+					EndOfStmt();
+					Block(
+#line  2226 "VBNET.ATG" 
+out block);
+
+#line  2228 "VBNET.ATG" 
+					ElseIfSection elseIfSection = new ElseIfSection(condition, block);
+					elseIfSections.Add(elseIfSection);
+					
+				}
+				if (la.kind == 87) {
+					lexer.NextToken();
+					EndOfStmt();
+					Block(
+#line  2234 "VBNET.ATG" 
+out embeddedStatement);
+
+#line  2236 "VBNET.ATG" 
+					ifStatement.EmbeddedElseStatement = embeddedStatement;
+					
+				}
+				Expect(89);
+				Expect(107);
+
+#line  2240 "VBNET.ATG" 
+				ifStatement.ElseIfStatements = elseIfSections;
+				statement = ifStatement;
+				
+			} else if (StartOf(27)) {
+				EmbeddedStatement(
+#line  2244 "VBNET.ATG" 
+out embeddedStatement);
+
+#line  2246 "VBNET.ATG" 
+				SimpleIfStatement ifStatement = new SimpleIfStatement(expr);
+				ArrayList statements = new ArrayList();
+				statements.Add(embeddedStatement);
+				ifStatement.Statements = statements;
+				
+				while (la.kind == 13) {
+					lexer.NextToken();
+					EmbeddedStatement(
+#line  2251 "VBNET.ATG" 
+out embeddedStatement);
+
+#line  2251 "VBNET.ATG" 
+					statements.Add(embeddedStatement); 
+				}
+				if (la.kind == 87) {
+					lexer.NextToken();
+					if (StartOf(27)) {
+						EmbeddedStatement(
+#line  2253 "VBNET.ATG" 
+out embeddedStatement);
+					}
+
+#line  2255 "VBNET.ATG" 
+					ArrayList elseStatements = new ArrayList();
+					elseStatements.Add(embeddedStatement);
+					ifStatement.ElseStatements = elseStatements;
+					
+					while (la.kind == 13) {
+						lexer.NextToken();
+						EmbeddedStatement(
+#line  2260 "VBNET.ATG" 
+out embeddedStatement);
+
+#line  2261 "VBNET.ATG" 
+						elseStatements.Add(embeddedStatement); 
+					}
+				}
+
+#line  2264 "VBNET.ATG" 
+				statement = ifStatement; 
+			} else SynErr(232);
+			break;
+		}
+		case 157: {
+			lexer.NextToken();
+			if (la.kind == 58) {
+				lexer.NextToken();
+			}
+			Expr(
+#line  2267 "VBNET.ATG" 
+out expr);
+			EndOfStmt();
+
+#line  2269 "VBNET.ATG" 
+			ArrayList selectSections = new ArrayList();
+			Statement block = null;
+			
+			while (la.kind == 58) {
+
+#line  2273 "VBNET.ATG" 
+				ArrayList caseClauses = null; 
+				lexer.NextToken();
+				CaseClauses(
+#line  2274 "VBNET.ATG" 
+out caseClauses);
+				if (
+#line  2274 "VBNET.ATG" 
+IsNotStatementSeparator()) {
+					lexer.NextToken();
+				}
+				EndOfStmt();
+
+#line  2276 "VBNET.ATG" 
+				SelectSection selectSection = new SelectSection();
+				selectSection.CaseClauses = caseClauses;
+				compilationUnit.BlockStart(selectSection);
+				
+				Block(
+#line  2280 "VBNET.ATG" 
+out block);
+
+#line  2282 "VBNET.ATG" 
+				selectSection.EmbeddedStatement = block;
+				compilationUnit.BlockEnd();
+				selectSections.Add(selectSection);
+				
+			}
+
+#line  2287 "VBNET.ATG" 
+			statement = new SelectStatement(expr, selectSections); 
+			Expect(89);
+			Expect(157);
+			break;
+		}
+		case 136: {
+
+#line  2289 "VBNET.ATG" 
+			OnErrorStatement onErrorStatement = null; 
+			OnErrorStatement(
+#line  2290 "VBNET.ATG" 
+out onErrorStatement);
+
+#line  2290 "VBNET.ATG" 
+			statement = onErrorStatement; 
+			break;
+		}
+		case 105: {
+
+#line  2291 "VBNET.ATG" 
+			GoToStatement goToStatement = null; 
+			GoToStatement(
+#line  2292 "VBNET.ATG" 
+out goToStatement);
+
+#line  2292 "VBNET.ATG" 
+			statement = goToStatement; 
+			break;
+		}
+		case 155: {
+
+#line  2293 "VBNET.ATG" 
+			ResumeStatement resumeStatement = null; 
+			ResumeStatement(
+#line  2294 "VBNET.ATG" 
+out resumeStatement);
+
+#line  2294 "VBNET.ATG" 
+			statement = resumeStatement; 
+			break;
+		}
+		case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 14: case 15: case 16: case 25: case 44: case 52: case 53: case 55: case 60: case 61: case 62: case 63: case 64: case 65: case 66: case 67: case 69: case 70: case 71: case 73: case 74: case 75: case 76: case 77: case 78: case 83: case 85: case 97: case 103: case 112: case 118: case 120: case 125: case 126: case 128: case 131: case 161: case 162: case 167: case 171: case 175: case 177: {
+
+#line  2297 "VBNET.ATG" 
+			Expression val = null;
+			AssignmentOperatorType op;
+			
+			bool mustBeAssignment = la.kind == Tokens.Plus  || la.kind == Tokens.Minus ||
+			                        la.kind == Tokens.Not   || la.kind == Tokens.Times;
+			
+			UnaryExpr(
+#line  2303 "VBNET.ATG" 
+out expr);
+			if (StartOf(14)) {
+				AssignmentOperator(
+#line  2305 "VBNET.ATG" 
+out op);
+				Expr(
+#line  2305 "VBNET.ATG" 
+out val);
+
+#line  2305 "VBNET.ATG" 
+				expr = new AssignmentExpression(expr, op, val); 
+			} else if (la.kind == 1 || la.kind == 13 || la.kind == 87) {
+
+#line  2306 "VBNET.ATG" 
+				if (mustBeAssignment) Error("error in assignment."); 
+			} else SynErr(233);
+
+#line  2309 "VBNET.ATG" 
+			// a field reference expression that stands alone is a
+			// invocation expression without parantheses and arguments
+			if(expr is FieldReferenceOrInvocationExpression) {
+				expr = new InvocationExpression(expr, new ArrayList());
+			}
+			statement = new StatementExpression(expr);
+			
+			break;
+		}
+		case 57: {
+			lexer.NextToken();
+			UnaryExpr(
+#line  2316 "VBNET.ATG" 
+out expr);
+
+#line  2316 "VBNET.ATG" 
+			statement = new StatementExpression(expr); 
+			break;
+		}
+		default: SynErr(234); break;
+		}
+	}
+
+	void LocalDeclarationStatement(
+#line  2038 "VBNET.ATG" 
+out Statement statement) {
+
+#line  2040 "VBNET.ATG" 
+		Modifiers m = new Modifiers(this);
+		ArrayList vars = new ArrayList();
+		LocalVariableDeclaration localVariableDeclaration;
+		bool dimfound = false;
+		
+		while (la.kind == 72 || la.kind == 82 || la.kind == 163) {
+			if (la.kind == 72) {
+				lexer.NextToken();
+
+#line  2047 "VBNET.ATG" 
+				m.Add(Modifier.Constant); 
+			} else if (la.kind == 163) {
+				lexer.NextToken();
+
+#line  2048 "VBNET.ATG" 
+				m.Add(Modifier.Static); 
+			} else {
+				lexer.NextToken();
+
+#line  2049 "VBNET.ATG" 
+				dimfound = true; 
+			}
+		}
+
+#line  2052 "VBNET.ATG" 
+		if(dimfound && (m.Modifier & Modifier.Constant) != 0) {
+		Error("Dim is not allowed on constants.");
+		}
+		
+		if(m.isNone && dimfound == false) {
+			Error("Const, Dim or Static expected");
+		}
+		
+		localVariableDeclaration = new LocalVariableDeclaration(m.Modifier);
+		localVariableDeclaration.StartLocation = t.Location;
+		
+		VariableDeclarator(
+#line  2063 "VBNET.ATG" 
+vars);
+		while (la.kind == 12) {
+			lexer.NextToken();
+			VariableDeclarator(
+#line  2064 "VBNET.ATG" 
+vars);
+		}
+
+#line  2066 "VBNET.ATG" 
+		localVariableDeclaration.Variables = vars;
+		statement = localVariableDeclaration;
+		
+	}
+
+	void TryStatement(
+#line  2489 "VBNET.ATG" 
+out Statement tryStatement) {
+
+#line  2491 "VBNET.ATG" 
+		Statement blockStmt = null, finallyStmt = null;
+		ArrayList catchClauses = null;
+		
+		Expect(176);
+		EndOfStmt();
+		Block(
+#line  2495 "VBNET.ATG" 
+out blockStmt);
+		if (la.kind == 59 || la.kind == 89 || la.kind == 98) {
+			CatchClauses(
+#line  2497 "VBNET.ATG" 
+out catchClauses);
+			if (la.kind == 98) {
+				lexer.NextToken();
+				EndOfStmt();
+				Block(
+#line  2498 "VBNET.ATG" 
+out finallyStmt);
+			}
+		} else if (la.kind == 98) {
+			lexer.NextToken();
+			EndOfStmt();
+			Block(
+#line  2499 "VBNET.ATG" 
+out finallyStmt);
+		} else SynErr(235);
+		Expect(89);
+		Expect(176);
+
+#line  2503 "VBNET.ATG" 
+		tryStatement = new TryCatchStatement(blockStmt, catchClauses, finallyStmt);
+		
+	}
+
+	void WithStatement(
+#line  2467 "VBNET.ATG" 
+out Statement withStatement) {
+
+#line  2469 "VBNET.ATG" 
+		Statement blockStmt = null;
+		Expression expr = null;
+		
+		Expect(184);
+
+#line  2472 "VBNET.ATG" 
+		Point start = t.Location; 
+		Expr(
+#line  2473 "VBNET.ATG" 
+out expr);
+		EndOfStmt();
+
+#line  2475 "VBNET.ATG" 
+		withStatement = new WithStatement(expr);
+		withStatement.StartLocation = start;
+		withStatements.Push(withStatement);
+		
+		Block(
+#line  2479 "VBNET.ATG" 
+out blockStmt);
+
+#line  2481 "VBNET.ATG" 
+		((WithStatement)withStatement).Body = (BlockStatement)blockStmt;
+		withStatements.Pop();
+		
+		Expect(89);
+		Expect(184);
+
+#line  2485 "VBNET.ATG" 
+		withStatement.EndLocation = t.Location; 
+	}
+
+	void WhileOrUntil(
+#line  2460 "VBNET.ATG" 
+out ConditionType conditionType) {
+
+#line  2461 "VBNET.ATG" 
+		conditionType = ConditionType.None; 
+		if (la.kind == 183) {
+			lexer.NextToken();
+
+#line  2462 "VBNET.ATG" 
+			conditionType = ConditionType.While; 
+		} else if (la.kind == 179) {
+			lexer.NextToken();
+
+#line  2463 "VBNET.ATG" 
+			conditionType = ConditionType.Until; 
+		} else SynErr(236);
+	}
+
+	void LoopControlVariable(
+#line  2320 "VBNET.ATG" 
+out LoopControlVariableExpression loopExpr) {
+
+#line  2322 "VBNET.ATG" 
+		loopExpr = null;
+		//Expression expr = null;
+		TypeReference type = null;
+		ArrayList arrayModifiers = null;
+		string name;
+		
+		Qualident(
+#line  2328 "VBNET.ATG" 
+out name);
+		if (
+#line  2329 "VBNET.ATG" 
+IsRank()) {
+			ArrayTypeModifiers(
+#line  2329 "VBNET.ATG" 
+out arrayModifiers);
+		}
+		if (la.kind == 49) {
+			lexer.NextToken();
+			TypeName(
+#line  2330 "VBNET.ATG" 
+out type);
+
+#line  2330 "VBNET.ATG" 
+			if (name.IndexOf('.') > 0) { Error("No type def for 'for each' member indexer allowed."); } 
+		}
+
+#line  2332 "VBNET.ATG" 
+		if(type != null) {
+		if(type.RankSpecifier != null && arrayModifiers != null) {
+			Error("array rank only allowed one time");
+		} else {
+			type.RankSpecifier = arrayModifiers;
+		}
+		} else {
+			type = new TypeReference("Integer", arrayModifiers);
+		}
+		loopExpr = new LoopControlVariableExpression(name, type);
+		
+	}
+
+	void CaseClauses(
+#line  2416 "VBNET.ATG" 
+out ArrayList caseClauses) {
+
+#line  2418 "VBNET.ATG" 
+		caseClauses = null;
+		CaseClause caseClause = null;
+		
+		CaseClause(
+#line  2421 "VBNET.ATG" 
+out caseClause);
+
+#line  2423 "VBNET.ATG" 
+		caseClauses = new ArrayList();
+		caseClauses.Add(caseClause);
+		
+		while (la.kind == 12) {
+			lexer.NextToken();
+			CaseClause(
+#line  2426 "VBNET.ATG" 
+out caseClause);
+
+#line  2426 "VBNET.ATG" 
+			caseClauses.Add(caseClause); 
+		}
+	}
+
+	void OnErrorStatement(
+#line  2346 "VBNET.ATG" 
+out OnErrorStatement stmt) {
+
+#line  2348 "VBNET.ATG" 
+		stmt = null;
+		GoToStatement goToStatement = null;
+		
+		Expect(136);
+		Expect(93);
+		if (
+#line  2354 "VBNET.ATG" 
+IsNegativeLabelName()) {
+			Expect(105);
+			Expect(15);
+			Expect(5);
+
+#line  2356 "VBNET.ATG" 
+			long intLabel = Int64.Parse(t.val);
+			if(intLabel != 1) {
+				Error("invalid label in on error statement.");
+			}
+			stmt = new OnErrorStatement(new GoToStatement((intLabel * -1).ToString()));
+			
+		} else if (la.kind == 105) {
+			GoToStatement(
+#line  2362 "VBNET.ATG" 
+out goToStatement);
+
+#line  2364 "VBNET.ATG" 
+			string val = goToStatement.LabelName;
+			
+			// if value is numeric, make sure that is 0
+			try {
+				long intLabel = Int64.Parse(val);
+				if(intLabel != 0) {
+					Error("invalid label in on error statement.");
+				}
+			} catch {
+			}
+			stmt = new OnErrorStatement(goToStatement);
+			
+		} else if (la.kind == 155) {
+			lexer.NextToken();
+			Expect(129);
+
+#line  2378 "VBNET.ATG" 
+			stmt = new OnErrorStatement(new ResumeStatement(true));
+			
+		} else SynErr(237);
+	}
+
+	void GoToStatement(
+#line  2384 "VBNET.ATG" 
+out GoToStatement goToStatement) {
+
+#line  2386 "VBNET.ATG" 
+		string label = String.Empty;
+		
+		Expect(105);
+		LabelName(
+#line  2389 "VBNET.ATG" 
+out label);
+
+#line  2391 "VBNET.ATG" 
+		goToStatement = new GoToStatement(label);
+		
+	}
+
+	void ResumeStatement(
+#line  2405 "VBNET.ATG" 
+out ResumeStatement resumeStatement) {
+
+#line  2407 "VBNET.ATG" 
+		resumeStatement = null;
+		string label = String.Empty;
+		
+		if (
+#line  2410 "VBNET.ATG" 
+IsResumeNext()) {
+			Expect(155);
+			Expect(129);
+
+#line  2411 "VBNET.ATG" 
+			resumeStatement = new ResumeStatement(true); 
+		} else if (la.kind == 155) {
+			lexer.NextToken();
+			if (StartOf(29)) {
+				LabelName(
+#line  2412 "VBNET.ATG" 
+out label);
+			}
+
+#line  2412 "VBNET.ATG" 
+			resumeStatement = new ResumeStatement(label); 
+		} else SynErr(238);
+	}
+
+	void CaseClause(
+#line  2430 "VBNET.ATG" 
+out CaseClause caseClause) {
+
+#line  2432 "VBNET.ATG" 
+		Expression expr = null;
+		Expression sexpr = null;
+		BinaryOperatorType op = BinaryOperatorType.None;
+		caseClause = null;
+		
+		if (la.kind == 87) {
+			lexer.NextToken();
+
+#line  2438 "VBNET.ATG" 
+			caseClause = new CaseClause(true); 
+		} else if (StartOf(30)) {
+			if (la.kind == 114) {
+				lexer.NextToken();
+			}
+			switch (la.kind) {
+			case 28: {
+				lexer.NextToken();
+
+#line  2442 "VBNET.ATG" 
+				op = BinaryOperatorType.LessThan; 
+				break;
+			}
+			case 27: {
+				lexer.NextToken();
+
+#line  2443 "VBNET.ATG" 
+				op = BinaryOperatorType.GreaterThan; 
+				break;
+			}
+			case 31: {
+				lexer.NextToken();
+
+#line  2444 "VBNET.ATG" 
+				op = BinaryOperatorType.LessThanOrEqual; 
+				break;
+			}
+			case 30: {
+				lexer.NextToken();
+
+#line  2445 "VBNET.ATG" 
+				op = BinaryOperatorType.GreaterThanOrEqual; 
+				break;
+			}
+			case 11: {
+				lexer.NextToken();
+
+#line  2446 "VBNET.ATG" 
+				op = BinaryOperatorType.Equality; 
+				break;
+			}
+			case 29: {
+				lexer.NextToken();
+
+#line  2447 "VBNET.ATG" 
+				op = BinaryOperatorType.InEquality; 
+				break;
+			}
+			default: SynErr(239); break;
+			}
+			Expr(
+#line  2449 "VBNET.ATG" 
+out expr);
+
+#line  2451 "VBNET.ATG" 
+			caseClause = new CaseClause(op, expr);
+			
+		} else if (StartOf(18)) {
+			Expr(
+#line  2453 "VBNET.ATG" 
+out expr);
+			if (la.kind == 174) {
+				lexer.NextToken();
+				Expr(
+#line  2453 "VBNET.ATG" 
+out sexpr);
+			}
+
+#line  2455 "VBNET.ATG" 
+			caseClause = new CaseClause(expr, sexpr);
+			
+		} else SynErr(240);
+	}
+
+	void CatchClauses(
+#line  2508 "VBNET.ATG" 
+out ArrayList catchClauses) {
+
+#line  2510 "VBNET.ATG" 
+		catchClauses = new ArrayList();
+		TypeReference type = null;
+		Statement blockStmt = null;
+		Expression expr = null;
+		string name = String.Empty;
+		
+		while (la.kind == 59) {
+			lexer.NextToken();
+			if (StartOf(9)) {
+				Identifier();
+
+#line  2518 "VBNET.ATG" 
+				name = t.val; 
+				if (la.kind == 49) {
+					lexer.NextToken();
+					TypeName(
+#line  2518 "VBNET.ATG" 
+out type);
+				}
+			}
+			if (la.kind == 182) {
+				lexer.NextToken();
+				Expr(
+#line  2519 "VBNET.ATG" 
+out expr);
+			}
+			EndOfStmt();
+			Block(
+#line  2521 "VBNET.ATG" 
+out blockStmt);
+
+#line  2522 "VBNET.ATG" 
+			catchClauses.Add(new CatchClause(type, name, blockStmt, expr)); 
+		}
+	}
+
+
+
+	public void Parse(Lexer lexer)
+	{
+		this.errors = lexer.Errors;
+		this.lexer = lexer;
+		errors.SynErr = new ErrorCodeProc(SynErr);
+		lexer.NextToken();
+		VBNET();
+
+	}
+
+	void SynErr(int line, int col, int errorNumber)
+	{
+		errors.count++; 
+		string s;
+		switch (errorNumber) {
+			case 0: s = "EOF expected"; break;
+			case 1: s = "EOL expected"; break;
+			case 2: s = "ident expected"; break;
+			case 3: s = "LiteralString expected"; break;
+			case 4: s = "LiteralCharacter expected"; break;
+			case 5: s = "LiteralInteger expected"; break;
+			case 6: s = "LiteralDouble expected"; break;
+			case 7: s = "LiteralSingle expected"; break;
+			case 8: s = "LiteralDecimal expected"; break;
+			case 9: s = "LiteralDate expected"; break;
+			case 10: s = "\".\" expected"; break;
+			case 11: s = "\"=\" expected"; break;
+			case 12: s = "\",\" expected"; break;
+			case 13: s = "\":\" expected"; break;
+			case 14: s = "\"+\" expected"; break;
+			case 15: s = "\"-\" expected"; break;
+			case 16: s = "\"*\" expected"; break;
+			case 17: s = "\"/\" expected"; break;
+			case 18: s = "\"\\\\\" expected"; break;
+			case 19: s = "\"&\" expected"; break;
+			case 20: s = "\"^\" expected"; break;
+			case 21: s = "\"{\" expected"; break;
+			case 22: s = "\"}\" expected"; break;
+			case 23: s = "\"[\" expected"; break;
+			case 24: s = "\"]\" expected"; break;
+			case 25: s = "\"(\" expected"; break;
+			case 26: s = "\")\" expected"; break;
+			case 27: s = "\">\" expected"; break;
+			case 28: s = "\"<\" expected"; break;
+			case 29: s = "\"<>\" expected"; break;
+			case 30: s = "\">=\" expected"; break;
+			case 31: s = "\"<=\" expected"; break;
+			case 32: s = "\"<<\" expected"; break;
+			case 33: s = "\">>\" expected"; break;
+			case 34: s = "\"+=\" expected"; break;
+			case 35: s = "\"^=\" expected"; break;
+			case 36: s = "\"-=\" expected"; break;
+			case 37: s = "\"*=\" expected"; break;
+			case 38: s = "\"/=\" expected"; break;
+			case 39: s = "\"\\\\=\" expected"; break;
+			case 40: s = "\"<<=\" expected"; break;
+			case 41: s = "\">>=\" expected"; break;
+			case 42: s = "\"&=\" expected"; break;
+			case 43: s = "\"AddHandler\" expected"; break;
+			case 44: s = "\"AddressOf\" expected"; break;
+			case 45: s = "\"Alias\" expected"; break;
+			case 46: s = "\"And\" expected"; break;
+			case 47: s = "\"AndAlso\" expected"; break;
+			case 48: s = "\"Ansi\" expected"; break;
+			case 49: s = "\"As\" expected"; break;
+			case 50: s = "\"Assembly\" expected"; break;
+			case 51: s = "\"Auto\" expected"; break;
+			case 52: s = "\"Binary\" expected"; break;
+			case 53: s = "\"Boolean\" expected"; break;
+			case 54: s = "\"ByRef\" expected"; break;
+			case 55: s = "\"Byte\" expected"; break;
+			case 56: s = "\"ByVal\" expected"; break;
+			case 57: s = "\"Call\" expected"; break;
+			case 58: s = "\"Case\" expected"; break;
+			case 59: s = "\"Catch\" expected"; break;
+			case 60: s = "\"CBool\" expected"; break;
+			case 61: s = "\"CByte\" expected"; break;
+			case 62: s = "\"CChar\" expected"; break;
+			case 63: s = "\"CDate\" expected"; break;
+			case 64: s = "\"CDbl\" expected"; break;
+			case 65: s = "\"CDec\" expected"; break;
+			case 66: s = "\"Char\" expected"; break;
+			case 67: s = "\"CInt\" expected"; break;
+			case 68: s = "\"Class\" expected"; break;
+			case 69: s = "\"CLng\" expected"; break;
+			case 70: s = "\"CObj\" expected"; break;
+			case 71: s = "\"Compare\" expected"; break;
+			case 72: s = "\"Const\" expected"; break;
+			case 73: s = "\"CShort\" expected"; break;
+			case 74: s = "\"CSng\" expected"; break;
+			case 75: s = "\"CStr\" expected"; break;
+			case 76: s = "\"CType\" expected"; break;
+			case 77: s = "\"Date\" expected"; break;
+			case 78: s = "\"Decimal\" expected"; break;
+			case 79: s = "\"Declare\" expected"; break;
+			case 80: s = "\"Default\" expected"; break;
+			case 81: s = "\"Delegate\" expected"; break;
+			case 82: s = "\"Dim\" expected"; break;
+			case 83: s = "\"DirectCast\" expected"; break;
+			case 84: s = "\"Do\" expected"; break;
+			case 85: s = "\"Double\" expected"; break;
+			case 86: s = "\"Each\" expected"; break;
+			case 87: s = "\"Else\" expected"; break;
+			case 88: s = "\"ElseIf\" expected"; break;
+			case 89: s = "\"End\" expected"; break;
+			case 90: s = "\"EndIf\" expected"; break;
+			case 91: s = "\"Enum\" expected"; break;
+			case 92: s = "\"Erase\" expected"; break;
+			case 93: s = "\"Error\" expected"; break;
+			case 94: s = "\"Event\" expected"; break;
+			case 95: s = "\"Exit\" expected"; break;
+			case 96: s = "\"Explicit\" expected"; break;
+			case 97: s = "\"False\" expected"; break;
+			case 98: s = "\"Finally\" expected"; break;
+			case 99: s = "\"For\" expected"; break;
+			case 100: s = "\"Friend\" expected"; break;
+			case 101: s = "\"Function\" expected"; break;
+			case 102: s = "\"Get\" expected"; break;
+			case 103: s = "\"GetType\" expected"; break;
+			case 104: s = "\"GoSub\" expected"; break;
+			case 105: s = "\"GoTo\" expected"; break;
+			case 106: s = "\"Handles\" expected"; break;
+			case 107: s = "\"If\" expected"; break;
+			case 108: s = "\"Implements\" expected"; break;
+			case 109: s = "\"Imports\" expected"; break;
+			case 110: s = "\"In\" expected"; break;
+			case 111: s = "\"Inherits\" expected"; break;
+			case 112: s = "\"Integer\" expected"; break;
+			case 113: s = "\"Interface\" expected"; break;
+			case 114: s = "\"Is\" expected"; break;
+			case 115: s = "\"Let\" expected"; break;
+			case 116: s = "\"Lib\" expected"; break;
+			case 117: s = "\"Like\" expected"; break;
+			case 118: s = "\"Long\" expected"; break;
+			case 119: s = "\"Loop\" expected"; break;
+			case 120: s = "\"Me\" expected"; break;
+			case 121: s = "\"Mod\" expected"; break;
+			case 122: s = "\"Module\" expected"; break;
+			case 123: s = "\"MustInherit\" expected"; break;
+			case 124: s = "\"MustOverride\" expected"; break;
+			case 125: s = "\"MyBase\" expected"; break;
+			case 126: s = "\"MyClass\" expected"; break;
+			case 127: s = "\"Namespace\" expected"; break;
+			case 128: s = "\"New\" expected"; break;
+			case 129: s = "\"Next\" expected"; break;
+			case 130: s = "\"Not\" expected"; break;
+			case 131: s = "\"Nothing\" expected"; break;
+			case 132: s = "\"NotInheritable\" expected"; break;
+			case 133: s = "\"NotOverridable\" expected"; break;
+			case 134: s = "\"Object\" expected"; break;
+			case 135: s = "\"Off\" expected"; break;
+			case 136: s = "\"On\" expected"; break;
+			case 137: s = "\"Option\" expected"; break;
+			case 138: s = "\"Optional\" expected"; break;
+			case 139: s = "\"Or\" expected"; break;
+			case 140: s = "\"OrElse\" expected"; break;
+			case 141: s = "\"Overloads\" expected"; break;
+			case 142: s = "\"Overridable\" expected"; break;
+			case 143: s = "\"Override\" expected"; break;
+			case 144: s = "\"Overrides\" expected"; break;
+			case 145: s = "\"ParamArray\" expected"; break;
+			case 146: s = "\"Preserve\" expected"; break;
+			case 147: s = "\"Private\" expected"; break;
+			case 148: s = "\"Property\" expected"; break;
+			case 149: s = "\"Protected\" expected"; break;
+			case 150: s = "\"Public\" expected"; break;
+			case 151: s = "\"RaiseEvent\" expected"; break;
+			case 152: s = "\"ReadOnly\" expected"; break;
+			case 153: s = "\"ReDim\" expected"; break;
+			case 154: s = "\"RemoveHandler\" expected"; break;
+			case 155: s = "\"Resume\" expected"; break;
+			case 156: s = "\"Return\" expected"; break;
+			case 157: s = "\"Select\" expected"; break;
+			case 158: s = "\"Set\" expected"; break;
+			case 159: s = "\"Shadows\" expected"; break;
+			case 160: s = "\"Shared\" expected"; break;
+			case 161: s = "\"Short\" expected"; break;
+			case 162: s = "\"Single\" expected"; break;
+			case 163: s = "\"Static\" expected"; break;
+			case 164: s = "\"Step\" expected"; break;
+			case 165: s = "\"Stop\" expected"; break;
+			case 166: s = "\"Strict\" expected"; break;
+			case 167: s = "\"String\" expected"; break;
+			case 168: s = "\"Structure\" expected"; break;
+			case 169: s = "\"Sub\" expected"; break;
+			case 170: s = "\"SyncLock\" expected"; break;
+			case 171: s = "\"Text\" expected"; break;
+			case 172: s = "\"Then\" expected"; break;
+			case 173: s = "\"Throw\" expected"; break;
+			case 174: s = "\"To\" expected"; break;
+			case 175: s = "\"True\" expected"; break;
+			case 176: s = "\"Try\" expected"; break;
+			case 177: s = "\"TypeOf\" expected"; break;
+			case 178: s = "\"Unicode\" expected"; break;
+			case 179: s = "\"Until\" expected"; break;
+			case 180: s = "\"Variant\" expected"; break;
+			case 181: s = "\"Wend\" expected"; break;
+			case 182: s = "\"When\" expected"; break;
+			case 183: s = "\"While\" expected"; break;
+			case 184: s = "\"With\" expected"; break;
+			case 185: s = "\"WithEvents\" expected"; break;
+			case 186: s = "\"WriteOnly\" expected"; break;
+			case 187: s = "\"Xor\" expected"; break;
+			case 188: s = "??? expected"; break;
+			case 189: s = "invalid OptionStmt"; break;
+			case 190: s = "invalid OptionStmt"; break;
+			case 191: s = "invalid GlobalAttributeSection"; break;
+			case 192: s = "invalid NamespaceMemberDecl"; break;
+			case 193: s = "invalid OptionValue"; break;
+			case 194: s = "invalid EndOfStmt"; break;
+			case 195: s = "invalid Identifier"; break;
+			case 196: s = "invalid TypeModifier"; break;
+			case 197: s = "invalid NonModuleDeclaration"; break;
+			case 198: s = "invalid NonModuleDeclaration"; break;
+			case 199: s = "invalid PrimitiveTypeName"; break;
+			case 200: s = "invalid MemberModifier"; break;
+			case 201: s = "invalid StructureMemberDecl"; break;
+			case 202: s = "invalid StructureMemberDecl"; break;
+			case 203: s = "invalid StructureMemberDecl"; break;
+			case 204: s = "invalid StructureMemberDecl"; break;
+			case 205: s = "invalid StructureMemberDecl"; break;
+			case 206: s = "invalid StructureMemberDecl"; break;
+			case 207: s = "invalid StructureMemberDecl"; break;
+			case 208: s = "invalid InterfaceMemberDecl"; break;
+			case 209: s = "invalid InterfaceMemberDecl"; break;
+			case 210: s = "invalid Charset"; break;
+			case 211: s = "invalid VariableDeclarator"; break;
+			case 212: s = "invalid AccessorDecls"; break;
+			case 213: s = "invalid VariableInitializer"; break;
+			case 214: s = "invalid EventMemberSpecifier"; break;
+			case 215: s = "invalid EventMemberSpecifier"; break;
+			case 216: s = "invalid AssignmentOperator"; break;
+			case 217: s = "invalid SimpleExpr"; break;
+			case 218: s = "invalid SimpleExpr"; break;
+			case 219: s = "invalid SimpleExpr"; break;
+			case 220: s = "invalid IdentifierOrKeyword"; break;
+			case 221: s = "invalid CastTarget"; break;
+			case 222: s = "invalid Argument"; break;
+			case 223: s = "invalid RelationalExpr"; break;
+			case 224: s = "invalid NonArrayTypeName"; break;
+			case 225: s = "invalid AttributeArguments"; break;
+			case 226: s = "invalid ParameterModifier"; break;
+			case 227: s = "invalid Statement"; break;
+			case 228: s = "invalid LabelName"; break;
+			case 229: s = "invalid EmbeddedStatement"; break;
+			case 230: s = "invalid EmbeddedStatement"; break;
+			case 231: s = "invalid EmbeddedStatement"; break;
+			case 232: s = "invalid EmbeddedStatement"; break;
+			case 233: s = "invalid EmbeddedStatement"; break;
+			case 234: s = "invalid EmbeddedStatement"; break;
+			case 235: s = "invalid TryStatement"; break;
+			case 236: s = "invalid WhileOrUntil"; break;
+			case 237: s = "invalid OnErrorStatement"; break;
+			case 238: s = "invalid ResumeStatement"; break;
+			case 239: s = "invalid CaseClause"; break;
+			case 240: s = "invalid CaseClause"; break;
+
+			default: s = "error " + errorNumber; break;
+		}
+		errors.Error(line, col, s);
+	}
+
+	static bool[,] set = {
+	{T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x},
+	{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,T,T, x,x,x,T, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,T,T,x, x,x,x,x, x,x,x,T, T,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x},
+	{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,T,T, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,T,T,x, x,x,x,x, x,x,x,T, T,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x},
+	{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,T,T,x, x,x,x,x, x,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x},
+	{x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x},
+	{x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,T, T,x,x,x, x,x,x,T, T,T,T,x, x,x,x,x, x,x,x,T, x,x,T,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,T,T, T,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,T,T,x, T,x,x,T, T,T,T,x, T,x,x,x, x,x,x,T, T,x,x,x, x,x,x,x, T,T,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,x, x,x},
+	{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,T,T,x, T,x,x,T, x,T,T,x, T,x,x,x, x,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,x, x,x},
+	{x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x},
+	{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, T,T,T,x, x,x,x,x, x,x,x,T, x,x,T,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,T,T, T,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,T,T,x, T,x,x,T, T,T,T,x, T,x,x,x, x,x,x,T, T,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,x, x,x},
+	{x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x},
+	{x,x,T,T, T,T,T,T, T,T,T,x, x,x,T,T, T,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, x,x,x,x, T,T,x,T, x,T,x,x, T,T,T,T, T,T,T,T, x,T,T,T, T,T,T,T, T,T,T,x, x,x,T,T, T,T,x,x, x,T,x,x, T,T,x,T, x,T,x,T, x,x,x,T, x,T,x,T, x,x,x,x, T,x,x,x, x,x,T,x, T,x,x,x, x,T,T,x, T,x,x,T, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,T,T,T, T,T,x,x, x,T,T,T, x,T,x,T, x,x,T,T, x,T,x,T, T,T,x,x, x,x,x,T, T,x,x,x, x,x},
+	{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x},
+	{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,T,T,x, T,x,x,T, T,T,T,x, T,x,x,x, x,x,x,T, T,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,x, x,x},
+	{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x},
+	{x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,T, T,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x},
+	{x,x,T,T, T,T,T,T, T,T,T,x, x,x,T,T, T,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, x,x,x,x, T,T,x,T, x,T,x,x, T,T,T,T, T,T,T,T, x,T,T,T, T,T,T,T, T,T,T,x, x,x,T,T, T,T,x,x, x,x,x,x, T,T,x,T, x,T,x,T, x,x,x,T, x,T,x,T, x,x,x,x, T,x,x,x, x,x,T,x, T,x,x,x, x,T,T,x, T,x,x,T, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,T,T,T, T,T,x,x, x,T,T,T, x,T,x,T, x,x,T,T, x,T,x,T, T,T,x,x, x,x,x,T, T,x,x,x, x,x},
+	{x,T,x,x, x,x,x,x, x,x,x,T, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x},
+	{x,x,T,T, T,T,T,T, T,T,T,x, x,x,T,T, T,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, T,T,x,T, x,x,x,x, T,T,T,T, T,T,T,T, x,T,T,T, x,T,T,T, T,T,T,x, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,T, x,x,x,x, x,x,x,x, T,x,x,x, x,x,T,x, T,x,x,x, x,T,T,x, T,x,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,x, x,x,x,T, x,x,x,T, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x},
+	{x,x,T,T, T,T,T,T, T,T,T,x, x,x,T,T, T,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, T,T,x,T, x,x,x,x, T,T,T,T, T,T,T,T, x,T,T,T, x,T,T,T, T,T,T,x, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,T, x,x,x,x, x,x,x,x, T,x,x,x, x,x,T,x, T,x,x,x, x,T,T,x, T,x,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,x, x,x,x,T, x,x,x,T, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x},
+	{x,x,T,T, T,T,T,T, T,T,T,x, x,x,T,T, T,x,x,x, x,T,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, T,T,x,T, x,x,x,x, T,T,T,T, T,T,T,T, x,T,T,T, x,T,T,T, T,T,T,x, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,T, x,x,x,x, x,x,x,x, T,x,x,x, x,x,T,x, T,x,x,x, x,T,T,x, T,x,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,x, x,x,x,T, x,x,x,T, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x},
+	{x,x,T,T, T,T,T,T, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, T,T,x,T, x,x,x,x, T,T,T,T, T,T,T,T, x,T,T,T, x,T,T,T, T,T,T,x, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,T, x,x,x,x, x,x,x,x, T,x,x,x, x,x,T,x, T,x,x,x, x,T,T,x, T,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,x, x,x,x,T, x,x,x,T, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x},
+	{x,x,T,T, T,T,T,T, T,T,T,x, T,x,T,T, T,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, T,T,x,T, x,x,x,x, T,T,T,T, T,T,T,T, x,T,T,T, x,T,T,T, T,T,T,x, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,T, x,x,x,x, x,x,x,x, T,x,x,x, x,x,T,x, T,x,x,x, x,T,T,x, T,x,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,x, x,x,x,T, x,x,x,T, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x},
+	{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x},
+	{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x},
+	{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,T,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x},
+	{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,T, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x},
+	{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x},
+	{x,x,T,T, T,T,T,T, T,T,T,x, x,x,T,T, T,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, x,x,x,x, T,T,x,T, x,T,x,x, T,T,T,T, T,T,T,T, x,T,T,T, x,T,T,T, T,T,T,x, x,x,x,T, T,T,x,x, x,x,x,x, T,T,x,T, x,T,x,T, x,x,x,T, x,T,x,T, x,x,x,x, T,x,x,x, x,x,T,x, T,x,x,x, x,T,T,x, T,x,x,T, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,T,T,T, T,T,x,x, x,T,T,x, x,T,x,T, x,x,T,T, x,T,x,T, T,T,x,x, x,x,x,T, T,x,x,x, x,x},
+	{x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x},
+	{x,x,T,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x},
+	{x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x}
+
+	};
+} // end Parser
+
+}
\ No newline at end of file

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Parser.frame
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Parser.frame	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Parser.frame	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,120 @@
+using System;
+using System.Reflection;
+
+-->namespace
+
+-->tokens
+
+public class Parser
+{
+-->constants
+	const  bool   T            = true;
+	const  bool   x            = false;
+	const  int    minErrDist   = 2;
+	const  string errMsgFormat = "-- line {0} col {1}: {2}";  // 0=line, 1=column, 2=text
+	int    errDist             = minErrDist;
+	Errors errors;
+	Lexer  lexer;
+
+	public Errors Errors {
+		get {
+			return errors;
+		}
+	}
+
+-->declarations
+
+/*
+-->pragmas
+*/
+	void SynErr(int n)
+	{
+		if (errDist >= minErrDist) {
+			errors.SynErr(lexer.LookAhead.line, lexer.LookAhead.col, n);
+		}
+		errDist = 0;
+	}
+
+	public void SemErr(string msg)
+	{
+		if (errDist >= minErrDist) {
+			errors.Error(lexer.Token.line, lexer.Token.col, msg);
+		}
+		errDist = 0;
+	}
+	
+	void Expect(int n)
+	{
+		if (lexer.LookAhead.kind == n) {
+			lexer.NextToken();
+		} else {
+			SynErr(n);
+		}
+	}
+	
+	bool StartOf(int s)
+	{
+		return set[s, lexer.LookAhead.kind];
+	}
+	
+	void ExpectWeak(int n, int follow)
+	{
+		if (lexer.LookAhead.kind == n) {
+			lexer.NextToken();
+		} else {
+			SynErr(n);
+			while (!StartOf(follow)) {
+				lexer.NextToken();
+			}
+		}
+	}
+	
+	bool WeakSeparator(int n, int syFol, int repFol)
+	{
+		bool[] s = new bool[maxT + 1];
+		
+		if (lexer.LookAhead.kind == n) {
+			lexer.NextToken();
+			return true; 
+		} else if (StartOf(repFol)) {
+			return false;
+		} else {
+			for (int i = 0; i <= maxT; i++) {
+				s[i] = set[syFol, i] || set[repFol, i] || set[0, i];
+			}
+			SynErr(n);
+			while (!s[lexer.LookAhead.kind]) {
+				lexer.NextToken();
+			}
+			return StartOf(syFol);
+		}
+	}
+	
+-->productions
+
+	public void Parse(Lexer lexer)
+	{
+		this.errors = lexer.Errors;
+		this.lexer = lexer;
+		errors.SynErr = new ErrorCodeProc(SynErr);
+		lexer.NextToken();
+-->parseRoot
+	}
+
+	void SynErr(int line, int col, int errorNumber)
+	{
+		errors.count++; 
+		string s;
+		switch (errorNumber) {
+-->errors
+			default: s = "error " + errorNumber; break;
+		}
+		errors.Error(line, col, s);
+	}
+
+	static bool[,] set = {
+-->initialization
+	};
+} // end Parser
+
+$$$

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Scanner.frame
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Scanner.frame	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Scanner.frame	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,222 @@
+using System;
+using System.Drawing;
+using System.IO;
+using System.Collections;
+using System.Text;
+
+-->namespace
+
+public class Token {
+	public int kind;    // token kind
+	public int pos;     // token position in the source text (starting at 0)
+	public int col;     // token column (starting at 0)
+	public int line;    // token line (starting at 1)
+	public string val;  // token value
+	public Token next;  // AW 2003-03-07 Tokens are kept in linked list
+	
+	public Point Location {
+		get {
+			return new Point(line, col);
+		}
+	}
+
+	public Token () { }
+	public Token (int kind) { this.kind = kind; }
+}
+
+public class Buffer {
+	public const int eof = '\uffff';
+
+	static byte[] buf;
+	static int bufLen;
+	static int pos;
+	
+	public static void Fill (string fileName) {
+		FileStream s = null;
+		try {
+			s = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read);
+			Fill(s);
+		} catch (IOException) {
+			Console.WriteLine("--- Cannot open file {0}", fileName);
+			System.Environment.Exit(0);
+		} finally {
+			if (s != null) s.Close();
+		}
+	}
+	
+	public static void Fill (Stream s) {
+		bufLen = (int) s.Length;
+		buf = new byte[bufLen];
+		s.Read(buf, 0, bufLen); 
+		pos = 0;
+	}
+		
+	public static int Read () {
+		if (pos < bufLen) return buf[pos++];
+		else return 0;
+	}
+
+	public static int Peek () {
+		if (pos < bufLen) return buf[pos];
+		else return 0;
+	}
+	
+	/* AW 2003-03-10 moved this from ParserGen.cs */
+	public static string GetString (int beg, int end) {
+		StringBuilder s = new StringBuilder(64);
+		int oldPos = Buffer.Pos;
+		Buffer.Pos = beg;
+		while (beg < end) { s.Append((char)Buffer.Read()); beg++; }
+		Buffer.Pos = oldPos;
+		return s.ToString();
+	}
+
+	public static int Pos {
+		get { return pos; }
+		set {
+			if (value < 0) pos = 0; 
+			else if (value >= bufLen) pos = bufLen; 
+			else pos = value;
+		}
+	}
+}
+
+public class Scanner {
+	const char EOF = '\0';
+	const char EOL = '\n';
+	const char CR  = '\n';
+
+-->constants
+	
+-->declarations
+
+	static Token t;          // current token
+	static char ch;          // current input character
+	static int pos;          // column number of current character
+	static int line;         // line number of current character
+	static int lineStart;    // start position of current line
+	static int oldEols;    // EOLs that appeared in a comment;
+	static BitArray ignore;  // set of characters to be ignored by the scanner
+
+	/* ML ----- begin */
+	static Token tokens;  // the complete input token stream
+	static Token pt;      // current peek token
+	
+	static int peekCount = 0;
+	
+	public static int PeekCount { get { return peekCount; } }
+	
+	static void Init()
+	{
+		pos = -1; line = 1; lineStart = 0;
+		oldEols = 0;
+		NextCh();
+-->initialization
+
+		/* AW 2003-03-07 fill token list */
+		tokens = new Token();  // first token is a dummy
+		Token node = tokens;
+		do {
+			node.next = NextToken();
+			node = node.next;
+		} while (node.kind != 0);	/* AW: 0 => EOF */
+		t = pt = tokens;
+	}
+
+	public static void Init(String fileName) {
+		Buffer.Fill(fileName);
+		Init();
+	}
+	
+	public static void Init(Stream s) {
+		Buffer.Fill(s);
+		Init();
+	}
+
+	static void NextCh() {
+		if (oldEols > 0) { ch = EOL; oldEols--; } 
+		else {
+			ch = (char)Buffer.Read(); pos++;
+			// replace isolated '\r' by '\n' in order to make
+			// eol handling uniform across Windows, Unix and Mac
+			if (ch == '\r' && Buffer.Peek() != '\n') ch = EOL;
+			else if (ch > '\u007f') ch = '?';
+			if (ch == EOL) { line++; lineStart = pos + 1; }
+		}
+	}
+	
+-->comment
+	
+	static void CheckLiteral() {
+		switch (t.val) {
+-->literals
+		}
+	}
+
+	/* AW Scan() renamed to NextToken() */
+	static Token NextToken() {
+		while (ignore[ch]) NextCh();
+-->scan1
+		t = new Token();
+		t.pos = pos; t.col = pos - lineStart + 1; t.line = line; 
+		int state = start[ch];
+		StringBuilder buf = new StringBuilder(16);
+		buf.Append(ch); NextCh();
+		
+		switch (state) {
+			case 0: { t.kind = noSym; goto done; }  // NextCh already done
+-->scan2
+		}
+		done: 
+		t.val = buf.ToString();
+		return t;
+	}
+	
+	/* AW 2003-03-07 get the next token, move on and synch peek token with current */
+	public static Token Scan () {
+		t = pt = t.next;
+		return t;
+	}
+
+	/* AW 2003-03-07 get the next token, ignore pragmas */
+	public static Token Peek () {
+		do {                      // skip pragmas while peeking
+			pt = pt.next;
+		} while (pt != null && pt.kind > maxT);
+		return pt;
+	}
+	
+	/* AW 2003-03-11 to make sure peek start at current scan position */
+	public static void StartPeek () { pt = t; }
+} // end Scanner
+
+
+public delegate void ErrorCodeProc (int line, int col, int n);
+public delegate void ErrorMsgProc (int line, int col, string msg);
+
+public class Errors {
+	public static int count = 0;                                               // number of errors detected
+	public static ErrorCodeProc SynErr = new ErrorCodeProc(DefaultCodeError);  // syntactic errors
+	public static ErrorCodeProc SemErr = new ErrorCodeProc(DefaultCodeError);  // semantic errors
+	public static ErrorMsgProc Error = new ErrorMsgProc(DefaultMsgError);      // user defined string based errors
+	public static StringBuilder errorText = new StringBuilder();
+	
+	public static void Exception (string s) {
+		Console.WriteLine(s); 
+		System.Environment.Exit(0);
+	}
+
+	static void DefaultCodeError (int line, int col, int n) {
+		errorText.Append(String.Format("-- line {0} col {1}: error {2}", line, col, n));
+		errorText.Append("\n");
+		count++;
+	}
+
+	static void DefaultMsgError (int line, int col, string s) {
+		errorText.Append(String.Format("-- line {0} col {1}: {2}", line, col, s));
+		errorText.Append("\n");
+		count++;
+	}
+} // Errors
+
+$$$

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/VBNET.ATG
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/VBNET.ATG	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/VBNET.ATG	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,2747 @@
+using System.Drawing;
+using System.Collections;
+using System.Collections.Specialized;
+using System.Text;
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+COMPILER VBNET
+
+private string assemblyName = null;
+public CompilationUnit compilationUnit;
+private ArrayList importedNamespaces = null;
+private Stack withStatements;
+private bool isLabel = false;
+private LabelStatement labelStatement = null;
+
+public string ContainingAssembly
+{
+	set { assemblyName = value; }
+}
+
+Token t
+{
+	get {
+		return lexer.Token;
+	}
+}
+Token la
+{
+	get {
+		return lexer.LookAhead;
+	}
+}
+
+void updateLabelStatement(Statement stmt)
+{
+	if(isLabel) {
+		labelStatement.EmbeddedStatement = stmt;
+		isLabel = false;
+	} else {
+		compilationUnit.AddChild(stmt);
+	}
+}
+
+/* Return the n-th token after the current lookahead token */
+void StartPeek()
+{
+	lexer.StartPeek();
+}
+
+Token Peek()
+{
+	return lexer.Peek();
+}
+
+Token Peek (int n)
+{
+	lexer.StartPeek();
+	Token x = la;
+	while (n > 0) {
+		x = lexer.Peek();
+		n--;
+	}
+	return x;
+}
+
+public void Error(string s)
+{
+	if (errDist >= minErrDist) {
+		errors.Error(la.line, la.col, s);
+	}
+	errDist = 0;
+}
+
+public Expression ParseExpression(Lexer lexer)
+{
+	this.errors = lexer.Errors;
+	this.lexer = lexer;
+	errors.SynErr = new ErrorCodeProc(SynErr);
+	lexer.NextToken();
+	Expression expr;
+	Expr(out expr);
+	return expr;
+}
+
+bool IsEndStmtAhead()
+{
+	int peek = Peek(1).kind;
+	return la.kind == Tokens.End && (peek == Tokens.EOL || peek == Tokens.Colon);
+}
+
+bool IsNotClosingParenthesis() {
+	return la.kind != Tokens.CloseParenthesis;
+}
+
+/*
+	True, if ident is followed by "="
+*/
+bool IdentAndAsgn () {
+	if(la.kind == Tokens.Identifier) {
+		if(Peek(1).kind == Tokens.Assign) return true;
+		if(Peek(1).kind == Tokens.Colon && Peek(2).kind == Tokens.Assign) return true;
+	}
+	return false;
+}
+
+/*
+	True, if ident is followed by "=" or by ":" and "="
+*/
+bool IsNamedAssign() {
+//	if(Peek(1).kind == Tokens.Assign) return true; // removed: not in the lang spec
+	if(Peek(1).kind == Tokens.Colon && Peek(2).kind == Tokens.Assign) return true;
+	return false;
+}
+
+bool IsObjectCreation() {
+	return la.kind == Tokens.As && Peek(1).kind == Tokens.New;
+}
+
+/*
+	True, if "<" is followed by the ident "assembly" or "module"
+*/
+bool IsGlobalAttrTarget () {
+	Token pt = Peek(1);
+	return la.kind == Tokens.LessThan && ( pt.val.ToLower() == "assembly" || pt.val.ToLower() == "module");
+}
+
+/*
+	True if the next token is a "(" and is followed by "," or ")"
+*/
+bool IsRank()
+{
+	int peek = Peek(1).kind;
+	return la.kind == Tokens.OpenParenthesis
+						&& (peek == Tokens.Comma || peek == Tokens.CloseParenthesis);
+}
+
+bool IsDims()
+{
+	int peek = Peek(1).kind;
+	int peek_n = Peek(2).kind;
+	return la.kind == Tokens.OpenParenthesis
+						&& (peek == Tokens.LiteralInteger && peek_n == Tokens.CloseParenthesis);
+}
+
+bool IsSize()
+{
+	return la.kind == Tokens.OpenParenthesis;
+}
+
+/*
+	True, if the comma is not a trailing one,
+	like the last one in: a, b, c,
+*/
+bool NotFinalComma() {
+	int peek = Peek(1).kind;
+	return la.kind == Tokens.Comma &&
+		   peek != Tokens.CloseCurlyBrace && peek != Tokens.CloseSquareBracket;
+}
+
+/*
+	True, if the next token is "Else" and this one
+	if followed by "If"
+*/
+bool IsElseIf()
+{
+	int peek = Peek(1).kind;
+	return la.kind == Tokens.Else && peek == Tokens.If;
+}
+
+/*
+	True if the next token is goto and this one is
+	followed by minus ("-") (this is allowd in in
+	error clauses)
+*/
+bool IsNegativeLabelName()
+{
+	int peek = Peek(1).kind;
+	return la.kind == Tokens.GoTo && peek == Tokens.Minus;
+}
+
+/*
+	True if the next statement is a "Resume next" statement
+*/
+bool IsResumeNext()
+{
+	int peek = Peek(1).kind;
+	return la.kind == Tokens.Resume && peek == Tokens.Next;
+}
+
+/*
+	True, if ident/literal integer is followed by ":"
+*/
+bool IsLabel()
+{
+	return (la.kind == Tokens.Identifier || la.kind == Tokens.LiteralInteger)
+			&& Peek(1).kind == Tokens.Colon;
+}
+
+bool IsNotStatementSeparator()
+{
+	return la.kind == Tokens.Colon && Peek(1).kind == Tokens.EOL;
+}
+
+bool IsAssignment ()
+{
+	return IdentAndAsgn();
+}
+
+bool IsMustOverride(Modifiers m)
+{
+	return m.Contains(Modifier.MustOverride);
+}
+
+/*
+	True, if lookahead is a local attribute target specifier,
+	i.e. one of "event", "return", "field", "method",
+	"module", "param", "property", or "type"
+*/
+bool IsLocalAttrTarget() {
+	// TODO
+	return false;
+}
+
+TOKENS
+	/*----- terminal classes -----*/
+	/* EOF is 0 */
+	EOL
+	ident
+	LiteralString
+	LiteralCharacter
+	LiteralInteger
+	LiteralDouble
+	LiteralSingle
+	LiteralDecimal
+	LiteralDate
+	
+	/*----- special character -----*/
+	"."
+	"="
+	","
+	":"
+	"+"
+	"-"
+	"*"
+	"/"
+	"\\"
+	"&"
+	"^"
+	
+	"{"
+	"}"
+	
+	"["
+	"]"
+	
+	"("
+	")"
+	
+	">"
+	"<"
+	
+	"<>"
+	">="
+	"<="
+	
+	"<<"
+	">>"
+	
+	"+="
+	"^="
+	"-="
+	"*="
+	"/="
+	"\\="
+	"<<="
+	">>="
+	"&="
+	
+	/*----- VB.NET keywords -----*/
+	"AddHandler"
+	"AddressOf"
+	"Alias"
+	"And"
+	"AndAlso"
+	"Ansi"
+	"As"
+	"Assembly"
+	"Auto"
+	"Binary"
+	"Boolean"
+	"ByRef"
+	"Byte"
+	"ByVal"
+	"Call"
+	"Case"
+	"Catch"
+	"CBool"
+	"CByte"
+	"CChar"
+	"CDate"
+	"CDbl"
+	"CDec"
+	"Char"
+	"CInt"
+	"Class"
+	"CLng"
+	"CObj"
+	"Compare"
+	"Const"
+	"CShort"
+	"CSng"
+	"CStr"
+	"CType"
+	"Date"
+	"Decimal"
+	"Declare"
+	"Default"
+	"Delegate"
+	"Dim"
+	"DirectCast"
+	"Do"
+	"Double"
+	"Each"
+	"Else"
+	"ElseIf"
+	"End"
+	"EndIf"
+	"Enum"
+	"Erase"
+	"Error"
+	"Event"
+	"Exit"
+	"Explicit"
+	"False"
+	"Finally"
+	"For"
+	"Friend"
+	"Function"
+	"Get"
+	"GetType"
+	"GoSub"
+	"GoTo"
+	"Handles"
+	"If"
+	"Implements"
+	"Imports"
+	"In"
+	"Inherits"
+	"Integer"
+	"Interface"
+	"Is"
+	"Let"
+	"Lib"
+	"Like"
+	"Long"
+	"Loop"
+	"Me"
+	"Mod"
+	"Module"
+	"MustInherit"
+	"MustOverride"
+	"MyBase"
+	"MyClass"
+	"Namespace"
+	"New"
+	"Next"
+	"Not"
+	"Nothing"
+	"NotInheritable"
+	"NotOverridable"
+	"Object"
+	"Off"
+	"On"
+	"Option"
+	"Optional"
+	"Or"
+	"OrElse"
+	"Overloads"
+	"Overridable"
+	"Override"
+	"Overrides"
+	"ParamArray"
+	"Preserve"
+	"Private"
+	"Property"
+	"Protected"
+	"Public"
+	"RaiseEvent"
+	"ReadOnly"
+	"ReDim"
+	"RemoveHandler"
+	"Resume"
+	"Return"
+	"Select"
+	"Set"
+	"Shadows"
+	"Shared"
+	"Short"
+	"Single"
+	"Static"
+	"Step"
+	"Stop"
+	"Strict"
+	"String"
+	"Structure"
+	"Sub"
+	"SyncLock"
+	"Text"
+	"Then"
+	"Throw"
+	"To"
+	"True"
+	"Try"
+	"TypeOf"
+	"Unicode"
+	"Until"
+	"Variant"
+	"Wend"
+	"When"
+	"While"
+	"With"
+	"WithEvents"
+	"WriteOnly"
+	"Xor"
+	
+PRODUCTIONS
+
+VBNET
+	(.
+		compilationUnit = new CompilationUnit();
+		withStatements = new Stack();
+	.) =
+	{ EOL }
+	{ OptionStmt }
+	{ ImportsStmt}
+	{ IF (IsGlobalAttrTarget()) GlobalAttributeSection }
+	{ NamespaceMemberDecl }
+	EOF
+	.
+
+OptionStmt (. INode node = null; bool val = true; .) =
+	"Option" (. Point startPos = t.Location; .)
+	(
+		"Explicit" [ OptionValue<ref val> ]
+		(. node = new OptionExplicitDeclaration(val); .)
+		|
+		"Strict" [ OptionValue<ref val> ]
+		(. node = new OptionStrictDeclaration(val); .)
+		|
+		"Compare" ( "Binary" (. node = new OptionCompareDeclaration(CompareType.Binary); .)
+				  | "Text" (. node = new OptionCompareDeclaration(CompareType.Text); .)
+				  )
+	)
+	EndOfStmt
+	(.
+		node.StartLocation = startPos;
+		node.EndLocation   = t.Location;
+		compilationUnit.AddChild(node);
+	.)
+	.
+
+OptionValue<ref bool val> =
+	(
+		"On" (. val = true; .)
+	|
+		"Off" (. val = true; .)
+	)
+	.
+
+EndOfStmt =
+	(
+		EOL
+	|
+		":"
+	)
+	.
+
+ImportsStmt
+	(.
+		ArrayList importClauses = new ArrayList();
+		importedNamespaces = new ArrayList();
+		object importClause;
+	.) =
+	"Imports"
+	(.
+		Point startPos = t.Location;
+		ImportsStatement importsStatement = new ImportsStatement(null);
+	.)
+	ImportClause<out importClause> (. importClauses.Add(importClause); .)
+	{
+		"," ImportClause<out importClause> (. importClauses.Add(importClause); .)
+	}
+	EndOfStmt
+	(.
+		importsStatement.ImportClauses = importClauses;
+		importsStatement.StartLocation = startPos;
+		importsStatement.EndLocation   = t.Location;
+		compilationUnit.AddChild(importsStatement);
+	.)
+	.
+
+ImportClause<out object importClause>
+	(.
+		string qualident = null;
+		string aliasident = null;
+		importClause = null;
+	.) =
+	[ IF (IsAssignment()) Identifier (. aliasident = t.val;  .) "=" ]
+	Qualident<out qualident>
+	(.
+		if (qualident != null && qualident.Length > 0) {
+			if (aliasident != null) {
+				importClause = new ImportsAliasDeclaration(aliasident, qualident);
+			} else {
+				importedNamespaces.Add(qualident);
+				importClause = new ImportsDeclaration(qualident);
+			}
+		}
+	.)
+	.
+
+/* 6.4.2 */
+NamespaceMemberDecl
+	(.
+		Modifiers m = new Modifiers(this);
+		AttributeSection section;
+		ArrayList attributes = new ArrayList();
+		string qualident;
+	.) =
+	"Namespace"
+	(.
+		Point startPos = t.Location;
+	.)
+	Qualident<out qualident>
+	(.
+		INode node =  new NamespaceDeclaration(qualident);
+		node.StartLocation = startPos;
+		compilationUnit.AddChild(node);
+		compilationUnit.BlockStart(node);
+	.)
+	EOL
+	NamespaceBody
+	(.
+		node.EndLocation = t.Location;
+		compilationUnit.BlockEnd();
+	.)
+	|
+	{ AttributeSection<out section> (. attributes.Add(section); .) }
+	{ TypeModifier<m> } NonModuleDeclaration<m, attributes>
+	.
+
+/* 6.4.2 */
+NonModuleDeclaration<Modifiers m, ArrayList attributes>
+			(.
+				string name = String.Empty;
+				ArrayList names = null;
+			.) =
+	(. m.Check(Modifier.Classes); .)
+	/* Spec, 7.5 */
+	"Class"
+					(. TypeDeclaration newType = new TypeDeclaration();
+						compilationUnit.AddChild(newType);
+						compilationUnit.BlockStart(newType);
+						newType.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+						newType.Type = Types.Class;
+						newType.Modifier = m.Modifier;
+						newType.Attributes = attributes;
+					.)
+	Identifier			 (. newType.Name = t.val; newType.StartLocation = t.EndLocation; .) 
+	EndOfStmt
+	[ ClassBaseType<out name> (. newType.BaseType = name; .) ]
+	{ TypeImplementsClause<out names> (. newType.BaseInterfaces = names; .) }
+	ClassBody<newType>
+	(.
+		compilationUnit.BlockEnd();
+	.)
+	| "Module"
+		(.
+			m.Check(Modifier.Modules);
+			TypeDeclaration newType = new TypeDeclaration();
+			newType.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+			compilationUnit.AddChild(newType);
+			compilationUnit.BlockStart(newType);
+			newType.StartLocation = t.Location;
+			newType.Type = Types.Module;
+			newType.Modifier = m.Modifier;
+			newType.Attributes = attributes;
+		.)
+	Identifier			 (. newType.Name = t.val; newType.StartLocation = t.EndLocation;  .) 
+	EOL
+	ModuleBody<newType>
+	(.
+		newType.EndLocation = t.Location;
+		compilationUnit.BlockEnd();
+	.)
+	| "Structure"
+		(.
+			m.Check(Modifier.Structures);
+			TypeDeclaration newType = new TypeDeclaration();
+			compilationUnit.AddChild(newType);
+			compilationUnit.BlockStart(newType);
+			newType.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+			newType.StartLocation = t.Location;
+			newType.Type = Types.Structure;
+			newType.Modifier = m.Modifier;
+			newType.Attributes = attributes;
+			ArrayList baseInterfaces = new ArrayList();
+		.)
+	Identifier			 (. newType.Name = t.val; newType.StartLocation = t.EndLocation; .) 
+	EOL { TypeImplementsClause<out baseInterfaces> }
+	StructureBody<newType>
+	(.
+		newType.EndLocation = t.Location;
+		compilationUnit.BlockEnd();
+	.)
+	| /* 7.4 */
+	"Enum"
+		(.
+			m.Check(Modifier.Enums);
+			TypeDeclaration newType = new TypeDeclaration();
+			newType.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+			compilationUnit.AddChild(newType);
+			compilationUnit.BlockStart(newType);
+			
+			newType.Type = Types.Enum;
+			newType.Modifier = m.Modifier;
+			newType.Attributes = attributes;
+		.)
+	Identifier
+	(. newType.Name = t.val; newType.StartLocation = t.EndLocation; .)
+	[ "As" PrimitiveTypeName<out name> (. newType.BaseType = name; .) ]
+	EOL
+	EnumBody<newType>
+	(.
+		newType.EndLocation = t.Location;
+		compilationUnit.BlockEnd();
+	.)
+	| /* 7.8 */
+	"Interface"
+		(.
+			m.Check(Modifier.Interfaces);
+			TypeDeclaration newType = new TypeDeclaration();
+			compilationUnit.AddChild(newType);
+			compilationUnit.BlockStart(newType);
+			newType.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+			
+			newType.Type = Types.Interface;
+			newType.Modifier = m.Modifier;
+			newType.Attributes = attributes;
+			ArrayList baseInterfaces = new ArrayList();
+		.)
+	Identifier			 (. newType.Name = t.val; newType.StartLocation = t.EndLocation; .) 
+	EndOfStmt { InterfaceBase<out baseInterfaces> (. newType.BaseInterfaces = baseInterfaces; .) }
+	InterfaceBody<newType>
+	(.
+		newType.EndLocation = t.Location;
+		compilationUnit.BlockEnd();
+	.)
+	| /* 7.10 */
+	"Delegate"
+	(.
+		m.Check(Modifier.Delegates);
+		DelegateDeclaration delegateDeclr = new DelegateDeclaration();
+		ArrayList p = null;
+		TypeReference type = null;
+		delegateDeclr.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+		delegateDeclr.StartLocation = t.Location;
+		delegateDeclr.Modifier = m.Modifier;
+		delegateDeclr.Attributes = attributes;
+	.)
+	(
+		"Sub" Identifier (. delegateDeclr.Name = t.val; .)
+		[ "(" [ FormalParameterList<out p> ] ")" (. delegateDeclr.Parameters = p; .) ]
+		|
+		"Function" Identifier (. delegateDeclr.Name = t.val; .)
+		[ "(" [ FormalParameterList<out p> ] ")" (. delegateDeclr.Parameters = p; .) ]
+		[ "As" TypeName<out type> (. delegateDeclr.ReturnType = type; .)]
+	)
+	(. 		delegateDeclr.EndLocation = t.EndLocation; .)
+	EOL
+	(.
+		compilationUnit.AddChild(delegateDeclr);
+	.)
+	.
+
+NamespaceBody =
+	{ NamespaceMemberDecl }
+	"End" "Namespace"
+	EOL
+	.
+
+ClassBody<TypeDeclaration newType>
+	(. AttributeSection section; .) =
+	{
+		(.
+			ArrayList attributes = new ArrayList();
+			Modifiers m = new Modifiers(this);
+		.)
+		{ AttributeSection<out section> (. attributes.Add(section); .) }
+		{ MemberModifier<m> }
+		ClassMemberDecl<m, attributes>
+	}
+	"End" "Class" (. newType.EndLocation = t.EndLocation; .)
+	EOL
+	.
+
+StructureBody<TypeDeclaration newType>
+	(. AttributeSection section; .) =
+	{
+		(.
+			ArrayList attributes = new ArrayList();
+			Modifiers m = new Modifiers(this);
+		.)
+		{ AttributeSection<out section> (. attributes.Add(section); .) }
+		{ MemberModifier<m> }
+		StructureMemberDecl<m, attributes>
+	}
+	"End" "Structure" (. newType.EndLocation = t.EndLocation; .)
+	EOL
+	.
+
+/* 7.7.1 */
+ModuleBody<TypeDeclaration newType>
+	(. AttributeSection section; .) =
+	{
+		(.
+			ArrayList attributes = new ArrayList();
+			Modifiers m = new Modifiers(this);
+		.)
+		{ AttributeSection<out section> (. attributes.Add(section); .) }
+		{ MemberModifier<m> }
+		ClassMemberDecl<m, attributes>
+	}
+	"End" "Module" (. newType.EndLocation = t.EndLocation; .)
+	EOL
+	.
+
+EnumBody<TypeDeclaration newType>
+	(. FieldDeclaration f; .) =
+	{
+		EnumMemberDecl<out f> (. compilationUnit.AddChild(f); .)
+	}
+	"End" "Enum" (. newType.EndLocation = t.EndLocation; .)
+	EOL
+	.
+
+InterfaceBody<TypeDeclaration newType> =
+	{ InterfaceMemberDecl }
+	"End" "Interface" (. newType.EndLocation = t.EndLocation; .)
+	EOL
+	.
+
+/*
+	The information provided in the spec about
+	interface declarations is wrong
+*/
+InterfaceMemberDecl
+	(.
+		TypeReference type =null;
+		ArrayList p = null;
+		AttributeSection section;
+		Modifiers mod = new Modifiers(this);
+		ArrayList attributes = new ArrayList();
+		ArrayList parameters = new ArrayList();
+		string name;
+	.) =
+	{ AttributeSection<out section>			(. attributes.Add(section); .) }
+	/* this is different to c#: not only the Shadows modifier is allowed,
+	   also member modifiers like overloads etc.
+	*/
+	{ MemberModifier<mod> }
+	(
+		"Event"
+		(. mod.Check(Modifier.InterfaceEvents); .)
+		Identifier (. name = t.val; .)
+		[ "(" [ FormalParameterList<out p> ] ")" ]
+		[ "As" TypeName<out type> ]
+		EOL
+		(.
+			EventDeclaration ed = new EventDeclaration(type, mod.Modifier, p, attributes, name, null);
+			ed.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+			compilationUnit.AddChild(ed);
+			ed.EndLocation = t.EndLocation;
+		.)
+		|
+		"Sub"
+		(.
+			mod.Check(Modifier.InterfaceMethods);
+			ArrayList comments = lexer.SpecialTracker.RetreiveComments();
+		.)
+		Identifier (. name = t.val; .)
+		[ "(" [ FormalParameterList<out p> ] ")" ]
+		EOL
+		(.
+			MethodDeclaration md = new MethodDeclaration(name, mod.Modifier, null, p, attributes);
+			md.Specials["before"] = comments;
+			md.EndLocation = t.EndLocation;
+			compilationUnit.AddChild(md);
+		.)
+		|
+		"Function"
+		(.
+			mod.Check(Modifier.InterfaceMethods);
+			AttributeSection attributeSection = null;
+		.)
+		Identifier (. name = t.val; .)
+		[ "(" [ FormalParameterList<out p> ] ")" ]
+		[ "As" [AttributeSection<out attributeSection> ] TypeName<out type> ]
+		(.
+			if(type == null) {
+				type = new TypeReference("System.Object");
+			}
+			type.Attributes = attributeSection;
+			MethodDeclaration md = new MethodDeclaration(name, mod.Modifier, type, p, attributes);
+			md.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+			md.EndLocation = t.EndLocation;
+			compilationUnit.AddChild(md);
+		.)
+		EOL
+		|
+		"Property"
+		(.
+			mod.Check(Modifier.InterfaceProperties);
+			ArrayList comments = lexer.SpecialTracker.RetreiveComments();
+		.)
+		Identifier	(. name = t.val;  .)
+		[ "(" [ FormalParameterList<out p> ] ")" ]
+		[ "As" TypeName<out type> ]
+		(.
+			if(type == null) {
+				type = new TypeReference("System.Object");
+			}
+		.)
+		EOL
+		(.
+			PropertyDeclaration pd = new PropertyDeclaration(name, type, mod.Modifier, attributes);
+			pd.Parameters = p;
+			pd.Specials["before"] = comments;
+			pd.EndLocation = t.EndLocation;
+			compilationUnit.AddChild(pd);
+		.)
+	)
+	| /* inner type declarations */
+	NonModuleDeclaration<mod, attributes>
+	.
+
+/* 7.4.1 */
+EnumMemberDecl<out FieldDeclaration f>
+	(.
+		Expression expr = null;
+		ArrayList attributes = new ArrayList();
+		AttributeSection section = null;
+		VariableDeclaration varDecl = null;
+	.) =
+	{ AttributeSection<out section> (. attributes.Add(section); .) }
+	Identifier
+	(.
+		f = new FieldDeclaration(attributes);
+		varDecl = new VariableDeclaration(t.val);
+		varDecl.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+		f.Fields.Add(varDecl);
+		f.StartLocation = t.Location;
+	.)
+	[ "=" Expr<out expr> (. varDecl.Initializer = expr; .) ]
+	EOL
+	.
+
+ClassMemberDecl<Modifiers m, ArrayList attributes> =
+	StructureMemberDecl<m, attributes>
+	.
+
+ClassBaseType<out string name>
+	(.
+		TypeReference type;
+		name = String.Empty;
+	.) =
+	"Inherits"
+	TypeName<out type> (. name = type.Type; .)
+	EndOfStmt
+	.
+
+/* 7.6.1 */
+StructureMemberDecl<Modifiers m, ArrayList attributes>
+	(.
+		TypeReference type = null;
+		ArrayList p = null;
+		Statement stmt = null;
+		ArrayList variableDeclarators = new ArrayList();
+	.)=
+	NonModuleDeclaration<m, attributes>
+	| /* 9.2.1 */
+	"Sub"
+	(.
+		Point startPos = t.Location;
+		ArrayList comments = lexer.SpecialTracker.RetreiveComments();
+	.)
+	(
+		(.
+			string name = String.Empty;
+			MethodDeclaration methodDeclaration;
+			HandlesClause handlesClause = null;
+			ImplementsClause implementsClause = null;
+		.)
+		Identifier
+		(.
+			name = t.val;
+			m.Check(Modifier.Methods);
+		.)
+		[ "(" [ FormalParameterList<out p> ] ")" ]
+		[
+			(
+				ImplementsClause<out implementsClause>
+				|
+				HandlesClause<out handlesClause>
+			)
+		]
+		(. Point endLocation = t.EndLocation; .)
+		EOL
+		(
+			/* abstract methods without a body */
+			IF(IsMustOverride(m))
+			(.
+				methodDeclaration = new MethodDeclaration(name, m.Modifier,  null, p, attributes);
+				methodDeclaration.Specials["before"] = comments;
+				methodDeclaration.StartLocation = startPos;
+				methodDeclaration.EndLocation   = endLocation;
+				
+				methodDeclaration.HandlesClause = handlesClause;
+				methodDeclaration.ImplementsClause = implementsClause;
+				
+				compilationUnit.AddChild(methodDeclaration);
+			.)
+		|
+			(.
+				methodDeclaration = new MethodDeclaration(name, m.Modifier,  null, p, attributes);
+				methodDeclaration.Specials["before"] = comments;
+				methodDeclaration.StartLocation = startPos;
+				methodDeclaration.EndLocation   = endLocation;
+				
+				methodDeclaration.HandlesClause = handlesClause;
+				methodDeclaration.ImplementsClause = implementsClause;
+				
+				compilationUnit.AddChild(methodDeclaration);
+				compilationUnit.BlockStart(methodDeclaration);
+			.)
+			Block<out stmt>
+			(.
+				compilationUnit.BlockEnd();
+				methodDeclaration.Body  = (BlockStatement)stmt;
+			.)
+			"End" "Sub" (. methodDeclaration.Body.EndLocation = t.EndLocation; .) EOL 
+		)
+		/* 9.3 */
+		| "New" [ "(" [ FormalParameterList<out p> ] ")" ]
+		(. m.Check(Modifier.Constructors); .)
+		(. Point constructorEndLocation = t.EndLocation; .)
+		EOL
+		Block<out stmt>
+		"End" "Sub" (. Point endLocation = t.EndLocation; .) EOL
+		(.
+			ConstructorDeclaration cd = new ConstructorDeclaration("New", m.Modifier, p, attributes); 
+			cd.StartLocation = startPos;
+			cd.Specials["before"] = comments;
+			cd.EndLocation   = constructorEndLocation;
+			cd.Body = (BlockStatement)stmt;
+			cd.Body.EndLocation   = endLocation;
+			compilationUnit.AddChild(cd);
+		.)
+	)
+	|
+	/* 9.2.1 */
+	"Function"
+	(.
+		m.Check(Modifier.Methods);
+		string name = String.Empty;
+		Point startPos = t.Location;
+		MethodDeclaration methodDeclaration;
+		HandlesClause handlesClause = null;
+		ImplementsClause implementsClause = null;
+		AttributeSection attributeSection = null;
+	.)
+	Identifier			(. name = t.val; .)
+	[ "("	[ FormalParameterList<out p> ] ")" ]
+	["As" [AttributeSection<out attributeSection>] TypeName<out type> ]
+	(.
+		if(type == null) {
+			type = new TypeReference("System.Object");
+		}
+		type.Attributes = attributeSection;
+	.)
+	[
+		(
+			ImplementsClause<out implementsClause>
+			|
+			HandlesClause<out handlesClause>
+		)
+	]
+	EOL
+	(
+		/* abstract methods without a body */
+		IF(IsMustOverride(m))
+			(.
+				methodDeclaration = new MethodDeclaration(name, m.Modifier,  type, p, attributes);
+				methodDeclaration.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+				methodDeclaration.StartLocation = startPos;
+				methodDeclaration.EndLocation   = t.EndLocation;
+				methodDeclaration.HandlesClause = handlesClause;
+				methodDeclaration.ImplementsClause = implementsClause;
+				compilationUnit.AddChild(methodDeclaration);
+			.)
+		|
+			(.
+				methodDeclaration = new MethodDeclaration(name, m.Modifier,  type, p, attributes);
+				methodDeclaration.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+				methodDeclaration.StartLocation = startPos;
+				methodDeclaration.EndLocation   = t.EndLocation;
+				
+				methodDeclaration.HandlesClause = handlesClause;
+				methodDeclaration.ImplementsClause = implementsClause;
+				
+				compilationUnit.AddChild(methodDeclaration);
+				compilationUnit.BlockStart(methodDeclaration);
+			.)
+			Block<out stmt>
+			(.
+				compilationUnit.BlockEnd();
+				methodDeclaration.Body  = (BlockStatement)stmt;
+			.)
+			"End" "Function" 
+			(.
+				methodDeclaration.Body.StartLocation = methodDeclaration.EndLocation;
+				methodDeclaration.Body.EndLocation   = t.EndLocation;
+			.)
+			EOL
+	)
+	|
+	/* 9.2.2. */
+	"Declare"
+	(.
+		m.Check(Modifier.ExternalMethods);
+		Point startPos = t.Location;
+		CharsetModifier charsetModifer = CharsetModifier.None;
+		string library = String.Empty;
+		string alias = null;
+		string name = String.Empty;
+	.)
+	[Charset<out charsetModifer> ]
+	(
+			"Sub"
+			Identifier				(. name = t.val; .)
+			"Lib" LiteralString		(. library = t.val; .)
+			["Alias" LiteralString	(. alias = t.val; .)]
+			[ "("	[ FormalParameterList<out p> ] ")" ]
+			EOL
+			(.
+				DeclareDeclaration declareDeclaration = new DeclareDeclaration(name, m.Modifier, null, p, attributes, library, alias, charsetModifer);
+				declareDeclaration.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+				declareDeclaration.StartLocation = startPos;
+				declareDeclaration.EndLocation   = t.EndLocation;
+				compilationUnit.AddChild(declareDeclaration);
+			.)
+		|
+			"Function" 
+			Identifier					(. name = t.val; .)
+			"Lib" LiteralString		(. library = t.val; .)
+			["Alias" LiteralString	(. alias = t.val; .)]
+			[ "("	[ FormalParameterList<out p> ] ")" ]
+			["As" TypeName<out type> ]
+			EOL
+			(.
+				DeclareDeclaration declareDeclaration = new DeclareDeclaration(name, m.Modifier, type, p, attributes, library, alias, charsetModifer);
+				declareDeclaration.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+				declareDeclaration.StartLocation = startPos;
+				declareDeclaration.EndLocation   = t.EndLocation;
+				compilationUnit.AddChild(declareDeclaration);
+			.)
+		)
+	|
+	/* 9. 4 */
+	"Event"
+	(.
+		m.Check(Modifier.Events);
+		Point startPos = t.Location;
+		EventDeclaration eventDeclaration;
+		string name = String.Empty;
+		ImplementsClause implementsClause = null;
+	.)
+	Identifier (. name= t.val; .)
+	(
+		"As" TypeName<out type>
+		|
+		[ "("	[ FormalParameterList<out p> ] ")" ]
+	)
+	[ ImplementsClause<out implementsClause> ]
+	(.
+		eventDeclaration = new EventDeclaration(type, m.Modifier, p, attributes, name, implementsClause);
+		eventDeclaration.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+		eventDeclaration.StartLocation = startPos;
+		eventDeclaration.EndLocation = t.EndLocation;
+		compilationUnit.AddChild(eventDeclaration);
+	.)
+	EOL
+	| /* 9.6 */
+	(. Point startPos = t.Location; .)
+	(.
+		m.Check(Modifier.Fields);
+		FieldDeclaration fd = new FieldDeclaration(attributes, type, m.Modifier);
+		ArrayList comments = lexer.SpecialTracker.RetreiveComments();
+		fd.StartLocation = startPos;
+	.)
+	VariableDeclarator<variableDeclarators>
+	(.
+		((INode)variableDeclarators[0]).Specials["before"] = comments;
+	.)
+	{ "," VariableDeclarator<variableDeclarators> }
+	EOL
+	(.
+		fd.EndLocation = t.EndLocation;
+		fd.Fields = variableDeclarators;
+		compilationUnit.AddChild(fd);
+	.)
+	| /* 9.4 */
+	(. m.Check(Modifier.Fields); .)
+	"Const" (.  m.Add(Modifier.Constant);  .)
+	(.
+		FieldDeclaration fd = new FieldDeclaration(attributes, type, m.Modifier);
+		fd.StartLocation = t.Location;
+		ArrayList comments = lexer.SpecialTracker.RetreiveComments();
+		ArrayList constantDeclarators = new ArrayList();
+	.)
+	ConstantDeclarator<constantDeclarators>
+	(.
+		((INode)constantDeclarators[0]).Specials["before"] = comments;
+	.)
+	{ "," ConstantDeclarator<constantDeclarators> }
+	(.
+		fd.Fields = constantDeclarators;
+		fd.EndLocation = t.Location;
+	.)
+	EOL
+	(.
+		fd.EndLocation = t.EndLocation;
+		compilationUnit.AddChild(fd);
+	.)
+	| /* 9.7 */
+	"Property"
+	(.
+		m.Check(Modifier.Properties);
+		Point startPos = t.Location;
+		ImplementsClause implementsClause = null;
+	.)
+	Identifier (. string propertyName = t.val; .)
+	[ "("	[ FormalParameterList<out p> ] ")" ]
+	[ "As" TypeName<out type> ]
+	(.
+		if(type == null) {
+			type = new TypeReference("System.Object");
+		}
+	.)
+	[ ImplementsClause<out implementsClause> ]
+	EOL
+	(
+	/* abstract properties without a body */
+	IF(IsMustOverride(m))
+		(.
+			PropertyDeclaration pDecl = new PropertyDeclaration(propertyName, type, m.Modifier, attributes);
+			pDecl.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+			pDecl.StartLocation = startPos;
+			pDecl.EndLocation   = t.Location;
+			pDecl.TypeReference = type;
+			pDecl.ImplementsClause = implementsClause;
+			pDecl.Parameters = p;
+			compilationUnit.AddChild(pDecl);
+		.)
+	|
+		(.
+			PropertyDeclaration pDecl = new PropertyDeclaration(propertyName, type, m.Modifier, attributes);
+			pDecl.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+			pDecl.StartLocation = startPos;
+			pDecl.EndLocation   = t.Location;
+			pDecl.BodyStart   = t.Location;
+			pDecl.TypeReference = type;
+			pDecl.ImplementsClause = implementsClause;
+			pDecl.Parameters = p;
+			PropertyGetRegion getRegion;
+			PropertySetRegion setRegion;
+		.)
+		AccessorDecls<out getRegion, out setRegion> 
+		"End" "Property"
+		EOL
+		(.
+			pDecl.GetRegion = getRegion;
+			pDecl.SetRegion = setRegion;
+			pDecl.BodyEnd = t.EndLocation;
+			compilationUnit.AddChild(pDecl);
+		.)
+	)
+	.
+
+/* 9.7 */
+AccessorDecls<out PropertyGetRegion getBlock, out PropertySetRegion setBlock>
+	(.
+		ArrayList attributes = new ArrayList(); 
+		AttributeSection section;
+		getBlock = null;
+		setBlock = null; 
+	.) =
+	{ AttributeSection<out section> (. attributes.Add(section); .) }
+	(
+		GetAccessorDecl<out getBlock, attributes>
+		[
+			(. attributes = new ArrayList(); .)
+			{ AttributeSection<out section> (. attributes.Add(section); .) }
+			SetAccessorDecl<out setBlock, attributes>
+		]
+		|
+		SetAccessorDecl<out setBlock, attributes>
+		[
+			(. attributes = new ArrayList(); .)
+			{ AttributeSection<out section> (. attributes.Add(section); .) }
+			GetAccessorDecl<out getBlock, attributes>
+		]
+	)
+	.
+
+/* 9.7.1 */
+GetAccessorDecl<out PropertyGetRegion getBlock, ArrayList attributes>
+	(. Statement stmt = null; .) =
+	"Get"
+	EOL
+	Block<out stmt>
+	(.
+		getBlock = new PropertyGetRegion((BlockStatement)stmt, attributes);
+	.)
+	"End" "Get"
+	EOL
+	.
+
+/* 9.7.2 */
+SetAccessorDecl<out PropertySetRegion setBlock, ArrayList attributes>
+	(.
+		Statement stmt = null;
+		ArrayList p = null;
+	.) =
+	"Set"
+	[ "("	[ FormalParameterList<out p> ] ")" ]
+	EOL
+	Block<out stmt>
+	(.
+		setBlock = new PropertySetRegion((BlockStatement)stmt, attributes);
+		setBlock.Parameters = p;
+	.)
+	"End" "Set"
+	EOL
+	.
+
+/* 9.5 */
+ConstantDeclarator<ArrayList constantDeclaration>
+	(.
+		Expression expr = null;
+		TypeReference type = null;
+		string name = String.Empty;
+	.) =
+	Identifier				(. name = t.val; .)
+	["As" TypeName<out type> ]
+	"=" Expr<out expr>
+	(.
+		VariableDeclaration f = new VariableDeclaration(name, expr);
+		f.Type = type;
+		constantDeclaration.Add(f);
+	.)
+	.
+
+/* 9.6 */
+VariableDeclarator<ArrayList fieldDeclaration>
+	(.
+		Expression expr = null;
+		TypeReference type = null;
+		ObjectCreateExpression oce = null;
+		ArrayCreateExpression ace = null;
+		ArrayList rank = null;
+		ArrayList dimension = null;
+	.) =
+	Identifier
+	(.
+		VariableDeclaration f = new VariableDeclaration(t.val);
+	.)
+	[ IF(IsRank()) ArrayTypeModifiers<out rank> ]
+	[ IF(IsSize()) ArrayInitializationModifier<out dimension> ]
+	(
+			IF(IsObjectCreation()) "As" ObjectCreateExpression<out expr>
+			(.
+				if(expr is ArrayCreateExpression) {
+					ace = expr as ArrayCreateExpression;
+					f.Initializer = ace.ArrayInitializer;
+					
+				} else {
+					oce = expr as ObjectCreateExpression;
+					f.Initializer = oce;
+					if(oce.CreateType != null) {
+						f.Type = oce.CreateType;
+					}
+				}
+			.)
+		|
+			[ "As" TypeName<out type> ]
+			(.
+				if(type != null) {
+					type.Dimension = dimension;
+				}
+				f.Type = type;
+				if (type != null && rank != null) {
+					if(type.RankSpecifier != null) {
+						Error("array rank only allowed one time");
+					} else {
+						type.RankSpecifier = rank;
+					}
+				}
+			.)
+			[ "=" VariableInitializer<out expr> (. f.Initializer = expr; .) ]
+	)
+	(. fieldDeclaration.Add(f); .)
+	.
+
+/* 6.8 */
+ArrayInitializationModifier<out ArrayList arrayModifiers>
+	(.
+		arrayModifiers = null;
+	.) =
+	"(" InitializationRankList<out arrayModifiers> ")"
+	.
+
+/* 7.5.4.3 */
+InitializationRankList<out ArrayList rank>
+	(.
+		rank = null;
+		Expression expr = null;
+	.) =
+	Expr<out expr>	(. rank = new ArrayList(); rank.Add(expr); .)
+	{
+		"," Expr<out expr>		(. rank.Add(expr); .)
+	}
+	.
+
+/* 9.6.3 */
+VariableInitializer<out Expression initializerExpression>
+	(.
+		initializerExpression = null;
+	.) =
+	Expr<out initializerExpression>
+	| ArrayInitializer<out initializerExpression>
+	.
+
+/* 9.6.3.4 */
+ArrayInitializer<out Expression outExpr>
+	(.
+		Expression expr = null;
+		ArrayInitializerExpression initializer = new ArrayInitializerExpression();
+	.) =
+	"{"
+	[
+		VariableInitializer<out expr>
+		(.
+			initializer.CreateExpressions.Add(expr);
+		.)
+		{
+			IF (NotFinalComma()) "," VariableInitializer<out expr>
+			(. initializer.CreateExpressions.Add(expr); .)
+		}
+	]
+	"}" (. outExpr = initializer; .)
+	.
+
+Charset<out CharsetModifier charsetModifier>
+	(. charsetModifier = CharsetModifier.None; .) =
+	| "Ansi"		(. charsetModifier = CharsetModifier.ANSI; .)
+	| "Auto"		(. charsetModifier = CharsetModifier.Auto; .)
+	| "Unicode"		(. charsetModifier = CharsetModifier.Unicode; .)
+	.
+
+/* 9.2.6 */
+HandlesClause<out HandlesClause handlesClause>
+	(.
+		handlesClause = new HandlesClause();
+		string name;
+	.) =
+	"Handles" EventMemberSpecifier<out name>	(. handlesClause.EventNames.Add(name); .)
+	{ "," EventMemberSpecifier<out name>		(. handlesClause.EventNames.Add(name); .) }
+	.
+
+/* 7.8. */
+InterfaceBase <out ArrayList bases>
+	(.
+		TypeReference type;
+		bases = new ArrayList();
+	.) =
+	"Inherits"
+	TypeName<out type> (. bases.Add(type); .)
+	{
+		","
+		TypeName<out type> (. bases.Add(type); .)
+	}
+	EOL
+	.
+
+/* 7.2 */
+TypeImplementsClause<out ArrayList baseInterfaces>
+	(.
+		baseInterfaces = new ArrayList();
+		TypeReference type = null;
+	.) =
+	"Implements" TypeName<out type>
+	(.
+		baseInterfaces.Add(type);
+	.)
+	{
+		"," TypeName<out type>
+		(. baseInterfaces.Add(type); .)
+	}
+	EndOfStmt
+	.
+
+/* 9.1 */
+ImplementsClause<out ImplementsClause clause>
+	(.
+		clause = new ImplementsClause();
+		string typename = String.Empty;
+		string first;
+	.) =
+	"Implements" Identifier (. first = t.val; .) "." Qualident<out typename> (. ((ImplementsClause)clause).BaseMembers.Add(first + "." + typename); .)
+	{ "," Identifier (. first = t.val; .) "." Qualident<out typename> (. ((ImplementsClause)clause).BaseMembers.Add(first + "." + typename); .) }
+		.
+
+EventMemberSpecifier<out string name>
+	(. string type; name = String.Empty; .) =
+	Identifier (. type = t.val; .)
+	"."
+	Identifier (. name = type + "." + t.val; .)
+	| "MyBase" "."
+	(
+		Identifier (. name = "MyBase." + t.val; .)
+		| "Error"  (. name = "MyBase.Error"; .)
+	)
+	.
+
+Expr<out Expression expr>
+	(. expr = new Expression(); .) =
+	ConditionalOrExpr<out expr>
+	{
+		/*ConditionalOrExpr<out expr>	|*/
+		(. AssignmentOperatorType op; Expression val; .)
+		AssignmentOperator<out op> Expr<out val> (. expr = new AssignmentExpression(expr, op, val); .)
+	}
+	.
+
+UnaryExpr<out Expression uExpr> 
+	(.
+		Expression expr;
+		UnaryOperatorType uop = UnaryOperatorType.None;
+		bool isUOp = false;
+	.) =
+	{ 	"+" 		(. uop = UnaryOperatorType.Plus; isUOp = true; .)
+		| "-" 		(. uop = UnaryOperatorType.Minus; isUOp = true; .)
+/*		| "Not"		(. uop = UnaryOperatorType.Not;  isUOp = true;.) */
+		| "*" 		(. uop = UnaryOperatorType.Star;  isUOp = true;.)
+	}
+	SimpleExpr<out expr>
+		(.
+			if (isUOp) {
+				uExpr = new UnaryOperatorExpression(expr, uop);
+			} else {
+				uExpr = expr;
+			}
+		.)
+	.
+
+AssignmentOperator<out AssignmentOperatorType op>
+	(. op = AssignmentOperatorType.None; .) =
+	"="		(. op = AssignmentOperatorType.Assign; .)
+	| "&="	(. op = AssignmentOperatorType.ConcatString; .)
+	| "+="	(. op = AssignmentOperatorType.Add; .)
+	| "-="	(. op = AssignmentOperatorType.Subtract; .)
+	| "*="	(. op = AssignmentOperatorType.Multiply; .)
+	| "/="	(. op = AssignmentOperatorType.Divide; .)
+	| "\\="	(. op = AssignmentOperatorType.DivideInteger; .)
+	| "^="	(. op = AssignmentOperatorType.Power; .)
+	| "<<="	(. op = AssignmentOperatorType.ShiftLeft; .)
+	| ">>="	(. op = AssignmentOperatorType.ShiftRight; .)
+	.
+
+/* 11.4 */
+SimpleExpr<out Expression pexpr>
+	(.
+		Expression expr;
+		TypeReference type = null;
+		string name = String.Empty;
+		pexpr = null;
+	.) =
+	(
+		(
+			/* 11.4.1 */ 
+			LiteralString							(.pexpr = new PrimitiveExpression(t.literalValue, t.val);  .)
+			| LiteralCharacter						(.pexpr = new PrimitiveExpression(t.literalValue, t.val);  .)
+			| LiteralSingle							(.pexpr = new PrimitiveExpression(t.literalValue, t.val);  .)
+			| LiteralDouble							(.pexpr = new PrimitiveExpression(t.literalValue, t.val);  .)
+			| LiteralInteger						(.pexpr = new PrimitiveExpression(t.literalValue, t.val);  .)
+			| LiteralDate							(.pexpr = new PrimitiveExpression(t.literalValue, t.val);  .)
+			| LiteralDecimal						(.pexpr = new PrimitiveExpression(t.literalValue, t.val);  .)
+			/* True, False and Nothing are handled as literals in the spec */
+			| "True"											(.pexpr = new PrimitiveExpression(true, "true");  .)
+			| "False"											(.pexpr = new PrimitiveExpression(false, "false"); .)
+			| "Nothing"											(.pexpr = new PrimitiveExpression(null, "null");  .)
+			| /* 11.4.2 */ "(" Expr<out expr> ")" 				(. pexpr = new ParenthesizedExpression(expr); .)
+			| /* 11.4.4 */ Identifier					(. pexpr = new IdentifierExpression(t.val); .)
+			| (. string val = String.Empty; .) PrimitiveTypeName<out val>
+			"." Identifier	(. pexpr = new FieldReferenceOrInvocationExpression(new TypeReferenceExpression(val), t.val); .)
+			| "Me"												(. pexpr = new ThisReferenceExpression(); .)
+			| (. Expression retExpr = null; .)
+				( "MyBase"										(. retExpr = new BaseReferenceExpression(); .)
+				| "MyClass"										(. retExpr = new ClassReferenceExpression(); .)
+				)
+				"." IdentifierOrKeyword<out name>				(. pexpr = new FieldReferenceOrInvocationExpression(retExpr, name); .)
+			| ObjectCreateExpression<out expr>					(. pexpr = expr; .)
+			| /* 11.11 */ ( "DirectCast" | "CType" ) "(" Expr<out expr> "," TypeName<out type> ")"	(. pexpr = new CastExpression(type, expr); .)
+			| /* 11.11 */ CastTarget<out type> "(" Expr<out expr> ")"	(. pexpr = new CastExpression(type, expr, true); .)
+			| /* 11.4.5 */ "AddressOf" Expr<out expr>			(. pexpr = new AddressOfExpression(expr); .)
+			| /* 11.5.1 */ "GetType" "(" TypeName<out type> ")"	(. pexpr = new GetTypeExpression(type); .)
+			| /* 11.5.2 */ "TypeOf" SimpleExpr<out expr> "Is" TypeName<out type> (. pexpr = new TypeOfExpression(expr, type); .)
+		)
+		{
+			"." IdentifierOrKeyword<out name> (. pexpr = new FieldReferenceOrInvocationExpression(pexpr, name); .)
+			| "("	(. ArrayList parameters = new ArrayList(); .)
+				[
+					(. expr = null; .) [ Argument<out expr>]	(. parameters.Add(expr); .)
+					{
+						"," (. expr = null; .)
+						[ Argument<out expr>  ] (. parameters.Add(expr); .)
+					}
+				]
+			")"		(. pexpr = new InvocationExpression(pexpr, parameters); .)
+		}
+	|
+	/* this form only occurs in with statements*/
+	"." IdentifierOrKeyword<out name> (. pexpr = new FieldReferenceOrInvocationExpression(pexpr, name);.)
+	{
+		"." IdentifierOrKeyword<out name> (. pexpr = new FieldReferenceOrInvocationExpression(pexpr, name); .)
+		| "("	(. ArrayList parameters = new ArrayList(); .)
+			[
+				(. expr = null; .) [ Argument<out expr>]	(. parameters.Add(expr); .)
+				{
+					"," (. expr = null; .)
+					[ Argument<out expr>  ] (. parameters.Add(expr); .)
+				}
+			]
+		")"		(. pexpr = new InvocationExpression(pexpr, parameters); .)
+	}
+	)
+	.
+
+/* 11.11 */
+
+CastTarget<out TypeReference type>
+	(.
+		type = null;
+	.) =
+	"CBool"		(. type = new TypeReference("System.Boolean"); .)
+	| "CByte"	(. type = new TypeReference("System.Byte"); .)
+	| "CChar"	(. type = new TypeReference("System.Char"); .)
+	| "CDate"	(. type = new TypeReference("System.DateTime"); .)
+	| "CDec"	(. type = new TypeReference("System.Decimal"); .)
+	| "CDbl"	(. type = new TypeReference("System.Double"); .)
+	| "CInt"	(. type = new TypeReference("System.Int32"); .)
+	| "CLng"	(. type = new TypeReference("System.Int64"); .)
+	| "CObj"	(. type = new TypeReference("System.Object"); .)
+	| "CShort"	(. type = new TypeReference("System.Int16"); .)
+	| "CSng"	(. type = new TypeReference("System.Single"); .)
+	| "CStr"	(. type = new TypeReference("System.String"); .)
+	.
+
+ConditionalOrExpr<out Expression outExpr>
+	(. Expression expr; .) =
+	ConditionalAndExpr<out outExpr>  { "OrElse" ConditionalAndExpr<out expr> (.  outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BooleanOr, expr);  .) }
+	.
+
+ConditionalAndExpr<out Expression outExpr>
+	(. Expression expr; .) =
+	InclusiveOrExpr<out outExpr>  { "AndAlso" InclusiveOrExpr<out expr> (.  outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BooleanAnd, expr);  .) }
+	.
+
+InclusiveOrExpr<out Expression outExpr>
+	(. Expression expr; .) =
+	ExclusiveOrExpr<out outExpr>  { "Xor" ExclusiveOrExpr<out expr> (.  outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.ExclusiveOr, expr);  .) }
+	.
+
+ExclusiveOrExpr<out Expression outExpr>
+	(. Expression expr; .) =
+	AndExpr<out outExpr>  { "Or" AndExpr<out expr> (.  outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BitwiseOr, expr);  .) }
+	.
+
+AndExpr<out Expression outExpr>
+	(. Expression expr; .) =
+	NotExpr<out outExpr> { "And" NotExpr<out expr> (.  outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BitwiseAnd, expr);  .) }
+	.
+
+NotExpr<out Expression outExpr> 
+	(. UnaryOperatorType uop = UnaryOperatorType.None; .) =
+	{	"Not" (. uop = UnaryOperatorType.Not; .) }
+	EqualityExpr<out outExpr>
+                (. if (uop != UnaryOperatorType.None)
+	                   outExpr = new UnaryOperatorExpression(outExpr, uop);
+                .)
+	.
+
+EqualityExpr<out Expression outExpr>
+	(.
+		Expression expr;
+		BinaryOperatorType op = BinaryOperatorType.None;
+	.) =
+	RelationalExpr<out outExpr>
+	{
+		(
+			"<>"		(. op = BinaryOperatorType.InEquality; .)
+			| "=" 		(. op = BinaryOperatorType.Equality; .)
+			| "Like"	(. op = BinaryOperatorType.Like; .)
+		)
+		RelationalExpr<out expr> (.  outExpr = new BinaryOperatorExpression(outExpr, op, expr);  .) 
+	}
+	.
+
+RelationalExpr<out Expression outExpr>
+	(.
+		Expression expr;
+		BinaryOperatorType op = BinaryOperatorType.None;
+	.) =
+	ShiftExpr<out outExpr>
+	{
+		(
+			"<"    (. op = BinaryOperatorType.LessThan; .)
+			| ">"  (. op = BinaryOperatorType.GreaterThan; .)
+			| "<=" (. op = BinaryOperatorType.LessThanOrEqual; .)
+			| ">=" (. op = BinaryOperatorType.GreaterThanOrEqual; .)
+		)
+		ShiftExpr<out expr> (.  outExpr = new BinaryOperatorExpression(outExpr, op, expr);  .)
+		|
+		/* 11.5.3 */
+		"Is" (. op = BinaryOperatorType.IS; .)
+		Expr<out expr> (.  outExpr = new BinaryOperatorExpression(outExpr, op, expr); .)
+	}
+	.
+
+ShiftExpr<out Expression outExpr>
+	(.
+		Expression expr;
+		BinaryOperatorType op = BinaryOperatorType.None;
+	.) =
+	AdditiveExpr<out outExpr> 
+	{
+		(
+			"<<"   (. op = BinaryOperatorType.ShiftLeft; .)
+			| ">>" (. op = BinaryOperatorType.ShiftRight; .)
+		)
+		AdditiveExpr<out expr> (.  outExpr = new BinaryOperatorExpression(outExpr, op, expr);  .) 
+	}
+	.
+
+AdditiveExpr<out Expression outExpr>
+	(.
+		Expression expr;
+		BinaryOperatorType op = BinaryOperatorType.None;
+	.) =
+	MultiplicativeExpr<out outExpr>
+	{
+		(
+			"+"   (. op = BinaryOperatorType.Add; .)
+			| "-" (. op = BinaryOperatorType.Subtract; .)
+			| "&" (. op = BinaryOperatorType.Concat; .)
+		)
+		MultiplicativeExpr<out expr> (.  outExpr = new BinaryOperatorExpression(outExpr, op, expr);  .)
+	}
+	.
+
+MultiplicativeExpr<out Expression outExpr>
+	(.
+		Expression expr;
+		BinaryOperatorType op = BinaryOperatorType.None;
+	.) =
+    UnaryExpr<out outExpr>
+	{
+		(
+			"*"   (. op = BinaryOperatorType.Multiply; .)
+			| "/" (. op = BinaryOperatorType.Divide; .)
+			| "\\" (. op = BinaryOperatorType.DivideInteger; .)
+			| "Mod" (. op = BinaryOperatorType.Modulus; .)
+			| "^"	(. op = BinaryOperatorType.Power; .)
+		) 
+		UnaryExpr<out expr> (. outExpr = new BinaryOperatorExpression(outExpr, op, expr); .) 
+	}
+	.
+	
+ObjectCreateExpression<out Expression oce>
+	(.
+		TypeReference type = null;
+		Expression initializer = null;
+		ArrayList arguments = null;
+		oce = null;
+	.) =
+	"New" ArrayTypeName<out type>
+	["("
+		[ ArgumentList<out arguments> ]
+	")"
+	]
+	[
+		ArrayInitializer<out initializer>
+	]
+	(.
+		if(initializer == null) {
+			oce = new ObjectCreateExpression(type, arguments);
+		} else {
+			ArrayCreateExpression ace = new ArrayCreateExpression(type, initializer as ArrayInitializerExpression);
+			ace.Parameters = arguments;
+			oce = ace;
+		}
+	.)
+	.
+
+/* 9.3.2 */
+ArgumentList<out ArrayList arguments>
+	(.
+		arguments = new ArrayList();
+		Expression expr = null;
+	.) =
+	[
+		Argument<out expr>			(. arguments.Add(expr); .)
+		{
+			","
+			Argument<out expr>		(. arguments.Add(expr); .)
+		}
+	]
+	.
+
+/* Spec, 11.8 */
+Argument<out Expression argumentexpr>
+	(.
+		Expression expr;
+		argumentexpr = null;
+		string name;
+	.) =
+	IF(IsNamedAssign()) Identifier (. name = t.val;  .) ":" "=" Expr<out expr>
+	(.
+		argumentexpr = new NamedArgumentExpression(name, expr);
+	.)
+	|
+	Expr<out argumentexpr>
+	.
+
+/* 7.1. */
+TypeName<out TypeReference typeref>
+	(.
+		ArrayList rank = null;
+	.) =
+	NonArrayTypeName<out typeref>
+	ArrayTypeModifiers<out rank>
+	(.
+		typeref = new TypeReference(typeref == null ? "UNKNOWN" : typeref.Type, rank);
+	.)
+	.
+	
+
+ArrayTypeName<out TypeReference typeref>
+	(.
+		ArrayList rank = null;
+	.) =
+	NonArrayTypeName<out typeref>
+	ArrayInitializationModifiers<out rank>
+	(.
+		typeref = new TypeReference(typeref == null ? "UNKNOWN" : typeref.Type, rank);
+	.)
+	.
+
+/* 7.1 */
+NonArrayTypeName<out TypeReference typeref>
+	(.
+		string name;
+		typeref = null;
+	.) =
+	Qualident<out name> (. typeref = new TypeReference(name); .)
+	| "Object" (. typeref = new TypeReference("System.Object"); .)
+	| PrimitiveTypeName<out name> (. typeref = new TypeReference(name); .)
+	.
+
+ArrayInitializationModifiers<out ArrayList arrayModifiers>
+	(.
+		arrayModifiers = new ArrayList();
+		ArrayList dim = new ArrayList();
+	.) =
+	{	
+		IF (IsDims()) "("
+		[ InitializationRankList <out dim>]
+		(.
+			arrayModifiers.Add(dim);
+		.)
+		")"
+	}
+	(.
+		if(arrayModifiers.Count == 0) {
+			 arrayModifiers = null;
+		}
+	.)
+	.
+
+/* 7.9 */
+ArrayTypeModifiers<out ArrayList arrayModifiers>
+	(.
+		arrayModifiers = new ArrayList();
+		int i = 0;
+	.) =
+	{	IF (IsRank())
+		"("
+		[ RankList <out i>]
+		(.
+			arrayModifiers.Add(i);
+		.)
+		")"
+	}
+	(.
+		if(arrayModifiers.Count == 0) {
+			 arrayModifiers = null;
+		}
+	.)
+	.
+
+/* 7.9 */
+RankList<out int i>
+	(. i = 0; .) =
+	{ "," (. ++i; .) }
+	.
+
+GlobalAttributeSection =
+	(. Point startPos = t.Location; .)
+	"<" ("Assembly" | "Module")
+		(.
+			string attributeTarget = t.val.ToLower();
+			ArrayList attributes = new ArrayList();
+			ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute attribute;
+		.)
+	":" Attribute<out attribute> (. attributes.Add(attribute); .)
+	{ IF (NotFinalComma()) "," Attribute<out attribute> (. attributes.Add(attribute); .)}
+	[ "," ]
+	">"
+	EndOfStmt
+		(.
+			AttributeSection section = new AttributeSection(attributeTarget, attributes);
+			section.StartLocation = startPos;
+			section.EndLocation = t.EndLocation;
+			compilationUnit.AddChild(section);
+		.)
+	.
+
+/* Spec, 5. */
+Attribute<out ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute attribute>
+	(. string qualident; .) =
+	Qualident<out qualident>
+		(.
+			ArrayList positional = new ArrayList();
+			ArrayList named      = new ArrayList();
+			string name = qualident;
+		.)
+	[ AttributeArguments<ref positional, ref named> ]
+	(.
+		attribute  = new ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute(name, positional, named);
+	.)
+	.
+
+/* Spec, 5.2.2 */
+AttributeArguments<ref ArrayList positional, ref ArrayList named>
+	(.
+		bool nameFound = false;
+		string name = "";
+		Expression expr;
+	.) =
+	"("
+	[
+		IF (IsNotClosingParenthesis()) ( 
+			[
+				IF (IsNamedAssign()) (. nameFound = true; .)
+				IdentifierOrKeyword<out name>
+				[":"] "="
+			] Expr<out expr>
+				(.
+					if(name == "") positional.Add(expr);
+					else { named.Add(new NamedArgumentExpression(name, expr)); name = ""; }
+				.)
+			{
+				","
+					(
+						IF (IsNamedAssign())	(. nameFound = true; .)
+						IdentifierOrKeyword<out name>
+						[ ":" ] "="
+						| (. if (nameFound) Error("no positional argument after named argument"); .)
+					) Expr<out expr>	(. 	if(name == "") positional.Add(expr);
+											else { named.Add(new NamedArgumentExpression(name, expr)); name = ""; }
+										.)
+			}
+		)
+	]
+	")"
+	.
+
+/* Spec, 5. */
+AttributeSection<out AttributeSection section>
+	(.
+		string attributeTarget = "";
+		ArrayList attributes = new ArrayList();
+		ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute attribute;
+		
+	.) =
+	"<" (. Point startPos = t.Location; .)
+	[ IF (IsLocalAttrTarget())
+		( "Event"		(. attributeTarget = "event";.)
+		| "Return"		(. attributeTarget = "return";.)
+		| Identifier
+			(.
+				string val = t.val.ToLower();
+				if (val != "field"	|| val != "method" ||
+					val != "module" || val != "param"  ||
+					val != "property" || val != "type")
+				Error("attribute target specifier (event, return, field," +
+						"method, module, param, property, or type) expected");
+				attributeTarget = t.val;
+			.)
+		) ":" 
+	]
+	Attribute<out attribute>	(. attributes.Add(attribute); .)
+	{ IF (NotFinalComma()) "," Attribute<out attribute> (. attributes.Add(attribute); .) }
+	[ "," ]
+	">"
+		(.
+			section = new AttributeSection(attributeTarget, attributes);
+			section.StartLocation = startPos;
+			section.EndLocation = t.EndLocation;
+		.)
+	.
+
+/* 9.2.5 */
+FormalParameterList<out ArrayList parameter>
+	(.
+		parameter = new ArrayList();
+		ParameterDeclarationExpression p;
+		AttributeSection section;
+		ArrayList attributes = new ArrayList();
+	.) =
+	{ AttributeSection<out section> (.attributes.Add(section); .) }
+	(
+		FormalParameter<out p>
+		(.
+			bool paramsFound = false;
+			p.Attributes = attributes;
+			parameter.Add(p);
+		.)
+		{
+			","	(. attributes = new ArrayList(); if (paramsFound) Error("params array must be at end of parameter list"); .)
+			{ AttributeSection<out section> (.attributes.Add(section); .) }
+			(
+				FormalParameter <out p>	(. p.Attributes = attributes; parameter.Add(p); .)
+			)
+		}
+	)
+	.
+/* 9.2.5 */
+FormalParameter<out ParameterDeclarationExpression p>
+	(.
+		TypeReference type = null;
+		ParamModifiers mod = new ParamModifiers(this);
+		Expression expr = null;
+		p = null;
+		ArrayList arrayModifiers = null;
+	.) =
+	{ ParameterModifier<mod> }
+	Identifier (. string parameterName = t.val; .)
+	[ IF(IsRank()) ArrayTypeModifiers<out arrayModifiers> ]
+	[ "As" TypeName<out type> ]
+	(.
+		if(type != null) {
+			if (arrayModifiers != null) {
+				if (type.RankSpecifier != null) {
+					Error("array rank only allowed one time");
+				} else {
+					type.RankSpecifier = arrayModifiers;
+				}
+			}
+		} else {
+			type = new TypeReference("System.Object", arrayModifiers);
+		}
+	.)
+	[ "=" Expr<out expr> ]
+	(.
+		mod.Check();
+		p = new ParameterDeclarationExpression(type, parameterName, mod, expr);
+	.)
+	.
+
+/* 10.1 */
+Block<out Statement stmt>
+	=
+	(.
+		BlockStatement blockStmt = new BlockStatement();
+		blockStmt.StartLocation = t.Location;
+		compilationUnit.BlockStart(blockStmt);
+	.)
+	{ Statement EndOfStmt |
+	  IF (IsEndStmtAhead()) "End" EndOfStmt (. compilationUnit.AddChild(new EndStatement()); .) 
+	}
+	(.
+		stmt = blockStmt;
+		blockStmt.EndLocation = t.EndLocation;
+		compilationUnit.BlockEnd();
+	.)
+	.
+
+Statement
+	(.
+		Statement stmt;
+		string label = String.Empty;
+		
+	.) =
+	IF (IsLabel()) LabelName<out label>
+	(.
+		labelStatement = new LabelStatement(t.val);
+		compilationUnit.AddChild(labelStatement);
+	.)
+	":" [ (. isLabel = true; .) Statement ]
+	| EmbeddedStatement<out stmt>			(. updateLabelStatement(stmt); .)
+	| LocalDeclarationStatement<out stmt>	(. updateLabelStatement(stmt); .)
+	.
+
+/* 10.2 */
+LocalDeclarationStatement<out Statement statement>
+	(.
+		Modifiers m = new Modifiers(this);
+		ArrayList vars = new ArrayList();
+		LocalVariableDeclaration localVariableDeclaration;
+		bool dimfound = false;
+	.) =
+	/* this differs from the spec: dim static x	compiles with vbc. */
+	{
+		"Const" 	(. m.Add(Modifier.Constant); .)
+		| "Static"	(. m.Add(Modifier.Static); .)
+		| "Dim"		(. dimfound = true; .)
+	}
+	(.
+		if(dimfound && (m.Modifier & Modifier.Constant) != 0) {
+			Error("Dim is not allowed on constants.");
+		}
+		
+		if(m.isNone && dimfound == false) {
+			Error("Const, Dim or Static expected");
+		}
+		
+		localVariableDeclaration = new LocalVariableDeclaration(m.Modifier);
+		localVariableDeclaration.StartLocation = t.Location;
+	.)
+	VariableDeclarator<vars>
+	{ "," VariableDeclarator<vars> }
+	(.
+		localVariableDeclaration.Variables = vars;
+		statement = localVariableDeclaration;
+	.)
+	.
+
+EmbeddedStatement<out Statement statement>
+	(.
+		Statement embeddedStatement = null;
+		statement = null;
+		Expression expr = null;
+		string name = String.Empty;
+		ArrayList p = null;
+	.) =
+		"Exit"				(. ExitType exitType = ExitType.None; .)
+		(
+		"Sub"				(. exitType = ExitType.Sub; .)
+		|
+		"Function"			(. exitType = ExitType.Function; .)
+		|
+		"Property"			(. exitType = ExitType.Property; .)
+		|
+		"Do"				(. exitType = ExitType.Do; .)
+		|
+		"For"				(. exitType = ExitType.For; .)
+		|
+		"Try"				(. exitType = ExitType.Try; .)
+		|
+		"While"				(. exitType = ExitType.While; .)
+		|
+		"Select"			(. exitType = ExitType.Select; .)
+		)
+	(. statement = new ExitStatement(exitType); .)
+	| TryStatement<out statement>
+	| /* 10.10.1.3 */
+	"Throw" [ Expr<out expr> ]				(. statement = new ThrowStatement(expr); .)
+	| /* 10.11 */
+	"Return" [ Expr<out expr> ] 			(. statement = new ReturnStatement(expr); .)
+	| /* 10.4 */
+	"SyncLock" Expr<out expr> EndOfStmt Block<out embeddedStatement>
+	"End" "SyncLock" 						(. statement = new LockStatement(expr, embeddedStatement); .)
+	| /* 10.5.1 */
+	"RaiseEvent" Identifier (. name = t.val; .)
+	[ "(" [ ArgumentList<out p> ] ")" ]
+	(. statement = new RaiseEventStatement(name, p); .)
+	| /* 10.3 */
+	WithStatement<out statement>
+	| /* 10.5.2 */
+	"AddHandler" (. Expression handlerExpr = null; .)
+	Expr<out expr> "," Expr<out handlerExpr>
+	(.
+		statement = new AddHandlerStatement(expr, handlerExpr);
+	.)
+	| /* 10.5.2 */
+	"RemoveHandler" (. Expression handlerExpr = null; .)
+	Expr<out expr> "," Expr<out handlerExpr>
+	(.
+		statement = new RemoveHandlerStatement(expr, handlerExpr);
+	.)
+	| /* 10.9.1 */
+	"While" Expr<out expr> EndOfStmt
+	Block<out embeddedStatement> "End" "While"
+	(.
+		statement = new WhileStatement(expr, embeddedStatement);
+	.)
+	| /* 10.9.1 */
+	"Do"
+	(.
+		ConditionType conditionType = ConditionType.None;
+	.)
+	(
+		WhileOrUntil<out conditionType> Expr<out expr> EndOfStmt
+		Block<out embeddedStatement>
+		"Loop"
+		(.
+			statement = new DoLoopStatement(expr, embeddedStatement, conditionType, ConditionPosition.Start);
+		.)
+		|
+		EndOfStmt
+		Block<out embeddedStatement>
+		"Loop" [WhileOrUntil<out conditionType> Expr<out expr>]
+		(.
+			statement = new DoLoopStatement(expr, embeddedStatement, conditionType, ConditionPosition.End);
+		.)
+	)
+	| "For"
+	(.
+			Expression group = null;
+			LoopControlVariableExpression loopControlExpr = null;
+	.)
+	(
+		/* 10.9.3  */
+ 		"Each" LoopControlVariable<out loopControlExpr>
+		"In" Expr<out group> EndOfStmt
+		Block<out embeddedStatement>
+		"Next" [ Expr<out expr> ]
+		(.
+			statement = new ForeachStatement(loopControlExpr, group, embeddedStatement, expr);
+		.)
+		| /* 10.9.2 */
+		(.
+			Expression start = null;
+			Expression end = null;
+			Expression step = null;
+			Expression nextExpr = null;
+			ArrayList nextExpressions = null;
+		.)
+		LoopControlVariable<out loopControlExpr>
+		"=" Expr<out start> "To" Expr<out end> [ "Step" Expr<out step> ]
+		EndOfStmt Block<out embeddedStatement>
+		"Next"
+		[
+			Expr<out nextExpr> (. nextExpressions = new ArrayList(); nextExpressions.Add(nextExpr); .) 
+			{ "," Expr<out nextExpr> (. nextExpressions.Add(nextExpr); .) }
+		]
+		(.
+			statement = new ForStatement(loopControlExpr, start, end, step, embeddedStatement, nextExpressions);
+		.)
+	)
+	| /* 10.10.2.1 */
+	"Error" Expr<out expr> 				(. statement = new ErrorStatement(expr); .)
+	| /* 10.12.1 */
+	"ReDim" (. Expression clause = null; .) [ "Preserve" ]
+	Expr<out clause>
+	(.
+		ArrayList clauses = new ArrayList();
+		clauses.Add(clause);
+		ReDimStatement reDimStatement = new ReDimStatement(clauses);
+	.)
+	{ "," Expr<out clause> (. clauses.Add(clause); .) }
+	| /* 10.12.2 */
+	"Erase"	
+	Expr<out expr>
+	(.
+		ArrayList arrays = new ArrayList();
+		arrays.Add(expr);
+		EraseStatement eraseStatement = new EraseStatement(arrays);
+		
+	.)
+	{ "," Expr<out expr> (. arrays.Add(expr); .) }
+	(. statement = eraseStatement; .)
+	| /* 10.11 */
+	"Stop" (. statement = new StopStatement(); .)
+	| /* 10.8.1 */
+	"If" Expr<out expr> [ "Then" ] 
+	(	
+		IF (IsEndStmtAhead()) "End" (. statement = new IfStatement(expr, new EndStatement()); .) 
+		|
+		/* multiline if statement */
+		EndOfStmt Block<out embeddedStatement>
+		(.
+			ArrayList elseIfSections = new ArrayList();
+			IfStatement ifStatement = new IfStatement(expr, embeddedStatement);
+		.)
+		{
+			(
+				IF(IsElseIf()) "Else" "If"
+				| "ElseIf"
+			)
+			(. Expression condition = null; Statement block = null; .)
+			Expr<out condition> [ "Then"] EndOfStmt
+			Block<out block>
+			(.
+				ElseIfSection elseIfSection = new ElseIfSection(condition, block);
+				elseIfSections.Add(elseIfSection);
+			.)
+		}
+		[
+			"Else" EndOfStmt
+			Block<out embeddedStatement>
+			(.
+				ifStatement.EmbeddedElseStatement = embeddedStatement;
+			.)
+		] "End" "If"
+		(.
+			ifStatement.ElseIfStatements = elseIfSections;
+			statement = ifStatement;
+		.)
+		| /* singleline if statement */
+		EmbeddedStatement<out embeddedStatement>
+		(.
+			SimpleIfStatement ifStatement = new SimpleIfStatement(expr);
+			ArrayList statements = new ArrayList();
+			statements.Add(embeddedStatement);
+			ifStatement.Statements = statements;
+		.)
+		{ ":" EmbeddedStatement<out embeddedStatement> (. statements.Add(embeddedStatement); .) }
+		[
+			"Else" [ EmbeddedStatement<out embeddedStatement> ]
+			(.
+				ArrayList elseStatements = new ArrayList();
+				elseStatements.Add(embeddedStatement);
+				ifStatement.ElseStatements = elseStatements;
+			.)
+			{
+				":" EmbeddedStatement<out embeddedStatement>
+				(. elseStatements.Add(embeddedStatement); .)
+			}
+		]
+		(. statement = ifStatement; .)
+	)
+	| /* 10.8.2 */
+	"Select" [ "Case" ] Expr<out expr> EndOfStmt
+	(.
+		ArrayList selectSections = new ArrayList();
+		Statement block = null;
+	.)
+	{
+		(. ArrayList caseClauses = null; .)
+		"Case" CaseClauses<out caseClauses> [ IF(IsNotStatementSeparator()) ":" ] EndOfStmt
+		(.
+			SelectSection selectSection = new SelectSection();
+			selectSection.CaseClauses = caseClauses;
+			compilationUnit.BlockStart(selectSection);
+		.)
+		Block<out block>
+		(.
+			selectSection.EmbeddedStatement = block;
+			compilationUnit.BlockEnd();
+			selectSections.Add(selectSection);
+		.)
+	}
+	(. statement = new SelectStatement(expr, selectSections); .)
+	"End" "Select"
+	| (. OnErrorStatement onErrorStatement = null; .)
+	OnErrorStatement<out onErrorStatement> (. statement = onErrorStatement; .)
+	| (. GoToStatement goToStatement = null; .)
+	GoToStatement<out goToStatement> (. statement = goToStatement; .)
+	| (. ResumeStatement resumeStatement = null; .)
+	ResumeStatement<out resumeStatement> (. statement = resumeStatement; .)
+	|/* Statement expression (invocation and assignment) 10.6.1, 10.6.2, 10.6.3 */
+	(.
+		Expression val = null;
+		AssignmentOperatorType op;
+		
+		bool mustBeAssignment = la.kind == Tokens.Plus  || la.kind == Tokens.Minus ||
+		                        la.kind == Tokens.Not   || la.kind == Tokens.Times;
+	.)
+	UnaryExpr<out expr>
+		(
+		AssignmentOperator<out op> Expr<out val>	(. expr = new AssignmentExpression(expr, op, val); .)
+		| (. if (mustBeAssignment) Error("error in assignment."); .)
+		)
+		(.
+			// a field reference expression that stands alone is a
+			// invocation expression without parantheses and arguments
+			if(expr is FieldReferenceOrInvocationExpression) {
+				expr = new InvocationExpression(expr, new ArrayList());
+			}
+			statement = new StatementExpression(expr);
+		.)
+	| "Call" UnaryExpr<out expr> (. statement = new StatementExpression(expr); .)
+	.
+
+/* 10.9.2 */
+LoopControlVariable<out LoopControlVariableExpression loopExpr>
+	(.
+		loopExpr = null;
+		//Expression expr = null;
+		TypeReference type = null;
+		ArrayList arrayModifiers = null;
+		string name;
+	.) =
+	Qualident<out name>
+	[ IF(IsRank()) ArrayTypeModifiers<out arrayModifiers> ]
+	[ "As" TypeName<out type> (. if (name.IndexOf('.') > 0) { Error("No type def for 'for each' member indexer allowed."); } .) ]
+	(.
+		if(type != null) {
+			if(type.RankSpecifier != null && arrayModifiers != null) {
+				Error("array rank only allowed one time");
+			} else {
+				type.RankSpecifier = arrayModifiers;
+			}
+		} else {
+			type = new TypeReference("Integer", arrayModifiers);
+		}
+		loopExpr = new LoopControlVariableExpression(name, type);
+	.)
+	.
+
+/* 10.2.2 */
+OnErrorStatement<out OnErrorStatement stmt>
+	(.
+		stmt = null;
+		GoToStatement goToStatement = null;
+	.)
+	=
+	"On" "Error"
+	(
+		IF(IsNegativeLabelName())"GoTo" "-" LiteralInteger
+		(.
+			long intLabel = Int64.Parse(t.val);
+			if(intLabel != 1) {
+				Error("invalid label in on error statement.");
+			}
+			stmt = new OnErrorStatement(new GoToStatement((intLabel * -1).ToString()));
+		.)
+		| GoToStatement<out goToStatement>
+		(.
+			string val = goToStatement.LabelName;
+			
+			// if value is numeric, make sure that is 0
+			try {
+				long intLabel = Int64.Parse(val);
+				if(intLabel != 0) {
+					Error("invalid label in on error statement.");
+				}
+			} catch {
+			}
+			stmt = new OnErrorStatement(goToStatement);
+		.)
+		| "Resume" "Next"
+		(.
+			stmt = new OnErrorStatement(new ResumeStatement(true));
+		.)
+	)
+	.
+
+/* 10.11 */
+GoToStatement<out GoToStatement goToStatement>
+	(.
+		string label = String.Empty;
+	.)
+	=
+	"GoTo" LabelName<out label>
+	(.
+		goToStatement = new GoToStatement(label);
+	.)
+	.
+
+/* 10.1 */
+LabelName<out string name>
+	(.
+		name = String.Empty;
+	.) =
+	Identifier 				(. name = t.val; .)
+	| LiteralInteger	(. name = t.val; .)
+	.
+
+/* 10.10.2.3 */
+ResumeStatement<out ResumeStatement resumeStatement>
+	(.
+		resumeStatement = null;
+		string label = String.Empty;
+	.) =
+	IF(IsResumeNext())
+	"Resume" "Next" 					(. resumeStatement = new ResumeStatement(true); .)
+	| "Resume" [ LabelName<out label> ]	(. resumeStatement = new ResumeStatement(label); .)
+	.
+
+/* 18.8.2 */
+CaseClauses<out ArrayList caseClauses>
+	(.
+		caseClauses = null;
+		CaseClause caseClause = null;
+	.) =
+	CaseClause<out caseClause>
+	(.
+		caseClauses = new ArrayList();
+		caseClauses.Add(caseClause);
+	.)
+	{ "," CaseClause<out caseClause> (. caseClauses.Add(caseClause); .) }
+	.
+
+/* 19.8.2 */
+CaseClause<out CaseClause caseClause>
+	(.
+		Expression expr = null;
+		Expression sexpr = null;
+		BinaryOperatorType op = BinaryOperatorType.None;
+		caseClause = null;
+	.) =
+	"Else"
+	(. caseClause = new CaseClause(true); .)
+	|
+	[ "Is" ] 
+	(
+		"<"		(. op = BinaryOperatorType.LessThan; .)
+		| ">"	(. op = BinaryOperatorType.GreaterThan; .)
+		| "<="	(. op = BinaryOperatorType.LessThanOrEqual; .)
+		| ">="	(. op = BinaryOperatorType.GreaterThanOrEqual; .)
+		| "="	(. op = BinaryOperatorType.Equality; .)
+		| "<>"	(. op = BinaryOperatorType.InEquality; .)
+	)
+	Expr<out expr>
+	(.
+		caseClause = new CaseClause(op, expr);
+	.)
+	| Expr<out expr> [ "To" Expr<out sexpr> ]
+	(.
+		caseClause = new CaseClause(expr, sexpr);
+	.)
+	.
+
+/* 10.9.1 */
+WhileOrUntil<out ConditionType conditionType>
+	(. conditionType = ConditionType.None; .) =
+	"While"		(. conditionType = ConditionType.While; .)
+	| "Until"	(. conditionType = ConditionType.Until; .)
+	.
+
+/* 10.3 */
+WithStatement<out Statement withStatement>
+	(.
+		Statement blockStmt = null;
+		Expression expr = null;
+	.) =
+	"With" (. Point start = t.Location; .)
+	Expr<out expr> EndOfStmt
+	(.
+		withStatement = new WithStatement(expr);
+		withStatement.StartLocation = start;
+		withStatements.Push(withStatement);
+	.)
+	Block<out blockStmt>
+	(.
+		((WithStatement)withStatement).Body = (BlockStatement)blockStmt;
+		withStatements.Pop();
+	.)
+	"End" "With"
+	(. withStatement.EndLocation = t.Location; .)
+	.
+	
+/* 10.10.1 */
+TryStatement<out Statement tryStatement>
+	(.
+		Statement blockStmt = null, finallyStmt = null;
+		ArrayList catchClauses = null;
+	.) =
+	"Try" EndOfStmt
+	Block<out blockStmt>
+	(
+		CatchClauses<out catchClauses>
+		[ "Finally" EndOfStmt Block<out finallyStmt> ]
+		| "Finally" EndOfStmt Block<out finallyStmt>
+	)
+	"End" "Try"
+	(.
+		tryStatement = new TryCatchStatement(blockStmt, catchClauses, finallyStmt);
+	.)
+	.
+
+/* 10.10.1.2 */
+CatchClauses<out ArrayList catchClauses>
+	(.
+		catchClauses = new ArrayList();
+		TypeReference type = null;
+		Statement blockStmt = null;
+		Expression expr = null;
+		string name = String.Empty;
+	.) =
+	{
+		"Catch"
+		[ Identifier (. name = t.val; .) ["As" TypeName<out type>] ]
+		[ "When" Expr<out expr> ]
+		EndOfStmt
+		Block<out blockStmt>
+		(. catchClauses.Add(new CatchClause(type, name, blockStmt, expr)); .)
+	}
+	.
+
+/* 4.7 */
+Qualident<out string qualident>
+	(. string name = String.Empty; .) =
+	Identifier	(. StringBuilder qualidentBuilder = new StringBuilder(t.val); .)
+	{
+		"." IdentifierOrKeyword<out name> (. qualidentBuilder.Append('.');
+	                                         qualidentBuilder.Append(name); 
+	                                       .)
+	}
+	(. qualident = qualidentBuilder.ToString(); .)
+	.
+
+/* This production handles pseudo keywords that are needed in the grammar */
+Identifier	=
+	ident
+	| "Text"
+	| "Binary"
+	| "Compare"
+	.
+
+/* 2.2 */
+IdentifierOrKeyword<out string name>
+	(.
+		name = String.Empty;
+	.) =
+	Identifier		(. name = t.val; .)
+	| "AddHandler"		(. name = t.val; .)
+	| "AddressOf"		(. name = t.val; .)
+	| "Alias"			(. name = t.val; .)
+	| "And"				(. name = t.val; .)
+	| "AndAlso"			(. name = t.val; .)
+	| "Ansi"			(. name = t.val; .)
+	| "As"				(. name = t.val; .)
+	| "Assembly"		(. name = t.val; .)
+	| "Auto"			(. name = t.val; .)
+	| "Boolean"			(. name = t.val; .)
+	| "ByRef"			(. name = t.val; .)
+	| "Byte"			(. name = t.val; .)
+	| "ByVal"			(. name = t.val; .)
+	| "Call"			(. name = t.val; .)
+	| "Case"			(. name = t.val; .)
+	| "Catch"			(. name = t.val; .)
+	| "CBool"			(. name = t.val; .)
+	| "CByte"			(. name = t.val; .)
+	| "CChar"			(. name = t.val; .)
+	| "CDate"			(. name = t.val; .)
+	| "CDbl"			(. name = t.val; .)
+	| "CDec"			(. name = t.val; .)
+	| "Char"			(. name = t.val; .)
+	| "CInt"			(. name = t.val; .)
+	| "Class"			(. name = t.val; .)
+	| "CLng"			(. name = t.val; .)
+	| "CObj"			(. name = t.val; .)
+	| "Const"			(. name = t.val; .)
+	| "CShort"			(. name = t.val; .)
+	| "CSng"			(. name = t.val; .)
+	| "CStr"			(. name = t.val; .)
+	| "CType"			(. name = t.val; .)
+	| "Date"			(. name = t.val; .)
+	| "Decimal"			(. name = t.val; .)
+	| "Declare"			(. name = t.val; .)
+	| "Default"			(. name = t.val; .)
+	| "Delegate"		(. name = t.val; .)
+	| "Dim"				(. name = t.val; .)
+	| "DirectCast"		(. name = t.val; .)
+	| "Do"				(. name = t.val; .)
+	| "Double"			(. name = t.val; .)
+	| "Each"			(. name = t.val; .)
+	| "Else"			(. name = t.val; .)
+	| "ElseIf"			(. name = t.val; .)
+	| "End"				(. name = t.val; .)
+	| "EndIf"			(. name = t.val; .)
+	| "Enum"			(. name = t.val; .)
+	| "Erase"			(. name = t.val; .)
+	| "Error"			(. name = t.val; .)
+	| "Event"			(. name = t.val; .)
+	| "Exit"			(. name = t.val; .)
+	| "False"			(. name = t.val; .)
+	| "Finally"			(. name = t.val; .)
+	| "For"				(. name = t.val; .)
+	| "Friend"			(. name = t.val; .)
+	| "Function"		(. name = t.val; .)
+	| "Get"				(. name = t.val; .)
+	| "GetType"			(. name = t.val; .)
+	| "GoSub"			(. name = t.val; .)
+	| "GoTo"			(. name = t.val; .)
+	| "Handles"			(. name = t.val; .)
+	| "If"				(. name = t.val; .)
+	| "Implements"		(. name = t.val; .)
+	| "Imports"			(. name = t.val; .)
+	| "In"				(. name = t.val; .)
+	| "Inherits"		(. name = t.val; .)
+	| "Integer"			(. name = t.val; .)
+	| "Interface"		(. name = t.val; .)
+	| "Is"				(. name = t.val; .)
+	| "Let"				(. name = t.val; .)
+	| "Lib"				(. name = t.val; .)
+	| "Like"			(. name = t.val; .)
+	| "Long"			(. name = t.val; .)
+	| "Loop"			(. name = t.val; .)
+	| "Me"				(. name = t.val; .)
+	| "Mod"				(. name = t.val; .)
+	| "Module"			(. name = t.val; .)
+	| "MustInherit"		(. name = t.val; .)
+	| "MustOverride"	(. name = t.val; .)
+	| "MyBase"			(. name = t.val; .)
+	| "MyClass"			(. name = t.val; .)
+	| "Namespace"		(. name = t.val; .)
+	| "New"				(. name = t.val; .)
+	| "Next"			(. name = t.val; .)
+	| "Not"				(. name = t.val; .)
+	| "Nothing"			(. name = t.val; .)
+	| "NotInheritable"	(. name = t.val; .)
+	| "NotOverridable"	(. name = t.val; .)
+	| "Object"			(. name = t.val; .)
+	| "On"				(. name = t.val; .)
+	| "Option"			(. name = t.val; .)
+	| "Optional"		(. name = t.val; .)
+	| "Or"				(. name = t.val; .)
+	| "OrElse"			(. name = t.val; .)
+	| "Overloads"		(. name = t.val; .)
+	| "Overridable"		(. name = t.val; .)
+	| "Overrides"		(. name = t.val; .)
+	| "ParamArray"		(. name = t.val; .)
+	| "Preserve"		(. name = t.val; .)
+	| "Private"			(. name = t.val; .)
+	| "Property"		(. name = t.val; .)
+	| "Protected"		(. name = t.val; .)
+	| "Public"			(. name = t.val; .)
+	| "RaiseEvent"		(. name = t.val; .)
+	| "ReadOnly"		(. name = t.val; .)
+	| "ReDim"			(. name = t.val; .)
+	| "RemoveHandler"	(. name = t.val; .)
+	| "Resume"			(. name = t.val; .)
+	| "Return"			(. name = t.val; .)
+	| "Select"			(. name = t.val; .)
+	| "Set"				(. name = t.val; .)
+	| "Shadows"			(. name = t.val; .)
+	| "Shared"			(. name = t.val; .)
+	| "Short"			(. name = t.val; .)
+	| "Single"			(. name = t.val; .)
+	| "Static"			(. name = t.val; .)
+	| "Step"			(. name = t.val; .)
+	| "Stop"			(. name = t.val; .)
+	| "String"			(. name = t.val; .)
+	| "Structure"		(. name = t.val; .)
+	| "Sub"				(. name = t.val; .)
+	| "SyncLock"		(. name = t.val; .)
+	| "Then"			(. name = t.val; .)
+	| "Throw"			(. name = t.val; .)
+	| "To"				(. name = t.val; .)
+	| "True"			(. name = t.val; .)
+	| "Try"				(. name = t.val; .)
+	| "TypeOf"			(. name = t.val; .)
+	| "Unicode"			(. name = t.val; .)
+	| "Until"			(. name = t.val; .)
+	| "Variant"			(. name = t.val; .)
+	| "Wend"			(. name = t.val; .)
+	| "When"			(. name = t.val; .)
+	| "While"			(. name = t.val; .)
+	| "With"			(. name = t.val; .)
+	| "WithEvents"		(. name = t.val; .)
+	| "WriteOnly"		(. name = t.val; .)
+	| "Xor"				(. name = t.val; .)
+	.
+
+/* 7.3 */
+PrimitiveTypeName<out string type>
+	(. type = String.Empty; .) =
+	"Boolean"		(. type = "Boolean"; .)
+	| "Date"		(. type = "Date"; .)
+	| "Char"		(. type = "Char"; .)
+	| "String"		(. type = "String"; .)
+	| "Decimal"		(. type = "Decimal"; .)
+	| "Byte"		(. type = "Byte"; .)
+	| "Short"		(. type = "Short"; .)
+	| "Integer"		(. type = "Integer"; .)
+	| "Long"		(. type = "Long"; .)
+	| "Single"		(. type = "Single"; .)
+	| "Double"		(. type = "Double"; .)
+	.
+
+ParameterModifier<ParamModifiers m>
+	= "ByVal"			(. m.Add(ParamModifier.ByVal); .)
+	| "ByRef"			(. m.Add(ParamModifier.ByRef); .)
+	| "Optional"		(. m.Add(ParamModifier.Optional); .)
+	| "ParamArray"		(. m.Add(ParamModifier.ParamArray); .)
+	.
+
+TypeModifier<Modifiers m>
+	= "Public"			(. m.Add(Modifier.Public); .)
+	| "Protected"		(. m.Add(Modifier.Protected); .)
+	| "Friend"			(. m.Add(Modifier.Friend); .)
+	| "Private"			(. m.Add(Modifier.Private); .)
+	| "Shared"			(. m.Add(Modifier.Shared); .)
+	| "Shadows"			(. m.Add(Modifier.Shadows); .)
+	| "MustInherit"		(. m.Add(Modifier.MustInherit); .)
+	| "NotInheritable"	(. m.Add(Modifier.NotInheritable); .)
+	.
+
+MemberModifier<Modifiers m> =
+	"MustInherit"		(.m.Add(Modifier.MustInherit);.)
+	|"Default"			(.m.Add(Modifier.Default);.)
+	|"Friend"			(.m.Add(Modifier.Friend);.)
+	|"Shadows"			(.m.Add(Modifier.Shadows);.)
+	|"Overrides"		(.m.Add(Modifier.Overrides);.)
+	|"MustOverride"		(.m.Add(Modifier.MustOverride);.)
+	|"Private"			(.m.Add(Modifier.Private);.)
+	|"Protected"		(.m.Add(Modifier.Protected);.)
+	|"Public"			(.m.Add(Modifier.Public);.)
+	|"NotInheritable"	(.m.Add(Modifier.NotInheritable);.)
+	|"NotOverridable"	(.m.Add(Modifier.NotOverridable);.)
+	|"Shared"			(.m.Add(Modifier.Shared);.)
+	|"Overridable"		(.m.Add(Modifier.Overridable);.)
+	|"Overloads"		(.m.Add(Modifier.Overloads);.)
+	| "ReadOnly"		(.m.Add(Modifier.ReadOnly);.)
+	| "WriteOnly"		(.m.Add(Modifier.WriteOnly);.)
+	| "WithEvents"		(.m.Add(Modifier.WithEvents);.)
+	| "Dim"				(.m.Add(Modifier.Dim);.)
+	.
+
+END VBNET.

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/buildparser.cmd
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/buildparser.cmd	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/buildparser.cmd	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,4 @@
+ at echo off
+SharpCoco -namespace ICSharpCode.SharpRefactory.Parser.VB VBNET.ATG
+del Parser.old.cs
+pause
\ No newline at end of file

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/BuildKeywords.pl
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/BuildKeywords.pl	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/BuildKeywords.pl	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,222 @@
+#!/bin/perl
+
+# File names
+$keyword_file     = "KeywordList.txt";
+$keywords_outfile = "Keywords.cs";
+$tokens_outfile   = "Tokens.cs";
+$ATGTokensSection = "ATGTokensSection.gen";
+
+#read infile
+print "\n";
+print "Reading keyword definition from '$keyword_file'.\n";
+open(DAT, $keyword_file) || die("Could not open file!");
+ at raw_data=<DAT>;
+close(DAT);
+print "done.\n";
+
+#analyse infile
+print "starting analysation ... this could take a few minutes.\n";
+
+foreach (@raw_data) {
+	if ($_=~/\A\s*\$(\w+)\s*=\s*(\S+)/) {
+		#properties form: $PROPERTY = "VALUE"
+		$properties{$1} = $2;
+	} elsif  ($_=~/\A\s*(\w+)\s*=\s*(\S+)/) {
+		#special characters form: name = "VALUE"
+		$special_chars[$#special_chars + 1] = $1;
+		$special_values[$#special_values + 1] = $2;
+	} elsif  ($_=~/\A\s*\"(\S+)\s*\"/) {
+		#special keywords form: "VALUE"
+		$keywords[$#keywords + 1] = $1
+	} elsif  ($_=~/\A\s*(\w+)\s*/) {
+		#special terminal classes form: name
+		$terminals[$#terminals + 1] = $1
+	}
+}
+
+for ($i=0; $i <= $#keywords; $i++) {
+	$upperKeywords[$i] = uc $keywords[$i];
+}
+sort (ascend @upperKeywords);
+
+
+sort (ascend @keywords);
+print "done.\n";
+
+#write output
+print "writing output files.\nIf your computer doesn’t respond, then press \"Ctrl-Alt-Delete\"\n";
+print "\n";
+&write_keywordfile;
+print "\n";
+&write_tokensfile;
+print "\n";
+&write_atgtokensfile;
+print "\n";
+print "finished.\n";
+
+sub write_keywordfile {
+	print "  ->Generating Keywords class to file '$keywords_outfile'\n";
+	open(DAT,">$keywords_outfile") || die("Cannot Open File");
+	print DAT "// this file was autogenerated by a tool.\n";
+	print DAT "using System;\n";
+	print DAT "using System.Collections;\n";
+	print DAT "using System.Text;\n";
+	print DAT "\n";
+	print DAT "namespace " . $properties{'Namespace'} . "\n";
+	print DAT "{\n";
+	print DAT "	public class Keywords\n";
+	print DAT "	{\n";
+	print DAT "		static readonly string[] keywordList = {\n";
+	if ($properties{'UpperCaseKeywords'} eq "True") {
+		for ($i=0; $i <= $#upperKeywords; $i++) {
+			print DAT "			\"$upperKeywords[$i]\"";
+			if ($i + 1 <= $#upperKeywords) {
+				print DAT ",";
+			}
+			print DAT "\n";
+		}
+	} else {
+		for ($i=0; $i <= $#keywords; $i++) {
+			print DAT "			\"$keywords[$i]\"";
+			if ($i + 1 <= $#keywords) {
+				print DAT ",";
+			}
+			print DAT "\n";
+		}
+	}
+	
+	print DAT "		};\n";
+	print DAT "		\n";
+	print DAT "		static Hashtable keywords = new Hashtable();\n";
+	print DAT "		\n";
+	print DAT "		static Keywords()\n";
+	print DAT "		{\n";
+	print DAT "			for (int i = 0; i < keywordList.Length; ++i) {\n";
+	print DAT "				keywords.Add(keywordList[i], i + Tokens.$keywords[0]);\n";
+	print DAT "			}\n";
+	print DAT "		}\n";
+	print DAT "		\n";
+	print DAT "		public static bool IsKeyword(string identifier)\n";
+	print DAT "		{\n";
+	if ($properties{'UpperCaseKeywords'} eq "True") {
+		print DAT "			return keywords[identifier.ToUpper()] != null;\n";
+	} else {
+		print DAT "			return keywords[identifier] != null;\n";
+	}
+	print DAT "		}\n";
+	print DAT "		\n";
+	print DAT "		public static int GetToken(string keyword)\n";
+	print DAT "		{\n";
+	if ($properties{'UpperCaseKeywords'} eq "True") {
+		print DAT "			return (int)keywords[keyword.ToUpper()];\n";
+	} else {
+		print DAT "			return (int)keywords[keyword];\n";
+	}
+	print DAT "		}\n";
+	print DAT "	}\n";
+	print DAT "}\n";
+	
+	close(DAT);
+	print "  ->done.\n";
+}
+
+sub write_token {
+	$formattedString = sprintf("%-20s", $tokenName);
+	if ($tokenName eq "GetType") {
+		print DAT "		new public const int $formattedString = $tokenValue;\n";
+	} else {
+		print DAT "		public const int $formattedString = $tokenValue;\n";
+	}
+	$tokenValue++;
+	
+}
+
+sub write_tokensfile {
+	print "  ->Generating Tokens class to file '$tokens_outfile'\n";
+	open(DAT,">$tokens_outfile") || die("Cannot Open File");
+	print DAT "// this file was autogenerated by a tool.\n";
+	print DAT "using System;\n";
+	print DAT "\n";
+	print DAT "namespace " . $properties{'Namespace'} . "\n";
+	print DAT "{\n";
+	print DAT "	public sealed class Tokens\n";
+	print DAT "	{\n";
+	$tokenValue = 0;
+	
+	print DAT "		// ----- terminal classes -----\n";
+	foreach (@terminals) {
+		$tokenName = $_;
+		write_token();
+	}
+	print DAT "\n";
+	print DAT "		// ----- special character -----\n";
+	foreach (@special_chars) {
+		$tokenName = $_;
+		write_token();
+	}
+	print DAT "\n";
+	print DAT "		// ----- keywords -----\n";
+	foreach (@keywords) {
+		$tokenName = $_;
+		write_token();
+	}
+	print DAT "\n";
+	
+	print DAT "		public static string GetTokenString(int token)\n";
+	print DAT "		{\n";
+	print DAT "			switch (token) {\n";
+	for ($i = 0; $i <= $#special_chars; $i++) {
+		print DAT "				case $special_chars[$i]:\n";
+		print DAT "					return $special_values[$i];\n";
+	}
+	foreach (@keywords) {
+		print DAT "				case $_:\n";
+		print DAT "					return \"$_\";\n";
+	}
+	
+	print DAT "			}\n";
+	print DAT "			throw new System.NotSupportedException(\"Unknown token:\" + token);\n";
+	print DAT "		}\n";
+	print DAT "	}\n";
+	
+	
+	
+	print DAT "}\n";
+	close(DAT);
+	print "  ->done.\n";
+}
+
+sub write_atgtokensfile {
+	print "  ->Generating ATG TOKENS section and writing it to file '$ATGTokensSection'\n";
+	open(DAT,">$ATGTokensSection") || die("Cannot Open File");
+	print DAT "/* START AUTOGENERATED TOKENS SECTION */\n";
+	print DAT "TOKENS\n";
+
+	print DAT "	/* ----- terminal classes ----- */\n";
+	print DAT "	/* EOF is 0 */\n";
+	foreach $term (@terminals) {
+		if ($term eq "EOF") {
+		} elsif ($term eq "Identifier") {
+			print DAT "\tident\n";
+		} else {
+			print DAT "\t$term\n";
+		}
+			
+	}
+	
+	print DAT "\n";
+	print DAT "	/* ----- special character ----- */\n";
+	foreach (@special_values) {
+		print DAT "\t$_\n";
+	}
+	print DAT "\n";
+	print DAT "	/* ----- keywords ----- */\n";
+	foreach (@keywords) {
+		print DAT "\t\"$_\"\n";
+	}
+
+	print DAT "/* END AUTOGENERATED TOKENS SECTION */\n";
+	close(DAT);
+	print "  ->done.\n";
+}
+

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/KeywordList.txt
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/KeywordList.txt	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/KeywordList.txt	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,211 @@
+# this list is used for autogeneration of:
+# - Keywords.cs
+# - Tokens.cs
+# - ATGTokensSection.txt - the TOKENS section of the ATG file
+
+# use BuildKeywords to generate the different lists.
+
+$Namespace=ICSharpCode.SharpRefactory.Parser.VB
+$UpperCaseKeywords=True
+
+# TERMINAL_CLASSES
+EOF
+EOL
+Identifier
+LiteralString
+LiteralCharacter
+LiteralInteger
+LiteralDouble
+LiteralSingle
+LiteralDecimal
+LiteralDate
+
+# SPECIAL_CHARACTERS
+Dot = "."
+Assign = "="
+Comma = ","
+Colon =":"
+Plus = "+"
+Minus = "-"
+Times = "*"
+Div ="/"
+DivInteger = "\\"
+ConcatString = "&"
+Power = "^"
+	
+OpenCurlyBrace = "{"
+CloseCurlyBrace = "}"
+	
+OpenSquareBracket = "["
+CloseSquareBracket ="]"
+	
+OpenParenthesis = "("
+CloseParenthesis = ")"
+	
+GreaterThan = ">"
+LessThan = "<"
+	
+NotEqual = "<>"
+GreaterEqual = ">="
+LessEqual = "<="
+	
+ShiftLeft = "<<"
+ShiftRight = ">>"
+	
+PlusAssign = "+="
+PowerAssign = "^="
+MinusAssign = "-="
+TimesAssign = "*="
+DivAssign = "/="
+DivIntegerAssign = "\\="
+ShiftLeftAssign = "<<="
+ShiftRightAssign = ">>="
+ConcatStringAssign = "&="
+
+# keywords according to the spec:
+# Keywordlist
+"AddHandler"
+"AddressOf"
+"Alias"
+"And"
+"AndAlso"
+"Ansi"
+"As"
+"Assembly"
+"Auto"
+"Binary"
+"Boolean"
+"ByRef"
+"Byte"
+"ByVal"
+"Call"
+"Case"
+"Catch"
+"CBool"
+"CByte"
+"CChar"
+"CDate"
+"CDbl"
+"CDec"
+"Char"
+"CInt"
+"Class"
+"CLng"
+"CObj"
+"Compare"
+"Const"
+"CShort"
+"CSng"
+"CStr"
+"CType"
+"Date"
+"Decimal"
+"Declare"
+"Default"
+"Delegate"
+"Dim"
+"DirectCast"
+"Do"
+"Double"
+"Each"
+"Else"
+"ElseIf"
+"End"
+"EndIf"
+"Enum"
+"Erase"
+"Error"
+"Event"
+"Exit"
+"Explicit"
+"False"
+"Finally"
+"For"
+"Friend"
+"Function"
+"Get"
+"GetType"
+"GoSub"
+"GoTo"
+"Handles"
+"If"
+"Implements"
+"Imports"
+"In"
+"Inherits"
+"Integer"
+"Interface"
+"Is"
+"Let"
+"Lib"
+"Like"
+"Long"
+"Loop"
+"Me"
+"Mod"
+"Module"
+"MustInherit"
+"MustOverride"
+"MyBase"
+"MyClass"
+"Namespace"
+"New"
+"Next"
+"Not"
+"Nothing"
+"NotInheritable"
+"NotOverridable"
+"Object"
+"Off"
+"On"
+"Option"
+"Optional"
+"Or"
+"OrElse"
+"Overloads"
+"Overridable"
+"Override"
+"Overrides"
+"ParamArray"
+"Preserve"
+"Private"
+"Property"
+"Protected"
+"Public"
+"RaiseEvent"
+"ReadOnly"
+"ReDim"
+"RemoveHandler"
+"Resume"
+"Return"
+"Select"
+"Set"
+"Shadows"
+"Shared"
+"Short"
+"Single"
+"Static"
+"Step"
+"Stop"
+"Strict"
+"String"
+"Structure"
+"Sub"
+"SyncLock"
+"Text"
+"Then"
+"Throw"
+"To"
+"True"
+"Try"
+"TypeOf"
+"Unicode"
+"Until"
+"Variant"
+"Wend"
+"When"
+"While"
+"With"
+"WithEvents"
+"WriteOnly"
+"Xor"

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/Keywords.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/Keywords.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/Keywords.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,177 @@
+// this file was autogenerated by a tool.
+using System;
+using System.Collections;
+using System.Text;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+	public class Keywords
+	{
+		static readonly string[] keywordList = {
+			"ADDHANDLER",
+			"ADDRESSOF",
+			"ALIAS",
+			"AND",
+			"ANDALSO",
+			"ANSI",
+			"AS",
+			"ASSEMBLY",
+			"AUTO",
+			"BINARY",
+			"BOOLEAN",
+			"BYREF",
+			"BYTE",
+			"BYVAL",
+			"CALL",
+			"CASE",
+			"CATCH",
+			"CBOOL",
+			"CBYTE",
+			"CCHAR",
+			"CDATE",
+			"CDBL",
+			"CDEC",
+			"CHAR",
+			"CINT",
+			"CLASS",
+			"CLNG",
+			"COBJ",
+			"COMPARE",
+			"CONST",
+			"CSHORT",
+			"CSNG",
+			"CSTR",
+			"CTYPE",
+			"DATE",
+			"DECIMAL",
+			"DECLARE",
+			"DEFAULT",
+			"DELEGATE",
+			"DIM",
+			"DIRECTCAST",
+			"DO",
+			"DOUBLE",
+			"EACH",
+			"ELSE",
+			"ELSEIF",
+			"END",
+			"ENDIF",
+			"ENUM",
+			"ERASE",
+			"ERROR",
+			"EVENT",
+			"EXIT",
+			"EXPLICIT",
+			"FALSE",
+			"FINALLY",
+			"FOR",
+			"FRIEND",
+			"FUNCTION",
+			"GET",
+			"GETTYPE",
+			"GOSUB",
+			"GOTO",
+			"HANDLES",
+			"IF",
+			"IMPLEMENTS",
+			"IMPORTS",
+			"IN",
+			"INHERITS",
+			"INTEGER",
+			"INTERFACE",
+			"IS",
+			"LET",
+			"LIB",
+			"LIKE",
+			"LONG",
+			"LOOP",
+			"ME",
+			"MOD",
+			"MODULE",
+			"MUSTINHERIT",
+			"MUSTOVERRIDE",
+			"MYBASE",
+			"MYCLASS",
+			"NAMESPACE",
+			"NEW",
+			"NEXT",
+			"NOT",
+			"NOTHING",
+			"NOTINHERITABLE",
+			"NOTOVERRIDABLE",
+			"OBJECT",
+			"OFF",
+			"ON",
+			"OPTION",
+			"OPTIONAL",
+			"OR",
+			"ORELSE",
+			"OVERLOADS",
+			"OVERRIDABLE",
+			"OVERRIDE",
+			"OVERRIDES",
+			"PARAMARRAY",
+			"PRESERVE",
+			"PRIVATE",
+			"PROPERTY",
+			"PROTECTED",
+			"PUBLIC",
+			"RAISEEVENT",
+			"READONLY",
+			"REDIM",
+			"REMOVEHANDLER",
+			"RESUME",
+			"RETURN",
+			"SELECT",
+			"SET",
+			"SHADOWS",
+			"SHARED",
+			"SHORT",
+			"SINGLE",
+			"STATIC",
+			"STEP",
+			"STOP",
+			"STRICT",
+			"STRING",
+			"STRUCTURE",
+			"SUB",
+			"SYNCLOCK",
+			"TEXT",
+			"THEN",
+			"THROW",
+			"TO",
+			"TRUE",
+			"TRY",
+			"TYPEOF",
+			"UNICODE",
+			"UNTIL",
+			"VARIANT",
+			"WEND",
+			"WHEN",
+			"WHILE",
+			"WITH",
+			"WITHEVENTS",
+			"WRITEONLY",
+			"XOR"
+		};
+		
+		static Hashtable keywords = new Hashtable();
+		
+		static Keywords()
+		{
+			for (int i = 0; i < keywordList.Length; ++i) {
+				keywords.Add(keywordList[i], i + Tokens.AddHandler);
+			}
+		}
+		
+		public static bool IsKeyword(string identifier)
+		{
+			return keywords[identifier.ToUpper()] != null;
+		}
+		
+		public static int GetToken(string keyword)
+		{
+			return (int)keywords[keyword.ToUpper()];
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/Tokens.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/Tokens.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/Tokens.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,565 @@
+// this file was autogenerated by a tool.
+using System;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+	public sealed class Tokens
+	{
+		// ----- terminal classes -----
+		public const int EOF                  = 0;
+		public const int EOL                  = 1;
+		public const int Identifier           = 2;
+		public const int LiteralString        = 3;
+		public const int LiteralCharacter     = 4;
+		public const int LiteralInteger       = 5;
+		public const int LiteralDouble        = 6;
+		public const int LiteralSingle        = 7;
+		public const int LiteralDecimal       = 8;
+		public const int LiteralDate          = 9;
+
+		// ----- special character -----
+		public const int Dot                  = 10;
+		public const int Assign               = 11;
+		public const int Comma                = 12;
+		public const int Colon                = 13;
+		public const int Plus                 = 14;
+		public const int Minus                = 15;
+		public const int Times                = 16;
+		public const int Div                  = 17;
+		public const int DivInteger           = 18;
+		public const int ConcatString         = 19;
+		public const int Power                = 20;
+		public const int OpenCurlyBrace       = 21;
+		public const int CloseCurlyBrace      = 22;
+		public const int OpenSquareBracket    = 23;
+		public const int CloseSquareBracket   = 24;
+		public const int OpenParenthesis      = 25;
+		public const int CloseParenthesis     = 26;
+		public const int GreaterThan          = 27;
+		public const int LessThan             = 28;
+		public const int NotEqual             = 29;
+		public const int GreaterEqual         = 30;
+		public const int LessEqual            = 31;
+		public const int ShiftLeft            = 32;
+		public const int ShiftRight           = 33;
+		public const int PlusAssign           = 34;
+		public const int PowerAssign          = 35;
+		public const int MinusAssign          = 36;
+		public const int TimesAssign          = 37;
+		public const int DivAssign            = 38;
+		public const int DivIntegerAssign     = 39;
+		public const int ShiftLeftAssign      = 40;
+		public const int ShiftRightAssign     = 41;
+		public const int ConcatStringAssign   = 42;
+
+		// ----- keywords -----
+		public const int AddHandler           = 43;
+		public const int AddressOf            = 44;
+		public const int Alias                = 45;
+		public const int And                  = 46;
+		public const int AndAlso              = 47;
+		public const int Ansi                 = 48;
+		public const int As                   = 49;
+		public const int Assembly             = 50;
+		public const int Auto                 = 51;
+		public const int Binary               = 52;
+		public const int Boolean              = 53;
+		public const int ByRef                = 54;
+		public const int Byte                 = 55;
+		public const int ByVal                = 56;
+		public const int Call                 = 57;
+		public const int Case                 = 58;
+		public const int Catch                = 59;
+		public const int CBool                = 60;
+		public const int CByte                = 61;
+		public const int CChar                = 62;
+		public const int CDate                = 63;
+		public const int CDbl                 = 64;
+		public const int CDec                 = 65;
+		public const int Char                 = 66;
+		public const int CInt                 = 67;
+		public const int Class                = 68;
+		public const int CLng                 = 69;
+		public const int CObj                 = 70;
+		public const int Compare              = 71;
+		public const int Const                = 72;
+		public const int CShort               = 73;
+		public const int CSng                 = 74;
+		public const int CStr                 = 75;
+		public const int CType                = 76;
+		public const int Date                 = 77;
+		public const int Decimal              = 78;
+		public const int Declare              = 79;
+		public const int Default              = 80;
+		public const int Delegate             = 81;
+		public const int Dim                  = 82;
+		public const int DirectCast           = 83;
+		public const int Do                   = 84;
+		public const int Double               = 85;
+		public const int Each                 = 86;
+		public const int Else                 = 87;
+		public const int ElseIf               = 88;
+		public const int End                  = 89;
+		public const int EndIf                = 90;
+		public const int Enum                 = 91;
+		public const int Erase                = 92;
+		public const int Error                = 93;
+		public const int Event                = 94;
+		public const int Exit                 = 95;
+		public const int Explicit             = 96;
+		public const int False                = 97;
+		public const int Finally              = 98;
+		public const int For                  = 99;
+		public const int Friend               = 100;
+		public const int Function             = 101;
+		public const int Get                  = 102;
+		new public const int GetType              = 103;
+		public const int GoSub                = 104;
+		public const int GoTo                 = 105;
+		public const int Handles              = 106;
+		public const int If                   = 107;
+		public const int Implements           = 108;
+		public const int Imports              = 109;
+		public const int In                   = 110;
+		public const int Inherits             = 111;
+		public const int Integer              = 112;
+		public const int Interface            = 113;
+		public const int Is                   = 114;
+		public const int Let                  = 115;
+		public const int Lib                  = 116;
+		public const int Like                 = 117;
+		public const int Long                 = 118;
+		public const int Loop                 = 119;
+		public const int Me                   = 120;
+		public const int Mod                  = 121;
+		public const int Module               = 122;
+		public const int MustInherit          = 123;
+		public const int MustOverride         = 124;
+		public const int MyBase               = 125;
+		public const int MyClass              = 126;
+		public const int Namespace            = 127;
+		public const int New                  = 128;
+		public const int Next                 = 129;
+		public const int Not                  = 130;
+		public const int Nothing              = 131;
+		public const int NotInheritable       = 132;
+		public const int NotOverridable       = 133;
+		public const int Object               = 134;
+		public const int Off                  = 135;
+		public const int On                   = 136;
+		public const int Option               = 137;
+		public const int Optional             = 138;
+		public const int Or                   = 139;
+		public const int OrElse               = 140;
+		public const int Overloads            = 141;
+		public const int Overridable          = 142;
+		public const int Override             = 143;
+		public const int Overrides            = 144;
+		public const int ParamArray           = 145;
+		public const int Preserve             = 146;
+		public const int Private              = 147;
+		public const int Property             = 148;
+		public const int Protected            = 149;
+		public const int Public               = 150;
+		public const int RaiseEvent           = 151;
+		public const int ReadOnly             = 152;
+		public const int ReDim                = 153;
+		public const int RemoveHandler        = 154;
+		public const int Resume               = 155;
+		public const int Return               = 156;
+		public const int Select               = 157;
+		public const int Set                  = 158;
+		public const int Shadows              = 159;
+		public const int Shared               = 160;
+		public const int Short                = 161;
+		public const int Single               = 162;
+		public const int Static               = 163;
+		public const int Step                 = 164;
+		public const int Stop                 = 165;
+		public const int Strict               = 166;
+		public const int String               = 167;
+		public const int Structure            = 168;
+		public const int Sub                  = 169;
+		public const int SyncLock             = 170;
+		public const int Text                 = 171;
+		public const int Then                 = 172;
+		public const int Throw                = 173;
+		public const int To                   = 174;
+		public const int True                 = 175;
+		public const int Try                  = 176;
+		public const int TypeOf               = 177;
+		public const int Unicode              = 178;
+		public const int Until                = 179;
+		public const int Variant              = 180;
+		public const int Wend                 = 181;
+		public const int When                 = 182;
+		public const int While                = 183;
+		public const int With                 = 184;
+		public const int WithEvents           = 185;
+		public const int WriteOnly            = 186;
+		public const int Xor                  = 187;
+
+		string GetTokenString(int token)
+		{
+			switch (token) {
+				case Dot:
+					return ".";
+				case Assign:
+					return "=";
+				case Comma:
+					return ",";
+				case Colon:
+					return ":";
+				case Plus:
+					return "+";
+				case Minus:
+					return "-";
+				case Times:
+					return "*";
+				case Div:
+					return "/";
+				case DivInteger:
+					return "\\";
+				case ConcatString:
+					return "&";
+				case Power:
+					return "^";
+				case OpenCurlyBrace:
+					return "{";
+				case CloseCurlyBrace:
+					return "}";
+				case OpenSquareBracket:
+					return "[";
+				case CloseSquareBracket:
+					return "]";
+				case OpenParenthesis:
+					return "(";
+				case CloseParenthesis:
+					return ")";
+				case GreaterThan:
+					return ">";
+				case LessThan:
+					return "<";
+				case NotEqual:
+					return "<>";
+				case GreaterEqual:
+					return ">=";
+				case LessEqual:
+					return "<=";
+				case ShiftLeft:
+					return "<<";
+				case ShiftRight:
+					return ">>";
+				case PlusAssign:
+					return "+=";
+				case PowerAssign:
+					return "^=";
+				case MinusAssign:
+					return "-=";
+				case TimesAssign:
+					return "*=";
+				case DivAssign:
+					return "/=";
+				case DivIntegerAssign:
+					return "\\=";
+				case ShiftLeftAssign:
+					return "<<=";
+				case ShiftRightAssign:
+					return ">>=";
+				case ConcatStringAssign:
+					return "&=";
+				case AddHandler:
+					return "AddHandler";
+				case AddressOf:
+					return "AddressOf";
+				case Alias:
+					return "Alias";
+				case And:
+					return "And";
+				case AndAlso:
+					return "AndAlso";
+				case Ansi:
+					return "Ansi";
+				case As:
+					return "As";
+				case Assembly:
+					return "Assembly";
+				case Auto:
+					return "Auto";
+				case Binary:
+					return "Binary";
+				case Boolean:
+					return "Boolean";
+				case ByRef:
+					return "ByRef";
+				case Byte:
+					return "Byte";
+				case ByVal:
+					return "ByVal";
+				case Call:
+					return "Call";
+				case Case:
+					return "Case";
+				case Catch:
+					return "Catch";
+				case CBool:
+					return "CBool";
+				case CByte:
+					return "CByte";
+				case CChar:
+					return "CChar";
+				case CDate:
+					return "CDate";
+				case CDbl:
+					return "CDbl";
+				case CDec:
+					return "CDec";
+				case Char:
+					return "Char";
+				case CInt:
+					return "CInt";
+				case Class:
+					return "Class";
+				case CLng:
+					return "CLng";
+				case CObj:
+					return "CObj";
+				case Compare:
+					return "Compare";
+				case Const:
+					return "Const";
+				case CShort:
+					return "CShort";
+				case CSng:
+					return "CSng";
+				case CStr:
+					return "CStr";
+				case CType:
+					return "CType";
+				case Date:
+					return "Date";
+				case Decimal:
+					return "Decimal";
+				case Declare:
+					return "Declare";
+				case Default:
+					return "Default";
+				case Delegate:
+					return "Delegate";
+				case Dim:
+					return "Dim";
+				case DirectCast:
+					return "DirectCast";
+				case Do:
+					return "Do";
+				case Double:
+					return "Double";
+				case Each:
+					return "Each";
+				case Else:
+					return "Else";
+				case ElseIf:
+					return "ElseIf";
+				case End:
+					return "End";
+				case EndIf:
+					return "EndIf";
+				case Enum:
+					return "Enum";
+				case Erase:
+					return "Erase";
+				case Error:
+					return "Error";
+				case Event:
+					return "Event";
+				case Exit:
+					return "Exit";
+				case Explicit:
+					return "Explicit";
+				case False:
+					return "False";
+				case Finally:
+					return "Finally";
+				case For:
+					return "For";
+				case Friend:
+					return "Friend";
+				case Function:
+					return "Function";
+				case Get:
+					return "Get";
+				case GetType:
+					return "GetType";
+				case GoSub:
+					return "GoSub";
+				case GoTo:
+					return "GoTo";
+				case Handles:
+					return "Handles";
+				case If:
+					return "If";
+				case Implements:
+					return "Implements";
+				case Imports:
+					return "Imports";
+				case In:
+					return "In";
+				case Inherits:
+					return "Inherits";
+				case Integer:
+					return "Integer";
+				case Interface:
+					return "Interface";
+				case Is:
+					return "Is";
+				case Let:
+					return "Let";
+				case Lib:
+					return "Lib";
+				case Like:
+					return "Like";
+				case Long:
+					return "Long";
+				case Loop:
+					return "Loop";
+				case Me:
+					return "Me";
+				case Mod:
+					return "Mod";
+				case Module:
+					return "Module";
+				case MustInherit:
+					return "MustInherit";
+				case MustOverride:
+					return "MustOverride";
+				case MyBase:
+					return "MyBase";
+				case MyClass:
+					return "MyClass";
+				case Namespace:
+					return "Namespace";
+				case New:
+					return "New";
+				case Next:
+					return "Next";
+				case Not:
+					return "Not";
+				case Nothing:
+					return "Nothing";
+				case NotInheritable:
+					return "NotInheritable";
+				case NotOverridable:
+					return "NotOverridable";
+				case Object:
+					return "Object";
+				case Off:
+					return "Off";
+				case On:
+					return "On";
+				case Option:
+					return "Option";
+				case Optional:
+					return "Optional";
+				case Or:
+					return "Or";
+				case OrElse:
+					return "OrElse";
+				case Overloads:
+					return "Overloads";
+				case Overridable:
+					return "Overridable";
+				case Override:
+					return "Override";
+				case Overrides:
+					return "Overrides";
+				case ParamArray:
+					return "ParamArray";
+				case Preserve:
+					return "Preserve";
+				case Private:
+					return "Private";
+				case Property:
+					return "Property";
+				case Protected:
+					return "Protected";
+				case Public:
+					return "Public";
+				case RaiseEvent:
+					return "RaiseEvent";
+				case ReadOnly:
+					return "ReadOnly";
+				case ReDim:
+					return "ReDim";
+				case RemoveHandler:
+					return "RemoveHandler";
+				case Resume:
+					return "Resume";
+				case Return:
+					return "Return";
+				case Select:
+					return "Select";
+				case Set:
+					return "Set";
+				case Shadows:
+					return "Shadows";
+				case Shared:
+					return "Shared";
+				case Short:
+					return "Short";
+				case Single:
+					return "Single";
+				case Static:
+					return "Static";
+				case Step:
+					return "Step";
+				case Stop:
+					return "Stop";
+				case Strict:
+					return "Strict";
+				case String:
+					return "String";
+				case Structure:
+					return "Structure";
+				case Sub:
+					return "Sub";
+				case SyncLock:
+					return "SyncLock";
+				case Text:
+					return "Text";
+				case Then:
+					return "Then";
+				case Throw:
+					return "Throw";
+				case To:
+					return "To";
+				case True:
+					return "True";
+				case Try:
+					return "Try";
+				case TypeOf:
+					return "TypeOf";
+				case Unicode:
+					return "Unicode";
+				case Until:
+					return "Until";
+				case Variant:
+					return "Variant";
+				case Wend:
+					return "Wend";
+				case When:
+					return "When";
+				case While:
+					return "While";
+				case With:
+					return "With";
+				case WithEvents:
+					return "WithEvents";
+				case WriteOnly:
+					return "WriteOnly";
+				case Xor:
+					return "Xor";
+			}
+			throw new System.NotSupportedException("Unknown token:" + token);
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/SharpRefactory.prjx
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/SharpRefactory.prjx	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/SharpRefactory.prjx	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,283 @@
+<Project name="SharpRefactoryVB" standardNamespace="NewProject" description="" newfilesearch="None" enableviewstate="True" version="1.1" projecttype="C#">
+  <Contents>
+    <File name=".\AssemblyInfo.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Main.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\AbstractASTVisitor.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\AbstractNode.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\CompilationUnit.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Enums.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\IASTVisitor.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\INode.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\generated\Parser.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\generated\VBNET.ATG" subtype="Code" buildaction="Nothing" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\OptionStrictDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\ImportsAliasDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\ImportsStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\OptionExplicitDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\OptionCompareDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\ImportsDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\TypeDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\NamespaceDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\NamedArgumentExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\Expression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\AttributeDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Modifier.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\SharpRefactory.prjx~" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Lexer\Lexer.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\generated\keywordlist\Tokens.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Lexer\Reader\FileReader.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Lexer\Reader\IReader.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Lexer\Reader\StringReader.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Lexer\Specials\Comment.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Lexer\Specials\CommentType.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Lexer\Specials\NewLine.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Lexer\Specials\PreProcessingDirective.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Lexer\Specials\SpecialTracker.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\generated\buildparser.cmd" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\cs.ATG" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\Parser.frame" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\ParserUtil.cs" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\Scanner.frame" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\trace.txt" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\keywordlist\Keywords.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\generated\Errors.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\generated\Modifiers.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\generated\keywordlist\.KewordList.tokens.swp" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\keywordlist\.KewordList.upper.swp" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\keywordlist\BuildKeywords.cs" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\keywordlist\KeywordList.txt" subtype="Code" buildaction="Nothing" dependson="" data="" />
+    <File name=".\Parser\AST\TypeLevel\TypeReference.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\AssignmentExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\UnaryOperatorExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\BinaryOperatorExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\PrimitiveExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\ThisReferenceExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\BaseReferenceExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\InvocationExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\IdentifierExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\ParenthesizedExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\TypeReferenceExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\ObjectCreateExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\.svn\text-base\AssemblyInfo.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\.svn\text-base\Main.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\.svn\text-base\SharpRefactory.prjx.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\.svn\wcprops\AssemblyInfo.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\.svn\wcprops\Main.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\.svn\wcprops\SharpRefactory.prjx.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Lexer\.svn\text-base\Keywords.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Lexer\.svn\text-base\Lexer.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Lexer\.svn\text-base\Tokens.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Lexer\.svn\wcprops\Keywords.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Lexer\.svn\wcprops\Lexer.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Lexer\.svn\wcprops\Tokens.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Lexer\Reader\.svn\text-base\FileReader.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Lexer\Reader\.svn\text-base\IReader.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Lexer\Reader\.svn\text-base\StringReader.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Lexer\Reader\.svn\wcprops\FileReader.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Lexer\Reader\.svn\wcprops\IReader.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Lexer\Reader\.svn\wcprops\StringReader.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Lexer\Specials\.svn\text-base\Comment.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Lexer\Specials\.svn\text-base\CommentType.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Lexer\Specials\.svn\text-base\NewLine.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Lexer\Specials\.svn\text-base\PreProcessingDirective.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Lexer\Specials\.svn\text-base\SpecialTracker.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Lexer\Specials\.svn\wcprops\Comment.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Lexer\Specials\.svn\wcprops\CommentType.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Lexer\Specials\.svn\wcprops\NewLine.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Lexer\Specials\.svn\wcprops\PreProcessingDirective.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Lexer\Specials\.svn\wcprops\SpecialTracker.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\.svn\text-base\AbstractASTVisitor.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\.svn\text-base\AbstractNode.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\.svn\text-base\CompilationUnit.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\.svn\text-base\Enums.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\.svn\text-base\IASTVisitor.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\.svn\text-base\INode.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\.svn\text-base\Modifier.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\.svn\wcprops\AbstractASTVisitor.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\.svn\wcprops\AbstractNode.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\.svn\wcprops\CompilationUnit.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\.svn\wcprops\Enums.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\.svn\wcprops\IASTVisitor.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\.svn\wcprops\INode.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\.svn\wcprops\Modifier.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\text-base\AssignmentExpression.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\text-base\BaseReferenceExpression.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\text-base\BinaryOperatorExpression.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\text-base\Expression.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\text-base\FieldReferenceExpression.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\text-base\IdentifierExpression.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\text-base\InvocationExpression.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\text-base\NamedParameterExpression.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\text-base\ObjectCreateExpression.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\text-base\ParenthesizedExpression.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\text-base\PrimitiveExpression.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\text-base\ThisReferenceExpression.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\text-base\TypeReferenceExpression.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\text-base\UnaryOperatorExpression.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\wcprops\AssignmentExpression.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\wcprops\BaseReferenceExpression.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\wcprops\BinaryOperatorExpression.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\wcprops\Expression.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\wcprops\FieldReferenceExpression.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\wcprops\IdentifierExpression.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\wcprops\InvocationExpression.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\wcprops\NamedParameterExpression.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\wcprops\ObjectCreateExpression.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\wcprops\ParenthesizedExpression.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\wcprops\PrimitiveExpression.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\wcprops\ThisReferenceExpression.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\wcprops\TypeReferenceExpression.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\.svn\wcprops\UnaryOperatorExpression.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\.svn\text-base\AttributeDeclaration.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\.svn\text-base\DebugVisitor.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\.svn\text-base\ImportsAliasClause.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\.svn\text-base\ImportsClause.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\.svn\text-base\ImportsDeclaration.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\.svn\text-base\NamespaceDeclaration.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\.svn\text-base\OptionCompareDeclaration.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\.svn\text-base\OptionExplicitDeclaration.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\.svn\text-base\OptionStrictDeclaration.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\.svn\text-base\TypeDeclaration.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\.svn\wcprops\AttributeDeclaration.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\.svn\wcprops\DebugVisitor.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\.svn\wcprops\ImportsAliasClause.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\.svn\wcprops\ImportsClause.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\.svn\wcprops\ImportsDeclaration.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\.svn\wcprops\NamespaceDeclaration.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\.svn\wcprops\OptionCompareDeclaration.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\.svn\wcprops\OptionExplicitDeclaration.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\.svn\wcprops\OptionStrictDeclaration.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\.svn\wcprops\TypeDeclaration.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\TypeLevel\.svn\text-base\TypeReference.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\TypeLevel\.svn\wcprops\TypeReference.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\.svn\prop-base\BuildKeywords.pdb.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\.svn\prop-base\SharpCoco.exe.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\.svn\props\BuildKeywords.pdb.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\.svn\props\SharpCoco.exe.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\.svn\text-base\BuildKeywords.pdb.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\.svn\text-base\buildparser.cmd.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\.svn\text-base\Error.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\.svn\text-base\Modifiers.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\.svn\text-base\Parser.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\.svn\text-base\Parser.frame.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\.svn\text-base\Scanner.frame.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\.svn\text-base\SharpCoco.exe.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\.svn\text-base\trace.txt.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\.svn\text-base\VBNET.ATG.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\.svn\wcprops\BuildKeywords.pdb.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\.svn\wcprops\buildparser.cmd.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\.svn\wcprops\Error.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\.svn\wcprops\Modifiers.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\.svn\wcprops\Parser.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\.svn\wcprops\Parser.frame.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\.svn\wcprops\Scanner.frame.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\.svn\wcprops\SharpCoco.exe.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\.svn\wcprops\trace.txt.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\.svn\wcprops\VBNET.ATG.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\keywordlist\.svn\prop-base\BuildKeywords.exe.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\keywordlist\.svn\prop-base\BuildKeywords.pdb.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\keywordlist\.svn\props\BuildKeywords.exe.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\keywordlist\.svn\props\BuildKeywords.pdb.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\keywordlist\.svn\text-base\BuildKeywords.cs.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\keywordlist\.svn\text-base\BuildKeywords.exe.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\keywordlist\.svn\text-base\BuildKeywords.pdb.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\keywordlist\.svn\text-base\KewordList.list.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\keywordlist\.svn\text-base\KewordList.tokens.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\keywordlist\.svn\text-base\KewordList.txt.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\keywordlist\.svn\text-base\KewordList.upper.svn-base" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\keywordlist\.svn\wcprops\BuildKeywords.cs.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\keywordlist\.svn\wcprops\BuildKeywords.exe.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\keywordlist\.svn\wcprops\BuildKeywords.pdb.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\keywordlist\.svn\wcprops\KewordList.list.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\keywordlist\.svn\wcprops\KewordList.tokens.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\keywordlist\.svn\wcprops\KewordList.txt.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\generated\keywordlist\.svn\wcprops\KewordList.upper.svn-work" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Lexer\Keywords.cs" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\DebugVisitor.cs" subtype="Code" buildaction="Exclude" dependson="" data="" />
+    <File name=".\Parser\AST\TypeLevel\FieldDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\TypeLevel\VariableDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\ParameterDeclarationExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Statements\Statement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\TypeLevel\MethodDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Statements\BlockStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Statements\EndStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Statements\ExitStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\TypeLevel\HandlesClause.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\TypeLevel\ImplementsClause.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\TypeLevel\DeclareDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\TypeLevel\EventDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\ArrayInitializerExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\TypeLevel\PropertyDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\TypeLevel\PropertyGetRegion.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\TypeLevel\PropertySetRegion.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Statements\TryCatchStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Statements\ThrowStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Statements\ReturnStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Statements\LockStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Statements\RaiseEventStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Statements\WithStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\GlobalScope\DelegateDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Statements\AddHandlerStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\AddressOfExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Statements\RemoveHandlerStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\GetTypeExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\CastExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Statements\WhileStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Statements\DoLoopStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Statements\ForeachStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Statements\ForStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Statements\LocalVariableDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Statements\ErrorStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Statements\EraseStatements.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Statements\StopStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Statements\IfStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Statements\SelectStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\ClassReferenceExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\TypeOfExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Statements\ReDimStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\TypeLevel\ConstructorDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Statements\GoToStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Statements\OnErrorStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Statements\ResumeStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Statements\LabelStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\StatementExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\generated\ParamModifiers.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\FieldReferenceOrInvocationExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\LoopControlVariableExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\Expressions\ArrayCreateExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\CodeDOM\CodeDOMVisitor.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\AST\LookupTableVisitor.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\CSharpConverter\CSharpVisitor.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name=".\Parser\generated\keywordlist\BuildKeywords.pl" subtype="Code" buildaction="Nothing" dependson="" data="" />
+    <File name=".\Lexer\Specials\TagComment.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+  </Contents>
+  <References />
+  <DeploymentInformation target="" script="" strategy="File" />
+  <Configuration runwithwarnings="False" name="Release">
+    <CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="True" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="Library" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
+    <Execution commandlineparameters="" consolepause="True" />
+    <Output directory="..\..\..\..\bin" assembly="ICSharpCode.SharpRefactoryVB" executeScript="..\..\..\..\bin\SharpDevelop.exe" executeBeforeBuild=".\Parser\generated\buildparser.cmd" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
+  </Configuration>
+  <Configurations active="Release">
+    <Configuration runwithwarnings="False" name="Debug">
+      <CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="True" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="Library" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
+      <Execution commandlineparameters="" consolepause="True" />
+      <Output directory="..\..\..\..\bin" assembly="ICSharpCode.SharpRefactoryVB" executeScript="..\..\..\..\bin\SharpDevelop.exe" executeBeforeBuild=".\Parser\generated\buildparser.cmd" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
+    </Configuration>
+    <Configuration runwithwarnings="False" name="Release">
+      <CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="True" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="Library" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
+      <Execution commandlineparameters="" consolepause="True" />
+      <Output directory="..\..\..\..\bin" assembly="ICSharpCode.SharpRefactoryVB" executeScript="..\..\..\..\bin\SharpDevelop.exe" executeBeforeBuild=".\Parser\generated\buildparser.cmd" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
+    </Configuration>
+    <Configuration runwithwarnings="False" name="WithoutParserGeneration">
+      <CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="True" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="Library" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
+      <Execution commandlineparameters="" consolepause="True" />
+      <Output directory="..\..\..\..\bin" assembly="ICSharpCode.SharpRefactoryVB" executeScript="..\..\..\..\bin\SharpDevelop.exe" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
+    </Configuration>
+    <Configuration runwithwarnings="False" name="Exe">
+      <CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="True" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="Exe" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
+      <Execution commandlineparameters="" consolepause="True" />
+      <Output directory="..\bin\Debug" assembly="ICSharpCode.SharpRefactoryVB" executeScript="..\..\..\..\bin\SharpDevelop.exe" executeBeforeBuild=".\Parser\generated\buildparser.cmd" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
+    </Configuration>
+  </Configurations>
+</Project>
\ No newline at end of file

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/SharpRefactoryVB.cmbx
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/SharpRefactoryVB.cmbx	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/SharpRefactoryVB.cmbx	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,16 @@
+<Combine fileversion="1.0" name="SharpRefactoryVB" description="">
+  <StartMode startupentry="SharpRefactoryVB" single="True">
+    <Execute entry="SharpRefactoryVB" type="None" />
+  </StartMode>
+  <Entries>
+    <Entry filename="./SharpRefactoryVB.prjx" />
+  </Entries>
+  <Configurations active="Debug">
+    <Configuration name="Release">
+      <Entry name="SharpRefactoryVB" configurationname="Debug" build="False" />
+    </Configuration>
+    <Configuration name="Debug">
+      <Entry name="SharpRefactoryVB" configurationname="Debug" build="False" />
+    </Configuration>
+  </Configurations>
+</Combine>
\ No newline at end of file

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/SharpRefactoryVB.mdsx
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/SharpRefactoryVB.mdsx	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/SharpRefactoryVB.mdsx	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,3 @@
+<MonoDevelopSolution fileversion="1.0">
+  <RelativeOutputPath>./build/bin</RelativeOutputPath>
+</MonoDevelopSolution>
\ No newline at end of file

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/SharpRefactoryVB.prjx
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/SharpRefactoryVB.prjx	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/SharpRefactoryVB.prjx	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,126 @@
+<Project name="SharpRefactoryVB" description="" newfilesearch="None" enableviewstate="True" version="1.1" projecttype="C#">
+  <Contents>
+    <File name="./AssemblyInfo.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Main.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./CodeDom/CodeDOMVisitor.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./CSharpConverter/CSharpVisitor.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Lexer/Lexer.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Lexer/Reader/FileReader.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Lexer/Reader/IReader.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Lexer/Reader/StringReader.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Lexer/Specials/Comment.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Lexer/Specials/CommentType.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Lexer/Specials/NewLine.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Lexer/Specials/PreProcessingDirective.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Lexer/Specials/SpecialTracker.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Lexer/Specials/TagComment.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/AbstractASTVisitor.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/AbstractNode.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/CompilationUnit.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Enums.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/IASTVisitor.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/INode.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/LookupTableVisitor.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Modifier.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Expressions/AddressOfExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Expressions/ArrayCreateExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Expressions/ArrayInitializerExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Expressions/AssignmentExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Expressions/BaseReferenceExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Expressions/BinaryOperatorExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Expressions/CastExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Expressions/ClassReferenceExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Expressions/Expression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Expressions/FieldReferenceOrInvocationExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Expressions/GetTypeExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Expressions/IdentifierExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Expressions/InvocationExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Expressions/LoopControlVariableExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Expressions/NamedArgumentExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Expressions/ObjectCreateExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Expressions/ParameterDeclarationExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Expressions/ParenthesizedExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Expressions/PrimitiveExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Expressions/StatementExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Expressions/ThisReferenceExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Expressions/TypeOfExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Expressions/TypeReferenceExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Expressions/UnaryOperatorExpression.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/GlobalScope/AttributeDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/GlobalScope/DelegateDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/GlobalScope/ImportsAliasDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/GlobalScope/ImportsDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/GlobalScope/ImportsStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/GlobalScope/NamespaceDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/GlobalScope/OptionCompareDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/GlobalScope/OptionExplicitDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/GlobalScope/OptionStrictDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/GlobalScope/TypeDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Statements/AddHandlerStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Statements/BlockStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Statements/DoLoopStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Statements/EndStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Statements/EraseStatements.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Statements/ErrorStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Statements/ExitStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Statements/ForeachStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Statements/ForStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Statements/GoToStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Statements/IfStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Statements/LabelStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Statements/LocalVariableDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Statements/LockStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Statements/OnErrorStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Statements/RaiseEventStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Statements/ReDimStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Statements/RemoveHandlerStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Statements/ResumeStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Statements/ReturnStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Statements/SelectStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Statements/Statement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Statements/StopStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Statements/ThrowStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Statements/TryCatchStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Statements/WhileStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/Statements/WithStatement.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/TypeLevel/ConstructorDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/TypeLevel/DeclareDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/TypeLevel/EventDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/TypeLevel/FieldDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/TypeLevel/HandlesClause.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/TypeLevel/ImplementsClause.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/TypeLevel/MethodDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/TypeLevel/PropertyDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/TypeLevel/PropertyGetRegion.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/TypeLevel/PropertySetRegion.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/TypeLevel/TypeReference.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/AST/TypeLevel/VariableDeclaration.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/generated/Errors.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/generated/Modifiers.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/generated/ParamModifiers.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/generated/Parser.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/generated/keywordlist/Keywords.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/generated/keywordlist/Tokens.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+  </Contents>
+  <References>
+    <Reference type="Gac" refto="System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" localcopy="True" />
+  </References>
+  <DeploymentInformation target="" script="" strategy="File" />
+  <Configuration runwithwarnings="False" name="Debug">
+    <CodeGeneration runtime="MsNet" compiler="Csc" warninglevel="4" nowarn="" includedebuginformation="True" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="Library" definesymbols="" generatexmldocumentation="False" win32Icon="" />
+    <Execution commandlineparameters="" consolepause="True" />
+    <Output directory="./bin/Debug" assembly="ICSharpCode.SharpRefactory.VB" executeScript="" executeBeforeBuild="" executeAfterBuild="" />
+  </Configuration>
+  <Configurations active="Debug">
+    <Configuration runwithwarnings="False" name="Debug">
+      <CodeGeneration runtime="MsNet" compiler="Csc" warninglevel="4" nowarn="" includedebuginformation="True" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="Library" definesymbols="" generatexmldocumentation="False" win32Icon="" />
+      <Execution commandlineparameters="" consolepause="True" />
+      <Output directory="./bin/Debug" assembly="ICSharpCode.SharpRefactory.VB" executeScript="" executeBeforeBuild="" executeAfterBuild="" />
+    </Configuration>
+    <Configuration runwithwarnings="False" name="Release">
+      <CodeGeneration runtime="MsNet" compiler="Csc" warninglevel="4" nowarn="" includedebuginformation="True" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="Library" definesymbols="" generatexmldocumentation="False" win32Icon="" />
+      <Execution commandlineparameters="" consolepause="True" />
+      <Output directory="./bin/Release" assembly="SharpRefactoryVB" executeScript="" executeBeforeBuild="" executeAfterBuild="" />
+    </Configuration>
+  </Configurations>
+</Project>
\ No newline at end of file

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VB.glade
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VB.glade	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VB.glade	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,1017 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+<requires lib="gnome"/>
+
+<widget class="GtkWindow" id="CodeGenerationPanel">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">CodeGenerationPanel</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+
+  <child>
+    <widget class="GtkVBox" id="vbox62">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">12</property>
+
+      <child>
+	<widget class="GtkLabel" id="label82">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">&lt;b&gt;Code Generation&lt;/b&gt;</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">True</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox56">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">6</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label81">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">    </property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkVBox" id="vbox65">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">6</property>
+
+	      <child>
+		<widget class="GtkTable" id="table7">
+		  <property name="visible">True</property>
+		  <property name="n_rows">3</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">6</property>
+		  <property name="column_spacing">6</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label86">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Compile _Target</property>
+		      <property name="use_underline">True</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="mnemonic_widget">CompileTargetOptionMenu</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label87">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Define S_ymbols</property>
+		      <property name="use_underline">True</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="mnemonic_widget">symbolsEntry</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label88">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_Main Class</property>
+		      <property name="use_underline">True</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="mnemonic_widget">mainClassEntry</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="symbolsEntry">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">False</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="mainClassEntry">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">False</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkOptionMenu" id="CompileTargetOptionMenu">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label90">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">&lt;b&gt;Warnings&lt;/b&gt;</property>
+	  <property name="use_underline">True</property>
+	  <property name="use_markup">True</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox47">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label72">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">    </property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkVBox" id="vbox64">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">6</property>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox55">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">6</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label80">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_Warning Level</property>
+		      <property name="use_underline">True</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="mnemonic_widget">warningLevelSpinButton</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="warningLevelSpinButton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">1</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">False</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">2 0 4 1 1 1</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="generateOverflowChecksCheckButton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">_Generate overflow checks</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="allowUnsafeCodeCheckButton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Allow '_unsafe' code</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="enableOptimizationCheckButton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Enable _optimizations</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="warningsAsErrorsCheckButton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Treat warnings as _errors</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="generateXmlOutputCheckButton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Generate _xml documentation</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="OutputOptionsPanel">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">OutputOptionsPanel</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+
+  <child>
+    <widget class="GtkVBox" id="vbox66">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">12</property>
+
+      <child>
+	<widget class="GtkVBox" id="vbox67">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">6</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label93">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">&lt;b&gt;Output&lt;/b&gt;</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">True</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox57">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">6</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label91">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">    </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox69">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">6</property>
+
+		  <child>
+		    <widget class="GtkTable" id="table10">
+		      <property name="visible">True</property>
+		      <property name="n_rows">3</property>
+		      <property name="n_columns">3</property>
+		      <property name="homogeneous">False</property>
+		      <property name="row_spacing">6</property>
+		      <property name="column_spacing">6</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label98">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Assembly _name</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="mnemonic_widget">assemblyNameEntry</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">0</property>
+			  <property name="right_attach">1</property>
+			  <property name="top_attach">0</property>
+			  <property name="bottom_attach">1</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label99">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Output _path</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="mnemonic_widget">outputDirectoryEntry</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">0</property>
+			  <property name="right_attach">1</property>
+			  <property name="top_attach">1</property>
+			  <property name="bottom_attach">2</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label100">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Paramet_ers</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="mnemonic_widget">parametersEntry</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">0</property>
+			  <property name="right_attach">1</property>
+			  <property name="top_attach">2</property>
+			  <property name="bottom_attach">3</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkEntry" id="outputDirectoryEntry">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">True</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char" translatable="yes">*</property>
+			  <property name="activates_default">False</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">1</property>
+			  <property name="right_attach">2</property>
+			  <property name="top_attach">1</property>
+			  <property name="bottom_attach">2</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkButton" id="browseButton">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">...</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">2</property>
+			  <property name="right_attach">3</property>
+			  <property name="top_attach">1</property>
+			  <property name="bottom_attach">2</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkEntry" id="assemblyNameEntry">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">True</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char" translatable="yes">*</property>
+			  <property name="activates_default">False</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">1</property>
+			  <property name="right_attach">3</property>
+			  <property name="top_attach">0</property>
+			  <property name="bottom_attach">1</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkEntry" id="parametersEntry">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">True</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char" translatable="yes">*</property>
+			  <property name="activates_default">False</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">1</property>
+			  <property name="right_attach">3</property>
+			  <property name="top_attach">2</property>
+			  <property name="bottom_attach">3</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkCheckButton" id="pauseConsoleOutputCheckButton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Pause _console output</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox68">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">6</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label94">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">&lt;b&gt;Execute scripts &lt;/b&gt;</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">True</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox58">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">6</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label92">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">    </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkTable" id="table9">
+		  <property name="visible">True</property>
+		  <property name="n_rows">3</property>
+		  <property name="n_columns">3</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">6</property>
+		  <property name="column_spacing">6</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label95">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Execute Command</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label96">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_After Build</property>
+		      <property name="use_underline">True</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="mnemonic_widget">executeAfterEntry</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label97">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_Before build</property>
+		      <property name="use_underline">True</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="mnemonic_widget">executeBeforeEntry</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="executeScriptEntry">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">False</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="executeAfterEntry">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">False</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="executeBeforeEntry">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">False</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="browseButton2">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">...</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="browseButton3">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">...</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="browseButton4">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">...</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBAmbience.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBAmbience.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBAmbience.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,572 @@
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
+//     <version value="$version"/>
+// </file>
+
+using System;
+using System.Collections;
+using System.Text;
+
+using MonoDevelop.Internal.Parser;
+using MonoDevelop.Core.Properties;
+using MonoDevelop.Core.Services;
+
+namespace MonoDevelop.Services
+{
+	public class VBAmbience :  AbstractAmbience
+	{
+		static string[,] typeConversionList = new string[,] {
+			{"System.String",  "String"},
+			{"System.Single",  "Single"},
+			{"System.Int16",   "Short"},
+			{"System.Void",    "Void"},
+			{"System.Object",  "Object"},
+			{"System.Int64",   "Long"},
+			{"System.Int32",   "Integer"},
+			{"System.Double",  "Double"},
+			{"System.Char",    "Char"},
+			{"System.Boolean", "Boolean"},
+			{"System.Byte",    "Byte"},
+			{"System.Decimal", "Decimal"},
+			{"System.DateTime",  "Date"},
+		};
+		
+		static Hashtable typeConversionTable = new Hashtable();
+		
+		public const bool ShowReturnType=true;
+		
+		static VBAmbience()
+		{
+			for (int i = 0; i < typeConversionList.GetLength(0); ++i) {
+				typeConversionTable[typeConversionList[i, 0]] = typeConversionList[i, 1];
+			}
+		}
+		
+		string GetModifier(IDecoration decoration)
+		{
+			StringBuilder builder = new StringBuilder();
+			
+			if (IncludeHTMLMarkup) {
+				builder.Append("<i>");
+			}
+			
+			if (decoration.IsStatic) {
+				builder.Append("Shared ");
+			} 
+			if (decoration.IsAbstract) {
+				builder.Append("MustOverride ");
+			} else if (decoration.IsFinal) {
+				builder.Append("NotOverridable ");
+			} else if (decoration.IsVirtual) {
+				builder.Append("Overridable ");
+			} else if (decoration.IsOverride) {
+				builder.Append("Overrides ");
+			} else if (decoration.IsNew) {
+				builder.Append("Shadows ");
+			}
+			
+			if (IncludeHTMLMarkup) {
+				builder.Append("</i>");
+			}
+			
+			return builder.ToString();
+		}
+		
+		public override string Convert(ModifierEnum modifier)
+		{
+			StringBuilder builder = new StringBuilder();
+			if (ShowAccessibility) {
+				if ((modifier & ModifierEnum.Public) == ModifierEnum.Public) {
+					builder.Append("Public");
+				} else if ((modifier & ModifierEnum.Private) == ModifierEnum.Private) {
+					builder.Append("Private");
+				} else if ((modifier & (ModifierEnum.Protected | ModifierEnum.Internal)) == (ModifierEnum.Protected | ModifierEnum.Internal)) {
+					builder.Append("Protected Friend");
+				} else if ((modifier & ModifierEnum.ProtectedOrInternal) == ModifierEnum.ProtectedOrInternal) {
+					builder.Append("Protected Friend");
+				} else if ((modifier & ModifierEnum.Internal) == ModifierEnum.Internal) {
+					builder.Append("Friend");
+				} else if ((modifier & ModifierEnum.Protected) == ModifierEnum.Protected) {
+					builder.Append("Protected");
+				}
+				builder.Append(' ');
+			}
+			return builder.ToString();
+		}
+		
+		public override string Convert(IClass c)
+		{
+			StringBuilder builder = new StringBuilder();
+			
+			builder.Append(Convert(c.Modifiers));
+			
+			if (IncludeHTMLMarkup) {
+				builder.Append("<i>");
+			}
+			
+			if (ShowModifiers) {
+				if (c.IsSealed) {
+					if (c.ClassType == ClassType.Class) {
+						builder.Append("NotInheritable ");
+					}
+				} else if (c.IsAbstract && c.ClassType != ClassType.Interface) {
+					builder.Append("MustInherit ");
+				}
+			}
+			
+			if (IncludeHTMLMarkup) {
+				builder.Append("</i>");
+			}
+			
+			switch (c.ClassType) {
+				case ClassType.Delegate:
+					builder.Append("Delegate ");
+					if (ShowReturnType) {
+						foreach (IMethod m in c.Methods) {
+							if (m.Name != "Invoke") {
+								continue;
+							}
+							
+							if (m.ReturnType == null || m.ReturnType.FullyQualifiedName == "System.Void") {
+								builder.Append("Sub");
+							} else {
+								builder.Append("Function");
+							}
+						}
+					}
+					break;
+				case ClassType.Class:
+					builder.Append("Class");
+					break;
+				case ClassType.Struct:
+					builder.Append("Structure");
+					break;
+				case ClassType.Interface:
+					builder.Append("Interface");
+					break;
+				case ClassType.Enum:
+					builder.Append("Enum");
+					break;
+			}
+			builder.Append(' ');
+			
+			if (IncludeHTMLMarkup) {
+				builder.Append("<b>");
+			}
+			
+			if (UseFullyQualifiedMemberNames) {
+				builder.Append(c.FullyQualifiedName);
+			} else {
+				builder.Append(c.Name);
+			}
+			
+			if (IncludeHTMLMarkup) {
+				builder.Append("</b>");
+			}
+			
+			if (c.ClassType == ClassType.Delegate) {
+				builder.Append("(");
+				if (IncludeHTMLMarkup) builder.Append("<br>");
+				
+				foreach (IMethod m in c.Methods) {
+					if (m.Name != "Invoke") continue;
+					
+					for (int i = 0; i < m.Parameters.Count; ++i) {
+						if (IncludeHTMLMarkup) builder.Append("&nbsp;&nbsp;&nbsp;");
+						
+						builder.Append(Convert(m.Parameters[i]));
+						if (i + 1 < m.Parameters.Count) builder.Append(", ");
+
+						if (IncludeHTMLMarkup) builder.Append("<br>");
+					}
+				}
+
+				builder.Append(")");
+				
+				foreach (IMethod m in c.Methods) {
+					if (m.Name != "Invoke") continue;
+					
+					if (m.ReturnType == null || m.ReturnType.FullyQualifiedName == "System.Void") {
+					} else {
+						if (ShowReturnType) {
+							builder.Append(" As ");
+							builder.Append(Convert(m.ReturnType));
+						}
+					}
+				}
+
+			} else if (ShowInheritanceList) {
+				if (c.BaseTypes.Count > 0) {
+					builder.Append(" Inherits ");
+					for (int i = 0; i < c.BaseTypes.Count; ++i) {
+						builder.Append(c.BaseTypes[i]);
+						if (i + 1 < c.BaseTypes.Count) {
+							builder.Append(", ");
+						}
+					}
+				}
+			}
+			
+			return builder.ToString();		
+		}
+		
+		public override string ConvertEnd(IClass c)
+		{
+			StringBuilder builder = new StringBuilder();
+			
+			builder.Append("End ");
+			
+			switch (c.ClassType) {
+				case ClassType.Delegate:
+					builder.Append("Delegate");
+					break;
+				case ClassType.Class:
+					builder.Append("Class");
+					break;
+				case ClassType.Struct:
+					builder.Append("Structure");
+					break;
+				case ClassType.Interface:
+					builder.Append("Interface");
+					break;
+				case ClassType.Enum:
+					builder.Append("Enum");
+					break;
+			}
+			
+			return builder.ToString();
+		}
+		
+		public override string Convert(IField field)
+		{
+			StringBuilder builder = new StringBuilder();
+			
+			builder.Append(Convert(field.Modifiers));
+			
+			if (IncludeHTMLMarkup) {
+				builder.Append("<i>");
+			}
+			
+			if (ShowModifiers) {
+				if (field.IsStatic && field.IsLiteral) {
+					builder.Append("Const ");
+				} else if (field.IsStatic) {
+					builder.Append("Shared ");
+				}
+			}
+						
+			if (IncludeHTMLMarkup) {
+				builder.Append("</i>");
+				builder.Append("<b>");
+			}
+			
+			if (UseFullyQualifiedMemberNames) {
+				builder.Append(field.FullyQualifiedName);
+			} else {
+				builder.Append(field.Name);
+			}
+			
+			if (IncludeHTMLMarkup) {
+				builder.Append("</b>");
+			}
+			
+			if (field.ReturnType != null && ShowReturnType) {
+				builder.Append(" As ");
+				builder.Append(Convert(field.ReturnType));
+			}			
+			
+			return builder.ToString();			
+		}
+		
+		public override string Convert(IProperty property)
+		{
+			StringBuilder builder = new StringBuilder();
+			
+			builder.Append(Convert(property.Modifiers));
+			
+			if (ShowModifiers) {
+				builder.Append(GetModifier(property));
+			}
+			
+			if (property.CanGet && !property.CanSet) {
+				builder.Append("ReadOnly ");
+			}
+			
+			if (property.CanSet && !property.CanGet) {
+				builder.Append("WriteOnly ");
+			}
+			
+			if (IncludeHTMLMarkup) {
+				builder.Append("<b>");
+			}
+			
+			if (UseFullyQualifiedMemberNames) {
+				builder.Append(property.FullyQualifiedName);
+			} else {
+				builder.Append(property.Name);
+			}
+			
+			if (IncludeHTMLMarkup) {
+				builder.Append("</b>");
+			}
+			
+			if (property.Parameters.Count > 0) {
+				builder.Append("(");
+				if (IncludeHTMLMarkup) builder.Append("<br>");
+				
+				for (int i = 0; i < property.Parameters.Count; ++i) {
+					if (IncludeHTMLMarkup) builder.Append("&nbsp;&nbsp;&nbsp;");
+					builder.Append(Convert(property.Parameters[i]));
+					if (i + 1 < property.Parameters.Count) {
+						builder.Append(", ");
+					}
+					if (IncludeHTMLMarkup) builder.Append("<br>");
+				}
+				
+				builder.Append(')');
+			}
+			
+			if (property.ReturnType != null && ShowReturnType) {
+				builder.Append(" As ");
+				builder.Append(Convert(property.ReturnType));
+			}
+			
+			return builder.ToString();
+		}
+		
+		public override string Convert(IEvent e)
+		{
+			StringBuilder builder = new StringBuilder();
+			
+			builder.Append(Convert(e.Modifiers));
+			
+			if (ShowModifiers) {
+				builder.Append(GetModifier(e));
+			}
+			
+			if (IncludeHTMLMarkup) {
+				builder.Append("<b>");
+			}
+			
+			if (UseFullyQualifiedMemberNames) {
+				builder.Append(e.FullyQualifiedName);
+			} else {
+				builder.Append(e.Name);
+			}
+			
+			if (IncludeHTMLMarkup) {
+				builder.Append("</b>");
+			}
+			
+			if (e.ReturnType != null && ShowReturnType) {
+				builder.Append(" As ");
+				builder.Append(Convert(e.ReturnType));
+			}
+			
+			return builder.ToString();
+		}
+		
+		public override string Convert(IIndexer m)
+		{
+			StringBuilder builder = new StringBuilder();
+			builder.Append(Convert(m.Modifiers));
+			
+			if (ShowModifiers) {
+				if (m.IsStatic) {
+					builder.Append("Shared ");
+				}
+			}
+			
+			if (IncludeHTMLMarkup) {
+				builder.Append("<b>");
+			}
+			
+			if (UseFullyQualifiedMemberNames) {
+				builder.Append(m.FullyQualifiedName);
+			} else {
+				builder.Append(m.Name);
+			}
+			
+			if (IncludeHTMLMarkup) {
+				builder.Append("</b>");
+			}
+			
+			builder.Append("Item(");
+			if (IncludeHTMLMarkup) builder.Append("<br>");
+
+			for (int i = 0; i < m.Parameters.Count; ++i) {
+				if (IncludeHTMLMarkup) builder.Append("&nbsp;&nbsp;&nbsp;");
+				builder.Append(Convert(m.Parameters[i]));
+				if (i + 1 < m.Parameters.Count) {
+					builder.Append(", ");
+				}
+				if (IncludeHTMLMarkup) builder.Append("<br>");
+			}
+			
+			builder.Append(")");
+			
+			if (m.ReturnType != null && ShowReturnType) {
+				builder.Append(" As ");
+				builder.Append(Convert(m.ReturnType));
+			}			
+			
+			return builder.ToString();
+		}
+		
+		public override string Convert(IMethod m)
+		{
+			StringBuilder builder = new StringBuilder();
+			builder.Append(Convert(m.Modifiers));
+			
+			if (ShowModifiers) {
+				builder.Append(GetModifier(m));
+			}
+			if (ShowReturnType) {
+				if (m.ReturnType == null || m.ReturnType.FullyQualifiedName == "System.Void") {
+					builder.Append("Sub ");
+				} else {
+					builder.Append("Function ");
+				}
+			}
+
+			string dispName = UseFullyQualifiedMemberNames ? m.FullyQualifiedName : m.Name;
+			if (m.Name == "ctor" || m.Name == "cctor" || m.Name == "#ctor" || m.Name == "#cctor" || m.IsConstructor) {
+				dispName = "New";
+			}
+			
+			if (IncludeHTMLMarkup) {
+				builder.Append("<b>");
+			}
+			
+			builder.Append(dispName);
+			
+			if (IncludeHTMLMarkup) {
+				builder.Append("</b>");
+			}
+			
+			builder.Append("(");
+			if (IncludeHTMLMarkup) builder.Append("<br>");
+
+			for (int i = 0; i < m.Parameters.Count; ++i) {
+				if (IncludeHTMLMarkup) builder.Append("&nbsp;&nbsp;&nbsp;");
+				builder.Append(Convert(m.Parameters[i]));
+				if (i + 1 < m.Parameters.Count) {
+					builder.Append(", ");
+				}
+				if (IncludeHTMLMarkup) builder.Append("<br>");
+			}
+			
+			builder.Append(')');
+			
+			if (ShowReturnType && m.ReturnType != null && m.ReturnType.FullyQualifiedName != "System.Void") {
+				builder.Append(" As ");
+				builder.Append(Convert(m.ReturnType));
+			}
+			
+			return builder.ToString();
+		}
+		
+		public override string ConvertEnd(IMethod m)
+		{
+			if (m.ReturnType == null || m.ReturnType.FullyQualifiedName == "System.Void") {
+				return "End Sub";
+			} else {
+				return "End Function";
+			}
+		}
+		
+		public override string Convert(IReturnType returnType)
+		{
+			if (returnType == null) {
+				return String.Empty;
+			}
+			StringBuilder builder = new StringBuilder();
+			
+			bool linkSet = false;
+			
+			if (UseLinkArrayList) {
+				SharpAssemblyReturnType ret = returnType as SharpAssemblyReturnType;
+				if (ret != null) {
+					if (ret.UnderlyingClass != null) {
+						builder.Append("<a href='as://" + linkArrayList.Add(ret.UnderlyingClass) + "'>");
+						linkSet = true;
+					}
+				}
+			}
+			
+			if (returnType.FullyQualifiedName != null && typeConversionTable[returnType.FullyQualifiedName] != null) {
+				builder.Append(typeConversionTable[returnType.FullyQualifiedName].ToString());
+			} else {
+				builder.Append(UseFullyQualifiedNames ? returnType.FullyQualifiedName : returnType.Name);
+			}
+			
+			if (linkSet) {
+				builder.Append("</a>");
+			}
+
+			for (int i = 0; i < returnType.PointerNestingLevel; ++i) {
+				builder.Append('*');
+			}
+			
+			for (int i = 0; i < returnType.ArrayCount; ++i) {
+				builder.Append('(');
+				for (int j = 1; j < returnType.ArrayDimensions[i]; ++j) {
+					builder.Append(',');
+				}
+				builder.Append(')');
+			}
+			
+			return builder.ToString();
+		}
+		
+		public override string Convert(IParameter param)
+		{
+			StringBuilder builder = new StringBuilder();
+			if (ShowParameterNames) {
+				if (IncludeHTMLMarkup) {
+					builder.Append("<i>");
+				}
+			
+				if (param.IsRef || param.IsOut) {
+					builder.Append("ByRef ");
+				} else if (param.IsParams) {
+					builder.Append("ByVal ParamArray ");
+				} else  {
+					builder.Append("ByVal ");
+				}
+				if (IncludeHTMLMarkup) {
+					builder.Append("</i>");
+				}
+			
+			
+				builder.Append(param.Name);
+				builder.Append(" As ");
+			}
+
+			builder.Append(Convert(param.ReturnType));
+
+			return builder.ToString();
+		}
+
+		public override string WrapAttribute(string attribute)
+		{
+			return "<" + attribute + ">";
+		}
+		
+		public override string WrapComment(string comment)
+		{
+			return "' " + comment;
+		}
+		
+		public override string GetIntrinsicTypeName(string dotNetTypeName)
+		{
+			if (typeConversionTable[dotNetTypeName] != null) {
+				return (string)typeConversionTable[dotNetTypeName];
+			}
+			return dotNetTypeName;
+		}
+	}
+	
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBBindingCompilerServices.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBBindingCompilerServices.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBBindingCompilerServices.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,716 @@
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Markus Palme" email="MarkusPalme at gmx.de"/>
+//     <version value="$version"/>
+// </file>
+
+using System;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Collections;
+using System.IO;
+using System.Diagnostics;
+using System.CodeDom.Compiler;
+using MonoDevelop.Core.Services;
+
+using MonoDevelop.Services;
+
+using MonoDevelop.Internal.Project;
+using MonoDevelop.Gui;
+using MonoDevelop.Gui.Components;
+
+namespace VBBinding {
+	
+	/// <summary>
+	/// This class controls the compilation of VB.net files and VB.net projects
+	/// </summary>
+	public class VBBindingCompilerServices
+	{	
+	
+		static Regex regexError = new Regex (@"^(\s*(?<file>.*)\((?<line>\d*)(,(?<column>\d*))?\)\s+)*(?<level>\w+)\s*(?<number>.*):\s(?<message>.*)",
+		RegexOptions.Compiled | RegexOptions.ExplicitCapture);
+
+	
+		FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
+		PropertyService propertyService       = (PropertyService)ServiceManager.GetService(typeof(PropertyService));
+		
+		public string GetCompiledOutputName(string fileName)
+		{
+			return Path.ChangeExtension(fileName, ".exe");
+		}
+		
+		public string GetCompiledOutputName(IProject project)
+		{
+			VBProject p = (VBProject)project;
+			VBCompilerParameters compilerparameters = (VBCompilerParameters)p.ActiveConfiguration;
+			/* switch(compilerparameters.CompileTarget){
+				case CompileTarget.Exe:
+					System.Console.WriteLine("EXE");
+					break;
+				case CompileTarget.Library:
+					System.Console.WriteLine("Library!");
+					break;
+				case CompileTarget.WinExe:
+					System.Console.WriteLine("WinEXE");
+					break;
+				default:
+					System.Console.WriteLine("Unknown case: " + compilerparameters.CompileTarget);
+					break;
+			}
+			*/
+			return fileUtilityService.GetDirectoryNameWithSeparator(compilerparameters.OutputDirectory) + compilerparameters.OutputAssembly + (compilerparameters.CompileTarget == CompileTarget.Library ? ".dll" : ".exe");
+		}
+		
+		public bool CanCompile(string fileName)
+		{
+			return Path.GetExtension(fileName) == ".vb";
+		}
+		
+		string GetCompilerName(string compilerVersion)
+		{
+			//string runtimeDirectory = Path.Combine(fileUtilityService.NETFrameworkInstallRoot, compilerVersion);
+			//if (compilerVersion.Length == 0 || compilerVersion == "Standard" || !Directory.Exists(runtimeDirectory)) {
+			//	runtimeDirectory = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory();
+			//}
+			//return String.Concat('"', Path.Combine(runtimeDirectory, "vbc.exe"), '"');
+			return "mbas";
+		}
+		
+		string GenerateOptions(VBCompilerParameters compilerparameters, string outputFileName)
+		{
+			StringBuilder sb = new StringBuilder();
+			
+			sb.Append("-out:");sb.Append(outputFileName);/*sb.Append('"');*/sb.Append(Environment.NewLine);
+			
+			sb.Append("-nologo");sb.Append(Environment.NewLine);
+			sb.Append("-utf8output");sb.Append(Environment.NewLine);
+			
+//			if (compilerparameters.Debugmode) {
+//				sb.Append("--debug+");sb.Append(Environment.NewLine);
+//				sb.Append("--debug:full");sb.Append(Environment.NewLine);
+//			}
+			
+			//if (compilerparameters.Optimize) {
+			//	sb.Append("-optimize");sb.Append(Environment.NewLine);
+			//}
+			
+			//if (compilerparameters.OptionStrict) {
+			//	sb.Append("-optionstrict");sb.Append(Environment.NewLine);
+			//}
+			
+			//if (compilerparameters.OptionExplicit) {
+			//	sb.Append("-optionexplicit");sb.Append(Environment.NewLine);
+			//}// else {
+			//	sb.Append("--optionexplicit-");sb.Append(Environment.NewLine);
+			//}
+			
+			if (compilerparameters.Win32Icon != null && compilerparameters.Win32Icon.Length > 0 && File.Exists(compilerparameters.Win32Icon)) {
+				sb.Append("-win32icon:");sb.Append('"');sb.Append(compilerparameters.Win32Icon);sb.Append('"');sb.Append(Environment.NewLine);
+			}
+			
+			if (compilerparameters.RootNamespace!= null && compilerparameters.RootNamespace.Length > 0) {
+				sb.Append("-rootnamespace:");sb.Append('"');sb.Append(compilerparameters.RootNamespace);sb.Append('"');sb.Append(Environment.NewLine);
+			}
+			
+			if (compilerparameters.DefineSymbols.Length > 0) {
+				sb.Append("-define:");sb.Append('"');sb.Append(compilerparameters.DefineSymbols);sb.Append('"');sb.Append(Environment.NewLine);
+			}
+			
+			if (compilerparameters.MainClass != null && compilerparameters.MainClass.Length > 0) {
+				sb.Append("-main:");sb.Append(compilerparameters.MainClass);sb.Append(Environment.NewLine);
+			}
+			
+			if(compilerparameters.Imports.Length > 0) {
+				sb.Append("-imports:");sb.Append(compilerparameters.Imports);sb.Append(Environment.NewLine);
+			}
+			
+			switch (compilerparameters.CompileTarget) {
+				case CompileTarget.Exe:
+					sb.Append("-target:exe");
+					break;
+				case CompileTarget.WinExe:
+					sb.Append("-target:winexe");
+					break;
+				case CompileTarget.Library:
+					sb.Append("-target:library");
+					break;
+				case CompileTarget.Module:
+					sb.Append("-target:module");
+					break;
+				default:
+					throw new NotSupportedException("unknown compile target:" + compilerparameters.CompileTarget);
+			}
+			sb.Append(Environment.NewLine);
+			return sb.ToString();
+		}
+		
+		public ICompilerResult CompileFile(string filename)
+		{
+			//System.Console.WriteLine("CompileFile " + filename);
+			string output = "";
+			string error  = "";
+			string exe = Path.ChangeExtension(filename, ".exe");
+			VBCompilerParameters compilerparameters = new VBCompilerParameters();
+			string stdResponseFileName = propertyService.DataDirectory + Path.DirectorySeparatorChar + "vb.rsp";
+			
+			string responseFileName = Path.GetTempFileName();
+			
+			StreamWriter writer = new StreamWriter(responseFileName);
+			writer.WriteLine(GenerateOptions(compilerparameters, exe));
+			writer.WriteLine(String.Concat('"', filename, '"'));
+			writer.Close();
+			
+			string compilerName = GetCompilerName(compilerparameters.VBCompilerVersion);
+			string outstr = String.Concat(compilerName, " @", responseFileName); //, " @", stdResponseFileName);
+			
+			TempFileCollection  tf = new TempFileCollection ();
+			//Executor.ExecWaitWithCapture(outstr, tf, ref output, ref error);
+			DoCompilation(outstr,tf,ref output, ref error);
+			
+			ICompilerResult result = ParseOutput(tf, output);
+			
+			File.Delete(responseFileName);
+			File.Delete(output);
+			File.Delete(error);
+			WriteManifestFile(exe);
+			return result;
+		}
+		
+		public ICompilerResult CompileProject(IProject project)
+		{
+			//System.Console.WriteLine("CompileProject ");
+			VBProject p = (VBProject)project;
+			VBCompilerParameters compilerparameters = (VBCompilerParameters)p.ActiveConfiguration;
+			string exe       = fileUtilityService.GetDirectoryNameWithSeparator(compilerparameters.OutputDirectory) + compilerparameters.OutputAssembly + (compilerparameters.CompileTarget == CompileTarget.Library ? ".dll" : ".exe");
+			string responseFileName = Path.GetTempFileName();
+			string stdResponseFileName = String.Concat(propertyService.DataDirectory, Path.DirectorySeparatorChar, "vb.rsp");
+			StreamWriter writer = new StreamWriter(responseFileName);
+			
+			//Console.WriteLine(GenerateOptions(compilerparameters,exe));	
+			writer.WriteLine(GenerateOptions(compilerparameters, exe));
+			
+			foreach (ProjectReference lib in p.ProjectReferences) {
+				string fileName = lib.GetReferencedFileName(p);
+				//Console.WriteLine(String.Concat("-r:",fileName));
+				writer.WriteLine(String.Concat("-r:", fileName));
+			}
+			
+			// write source files and embedded resources
+			foreach (ProjectFile finfo in p.ProjectFiles) {
+				if (finfo.Subtype != Subtype.Directory) {
+					switch (finfo.BuildAction) {
+						case BuildAction.Compile:
+							//Console.WriteLine(finfo.Name);
+							writer.WriteLine(finfo.Name);
+						break;
+						
+						case BuildAction.EmbedAsResource:
+							//Console.WriteLine(String.Concat("-resource:", finfo.Name));
+							writer.WriteLine(String.Concat("-resource:", finfo.Name));
+						break;
+					}
+				}
+			}
+			
+			TempFileCollection tf = new TempFileCollection ();
+			writer.Close();
+			
+			string output = "";
+			string error  = "";
+			string compilerName = GetCompilerName(compilerparameters.VBCompilerVersion);
+			string outstr = String.Concat(compilerName, " @", responseFileName); //, " @", stdResponseFileName);
+			
+			//Console.WriteLine("Attempting to run: "+outstr);
+			
+			//Executor.ExecWaitWithCapture(outstr, tf, ref output, ref error);
+			DoCompilation(outstr,tf,ref output,ref error);
+			
+			//Console.WriteLine("Output: "+output);
+			//Console.WriteLine("Error: "+error);
+			
+			
+			ICompilerResult result = ParseOutput(tf, output);
+			ParseOutput(tf,error);
+			
+			project.CopyReferencesToOutputPath(false);
+			
+			File.Delete(responseFileName);
+			File.Delete(output);
+			File.Delete(error);
+			if (compilerparameters.CompileTarget != CompileTarget.Library) {
+				WriteManifestFile(exe);
+			}
+			return result;
+		}
+		
+		// code duplication: see C# backend : CSharpBindingCompilerManager
+		void WriteManifestFile(string fileName)
+		{
+			string manifestFile = String.Concat(fileName, ".manifest");
+			if (File.Exists(manifestFile)) {
+				return;
+			}
+			StreamWriter sw = new StreamWriter(manifestFile);
+			sw.WriteLine("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>");
+			sw.WriteLine("");
+			sw.WriteLine("<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\">");
+			sw.WriteLine("	<dependency>");
+			sw.WriteLine("		<dependentAssembly>");
+			sw.WriteLine("			<assemblyIdentity");
+			sw.WriteLine("				type=\"win32\"");
+			sw.WriteLine("				name=\"Microsoft.Windows.Common-Controls\"");
+			sw.WriteLine("				version=\"6.0.0.0\"");
+			sw.WriteLine("				processorArchitecture=\"X86\"");
+			sw.WriteLine("				publicKeyToken=\"6595b64144ccf1df\"");
+			sw.WriteLine("				language=\"*\"");
+			sw.WriteLine("			/>");
+			sw.WriteLine("		</dependentAssembly>");
+			sw.WriteLine("	</dependency>");
+			sw.WriteLine("</assembly>");
+			sw.Close();
+		}
+		
+/***** Legacy #D code, will remove if replacement code tests OK *****
+
+		CompilerResult ParseOutput(TempFileCollection tf, string file)
+		{
+			StringBuilder compilerOutput = new StringBuilder();
+			
+			StreamReader sr = File.OpenText(file);
+			
+			// skip fist whitespace line
+			sr.ReadLine();
+			
+			CompilerResults cr = new CompilerResults(tf);
+			
+			while (true) {
+				string next = sr.ReadLine();
+				compilerOutput.Append(next);compilerOutput.Append(Environment.NewLine);
+				if (next == null) {
+					break;
+				}
+				CompilerError error = new CompilerError();
+				
+				int index           = next.IndexOf(": ");
+				if (index < 0) {
+					continue;
+				}
+				
+				string description  = null;
+				string errorwarning = null;
+				string location     = null;
+				
+				string s1 = next.Substring(0, index);
+				string s2 = next.Substring(index + 2);
+				index  = s2.IndexOf(": ");
+				
+				if (index == -1) {
+					errorwarning = s1;
+					description = s2;
+				} else {
+					location = s1;
+					s1 = s2.Substring(0, index);
+					s2 = s2.Substring(index + 2);
+					errorwarning = s1;
+					description = s2;
+				}
+				
+				if (location != null) {
+					int idx1 = location.LastIndexOf('(');
+					int idx2 = location.LastIndexOf(')');
+					if (idx1 >= 0 &&  idx2 >= 0) {
+						string filename = location.Substring(0, idx1);
+						error.Line = Int32.Parse(location.Substring(idx1 + 1, idx2 - idx1 - 1));
+						error.FileName = Path.GetFullPath(filename.Trim()); // + "\\" + Path.GetFileName(filename);
+					}
+				}
+				
+				string[] what = errorwarning.Split(' ');
+				Console.WriteLine("Error is: "+what[0]);
+				error.IsWarning   = (what[0] == "warning" || what[0]=="MonoBASIC");
+				error.ErrorNumber = what[what.Length - 1];
+				
+				error.ErrorText = description;
+				
+				cr.Errors.Add(error);
+			}
+			sr.Close();
+			Console.WriteLine(compilerOutput.ToString());
+			return new DefaultCompilerResult(cr, compilerOutput.ToString());
+		}
+*/
+		
+		ICompilerResult ParseOutput(TempFileCollection tf, string file)
+		{
+			StringBuilder compilerOutput = new StringBuilder();
+			
+			StreamReader sr = File.OpenText(file);
+			
+			// skip fist whitespace line
+			//sr.ReadLine();
+			
+			CompilerResults cr = new CompilerResults(tf);
+			
+			// we have 2 formats for the error output the csc gives :
+			Regex normalError  = new Regex(@"(?<file>.*)\((?<line>\d+),(?<column>\d+)\):\s+(?<error>\w+)\s+(?<number>[\d\w]+):\s+(?<message>.*)", RegexOptions.Compiled);
+			Regex generalError = new Regex(@"(?<error>.+)\s+(?<number>[\d\w]+):\s+(?<message>.*)", RegexOptions.Compiled);
+			
+			while (true) {
+				string curLine = sr.ReadLine();
+				compilerOutput.Append(curLine);
+				compilerOutput.Append('\n');
+				if (curLine == null) {
+					break;
+				}
+				curLine = curLine.Trim();
+				if (curLine.Length == 0) {
+					continue;
+				}
+				
+				CompilerError error = CreateErrorFromString (curLine);
+				
+				if (error != null)
+					cr.Errors.Add (error);
+			}
+			sr.Close();
+			return new DefaultCompilerResult(cr, compilerOutput.ToString());
+		}
+		
+		
+		private static CompilerError CreateErrorFromString(string error_string)
+		{
+			// When IncludeDebugInformation is true, prevents the debug symbols stats from braeking this.
+			if (error_string.StartsWith ("WROTE SYMFILE") ||
+			    error_string.StartsWith ("OffsetTable") ||
+			    error_string.StartsWith ("Compilation succeeded") ||
+			    error_string.StartsWith ("Compilation failed") || 
+			    error_string.StartsWith("MonoBASIC") || 
+			    error_string.StartsWith("Type:"))
+				return null;
+
+			CompilerError error = new CompilerError();
+
+			Match match=regexError.Match(error_string);
+			if (!match.Success) return null;
+			if (String.Empty != match.Result("${file}"))
+				error.FileName=match.Result("${file}");
+			if (String.Empty != match.Result("${line}"))
+				error.Line=Int32.Parse(match.Result("${line}"));
+			if (String.Empty != match.Result("${column}"))
+				error.Column=Int32.Parse(match.Result("${column}"));
+			if (match.Result("${level}")=="warning")
+				error.IsWarning=true;
+			error.ErrorNumber=match.Result("${number}");
+			error.ErrorText=match.Result("${message}");
+			return error;
+		}
+		
+		public void GenerateMakefile (IProject project, Combine parentCombine)
+		{
+			StreamWriter stream = new StreamWriter (Path.Combine (project.BaseDirectory, "Makefile." + project.Name.Replace (" ", "")));
+
+			VBProject p = (VBProject)project;
+			VBCompilerParameters compilerparameters = (VBCompilerParameters)p.ActiveConfiguration;
+			
+			//special case for module?
+			string outputName = compilerparameters.OutputAssembly + (compilerparameters.CompileTarget == CompileTarget.Library ? ".dll" : ".exe");
+
+			string target = "";
+			string relativeOutputDir = fileUtilityService.AbsoluteToRelativePath (project.BaseDirectory, parentCombine.OutputDirectory);
+
+			switch (compilerparameters.CompileTarget) {
+			case CompileTarget.Exe:
+				target = "exe";
+				break;
+			case CompileTarget.WinExe:
+				target = "winexe";
+				break;
+			case CompileTarget.Library:
+				target = "library";
+				break;
+			//no module yet
+			}			
+			
+			ArrayList compile_files = new ArrayList ();
+			ArrayList pkg_references = new ArrayList ();
+			ArrayList assembly_references = new ArrayList ();
+			ArrayList project_references = new ArrayList ();
+			ArrayList system_references = new ArrayList ();
+			ArrayList resources = new ArrayList ();
+			
+			foreach (ProjectFile finfo in project.ProjectFiles) {
+				if (finfo.Subtype != Subtype.Directory) {
+					switch (finfo.BuildAction) {
+					case BuildAction.Compile:
+						string rel_path = fileUtilityService.AbsoluteToRelativePath (project.BaseDirectory, Path.GetDirectoryName (finfo.Name));
+						if (CanCompile (finfo.Name));
+						compile_files.Add (Path.Combine (rel_path, Path.GetFileName (finfo.Name)));
+						break;
+						
+					case BuildAction.EmbedAsResource:
+						string resource_rel_path = fileUtilityService.AbsoluteToRelativePath (project.BaseDirectory, Path.GetDirectoryName (finfo.Name));
+						resources.Add (Path.Combine (resource_rel_path, Path.GetFileName (finfo.Name)));
+						break;
+					}
+				}
+			}
+
+			SystemAssemblyService sas = (SystemAssemblyService)ServiceManager.GetService (typeof (SystemAssemblyService));
+			foreach (ProjectReference lib in project.ProjectReferences) {
+				switch (lib.ReferenceType) {
+				case ReferenceType.Gac:
+					string pkg = sas.GetPackageFromFullName (lib.Reference);
+					if (pkg == "MONO-SYSTEM") {
+						system_references.Add (Path.GetFileName (lib.GetReferencedFileName (project)));
+					} else if (!pkg_references.Contains (pkg)) {
+						pkg_references.Add (pkg);
+					}
+					break;
+				case ReferenceType.Assembly:
+					string assembly_fileName = lib.GetReferencedFileName (project);
+					string rel_path_to = fileUtilityService.AbsoluteToRelativePath (project.BaseDirectory, Path.GetDirectoryName (assembly_fileName));
+					assembly_references.Add (Path.Combine (rel_path_to, Path.GetFileName (assembly_fileName)));
+					break;
+				case ReferenceType.Project:
+					string project_fileName = lib.GetReferencedFileName (project);
+					IProjectService prjService = (IProjectService)ServiceManager.GetService (typeof (IProjectService));
+					ArrayList allProjects = Combine.GetAllProjects(prjService.CurrentOpenCombine);
+					
+					foreach (ProjectCombineEntry projectEntry in allProjects) {
+						if (projectEntry.Project.Name == lib.Reference) {
+							string project_base_dir = fileUtilityService.AbsoluteToRelativePath (project.BaseDirectory, projectEntry.Project.BaseDirectory);
+							
+							string project_output_fileName = prjService.GetOutputAssemblyName (projectEntry.Project);
+							project_references.Add (Path.Combine (project_base_dir, Path.GetFileName (project_output_fileName)));
+						}
+					}
+					break;
+				}
+			}
+
+			stream.WriteLine ("# This makefile is autogenerated by MonoDevelop");
+			stream.WriteLine ("# Do not modify this file");
+			stream.WriteLine ();
+			stream.WriteLine ("SOURCES = \\");
+			for (int i = 0; i < compile_files.Count; i++) {
+				stream.Write (((string)compile_files[i]).Replace (" ", "\\ "));
+				if (i != compile_files.Count - 1)
+					stream.WriteLine (" \\");
+				else
+					stream.WriteLine ();
+			}
+			stream.WriteLine ();
+
+			if (resources.Count > 0) {
+				stream.WriteLine ("RESOURCES = \\");
+				for (int i = 0; i < resources.Count; i++) {
+					stream.Write (((string)resources[i]).Replace (" ", "\\ "));
+					if (i != resources.Count - 1)
+						stream.WriteLine (" \\");
+					else
+						stream.WriteLine ();
+				}
+				stream.WriteLine ();
+				stream.WriteLine ("RESOURCES_BUILD = $(foreach res,$(RESOURCES), $(addprefix -resource:,$(res)),$(notdir $(res)))");
+				stream.WriteLine ();
+			}
+
+			if (pkg_references.Count > 0) {
+				stream.WriteLine ("PKG_REFERENCES = \\");
+				for (int i = 0; i < pkg_references.Count; i++) {
+					stream.Write (pkg_references[i]);
+					if (i != pkg_references.Count - 1)
+						stream.WriteLine (" \\");
+					else
+						stream.WriteLine ();
+				}
+				
+				stream.WriteLine ();
+				stream.WriteLine ("PKG_REFERENCES_BUILD = $(addprefix -pkg:, $(PKG_REFERENCES))");
+				stream.WriteLine ();
+				stream.WriteLine ("PKG_REFERENCES_CHECK = $(addsuffix .pkgcheck, $(PKG_REFERENCES))");
+				stream.WriteLine ();
+			}
+			
+			if (system_references.Count > 0) {
+				stream.WriteLine ("SYSTEM_REFERENCES = \\");
+				for (int i = 0; i < system_references.Count; i++) {
+					stream.Write (system_references[i]);
+					if (i != system_references.Count - 1)
+						stream.WriteLine (" \\");
+					else
+						stream.WriteLine ();
+				}
+				stream.WriteLine ();
+				stream.WriteLine ("SYSTEM_REFERENCES_BUILD = $(addprefix -r:, $(SYSTEM_REFERENCES))");
+				stream.WriteLine ();
+				stream.WriteLine ("SYSTEM_REFERENCES_CHECK = $(addsuffix .check, $(SYSTEM_REFERENCES))");
+				stream.WriteLine ();
+			}
+
+			if (assembly_references.Count > 0) {
+				stream.WriteLine ("ASSEMBLY_REFERENCES = \\");
+				for (int i = 0; i < assembly_references.Count; i++) {
+					stream.Write ("\"" + assembly_references[i] + "\"");
+					if (i != assembly_references.Count - 1)
+						stream.WriteLine (" \\");
+					else
+						stream.WriteLine ();
+				}
+				
+				stream.WriteLine ();
+				stream.WriteLine ("ASSEMBLY_REFERENCES_BUILD = $(addprefix -r:, $(ASSEMBLY_REFERENCES))");
+				stream.WriteLine ();
+			}
+
+			if (project_references.Count > 0) {
+				stream.WriteLine ("PROJECT_REFERENCES = \\");
+				for (int i = 0; i < project_references.Count; i++) {
+					stream.Write ("\"" + project_references[i] + "\"");
+					if (i != project_references.Count - 1)
+						stream.WriteLine (" \\");
+					else
+						stream.WriteLine ();
+				}
+				
+				stream.WriteLine ();
+				stream.WriteLine ("PROJECT_REFERENCES_BUILD = $(addprefix -r:, $(PROJECT_REFERENCES))");
+				stream.WriteLine ();
+			}
+
+			stream.Write ("MBAS_OPTIONS = ");
+			if (compilerparameters.UnsafeCode) {
+				stream.Write ("-unsafe ");
+			}
+			if (compilerparameters.DefineSymbols != null && compilerparameters.DefineSymbols.Length > 0) {
+				stream.Write ("-define:" + '"' + compilerparameters.DefineSymbols + '"' + " ");
+			}
+			if (compilerparameters.MainClass != null && compilerparameters.MainClass.Length > 0) {
+				stream.Write ("-main:" + compilerparameters.MainClass + " ");
+			}
+			stream.WriteLine ();
+			stream.WriteLine ();
+
+			stream.WriteLine ("all: " + outputName);
+			stream.WriteLine ();
+			
+			stream.Write (outputName + ": $(SOURCES)");
+			if (resources.Count > 0) {
+				stream.WriteLine (" $(RESOURCES)");
+			} else {
+				stream.WriteLine ();
+			}
+			
+			stream.Write ("\tmbas $(MBAS_OPTIONS) -target:{0} -out:\"{1}\"", target, outputName);
+			if (resources.Count > 0) {
+				stream.Write (" $(RESOURCES_BUILD)");
+			}
+			if (pkg_references.Count > 0) {
+				stream.Write (" $(PKG_REFERENCES_BUILD)");
+			}
+			if (assembly_references.Count > 0) {
+				stream.Write (" $(ASSEMBLY_REFERENCES_BUILD)");
+			}
+			if (project_references.Count > 0) {
+				stream.Write (" $(PROJECT_REFERENCES_BUILD)");
+			}
+			if (system_references.Count > 0) {
+				stream.Write (" $(SYSTEM_REFERENCES_BUILD)");
+			}
+			stream.WriteLine (" $(SOURCES) \\");
+			stream.WriteLine ("\t&& cp \"{0}\" {1}/.", outputName, relativeOutputDir);
+			
+			stream.WriteLine ();
+			stream.WriteLine ("clean:");
+			stream.WriteLine ("\trm -f {0}", outputName);
+			stream.WriteLine ();
+			
+			stream.Write ("depcheck: ");
+			if (pkg_references.Count > 0) {
+				stream.Write ("PKG_depcheck ");
+			}
+			if (system_references.Count > 0) {
+				stream.Write ("SYSTEM_depcheck");
+			}
+			stream.WriteLine ();
+			stream.WriteLine ();
+			if (pkg_references.Count > 0) {
+				stream.WriteLine ("PKG_depcheck: $(PKG_REFERENCES_CHECK)");
+				stream.WriteLine ();
+				stream.WriteLine ("%.pkgcheck:");
+				stream.WriteLine ("\t at echo -n Checking for package $(subst .pkgcheck,,$@)...");
+				stream.WriteLine ("\t at if pkg-config --libs $(subst .pkgcheck,,$@) &> /dev/null; then \\");
+				stream.WriteLine ("\t\techo yes; \\");
+				stream.WriteLine ("\telse \\");
+				stream.WriteLine ("\t\techo no; \\");
+				stream.WriteLine ("\t\texit 1; \\");
+				stream.WriteLine ("\tfi");
+				stream.WriteLine ();
+			}
+
+			if (system_references.Count > 0) {
+				stream.WriteLine ("SYSTEM_depcheck: $(SYSTEM_REFERENCES_CHECK)");
+				stream.WriteLine ();
+				stream.WriteLine ("%.check:");
+				stream.WriteLine ("\t at echo -n Checking for $(subst .check,,$@)...");
+				stream.WriteLine ("\t at if [ ! -e `pkg-config --variable=libdir mono`/mono/1.0/$(subst .check,,$@) ]; then \\");
+				stream.WriteLine ("\t\techo no; \\");
+				stream.WriteLine ("\t\texit 1; \\");
+				stream.WriteLine ("\telse \\");
+				stream.WriteLine ("\t\techo yes; \\");
+				stream.WriteLine ("\tfi");
+			}
+			
+			stream.Flush ();
+			stream.Close ();
+		}
+		
+		private void DoCompilation(string outstr, TempFileCollection tf, ref string output, ref string error) {
+			output = Path.GetTempFileName();
+			error = Path.GetTempFileName();
+			
+			string arguments = outstr + " > " + output + " 2> " + error;
+			string command = arguments;
+			ProcessStartInfo si = new ProcessStartInfo("/bin/sh","-c \"" + command + "\"");
+			si.RedirectStandardOutput = true;
+			si.RedirectStandardError = true;
+			si.UseShellExecute = false;
+			Process p = new Process();
+			p.StartInfo = si;
+			p.Start();
+			//FIXME: The glib.idle stuff is here because this *SHOULD* be
+			//a background thread calling back to the main thread.
+			//GLib.Idle.Add (new GLib.IdleHandler (setmsg));
+			setmsg ();
+			while (!p.HasExited) {
+				//GLib.Idle.Add (new GLib.IdleHandler (pulse));
+				pulse ();
+				System.Threading.Thread.Sleep (100);
+			}
+			//GLib.Idle.Add (new GLib.IdleHandler (done));
+			done ();
+		}
+		
+		bool setmsg ()
+		{
+			((IStatusBarService)ServiceManager.GetService (typeof (IStatusBarService))).SetMessage ("Compiling...");
+			return false;
+		}
+
+		bool done ()
+		{
+			((SdStatusBar)((IStatusBarService)ServiceManager.GetService (typeof (IStatusBarService))).ProgressMonitor).Done ();
+			return false;
+		}
+
+		bool pulse () 
+		{
+			((SdStatusBar)((IStatusBarService)ServiceManager.GetService (typeof (IStatusBarService))).ProgressMonitor).Pulse ();
+			while (Gtk.Application.EventsPending ())
+				Gtk.Application.RunIteration ();
+			return false;
+		}
+		
+	}
+}
\ No newline at end of file

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBBindingExecutionServices.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBBindingExecutionServices.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBBindingExecutionServices.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,110 @@
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Markus Palme" email="MarkusPalme at gmx.de"/>
+//     <version value="$version"/>
+// </file>
+
+using System;
+using System.IO;
+using System.Diagnostics;
+using System.Collections;
+using System.Reflection;
+using System.Resources;
+
+using System.Xml;
+using System.CodeDom.Compiler;
+using System.Threading;
+
+using MonoDevelop.Internal.Project;
+using MonoDevelop.Gui;
+using MonoDevelop.Services;
+using MonoDevelop.Core.Services;
+
+//using CSharpBinding;
+
+namespace VBBinding
+{
+	/// <summary>
+	/// This class controls the compilation of C Sharp files and C Sharp projects
+	/// </summary>
+	public class VBBindingExecutionServices //: CSharpBindingExecutionManager
+	{	
+		public void Debug (IProject project)
+		{
+			FileUtilityService fileUtilityService = (FileUtilityService) ServiceManager.GetService (typeof (FileUtilityService));
+			string directory = fileUtilityService.GetDirectoryNameWithSeparator(((VBCompilerParameters)project.ActiveConfiguration).OutputDirectory);
+			string exe = ((VBCompilerParameters)project.ActiveConfiguration).OutputAssembly + ".exe";
+
+			IDebuggingService dbgr = (IDebuggingService) ServiceManager.GetService (typeof (IDebuggingService));
+			if (dbgr != null)
+				dbgr.Run (new string[] { Path.Combine (directory, exe) } );
+		}
+
+		public void Execute(string filename)
+		{
+			string exe = Path.ChangeExtension(filename, ".exe");
+			
+			ProcessStartInfo psi = new ProcessStartInfo("/usr/bin/mono " + exe);
+			psi.WorkingDirectory = Path.GetDirectoryName(exe);
+			psi.UseShellExecute = false;
+			try {
+				Process p = new Process();
+				p.StartInfo = psi;
+				p.Start();
+			} catch (Exception) {
+				throw new ApplicationException("Can not execute " + "\"" + exe + "\"\n(Try restarting MonoDevelop or start your app manually)");
+			}
+		}
+		
+		public void Execute(IProject project)
+		{
+			VBCompilerParameters parameters = (VBCompilerParameters)project.ActiveConfiguration;
+			FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
+			
+			string directory = fileUtilityService.GetDirectoryNameWithSeparator(((VBCompilerParameters)project.ActiveConfiguration).OutputDirectory);
+			string exe = ((VBCompilerParameters)project.ActiveConfiguration).OutputAssembly + ".exe";
+			string args = ((VBCompilerParameters)project.ActiveConfiguration).CommandLineParameters;
+			
+			ProcessStartInfo psi;
+			if (parameters.ExecuteScript != null && parameters.ExecuteScript.Length > 0) {
+				//Console.WriteLine("EXECUTE SCRIPT!!!!!!");
+				psi = new ProcessStartInfo("\"" + parameters.ExecuteScript + "\"");
+				psi.UseShellExecute = false;
+			} else {
+				string runtimeStarter = "mono --debug ";
+				
+				switch (parameters.NetRuntime) {
+					case NetRuntime.Mono:
+						runtimeStarter = "mono --debug ";
+						break;
+					case NetRuntime.MonoInterpreter:
+						runtimeStarter = "mint ";
+						break;
+				}
+				
+				string additionalCommands = "";
+				if (parameters.PauseConsoleOutput)
+					additionalCommands = @"echo; read -p 'press any key to continue...' -n1;";
+
+				psi = new ProcessStartInfo("xterm",
+					string.Format (
+					@"-e ""{0} '{1}{2}' {3} ; {4}""",
+					runtimeStarter, directory, exe, args, additionalCommands));
+				psi.UseShellExecute = false;
+			}
+			
+			try {
+				psi.WorkingDirectory = Path.GetDirectoryName(directory);
+				psi.UseShellExecute  =  false;
+				
+				Process p = new Process();
+				p.StartInfo = psi;
+				p.Start();
+			} catch (Exception) {
+				throw new ApplicationException("Can not execute " + "\"" + directory + exe + "\"\n(Try restarting MonoDevelop or start your app manually)");
+			}
+		}
+
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBDOCCommand.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBDOCCommand.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBDOCCommand.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,103 @@
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Markus Palme" email="MarkusPalme at gmx.de"/>
+//     <version value="$version"/>
+// </file>
+
+using System;
+using System.IO;
+using System.Collections;
+using System.Collections.Specialized;
+using System.Windows.Forms;
+using System.Reflection;
+
+using ICSharpCode.Core.Properties;
+using ICSharpCode.Core.Services;
+
+using ICSharpCode.Core.AddIns;
+using ICSharpCode.Core.AddIns.Codons;
+
+using ICSharpCode.SharpDevelop.Internal.Project;
+using ICSharpCode.SharpDevelop.Services;
+
+namespace VBBinding
+{
+	////<summary>
+	/// Provides functions to run VB.DOC and to read the configuration of VB.DOC.
+	/// </summary>
+	public class VBDOCCommand : AbstractMenuCommand
+	{
+		///<summary>
+		/// Runs VB.DOC for the given project
+		/// </summary>
+		public override void Run()
+		{
+			IProjectService projectService = (IProjectService)ICSharpCode.Core.Services.ServiceManager.Services.GetService(typeof(IProjectService));
+			VBProject project = (VBProject)projectService.CurrentSelectedProject;
+			VBCompilerParameters compilerParameters = (VBCompilerParameters)project.ActiveConfiguration;
+			
+			Options options = new Options();
+			string extension = compilerParameters.CompileTarget == CompileTarget.Exe ? ".dll" : ".exe";
+			options.AssemblyFile = Path.Combine(compilerParameters.OutputDirectory, compilerParameters.OutputAssembly) + extension;
+			
+			ArrayList files = new ArrayList();
+			foreach(ProjectFile file in project.ProjectFiles) {
+				if(VBDOCConfigurationPanel.IsFileIncluded(file.Name, project)) {
+					files.Add(file.Name);
+				}
+			}
+			
+			options.Files = (string[])files.ToArray(typeof(string));
+			options.GlobalImports = compilerParameters.Imports.Split(',');
+			options.OutputXML = compilerParameters.VBDOCOutputFile;
+			options.Prefix = compilerParameters.VBDOCCommentPrefix;
+			options.RootNamespace = compilerParameters.RootNamespace;
+			
+			ArrayList referenceDirs = new ArrayList();
+			string mainDirectory = Path.GetDirectoryName(options.AssemblyFile);
+			
+			foreach(ProjectReference projectFile in project.ProjectReferences) {
+				if(projectFile.ReferenceType == ReferenceType.Assembly) {
+					string referenceDir = Path.GetDirectoryName(projectFile.Reference);
+					if(referenceDir.ToLower() != mainDirectory.ToLower() && referenceDirs.Contains(referenceDir) == false) {
+						referenceDirs.Add(referenceDir);
+					}
+				}
+			}
+			
+			StringCollection errors = options.Validate();
+		
+			if(errors.Count > 0) {
+				string message = "";
+				foreach(string description in errors) {
+					message += description + "\n";
+				}
+				MessageBox.Show(message, "Invalid VB.DOC options", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+				return;
+			}
+			
+			VBDOCRunner runner = new VBDOCRunner();
+			AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(resolve);
+			GuiMessageRecipient messageRecipient = new GuiMessageRecipient();
+			
+			try {
+				runner.RunVBDOC(options, messageRecipient);
+			} catch(Exception ex) {
+				MessageBox.Show("Documentation generation failed:\n" + ex.Message);
+			} finally {
+				messageRecipient.Finished();
+				AppDomain.CurrentDomain.AssemblyResolve -= new ResolveEventHandler(resolve);
+			}
+			
+		}
+		
+		Assembly resolve(object sender, ResolveEventArgs e)
+		{
+			if(e.Name.StartsWith("CommentExtractor")) {
+				return Assembly.GetAssembly(typeof(VBDOCRunner));
+			}
+			return null;
+		}
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBLanguageBinding.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBLanguageBinding.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBLanguageBinding.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,116 @@
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Markus Palme" email="MarkusPalme at gmx.de"/>
+//     <version value="$version"/>
+// </file>
+
+using System;
+using System.IO;
+using System.Collections;
+using System.Diagnostics;
+using System.Xml;
+
+using MonoDevelop.Gui;
+using MonoDevelop.Internal.Project;
+using MonoDevelop.Internal.Templates;
+//using CSharpBinding;
+
+namespace VBBinding
+{
+	public class VBLanguageBinding : ILanguageBinding
+	//public class VBLanguageBinding : CSharpLanguageBinding
+	{
+		public const string LanguageName = "VBNet";
+		
+		VBBindingCompilerServices   compilerServices  = new VBBindingCompilerServices();
+		VBBindingExecutionServices  executionServices = new VBBindingExecutionServices();
+		
+		public string Language {
+			get {
+				return LanguageName;
+			}
+		}
+		
+		public void Execute(string filename, bool debug)
+		{
+			Debug.Assert(executionServices != null);
+			executionServices.Execute(filename);
+		}
+		
+		public void Execute(IProject project, bool debug)
+		{
+			Debug.Assert(executionServices != null);
+			if(debug){
+				executionServices.Debug(project);
+			}else{
+				executionServices.Execute(project);
+			}//if
+			
+		}
+		
+		public string GetCompiledOutputName(string fileName)
+		{
+			Debug.Assert(compilerServices != null);
+			return compilerServices.GetCompiledOutputName(fileName);
+		}
+		
+		public string GetCompiledOutputName(IProject project)
+		{
+			Debug.Assert(compilerServices != null);
+			return compilerServices.GetCompiledOutputName(project);
+		}
+		
+		public bool CanCompile(string fileName)
+		{
+			Debug.Assert(compilerServices != null);
+			return compilerServices.CanCompile(fileName);
+		}
+		
+		public ICompilerResult CompileFile(string fileName)
+		{
+			Debug.Assert(compilerServices != null);
+			return compilerServices.CompileFile(fileName);
+		}
+		
+		public ICompilerResult CompileProject(IProject project)
+		{
+			Debug.Assert(compilerServices != null);
+			return compilerServices.CompileProject(project);
+		}
+		
+		public ICompilerResult RecompileProject(IProject project)
+		{
+			return CompileProject(project);
+		}
+		
+		public IProject CreateProject(ProjectCreateInformation info, XmlElement projectOptions)
+		{
+			return new VBProject(info, projectOptions);
+		}
+		
+		public virtual void Execute(string filename)
+		{
+			Debug.Assert(executionServices != null);
+			executionServices.Execute(filename);
+		}
+		
+		public virtual void Execute(IProject project)
+		{
+			Debug.Assert(executionServices != null);
+			executionServices.Execute(project);
+		}
+
+		
+		public void DebugProject (IProject project)
+		{
+			executionServices.Debug (project);
+		}
+		
+		public void GenerateMakefile (IProject project, Combine parentCombine)
+		{
+			compilerServices.GenerateMakefile (project, parentCombine);
+		}
+
+	}
+}

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBNetBinding.cmbx
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBNetBinding.cmbx	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBNetBinding.cmbx	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,20 @@
+<Combine fileversion="1.0" name="VBNetBinding" description="">
+  <StartMode startupentry="VBNetBinding" single="True">
+    <Execute entry="VBNetBinding" type="None" />
+    <Execute entry="SharpRefactoryVB" type="None" />
+  </StartMode>
+  <Entries>
+    <Entry filename="./VBNetBinding.prjx" />
+    <Entry filename="./SharpRefactoryVB/src/SharpRefactoryVB.prjx" />
+  </Entries>
+  <Configurations active="Debug">
+    <Configuration name="Release">
+      <Entry name="VBNetBinding" configurationname="Debug" build="False" />
+      <Entry name="SharpRefactoryVB" configurationname="Debug" build="False" />
+    </Configuration>
+    <Configuration name="Debug">
+      <Entry name="VBNetBinding" configurationname="Debug" build="False" />
+      <Entry name="SharpRefactoryVB" configurationname="Debug" build="False" />
+    </Configuration>
+  </Configurations>
+</Combine>
\ No newline at end of file

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBNetBinding.mdsx
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBNetBinding.mdsx	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBNetBinding.mdsx	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,3 @@
+<MonoDevelopSolution fileversion="1.0">
+  <RelativeOutputPath>./build/bin</RelativeOutputPath>
+</MonoDevelopSolution>
\ No newline at end of file

Added: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBNetBinding.prjx
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBNetBinding.prjx	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBNetBinding.prjx	2004-11-10 18:03:32 UTC (rev 2023)
@@ -0,0 +1,62 @@
+<Project name="VBNetBinding" description="" newfilesearch="None" enableviewstate="True" version="1.1" projecttype="C#">
+  <Contents>
+    <File name="./AssemblyInfo.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./VBAmbience.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./VBBindingCompilerServices.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./VBBindingExecutionServices.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./VBLanguageBinding.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./VBNetBinding.addin.xml" subtype="Code" buildaction="Nothing" dependson="" data="" />
+    <File name="./Gui/CodeGenerationPanel.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Gui/OutputOptionsPanel.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/ExpressionFinder.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/Parser.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/Resolver.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/TypeVisitor.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/VBNetVisitor.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/SharpDevelopTree/AttributeSection.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/SharpDevelopTree/Class.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/SharpDevelopTree/CompilationUnit.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/SharpDevelopTree/Constructor.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/SharpDevelopTree/Event.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/SharpDevelopTree/Field.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/SharpDevelopTree/Indexer.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/SharpDevelopTree/Method.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/SharpDevelopTree/Parameter.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/SharpDevelopTree/Property.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Parser/SharpDevelopTree/ReturnType.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Project/VBCompilerParameters.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./Project/VBProject.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./VB.glade" subtype="Code" buildaction="EmbedAsResource" dependson="" data="" />
+  </Contents>
+  <References>
+    <Reference type="Gac" refto="Mono.GetOptions, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" localcopy="True" />
+    <Reference type="Project" refto="SharpRefactoryVB" localcopy="True" />
+    <Reference type="Gac" refto="System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" localcopy="True" />
+    <Reference type="Assembly" refto="../../Core/build/bin/ICSharpCode.SharpAssembly.dll" localcopy="True" />
+    <Reference type="Assembly" refto="../../Core/build/bin/ICSharpCode.SharpRefactory.dll" localcopy="True" />
+    <Reference type="Assembly" refto="../../Core/build/bin/MonoDevelop.Base.dll" localcopy="True" />
+    <Reference type="Assembly" refto="../../Core/build/bin/MonoDevelop.Core.dll" localcopy="True" />
+    <Reference type="Assembly" refto="../../Core/build/bin/MonoDevelop.SourceEditor.dll" localcopy="True" />
+    <Reference type="Gac" refto="glade-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" localcopy="True" />
+    <Reference type="Gac" refto="gtk-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" localcopy="True" />
+    <Reference type="Assembly" refto="../../Core/build/bin/MonoDevelop.Gui.Widgets.dll" localcopy="True" />
+  </References>
+  <DeploymentInformation target="" script="" strategy="File" />
+  <Configuration runwithwarnings="False" name="Debug">
+    <CodeGeneration runtime="MsNet" compiler="Csc" warninglevel="4" nowarn="" includedebuginformation="True" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="Library" definesymbols="" generatexmldocumentation="False" win32Icon="" />
+    <Execution commandlineparameters="" consolepause="False" />
+    <Output directory="./bin/Debug" assembly="VBNetBinding" executeScript="" executeBeforeBuild="" executeAfterBuild="" />
+  </Configuration>
+  <Configurations active="Debug">
+    <Configuration runwithwarnings="False" name="Debug">
+      <CodeGeneration runtime="MsNet" compiler="Csc" warninglevel="4" nowarn="" includedebuginformation="True" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="Library" definesymbols="" generatexmldocumentation="False" win32Icon="" />
+      <Execution commandlineparameters="" consolepause="False" />
+      <Output directory="./bin/Debug" assembly="VBNetBinding" executeScript="" executeBeforeBuild="" executeAfterBuild="" />
+    </Configuration>
+    <Configuration runwithwarnings="False" name="Release">
+      <CodeGeneration runtime="MsNet" compiler="Csc" warninglevel="4" nowarn="" includedebuginformation="True" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="Library" definesymbols="" generatexmldocumentation="False" win32Icon="" />
+      <Execution commandlineparameters="" consolepause="False" />
+      <Output directory="./bin/Release" assembly="VBNetBinding" executeScript="" executeBeforeBuild="" executeAfterBuild="" />
+    </Configuration>
+  </Configurations>
+</Project>
\ No newline at end of file

Modified: trunk/MonoDevelop/Core/src/Main/Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/ChangeLog	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/Main/Base/ChangeLog	2004-11-10 18:03:32 UTC (rev 2023)
@@ -1,3 +1,10 @@
+2004-11-05  Levi Bard  <taktaktaktaktaktaktaktaktaktak at gmail.com>
+
+	* src/Main/Base/Internal/Parser/IParser.cs: Added
+	HandlesFileExtension() for selection among multiple parsers
+	* src/Main/Base/Services/ParserService/DefaultParserService.cs: Added
+	parser selection using IParser.HandlesFileExtension()
+
 2004-11-02  John Luke  <john.luke at gmail.com>
 
 	* Services/File/RecentOpen.cs: use simpler RecentFiles AddWithLimit

Modified: trunk/MonoDevelop/Core/src/Main/Base/Internal/Parser/IParser.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Internal/Parser/IParser.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/Main/Base/Internal/Parser/IParser.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -126,6 +126,7 @@
 		
 		ICompilationUnitBase Parse(string fileName);
 		ICompilationUnitBase Parse(string fileName, string fileContent);
+		bool HandlesFileExtension(string fileExtension);
 		
 		/// <summary>
 		/// Resolves an expression.

Modified: trunk/MonoDevelop/Core/src/Main/Base/Services/ParserService/DefaultParserService.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Services/ParserService/DefaultParserService.cs	2004-11-10 02:31:03 UTC (rev 2022)
+++ trunk/MonoDevelop/Core/src/Main/Base/Services/ParserService/DefaultParserService.cs	2004-11-10 18:03:32 UTC (rev 2023)
@@ -1150,13 +1150,13 @@
 		public virtual IParser GetParser(string fileName)
 		{
 			// HACK: I'm too lazy to do it 'right'
+			// HACK: Still a hack, but extensible
 			if (fileName != null) {
-				if (Path.GetExtension(fileName).ToUpper() == ".CS") {
-					return parser[0];
+				foreach(IParser p in parser){
+					if(p.HandlesFileExtension(Path.GetExtension(fileName))){
+						return p;
+					}
 				}
-				//if (Path.GetExtension(fileName).ToUpper() == ".VB") {
-				//	return parser[1];
-				//}
 			}
 			return null;
 		}




More information about the Monodevelop-patches-list mailing list