diff --git a/AddIns/ICSharpCode.SharpDevelop.addin b/AddIns/ICSharpCode.SharpDevelop.addin index 471086b4a2..5350e01a57 100644 --- a/AddIns/ICSharpCode.SharpDevelop.addin +++ b/AddIns/ICSharpCode.SharpDevelop.addin @@ -623,6 +623,10 @@ + section to your .addin for use with the SharpDevelop AddIn Manager. + See SharpDevelop/doc/technotes/AddInManager.rtf for more information. + +- Once have published your AddIn on the Internet, please add it to the SharpDevelop wiki to let other users know! + http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.ThirdPartyAddIns + + +This file serves as a reminder for you on how to find information on SharpDevelop AddIn development, you can +remove it from your project if you don't need it anymore. diff --git a/data/templates/project/CSharp/SharpDevelopAddin.xpt b/data/templates/project/CSharp/SharpDevelopAddin.xpt index 1888256015..3c9981811d 100644 --- a/data/templates/project/CSharp/SharpDevelopAddin.xpt +++ b/data/templates/project/CSharp/SharpDevelopAddin.xpt @@ -15,6 +15,7 @@ + @@ -155,6 +156,7 @@ public class TestPad : AbstractPadContent } ]]> + diff --git a/data/templates/project/CSharp/SharpDevelopCustomTool.xpt b/data/templates/project/CSharp/SharpDevelopCustomTool.xpt index 060eae4b43..6cee40d3c0 100644 --- a/data/templates/project/CSharp/SharpDevelopCustomTool.xpt +++ b/data/templates/project/CSharp/SharpDevelopCustomTool.xpt @@ -13,6 +13,7 @@ + @@ -185,6 +186,7 @@ namespace ${StandardNamespace} ]]> + diff --git a/data/templates/project/CSharp/SharpDevelopMacro.xpt b/data/templates/project/CSharp/SharpDevelopMacro.xpt index 7295a69fdc..ac70e76daf 100644 --- a/data/templates/project/CSharp/SharpDevelopMacro.xpt +++ b/data/templates/project/CSharp/SharpDevelopMacro.xpt @@ -15,6 +15,7 @@ + @@ -98,6 +99,7 @@ namespace ${StandardNamespace} } ]]> + diff --git a/data/templates/project/VBNet/SharpDevelopAddin.xpt b/data/templates/project/VBNet/SharpDevelopAddin.xpt index 7dc337bd4b..67b6030d43 100644 --- a/data/templates/project/VBNet/SharpDevelopAddin.xpt +++ b/data/templates/project/VBNet/SharpDevelopAddin.xpt @@ -15,6 +15,7 @@ + @@ -145,6 +146,7 @@ Public Class TestPad End Class ]]> + diff --git a/data/templates/project/VBNet/SharpDevelopMacro.xpt b/data/templates/project/VBNet/SharpDevelopMacro.xpt index 61e5b86129..78a0059138 100644 --- a/data/templates/project/VBNet/SharpDevelopMacro.xpt +++ b/data/templates/project/VBNet/SharpDevelopMacro.xpt @@ -15,6 +15,7 @@ + @@ -96,6 +97,7 @@ Inherits AbstractMenuCommand End Class ]]> + diff --git a/src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/CodeCompletionData.boo b/src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/CodeCompletionData.boo index d617e17c04..784566f917 100644 --- a/src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/CodeCompletionData.boo +++ b/src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/CodeCompletionData.boo @@ -115,6 +115,7 @@ internal class GlobalsCompletionDataProvider(ICSharpCode.SharpDevelop.DefaultEdi def constructor(interpreter as InterpreterContext): _interpreter = interpreter + super.preSelection = "" override def GenerateCompletionData(fileName as string, textArea as TextArea, charTyped as System.Char) as (ICompletionData): globals = _interpreter.GetGlobals() diff --git a/src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/BuildOptions.cs b/src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/BuildOptions.cs index 8b9e0bd7de..aba3e923ea 100644 --- a/src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/BuildOptions.cs +++ b/src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/BuildOptions.cs @@ -7,6 +7,7 @@ using System; using ICSharpCode.SharpDevelop.Gui.OptionPanels; +using ICSharpCode.SharpDevelop.Project; namespace Grunwald.BooBinding { @@ -31,15 +32,13 @@ namespace Grunwald.BooBinding helper.BindBoolean("noCorlibCheckBox", "NoStdLib", false).CreateLocationButton("noCorlibCheckBox"); helper.BindBoolean("duckyCheckBox", "Ducky", false).CreateLocationButton("duckyCheckBox"); - helper.BindString("pipelineTextBox", "Pipeline").CreateLocationButton("pipelineLabel"); + helper.BindString("pipelineTextBox", "Pipeline", TextBoxEditMode.EditEvaluatedProperty).CreateLocationButton("pipelineLabel"); //InitWarnings(); // - helper.BindString("baseIntermediateOutputPathTextBox", "BaseIntermediateOutputPath").CreateLocationButton("baseIntermediateOutputPathTextBox"); - ConnectBrowseFolder("baseIntermediateOutputPathBrowseButton", "baseIntermediateOutputPathTextBox", "${res:Dialog.Options.PrjOptions.Configuration.FolderBrowserDescription}"); - helper.BindString("intermediateOutputPathTextBox", "IntermediateOutputPath").CreateLocationButton("intermediateOutputPathTextBox"); - ConnectBrowseFolder("intermediateOutputPathBrowseButton", "intermediateOutputPathTextBox", "${res:Dialog.Options.PrjOptions.Configuration.FolderBrowserDescription}"); + InitBaseIntermediateOutputPath(); + InitIntermediateOutputPath(); // helper.AddConfigurationSelector(this); diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/OptionPanels/BuildOptions.cs b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/OptionPanels/BuildOptions.cs index 808f2bfe34..4fb4f55ef0 100644 --- a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/OptionPanels/BuildOptions.cs +++ b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/OptionPanels/BuildOptions.cs @@ -28,8 +28,7 @@ namespace CSharpBinding.OptionPanels ConfigurationGuiBinding b; - b = helper.BindString("conditionalSymbolsTextBox", "DefineConstants"); - b.TreatPropertyValueAsLiteral = false; + b = helper.BindString("conditionalSymbolsTextBox", "DefineConstants", TextBoxEditMode.EditRawProperty); b.DefaultLocation = PropertyStorageLocations.ConfigurationSpecific; b.CreateLocationButton("conditionalSymbolsTextBox"); diff --git a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/OptionPanels/BuildOptions.cs b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/OptionPanels/BuildOptions.cs index fd8227afc4..60bf278d98 100644 --- a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/OptionPanels/BuildOptions.cs +++ b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/OptionPanels/BuildOptions.cs @@ -21,8 +21,7 @@ namespace VBNetBinding.OptionPanels ConfigurationGuiBinding b; - b = helper.BindString("conditionalSymbolsTextBox", "DefineConstants"); - b.TreatPropertyValueAsLiteral = false; + b = helper.BindString("conditionalSymbolsTextBox", "DefineConstants", TextBoxEditMode.EditRawProperty); b.DefaultLocation = PropertyStorageLocations.ConfigurationSpecific; b.CreateLocationButton("conditionalSymbolsTextBox"); diff --git a/src/AddIns/BackendBindings/WixBinding/Project/Src/Gui/ApplicationSettingsPanel.cs b/src/AddIns/BackendBindings/WixBinding/Project/Src/Gui/ApplicationSettingsPanel.cs index 9067c4183f..0f279d78d3 100644 --- a/src/AddIns/BackendBindings/WixBinding/Project/Src/Gui/ApplicationSettingsPanel.cs +++ b/src/AddIns/BackendBindings/WixBinding/Project/Src/Gui/ApplicationSettingsPanel.cs @@ -20,15 +20,14 @@ namespace ICSharpCode.WixBinding { SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("ICSharpCode.WixBinding.Resources.ApplicationSettingsPanel.xfrm")); InitializeHelper(); - + ConfigurationGuiBinding b; - b = helper.BindString("outputNameTextBox", "OutputName"); + b = helper.BindString("outputNameTextBox", "OutputName", TextBoxEditMode.EditEvaluatedProperty); b.CreateLocationButton("outputNameTextBox"); Get("outputName").TextChanged += RefreshOutputFileNameTextBox; - ConnectBrowseButton("localizedStringFileBrowseButton", "localizedStringFileTextBox", "${res:ICSharpCode.WixBinding.WixLocalizationFileFilterName} (*.wxl)|*.wxl|${res:SharpDevelop.FileFilter.AllFiles}|*.*"); - b = helper.BindString("localizedStringFileTextBox", "LocalizedStringFile"); - b.TreatPropertyValueAsLiteral = false; + ConnectBrowseButton("localizedStringFileBrowseButton", "localizedStringFileTextBox", "${res:ICSharpCode.WixBinding.WixLocalizationFileFilterName} (*.wxl)|*.wxl|${res:SharpDevelop.FileFilter.AllFiles}|*.*", TextBoxEditMode.EditEvaluatedProperty); + b = helper.BindString("localizedStringFileTextBox", "LocalizedStringFile", TextBoxEditMode.EditRawProperty); b.CreateLocationButton("localizedStringFileTextBox"); b = helper.BindEnum("outputTypeComboBox", "OutputType"); diff --git a/src/AddIns/BackendBindings/WixBinding/Project/Src/Gui/CompilerParametersPanel.cs b/src/AddIns/BackendBindings/WixBinding/Project/Src/Gui/CompilerParametersPanel.cs index 34c495dff4..d787bfa9f7 100644 --- a/src/AddIns/BackendBindings/WixBinding/Project/Src/Gui/CompilerParametersPanel.cs +++ b/src/AddIns/BackendBindings/WixBinding/Project/Src/Gui/CompilerParametersPanel.cs @@ -21,25 +21,23 @@ namespace ICSharpCode.WixBinding InitializeHelper(); ConfigurationGuiBinding b; - b = helper.BindString("outputPathTextBox", "OutputPath"); + b = helper.BindString("outputPathTextBox", "OutputPath", TextBoxEditMode.EditRawProperty); b.CreateLocationButton("outputPathTextBox"); - ConnectBrowseFolder("outputPathBrowseButton", "outputPathTextBox", "${res:Dialog.Options.PrjOptions.Configuration.FolderBrowserDescription}"); + ConnectBrowseFolder("outputPathBrowseButton", "outputPathTextBox", "${res:Dialog.Options.PrjOptions.Configuration.FolderBrowserDescription}", TextBoxEditMode.EditRawProperty); - b = helper.BindString("baseOutputPathTextBox", "BaseOutputPath"); + b = helper.BindString("baseOutputPathTextBox", "BaseOutputPath", TextBoxEditMode.EditRawProperty); b.CreateLocationButton("baseOutputPathTextBox"); - ConnectBrowseFolder("baseOutputPathBrowseButton", "baseOutputPathTextBox", "${res:Dialog.Options.PrjOptions.Configuration.FolderBrowserDescription}"); + ConnectBrowseFolder("baseOutputPathBrowseButton", "baseOutputPathTextBox", "${res:Dialog.Options.PrjOptions.Configuration.FolderBrowserDescription}", TextBoxEditMode.EditRawProperty); - b = helper.BindString("intermediateOutputPathTextBox", "IntermediateOutputPath"); + b = helper.BindString("intermediateOutputPathTextBox", "IntermediateOutputPath", TextBoxEditMode.EditRawProperty); b.CreateLocationButton("intermediateOutputPathTextBox"); - ConnectBrowseFolder("intermediateOutputPathBrowseButton", "intermediateOutputPathTextBox", "${res:Dialog.Options.PrjOptions.Configuration.FolderBrowserDescription}"); + ConnectBrowseFolder("intermediateOutputPathBrowseButton", "intermediateOutputPathTextBox", "${res:Dialog.Options.PrjOptions.Configuration.FolderBrowserDescription}", TextBoxEditMode.EditRawProperty); - b = helper.BindString("wixToolPathTextBox", "WixToolPath"); - b.TreatPropertyValueAsLiteral = false; - ConnectBrowseFolder("wixToolPathBrowseButton", "wixToolPathTextBox", String.Empty); + b = helper.BindString("wixToolPathTextBox", "WixToolPath", TextBoxEditMode.EditRawProperty); + ConnectBrowseFolder("wixToolPathBrowseButton", "wixToolPathTextBox", String.Empty, TextBoxEditMode.EditRawProperty); - b = helper.BindString("wixMSBuildExtensionsPathTextBox", "WixMSBuildExtensionsPath"); - b.TreatPropertyValueAsLiteral = false; - ConnectBrowseFolder("wixMSBuildExtensionsPathBrowseButton", "wixMSBuildExtensionsPathTextBox", String.Empty); + b = helper.BindString("wixMSBuildExtensionsPathTextBox", "WixMSBuildExtensionsPath", TextBoxEditMode.EditRawProperty); + ConnectBrowseFolder("wixMSBuildExtensionsPathBrowseButton", "wixMSBuildExtensionsPathTextBox", String.Empty, TextBoxEditMode.EditRawProperty); // Add the extension picker in manually since the anchoring does not // work if we add the picker into the XML of the CompilerParametersPanel.xfrm file. @@ -66,7 +64,7 @@ namespace ICSharpCode.WixBinding new StringPair("2", "2"), new StringPair("3", "3")); ChooseStorageLocationButton locationButton = b.CreateLocationButtonInPanel("errorsAndWarningsGroupBox"); - b = helper.BindString("suppressWarningsTextBox", "NoWarn"); + b = helper.BindString("suppressWarningsTextBox", "NoWarn", TextBoxEditMode.EditEvaluatedProperty); b.RegisterLocationButton(locationButton); b = helper.BindBoolean("treatWarningsAsErrorsCheckBox", "TreatWarningsAsErrors", false); diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/TypeEditors/ContentEditor.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/TypeEditors/ContentEditor.cs index 36c95398ba..85e1cfef48 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/TypeEditors/ContentEditor.cs +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/TypeEditors/ContentEditor.cs @@ -61,6 +61,8 @@ namespace ICSharpCode.WpfDesign.Designer.Controls.TypeEditors ContextMenu contextMenu = new ContextMenu(); contextMenu.Items.Add(CreateMenuItem("Set to _null", delegate { property.Value = null; })); contextMenu.Items.Add(CreateMenuItem("Create _string", delegate { property.Value = ""; })); + contextMenu.Items.Add(CreateMenuItem("Create _Canvas", delegate { property.Value = new Canvas(); })); + contextMenu.Items.Add(CreateMenuItem("Create _Grid", delegate { property.Value = new Grid(); })); return contextMenu; } diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlParser.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlParser.cs index 0d9b40ef99..114d2d34f0 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlParser.cs +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlParser.cs @@ -422,7 +422,7 @@ namespace ICSharpCode.WpfDesign.XamlDom object collectionInstance = null; XamlProperty collectionProperty = null; if (propertyInfo.IsCollection) { - if (defaultProperty.FullyQualifiedName == propertyInfo.FullyQualifiedName) { + if (defaultProperty != null && defaultProperty.FullyQualifiedName == propertyInfo.FullyQualifiedName) { collectionInstance = defaultPropertyValue; foreach (XamlProperty existing in obj.Properties) { if (existing.propertyInfo == defaultProperty) { diff --git a/src/Libraries/ICSharpCode.Build.Tasks/Project/SharpDevelop.Build.VisualBasic.targets b/src/Libraries/ICSharpCode.Build.Tasks/Project/SharpDevelop.Build.VisualBasic.targets index 1fed152b06..b46a0ec2a3 100644 --- a/src/Libraries/ICSharpCode.Build.Tasks/Project/SharpDevelop.Build.VisualBasic.targets +++ b/src/Libraries/ICSharpCode.Build.Tasks/Project/SharpDevelop.Build.VisualBasic.targets @@ -161,7 +161,7 @@ - + PocketPC WinCE diff --git a/src/Libraries/ICSharpCode.TextEditor/Project/Src/Document/TextBufferStrategy/GapTextBufferStrategy.cs b/src/Libraries/ICSharpCode.TextEditor/Project/Src/Document/TextBufferStrategy/GapTextBufferStrategy.cs index 6721b87a10..5dbf6981b5 100644 --- a/src/Libraries/ICSharpCode.TextEditor/Project/Src/Document/TextBufferStrategy/GapTextBufferStrategy.cs +++ b/src/Libraries/ICSharpCode.TextEditor/Project/Src/Document/TextBufferStrategy/GapTextBufferStrategy.cs @@ -42,7 +42,7 @@ namespace ICSharpCode.TextEditor.Document } } - public void SetContent(string text) + public void SetContent(string text) { if (text == null) { text = String.Empty; @@ -51,15 +51,27 @@ namespace ICSharpCode.TextEditor.Document gapBeginOffset = gapEndOffset = 0; } - public char GetCharAt(int offset) + public char GetCharAt(int offset) { + #if DEBUG + CheckThread(); + if (offset < 0 || offset >= Length) { + throw new ArgumentOutOfRangeException("offset", offset, "0 <= offset < " + Length.ToString()); + } + #endif return offset < gapBeginOffset ? buffer[offset] : buffer[offset + GapLength]; } - public string GetText(int offset, int length) + public string GetText(int offset, int length) { #if DEBUG CheckThread(); + if (offset < 0 || offset > Length) { + throw new ArgumentOutOfRangeException("offset", offset, "0 <= offset <= " + Length.ToString()); + } + if (length < 0 || offset + length > Length) { + throw new ArgumentOutOfRangeException("length", length, "0 <= length, offset+length <= " + Length.ToString()); + } #endif int end = offset + length; @@ -90,12 +102,22 @@ namespace ICSharpCode.TextEditor.Document Replace(offset, length, String.Empty); } - public void Replace(int offset, int length, string text) + public void Replace(int offset, int length, string text) { if (text == null) { text = String.Empty; } + #if DEBUG + CheckThread(); + if (offset < 0 || offset > Length) { + throw new ArgumentOutOfRangeException("offset", offset, "0 <= offset <= " + Length.ToString()); + } + if (length < 0 || offset + length > Length) { + throw new ArgumentOutOfRangeException("length", length, "0 <= length, offset+length <= " + Length.ToString()); + } + #endif + // Math.Max is used so that if we need to resize the array // the new array has enough space for all old chars PlaceGap(offset + length, Math.Max(text.Length - length, 0)); @@ -103,7 +125,7 @@ namespace ICSharpCode.TextEditor.Document gapBeginOffset += text.Length - length; } - void PlaceGap(int offset, int length) + void PlaceGap(int offset, int length) { int deltaLength = GapLength - length; // if the gap has the right length, move the chars between offset and gap diff --git a/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/CompletionWindow/CodeCompletionWindow.cs b/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/CompletionWindow/CodeCompletionWindow.cs index 7e0799c26b..fd44816ad1 100644 --- a/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/CompletionWindow/CodeCompletionWindow.cs +++ b/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/CompletionWindow/CodeCompletionWindow.cs @@ -7,6 +7,7 @@ using System; using System.Drawing; +using System.Diagnostics; using System.Windows.Forms; using ICSharpCode.TextEditor.Document; @@ -280,6 +281,7 @@ namespace ICSharpCode.TextEditor.Gui.CompletionWindow if (endOffset - startOffset > 0) { control.Document.Remove(startOffset, endOffset - startOffset); } + Debug.Assert(startOffset <= document.TextLength); result = dataProvider.InsertAction(data, control.ActiveTextAreaControl.TextArea, startOffset, ch); } finally { control.EndUpdate(); diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/KeywordList.txt b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/KeywordList.txt index 475bc54ed6..824dc610f0 100644 --- a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/KeywordList.txt +++ b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/KeywordList.txt @@ -235,4 +235,4 @@ Null("Nothing") BlockSucc("Case", "Catch", "Else", "ElseIf", "End", "Finally", "Loop", "Next") # List of unreserved keywords, must be the same as the "Identifier" production in VBNET.ATG -Unreserved("Text", "Binary", "Compare", "Assembly", "Ansi", "Auto", "Preserve", "Unicode", "Until") +Unreserved("Text", "Binary", "Compare", "Assembly", "Ansi", "Auto", "Preserve", "Unicode", "Until", "Explicit", "Off") diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Tokens.cs b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Tokens.cs index 6ef61bf546..822391c64b 100644 --- a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Tokens.cs +++ b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Tokens.cs @@ -235,7 +235,7 @@ namespace ICSharpCode.NRefactory.Parser.VB } public static BitArray Null = NewSet(Nothing); public static BitArray BlockSucc = NewSet(Case, Catch, Else, ElseIf, End, Finally, Loop, Next); - public static BitArray Unreserved = NewSet(Text, Binary, Compare, Assembly, Ansi, Auto, Preserve, Unicode, Until); + public static BitArray Unreserved = NewSet(Text, Binary, Compare, Assembly, Ansi, Auto, Preserve, Unicode, Until, Explicit, Off); static string[] tokenList = new string[] { // ----- terminal classes ----- diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs index d85956f3f1..9def4d56fc 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs +++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs @@ -150,7 +150,7 @@ out u); void GlobalAttributeSection() { Expect(27); -#line 2037 "VBNET.ATG" +#line 2035 "VBNET.ATG" Location startPos = t.Location; if (la.kind == 49) { lexer.NextToken(); @@ -158,20 +158,20 @@ out u); lexer.NextToken(); } else SynErr(208); -#line 2039 "VBNET.ATG" +#line 2037 "VBNET.ATG" string attributeTarget = t.val.ToLower(System.Globalization.CultureInfo.InvariantCulture); List attributes = new List(); ASTAttribute attribute; Expect(13); Attribute( -#line 2043 "VBNET.ATG" +#line 2041 "VBNET.ATG" out attribute); -#line 2043 "VBNET.ATG" +#line 2041 "VBNET.ATG" attributes.Add(attribute); while ( -#line 2044 "VBNET.ATG" +#line 2042 "VBNET.ATG" NotFinalComma()) { if (la.kind == 12) { lexer.NextToken(); @@ -183,10 +183,10 @@ NotFinalComma()) { Expect(13); } Attribute( -#line 2044 "VBNET.ATG" +#line 2042 "VBNET.ATG" out attribute); -#line 2044 "VBNET.ATG" +#line 2042 "VBNET.ATG" attributes.Add(attribute); } if (la.kind == 12) { @@ -195,7 +195,7 @@ out attribute); Expect(26); EndOfStmt(); -#line 2049 "VBNET.ATG" +#line 2047 "VBNET.ATG" AttributeSection section = new AttributeSection(attributeTarget, attributes); section.StartLocation = startPos; section.EndLocation = t.EndLocation; @@ -312,47 +312,47 @@ out aliasedType); } void Qualident( -#line 2765 "VBNET.ATG" +#line 2763 "VBNET.ATG" out string qualident) { -#line 2767 "VBNET.ATG" +#line 2765 "VBNET.ATG" string name; qualidentBuilder.Length = 0; Identifier(); -#line 2771 "VBNET.ATG" +#line 2769 "VBNET.ATG" qualidentBuilder.Append(t.val); while ( -#line 2772 "VBNET.ATG" +#line 2770 "VBNET.ATG" DotAndIdentOrKw()) { Expect(10); IdentifierOrKeyword( -#line 2772 "VBNET.ATG" +#line 2770 "VBNET.ATG" out name); -#line 2772 "VBNET.ATG" +#line 2770 "VBNET.ATG" qualidentBuilder.Append('.'); qualidentBuilder.Append(name); } -#line 2774 "VBNET.ATG" +#line 2772 "VBNET.ATG" qualident = qualidentBuilder.ToString(); } void TypeName( -#line 1930 "VBNET.ATG" +#line 1928 "VBNET.ATG" out TypeReference typeref) { -#line 1931 "VBNET.ATG" +#line 1929 "VBNET.ATG" ArrayList rank = null; NonArrayTypeName( -#line 1933 "VBNET.ATG" +#line 1931 "VBNET.ATG" out typeref, false); ArrayTypeModifiers( -#line 1934 "VBNET.ATG" +#line 1932 "VBNET.ATG" out rank); -#line 1935 "VBNET.ATG" +#line 1933 "VBNET.ATG" if (rank != null && typeref != null) { typeref.RankSpecifier = (int[])rank.ToArray(typeof(int)); } @@ -369,35 +369,35 @@ out rank); } void AttributeSection( -#line 2107 "VBNET.ATG" +#line 2105 "VBNET.ATG" out AttributeSection section) { -#line 2109 "VBNET.ATG" +#line 2107 "VBNET.ATG" string attributeTarget = "";List attributes = new List(); ASTAttribute attribute; Expect(27); -#line 2113 "VBNET.ATG" +#line 2111 "VBNET.ATG" Location startPos = t.Location; if ( -#line 2114 "VBNET.ATG" +#line 2112 "VBNET.ATG" IsLocalAttrTarget()) { if (la.kind == 93) { lexer.NextToken(); -#line 2115 "VBNET.ATG" +#line 2113 "VBNET.ATG" attributeTarget = "event"; } else if (la.kind == 154) { lexer.NextToken(); -#line 2116 "VBNET.ATG" +#line 2114 "VBNET.ATG" attributeTarget = "return"; } else { Identifier(); -#line 2119 "VBNET.ATG" +#line 2117 "VBNET.ATG" string val = t.val.ToLower(System.Globalization.CultureInfo.InvariantCulture); if (val != "field" || val != "method" || val != "module" || val != "param" || @@ -410,20 +410,20 @@ IsLocalAttrTarget()) { Expect(13); } Attribute( -#line 2129 "VBNET.ATG" +#line 2127 "VBNET.ATG" out attribute); -#line 2129 "VBNET.ATG" +#line 2127 "VBNET.ATG" attributes.Add(attribute); while ( -#line 2130 "VBNET.ATG" +#line 2128 "VBNET.ATG" NotFinalComma()) { Expect(12); Attribute( -#line 2130 "VBNET.ATG" +#line 2128 "VBNET.ATG" out attribute); -#line 2130 "VBNET.ATG" +#line 2128 "VBNET.ATG" attributes.Add(attribute); } if (la.kind == 12) { @@ -431,7 +431,7 @@ out attribute); } Expect(26); -#line 2134 "VBNET.ATG" +#line 2132 "VBNET.ATG" section = new AttributeSection(attributeTarget, attributes); section.StartLocation = startPos; section.EndLocation = t.EndLocation; @@ -439,69 +439,69 @@ out attribute); } void TypeModifier( -#line 2841 "VBNET.ATG" +#line 2843 "VBNET.ATG" ModifierList m) { switch (la.kind) { case 148: { lexer.NextToken(); -#line 2842 "VBNET.ATG" +#line 2844 "VBNET.ATG" m.Add(Modifiers.Public, t.Location); break; } case 147: { lexer.NextToken(); -#line 2843 "VBNET.ATG" +#line 2845 "VBNET.ATG" m.Add(Modifiers.Protected, t.Location); break; } case 99: { lexer.NextToken(); -#line 2844 "VBNET.ATG" +#line 2846 "VBNET.ATG" m.Add(Modifiers.Internal, t.Location); break; } case 145: { lexer.NextToken(); -#line 2845 "VBNET.ATG" +#line 2847 "VBNET.ATG" m.Add(Modifiers.Private, t.Location); break; } case 158: { lexer.NextToken(); -#line 2846 "VBNET.ATG" +#line 2848 "VBNET.ATG" m.Add(Modifiers.Static, t.Location); break; } case 157: { lexer.NextToken(); -#line 2847 "VBNET.ATG" +#line 2849 "VBNET.ATG" m.Add(Modifiers.New, t.Location); break; } case 122: { lexer.NextToken(); -#line 2848 "VBNET.ATG" +#line 2850 "VBNET.ATG" m.Add(Modifiers.Abstract, t.Location); break; } case 131: { lexer.NextToken(); -#line 2849 "VBNET.ATG" +#line 2851 "VBNET.ATG" m.Add(Modifiers.Sealed, t.Location); break; } case 203: { lexer.NextToken(); -#line 2850 "VBNET.ATG" +#line 2852 "VBNET.ATG" m.Add(Modifiers.Partial, t.Location); break; } @@ -884,6 +884,14 @@ template); lexer.NextToken(); break; } + case 134: { + lexer.NextToken(); + break; + } + case 95: { + lexer.NextToken(); + break; + } default: SynErr(216); break; } } @@ -1106,10 +1114,10 @@ m, attributes); } void NonArrayTypeName( -#line 1953 "VBNET.ATG" +#line 1951 "VBNET.ATG" out TypeReference typeref, bool canBeUnbound) { -#line 1955 "VBNET.ATG" +#line 1953 "VBNET.ATG" string name; typeref = null; bool isGlobal = false; @@ -1119,38 +1127,38 @@ out TypeReference typeref, bool canBeUnbound) { lexer.NextToken(); Expect(10); -#line 1960 "VBNET.ATG" +#line 1958 "VBNET.ATG" isGlobal = true; } QualIdentAndTypeArguments( -#line 1961 "VBNET.ATG" +#line 1959 "VBNET.ATG" out typeref, canBeUnbound); -#line 1962 "VBNET.ATG" +#line 1960 "VBNET.ATG" typeref.IsGlobal = isGlobal; while (la.kind == 10) { lexer.NextToken(); -#line 1963 "VBNET.ATG" +#line 1961 "VBNET.ATG" TypeReference nestedTypeRef; QualIdentAndTypeArguments( -#line 1964 "VBNET.ATG" +#line 1962 "VBNET.ATG" out nestedTypeRef, canBeUnbound); -#line 1965 "VBNET.ATG" +#line 1963 "VBNET.ATG" typeref = new InnerClassTypeReference(typeref, nestedTypeRef.Type, nestedTypeRef.GenericTypes); } } else if (la.kind == 133) { lexer.NextToken(); -#line 1968 "VBNET.ATG" +#line 1966 "VBNET.ATG" typeref = new TypeReference("System.Object"); } else if (StartOf(10)) { PrimitiveTypeName( -#line 1969 "VBNET.ATG" +#line 1967 "VBNET.ATG" out name); -#line 1969 "VBNET.ATG" +#line 1967 "VBNET.ATG" typeref = new TypeReference(name); } else SynErr(219); } @@ -1219,27 +1227,27 @@ TypeDeclaration newType) { } void FormalParameterList( -#line 2141 "VBNET.ATG" +#line 2139 "VBNET.ATG" List parameter) { -#line 2143 "VBNET.ATG" +#line 2141 "VBNET.ATG" ParameterDeclarationExpression p; AttributeSection section; List attributes = new List(); while (la.kind == 27) { AttributeSection( -#line 2147 "VBNET.ATG" +#line 2145 "VBNET.ATG" out section); -#line 2147 "VBNET.ATG" +#line 2145 "VBNET.ATG" attributes.Add(section); } FormalParameter( -#line 2149 "VBNET.ATG" +#line 2147 "VBNET.ATG" out p); -#line 2151 "VBNET.ATG" +#line 2149 "VBNET.ATG" bool paramsFound = false; p.Attributes = attributes; parameter.Add(p); @@ -1247,152 +1255,152 @@ out p); while (la.kind == 12) { lexer.NextToken(); -#line 2156 "VBNET.ATG" +#line 2154 "VBNET.ATG" if (paramsFound) Error("params array must be at end of parameter list"); while (la.kind == 27) { AttributeSection( -#line 2157 "VBNET.ATG" +#line 2155 "VBNET.ATG" out section); -#line 2157 "VBNET.ATG" +#line 2155 "VBNET.ATG" attributes.Add(section); } FormalParameter( -#line 2159 "VBNET.ATG" +#line 2157 "VBNET.ATG" out p); -#line 2159 "VBNET.ATG" +#line 2157 "VBNET.ATG" p.Attributes = attributes; parameter.Add(p); } } void MemberModifier( -#line 2853 "VBNET.ATG" +#line 2855 "VBNET.ATG" ModifierList m) { switch (la.kind) { case 122: { lexer.NextToken(); -#line 2854 "VBNET.ATG" +#line 2856 "VBNET.ATG" m.Add(Modifiers.Abstract, t.Location); break; } case 79: { lexer.NextToken(); -#line 2855 "VBNET.ATG" +#line 2857 "VBNET.ATG" m.Add(Modifiers.Default, t.Location); break; } case 99: { lexer.NextToken(); -#line 2856 "VBNET.ATG" +#line 2858 "VBNET.ATG" m.Add(Modifiers.Internal, t.Location); break; } case 157: { lexer.NextToken(); -#line 2857 "VBNET.ATG" +#line 2859 "VBNET.ATG" m.Add(Modifiers.New, t.Location); break; } case 142: { lexer.NextToken(); -#line 2858 "VBNET.ATG" +#line 2860 "VBNET.ATG" m.Add(Modifiers.Override, t.Location); break; } case 123: { lexer.NextToken(); -#line 2859 "VBNET.ATG" +#line 2861 "VBNET.ATG" m.Add(Modifiers.Abstract, t.Location); break; } case 145: { lexer.NextToken(); -#line 2860 "VBNET.ATG" +#line 2862 "VBNET.ATG" m.Add(Modifiers.Private, t.Location); break; } case 147: { lexer.NextToken(); -#line 2861 "VBNET.ATG" +#line 2863 "VBNET.ATG" m.Add(Modifiers.Protected, t.Location); break; } case 148: { lexer.NextToken(); -#line 2862 "VBNET.ATG" +#line 2864 "VBNET.ATG" m.Add(Modifiers.Public, t.Location); break; } case 131: { lexer.NextToken(); -#line 2863 "VBNET.ATG" +#line 2865 "VBNET.ATG" m.Add(Modifiers.Sealed, t.Location); break; } case 132: { lexer.NextToken(); -#line 2864 "VBNET.ATG" +#line 2866 "VBNET.ATG" m.Add(Modifiers.Sealed, t.Location); break; } case 158: { lexer.NextToken(); -#line 2865 "VBNET.ATG" +#line 2867 "VBNET.ATG" m.Add(Modifiers.Static, t.Location); break; } case 141: { lexer.NextToken(); -#line 2866 "VBNET.ATG" +#line 2868 "VBNET.ATG" m.Add(Modifiers.Virtual, t.Location); break; } case 140: { lexer.NextToken(); -#line 2867 "VBNET.ATG" +#line 2869 "VBNET.ATG" m.Add(Modifiers.Overloads, t.Location); break; } case 150: { lexer.NextToken(); -#line 2868 "VBNET.ATG" +#line 2870 "VBNET.ATG" m.Add(Modifiers.ReadOnly, t.Location); break; } case 184: { lexer.NextToken(); -#line 2869 "VBNET.ATG" +#line 2871 "VBNET.ATG" m.Add(Modifiers.WriteOnly, t.Location); break; } case 183: { lexer.NextToken(); -#line 2870 "VBNET.ATG" +#line 2872 "VBNET.ATG" m.Add(Modifiers.WithEvents, t.Location); break; } case 81: { lexer.NextToken(); -#line 2871 "VBNET.ATG" +#line 2873 "VBNET.ATG" m.Add(Modifiers.Dim, t.Location); break; } @@ -1825,7 +1833,7 @@ out implementsClause); Expect(1); break; } - case 2: case 47: case 49: case 50: case 51: case 70: case 144: case 169: case 176: case 177: { + case 2: case 47: case 49: case 50: case 51: case 70: case 95: case 134: case 144: case 169: case 176: case 177: { #line 968 "VBNET.ATG" Location startPos = t.Location; @@ -2402,10 +2410,10 @@ mod, attributes); } void Expr( -#line 1546 "VBNET.ATG" +#line 1544 "VBNET.ATG" out Expression expr) { DisjunctionExpr( -#line 1548 "VBNET.ATG" +#line 1546 "VBNET.ATG" out expr); } @@ -2469,24 +2477,24 @@ out name); } void Block( -#line 2197 "VBNET.ATG" +#line 2195 "VBNET.ATG" out Statement stmt) { -#line 2200 "VBNET.ATG" +#line 2198 "VBNET.ATG" BlockStatement blockStmt = new BlockStatement(); blockStmt.StartLocation = t.Location; compilationUnit.BlockStart(blockStmt); while (StartOf(20) || -#line 2205 "VBNET.ATG" +#line 2203 "VBNET.ATG" IsEndStmtAhead()) { if ( -#line 2205 "VBNET.ATG" +#line 2203 "VBNET.ATG" IsEndStmtAhead()) { Expect(88); EndOfStmt(); -#line 2205 "VBNET.ATG" +#line 2203 "VBNET.ATG" compilationUnit.AddChild(new EndStatement()); } else { Statement(); @@ -2494,7 +2502,7 @@ IsEndStmtAhead()) { } } -#line 2210 "VBNET.ATG" +#line 2208 "VBNET.ATG" stmt = blockStmt; blockStmt.EndLocation = t.EndLocation; compilationUnit.BlockEnd(); @@ -2568,6 +2576,14 @@ out CharsetModifier charsetModifier) { lexer.NextToken(); break; } + case 134: { + lexer.NextToken(); + break; + } + case 95: { + lexer.NextToken(); + break; + } default: SynErr(231); break; } } @@ -3026,7 +3042,7 @@ out OverloadableOperatorType operatorType) { operatorType = OverloadableOperatorType.CType; break; } - case 2: case 47: case 49: case 50: case 51: case 70: case 144: case 169: case 176: case 177: case 204: { + case 2: case 47: case 49: case 50: case 51: case 70: case 95: case 134: case 144: case 169: case 176: case 177: case 204: { Identifier(); #line 1204 "VBNET.ATG" @@ -3120,31 +3136,31 @@ out stmt); } void PropertyAccessorAccessModifier( -#line 2874 "VBNET.ATG" +#line 2876 "VBNET.ATG" out Modifiers m) { -#line 2875 "VBNET.ATG" +#line 2877 "VBNET.ATG" m = Modifiers.None; while (StartOf(26)) { if (la.kind == 148) { lexer.NextToken(); -#line 2877 "VBNET.ATG" +#line 2879 "VBNET.ATG" m |= Modifiers.Public; } else if (la.kind == 147) { lexer.NextToken(); -#line 2878 "VBNET.ATG" +#line 2880 "VBNET.ATG" m |= Modifiers.Protected; } else if (la.kind == 99) { lexer.NextToken(); -#line 2879 "VBNET.ATG" +#line 2881 "VBNET.ATG" m |= Modifiers.Internal; } else { lexer.NextToken(); -#line 2880 "VBNET.ATG" +#line 2882 "VBNET.ATG" m |= Modifiers.Private; } } @@ -3165,22 +3181,22 @@ out arrayModifiers); } void ArrayNameModifier( -#line 1989 "VBNET.ATG" +#line 1987 "VBNET.ATG" out ArrayList arrayModifiers) { -#line 1991 "VBNET.ATG" +#line 1989 "VBNET.ATG" arrayModifiers = null; ArrayTypeModifiers( -#line 1993 "VBNET.ATG" +#line 1991 "VBNET.ATG" out arrayModifiers); } void ObjectCreateExpression( -#line 1842 "VBNET.ATG" +#line 1840 "VBNET.ATG" out Expression oce) { -#line 1844 "VBNET.ATG" +#line 1842 "VBNET.ATG" TypeReference type = null; Expression initializer = null; List arguments = null; @@ -3190,38 +3206,38 @@ out Expression oce) { Expect(127); NonArrayTypeName( -#line 1851 "VBNET.ATG" +#line 1849 "VBNET.ATG" out type, false); if (la.kind == 24) { lexer.NextToken(); NormalOrReDimArgumentList( -#line 1852 "VBNET.ATG" +#line 1850 "VBNET.ATG" out arguments, out canBeNormal, out canBeReDim); Expect(25); if (la.kind == 22 || -#line 1853 "VBNET.ATG" +#line 1851 "VBNET.ATG" la.kind == Tokens.OpenParenthesis) { if ( -#line 1853 "VBNET.ATG" +#line 1851 "VBNET.ATG" la.kind == Tokens.OpenParenthesis) { ArrayTypeModifiers( -#line 1854 "VBNET.ATG" +#line 1852 "VBNET.ATG" out dimensions); CollectionInitializer( -#line 1855 "VBNET.ATG" +#line 1853 "VBNET.ATG" out initializer); } else { CollectionInitializer( -#line 1856 "VBNET.ATG" +#line 1854 "VBNET.ATG" out initializer); } } -#line 1858 "VBNET.ATG" +#line 1856 "VBNET.ATG" if (canBeReDim && !canBeNormal && initializer == null) initializer = new CollectionInitializerExpression(); } -#line 1861 "VBNET.ATG" +#line 1859 "VBNET.ATG" if (type == null) type = new TypeReference("Object"); // fallback type on parser errors if (initializer == null) { oce = new ObjectCreateExpression(type, arguments); @@ -3337,183 +3353,183 @@ out expr); out string name) { #line 1535 "VBNET.ATG" - string type; name = String.Empty; + string eventName; if (StartOf(13)) { Identifier(); - -#line 1536 "VBNET.ATG" - type = t.val; - Expect(10); - Identifier(); - -#line 1538 "VBNET.ATG" - name = type + "." + t.val; } else if (la.kind == 124) { lexer.NextToken(); - Expect(10); - if (StartOf(13)) { - Identifier(); + } else if (la.kind == 119) { + lexer.NextToken(); + } else SynErr(237); + +#line 1538 "VBNET.ATG" + name = t.val; + Expect(10); + IdentifierOrKeyword( +#line 1540 "VBNET.ATG" +out eventName); #line 1541 "VBNET.ATG" - name = "MyBase." + t.val; - } else if (la.kind == 92) { - lexer.NextToken(); + name = name + "." + eventName; + } + + void IdentifierOrKeyword( +#line 2810 "VBNET.ATG" +out string name) { -#line 1542 "VBNET.ATG" - name = "MyBase.Error"; - } else SynErr(237); - } else SynErr(238); +#line 2812 "VBNET.ATG" + lexer.NextToken(); name = t.val; } void DisjunctionExpr( -#line 1686 "VBNET.ATG" +#line 1684 "VBNET.ATG" out Expression outExpr) { -#line 1688 "VBNET.ATG" +#line 1686 "VBNET.ATG" Expression expr; BinaryOperatorType op = BinaryOperatorType.None; ConjunctionExpr( -#line 1691 "VBNET.ATG" +#line 1689 "VBNET.ATG" out outExpr); while (la.kind == 138 || la.kind == 139 || la.kind == 185) { if (la.kind == 138) { lexer.NextToken(); -#line 1694 "VBNET.ATG" +#line 1692 "VBNET.ATG" op = BinaryOperatorType.BitwiseOr; } else if (la.kind == 139) { lexer.NextToken(); -#line 1695 "VBNET.ATG" +#line 1693 "VBNET.ATG" op = BinaryOperatorType.LogicalOr; } else { lexer.NextToken(); -#line 1696 "VBNET.ATG" +#line 1694 "VBNET.ATG" op = BinaryOperatorType.ExclusiveOr; } ConjunctionExpr( -#line 1698 "VBNET.ATG" +#line 1696 "VBNET.ATG" out expr); -#line 1698 "VBNET.ATG" +#line 1696 "VBNET.ATG" outExpr = new BinaryOperatorExpression(outExpr, op, expr); } } void AssignmentOperator( -#line 1551 "VBNET.ATG" +#line 1549 "VBNET.ATG" out AssignmentOperatorType op) { -#line 1552 "VBNET.ATG" +#line 1550 "VBNET.ATG" op = AssignmentOperatorType.None; switch (la.kind) { case 11: { lexer.NextToken(); -#line 1553 "VBNET.ATG" +#line 1551 "VBNET.ATG" op = AssignmentOperatorType.Assign; break; } case 41: { lexer.NextToken(); -#line 1554 "VBNET.ATG" +#line 1552 "VBNET.ATG" op = AssignmentOperatorType.ConcatString; break; } case 33: { lexer.NextToken(); -#line 1555 "VBNET.ATG" +#line 1553 "VBNET.ATG" op = AssignmentOperatorType.Add; break; } case 35: { lexer.NextToken(); -#line 1556 "VBNET.ATG" +#line 1554 "VBNET.ATG" op = AssignmentOperatorType.Subtract; break; } case 36: { lexer.NextToken(); -#line 1557 "VBNET.ATG" +#line 1555 "VBNET.ATG" op = AssignmentOperatorType.Multiply; break; } case 37: { lexer.NextToken(); -#line 1558 "VBNET.ATG" +#line 1556 "VBNET.ATG" op = AssignmentOperatorType.Divide; break; } case 38: { lexer.NextToken(); -#line 1559 "VBNET.ATG" +#line 1557 "VBNET.ATG" op = AssignmentOperatorType.DivideInteger; break; } case 34: { lexer.NextToken(); -#line 1560 "VBNET.ATG" +#line 1558 "VBNET.ATG" op = AssignmentOperatorType.Power; break; } case 39: { lexer.NextToken(); -#line 1561 "VBNET.ATG" +#line 1559 "VBNET.ATG" op = AssignmentOperatorType.ShiftLeft; break; } case 40: { lexer.NextToken(); -#line 1562 "VBNET.ATG" +#line 1560 "VBNET.ATG" op = AssignmentOperatorType.ShiftRight; break; } - default: SynErr(239); break; + default: SynErr(238); break; } } void SimpleExpr( -#line 1566 "VBNET.ATG" +#line 1564 "VBNET.ATG" out Expression pexpr) { SimpleNonInvocationExpression( -#line 1568 "VBNET.ATG" +#line 1566 "VBNET.ATG" out pexpr); while (la.kind == 10 || la.kind == 24) { if (la.kind == 10) { -#line 1569 "VBNET.ATG" +#line 1567 "VBNET.ATG" string name; lexer.NextToken(); IdentifierOrKeyword( -#line 1570 "VBNET.ATG" +#line 1568 "VBNET.ATG" out name); -#line 1570 "VBNET.ATG" +#line 1568 "VBNET.ATG" pexpr = new FieldReferenceExpression(pexpr, name); } else { InvocationExpression( -#line 1571 "VBNET.ATG" +#line 1569 "VBNET.ATG" ref pexpr); } } } void SimpleNonInvocationExpression( -#line 1575 "VBNET.ATG" +#line 1573 "VBNET.ATG" out Expression pexpr) { -#line 1577 "VBNET.ATG" +#line 1575 "VBNET.ATG" Expression expr; TypeReference type = null; string name = String.Empty; @@ -3524,146 +3540,146 @@ out Expression pexpr) { case 3: { lexer.NextToken(); -#line 1585 "VBNET.ATG" +#line 1583 "VBNET.ATG" pexpr = new PrimitiveExpression(t.literalValue, t.val); break; } case 4: { lexer.NextToken(); -#line 1586 "VBNET.ATG" +#line 1584 "VBNET.ATG" pexpr = new PrimitiveExpression(t.literalValue, t.val); break; } case 7: { lexer.NextToken(); -#line 1587 "VBNET.ATG" +#line 1585 "VBNET.ATG" pexpr = new PrimitiveExpression(t.literalValue, t.val); break; } case 6: { lexer.NextToken(); -#line 1588 "VBNET.ATG" +#line 1586 "VBNET.ATG" pexpr = new PrimitiveExpression(t.literalValue, t.val); break; } case 5: { lexer.NextToken(); -#line 1589 "VBNET.ATG" +#line 1587 "VBNET.ATG" pexpr = new PrimitiveExpression(t.literalValue, t.val); break; } case 9: { lexer.NextToken(); -#line 1590 "VBNET.ATG" +#line 1588 "VBNET.ATG" pexpr = new PrimitiveExpression(t.literalValue, t.val); break; } case 8: { lexer.NextToken(); -#line 1591 "VBNET.ATG" +#line 1589 "VBNET.ATG" pexpr = new PrimitiveExpression(t.literalValue, t.val); break; } case 173: { lexer.NextToken(); -#line 1593 "VBNET.ATG" +#line 1591 "VBNET.ATG" pexpr = new PrimitiveExpression(true, "true"); break; } case 96: { lexer.NextToken(); -#line 1594 "VBNET.ATG" +#line 1592 "VBNET.ATG" pexpr = new PrimitiveExpression(false, "false"); break; } case 130: { lexer.NextToken(); -#line 1595 "VBNET.ATG" +#line 1593 "VBNET.ATG" pexpr = new PrimitiveExpression(null, "null"); break; } case 24: { lexer.NextToken(); Expr( -#line 1596 "VBNET.ATG" +#line 1594 "VBNET.ATG" out expr); Expect(25); -#line 1596 "VBNET.ATG" +#line 1594 "VBNET.ATG" pexpr = new ParenthesizedExpression(expr); break; } - case 2: case 47: case 49: case 50: case 51: case 70: case 144: case 169: case 176: case 177: case 204: { + case 2: case 47: case 49: case 50: case 51: case 70: case 95: case 134: case 144: case 169: case 176: case 177: case 204: { Identifier(); -#line 1598 "VBNET.ATG" +#line 1596 "VBNET.ATG" pexpr = new IdentifierExpression(t.val); -#line 1599 "VBNET.ATG" +#line 1597 "VBNET.ATG" pexpr.StartLocation = t.Location; pexpr.EndLocation = t.EndLocation; break; } case 52: case 54: case 65: case 76: case 77: case 84: case 111: case 117: case 133: case 159: case 160: case 165: case 190: case 191: case 192: case 193: { -#line 1600 "VBNET.ATG" +#line 1598 "VBNET.ATG" string val = String.Empty; if (StartOf(10)) { PrimitiveTypeName( -#line 1601 "VBNET.ATG" +#line 1599 "VBNET.ATG" out val); } else if (la.kind == 133) { lexer.NextToken(); -#line 1601 "VBNET.ATG" +#line 1599 "VBNET.ATG" val = "Object"; - } else SynErr(240); + } else SynErr(239); Expect(10); -#line 1602 "VBNET.ATG" +#line 1600 "VBNET.ATG" t.val = ""; Identifier(); -#line 1602 "VBNET.ATG" +#line 1600 "VBNET.ATG" pexpr = new FieldReferenceExpression(new TypeReferenceExpression(val), t.val); break; } case 119: { lexer.NextToken(); -#line 1603 "VBNET.ATG" +#line 1601 "VBNET.ATG" pexpr = new ThisReferenceExpression(); break; } case 124: case 125: { -#line 1604 "VBNET.ATG" +#line 1602 "VBNET.ATG" Expression retExpr = null; if (la.kind == 124) { lexer.NextToken(); -#line 1605 "VBNET.ATG" +#line 1603 "VBNET.ATG" retExpr = new BaseReferenceExpression(); } else if (la.kind == 125) { lexer.NextToken(); -#line 1606 "VBNET.ATG" +#line 1604 "VBNET.ATG" retExpr = new ClassReferenceExpression(); - } else SynErr(241); + } else SynErr(240); Expect(10); IdentifierOrKeyword( -#line 1608 "VBNET.ATG" +#line 1606 "VBNET.ATG" out name); -#line 1608 "VBNET.ATG" +#line 1606 "VBNET.ATG" pexpr = new FieldReferenceExpression(retExpr, name); break; } @@ -3672,77 +3688,77 @@ out name); Expect(10); Identifier(); -#line 1610 "VBNET.ATG" +#line 1608 "VBNET.ATG" type = new TypeReference(t.val ?? ""); -#line 1612 "VBNET.ATG" +#line 1610 "VBNET.ATG" type.IsGlobal = true; -#line 1613 "VBNET.ATG" +#line 1611 "VBNET.ATG" pexpr = new TypeReferenceExpression(type); break; } case 127: { ObjectCreateExpression( -#line 1614 "VBNET.ATG" +#line 1612 "VBNET.ATG" out expr); -#line 1614 "VBNET.ATG" +#line 1612 "VBNET.ATG" pexpr = expr; break; } case 75: case 82: case 199: { -#line 1616 "VBNET.ATG" +#line 1614 "VBNET.ATG" CastType castType = CastType.Cast; if (la.kind == 82) { lexer.NextToken(); } else if (la.kind == 75) { lexer.NextToken(); -#line 1618 "VBNET.ATG" +#line 1616 "VBNET.ATG" castType = CastType.Conversion; } else if (la.kind == 199) { lexer.NextToken(); -#line 1619 "VBNET.ATG" +#line 1617 "VBNET.ATG" castType = CastType.TryCast; - } else SynErr(242); + } else SynErr(241); Expect(24); Expr( -#line 1621 "VBNET.ATG" +#line 1619 "VBNET.ATG" out expr); Expect(12); TypeName( -#line 1621 "VBNET.ATG" +#line 1619 "VBNET.ATG" out type); Expect(25); -#line 1622 "VBNET.ATG" +#line 1620 "VBNET.ATG" pexpr = new CastExpression(type, expr, castType); break; } case 59: case 60: case 61: case 62: case 63: case 64: case 66: case 68: case 69: case 72: case 73: case 74: case 194: case 195: case 196: case 197: { CastTarget( -#line 1623 "VBNET.ATG" +#line 1621 "VBNET.ATG" out type); Expect(24); Expr( -#line 1623 "VBNET.ATG" +#line 1621 "VBNET.ATG" out expr); Expect(25); -#line 1623 "VBNET.ATG" +#line 1621 "VBNET.ATG" pexpr = new CastExpression(type, expr, CastType.PrimitiveConversion); break; } case 43: { lexer.NextToken(); Expr( -#line 1624 "VBNET.ATG" +#line 1622 "VBNET.ATG" out expr); -#line 1624 "VBNET.ATG" +#line 1622 "VBNET.ATG" pexpr = new AddressOfExpression(expr); break; } @@ -3750,25 +3766,25 @@ out expr); lexer.NextToken(); Expect(24); GetTypeTypeName( -#line 1625 "VBNET.ATG" +#line 1623 "VBNET.ATG" out type); Expect(25); -#line 1625 "VBNET.ATG" +#line 1623 "VBNET.ATG" pexpr = new TypeOfExpression(type); break; } case 175: { lexer.NextToken(); SimpleExpr( -#line 1626 "VBNET.ATG" +#line 1624 "VBNET.ATG" out expr); Expect(113); TypeName( -#line 1626 "VBNET.ATG" +#line 1624 "VBNET.ATG" out type); -#line 1626 "VBNET.ATG" +#line 1624 "VBNET.ATG" pexpr = new TypeOfIsExpression(expr, type); break; } @@ -3776,49 +3792,41 @@ out type); } else if (la.kind == 10) { lexer.NextToken(); IdentifierOrKeyword( -#line 1630 "VBNET.ATG" +#line 1628 "VBNET.ATG" out name); -#line 1630 "VBNET.ATG" +#line 1628 "VBNET.ATG" pexpr = new FieldReferenceExpression(null, name); - } else SynErr(243); - } - - void IdentifierOrKeyword( -#line 2808 "VBNET.ATG" -out string name) { - -#line 2810 "VBNET.ATG" - lexer.NextToken(); name = t.val; + } else SynErr(242); } void InvocationExpression( -#line 1634 "VBNET.ATG" +#line 1632 "VBNET.ATG" ref Expression pexpr) { -#line 1635 "VBNET.ATG" +#line 1633 "VBNET.ATG" List typeParameters = new List(); List parameters = null; TypeReference type; Expect(24); -#line 1639 "VBNET.ATG" +#line 1637 "VBNET.ATG" Location start = t.Location; if (la.kind == 200) { lexer.NextToken(); TypeName( -#line 1641 "VBNET.ATG" +#line 1639 "VBNET.ATG" out type); -#line 1641 "VBNET.ATG" +#line 1639 "VBNET.ATG" if (type != null) typeParameters.Add(type); while (la.kind == 12) { lexer.NextToken(); TypeName( -#line 1644 "VBNET.ATG" +#line 1642 "VBNET.ATG" out type); -#line 1644 "VBNET.ATG" +#line 1642 "VBNET.ATG" if (type != null) typeParameters.Add(type); } Expect(25); @@ -3826,286 +3834,286 @@ out type); lexer.NextToken(); Identifier(); -#line 1649 "VBNET.ATG" +#line 1647 "VBNET.ATG" pexpr = new FieldReferenceExpression(GetTypeReferenceExpression(pexpr, typeParameters), t.val); } else if (la.kind == 24) { lexer.NextToken(); ArgumentList( -#line 1651 "VBNET.ATG" +#line 1649 "VBNET.ATG" out parameters); Expect(25); -#line 1653 "VBNET.ATG" +#line 1651 "VBNET.ATG" pexpr = new InvocationExpression(pexpr, parameters, typeParameters); - } else SynErr(244); + } else SynErr(243); } else if (StartOf(30)) { ArgumentList( -#line 1655 "VBNET.ATG" +#line 1653 "VBNET.ATG" out parameters); Expect(25); -#line 1657 "VBNET.ATG" +#line 1655 "VBNET.ATG" pexpr = new InvocationExpression(pexpr, parameters, typeParameters); - } else SynErr(245); + } else SynErr(244); -#line 1659 "VBNET.ATG" +#line 1657 "VBNET.ATG" pexpr.StartLocation = start; pexpr.EndLocation = t.Location; } void PrimitiveTypeName( -#line 2815 "VBNET.ATG" +#line 2817 "VBNET.ATG" out string type) { -#line 2816 "VBNET.ATG" +#line 2818 "VBNET.ATG" type = String.Empty; switch (la.kind) { case 52: { lexer.NextToken(); -#line 2817 "VBNET.ATG" +#line 2819 "VBNET.ATG" type = "Boolean"; break; } case 76: { lexer.NextToken(); -#line 2818 "VBNET.ATG" +#line 2820 "VBNET.ATG" type = "Date"; break; } case 65: { lexer.NextToken(); -#line 2819 "VBNET.ATG" +#line 2821 "VBNET.ATG" type = "Char"; break; } case 165: { lexer.NextToken(); -#line 2820 "VBNET.ATG" +#line 2822 "VBNET.ATG" type = "String"; break; } case 77: { lexer.NextToken(); -#line 2821 "VBNET.ATG" +#line 2823 "VBNET.ATG" type = "Decimal"; break; } case 54: { lexer.NextToken(); -#line 2822 "VBNET.ATG" +#line 2824 "VBNET.ATG" type = "Byte"; break; } case 159: { lexer.NextToken(); -#line 2823 "VBNET.ATG" +#line 2825 "VBNET.ATG" type = "Short"; break; } case 111: { lexer.NextToken(); -#line 2824 "VBNET.ATG" +#line 2826 "VBNET.ATG" type = "Integer"; break; } case 117: { lexer.NextToken(); -#line 2825 "VBNET.ATG" +#line 2827 "VBNET.ATG" type = "Long"; break; } case 160: { lexer.NextToken(); -#line 2826 "VBNET.ATG" +#line 2828 "VBNET.ATG" type = "Single"; break; } case 84: { lexer.NextToken(); -#line 2827 "VBNET.ATG" +#line 2829 "VBNET.ATG" type = "Double"; break; } case 191: { lexer.NextToken(); -#line 2828 "VBNET.ATG" +#line 2830 "VBNET.ATG" type = "UInteger"; break; } case 192: { lexer.NextToken(); -#line 2829 "VBNET.ATG" +#line 2831 "VBNET.ATG" type = "ULong"; break; } case 193: { lexer.NextToken(); -#line 2830 "VBNET.ATG" +#line 2832 "VBNET.ATG" type = "UShort"; break; } case 190: { lexer.NextToken(); -#line 2831 "VBNET.ATG" +#line 2833 "VBNET.ATG" type = "SByte"; break; } - default: SynErr(246); break; + default: SynErr(245); break; } } void CastTarget( -#line 1664 "VBNET.ATG" +#line 1662 "VBNET.ATG" out TypeReference type) { -#line 1666 "VBNET.ATG" +#line 1664 "VBNET.ATG" type = null; switch (la.kind) { case 59: { lexer.NextToken(); -#line 1668 "VBNET.ATG" +#line 1666 "VBNET.ATG" type = new TypeReference("System.Boolean"); break; } case 60: { lexer.NextToken(); -#line 1669 "VBNET.ATG" +#line 1667 "VBNET.ATG" type = new TypeReference("System.Byte"); break; } case 194: { lexer.NextToken(); -#line 1670 "VBNET.ATG" +#line 1668 "VBNET.ATG" type = new TypeReference("System.SByte"); break; } case 61: { lexer.NextToken(); -#line 1671 "VBNET.ATG" +#line 1669 "VBNET.ATG" type = new TypeReference("System.Char"); break; } case 62: { lexer.NextToken(); -#line 1672 "VBNET.ATG" +#line 1670 "VBNET.ATG" type = new TypeReference("System.DateTime"); break; } case 64: { lexer.NextToken(); -#line 1673 "VBNET.ATG" +#line 1671 "VBNET.ATG" type = new TypeReference("System.Decimal"); break; } case 63: { lexer.NextToken(); -#line 1674 "VBNET.ATG" +#line 1672 "VBNET.ATG" type = new TypeReference("System.Double"); break; } case 72: { lexer.NextToken(); -#line 1675 "VBNET.ATG" +#line 1673 "VBNET.ATG" type = new TypeReference("System.Int16"); break; } case 66: { lexer.NextToken(); -#line 1676 "VBNET.ATG" +#line 1674 "VBNET.ATG" type = new TypeReference("System.Int32"); break; } case 68: { lexer.NextToken(); -#line 1677 "VBNET.ATG" +#line 1675 "VBNET.ATG" type = new TypeReference("System.Int64"); break; } case 195: { lexer.NextToken(); -#line 1678 "VBNET.ATG" +#line 1676 "VBNET.ATG" type = new TypeReference("System.UInt16"); break; } case 196: { lexer.NextToken(); -#line 1679 "VBNET.ATG" +#line 1677 "VBNET.ATG" type = new TypeReference("System.UInt32"); break; } case 197: { lexer.NextToken(); -#line 1680 "VBNET.ATG" +#line 1678 "VBNET.ATG" type = new TypeReference("System.UInt64"); break; } case 69: { lexer.NextToken(); -#line 1681 "VBNET.ATG" +#line 1679 "VBNET.ATG" type = new TypeReference("System.Object"); break; } case 73: { lexer.NextToken(); -#line 1682 "VBNET.ATG" +#line 1680 "VBNET.ATG" type = new TypeReference("System.Single"); break; } case 74: { lexer.NextToken(); -#line 1683 "VBNET.ATG" +#line 1681 "VBNET.ATG" type = new TypeReference("System.String"); break; } - default: SynErr(247); break; + default: SynErr(246); break; } } void GetTypeTypeName( -#line 1941 "VBNET.ATG" +#line 1939 "VBNET.ATG" out TypeReference typeref) { -#line 1942 "VBNET.ATG" +#line 1940 "VBNET.ATG" ArrayList rank = null; NonArrayTypeName( -#line 1944 "VBNET.ATG" +#line 1942 "VBNET.ATG" out typeref, true); ArrayTypeModifiers( -#line 1945 "VBNET.ATG" +#line 1943 "VBNET.ATG" out rank); -#line 1946 "VBNET.ATG" +#line 1944 "VBNET.ATG" if (rank != null && typeref != null) { typeref.RankSpecifier = (int[])rank.ToArray(typeof(int)); } @@ -4113,348 +4121,348 @@ out rank); } void ArgumentList( -#line 1876 "VBNET.ATG" +#line 1874 "VBNET.ATG" out List arguments) { -#line 1878 "VBNET.ATG" +#line 1876 "VBNET.ATG" arguments = new List(); Expression expr = null; if (StartOf(27)) { Argument( -#line 1881 "VBNET.ATG" +#line 1879 "VBNET.ATG" out expr); } while (la.kind == 12) { lexer.NextToken(); -#line 1882 "VBNET.ATG" +#line 1880 "VBNET.ATG" arguments.Add(expr ?? Expression.Null); expr = null; if (StartOf(27)) { Argument( -#line 1883 "VBNET.ATG" +#line 1881 "VBNET.ATG" out expr); } -#line 1884 "VBNET.ATG" +#line 1882 "VBNET.ATG" if (expr == null) expr = Expression.Null; } -#line 1886 "VBNET.ATG" +#line 1884 "VBNET.ATG" if (expr != null) arguments.Add(expr); } void ConjunctionExpr( -#line 1702 "VBNET.ATG" +#line 1700 "VBNET.ATG" out Expression outExpr) { -#line 1704 "VBNET.ATG" +#line 1702 "VBNET.ATG" Expression expr; BinaryOperatorType op = BinaryOperatorType.None; NotExpr( -#line 1707 "VBNET.ATG" +#line 1705 "VBNET.ATG" out outExpr); while (la.kind == 45 || la.kind == 46) { if (la.kind == 45) { lexer.NextToken(); -#line 1710 "VBNET.ATG" +#line 1708 "VBNET.ATG" op = BinaryOperatorType.BitwiseAnd; } else { lexer.NextToken(); -#line 1711 "VBNET.ATG" +#line 1709 "VBNET.ATG" op = BinaryOperatorType.LogicalAnd; } NotExpr( -#line 1713 "VBNET.ATG" +#line 1711 "VBNET.ATG" out expr); -#line 1713 "VBNET.ATG" +#line 1711 "VBNET.ATG" outExpr = new BinaryOperatorExpression(outExpr, op, expr); } } void NotExpr( -#line 1717 "VBNET.ATG" +#line 1715 "VBNET.ATG" out Expression outExpr) { -#line 1718 "VBNET.ATG" +#line 1716 "VBNET.ATG" UnaryOperatorType uop = UnaryOperatorType.None; while (la.kind == 129) { lexer.NextToken(); -#line 1719 "VBNET.ATG" +#line 1717 "VBNET.ATG" uop = UnaryOperatorType.Not; } ComparisonExpr( -#line 1720 "VBNET.ATG" +#line 1718 "VBNET.ATG" out outExpr); -#line 1721 "VBNET.ATG" +#line 1719 "VBNET.ATG" if (uop != UnaryOperatorType.None) outExpr = new UnaryOperatorExpression(outExpr, uop); } void ComparisonExpr( -#line 1726 "VBNET.ATG" +#line 1724 "VBNET.ATG" out Expression outExpr) { -#line 1728 "VBNET.ATG" +#line 1726 "VBNET.ATG" Expression expr; BinaryOperatorType op = BinaryOperatorType.None; ShiftExpr( -#line 1731 "VBNET.ATG" +#line 1729 "VBNET.ATG" out outExpr); while (StartOf(31)) { switch (la.kind) { case 27: { lexer.NextToken(); -#line 1734 "VBNET.ATG" +#line 1732 "VBNET.ATG" op = BinaryOperatorType.LessThan; break; } case 26: { lexer.NextToken(); -#line 1735 "VBNET.ATG" +#line 1733 "VBNET.ATG" op = BinaryOperatorType.GreaterThan; break; } case 30: { lexer.NextToken(); -#line 1736 "VBNET.ATG" +#line 1734 "VBNET.ATG" op = BinaryOperatorType.LessThanOrEqual; break; } case 29: { lexer.NextToken(); -#line 1737 "VBNET.ATG" +#line 1735 "VBNET.ATG" op = BinaryOperatorType.GreaterThanOrEqual; break; } case 28: { lexer.NextToken(); -#line 1738 "VBNET.ATG" +#line 1736 "VBNET.ATG" op = BinaryOperatorType.InEquality; break; } case 11: { lexer.NextToken(); -#line 1739 "VBNET.ATG" +#line 1737 "VBNET.ATG" op = BinaryOperatorType.Equality; break; } case 116: { lexer.NextToken(); -#line 1740 "VBNET.ATG" +#line 1738 "VBNET.ATG" op = BinaryOperatorType.Like; break; } case 113: { lexer.NextToken(); -#line 1741 "VBNET.ATG" +#line 1739 "VBNET.ATG" op = BinaryOperatorType.ReferenceEquality; break; } case 189: { lexer.NextToken(); -#line 1742 "VBNET.ATG" +#line 1740 "VBNET.ATG" op = BinaryOperatorType.ReferenceInequality; break; } } if (StartOf(32)) { ShiftExpr( -#line 1745 "VBNET.ATG" +#line 1743 "VBNET.ATG" out expr); -#line 1745 "VBNET.ATG" +#line 1743 "VBNET.ATG" outExpr = new BinaryOperatorExpression(outExpr, op, expr); } else if (la.kind == 129) { lexer.NextToken(); ShiftExpr( -#line 1748 "VBNET.ATG" +#line 1746 "VBNET.ATG" out expr); -#line 1748 "VBNET.ATG" +#line 1746 "VBNET.ATG" outExpr = new BinaryOperatorExpression(outExpr, op, new UnaryOperatorExpression(expr, UnaryOperatorType.Not)); - } else SynErr(248); + } else SynErr(247); } } void ShiftExpr( -#line 1753 "VBNET.ATG" +#line 1751 "VBNET.ATG" out Expression outExpr) { -#line 1755 "VBNET.ATG" +#line 1753 "VBNET.ATG" Expression expr; BinaryOperatorType op = BinaryOperatorType.None; ConcatenationExpr( -#line 1758 "VBNET.ATG" +#line 1756 "VBNET.ATG" out outExpr); while (la.kind == 31 || la.kind == 32) { if (la.kind == 31) { lexer.NextToken(); -#line 1761 "VBNET.ATG" +#line 1759 "VBNET.ATG" op = BinaryOperatorType.ShiftLeft; } else { lexer.NextToken(); -#line 1762 "VBNET.ATG" +#line 1760 "VBNET.ATG" op = BinaryOperatorType.ShiftRight; } ConcatenationExpr( -#line 1764 "VBNET.ATG" +#line 1762 "VBNET.ATG" out expr); -#line 1764 "VBNET.ATG" +#line 1762 "VBNET.ATG" outExpr = new BinaryOperatorExpression(outExpr, op, expr); } } void ConcatenationExpr( -#line 1768 "VBNET.ATG" +#line 1766 "VBNET.ATG" out Expression outExpr) { -#line 1769 "VBNET.ATG" +#line 1767 "VBNET.ATG" Expression expr; AdditiveExpr( -#line 1771 "VBNET.ATG" +#line 1769 "VBNET.ATG" out outExpr); while (la.kind == 19) { lexer.NextToken(); AdditiveExpr( -#line 1771 "VBNET.ATG" +#line 1769 "VBNET.ATG" out expr); -#line 1771 "VBNET.ATG" +#line 1769 "VBNET.ATG" outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.Concat, expr); } } void AdditiveExpr( -#line 1774 "VBNET.ATG" +#line 1772 "VBNET.ATG" out Expression outExpr) { -#line 1776 "VBNET.ATG" +#line 1774 "VBNET.ATG" Expression expr; BinaryOperatorType op = BinaryOperatorType.None; ModuloExpr( -#line 1779 "VBNET.ATG" +#line 1777 "VBNET.ATG" out outExpr); while (la.kind == 14 || la.kind == 15) { if (la.kind == 14) { lexer.NextToken(); -#line 1782 "VBNET.ATG" +#line 1780 "VBNET.ATG" op = BinaryOperatorType.Add; } else { lexer.NextToken(); -#line 1783 "VBNET.ATG" +#line 1781 "VBNET.ATG" op = BinaryOperatorType.Subtract; } ModuloExpr( -#line 1785 "VBNET.ATG" +#line 1783 "VBNET.ATG" out expr); -#line 1785 "VBNET.ATG" +#line 1783 "VBNET.ATG" outExpr = new BinaryOperatorExpression(outExpr, op, expr); } } void ModuloExpr( -#line 1789 "VBNET.ATG" +#line 1787 "VBNET.ATG" out Expression outExpr) { -#line 1790 "VBNET.ATG" +#line 1788 "VBNET.ATG" Expression expr; IntegerDivisionExpr( -#line 1792 "VBNET.ATG" +#line 1790 "VBNET.ATG" out outExpr); while (la.kind == 120) { lexer.NextToken(); IntegerDivisionExpr( -#line 1792 "VBNET.ATG" +#line 1790 "VBNET.ATG" out expr); -#line 1792 "VBNET.ATG" +#line 1790 "VBNET.ATG" outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.Modulus, expr); } } void IntegerDivisionExpr( -#line 1795 "VBNET.ATG" +#line 1793 "VBNET.ATG" out Expression outExpr) { -#line 1796 "VBNET.ATG" +#line 1794 "VBNET.ATG" Expression expr; MultiplicativeExpr( -#line 1798 "VBNET.ATG" +#line 1796 "VBNET.ATG" out outExpr); while (la.kind == 18) { lexer.NextToken(); MultiplicativeExpr( -#line 1798 "VBNET.ATG" +#line 1796 "VBNET.ATG" out expr); -#line 1798 "VBNET.ATG" +#line 1796 "VBNET.ATG" outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.DivideInteger, expr); } } void MultiplicativeExpr( -#line 1801 "VBNET.ATG" +#line 1799 "VBNET.ATG" out Expression outExpr) { -#line 1803 "VBNET.ATG" +#line 1801 "VBNET.ATG" Expression expr; BinaryOperatorType op = BinaryOperatorType.None; UnaryExpr( -#line 1806 "VBNET.ATG" +#line 1804 "VBNET.ATG" out outExpr); while (la.kind == 16 || la.kind == 17) { if (la.kind == 16) { lexer.NextToken(); -#line 1809 "VBNET.ATG" +#line 1807 "VBNET.ATG" op = BinaryOperatorType.Multiply; } else { lexer.NextToken(); -#line 1810 "VBNET.ATG" +#line 1808 "VBNET.ATG" op = BinaryOperatorType.Divide; } UnaryExpr( -#line 1812 "VBNET.ATG" +#line 1810 "VBNET.ATG" out expr); -#line 1812 "VBNET.ATG" +#line 1810 "VBNET.ATG" outExpr = new BinaryOperatorExpression(outExpr, op, expr); } } void UnaryExpr( -#line 1816 "VBNET.ATG" +#line 1814 "VBNET.ATG" out Expression uExpr) { -#line 1818 "VBNET.ATG" +#line 1816 "VBNET.ATG" Expression expr; UnaryOperatorType uop = UnaryOperatorType.None; bool isUOp = false; @@ -4463,25 +4471,25 @@ out Expression uExpr) { if (la.kind == 14) { lexer.NextToken(); -#line 1822 "VBNET.ATG" +#line 1820 "VBNET.ATG" uop = UnaryOperatorType.Plus; isUOp = true; } else if (la.kind == 15) { lexer.NextToken(); -#line 1823 "VBNET.ATG" +#line 1821 "VBNET.ATG" uop = UnaryOperatorType.Minus; isUOp = true; } else { lexer.NextToken(); -#line 1824 "VBNET.ATG" +#line 1822 "VBNET.ATG" uop = UnaryOperatorType.Star; isUOp = true; } } ExponentiationExpr( -#line 1826 "VBNET.ATG" +#line 1824 "VBNET.ATG" out expr); -#line 1828 "VBNET.ATG" +#line 1826 "VBNET.ATG" if (isUOp) { uExpr = new UnaryOperatorExpression(expr, uop); } else { @@ -4491,107 +4499,107 @@ out expr); } void ExponentiationExpr( -#line 1836 "VBNET.ATG" +#line 1834 "VBNET.ATG" out Expression outExpr) { -#line 1837 "VBNET.ATG" +#line 1835 "VBNET.ATG" Expression expr; SimpleExpr( -#line 1839 "VBNET.ATG" +#line 1837 "VBNET.ATG" out outExpr); while (la.kind == 20) { lexer.NextToken(); SimpleExpr( -#line 1839 "VBNET.ATG" +#line 1837 "VBNET.ATG" out expr); -#line 1839 "VBNET.ATG" +#line 1837 "VBNET.ATG" outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.Power, expr); } } void NormalOrReDimArgumentList( -#line 1890 "VBNET.ATG" +#line 1888 "VBNET.ATG" out List arguments, out bool canBeNormal, out bool canBeRedim) { -#line 1892 "VBNET.ATG" +#line 1890 "VBNET.ATG" arguments = new List(); canBeNormal = true; canBeRedim = !IsNamedAssign(); Expression expr = null; if (StartOf(27)) { Argument( -#line 1897 "VBNET.ATG" +#line 1895 "VBNET.ATG" out expr); if (la.kind == 172) { lexer.NextToken(); -#line 1898 "VBNET.ATG" +#line 1896 "VBNET.ATG" EnsureIsZero(expr); canBeNormal = false; Expr( -#line 1899 "VBNET.ATG" +#line 1897 "VBNET.ATG" out expr); } } while (la.kind == 12) { lexer.NextToken(); -#line 1902 "VBNET.ATG" +#line 1900 "VBNET.ATG" if (expr == null) canBeRedim = false; -#line 1903 "VBNET.ATG" +#line 1901 "VBNET.ATG" arguments.Add(expr ?? Expression.Null); expr = null; -#line 1904 "VBNET.ATG" +#line 1902 "VBNET.ATG" canBeRedim &= !IsNamedAssign(); if (StartOf(27)) { Argument( -#line 1905 "VBNET.ATG" +#line 1903 "VBNET.ATG" out expr); if (la.kind == 172) { lexer.NextToken(); -#line 1906 "VBNET.ATG" +#line 1904 "VBNET.ATG" EnsureIsZero(expr); canBeNormal = false; Expr( -#line 1907 "VBNET.ATG" +#line 1905 "VBNET.ATG" out expr); } } -#line 1909 "VBNET.ATG" +#line 1907 "VBNET.ATG" if (expr == null) { canBeRedim = false; expr = Expression.Null; } } -#line 1911 "VBNET.ATG" +#line 1909 "VBNET.ATG" if (expr != null) arguments.Add(expr); else canBeRedim = false; } void ArrayTypeModifiers( -#line 1998 "VBNET.ATG" +#line 1996 "VBNET.ATG" out ArrayList arrayModifiers) { -#line 2000 "VBNET.ATG" +#line 1998 "VBNET.ATG" arrayModifiers = new ArrayList(); int i = 0; while ( -#line 2003 "VBNET.ATG" +#line 2001 "VBNET.ATG" IsDims()) { Expect(24); if (la.kind == 12 || la.kind == 25) { RankList( -#line 2005 "VBNET.ATG" +#line 2003 "VBNET.ATG" out i); } -#line 2007 "VBNET.ATG" +#line 2005 "VBNET.ATG" arrayModifiers.Add(i); Expect(25); } -#line 2012 "VBNET.ATG" +#line 2010 "VBNET.ATG" if(arrayModifiers.Count == 0) { arrayModifiers = null; } @@ -4599,118 +4607,118 @@ out i); } void Argument( -#line 1915 "VBNET.ATG" +#line 1913 "VBNET.ATG" out Expression argumentexpr) { -#line 1917 "VBNET.ATG" +#line 1915 "VBNET.ATG" Expression expr; argumentexpr = null; string name; if ( -#line 1921 "VBNET.ATG" +#line 1919 "VBNET.ATG" IsNamedAssign()) { Identifier(); -#line 1921 "VBNET.ATG" +#line 1919 "VBNET.ATG" name = t.val; Expect(13); Expect(11); Expr( -#line 1921 "VBNET.ATG" +#line 1919 "VBNET.ATG" out expr); -#line 1923 "VBNET.ATG" +#line 1921 "VBNET.ATG" argumentexpr = new NamedArgumentExpression(name, expr); } else if (StartOf(27)) { Expr( -#line 1926 "VBNET.ATG" +#line 1924 "VBNET.ATG" out argumentexpr); - } else SynErr(249); + } else SynErr(248); } void QualIdentAndTypeArguments( -#line 1972 "VBNET.ATG" +#line 1970 "VBNET.ATG" out TypeReference typeref, bool canBeUnbound) { -#line 1973 "VBNET.ATG" +#line 1971 "VBNET.ATG" string name; typeref = null; Qualident( -#line 1975 "VBNET.ATG" +#line 1973 "VBNET.ATG" out name); -#line 1976 "VBNET.ATG" +#line 1974 "VBNET.ATG" typeref = new TypeReference(name); if ( -#line 1977 "VBNET.ATG" +#line 1975 "VBNET.ATG" la.kind == Tokens.OpenParenthesis && Peek(1).kind == Tokens.Of) { lexer.NextToken(); Expect(200); if ( -#line 1979 "VBNET.ATG" +#line 1977 "VBNET.ATG" canBeUnbound && (la.kind == Tokens.CloseParenthesis || la.kind == Tokens.Comma)) { -#line 1980 "VBNET.ATG" +#line 1978 "VBNET.ATG" typeref.GenericTypes.Add(NullTypeReference.Instance); while (la.kind == 12) { lexer.NextToken(); -#line 1981 "VBNET.ATG" +#line 1979 "VBNET.ATG" typeref.GenericTypes.Add(NullTypeReference.Instance); } } else if (StartOf(6)) { TypeArgumentList( -#line 1982 "VBNET.ATG" +#line 1980 "VBNET.ATG" typeref.GenericTypes); - } else SynErr(250); + } else SynErr(249); Expect(25); } } void TypeArgumentList( -#line 2025 "VBNET.ATG" +#line 2023 "VBNET.ATG" List typeArguments) { -#line 2027 "VBNET.ATG" +#line 2025 "VBNET.ATG" TypeReference typeref; TypeName( -#line 2029 "VBNET.ATG" +#line 2027 "VBNET.ATG" out typeref); -#line 2029 "VBNET.ATG" +#line 2027 "VBNET.ATG" if (typeref != null) typeArguments.Add(typeref); while (la.kind == 12) { lexer.NextToken(); TypeName( -#line 2032 "VBNET.ATG" +#line 2030 "VBNET.ATG" out typeref); -#line 2032 "VBNET.ATG" +#line 2030 "VBNET.ATG" if (typeref != null) typeArguments.Add(typeref); } } void RankList( -#line 2019 "VBNET.ATG" +#line 2017 "VBNET.ATG" out int i) { -#line 2020 "VBNET.ATG" +#line 2018 "VBNET.ATG" i = 0; while (la.kind == 12) { lexer.NextToken(); -#line 2021 "VBNET.ATG" +#line 2019 "VBNET.ATG" ++i; } } void Attribute( -#line 2057 "VBNET.ATG" +#line 2055 "VBNET.ATG" out ASTAttribute attribute) { -#line 2058 "VBNET.ATG" +#line 2056 "VBNET.ATG" string name; List positional = new List(); List named = new List(); @@ -4720,39 +4728,39 @@ out ASTAttribute attribute) { Expect(10); } Qualident( -#line 2063 "VBNET.ATG" +#line 2061 "VBNET.ATG" out name); if (la.kind == 24) { AttributeArguments( -#line 2064 "VBNET.ATG" +#line 2062 "VBNET.ATG" positional, named); } -#line 2065 "VBNET.ATG" +#line 2063 "VBNET.ATG" attribute = new ASTAttribute(name, positional, named); } void AttributeArguments( -#line 2069 "VBNET.ATG" +#line 2067 "VBNET.ATG" List positional, List named) { -#line 2071 "VBNET.ATG" +#line 2069 "VBNET.ATG" bool nameFound = false; string name = ""; Expression expr; Expect(24); if ( -#line 2077 "VBNET.ATG" +#line 2075 "VBNET.ATG" IsNotClosingParenthesis()) { if ( -#line 2079 "VBNET.ATG" +#line 2077 "VBNET.ATG" IsNamedAssign()) { -#line 2079 "VBNET.ATG" +#line 2077 "VBNET.ATG" nameFound = true; IdentifierOrKeyword( -#line 2080 "VBNET.ATG" +#line 2078 "VBNET.ATG" out name); if (la.kind == 13) { lexer.NextToken(); @@ -4760,10 +4768,10 @@ out name); Expect(11); } Expr( -#line 2082 "VBNET.ATG" +#line 2080 "VBNET.ATG" out expr); -#line 2084 "VBNET.ATG" +#line 2082 "VBNET.ATG" if (expr != null) { if (string.IsNullOrEmpty(name)) { positional.Add(expr); } else { named.Add(new NamedArgumentExpression(name, expr)); name = ""; } @@ -4772,13 +4780,13 @@ out expr); while (la.kind == 12) { lexer.NextToken(); if ( -#line 2092 "VBNET.ATG" +#line 2090 "VBNET.ATG" IsNamedAssign()) { -#line 2092 "VBNET.ATG" +#line 2090 "VBNET.ATG" nameFound = true; IdentifierOrKeyword( -#line 2093 "VBNET.ATG" +#line 2091 "VBNET.ATG" out name); if (la.kind == 13) { lexer.NextToken(); @@ -4786,14 +4794,14 @@ out name); Expect(11); } else if (StartOf(27)) { -#line 2095 "VBNET.ATG" +#line 2093 "VBNET.ATG" if (nameFound) Error("no positional argument after named argument"); - } else SynErr(251); + } else SynErr(250); Expr( -#line 2096 "VBNET.ATG" +#line 2094 "VBNET.ATG" out expr); -#line 2096 "VBNET.ATG" +#line 2094 "VBNET.ATG" if (expr != null) { if(name == "") positional.Add(expr); else { named.Add(new NamedArgumentExpression(name, expr)); name = ""; } } @@ -4804,10 +4812,10 @@ out expr); } void FormalParameter( -#line 2165 "VBNET.ATG" +#line 2163 "VBNET.ATG" out ParameterDeclarationExpression p) { -#line 2167 "VBNET.ATG" +#line 2165 "VBNET.ATG" TypeReference type = null; ParamModifierList mod = new ParamModifierList(this); Expression expr = null; @@ -4815,28 +4823,28 @@ out ParameterDeclarationExpression p) { while (StartOf(33)) { ParameterModifier( -#line 2172 "VBNET.ATG" +#line 2170 "VBNET.ATG" mod); } Identifier(); -#line 2173 "VBNET.ATG" +#line 2171 "VBNET.ATG" string parameterName = t.val; if ( -#line 2174 "VBNET.ATG" +#line 2172 "VBNET.ATG" IsDims()) { ArrayTypeModifiers( -#line 2174 "VBNET.ATG" +#line 2172 "VBNET.ATG" out arrayModifiers); } if (la.kind == 48) { lexer.NextToken(); TypeName( -#line 2175 "VBNET.ATG" +#line 2173 "VBNET.ATG" out type); } -#line 2177 "VBNET.ATG" +#line 2175 "VBNET.ATG" if(type != null) { if (arrayModifiers != null) { if (type.RankSpecifier != null) { @@ -4852,45 +4860,45 @@ out type); if (la.kind == 11) { lexer.NextToken(); Expr( -#line 2189 "VBNET.ATG" +#line 2187 "VBNET.ATG" out expr); } -#line 2191 "VBNET.ATG" +#line 2189 "VBNET.ATG" mod.Check(); p = new ParameterDeclarationExpression(type, parameterName, mod.Modifier, expr); } void ParameterModifier( -#line 2834 "VBNET.ATG" +#line 2836 "VBNET.ATG" ParamModifierList m) { if (la.kind == 55) { lexer.NextToken(); -#line 2835 "VBNET.ATG" +#line 2837 "VBNET.ATG" m.Add(ParameterModifiers.In); } else if (la.kind == 53) { lexer.NextToken(); -#line 2836 "VBNET.ATG" +#line 2838 "VBNET.ATG" m.Add(ParameterModifiers.Ref); } else if (la.kind == 137) { lexer.NextToken(); -#line 2837 "VBNET.ATG" +#line 2839 "VBNET.ATG" m.Add(ParameterModifiers.Optional); } else if (la.kind == 143) { lexer.NextToken(); -#line 2838 "VBNET.ATG" +#line 2840 "VBNET.ATG" m.Add(ParameterModifiers.Params); - } else SynErr(252); + } else SynErr(251); } void Statement() { -#line 2218 "VBNET.ATG" +#line 2216 "VBNET.ATG" Statement stmt = null; Location startPos = la.Location; string label = String.Empty; @@ -4898,34 +4906,34 @@ ParamModifierList m) { if (la.kind == 1 || la.kind == 13) { } else if ( -#line 2224 "VBNET.ATG" +#line 2222 "VBNET.ATG" IsLabel()) { LabelName( -#line 2224 "VBNET.ATG" +#line 2222 "VBNET.ATG" out label); -#line 2226 "VBNET.ATG" +#line 2224 "VBNET.ATG" compilationUnit.AddChild(new LabelStatement(t.val)); Expect(13); Statement(); } else if (StartOf(34)) { EmbeddedStatement( -#line 2229 "VBNET.ATG" +#line 2227 "VBNET.ATG" out stmt); -#line 2229 "VBNET.ATG" +#line 2227 "VBNET.ATG" compilationUnit.AddChild(stmt); } else if (StartOf(35)) { LocalDeclarationStatement( -#line 2230 "VBNET.ATG" +#line 2228 "VBNET.ATG" out stmt); -#line 2230 "VBNET.ATG" +#line 2228 "VBNET.ATG" compilationUnit.AddChild(stmt); - } else SynErr(253); + } else SynErr(252); -#line 2233 "VBNET.ATG" +#line 2231 "VBNET.ATG" if (stmt != null) { stmt.StartLocation = startPos; stmt.EndLocation = t.Location; @@ -4934,30 +4942,30 @@ out stmt); } void LabelName( -#line 2617 "VBNET.ATG" +#line 2615 "VBNET.ATG" out string name) { -#line 2619 "VBNET.ATG" +#line 2617 "VBNET.ATG" name = String.Empty; if (StartOf(13)) { Identifier(); -#line 2621 "VBNET.ATG" +#line 2619 "VBNET.ATG" name = t.val; } else if (la.kind == 5) { lexer.NextToken(); -#line 2622 "VBNET.ATG" +#line 2620 "VBNET.ATG" name = t.val; - } else SynErr(254); + } else SynErr(253); } void EmbeddedStatement( -#line 2272 "VBNET.ATG" +#line 2270 "VBNET.ATG" out Statement statement) { -#line 2274 "VBNET.ATG" +#line 2272 "VBNET.ATG" Statement embeddedStatement = null; statement = null; Expression expr = null; @@ -4968,103 +4976,103 @@ out Statement statement) { case 94: { lexer.NextToken(); -#line 2280 "VBNET.ATG" +#line 2278 "VBNET.ATG" ExitType exitType = ExitType.None; switch (la.kind) { case 167: { lexer.NextToken(); -#line 2282 "VBNET.ATG" +#line 2280 "VBNET.ATG" exitType = ExitType.Sub; break; } case 100: { lexer.NextToken(); -#line 2284 "VBNET.ATG" +#line 2282 "VBNET.ATG" exitType = ExitType.Function; break; } case 146: { lexer.NextToken(); -#line 2286 "VBNET.ATG" +#line 2284 "VBNET.ATG" exitType = ExitType.Property; break; } case 83: { lexer.NextToken(); -#line 2288 "VBNET.ATG" +#line 2286 "VBNET.ATG" exitType = ExitType.Do; break; } case 98: { lexer.NextToken(); -#line 2290 "VBNET.ATG" +#line 2288 "VBNET.ATG" exitType = ExitType.For; break; } case 174: { lexer.NextToken(); -#line 2292 "VBNET.ATG" +#line 2290 "VBNET.ATG" exitType = ExitType.Try; break; } case 181: { lexer.NextToken(); -#line 2294 "VBNET.ATG" +#line 2292 "VBNET.ATG" exitType = ExitType.While; break; } case 155: { lexer.NextToken(); -#line 2296 "VBNET.ATG" +#line 2294 "VBNET.ATG" exitType = ExitType.Select; break; } - default: SynErr(255); break; + default: SynErr(254); break; } -#line 2298 "VBNET.ATG" +#line 2296 "VBNET.ATG" statement = new ExitStatement(exitType); break; } case 174: { TryStatement( -#line 2299 "VBNET.ATG" +#line 2297 "VBNET.ATG" out statement); break; } case 186: { lexer.NextToken(); -#line 2300 "VBNET.ATG" +#line 2298 "VBNET.ATG" ContinueType continueType = ContinueType.None; if (la.kind == 83 || la.kind == 98 || la.kind == 181) { if (la.kind == 83) { lexer.NextToken(); -#line 2300 "VBNET.ATG" +#line 2298 "VBNET.ATG" continueType = ContinueType.Do; } else if (la.kind == 98) { lexer.NextToken(); -#line 2300 "VBNET.ATG" +#line 2298 "VBNET.ATG" continueType = ContinueType.For; } else { lexer.NextToken(); -#line 2300 "VBNET.ATG" +#line 2298 "VBNET.ATG" continueType = ContinueType.While; } } -#line 2300 "VBNET.ATG" +#line 2298 "VBNET.ATG" statement = new ContinueStatement(continueType); break; } @@ -5072,11 +5080,11 @@ out statement); lexer.NextToken(); if (StartOf(27)) { Expr( -#line 2302 "VBNET.ATG" +#line 2300 "VBNET.ATG" out expr); } -#line 2302 "VBNET.ATG" +#line 2300 "VBNET.ATG" statement = new ThrowStatement(expr); break; } @@ -5084,27 +5092,27 @@ out expr); lexer.NextToken(); if (StartOf(27)) { Expr( -#line 2304 "VBNET.ATG" +#line 2302 "VBNET.ATG" out expr); } -#line 2304 "VBNET.ATG" +#line 2302 "VBNET.ATG" statement = new ReturnStatement(expr); break; } case 168: { lexer.NextToken(); Expr( -#line 2306 "VBNET.ATG" +#line 2304 "VBNET.ATG" out expr); EndOfStmt(); Block( -#line 2306 "VBNET.ATG" +#line 2304 "VBNET.ATG" out embeddedStatement); Expect(88); Expect(168); -#line 2307 "VBNET.ATG" +#line 2305 "VBNET.ATG" statement = new LockStatement(expr, embeddedStatement); break; } @@ -5112,42 +5120,42 @@ out embeddedStatement); lexer.NextToken(); Identifier(); -#line 2309 "VBNET.ATG" +#line 2307 "VBNET.ATG" name = t.val; if (la.kind == 24) { lexer.NextToken(); if (StartOf(30)) { ArgumentList( -#line 2310 "VBNET.ATG" +#line 2308 "VBNET.ATG" out p); } Expect(25); } -#line 2311 "VBNET.ATG" +#line 2309 "VBNET.ATG" statement = new RaiseEventStatement(name, p); break; } case 182: { WithStatement( -#line 2313 "VBNET.ATG" +#line 2311 "VBNET.ATG" out statement); break; } case 42: { lexer.NextToken(); -#line 2315 "VBNET.ATG" +#line 2313 "VBNET.ATG" Expression handlerExpr = null; Expr( -#line 2316 "VBNET.ATG" +#line 2314 "VBNET.ATG" out expr); Expect(12); Expr( -#line 2316 "VBNET.ATG" +#line 2314 "VBNET.ATG" out handlerExpr); -#line 2318 "VBNET.ATG" +#line 2316 "VBNET.ATG" statement = new AddHandlerStatement(expr, handlerExpr); break; @@ -5155,17 +5163,17 @@ out handlerExpr); case 152: { lexer.NextToken(); -#line 2321 "VBNET.ATG" +#line 2319 "VBNET.ATG" Expression handlerExpr = null; Expr( -#line 2322 "VBNET.ATG" +#line 2320 "VBNET.ATG" out expr); Expect(12); Expr( -#line 2322 "VBNET.ATG" +#line 2320 "VBNET.ATG" out handlerExpr); -#line 2324 "VBNET.ATG" +#line 2322 "VBNET.ATG" statement = new RemoveHandlerStatement(expr, handlerExpr); break; @@ -5173,16 +5181,16 @@ out handlerExpr); case 181: { lexer.NextToken(); Expr( -#line 2327 "VBNET.ATG" +#line 2325 "VBNET.ATG" out expr); EndOfStmt(); Block( -#line 2328 "VBNET.ATG" +#line 2326 "VBNET.ATG" out embeddedStatement); Expect(88); Expect(181); -#line 2330 "VBNET.ATG" +#line 2328 "VBNET.ATG" statement = new DoLoopStatement(expr, embeddedStatement, ConditionType.While, ConditionPosition.Start); break; @@ -5190,23 +5198,23 @@ out embeddedStatement); case 83: { lexer.NextToken(); -#line 2335 "VBNET.ATG" +#line 2333 "VBNET.ATG" ConditionType conditionType = ConditionType.None; if (la.kind == 177 || la.kind == 181) { WhileOrUntil( -#line 2338 "VBNET.ATG" +#line 2336 "VBNET.ATG" out conditionType); Expr( -#line 2338 "VBNET.ATG" +#line 2336 "VBNET.ATG" out expr); EndOfStmt(); Block( -#line 2339 "VBNET.ATG" +#line 2337 "VBNET.ATG" out embeddedStatement); Expect(118); -#line 2342 "VBNET.ATG" +#line 2340 "VBNET.ATG" statement = new DoLoopStatement(expr, embeddedStatement, conditionType == ConditionType.While ? ConditionType.DoWhile : conditionType, @@ -5215,28 +5223,28 @@ out embeddedStatement); } else if (la.kind == 1 || la.kind == 13) { EndOfStmt(); Block( -#line 2349 "VBNET.ATG" +#line 2347 "VBNET.ATG" out embeddedStatement); Expect(118); if (la.kind == 177 || la.kind == 181) { WhileOrUntil( -#line 2350 "VBNET.ATG" +#line 2348 "VBNET.ATG" out conditionType); Expr( -#line 2350 "VBNET.ATG" +#line 2348 "VBNET.ATG" out expr); } -#line 2352 "VBNET.ATG" +#line 2350 "VBNET.ATG" statement = new DoLoopStatement(expr, embeddedStatement, conditionType, ConditionPosition.End); - } else SynErr(256); + } else SynErr(255); break; } case 98: { lexer.NextToken(); -#line 2357 "VBNET.ATG" +#line 2355 "VBNET.ATG" Expression group = null; TypeReference typeReference; string typeName; @@ -5245,24 +5253,24 @@ out expr); if (la.kind == 85) { lexer.NextToken(); LoopControlVariable( -#line 2364 "VBNET.ATG" +#line 2362 "VBNET.ATG" out typeReference, out typeName); Expect(109); Expr( -#line 2365 "VBNET.ATG" +#line 2363 "VBNET.ATG" out group); EndOfStmt(); Block( -#line 2366 "VBNET.ATG" +#line 2364 "VBNET.ATG" out embeddedStatement); Expect(128); if (StartOf(27)) { Expr( -#line 2367 "VBNET.ATG" +#line 2365 "VBNET.ATG" out expr); } -#line 2369 "VBNET.ATG" +#line 2367 "VBNET.ATG" statement = new ForeachStatement(typeReference, typeName, group, @@ -5274,84 +5282,84 @@ out expr); } else if (StartOf(13)) { -#line 2380 "VBNET.ATG" +#line 2378 "VBNET.ATG" Expression start = null; Expression end = null; Expression step = null; Expression nextExpr = null;List nextExpressions = null; LoopControlVariable( -#line 2385 "VBNET.ATG" +#line 2383 "VBNET.ATG" out typeReference, out typeName); Expect(11); Expr( -#line 2386 "VBNET.ATG" +#line 2384 "VBNET.ATG" out start); Expect(172); Expr( -#line 2386 "VBNET.ATG" +#line 2384 "VBNET.ATG" out end); if (la.kind == 162) { lexer.NextToken(); Expr( -#line 2386 "VBNET.ATG" +#line 2384 "VBNET.ATG" out step); } EndOfStmt(); Block( -#line 2387 "VBNET.ATG" +#line 2385 "VBNET.ATG" out embeddedStatement); Expect(128); if (StartOf(27)) { Expr( -#line 2390 "VBNET.ATG" +#line 2388 "VBNET.ATG" out nextExpr); -#line 2390 "VBNET.ATG" +#line 2388 "VBNET.ATG" nextExpressions = new List(); nextExpressions.Add(nextExpr); while (la.kind == 12) { lexer.NextToken(); Expr( -#line 2391 "VBNET.ATG" +#line 2389 "VBNET.ATG" out nextExpr); -#line 2391 "VBNET.ATG" +#line 2389 "VBNET.ATG" nextExpressions.Add(nextExpr); } } -#line 2394 "VBNET.ATG" +#line 2392 "VBNET.ATG" statement = new ForNextStatement(typeReference, typeName, start, end, step, embeddedStatement, nextExpressions); - } else SynErr(257); + } else SynErr(256); break; } case 92: { lexer.NextToken(); Expr( -#line 2398 "VBNET.ATG" +#line 2396 "VBNET.ATG" out expr); -#line 2398 "VBNET.ATG" +#line 2396 "VBNET.ATG" statement = new ErrorStatement(expr); break; } case 151: { lexer.NextToken(); -#line 2400 "VBNET.ATG" +#line 2398 "VBNET.ATG" bool isPreserve = false; if (la.kind == 144) { lexer.NextToken(); -#line 2400 "VBNET.ATG" +#line 2398 "VBNET.ATG" isPreserve = true; } ReDimClause( -#line 2401 "VBNET.ATG" +#line 2399 "VBNET.ATG" out expr); -#line 2403 "VBNET.ATG" +#line 2401 "VBNET.ATG" ReDimStatement reDimStatement = new ReDimStatement(isPreserve); statement = reDimStatement; SafeAdd(reDimStatement, reDimStatement.ReDimClauses, expr as InvocationExpression); @@ -5359,10 +5367,10 @@ out expr); while (la.kind == 12) { lexer.NextToken(); ReDimClause( -#line 2407 "VBNET.ATG" +#line 2405 "VBNET.ATG" out expr); -#line 2408 "VBNET.ATG" +#line 2406 "VBNET.ATG" SafeAdd(reDimStatement, reDimStatement.ReDimClauses, expr as InvocationExpression); } break; @@ -5370,10 +5378,10 @@ out expr); case 91: { lexer.NextToken(); Expr( -#line 2412 "VBNET.ATG" +#line 2410 "VBNET.ATG" out expr); -#line 2413 "VBNET.ATG" +#line 2411 "VBNET.ATG" List arrays = new List(); if (expr != null) { arrays.Add(expr);} EraseStatement eraseStatement = new EraseStatement(arrays); @@ -5382,85 +5390,85 @@ out expr); while (la.kind == 12) { lexer.NextToken(); Expr( -#line 2418 "VBNET.ATG" +#line 2416 "VBNET.ATG" out expr); -#line 2418 "VBNET.ATG" +#line 2416 "VBNET.ATG" if (expr != null) { arrays.Add(expr); } } -#line 2419 "VBNET.ATG" +#line 2417 "VBNET.ATG" statement = eraseStatement; break; } case 163: { lexer.NextToken(); -#line 2421 "VBNET.ATG" +#line 2419 "VBNET.ATG" statement = new StopStatement(); break; } case 106: { lexer.NextToken(); -#line 2423 "VBNET.ATG" +#line 2421 "VBNET.ATG" Location ifStartLocation = t.Location; Expr( -#line 2423 "VBNET.ATG" +#line 2421 "VBNET.ATG" out expr); if (la.kind == 170) { lexer.NextToken(); } if ( -#line 2425 "VBNET.ATG" +#line 2423 "VBNET.ATG" IsEndStmtAhead()) { Expect(88); -#line 2425 "VBNET.ATG" +#line 2423 "VBNET.ATG" statement = new IfElseStatement(expr, new EndStatement()); statement.StartLocation = ifStartLocation; statement.EndLocation = t.Location; } else if (la.kind == 1 || la.kind == 13) { EndOfStmt(); Block( -#line 2428 "VBNET.ATG" +#line 2426 "VBNET.ATG" out embeddedStatement); -#line 2430 "VBNET.ATG" +#line 2428 "VBNET.ATG" IfElseStatement ifStatement = new IfElseStatement(expr, embeddedStatement); ifStatement.StartLocation = ifStartLocation; Location elseIfStart; while (la.kind == 87 || -#line 2436 "VBNET.ATG" +#line 2434 "VBNET.ATG" IsElseIf()) { if ( -#line 2436 "VBNET.ATG" +#line 2434 "VBNET.ATG" IsElseIf()) { Expect(86); -#line 2436 "VBNET.ATG" +#line 2434 "VBNET.ATG" elseIfStart = t.Location; Expect(106); } else { lexer.NextToken(); -#line 2437 "VBNET.ATG" +#line 2435 "VBNET.ATG" elseIfStart = t.Location; } -#line 2439 "VBNET.ATG" +#line 2437 "VBNET.ATG" Expression condition = null; Statement block = null; Expr( -#line 2440 "VBNET.ATG" +#line 2438 "VBNET.ATG" out condition); if (la.kind == 170) { lexer.NextToken(); } EndOfStmt(); Block( -#line 2441 "VBNET.ATG" +#line 2439 "VBNET.ATG" out block); -#line 2443 "VBNET.ATG" +#line 2441 "VBNET.ATG" ElseIfSection elseIfSection = new ElseIfSection(condition, block); elseIfSection.StartLocation = elseIfStart; elseIfSection.EndLocation = t.Location; @@ -5472,63 +5480,63 @@ out block); lexer.NextToken(); EndOfStmt(); Block( -#line 2452 "VBNET.ATG" +#line 2450 "VBNET.ATG" out embeddedStatement); -#line 2454 "VBNET.ATG" +#line 2452 "VBNET.ATG" ifStatement.FalseStatement.Add(embeddedStatement); } Expect(88); Expect(106); -#line 2458 "VBNET.ATG" +#line 2456 "VBNET.ATG" ifStatement.EndLocation = t.Location; statement = ifStatement; } else if (StartOf(34)) { EmbeddedStatement( -#line 2462 "VBNET.ATG" +#line 2460 "VBNET.ATG" out embeddedStatement); -#line 2464 "VBNET.ATG" +#line 2462 "VBNET.ATG" IfElseStatement ifStatement = new IfElseStatement(expr, embeddedStatement); ifStatement.StartLocation = ifStartLocation; while (la.kind == 13) { lexer.NextToken(); EmbeddedStatement( -#line 2467 "VBNET.ATG" +#line 2465 "VBNET.ATG" out embeddedStatement); -#line 2467 "VBNET.ATG" +#line 2465 "VBNET.ATG" ifStatement.TrueStatement.Add(embeddedStatement); } if (la.kind == 86) { lexer.NextToken(); if (StartOf(34)) { EmbeddedStatement( -#line 2469 "VBNET.ATG" +#line 2467 "VBNET.ATG" out embeddedStatement); } -#line 2471 "VBNET.ATG" +#line 2469 "VBNET.ATG" ifStatement.FalseStatement.Add(embeddedStatement); while (la.kind == 13) { lexer.NextToken(); EmbeddedStatement( -#line 2474 "VBNET.ATG" +#line 2472 "VBNET.ATG" out embeddedStatement); -#line 2475 "VBNET.ATG" +#line 2473 "VBNET.ATG" ifStatement.FalseStatement.Add(embeddedStatement); } } -#line 2478 "VBNET.ATG" +#line 2476 "VBNET.ATG" ifStatement.EndLocation = ifStartLocation; statement = ifStatement; - } else SynErr(258); + } else SynErr(257); break; } case 155: { @@ -5537,45 +5545,45 @@ out embeddedStatement); lexer.NextToken(); } Expr( -#line 2481 "VBNET.ATG" +#line 2479 "VBNET.ATG" out expr); EndOfStmt(); -#line 2482 "VBNET.ATG" +#line 2480 "VBNET.ATG" List selectSections = new List(); Statement block = null; while (la.kind == 57) { -#line 2486 "VBNET.ATG" +#line 2484 "VBNET.ATG" List caseClauses = null; Location caseLocation = la.Location; lexer.NextToken(); CaseClauses( -#line 2487 "VBNET.ATG" +#line 2485 "VBNET.ATG" out caseClauses); if ( -#line 2487 "VBNET.ATG" +#line 2485 "VBNET.ATG" IsNotStatementSeparator()) { lexer.NextToken(); } EndOfStmt(); -#line 2489 "VBNET.ATG" +#line 2487 "VBNET.ATG" SwitchSection selectSection = new SwitchSection(caseClauses); selectSection.StartLocation = caseLocation; Block( -#line 2492 "VBNET.ATG" +#line 2490 "VBNET.ATG" out block); -#line 2494 "VBNET.ATG" +#line 2492 "VBNET.ATG" selectSection.Children = block.Children; selectSection.EndLocation = t.EndLocation; selectSections.Add(selectSection); } -#line 2499 "VBNET.ATG" +#line 2497 "VBNET.ATG" statement = new SwitchStatement(expr, selectSections); Expect(88); Expect(155); @@ -5583,43 +5591,43 @@ out block); } case 135: { -#line 2501 "VBNET.ATG" +#line 2499 "VBNET.ATG" OnErrorStatement onErrorStatement = null; OnErrorStatement( -#line 2502 "VBNET.ATG" +#line 2500 "VBNET.ATG" out onErrorStatement); -#line 2502 "VBNET.ATG" +#line 2500 "VBNET.ATG" statement = onErrorStatement; break; } case 104: { -#line 2503 "VBNET.ATG" +#line 2501 "VBNET.ATG" GotoStatement goToStatement = null; GotoStatement( -#line 2504 "VBNET.ATG" +#line 2502 "VBNET.ATG" out goToStatement); -#line 2504 "VBNET.ATG" +#line 2502 "VBNET.ATG" statement = goToStatement; break; } case 153: { -#line 2505 "VBNET.ATG" +#line 2503 "VBNET.ATG" ResumeStatement resumeStatement = null; ResumeStatement( -#line 2506 "VBNET.ATG" +#line 2504 "VBNET.ATG" out resumeStatement); -#line 2506 "VBNET.ATG" +#line 2504 "VBNET.ATG" statement = resumeStatement; break; } - case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 24: case 43: case 47: case 49: case 50: case 51: case 52: case 54: case 59: case 60: case 61: case 62: case 63: case 64: case 65: case 66: case 68: case 69: case 70: case 72: case 73: case 74: case 75: case 76: case 77: case 82: case 84: case 96: case 102: case 111: case 117: case 119: case 124: case 125: case 127: case 130: case 133: case 144: case 159: case 160: case 165: case 169: case 173: case 175: case 176: case 177: case 190: case 191: case 192: case 193: case 194: case 195: case 196: case 197: case 198: case 199: case 204: { + case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 24: case 43: case 47: case 49: case 50: case 51: case 52: case 54: case 59: case 60: case 61: case 62: case 63: case 64: case 65: case 66: case 68: case 69: case 70: case 72: case 73: case 74: case 75: case 76: case 77: case 82: case 84: case 95: case 96: case 102: case 111: case 117: case 119: case 124: case 125: case 127: case 130: case 133: case 134: case 144: case 159: case 160: case 165: case 169: case 173: case 175: case 176: case 177: case 190: case 191: case 192: case 193: case 194: case 195: case 196: case 197: case 198: case 199: case 204: { -#line 2509 "VBNET.ATG" +#line 2507 "VBNET.ATG" Expression val = null; AssignmentOperatorType op; @@ -5627,25 +5635,25 @@ out resumeStatement); la.kind == Tokens.Not || la.kind == Tokens.Times; SimpleExpr( -#line 2515 "VBNET.ATG" +#line 2513 "VBNET.ATG" out expr); if (StartOf(36)) { AssignmentOperator( -#line 2517 "VBNET.ATG" +#line 2515 "VBNET.ATG" out op); Expr( -#line 2517 "VBNET.ATG" +#line 2515 "VBNET.ATG" out val); -#line 2517 "VBNET.ATG" +#line 2515 "VBNET.ATG" expr = new AssignmentExpression(expr, op, val); } else if (la.kind == 1 || la.kind == 13 || la.kind == 86) { -#line 2518 "VBNET.ATG" +#line 2516 "VBNET.ATG" if (mustBeAssignment) Error("error in assignment."); - } else SynErr(259); + } else SynErr(258); -#line 2521 "VBNET.ATG" +#line 2519 "VBNET.ATG" // a field reference expression that stands alone is a // invocation expression without parantheses and arguments if(expr is FieldReferenceExpression || expr is IdentifierExpression) { @@ -5658,63 +5666,63 @@ out val); case 56: { lexer.NextToken(); SimpleExpr( -#line 2528 "VBNET.ATG" +#line 2526 "VBNET.ATG" out expr); -#line 2528 "VBNET.ATG" +#line 2526 "VBNET.ATG" statement = new ExpressionStatement(expr); break; } case 188: { lexer.NextToken(); -#line 2530 "VBNET.ATG" +#line 2528 "VBNET.ATG" Statement block; if ( -#line 2531 "VBNET.ATG" +#line 2529 "VBNET.ATG" Peek(1).kind == Tokens.As) { -#line 2532 "VBNET.ATG" +#line 2530 "VBNET.ATG" LocalVariableDeclaration resourceAquisition = new LocalVariableDeclaration(Modifiers.None); VariableDeclarator( -#line 2533 "VBNET.ATG" +#line 2531 "VBNET.ATG" resourceAquisition.Variables); while (la.kind == 12) { lexer.NextToken(); VariableDeclarator( -#line 2535 "VBNET.ATG" +#line 2533 "VBNET.ATG" resourceAquisition.Variables); } Block( -#line 2537 "VBNET.ATG" +#line 2535 "VBNET.ATG" out block); -#line 2538 "VBNET.ATG" +#line 2536 "VBNET.ATG" statement = new UsingStatement(resourceAquisition, block); } else if (StartOf(27)) { Expr( -#line 2539 "VBNET.ATG" +#line 2537 "VBNET.ATG" out expr); Block( -#line 2540 "VBNET.ATG" +#line 2538 "VBNET.ATG" out block); -#line 2541 "VBNET.ATG" +#line 2539 "VBNET.ATG" statement = new UsingStatement(new ExpressionStatement(expr), block); - } else SynErr(260); + } else SynErr(259); Expect(88); Expect(188); break; } - default: SynErr(261); break; + default: SynErr(260); break; } } void LocalDeclarationStatement( -#line 2241 "VBNET.ATG" +#line 2239 "VBNET.ATG" out Statement statement) { -#line 2243 "VBNET.ATG" +#line 2241 "VBNET.ATG" ModifierList m = new ModifierList(); LocalVariableDeclaration localVariableDeclaration; bool dimfound = false; @@ -5723,22 +5731,22 @@ out Statement statement) { if (la.kind == 71) { lexer.NextToken(); -#line 2249 "VBNET.ATG" +#line 2247 "VBNET.ATG" m.Add(Modifiers.Const, t.Location); } else if (la.kind == 161) { lexer.NextToken(); -#line 2250 "VBNET.ATG" +#line 2248 "VBNET.ATG" m.Add(Modifiers.Static, t.Location); } else { lexer.NextToken(); -#line 2251 "VBNET.ATG" +#line 2249 "VBNET.ATG" dimfound = true; } } -#line 2254 "VBNET.ATG" +#line 2252 "VBNET.ATG" if(dimfound && (m.Modifier & Modifiers.Const) != 0) { Error("Dim is not allowed on constants."); } @@ -5751,135 +5759,135 @@ out Statement statement) { localVariableDeclaration.StartLocation = t.Location; VariableDeclarator( -#line 2265 "VBNET.ATG" +#line 2263 "VBNET.ATG" localVariableDeclaration.Variables); while (la.kind == 12) { lexer.NextToken(); VariableDeclarator( -#line 2266 "VBNET.ATG" +#line 2264 "VBNET.ATG" localVariableDeclaration.Variables); } -#line 2268 "VBNET.ATG" +#line 2266 "VBNET.ATG" statement = localVariableDeclaration; } void TryStatement( -#line 2731 "VBNET.ATG" +#line 2729 "VBNET.ATG" out Statement tryStatement) { -#line 2733 "VBNET.ATG" +#line 2731 "VBNET.ATG" Statement blockStmt = null, finallyStmt = null;List catchClauses = null; Expect(174); EndOfStmt(); Block( -#line 2736 "VBNET.ATG" +#line 2734 "VBNET.ATG" out blockStmt); if (la.kind == 58 || la.kind == 88 || la.kind == 97) { CatchClauses( -#line 2737 "VBNET.ATG" +#line 2735 "VBNET.ATG" out catchClauses); } if (la.kind == 97) { lexer.NextToken(); EndOfStmt(); Block( -#line 2738 "VBNET.ATG" +#line 2736 "VBNET.ATG" out finallyStmt); } Expect(88); Expect(174); -#line 2741 "VBNET.ATG" +#line 2739 "VBNET.ATG" tryStatement = new TryCatchStatement(blockStmt, catchClauses, finallyStmt); } void WithStatement( -#line 2711 "VBNET.ATG" +#line 2709 "VBNET.ATG" out Statement withStatement) { -#line 2713 "VBNET.ATG" +#line 2711 "VBNET.ATG" Statement blockStmt = null; Expression expr = null; Expect(182); -#line 2716 "VBNET.ATG" +#line 2714 "VBNET.ATG" Location start = t.Location; Expr( -#line 2717 "VBNET.ATG" +#line 2715 "VBNET.ATG" out expr); EndOfStmt(); -#line 2719 "VBNET.ATG" +#line 2717 "VBNET.ATG" withStatement = new WithStatement(expr); withStatement.StartLocation = start; Block( -#line 2722 "VBNET.ATG" +#line 2720 "VBNET.ATG" out blockStmt); -#line 2724 "VBNET.ATG" +#line 2722 "VBNET.ATG" ((WithStatement)withStatement).Body = (BlockStatement)blockStmt; Expect(88); Expect(182); -#line 2727 "VBNET.ATG" +#line 2725 "VBNET.ATG" withStatement.EndLocation = t.Location; } void WhileOrUntil( -#line 2704 "VBNET.ATG" +#line 2702 "VBNET.ATG" out ConditionType conditionType) { -#line 2705 "VBNET.ATG" +#line 2703 "VBNET.ATG" conditionType = ConditionType.None; if (la.kind == 181) { lexer.NextToken(); -#line 2706 "VBNET.ATG" +#line 2704 "VBNET.ATG" conditionType = ConditionType.While; } else if (la.kind == 177) { lexer.NextToken(); -#line 2707 "VBNET.ATG" +#line 2705 "VBNET.ATG" conditionType = ConditionType.Until; - } else SynErr(262); + } else SynErr(261); } void LoopControlVariable( -#line 2547 "VBNET.ATG" +#line 2545 "VBNET.ATG" out TypeReference type, out string name) { -#line 2548 "VBNET.ATG" +#line 2546 "VBNET.ATG" ArrayList arrayModifiers = null; type = null; Qualident( -#line 2552 "VBNET.ATG" +#line 2550 "VBNET.ATG" out name); if ( -#line 2553 "VBNET.ATG" +#line 2551 "VBNET.ATG" IsDims()) { ArrayTypeModifiers( -#line 2553 "VBNET.ATG" +#line 2551 "VBNET.ATG" out arrayModifiers); } if (la.kind == 48) { lexer.NextToken(); TypeName( -#line 2554 "VBNET.ATG" +#line 2552 "VBNET.ATG" out type); -#line 2554 "VBNET.ATG" +#line 2552 "VBNET.ATG" if (name.IndexOf('.') > 0) { Error("No type def for 'for each' member indexer allowed."); } } -#line 2556 "VBNET.ATG" +#line 2554 "VBNET.ATG" if (type != null) { if(type.RankSpecifier != null && arrayModifiers != null) { Error("array rank only allowed one time"); @@ -5891,59 +5899,59 @@ out type); } void ReDimClause( -#line 2626 "VBNET.ATG" +#line 2624 "VBNET.ATG" out Expression expr) { SimpleNonInvocationExpression( -#line 2628 "VBNET.ATG" +#line 2626 "VBNET.ATG" out expr); ReDimClauseInternal( -#line 2629 "VBNET.ATG" +#line 2627 "VBNET.ATG" ref expr); } void CaseClauses( -#line 2664 "VBNET.ATG" +#line 2662 "VBNET.ATG" out List caseClauses) { -#line 2666 "VBNET.ATG" +#line 2664 "VBNET.ATG" caseClauses = new List(); CaseLabel caseClause = null; CaseClause( -#line 2669 "VBNET.ATG" +#line 2667 "VBNET.ATG" out caseClause); -#line 2669 "VBNET.ATG" +#line 2667 "VBNET.ATG" if (caseClause != null) { caseClauses.Add(caseClause); } while (la.kind == 12) { lexer.NextToken(); CaseClause( -#line 2670 "VBNET.ATG" +#line 2668 "VBNET.ATG" out caseClause); -#line 2670 "VBNET.ATG" +#line 2668 "VBNET.ATG" if (caseClause != null) { caseClauses.Add(caseClause); } } } void OnErrorStatement( -#line 2567 "VBNET.ATG" +#line 2565 "VBNET.ATG" out OnErrorStatement stmt) { -#line 2569 "VBNET.ATG" +#line 2567 "VBNET.ATG" stmt = null; GotoStatement goToStatement = null; Expect(135); Expect(92); if ( -#line 2575 "VBNET.ATG" +#line 2573 "VBNET.ATG" IsNegativeLabelName()) { Expect(104); Expect(15); Expect(5); -#line 2577 "VBNET.ATG" +#line 2575 "VBNET.ATG" long intLabel = Int64.Parse(t.val); if(intLabel != 1) { Error("invalid label in on error statement."); @@ -5952,10 +5960,10 @@ IsNegativeLabelName()) { } else if (la.kind == 104) { GotoStatement( -#line 2583 "VBNET.ATG" +#line 2581 "VBNET.ATG" out goToStatement); -#line 2585 "VBNET.ATG" +#line 2583 "VBNET.ATG" string val = goToStatement.Label; // if value is numeric, make sure that is 0 @@ -5972,88 +5980,88 @@ out goToStatement); lexer.NextToken(); Expect(128); -#line 2599 "VBNET.ATG" +#line 2597 "VBNET.ATG" stmt = new OnErrorStatement(new ResumeStatement(true)); - } else SynErr(263); + } else SynErr(262); } void GotoStatement( -#line 2605 "VBNET.ATG" +#line 2603 "VBNET.ATG" out GotoStatement goToStatement) { -#line 2607 "VBNET.ATG" +#line 2605 "VBNET.ATG" string label = String.Empty; Expect(104); LabelName( -#line 2610 "VBNET.ATG" +#line 2608 "VBNET.ATG" out label); -#line 2612 "VBNET.ATG" +#line 2610 "VBNET.ATG" goToStatement = new GotoStatement(label); } void ResumeStatement( -#line 2653 "VBNET.ATG" +#line 2651 "VBNET.ATG" out ResumeStatement resumeStatement) { -#line 2655 "VBNET.ATG" +#line 2653 "VBNET.ATG" resumeStatement = null; string label = String.Empty; if ( -#line 2658 "VBNET.ATG" +#line 2656 "VBNET.ATG" IsResumeNext()) { Expect(153); Expect(128); -#line 2659 "VBNET.ATG" +#line 2657 "VBNET.ATG" resumeStatement = new ResumeStatement(true); } else if (la.kind == 153) { lexer.NextToken(); if (StartOf(37)) { LabelName( -#line 2660 "VBNET.ATG" +#line 2658 "VBNET.ATG" out label); } -#line 2660 "VBNET.ATG" +#line 2658 "VBNET.ATG" resumeStatement = new ResumeStatement(label); - } else SynErr(264); + } else SynErr(263); } void ReDimClauseInternal( -#line 2632 "VBNET.ATG" +#line 2630 "VBNET.ATG" ref Expression expr) { -#line 2633 "VBNET.ATG" +#line 2631 "VBNET.ATG" List arguments; bool canBeNormal; bool canBeRedim; string name; while (la.kind == 10 || -#line 2636 "VBNET.ATG" +#line 2634 "VBNET.ATG" la.kind == Tokens.OpenParenthesis && Peek(1).kind == Tokens.Of) { if (la.kind == 10) { lexer.NextToken(); IdentifierOrKeyword( -#line 2635 "VBNET.ATG" +#line 2633 "VBNET.ATG" out name); -#line 2635 "VBNET.ATG" +#line 2633 "VBNET.ATG" expr = new FieldReferenceExpression(expr, name); } else { InvocationExpression( -#line 2637 "VBNET.ATG" +#line 2635 "VBNET.ATG" ref expr); } } Expect(24); NormalOrReDimArgumentList( -#line 2640 "VBNET.ATG" +#line 2638 "VBNET.ATG" out arguments, out canBeNormal, out canBeRedim); Expect(25); -#line 2642 "VBNET.ATG" +#line 2640 "VBNET.ATG" expr = new InvocationExpression(expr, arguments); if (canBeRedim == false || canBeNormal && (la.kind == Tokens.Dot || la.kind == Tokens.OpenParenthesis)) { if (this.Errors.Count == 0) { @@ -6065,10 +6073,10 @@ out arguments, out canBeNormal, out canBeRedim); } void CaseClause( -#line 2674 "VBNET.ATG" +#line 2672 "VBNET.ATG" out CaseLabel caseClause) { -#line 2676 "VBNET.ATG" +#line 2674 "VBNET.ATG" Expression expr = null; Expression sexpr = null; BinaryOperatorType op = BinaryOperatorType.None; @@ -6077,7 +6085,7 @@ out CaseLabel caseClause) { if (la.kind == 86) { lexer.NextToken(); -#line 2682 "VBNET.ATG" +#line 2680 "VBNET.ATG" caseClause = new CaseLabel(); } else if (StartOf(38)) { if (la.kind == 113) { @@ -6087,76 +6095,76 @@ out CaseLabel caseClause) { case 27: { lexer.NextToken(); -#line 2686 "VBNET.ATG" +#line 2684 "VBNET.ATG" op = BinaryOperatorType.LessThan; break; } case 26: { lexer.NextToken(); -#line 2687 "VBNET.ATG" +#line 2685 "VBNET.ATG" op = BinaryOperatorType.GreaterThan; break; } case 30: { lexer.NextToken(); -#line 2688 "VBNET.ATG" +#line 2686 "VBNET.ATG" op = BinaryOperatorType.LessThanOrEqual; break; } case 29: { lexer.NextToken(); -#line 2689 "VBNET.ATG" +#line 2687 "VBNET.ATG" op = BinaryOperatorType.GreaterThanOrEqual; break; } case 11: { lexer.NextToken(); -#line 2690 "VBNET.ATG" +#line 2688 "VBNET.ATG" op = BinaryOperatorType.Equality; break; } case 28: { lexer.NextToken(); -#line 2691 "VBNET.ATG" +#line 2689 "VBNET.ATG" op = BinaryOperatorType.InEquality; break; } - default: SynErr(265); break; + default: SynErr(264); break; } Expr( -#line 2693 "VBNET.ATG" +#line 2691 "VBNET.ATG" out expr); -#line 2695 "VBNET.ATG" +#line 2693 "VBNET.ATG" caseClause = new CaseLabel(op, expr); } else if (StartOf(27)) { Expr( -#line 2697 "VBNET.ATG" +#line 2695 "VBNET.ATG" out expr); if (la.kind == 172) { lexer.NextToken(); Expr( -#line 2697 "VBNET.ATG" +#line 2695 "VBNET.ATG" out sexpr); } -#line 2699 "VBNET.ATG" +#line 2697 "VBNET.ATG" caseClause = new CaseLabel(expr, sexpr); - } else SynErr(266); + } else SynErr(265); } void CatchClauses( -#line 2746 "VBNET.ATG" +#line 2744 "VBNET.ATG" out List catchClauses) { -#line 2748 "VBNET.ATG" +#line 2746 "VBNET.ATG" catchClauses = new List(); TypeReference type = null; Statement blockStmt = null; @@ -6168,27 +6176,27 @@ out List catchClauses) { if (StartOf(13)) { Identifier(); -#line 2756 "VBNET.ATG" +#line 2754 "VBNET.ATG" name = t.val; if (la.kind == 48) { lexer.NextToken(); TypeName( -#line 2756 "VBNET.ATG" +#line 2754 "VBNET.ATG" out type); } } if (la.kind == 180) { lexer.NextToken(); Expr( -#line 2757 "VBNET.ATG" +#line 2755 "VBNET.ATG" out expr); } EndOfStmt(); Block( -#line 2759 "VBNET.ATG" +#line 2757 "VBNET.ATG" out blockStmt); -#line 2760 "VBNET.ATG" +#line 2758 "VBNET.ATG" catchClauses.Add(new CatchClause(type, name, blockStmt, expr)); } } @@ -6443,35 +6451,34 @@ out blockStmt); case 235: s = "invalid OverloadableOperator"; break; case 236: s = "invalid VariableInitializer"; break; case 237: s = "invalid EventMemberSpecifier"; break; - case 238: s = "invalid EventMemberSpecifier"; break; - case 239: s = "invalid AssignmentOperator"; break; + case 238: s = "invalid AssignmentOperator"; break; + case 239: s = "invalid SimpleNonInvocationExpression"; break; case 240: s = "invalid SimpleNonInvocationExpression"; break; case 241: s = "invalid SimpleNonInvocationExpression"; break; case 242: s = "invalid SimpleNonInvocationExpression"; break; - case 243: s = "invalid SimpleNonInvocationExpression"; break; + case 243: s = "invalid InvocationExpression"; break; case 244: s = "invalid InvocationExpression"; break; - case 245: s = "invalid InvocationExpression"; break; - case 246: s = "invalid PrimitiveTypeName"; break; - case 247: s = "invalid CastTarget"; break; - case 248: s = "invalid ComparisonExpr"; break; - case 249: s = "invalid Argument"; break; - case 250: s = "invalid QualIdentAndTypeArguments"; break; - case 251: s = "invalid AttributeArguments"; break; - case 252: s = "invalid ParameterModifier"; break; - case 253: s = "invalid Statement"; break; - case 254: s = "invalid LabelName"; break; + case 245: s = "invalid PrimitiveTypeName"; break; + case 246: s = "invalid CastTarget"; break; + case 247: s = "invalid ComparisonExpr"; break; + case 248: s = "invalid Argument"; break; + case 249: s = "invalid QualIdentAndTypeArguments"; break; + case 250: s = "invalid AttributeArguments"; break; + case 251: s = "invalid ParameterModifier"; break; + case 252: s = "invalid Statement"; break; + case 253: s = "invalid LabelName"; break; + case 254: s = "invalid EmbeddedStatement"; break; case 255: s = "invalid EmbeddedStatement"; break; case 256: s = "invalid EmbeddedStatement"; break; case 257: s = "invalid EmbeddedStatement"; break; case 258: s = "invalid EmbeddedStatement"; break; case 259: s = "invalid EmbeddedStatement"; break; case 260: s = "invalid EmbeddedStatement"; break; - case 261: s = "invalid EmbeddedStatement"; break; - case 262: s = "invalid WhileOrUntil"; break; - case 263: s = "invalid OnErrorStatement"; break; - case 264: s = "invalid ResumeStatement"; break; + case 261: s = "invalid WhileOrUntil"; break; + case 262: s = "invalid OnErrorStatement"; break; + case 263: s = "invalid ResumeStatement"; break; + case 264: s = "invalid CaseClause"; break; case 265: s = "invalid CaseClause"; break; - case 266: s = "invalid CaseClause"; break; default: s = "error " + errorNumber; break; } @@ -6488,40 +6495,40 @@ out blockStmt); {x,x,x,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,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,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,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,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,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, 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,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,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,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,T,T,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,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,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, 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,T, x,T,T,T, T,x,T,x, x,x,x,x, x,x,x,x, x,T,x,T, x,x,T,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,T, x,x,x,x, x,T,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,T, T,x,x,x, x,T,T,x, x,T,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,x,x, x,x,T,x, x,x,x,x, 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,T, x,T,T,T, T,x,T,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,T,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,T,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,T, T,x,x,x, x,T,x,x, x,T,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,x,x, x,x,T,x, x,x,x,x, 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,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,T,T,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,T,x, T,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, T,T,x,x, x,x,x,T, T,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,x, 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,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,T,T,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,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,T,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,x,x, 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,x,x, 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,T, x,T,T,T, T,x,T,x, x,x,x,x, x,x,x,x, x,T,x,T, x,x,T,x, x,x,x,x, T,T,x,x, x,x,x,x, T,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,x,x, x,T,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, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, x,T,T,x, x,T,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,x,x, x,x,T,x, x,x,x,x, 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,T, x,T,T,T, T,x,T,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,T,x, x,x,x,x, T,T,x,x, x,x,x,x, T,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,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, T,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,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,x,x, x,x,T,x, x,x,x,x, 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,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,T,T,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,T, 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,T,x, x,x,x,x, T,T,T,x, T,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, T,T,x,x, x,x,x,T, T,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,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,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,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,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,T, x,T,T,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, 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,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,T,x, x,x,x,x, 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,T, x,T,T,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,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,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,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,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,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,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,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,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,T, x,T,T,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, 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,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, 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,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,T,T,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,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,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,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,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,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,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,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,T, x,T,T,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, 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,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, T,x,x}, - {x,T,T,T, T,T,T,T, T,T,T,x, x,T,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,T,T, x,x,x,T, x,T,T,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,T,x,T, x,x,x,x, x,x,x,x, T,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, T,T,x,x, x,T,T,x, x,x,T,x, T,x,T,T, T,T,T,T, T,T,T,T, x,x,x,x, 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,T, x,T,T,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,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,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,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,x,x, T,x,x}, + {x,T,T,T, T,T,T,T, T,T,T,x, x,T,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,T,T, x,x,x,T, x,T,T,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,T, 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,T,T,T, x,x,x,x, x,x,x,x, T,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, T,T,x,x, x,T,T,x, x,x,T,x, T,x,T,T, T,T,T,T, T,T,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,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,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,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,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,T,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,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,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,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,x,x, x,x,x}, {x,x,x,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,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,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,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,T,T,T, T,T,T,T, T,T,T,x, x,T,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,T,T, x,x,x,T, x,T,T,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,T,x,T, x,x,x,x, x,x,x,x, T,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, T,T,x,x, x,T,T,x, x,x,T,x, T,x,T,T, T,T,T,T, T,T,T,T, x,x,x,x, T,x,x}, - {x,T,T,T, T,T,T,T, T,T,T,T, T,T,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,T,T, x,x,x,T, T,T,T,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,T,x,T, x,x,x,x, x,x,x,x, T,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, T,T,x,x, x,T,T,x, x,x,T,x, T,x,T,T, T,T,T,T, T,T,T,T, x,x,x,x, T,x,x}, + {x,T,T,T, T,T,T,T, T,T,T,x, x,T,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,T,T, x,x,x,T, x,T,T,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,T, 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,T,T,T, x,x,x,x, x,x,x,x, T,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, T,T,x,x, x,T,T,x, x,x,T,x, T,x,T,T, T,T,T,T, T,T,T,T, x,x,x,x, T,x,x}, + {x,T,T,T, T,T,T,T, T,T,T,T, T,T,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,T,T, x,x,x,T, T,T,T,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,T, 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,T,T,T, x,x,x,x, x,x,x,x, T,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, T,T,x,x, x,T,T,x, x,x,T,x, T,x,T,T, T,T,T,T, T,T,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,x,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,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,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, x,x,x,x, x,x,x,x, x,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, 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,x, x,x,x,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,T,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,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,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,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,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,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,T,T, T,T,T,T, T,T,T,x, x,x,T,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,T, x,x,x,T, x,T,T,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,T,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,T, T,x,x,x, x,T,x,x, x,T,x,x, x,T,x,T, T,T,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,T, T,T,T,T, x,x,x,x, T,x,x}, - {x,x,T,T, T,T,T,T, T,T,T,x, x,x,T,T, T,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,T, x,x,x,T, x,T,T,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,T,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,T, T,x,x,x, x,T,x,x, x,T,x,x, x,T,x,T, T,T,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,T, T,T,T,T, x,x,x,x, T,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, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,T, x,T,T,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,T,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,T, T,x,x,x, x,T,x,x, x,T,x,x, x,T,x,T, T,T,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,T, T,T,T,T, x,x,x,x, T,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, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,T, x,T,T,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,T,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,T, T,x,x,x, x,T,x,x, x,T,x,x, x,T,x,T, T,T,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,T, T,T,T,T, x,x,x,x, T,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, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,T, x,T,T,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,T, 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,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,T, T,x,x,x, x,T,x,x, x,T,x,x, x,T,x,T, T,T,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,T, T,T,T,T, x,x,x,x, T,x,x}, + {x,x,T,T, T,T,T,T, T,T,T,x, x,x,T,T, T,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,T, x,x,x,T, x,T,T,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,T, 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,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,T, T,x,x,x, x,T,x,x, x,T,x,x, x,T,x,T, T,T,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,T, T,T,T,T, x,x,x,x, T,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, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,T, x,T,T,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,T, 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,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,T, T,x,x,x, x,T,x,x, x,T,x,x, x,T,x,T, T,T,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,T, T,T,T,T, x,x,x,x, T,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, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,T, x,T,T,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,T, 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,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,T, T,x,x,x, x,T,x,x, x,T,x,x, x,T,x,T, T,T,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,T, T,T,T,T, x,x,x,x, T,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,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, 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,T,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, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,T, x,T,T,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,T,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,T, T,x,x,x, x,T,x,x, x,T,x,x, x,T,x,T, T,T,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,T, T,T,T,T, x,x,x,x, T,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, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,T, x,T,T,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,T, 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,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,T, T,x,x,x, x,T,x,x, x,T,x,x, x,T,x,T, T,T,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,T, T,T,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,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,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,T,T, T,T,T,T, T,T,T,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,T,T, x,x,x,T, x,T,T,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,T,x,T, x,x,x,x, x,x,x,x, T,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, T,T,x,x, x,T,T,x, x,x,T,x, T,x,T,T, T,T,T,T, T,T,T,T, x,x,x,x, 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,T, x,T,T,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, T,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, 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, T,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, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,x,T, x,T,T,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,T, 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,T,T,T, x,x,x,x, x,x,x,x, T,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, T,T,x,x, x,T,T,x, x,x,T,x, T,x,T,T, T,T,T,T, T,T,T,T, x,x,x,x, 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,T, x,T,T,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,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,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,T,x,x, x,x,x,x, 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,x,x, T,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,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,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,T, x,T,T,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, 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,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, T,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,T, x,T,T,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,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,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,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,x,x, T,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,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,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x} }; diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG index b758a6ce3d..869de9bbb2 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG +++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG @@ -1532,16 +1532,14 @@ ImplementsClause baseInterfaces> . EventMemberSpecifier - (. string type; name = String.Empty; .) = - Identifier (. type = t.val; .) +(. string eventName; .) += + ( Identifier | "MyBase" | "Me" ) + (. name = t.val; .) "." - Identifier (. name = type + "." + t.val; .) - | "MyBase" "." - ( - Identifier (. name = "MyBase." + t.val; .) - | "Error" (. name = "MyBase.Error"; .) - ) - . + IdentifierOrKeyword + (. name = name + "." + eventName; .) +. Expr = @@ -2787,6 +2785,8 @@ Identifier = | "Preserve" | "Unicode" | "Until" + | "Off" + | "Explicit" . IdentifierForFieldDeclaration = @@ -2801,6 +2801,8 @@ IdentifierForFieldDeclaration = | "Preserve" | "Unicode" | "Until" + | "Off" + | "Explicit" . /* 2.2 */ diff --git a/src/Libraries/NRefactory/Test/Parser/Expressions/IdentifierExpressionTests.cs b/src/Libraries/NRefactory/Test/Parser/Expressions/IdentifierExpressionTests.cs index e143c87736..e78b547462 100644 --- a/src/Libraries/NRefactory/Test/Parser/Expressions/IdentifierExpressionTests.cs +++ b/src/Libraries/NRefactory/Test/Parser/Expressions/IdentifierExpressionTests.cs @@ -48,10 +48,12 @@ namespace ICSharpCode.NRefactory.Tests.Ast } [Test] - public void VBNetAssemblyIdentifierExpressionTest() + public void VBNetContextKeywordsTest() { Assert.AreEqual("Assembly", ParseUtilVBNet.ParseExpression("Assembly").Identifier); Assert.AreEqual("Custom", ParseUtilVBNet.ParseExpression("Custom").Identifier); + Assert.AreEqual("Off", ParseUtilVBNet.ParseExpression("Off").Identifier); + Assert.AreEqual("Explicit", ParseUtilVBNet.ParseExpression("Explicit").Identifier); } #endregion } diff --git a/src/Libraries/NRefactory/Test/Parser/TypeLevel/MethodDeclarationTests.cs b/src/Libraries/NRefactory/Test/Parser/TypeLevel/MethodDeclarationTests.cs index c9d88018e7..c4ef1e87ba 100644 --- a/src/Libraries/NRefactory/Test/Parser/TypeLevel/MethodDeclarationTests.cs +++ b/src/Libraries/NRefactory/Test/Parser/TypeLevel/MethodDeclarationTests.cs @@ -225,32 +225,6 @@ namespace ICSharpCode.NRefactory.Tests.Ast #region VB.NET - [Test] - public void VBNetSimpleMethodDeclarationTest() - { - MethodDeclaration md = ParseUtilCSharp.ParseTypeMember("void MyMethod() {} "); - Assert.AreEqual("void", md.TypeReference.Type); - Assert.AreEqual(0, md.Parameters.Count); - } - - [Test] - public void VBNetSimpleMethodRegionTest() - { - const string program = @" - void MyMethod() - { - OtherMethod(); - } -"; - MethodDeclaration md = ParseUtilCSharp.ParseTypeMember(program); - Assert.AreEqual(2, md.StartLocation.Y, "StartLocation.Y"); - Assert.AreEqual(2, md.EndLocation.Y, "EndLocation.Y"); - Assert.AreEqual(3, md.StartLocation.X, "StartLocation.X"); - - // endLocation.X is currently 20. It should be 18, but that error is not critical - //Assert.AreEqual(18, md.EndLocation.X, "EndLocation.X"); - } - [Test] public void VBNetMethodWithModifiersRegionTest() { @@ -346,6 +320,25 @@ End Interface Assert.AreEqual("ISomeInterface", md.Templates[0].Bases[0].Type); } + [Test] + public void VBNetMethodWithHandlesClause() + { + MethodDeclaration md = ParseUtilVBNet.ParseTypeMember( + @"Public Sub MyMethod(sender As Object, e As EventArgs) Handles x.y + End Sub"); + Assert.AreEqual(new string[] { "x.y" }, md.HandlesClause.ToArray()); + + md = ParseUtilVBNet.ParseTypeMember( + @"Public Sub MyMethod() Handles Me.FormClosing + End Sub"); + Assert.AreEqual(new string[] { "Me.FormClosing" }, md.HandlesClause.ToArray()); + + md = ParseUtilVBNet.ParseTypeMember( + @"Public Sub MyMethod() Handles MyBase.Event, Button1.Click + End Sub"); + Assert.AreEqual(new string[] { "MyBase.Event", "Button1.Click" }, md.HandlesClause.ToArray()); + } + #endregion } } diff --git a/src/Main/Base/Project/Src/Gui/Dialogs/AbstractOptionPanel.cs b/src/Main/Base/Project/Src/Gui/Dialogs/AbstractOptionPanel.cs index 5f02013747..bc090a1bbf 100644 --- a/src/Main/Base/Project/Src/Gui/Dialogs/AbstractOptionPanel.cs +++ b/src/Main/Base/Project/Src/Gui/Dialogs/AbstractOptionPanel.cs @@ -10,6 +10,7 @@ using System.Windows.Forms; using ICSharpCode.Core; using ICSharpCode.SharpDevelop.Gui.XmlForms; +using ICSharpCode.SharpDevelop.Project; namespace ICSharpCode.SharpDevelop.Gui { @@ -94,11 +95,17 @@ namespace ICSharpCode.SharpDevelop.Gui protected string baseDirectory; + [Obsolete("Please specify fileFilter and targetNeedsMSBuildEncoding")] protected void ConnectBrowseButton(string browseButton, string target) { ConnectBrowseButton(browseButton, target, "${res:SharpDevelop.FileFilter.AllFiles}|*.*"); } + [Obsolete("Please specify targetNeedsMSBuildEncoding")] protected void ConnectBrowseButton(string browseButton, string target, string fileFilter) + { + ConnectBrowseButton(browseButton, target, fileFilter, TextBoxEditMode.EditEvaluatedProperty); + } + protected void ConnectBrowseButton(string browseButton, string target, string fileFilter, TextBoxEditMode textBoxEditMode) { if (ControlDictionary[browseButton] == null) { @@ -110,14 +117,24 @@ namespace ICSharpCode.SharpDevelop.Gui MessageService.ShowError(target + " not found!"); return; } - ControlDictionary[browseButton].Click += new EventHandler(new BrowseButtonEvent(this, target, fileFilter).Event); + ControlDictionary[browseButton].Click += new EventHandler(new BrowseButtonEvent(this, target, fileFilter, textBoxEditMode).Event); } + [Obsolete("Please specify textBoxEditMode")] protected void ConnectBrowseFolder(string browseButton, string target) { - ConnectBrowseFolder(browseButton, target, "${res:Dialog.ProjectOptions.SelectFolderTitle}"); + ConnectBrowseFolder(browseButton, target, TextBoxEditMode.EditEvaluatedProperty); } + [Obsolete("Please specify textBoxEditMode")] protected void ConnectBrowseFolder(string browseButton, string target, string description) + { + ConnectBrowseFolder(browseButton, target, description, TextBoxEditMode.EditEvaluatedProperty); + } + protected void ConnectBrowseFolder(string browseButton, string target, TextBoxEditMode textBoxEditMode) + { + ConnectBrowseFolder(browseButton, target, "${res:Dialog.ProjectOptions.SelectFolderTitle}", textBoxEditMode); + } + protected void ConnectBrowseFolder(string browseButton, string target, string description, TextBoxEditMode textBoxEditMode) { if (ControlDictionary[browseButton] == null) { MessageService.ShowError(browseButton + " not found!"); @@ -128,7 +145,7 @@ namespace ICSharpCode.SharpDevelop.Gui return; } - ControlDictionary[browseButton].Click += new EventHandler(new BrowseFolderEvent(this, target, description).Event); + ControlDictionary[browseButton].Click += new EventHandler(new BrowseFolderEvent(this, target, description, textBoxEditMode).Event); } protected class BrowseButtonEvent @@ -136,12 +153,20 @@ namespace ICSharpCode.SharpDevelop.Gui AbstractOptionPanel panel; string target; string filter; + TextBoxEditMode textBoxEditMode; + [Obsolete("specify textBoxEditMode")] public BrowseButtonEvent(AbstractOptionPanel panel, string target, string filter) + : this(panel, target, filter, TextBoxEditMode.EditEvaluatedProperty) + { + } + + public BrowseButtonEvent(AbstractOptionPanel panel, string target, string filter, TextBoxEditMode textBoxEditMode) { this.panel = panel; this.filter = filter; this.target = target; + this.textBoxEditMode = textBoxEditMode; } public void Event(object sender, EventArgs e) @@ -155,7 +180,11 @@ namespace ICSharpCode.SharpDevelop.Gui if (panel.baseDirectory != null) { file = FileUtility.GetRelativePath(panel.baseDirectory, file); } - panel.ControlDictionary[target].Text = file; + if (textBoxEditMode == TextBoxEditMode.EditEvaluatedProperty) { + panel.ControlDictionary[target].Text = file; + } else { + panel.ControlDictionary[target].Text = MSBuildInternals.Escape(file); + } } } } @@ -166,19 +195,30 @@ namespace ICSharpCode.SharpDevelop.Gui AbstractOptionPanel panel; string target; string description; + TextBoxEditMode textBoxEditMode; + [Obsolete("Do not use BrowseFolderEvent directly")] public BrowseFolderEvent(AbstractOptionPanel panel, string target, string description) + : this(panel, target, description, TextBoxEditMode.EditEvaluatedProperty) + { + } + + internal BrowseFolderEvent(AbstractOptionPanel panel, string target, string description, TextBoxEditMode textBoxEditMode) { this.panel = panel; this.description = description; this.target = target; + this.textBoxEditMode = textBoxEditMode; } public void Event(object sender, EventArgs e) { string startLocation = panel.baseDirectory; if (startLocation != null) { - startLocation = FileUtility.GetAbsolutePath(startLocation, panel.ControlDictionary[target].Text); + string text = panel.ControlDictionary[target].Text; + if (textBoxEditMode == TextBoxEditMode.EditRawProperty) + text = MSBuildInternals.Unescape(text); + startLocation = FileUtility.GetAbsolutePath(startLocation, text); } using (FolderBrowserDialog fdiag = FileService.CreateFolderBrowserDialog(description, startLocation)) { @@ -189,7 +229,11 @@ namespace ICSharpCode.SharpDevelop.Gui } if (!path.EndsWith("\\") && !path.EndsWith("/")) path += "\\"; - panel.ControlDictionary[target].Text = path; + if (textBoxEditMode == TextBoxEditMode.EditEvaluatedProperty) { + panel.ControlDictionary[target].Text = path; + } else { + panel.ControlDictionary[target].Text = MSBuildInternals.Escape(path); + } } } } diff --git a/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/AbstractBuildOptions.cs b/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/AbstractBuildOptions.cs index 48504ee94c..14dd786c19 100644 --- a/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/AbstractBuildOptions.cs +++ b/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/AbstractBuildOptions.cs @@ -22,9 +22,12 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels { helper.BindString(Get("baseIntermediateOutputPath"), "BaseIntermediateOutputPath", + TextBoxEditMode.EditRawProperty, delegate { return @"obj\"; } ).CreateLocationButton("baseIntermediateOutputPathTextBox"); - ConnectBrowseFolder("baseIntermediateOutputPathBrowseButton", "baseIntermediateOutputPathTextBox", "${res:Dialog.Options.PrjOptions.Configuration.FolderBrowserDescription}"); + ConnectBrowseFolder("baseIntermediateOutputPathBrowseButton", "baseIntermediateOutputPathTextBox", + "${res:Dialog.Options.PrjOptions.Configuration.FolderBrowserDescription}", + TextBoxEditMode.EditRawProperty); } protected void InitIntermediateOutputPath() @@ -32,6 +35,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels ConfigurationGuiBinding binding = helper.BindString( Get("intermediateOutputPath"), "IntermediateOutputPath", + TextBoxEditMode.EditRawProperty, delegate { return Path.Combine(helper.GetProperty("BaseIntermediateOutputPath", @"obj\", true), helper.Configuration); @@ -39,19 +43,23 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels ); binding.DefaultLocation = PropertyStorageLocations.ConfigurationSpecific; binding.CreateLocationButton("intermediateOutputPathTextBox"); - ConnectBrowseFolder("intermediateOutputPathBrowseButton", "intermediateOutputPathTextBox", "${res:Dialog.Options.PrjOptions.Configuration.FolderBrowserDescription}"); + ConnectBrowseFolder("intermediateOutputPathBrowseButton", + "intermediateOutputPathTextBox", + "${res:Dialog.Options.PrjOptions.Configuration.FolderBrowserDescription}", + TextBoxEditMode.EditRawProperty); } protected void InitOutputPath() { - helper.BindString("outputPathTextBox", "OutputPath").CreateLocationButton("outputPathTextBox"); - ConnectBrowseFolder("outputPathBrowseButton", "outputPathTextBox", "${res:Dialog.Options.PrjOptions.Configuration.FolderBrowserDescription}"); + helper.BindString("outputPathTextBox", "OutputPath", TextBoxEditMode.EditRawProperty) + .CreateLocationButton("outputPathTextBox"); + ConnectBrowseFolder("outputPathBrowseButton", "outputPathTextBox", "${res:Dialog.Options.PrjOptions.Configuration.FolderBrowserDescription}", TextBoxEditMode.EditRawProperty); } protected void InitXmlDoc() { ConfigurationGuiBinding b; - b = helper.BindString("xmlDocumentationTextBox", "DocumentationFile"); + b = helper.BindString("xmlDocumentationTextBox", "DocumentationFile", TextBoxEditMode.EditRawProperty); b.CreateLocationButton("xmlDocumentationCheckBox"); helper.Loaded += XmlDocHelperLoaded; XmlDocHelperLoaded(null, null); @@ -88,13 +96,13 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels new StringPair("3", "3"), new StringPair("4", "4")); ChooseStorageLocationButton locationButton = b.CreateLocationButtonInPanel("warningsGroupBox"); - b = helper.BindString("suppressWarningsTextBox", "NoWarn"); + b = helper.BindString("suppressWarningsTextBox", "NoWarn", TextBoxEditMode.EditEvaluatedProperty); b.RegisterLocationButton(locationButton); b = new WarningsAsErrorsBinding(this); helper.AddBinding("TreatWarningsAsErrors", b); locationButton = b.CreateLocationButtonInPanel("treatWarningsAsErrorsGroupBox"); - b = helper.BindString("specificWarningsTextBox", "WarningsAsErrors"); // must be saved AFTER TreatWarningsAsErrors + b = helper.BindString("specificWarningsTextBox", "WarningsAsErrors", TextBoxEditMode.EditEvaluatedProperty); // must be saved AFTER TreatWarningsAsErrors b.RegisterLocationButton(locationButton); EventHandler setDirty = delegate { diff --git a/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ApplicationSettings.cs b/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ApplicationSettings.cs index 43760dc2f4..06ccb76390 100644 --- a/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ApplicationSettings.cs +++ b/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ApplicationSettings.cs @@ -23,32 +23,36 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels InitializeHelper(); - ConnectBrowseButton("applicationIconBrowseButton", "applicationIconComboBox", "${res:SharpDevelop.FileFilter.Icons}|*.ico|${res:SharpDevelop.FileFilter.AllFiles}|*.*"); + ConnectBrowseButton("applicationIconBrowseButton", "applicationIconComboBox", + "${res:SharpDevelop.FileFilter.Icons}|*.ico|${res:SharpDevelop.FileFilter.AllFiles}|*.*", + TextBoxEditMode.EditEvaluatedProperty); // TODO: Suitable file filter. - ConnectBrowseButton("win32ResourceFileBrowseButton", "win32ResourceFileComboBox"); + ConnectBrowseButton("win32ResourceFileBrowseButton", "win32ResourceFileComboBox", + "${res:SharpDevelop.FileFilter.AllFiles}|*.*", + TextBoxEditMode.EditEvaluatedProperty); ConfigurationGuiBinding b; ChooseStorageLocationButton locationButton; - b = helper.BindString("assemblyNameTextBox", "AssemblyName"); + b = helper.BindString("assemblyNameTextBox", "AssemblyName", TextBoxEditMode.EditEvaluatedProperty); b.CreateLocationButton("assemblyNameTextBox"); Get("assemblyName").TextChanged += new EventHandler(RefreshOutputNameTextBox); - b = helper.BindString("rootNamespaceTextBox", "RootNamespace"); + b = helper.BindString("rootNamespaceTextBox", "RootNamespace", TextBoxEditMode.EditEvaluatedProperty); b.CreateLocationButton("rootNamespaceTextBox"); b = helper.BindEnum("outputTypeComboBox", "OutputType"); locationButton = b.CreateLocationButton("outputTypeComboBox"); Get("outputType").SelectedIndexChanged += new EventHandler(RefreshOutputNameTextBox); - b = helper.BindString("startupObjectComboBox", "StartupObject"); + b = helper.BindString("startupObjectComboBox", "StartupObject", TextBoxEditMode.EditEvaluatedProperty); b.RegisterLocationButton(locationButton); - b = helper.BindString("applicationIconComboBox", "ApplicationIcon"); + b = helper.BindString("applicationIconComboBox", "ApplicationIcon", TextBoxEditMode.EditEvaluatedProperty); Get("applicationIcon").TextChanged += new EventHandler(ApplicationIconComboBoxTextChanged); b.CreateLocationButton("applicationIconComboBox"); - b = helper.BindString("win32ResourceFileComboBox", "Win32Resource"); + b = helper.BindString("win32ResourceFileComboBox", "Win32Resource", TextBoxEditMode.EditEvaluatedProperty); b.CreateLocationButton("win32ResourceFileComboBox"); Get("projectFolder").Text = project.Directory; diff --git a/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/BuildEvents.cs b/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/BuildEvents.cs index 2280abbe4e..fe8a4564c5 100644 --- a/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/BuildEvents.cs +++ b/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/BuildEvents.cs @@ -22,17 +22,19 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels ConnectBrowseButton("preBuildEventBrowseButton", "preBuildEventTextBox", - "${res:SharpDevelop.FileFilter.AllFiles}|*.*"); + "${res:SharpDevelop.FileFilter.AllFiles}|*.*", + TextBoxEditMode.EditRawProperty); ConnectBrowseButton("postBuildEventBrowseButton", "postBuildEventTextBox", - "${res:SharpDevelop.FileFilter.AllFiles}|*.*"); + "${res:SharpDevelop.FileFilter.AllFiles}|*.*", + TextBoxEditMode.EditRawProperty); ConfigurationGuiBinding b; - b = helper.BindString("preBuildEventTextBox", "PreBuildEvent"); + b = helper.BindString("preBuildEventTextBox", "PreBuildEvent", TextBoxEditMode.EditRawProperty); b.CreateLocationButton("preBuildEventTextBox"); - b = helper.BindString("postBuildEventTextBox", "PostBuildEvent"); + b = helper.BindString("postBuildEventTextBox", "PostBuildEvent", TextBoxEditMode.EditRawProperty); b.CreateLocationButton("postBuildEventTextBox"); b = helper.BindEnum("runPostBuildEventComboBox", "RunPostBuildEvent"); diff --git a/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/DebugOptions.cs b/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/DebugOptions.cs index 63369e270f..7788b0a3ab 100644 --- a/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/DebugOptions.cs +++ b/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/DebugOptions.cs @@ -17,8 +17,11 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels public override void LoadPanelContents() { SetupFromXmlResource("ProjectOptions.DebugOptions.xfrm"); - ConnectBrowseButton("startExternalProgramBrowseButton", "startExternalProgramTextBox", "${res:SharpDevelop.FileFilter.ExecutableFiles}|*.exe;*.com;*.pif;*.bat;*.cmd"); - ConnectBrowseFolder("workingDirectoryBrowseButton", "workingDirectoryTextBox"); + ConnectBrowseButton("startExternalProgramBrowseButton", "startExternalProgramTextBox", + "${res:SharpDevelop.FileFilter.ExecutableFiles}|*.exe;*.com;*.pif;*.bat;*.cmd", + TextBoxEditMode.EditEvaluatedProperty); + ConnectBrowseFolder("workingDirectoryBrowseButton", "workingDirectoryTextBox", + TextBoxEditMode.EditEvaluatedProperty); InitializeHelper(); @@ -32,20 +35,20 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels b.DefaultLocation = PropertyStorageLocations.ConfigurationSpecific; locationButton = b.CreateLocationButtonInPanel("startActionGroupBox"); - b = helper.BindString("startExternalProgramTextBox", "StartProgram"); + b = helper.BindString("startExternalProgramTextBox", "StartProgram", TextBoxEditMode.EditEvaluatedProperty); b.DefaultLocation = PropertyStorageLocations.ConfigurationSpecific; b.RegisterLocationButton(locationButton); - b = helper.BindString("startBrowserInURLTextBox", "StartURL"); + b = helper.BindString("startBrowserInURLTextBox", "StartURL", TextBoxEditMode.EditEvaluatedProperty); b.DefaultLocation = PropertyStorageLocations.ConfigurationSpecific; b.RegisterLocationButton(locationButton); Get("startExternalProgram").CheckedChanged += UpdateEnabledStates; Get("startBrowserInURL").CheckedChanged += UpdateEnabledStates; - b = helper.BindString("commandLineArgumentsTextBox", "StartArguments"); + b = helper.BindString("commandLineArgumentsTextBox", "StartArguments", TextBoxEditMode.EditEvaluatedProperty); locationButton = b.CreateLocationButtonInPanel("startOptionsGroupBox"); - b = helper.BindString("workingDirectoryTextBox", "StartWorkingDirectory"); + b = helper.BindString("workingDirectoryTextBox", "StartWorkingDirectory", TextBoxEditMode.EditEvaluatedProperty); b.RegisterLocationButton(locationButton); UpdateEnabledStates(this, EventArgs.Empty); diff --git a/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/Signing.cs b/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/Signing.cs index b99469900f..19809a2013 100644 --- a/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/Signing.cs +++ b/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/Signing.cs @@ -35,7 +35,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels keyFile = Get("keyFile"); - b = helper.BindString(keyFile, "AssemblyOriginatorKeyFile"); + b = helper.BindString(keyFile, "AssemblyOriginatorKeyFile", TextBoxEditMode.EditEvaluatedProperty); b.RegisterLocationButton(locationButton); FindKeys(baseDirectory); if (keyFile.Text.Length > 0) { @@ -96,7 +96,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels void BrowseKeyFile() { keyFile.SelectedIndex = -1; - new BrowseButtonEvent(this, "keyFileComboBox", "${res:SharpDevelop.FileFilter.KeyFiles} (" + KeyFileExtensions + ")|" + KeyFileExtensions + "|${res:SharpDevelop.FileFilter.AllFiles}|*.*").Event(this, EventArgs.Empty); + new BrowseButtonEvent(this, "keyFileComboBox", "${res:SharpDevelop.FileFilter.KeyFiles} (" + KeyFileExtensions + ")|" + KeyFileExtensions + "|${res:SharpDevelop.FileFilter.AllFiles}|*.*", TextBoxEditMode.EditEvaluatedProperty).Event(this, EventArgs.Empty); } void CreateKeyFile() diff --git a/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/Commands/ReferenceFolderNodeCommands.cs b/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/Commands/ReferenceFolderNodeCommands.cs index 90665ad156..fd4d8badf9 100644 --- a/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/Commands/ReferenceFolderNodeCommands.cs +++ b/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/Commands/ReferenceFolderNodeCommands.cs @@ -94,7 +94,7 @@ namespace ICSharpCode.SharpDevelop.Project.Commands credential = dialog.Credential; } else { retry = false; - } + } } } else { throw ex; @@ -117,7 +117,7 @@ namespace ICSharpCode.SharpDevelop.Project.Commands // Do not overwrite existing web references. refDialog.WebReference.Name = WebReference.GetReferenceName(refDialog.WebReference.WebReferencesDirectory, refDialog.WebReference.Name); refDialog.WebReference.Save(); - + foreach (ProjectItem item in refDialog.WebReference.Items) { ProjectService.AddProjectItem(node.Project, item); } @@ -129,7 +129,7 @@ namespace ICSharpCode.SharpDevelop.Project.Commands node.Project.Save(); } - } + } } } @@ -178,4 +178,19 @@ namespace ICSharpCode.SharpDevelop.Project.Commands return webReferencesNode; } } + + public class RefreshReference : AbstractMenuCommand + { + public override void Run() + { + ReferenceNode node = Owner as ReferenceNode; + if (node != null) + { + ReferenceProjectItem item = node.ReferenceProjectItem; + if (item != null) { + ParserService.RefreshProjectContentForReference(item); + } + } + } + } } diff --git a/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/TreeNodes/ReferenceNode.cs b/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/TreeNodes/ReferenceNode.cs index c0a690089e..91a9798278 100644 --- a/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/TreeNodes/ReferenceNode.cs +++ b/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/TreeNodes/ReferenceNode.cs @@ -17,7 +17,7 @@ namespace ICSharpCode.SharpDevelop.Project public ReferenceProjectItem ReferenceProjectItem { get { - return ReferenceProjectItem; + return referenceProjectItem; } } diff --git a/src/Main/Base/Project/Src/Project/ConfigurationGuiBinding.cs b/src/Main/Base/Project/Src/Project/ConfigurationGuiBinding.cs index c716d3730c..4e95f258d0 100644 --- a/src/Main/Base/Project/Src/Project/ConfigurationGuiBinding.cs +++ b/src/Main/Base/Project/Src/Project/ConfigurationGuiBinding.cs @@ -41,6 +41,10 @@ namespace ICSharpCode.SharpDevelop.Project } } + /// + /// Gets if the value should be evaluated when loading the property and escaped + /// when saving. The default value is true. + /// public bool TreatPropertyValueAsLiteral { get { return treatPropertyValueAsLiteral; } set { treatPropertyValueAsLiteral = value; } diff --git a/src/Main/Base/Project/Src/Project/ConfigurationGuiHelper.cs b/src/Main/Base/Project/Src/Project/ConfigurationGuiHelper.cs index 8ef801df04..f80f3b7027 100644 --- a/src/Main/Base/Project/Src/Project/ConfigurationGuiHelper.cs +++ b/src/Main/Base/Project/Src/Project/ConfigurationGuiHelper.cs @@ -17,6 +17,26 @@ using ICSharpCode.SharpDevelop.Gui; namespace ICSharpCode.SharpDevelop.Project { + /// + /// Specifies whether the user enters the property value or the MSBuild code for + /// the property value. + /// + public enum TextBoxEditMode + { + /// + /// The user edits the MSBuild property value. It is not evaluated on loading, + /// and not escaped when saving. + /// The user can use MSBuild properties with $() in the text box. + /// + EditRawProperty, + /// + /// The user edits the property. When loading the value, it is evaluated; + /// when saving the value, it is escaped. + /// The user cannot use MSBuild properties with $() because the $ will be escaped. + /// + EditEvaluatedProperty + } + /// /// Class that helps connecting configuration GUI controls to MsBuild properties. /// @@ -232,20 +252,37 @@ namespace ICSharpCode.SharpDevelop.Project #region Bind string to TextBox or ComboBox static Func GetEmptyString = delegate { return ""; }; + [Obsolete("Please explicitly specify textBoxEditMode")] public ConfigurationGuiBinding BindString(string control, string property) { - return BindString(controlDictionary[control], property, GetEmptyString); + return BindString(controlDictionary[control], property, TextBoxEditMode.EditEvaluatedProperty, GetEmptyString); } + [Obsolete("Please explicitly specify textBoxEditMode")] public ConfigurationGuiBinding BindString(Control control, string property) { - return BindString(control, property, GetEmptyString); + return BindString(control, property, TextBoxEditMode.EditEvaluatedProperty, GetEmptyString); } - public ConfigurationGuiBinding BindString(Control control, string property, Func defaultValueProvider) + public ConfigurationGuiBinding BindString(string control, string property, TextBoxEditMode textBoxEditMode) + { + return BindString(controlDictionary[control], property, textBoxEditMode, GetEmptyString); + } + + public ConfigurationGuiBinding BindString(Control control, string property, TextBoxEditMode textBoxEditMode) + { + return BindString(control, property, textBoxEditMode, GetEmptyString); + } + + public ConfigurationGuiBinding BindString(Control control, string property, TextBoxEditMode textBoxEditMode, Func defaultValueProvider) { if (control is TextBoxBase || control is ComboBox) { SimpleTextBinding binding = new SimpleTextBinding(control, defaultValueProvider); + if (textBoxEditMode == TextBoxEditMode.EditEvaluatedProperty) { + binding.TreatPropertyValueAsLiteral = true; + } else { + binding.TreatPropertyValueAsLiteral = false; + } AddBinding(property, binding); control.TextChanged += ControlValueChanged; if (control is ComboBox) { diff --git a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Implementations/CompoundClass.cs b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Implementations/CompoundClass.cs index a823ffd228..d4d1007dad 100644 --- a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Implementations/CompoundClass.cs +++ b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Implementations/CompoundClass.cs @@ -35,8 +35,10 @@ namespace ICSharpCode.SharpDevelop.Dom /// /// Creates a new CompoundClass with the specified class as first part. /// - public CompoundClass(IClass firstPart) : base(firstPart.CompilationUnit, firstPart.FullyQualifiedName) + public CompoundClass(IClass firstPart) : base(new DefaultCompilationUnit(firstPart.ProjectContent), firstPart.FullyQualifiedName) { + this.CompilationUnit.Classes.Add(this); + parts.Add(firstPart); UpdateInformationFromParts(); } @@ -48,15 +50,23 @@ namespace ICSharpCode.SharpDevelop.Dom { // Common for all parts: this.ClassType = parts[0].ClassType; - this.CompilationUnit.FileName = parts[0].CompilationUnit.FileName; - this.Region = parts[0].Region; ModifierEnum modifier = ModifierEnum.None; const ModifierEnum defaultClassVisibility = ModifierEnum.Internal; this.BaseTypes.Clear(); this.Attributes.Clear(); + + string shortestFileName = null; + foreach (IClass part in parts) { + if (!string.IsNullOrEmpty(part.CompilationUnit.FileName)) { + if (shortestFileName == null || part.CompilationUnit.FileName.Length < shortestFileName.Length) { + shortestFileName = part.CompilationUnit.FileName; + this.Region = part.Region; + } + } + if ((part.Modifiers & ModifierEnum.VisibilityMask) != defaultClassVisibility) { modifier |= part.Modifiers; } else { @@ -71,6 +81,7 @@ namespace ICSharpCode.SharpDevelop.Dom this.Attributes.Add(attribute); } } + this.CompilationUnit.FileName = shortestFileName; if ((modifier & ModifierEnum.VisibilityMask) == ModifierEnum.None) { modifier |= defaultClassVisibility; } diff --git a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/NRefactoryResolver.cs b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/NRefactoryResolver.cs index 8c477990af..e5ccf6ef03 100644 --- a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/NRefactoryResolver.cs +++ b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/NRefactoryResolver.cs @@ -23,7 +23,7 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver IClass callingClass; IMember callingMember; ICSharpCode.NRefactory.Visitors.LookupTableVisitor lookupTableVisitor; - IProjectContent projectContent = null; + IProjectContent projectContent; NR.SupportedLanguage language; @@ -41,6 +41,8 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver return projectContent; } set { + if (value == null) + throw new ArgumentNullException("value"); projectContent = value; } } @@ -1012,6 +1014,8 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver IClass GetPrimitiveClass(string systemType, string newName) { IClass c = projectContent.GetClass(systemType, 0); + if (c == null) + return null; DefaultClass c2 = new DefaultClass(c.CompilationUnit, newName); c2.ClassType = c.ClassType; c2.Modifiers = c.Modifiers; @@ -1030,14 +1034,16 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver if (language == NR.SupportedLanguage.VBNet) { foreach (KeyValuePair pair in TypeReference.PrimitiveTypesVB) { if ("System." + pair.Key != pair.Value) { - result.Add(GetPrimitiveClass(pair.Value, pair.Key)); + IClass c = GetPrimitiveClass(pair.Value, pair.Key); + if (c != null) result.Add(c); } } result.Add("Global"); result.Add("New"); } else { foreach (KeyValuePair pair in TypeReference.PrimitiveTypesCSharp) { - result.Add(GetPrimitiveClass(pair.Value, pair.Key)); + IClass c = GetPrimitiveClass(pair.Value, pair.Key); + if (c != null) result.Add(c); } } ParseInformation parseInfo = HostCallback.GetParseInformation(fileName);