-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setting up structures and naming conventions for eventually breaking …
…down SELECT clause into expressions. #6
- Loading branch information
1 parent
c2dc132
commit ef0be6c
Showing
31 changed files
with
442 additions
and
82 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
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
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
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
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
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
16 changes: 16 additions & 0 deletions
16
TSQL_Parser/TSQL_Parser/Elements/Parsers/TSQLSelectColumnParser.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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace TSQL.Elements.Parsers | ||
{ | ||
internal class TSQLSelectColumnParser | ||
{ | ||
public TSQLSelectColumn Parse(ITSQLTokenizer tokenizer) | ||
{ | ||
return null; | ||
} | ||
} | ||
} |
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
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
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 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
using TSQL.Tokens; | ||
|
||
namespace TSQL.Elements | ||
{ | ||
public abstract class TSQLElement | ||
{ | ||
|
||
private readonly List<TSQLToken> _tokens = new List<TSQLToken>(); | ||
|
||
public List<TSQLToken> Tokens | ||
{ | ||
get | ||
{ | ||
return _tokens; | ||
} | ||
} | ||
|
||
public int BeginPosition | ||
{ | ||
get | ||
{ | ||
return Tokens.First().BeginPosition; | ||
} | ||
} | ||
|
||
public int EndPosition | ||
{ | ||
get | ||
{ | ||
return Tokens.Last().EndPosition; | ||
} | ||
} | ||
|
||
public int Length | ||
{ | ||
get | ||
{ | ||
return EndPosition - BeginPosition + 1; | ||
} | ||
} | ||
} | ||
} |
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,13 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace TSQL.Elements | ||
{ | ||
public class TSQLPredicate : TSQLElement | ||
{ | ||
|
||
} | ||
} |
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,29 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
using TSQL.Expressions; | ||
|
||
namespace TSQL.Elements | ||
{ | ||
public class TSQLSelectColumn : TSQLElement | ||
{ | ||
public string Alias | ||
{ | ||
get | ||
{ | ||
return null; | ||
} | ||
} | ||
|
||
public TSQLExpression Expression | ||
{ | ||
get | ||
{ | ||
return null; | ||
} | ||
} | ||
} | ||
} |
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,7 @@ | ||
namespace TSQL.Elements | ||
{ | ||
public class TSQLValues : TSQLElement | ||
{ | ||
|
||
} | ||
} |
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
25 changes: 25 additions & 0 deletions
25
TSQL_Parser/TSQL_Parser/Expressions/Parsers/TSQLExpressionFactory.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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
using TSQL.Tokens; | ||
|
||
namespace TSQL.Expressions.Parsers | ||
{ | ||
internal class TSQLExpressionFactory | ||
{ | ||
public TSQLExpression Parse(ITSQLTokenizer tokenizer) | ||
{ | ||
if (tokenizer.Current.IsKeyword(TSQLKeywords.CASE)) | ||
{ | ||
return new TSQLCaseExpressionParser().Parse(tokenizer); | ||
} | ||
else | ||
{ | ||
return null; | ||
} | ||
} | ||
} | ||
} |
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
Oops, something went wrong.