C# parsing custom hierarchical expression to hierarchical structure [closed]Abstract Factory ExperimentLarge...
The use of multiple foreign keys on same column in SQL Server
Are there any consumables that function as addictive (psychedelic) drugs?
Is there a familial term for apples and pears?
Calculus Optimization - Point on graph closest to given point
Email Account under attack (really) - anything I can do?
Can a German sentence have two subjects?
How do you conduct xenoanthropology after first contact?
Copenhagen passport control - US citizen
Prevent a directory in /tmp from being deleted
Why don't electron-positron collisions release infinite energy?
Chess with symmetric move-square
Do airline pilots ever risk not hearing communication directed to them specifically, from traffic controllers?
Why can't I see bouncing of a switch on an oscilloscope?
How to type dʒ symbol (IPA) on Mac?
declaring a variable twice in IIFE
Are white and non-white police officers equally likely to kill black suspects?
Example of a relative pronoun
The magic money tree problem
Concept of linear mappings are confusing me
N.B. ligature in Latex
Is there a minimum number of transactions in a block?
How to report a triplet of septets in NMR tabulation?
Why was the small council so happy for Tyrion to become the Master of Coin?
What are these boxed doors outside store fronts in New York?
C# parsing custom hierarchical expression to hierarchical structure [closed]
Abstract Factory ExperimentLarge message population designReturn IEnumerable<KeyValuePair> from a private method; use Dictionary or anon. type?Calculator using tokens of numbers and operatorsParsing US addresses without regular expression for performanceParsing cron expressionParsing and evaluating cron expressionSQL lexer in JavaScriptLeetcode 10: Regular Expression MatchingString to token vector for expression parsing
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
$begingroup$
I'm not good at English.
It's gonna be hard to read.
I apologize in advance.
I need expression parser for draw diagram(fault tree).
In order to do that I have to create data structure from custom expression
(((123-A1) AND 123-A2 OR 123-A3) AND ((123-A4 AND 123-A5) AND 123-A6 AND (123-A7)))
The above example was written roughly as I thought.
- In some cases, parentheses are used for each variable for readability.
- Read in order within the same parentheses.
- Read in order if there are no parentheses.
- Parentheses around the expression can be attached without meaning.
- Operators use only AND, OR parentheses use only (, ).
- I don't know which is the best way string to data structure.
- The depth and order of parentheses and.. anything are all important because eventually I need to draw Diagram.
____________AND____________
/
/ ___AND__
/ /
___OR__ __AND__
/ /
_AND__ __AND__
/ /
123-A1 123-A2 123-A3 123-A4 123-A5 123-A6 123-A7
Expression to Token
public class Token
{
public TokenType Type; // Operator, Parenthesis, Variable
public string Label;
public int Depth;
public int Group;
public Token(string label)
{
Label = label.Trim();
if (ExpressionParser.SupportedOperatorHashSet.Contains(label.ToUpper()))
{
Type = TokenType.Operator;
}
else if (ExpressionParser.SupportedParenthesesHashSet.Contains(label))
{
Type = TokenType.Parenthesis;
}
else
{
Type = TokenType.Variable;
}
}
}
public enum TokenType
{
Variable,
Operator,
Parenthesis
}
public static class ExpressionParser
{
private static Regex TokenRegex = new Regex(@"[()]|[dw-]+");
internal static readonly HashSet<string> SupportedOperatorHashSet = new HashSet<string>() { AndGate, OrGate };
internal static readonly HashSet<string> SupportedParenthesesHashSet = new HashSet<string>() { OpenParenthesis, CloseParenthesis };
private static readonly List<Token> TokenList = new List<Token>();
internal const string AndGate = "AND";
internal const string OrGate = "OR";
internal const string OpenParenthesis = "(";
internal const string CloseParenthesis = ")";
public static List<Token> Parse(string expression)
{
try
{
// Get '(' ')' '123-A1' 'AND' 'OR'
MatchCollection matches = TokenRegex.Matches(expression); // @"[()]|[dw-]+"
int depth = 0;
foreach (Match match in matches)
{
Token token = new Token(match.Value);
TokenList.Add(token);
// Increase depth when token is open parenthesis
if (token.Type == TokenType.Parenthesis && token.Label == OpenParenthesis)
{
depth += 1;
}
token.Depth = depth;
// Set group
if (TokenList.Count > 1)
{
Token prevToken = TokenList[TokenList.Count - 2];
if (prevToken.Depth == token.Depth)
{
token.Group = prevToken.Group;
}
else
{
token.Group = prevToken.Group + 1;
}
}
// Decrease depth after token is close parenthesis
if (token.Type == TokenType.Parenthesis && token.Label == CloseParenthesis)
{
depth -= 1;
}
}
// Remove parenthesis [ex. (123-ab)]
for (int i = 0; i < TokenList.Count; i++)
{
if (i + 2 < TokenList.Count &&
TokenList[i].Type == TokenType.Parenthesis && TokenList[i].Label == OpenParenthesis &&
TokenList[i + 2].Type == TokenType.Parenthesis && TokenList[i].Label == CloseParenthesis)
{
TokenList.RemoveAt(i + 2);
TokenList.RemoveAt(i);
}
}
return new List<Token>(TokenList);
}
finally
{
TokenList.Clear();
}
}
}
Run
ExpressionParser.Parse("(((123-A1) AND 123-A2 OR 123-A3) AND ((123-A4 AND 123-A5) AND 123-A6 AND (123-A7)))");
c# parsing
New contributor
$endgroup$
closed as off-topic by t3chb0t, Heslacher, Mast, Toby Speight, BCdotWEB Apr 1 at 15:58
This question appears to be off-topic. The users who voted to close gave these specific reasons:
- "Authorship of code: Since Code Review is a community where programmers improve their skills through peer review, we require that the code be posted by an author or maintainer of the code, that the code be embedded directly, and that the poster know why the code is written the way it is." – Heslacher, BCdotWEB
- "Lacks concrete context: Code Review requires concrete code from a project, with sufficient context for reviewers to understand how that code is used. Pseudocode, stub code, hypothetical code, obfuscated code, and generic best practices are outside the scope of this site." – t3chb0t, Mast
If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
$begingroup$
I'm not good at English.
It's gonna be hard to read.
I apologize in advance.
I need expression parser for draw diagram(fault tree).
In order to do that I have to create data structure from custom expression
(((123-A1) AND 123-A2 OR 123-A3) AND ((123-A4 AND 123-A5) AND 123-A6 AND (123-A7)))
The above example was written roughly as I thought.
- In some cases, parentheses are used for each variable for readability.
- Read in order within the same parentheses.
- Read in order if there are no parentheses.
- Parentheses around the expression can be attached without meaning.
- Operators use only AND, OR parentheses use only (, ).
- I don't know which is the best way string to data structure.
- The depth and order of parentheses and.. anything are all important because eventually I need to draw Diagram.
____________AND____________
/
/ ___AND__
/ /
___OR__ __AND__
/ /
_AND__ __AND__
/ /
123-A1 123-A2 123-A3 123-A4 123-A5 123-A6 123-A7
Expression to Token
public class Token
{
public TokenType Type; // Operator, Parenthesis, Variable
public string Label;
public int Depth;
public int Group;
public Token(string label)
{
Label = label.Trim();
if (ExpressionParser.SupportedOperatorHashSet.Contains(label.ToUpper()))
{
Type = TokenType.Operator;
}
else if (ExpressionParser.SupportedParenthesesHashSet.Contains(label))
{
Type = TokenType.Parenthesis;
}
else
{
Type = TokenType.Variable;
}
}
}
public enum TokenType
{
Variable,
Operator,
Parenthesis
}
public static class ExpressionParser
{
private static Regex TokenRegex = new Regex(@"[()]|[dw-]+");
internal static readonly HashSet<string> SupportedOperatorHashSet = new HashSet<string>() { AndGate, OrGate };
internal static readonly HashSet<string> SupportedParenthesesHashSet = new HashSet<string>() { OpenParenthesis, CloseParenthesis };
private static readonly List<Token> TokenList = new List<Token>();
internal const string AndGate = "AND";
internal const string OrGate = "OR";
internal const string OpenParenthesis = "(";
internal const string CloseParenthesis = ")";
public static List<Token> Parse(string expression)
{
try
{
// Get '(' ')' '123-A1' 'AND' 'OR'
MatchCollection matches = TokenRegex.Matches(expression); // @"[()]|[dw-]+"
int depth = 0;
foreach (Match match in matches)
{
Token token = new Token(match.Value);
TokenList.Add(token);
// Increase depth when token is open parenthesis
if (token.Type == TokenType.Parenthesis && token.Label == OpenParenthesis)
{
depth += 1;
}
token.Depth = depth;
// Set group
if (TokenList.Count > 1)
{
Token prevToken = TokenList[TokenList.Count - 2];
if (prevToken.Depth == token.Depth)
{
token.Group = prevToken.Group;
}
else
{
token.Group = prevToken.Group + 1;
}
}
// Decrease depth after token is close parenthesis
if (token.Type == TokenType.Parenthesis && token.Label == CloseParenthesis)
{
depth -= 1;
}
}
// Remove parenthesis [ex. (123-ab)]
for (int i = 0; i < TokenList.Count; i++)
{
if (i + 2 < TokenList.Count &&
TokenList[i].Type == TokenType.Parenthesis && TokenList[i].Label == OpenParenthesis &&
TokenList[i + 2].Type == TokenType.Parenthesis && TokenList[i].Label == CloseParenthesis)
{
TokenList.RemoveAt(i + 2);
TokenList.RemoveAt(i);
}
}
return new List<Token>(TokenList);
}
finally
{
TokenList.Clear();
}
}
}
Run
ExpressionParser.Parse("(((123-A1) AND 123-A2 OR 123-A3) AND ((123-A4 AND 123-A5) AND 123-A6 AND (123-A7)))");
c# parsing
New contributor
$endgroup$
closed as off-topic by t3chb0t, Heslacher, Mast, Toby Speight, BCdotWEB Apr 1 at 15:58
This question appears to be off-topic. The users who voted to close gave these specific reasons:
- "Authorship of code: Since Code Review is a community where programmers improve their skills through peer review, we require that the code be posted by an author or maintainer of the code, that the code be embedded directly, and that the poster know why the code is written the way it is." – Heslacher, BCdotWEB
- "Lacks concrete context: Code Review requires concrete code from a project, with sufficient context for reviewers to understand how that code is used. Pseudocode, stub code, hypothetical code, obfuscated code, and generic best practices are outside the scope of this site." – t3chb0t, Mast
If this question can be reworded to fit the rules in the help center, please edit the question.
$begingroup$
We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review. Please follow the tour, and read "What topics can I ask about here?", "How do I ask a good question?" and "What types of questions should I avoid asking?".
$endgroup$
– BCdotWEB
Apr 1 at 15:59
$begingroup$
Welcome to Code Review! Can you confirm that the code is complete and that it functions correctly? If so, I recommend that you edit to add a summary of the testing (ideally as reproducible unit-test code). If it's not working, it isn't ready for review (see help center) and the question may be deleted.
$endgroup$
– Toby Speight
Apr 2 at 7:29
$begingroup$
@TobySpeight I think it works fine.
$endgroup$
– thecco
Apr 2 at 7:37
$begingroup$
@t3chb0t Thank you, I`ll add TokenType class.
$endgroup$
– thecco
Apr 2 at 7:46
$begingroup$
@thecco, you'll probably want to edit statements like "I tried for almost a month, but I failed" and "help me with how I can data it for the shape below" which suggest that it's not working or not yet doing what you want. That's why it wasn't clear to me that it's ready for review.
$endgroup$
– Toby Speight
Apr 2 at 7:58
add a comment |
$begingroup$
I'm not good at English.
It's gonna be hard to read.
I apologize in advance.
I need expression parser for draw diagram(fault tree).
In order to do that I have to create data structure from custom expression
(((123-A1) AND 123-A2 OR 123-A3) AND ((123-A4 AND 123-A5) AND 123-A6 AND (123-A7)))
The above example was written roughly as I thought.
- In some cases, parentheses are used for each variable for readability.
- Read in order within the same parentheses.
- Read in order if there are no parentheses.
- Parentheses around the expression can be attached without meaning.
- Operators use only AND, OR parentheses use only (, ).
- I don't know which is the best way string to data structure.
- The depth and order of parentheses and.. anything are all important because eventually I need to draw Diagram.
____________AND____________
/
/ ___AND__
/ /
___OR__ __AND__
/ /
_AND__ __AND__
/ /
123-A1 123-A2 123-A3 123-A4 123-A5 123-A6 123-A7
Expression to Token
public class Token
{
public TokenType Type; // Operator, Parenthesis, Variable
public string Label;
public int Depth;
public int Group;
public Token(string label)
{
Label = label.Trim();
if (ExpressionParser.SupportedOperatorHashSet.Contains(label.ToUpper()))
{
Type = TokenType.Operator;
}
else if (ExpressionParser.SupportedParenthesesHashSet.Contains(label))
{
Type = TokenType.Parenthesis;
}
else
{
Type = TokenType.Variable;
}
}
}
public enum TokenType
{
Variable,
Operator,
Parenthesis
}
public static class ExpressionParser
{
private static Regex TokenRegex = new Regex(@"[()]|[dw-]+");
internal static readonly HashSet<string> SupportedOperatorHashSet = new HashSet<string>() { AndGate, OrGate };
internal static readonly HashSet<string> SupportedParenthesesHashSet = new HashSet<string>() { OpenParenthesis, CloseParenthesis };
private static readonly List<Token> TokenList = new List<Token>();
internal const string AndGate = "AND";
internal const string OrGate = "OR";
internal const string OpenParenthesis = "(";
internal const string CloseParenthesis = ")";
public static List<Token> Parse(string expression)
{
try
{
// Get '(' ')' '123-A1' 'AND' 'OR'
MatchCollection matches = TokenRegex.Matches(expression); // @"[()]|[dw-]+"
int depth = 0;
foreach (Match match in matches)
{
Token token = new Token(match.Value);
TokenList.Add(token);
// Increase depth when token is open parenthesis
if (token.Type == TokenType.Parenthesis && token.Label == OpenParenthesis)
{
depth += 1;
}
token.Depth = depth;
// Set group
if (TokenList.Count > 1)
{
Token prevToken = TokenList[TokenList.Count - 2];
if (prevToken.Depth == token.Depth)
{
token.Group = prevToken.Group;
}
else
{
token.Group = prevToken.Group + 1;
}
}
// Decrease depth after token is close parenthesis
if (token.Type == TokenType.Parenthesis && token.Label == CloseParenthesis)
{
depth -= 1;
}
}
// Remove parenthesis [ex. (123-ab)]
for (int i = 0; i < TokenList.Count; i++)
{
if (i + 2 < TokenList.Count &&
TokenList[i].Type == TokenType.Parenthesis && TokenList[i].Label == OpenParenthesis &&
TokenList[i + 2].Type == TokenType.Parenthesis && TokenList[i].Label == CloseParenthesis)
{
TokenList.RemoveAt(i + 2);
TokenList.RemoveAt(i);
}
}
return new List<Token>(TokenList);
}
finally
{
TokenList.Clear();
}
}
}
Run
ExpressionParser.Parse("(((123-A1) AND 123-A2 OR 123-A3) AND ((123-A4 AND 123-A5) AND 123-A6 AND (123-A7)))");
c# parsing
New contributor
$endgroup$
I'm not good at English.
It's gonna be hard to read.
I apologize in advance.
I need expression parser for draw diagram(fault tree).
In order to do that I have to create data structure from custom expression
(((123-A1) AND 123-A2 OR 123-A3) AND ((123-A4 AND 123-A5) AND 123-A6 AND (123-A7)))
The above example was written roughly as I thought.
- In some cases, parentheses are used for each variable for readability.
- Read in order within the same parentheses.
- Read in order if there are no parentheses.
- Parentheses around the expression can be attached without meaning.
- Operators use only AND, OR parentheses use only (, ).
- I don't know which is the best way string to data structure.
- The depth and order of parentheses and.. anything are all important because eventually I need to draw Diagram.
____________AND____________
/
/ ___AND__
/ /
___OR__ __AND__
/ /
_AND__ __AND__
/ /
123-A1 123-A2 123-A3 123-A4 123-A5 123-A6 123-A7
Expression to Token
public class Token
{
public TokenType Type; // Operator, Parenthesis, Variable
public string Label;
public int Depth;
public int Group;
public Token(string label)
{
Label = label.Trim();
if (ExpressionParser.SupportedOperatorHashSet.Contains(label.ToUpper()))
{
Type = TokenType.Operator;
}
else if (ExpressionParser.SupportedParenthesesHashSet.Contains(label))
{
Type = TokenType.Parenthesis;
}
else
{
Type = TokenType.Variable;
}
}
}
public enum TokenType
{
Variable,
Operator,
Parenthesis
}
public static class ExpressionParser
{
private static Regex TokenRegex = new Regex(@"[()]|[dw-]+");
internal static readonly HashSet<string> SupportedOperatorHashSet = new HashSet<string>() { AndGate, OrGate };
internal static readonly HashSet<string> SupportedParenthesesHashSet = new HashSet<string>() { OpenParenthesis, CloseParenthesis };
private static readonly List<Token> TokenList = new List<Token>();
internal const string AndGate = "AND";
internal const string OrGate = "OR";
internal const string OpenParenthesis = "(";
internal const string CloseParenthesis = ")";
public static List<Token> Parse(string expression)
{
try
{
// Get '(' ')' '123-A1' 'AND' 'OR'
MatchCollection matches = TokenRegex.Matches(expression); // @"[()]|[dw-]+"
int depth = 0;
foreach (Match match in matches)
{
Token token = new Token(match.Value);
TokenList.Add(token);
// Increase depth when token is open parenthesis
if (token.Type == TokenType.Parenthesis && token.Label == OpenParenthesis)
{
depth += 1;
}
token.Depth = depth;
// Set group
if (TokenList.Count > 1)
{
Token prevToken = TokenList[TokenList.Count - 2];
if (prevToken.Depth == token.Depth)
{
token.Group = prevToken.Group;
}
else
{
token.Group = prevToken.Group + 1;
}
}
// Decrease depth after token is close parenthesis
if (token.Type == TokenType.Parenthesis && token.Label == CloseParenthesis)
{
depth -= 1;
}
}
// Remove parenthesis [ex. (123-ab)]
for (int i = 0; i < TokenList.Count; i++)
{
if (i + 2 < TokenList.Count &&
TokenList[i].Type == TokenType.Parenthesis && TokenList[i].Label == OpenParenthesis &&
TokenList[i + 2].Type == TokenType.Parenthesis && TokenList[i].Label == CloseParenthesis)
{
TokenList.RemoveAt(i + 2);
TokenList.RemoveAt(i);
}
}
return new List<Token>(TokenList);
}
finally
{
TokenList.Clear();
}
}
}
Run
ExpressionParser.Parse("(((123-A1) AND 123-A2 OR 123-A3) AND ((123-A4 AND 123-A5) AND 123-A6 AND (123-A7)))");
c# parsing
c# parsing
New contributor
New contributor
edited Apr 2 at 8:36
thecco
New contributor
asked Apr 1 at 11:21
theccothecco
11
11
New contributor
New contributor
closed as off-topic by t3chb0t, Heslacher, Mast, Toby Speight, BCdotWEB Apr 1 at 15:58
This question appears to be off-topic. The users who voted to close gave these specific reasons:
- "Authorship of code: Since Code Review is a community where programmers improve their skills through peer review, we require that the code be posted by an author or maintainer of the code, that the code be embedded directly, and that the poster know why the code is written the way it is." – Heslacher, BCdotWEB
- "Lacks concrete context: Code Review requires concrete code from a project, with sufficient context for reviewers to understand how that code is used. Pseudocode, stub code, hypothetical code, obfuscated code, and generic best practices are outside the scope of this site." – t3chb0t, Mast
If this question can be reworded to fit the rules in the help center, please edit the question.
closed as off-topic by t3chb0t, Heslacher, Mast, Toby Speight, BCdotWEB Apr 1 at 15:58
This question appears to be off-topic. The users who voted to close gave these specific reasons:
- "Authorship of code: Since Code Review is a community where programmers improve their skills through peer review, we require that the code be posted by an author or maintainer of the code, that the code be embedded directly, and that the poster know why the code is written the way it is." – Heslacher, BCdotWEB
- "Lacks concrete context: Code Review requires concrete code from a project, with sufficient context for reviewers to understand how that code is used. Pseudocode, stub code, hypothetical code, obfuscated code, and generic best practices are outside the scope of this site." – t3chb0t, Mast
If this question can be reworded to fit the rules in the help center, please edit the question.
$begingroup$
We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review. Please follow the tour, and read "What topics can I ask about here?", "How do I ask a good question?" and "What types of questions should I avoid asking?".
$endgroup$
– BCdotWEB
Apr 1 at 15:59
$begingroup$
Welcome to Code Review! Can you confirm that the code is complete and that it functions correctly? If so, I recommend that you edit to add a summary of the testing (ideally as reproducible unit-test code). If it's not working, it isn't ready for review (see help center) and the question may be deleted.
$endgroup$
– Toby Speight
Apr 2 at 7:29
$begingroup$
@TobySpeight I think it works fine.
$endgroup$
– thecco
Apr 2 at 7:37
$begingroup$
@t3chb0t Thank you, I`ll add TokenType class.
$endgroup$
– thecco
Apr 2 at 7:46
$begingroup$
@thecco, you'll probably want to edit statements like "I tried for almost a month, but I failed" and "help me with how I can data it for the shape below" which suggest that it's not working or not yet doing what you want. That's why it wasn't clear to me that it's ready for review.
$endgroup$
– Toby Speight
Apr 2 at 7:58
add a comment |
$begingroup$
We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review. Please follow the tour, and read "What topics can I ask about here?", "How do I ask a good question?" and "What types of questions should I avoid asking?".
$endgroup$
– BCdotWEB
Apr 1 at 15:59
$begingroup$
Welcome to Code Review! Can you confirm that the code is complete and that it functions correctly? If so, I recommend that you edit to add a summary of the testing (ideally as reproducible unit-test code). If it's not working, it isn't ready for review (see help center) and the question may be deleted.
$endgroup$
– Toby Speight
Apr 2 at 7:29
$begingroup$
@TobySpeight I think it works fine.
$endgroup$
– thecco
Apr 2 at 7:37
$begingroup$
@t3chb0t Thank you, I`ll add TokenType class.
$endgroup$
– thecco
Apr 2 at 7:46
$begingroup$
@thecco, you'll probably want to edit statements like "I tried for almost a month, but I failed" and "help me with how I can data it for the shape below" which suggest that it's not working or not yet doing what you want. That's why it wasn't clear to me that it's ready for review.
$endgroup$
– Toby Speight
Apr 2 at 7:58
$begingroup$
We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review. Please follow the tour, and read "What topics can I ask about here?", "How do I ask a good question?" and "What types of questions should I avoid asking?".
$endgroup$
– BCdotWEB
Apr 1 at 15:59
$begingroup$
We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review. Please follow the tour, and read "What topics can I ask about here?", "How do I ask a good question?" and "What types of questions should I avoid asking?".
$endgroup$
– BCdotWEB
Apr 1 at 15:59
$begingroup$
Welcome to Code Review! Can you confirm that the code is complete and that it functions correctly? If so, I recommend that you edit to add a summary of the testing (ideally as reproducible unit-test code). If it's not working, it isn't ready for review (see help center) and the question may be deleted.
$endgroup$
– Toby Speight
Apr 2 at 7:29
$begingroup$
Welcome to Code Review! Can you confirm that the code is complete and that it functions correctly? If so, I recommend that you edit to add a summary of the testing (ideally as reproducible unit-test code). If it's not working, it isn't ready for review (see help center) and the question may be deleted.
$endgroup$
– Toby Speight
Apr 2 at 7:29
$begingroup$
@TobySpeight I think it works fine.
$endgroup$
– thecco
Apr 2 at 7:37
$begingroup$
@TobySpeight I think it works fine.
$endgroup$
– thecco
Apr 2 at 7:37
$begingroup$
@t3chb0t Thank you, I`ll add TokenType class.
$endgroup$
– thecco
Apr 2 at 7:46
$begingroup$
@t3chb0t Thank you, I`ll add TokenType class.
$endgroup$
– thecco
Apr 2 at 7:46
$begingroup$
@thecco, you'll probably want to edit statements like "I tried for almost a month, but I failed" and "help me with how I can data it for the shape below" which suggest that it's not working or not yet doing what you want. That's why it wasn't clear to me that it's ready for review.
$endgroup$
– Toby Speight
Apr 2 at 7:58
$begingroup$
@thecco, you'll probably want to edit statements like "I tried for almost a month, but I failed" and "help me with how I can data it for the shape below" which suggest that it's not working or not yet doing what you want. That's why it wasn't clear to me that it's ready for review.
$endgroup$
– Toby Speight
Apr 2 at 7:58
add a comment |
0
active
oldest
votes
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review. Please follow the tour, and read "What topics can I ask about here?", "How do I ask a good question?" and "What types of questions should I avoid asking?".
$endgroup$
– BCdotWEB
Apr 1 at 15:59
$begingroup$
Welcome to Code Review! Can you confirm that the code is complete and that it functions correctly? If so, I recommend that you edit to add a summary of the testing (ideally as reproducible unit-test code). If it's not working, it isn't ready for review (see help center) and the question may be deleted.
$endgroup$
– Toby Speight
Apr 2 at 7:29
$begingroup$
@TobySpeight I think it works fine.
$endgroup$
– thecco
Apr 2 at 7:37
$begingroup$
@t3chb0t Thank you, I`ll add TokenType class.
$endgroup$
– thecco
Apr 2 at 7:46
$begingroup$
@thecco, you'll probably want to edit statements like "I tried for almost a month, but I failed" and "help me with how I can data it for the shape below" which suggest that it's not working or not yet doing what you want. That's why it wasn't clear to me that it's ready for review.
$endgroup$
– Toby Speight
Apr 2 at 7:58