Author: raja
Date: 2005-04-27 02:11:14 -0400 (Wed, 27 Apr 2005)
New Revision: 43638

Modified:
   trunk/mcs/ilasm/scanner/ChangeLog
   trunk/mcs/ilasm/scanner/ILTokenizer.cs
Log:
* ILTokenizer.cs (GetNextToken): Handle 'tail.' and 'unaligned.' instructions.


Modified: trunk/mcs/ilasm/scanner/ChangeLog
===================================================================
--- trunk/mcs/ilasm/scanner/ChangeLog   2005-04-27 02:47:16 UTC (rev 43637)
+++ trunk/mcs/ilasm/scanner/ChangeLog   2005-04-27 06:11:14 UTC (rev 43638)
@@ -1,3 +1,8 @@
+2005-04-27  Raja R Harinath  <[EMAIL PROTECTED]>
+
+       * ILTokenizer.cs (GetNextToken): Handle 'tail.' and 'unaligned.'
+       instructions.
+
 2004-04-26  Ankit Jain  <[EMAIL PROTECTED]>
 
        * ILTokenizer.cs (ILTokenizer.GetNextToken): Advance reader to look at

Modified: trunk/mcs/ilasm/scanner/ILTokenizer.cs
===================================================================
--- trunk/mcs/ilasm/scanner/ILTokenizer.cs      2005-04-27 02:47:16 UTC (rev 
43637)
+++ trunk/mcs/ilasm/scanner/ILTokenizer.cs      2005-04-27 06:11:14 UTC (rev 
43638)
@@ -214,15 +214,15 @@
                                                         reader.MarkLocation ();
                                                         reader.Read ();
                                                         next = reader.Peek ();
-                                                        reader.Unread ('.');
                                                         if (IsIdChar ((char) 
next)) {
                                                                 string opTail 
= BuildId ();
-                                                                string 
full_str = String.Format ("{0}{1}", val, opTail);
+                                                                string 
full_str = String.Format ("{0}.{1}", val, opTail);
                                                                 opcode = 
InstrTable.GetToken (full_str);
 
                                                                 if (opcode == 
null) {
                                                                         if 
(strBuilder.TokenId != Token.ID) {
                                                                                
 reader.Unread (opTail.ToCharArray ());
+                                                                               
reader.Unread ('.');
                                                                                
 reader.RestoreLocation ();
                                                                                
 res.val = val;
                                                                         } else 
{
@@ -236,7 +236,14 @@
                                                                 }
 
                                                         } else if 
(Char.IsWhiteSpace ((char) next)) {
-                                                                val += '.';
+                                                               // Handle 
'tail.' and 'unaligned.'
+                                                               opcode = 
InstrTable.GetToken (val + ".");
+                                                               if (opcode != 
null) {
+                                                                       res = 
opcode;
+                                                                       break;
+                                                               }
+                                                               // Let the 
parser handle the dot
+                                                               reader.Unread 
('.');
                                                         }
                                                 }
                                                 opcode = InstrTable.GetToken 
(val);

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to