Ejemplo n.º 1
0
 public Token(string id, SkipWhitespace skipWs, RegExpr expr)
 {
     Id = id;
     SkipLeadingWhitespace = (skipWs == SkipWhitespace.Enable);
     Expr      = expr;
     Rules     = new TokenRules();
     CaptureId = GenerateCaptureId(Id);
     Children  = new List <Token>();
 }
Ejemplo n.º 2
0
 public Token(string id, SkipWhitespace skipWs, RegExpr expr)
 {
     Id = id;
     SkipLeadingWhitespace = (skipWs == SkipWhitespace.Enable);
     Expr     = expr;
     Rules    = new TokenRules();
     Children = new HashSet <Token>();
     Parents  = new Dictionary <string, Token>();
 }
Ejemplo n.º 3
0
 public Token(string id, RegExpr skipWs, RegExpr expr)
 {
     Id = id;
     SkipLeadingWhitespace = true;
     LeadingWhitespace     = skipWs;
     Expr      = expr;
     Rules     = new TokenRules();
     CaptureId = GenerateCaptureId(Id);
     Children  = new List <Token>();
 }
Ejemplo n.º 4
0
 public Token(string id, RegExpr skipWs, RegExpr expr)
 {
     Id = id;
     SkipLeadingWhitespace = true;
     LeadingWhitespace     = skipWs;
     Expr     = expr;
     Rules    = new TokenRules();
     Children = new HashSet <Token>();
     Parents  = new Dictionary <string, Token>();
 }
Ejemplo n.º 5
0
 public Boolean Accept(Boolean bShowMatch = true)
 {
     return(Parser?.Scanner?.Text is null ?
            false : TokenRules.Any(tokenRule => match(Parser.Scanner, tokenRule, bShowMatch)));
 }