This repository has been archived by the owner on May 30, 2022. It is now read-only.
forked from CosmosOS/XSharp
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kudzu
committed
Jun 5, 2019
1 parent
a657e13
commit 7b16f75
Showing
42 changed files
with
174 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
2019 Work Plan | ||
|
||
1) Reorg file tree (Kudzu) | ||
-ARM space | ||
2) Colorizer - based on existing parser. | ||
3) Get Each .asm emitting same as Gen1 | ||
-Swap out G1 for G2 in Cosmos. | ||
|
||
-Finalize and complete all emitters | ||
-Emit DS for input to Cosmos via Gen2 | ||
-Directories | ||
-XSharp.Build -> Common\Build (Cosmos.Common.Build NS) | ||
-XSharp | ||
-XSharp | ||
-XSC | ||
-VS | ||
-.xs Colorizing | ||
-Use same parser as we have now | ||
|
||
-X#/ARM, X#/86 | ||
|
||
-Kill Gen1 | ||
-Integerate G2 for Cosmos and IL2CPU | ||
|
||
-Tree for source | ||
-ie XSharp stuff in an XSharp folder, spruce, etc. | ||
-Tree: | ||
Common - Need a name... Build stuff shared with Cosmos and other | ||
-Currently XSharp.Build - keep this or something else? | ||
|
||
Spruce | ||
XSharp | ||
VS - Stuff specific for VS 2019 | ||
|
||
-Implement "X# Projects" | ||
-No real need for .xsproj given how VS Code works? | ||
-Task that when F5 is used, can build and package ISO like Cosmos and boot it. | ||
-Share code from Cosmos | ||
-Where does the common code belong? | ||
-new Common subdir in source? Named what? | ||
|
||
=========================================== | ||
|
||
VS Code | ||
-.xs formatting | ||
|
||
-DebugStub | ||
-Share with IL2CPU and Cosmos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
138 changes: 69 additions & 69 deletions
138
source/XSharp/Tokens/Operators.cs → source/XSharp/XSharp/Tokens/Operators.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,69 @@ | ||
using Spruce.Tokens; | ||
|
||
namespace XSharp.Tokens | ||
{ | ||
public class OpComment : StringList | ||
{ | ||
// Comments require a space after. Prevents future conflicts with 3 char ones like Literal | ||
public OpComment() : base(@"//") | ||
{ | ||
} | ||
} | ||
|
||
public class OpLiteral : StringList | ||
{ | ||
public OpLiteral() : base(@"//!") | ||
{ | ||
} | ||
} | ||
|
||
public class OpCompare : StringList | ||
{ | ||
public OpCompare() : base("< > = <= >= !=".Split(' ')) | ||
{ | ||
} | ||
} | ||
|
||
public class OpMath : StringList | ||
{ | ||
public OpMath() : base("+= -= *= /= %=".Split(' ')) | ||
{ | ||
} | ||
} | ||
|
||
// Only used for bitwise ops with two parameters | ||
public class OpBitwise : StringList | ||
{ | ||
public OpBitwise() : base("& | ^".Split(' ')) | ||
{ | ||
} | ||
} | ||
|
||
public class OpIncDec : StringList | ||
{ | ||
public OpIncDec() : base("++ --".Split(' ')) | ||
{ | ||
} | ||
} | ||
|
||
public class OpShift : StringList | ||
{ | ||
public OpShift() : base("<< >>".Split(' ')) | ||
{ | ||
} | ||
} | ||
|
||
public class OpRotate : StringList | ||
{ | ||
public OpRotate() : base("~> <~".Split(' ')) | ||
{ | ||
} | ||
} | ||
|
||
public class OpPureComparators : StringList | ||
{ | ||
public OpPureComparators() : base("=0 !0 0 > < >= <= = !".Split(' ')) | ||
{ | ||
} | ||
} | ||
} | ||
using Spruce.Tokens; | ||
|
||
namespace XSharp.Tokens | ||
{ | ||
public class OpComment : StringList | ||
{ | ||
// Comments require a space after. Prevents future conflicts with 3 char ones like Literal | ||
public OpComment() : base(@"//") | ||
{ | ||
} | ||
} | ||
|
||
public class OpLiteral : StringList | ||
{ | ||
public OpLiteral() : base(@"//!") | ||
{ | ||
} | ||
} | ||
|
||
public class OpCompare : StringList | ||
{ | ||
public OpCompare() : base("< > = <= >= !=".Split(' ')) | ||
{ | ||
} | ||
} | ||
|
||
public class OpMath : StringList | ||
{ | ||
public OpMath() : base("+= -= *= /= %=".Split(' ')) | ||
{ | ||
} | ||
} | ||
|
||
// Only used for bitwise ops with two parameters | ||
public class OpBitwise : StringList | ||
{ | ||
public OpBitwise() : base("& | ^".Split(' ')) | ||
{ | ||
} | ||
} | ||
|
||
public class OpIncDec : StringList | ||
{ | ||
public OpIncDec() : base("++ --".Split(' ')) | ||
{ | ||
} | ||
} | ||
|
||
public class OpShift : StringList | ||
{ | ||
public OpShift() : base("<< >>".Split(' ')) | ||
{ | ||
} | ||
} | ||
|
||
public class OpRotate : StringList | ||
{ | ||
public OpRotate() : base("~> <~".Split(' ')) | ||
{ | ||
} | ||
} | ||
|
||
public class OpPureComparators : StringList | ||
{ | ||
public OpPureComparators() : base("=0 !0 0 > < >= <= = !".Split(' ')) | ||
{ | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
106 changes: 53 additions & 53 deletions
106
source/XSharp/Tokens/Variable.cs → source/XSharp/XSharp/Tokens/Variable.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,53 @@ | ||
using XSharp.x86.Params; | ||
|
||
namespace XSharp.Tokens | ||
{ | ||
public class Variable : Identifier | ||
{ | ||
public Variable() | ||
{ | ||
mFirstChars = "."; | ||
} | ||
|
||
protected override bool CheckChar(int aLocalPos, char aChar) | ||
{ | ||
// The name of the variable must start with a alphabet | ||
if (aLocalPos == 1) | ||
{ | ||
return Chars.Alpha.IndexOf(aChar) > -1; | ||
} | ||
return base.CheckChar(aLocalPos, aChar); | ||
} | ||
|
||
protected override object Transform(string aText) | ||
{ | ||
return new Address(aText.Substring(1)); | ||
} | ||
} | ||
|
||
public class VariableAddress : Identifier | ||
{ | ||
public VariableAddress() | ||
{ | ||
mFirstChars = "@"; | ||
} | ||
|
||
protected override bool CheckChar(int aLocalPos, char aChar) | ||
{ | ||
switch (aLocalPos) | ||
{ | ||
case 1: | ||
return aChar == '.'; | ||
|
||
case 2: | ||
return Chars.Alpha.IndexOf(aChar) > -1; | ||
} | ||
return base.CheckChar(aLocalPos, aChar); | ||
} | ||
|
||
protected override object Transform(string aText) | ||
{ | ||
return aText.Substring(2); | ||
} | ||
} | ||
} | ||
using XSharp.x86.Params; | ||
|
||
namespace XSharp.Tokens | ||
{ | ||
public class Variable : Identifier | ||
{ | ||
public Variable() | ||
{ | ||
mFirstChars = "."; | ||
} | ||
|
||
protected override bool CheckChar(int aLocalPos, char aChar) | ||
{ | ||
// The name of the variable must start with a alphabet | ||
if (aLocalPos == 1) | ||
{ | ||
return Chars.Alpha.IndexOf(aChar) > -1; | ||
} | ||
return base.CheckChar(aLocalPos, aChar); | ||
} | ||
|
||
protected override object Transform(string aText) | ||
{ | ||
return new Address(aText.Substring(1)); | ||
} | ||
} | ||
|
||
public class VariableAddress : Identifier | ||
{ | ||
public VariableAddress() | ||
{ | ||
mFirstChars = "@"; | ||
} | ||
|
||
protected override bool CheckChar(int aLocalPos, char aChar) | ||
{ | ||
switch (aLocalPos) | ||
{ | ||
case 1: | ||
return aChar == '.'; | ||
|
||
case 2: | ||
return Chars.Alpha.IndexOf(aChar) > -1; | ||
} | ||
return base.CheckChar(aLocalPos, aChar); | ||
} | ||
|
||
protected override object Transform(string aText) | ||
{ | ||
return aText.Substring(2); | ||
} | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters