Introduce new MONO_X509_ALIAS conditional and use it in SslStream.cs.
[mono.git] / mcs / ilasm / parser / ILParser.jay
index 8f994051c9abc1c6e40e55aca9c53effc5bd5b71..63ddee82bfa286db0e183495ef80d6a93e4d5b90 100644 (file)
@@ -480,6 +480,9 @@ namespace Mono.ILASM {
 %token K_OFF\r
 %token K_FORWARDER\r
 %token K_CHARMAPERROR\r
+%token K_LEGACY\r
+%token K_LIBRARY\r
+%token K_AUTO\r
 \r
 /* end generated */\r
 \r
@@ -3149,9 +3152,9 @@ assembly_all              : assembly_head OPEN_BRACE assembly_decls CLOSE_BRACE
                          }\r
                        ;\r
 \r
-assembly_head          : D_ASSEMBLY asm_attr slashed_name\r
+assembly_head          : D_ASSEMBLY legacylibrary_opt asm_attr slashed_name\r
                           {\r
-                                codegen.SetThisAssembly ((string) $3, (PEAPI.AssemAttr) $2);\r
+                                codegen.SetThisAssembly ((string) $4, (PEAPI.AssemAttr) $3);\r
                                 codegen.CurrentCustomAttrTarget = codegen.ThisAssembly;\r
                                codegen.CurrentDeclSecurityTarget = codegen.ThisAssembly;\r
                           }\r
@@ -3211,19 +3214,19 @@ asm_or_ref_decl         : D_PUBLICKEY ASSIGN bytes_list
 assemblyref_all                : assemblyref_head OPEN_BRACE assemblyref_decls CLOSE_BRACE\r
                        ;\r
 \r
-assemblyref_head       : D_ASSEMBLY K_EXTERN asm_attr slashed_name\r
+assemblyref_head       : D_ASSEMBLY K_EXTERN legacylibrary_opt asm_attr slashed_name\r
                           {\r
                                 System.Reflection.AssemblyName asmb_name = \r
                                        new System.Reflection.AssemblyName ();\r
-                               asmb_name.Name = (string) $4;\r
-                               codegen.BeginAssemblyRef ((string) $4, asmb_name, (PEAPI.AssemAttr) $3);\r
+                               asmb_name.Name = (string) $5;\r
+                               codegen.BeginAssemblyRef ((string) $5, asmb_name, (PEAPI.AssemAttr) $4);\r
                           }\r
-                       | D_ASSEMBLY K_EXTERN asm_attr slashed_name K_AS slashed_name\r
+                       | D_ASSEMBLY K_EXTERN legacylibrary_opt asm_attr slashed_name K_AS slashed_name\r
                           {\r
                                 System.Reflection.AssemblyName asmb_name = \r
                                        new System.Reflection.AssemblyName ();\r
-                               asmb_name.Name = (string) $4;\r
-                               codegen.BeginAssemblyRef ((string) $6, asmb_name, (PEAPI.AssemAttr) $3);\r
+                               asmb_name.Name = (string) $5;\r
+                               codegen.BeginAssemblyRef ((string) $7, asmb_name, (PEAPI.AssemAttr) $4);\r
                           }\r
                        ;\r
 \r
@@ -3258,6 +3261,7 @@ assemblyref_decl  : D_VER int32 COLON int32 COLON int32 COLON int32
                                 if (codegen.CurrentCustomAttrTarget != null)\r
                                         codegen.CurrentCustomAttrTarget.AddCustomAttribute ((CustomAttr) $1);\r
                           }\r
+            | K_AUTO  /* MS ilasm uses this keyword to lookup the specified assembly in the GAC and embeds its attributes, we just ignore it */\r
                        ;\r
 \r
 exptype_all            : exptype_head OPEN_BRACE exptype_decls CLOSE_BRACE\r
@@ -3424,6 +3428,10 @@ semicolon_opt
                        | SEMICOLON\r
                        ;\r
 \r
+legacylibrary_opt      : /* empty */\r
+                                       | K_LEGACY K_LIBRARY  /* MS ilasm has these keywords for backwards compatibility, we just ignore them */\r
+                                       ;\r
+\r
 %%\r
 \r
 }\r