From fdecdc68e98d992cf73674de33f73300e6df751a Mon Sep 17 00:00:00 2001 From: kudzu_cp <6d05c8c8ef5431987001abfdb2eadc9593ac9498> Date: Thu, 14 Jun 2012 18:13:19 +0000 Subject: [PATCH] --- source2/Compiler/Cosmos.XSharp/Parser.cs | 15 ++++++++++++++- source2/Users/Matthijs/MatthijsPlayground/Test.xs | 3 +++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/source2/Compiler/Cosmos.XSharp/Parser.cs b/source2/Compiler/Cosmos.XSharp/Parser.cs index 287ec6aa5..e904e8995 100644 --- a/source2/Compiler/Cosmos.XSharp/Parser.cs +++ b/source2/Compiler/Cosmos.XSharp/Parser.cs @@ -103,6 +103,19 @@ namespace Cosmos.Compiler.XSharp { protected enum CharType { WhiteSpace, Identifier, Symbol }; protected void Parse() { + ParseText(); + Parse2(); + mTokens = new TokenList(mTokensTemp); + } + + // Rescan token patterns + protected void Parse2() { + for (int i = 0; i < mTokensTemp.Count; i++) { + } + } + + // Initial Parse to convert text to tokens + protected void ParseText() { char xLastChar = ' '; CharType xLastCharType = CharType.WhiteSpace; char xChar; @@ -131,13 +144,13 @@ namespace Cosmos.Compiler.XSharp { if (mStart < mData.Length) { NewToken(ref i); } - mTokens = new TokenList(mTokensTemp); } public Parser(string aData, bool aIncludeWhiteSpace) { mData = aData; mIncludeWhiteSpace = aIncludeWhiteSpace; mAllWhitespace = true; + Parse(); } } diff --git a/source2/Users/Matthijs/MatthijsPlayground/Test.xs b/source2/Users/Matthijs/MatthijsPlayground/Test.xs index 402611d3b..14e8ac7c6 100644 --- a/source2/Users/Matthijs/MatthijsPlayground/Test.xs +++ b/source2/Users/Matthijs/MatthijsPlayground/Test.xs @@ -38,6 +38,9 @@ InterruptHandler TracerEntry { PushAll + # Temp Test + EAX = $FF + # Save current ESP so we can look at the results of PushAll later PushAllPtr = ESP