public State GetNfa(RulePath path, GetNfaParams param) { if (rules.ContainsKey(name) == false) throw new Exception(string.Format(@"@RuleLinkExpression: |{0}| rule not found", name)); var newPath = path + name; return param.OnMarkRule(rules[name].GetNfa(newPath, param), newPath); }
public State GetNfa(RulePath path, GetNfaParams param) { switch (name) { case "RepeatBy": return State.NoCloneRepeatBy(arguments[0].GetNfa(path, param), arguments[1].GetNfa(path, param)); default: throw new NotImplementedException(string.Format(@"@FuncCallExpression: |{0}| function is not defined", name)); } }
public State GetNfa(RulePath path, GetNfaParams param) { if (rules.ContainsKey(name) == false) { throw new Exception(string.Format(@"@RuleLinkExpression: |{0}| rule not found", name)); } var newPath = path + name; return(param.OnMarkRule(rules[name].GetNfa(newPath, param), newPath)); }
public State GetNfa(RulePath path, GetNfaParams param) { switch (name) { case "RepeatBy": return(State.NoCloneRepeatBy(arguments[0].GetNfa(path, param), arguments[1].GetNfa(path, param))); default: throw new NotImplementedException(string.Format(@"@FuncCallExpression: |{0}| function is not defined", name)); } }
public State GetNfa(RulePath path, GetNfaParams param) { var result = State.NoCloneRepeatBy(value.GetNfa(path, param), by.GetNfa(path, param)); if (count1 <= 0) result = State.NoCloneOption(result); if (count1 > 1) result = State.Repeat(count1, count2, result); return result; }
public State GetNfa(RulePath path, GetNfaParams param) { if (hex1 != null) { if (hex2 == null) return Thompson.Create(hex1.Value); else return Thompson.Create(hex1.Value, hex2.Value); } else { return Thompson.Create(hexs.ToArray()); } }
public State GetNfa(RulePath path, GetNfaParams param) { var result = State.NoCloneRepeatBy(value.GetNfa(path, param), by.GetNfa(path, param)); if (count1 <= 0) { result = State.NoCloneOption(result); } if (count1 > 1) { result = State.Repeat(count1, count2, result); } return(result); }
public State GetNfa(RulePath path, GetNfaParams param) { if (hex1 != null) { if (hex2 == null) { return(Thompson.Create(hex1.Value)); } else { return(Thompson.Create(hex1.Value, hex2.Value)); } } else { return(Thompson.Create(hexs.ToArray())); } }
public State GetNfa(RulePath path, GetNfaParams param) { return(State.Substract(value1.GetNfa(path, param), value2.GetNfa(path, param))); }
public State GetNfa(RulePath path, GetNfaParams param) { return(State.NoCloneConcatanation(Builder.BaseExpression.GetNfasArray(path, expressions, param))); }
public State GetNfa(RulePath path, GetNfaParams param) { return(State.Repeat(count1, count2, value.GetNfa(path, param))); }
public static State[] GetNfasArray(RulePath path, IEnumerable<IExpression> expressions, GetNfaParams param) { return new List<State>(GetNfas(path, expressions, param)).ToArray(); }
public static IEnumerable<State> GetNfas(RulePath path, IEnumerable<IExpression> expressions, GetNfaParams param) { foreach (var expression in expressions) yield return expression.GetNfa(path, param); }
public State GetNfa(RulePath path, GetNfaParams param) { return State.NoCloneOption(expression.GetNfa(path, param)); }
public State GetNfa(RulePath path, GetNfaParams param) { return State.NoCloneAlternation(Builder.BaseExpression.GetNfasArray(path, expressions, param)); }
public static IEnumerable <State> GetNfas(RulePath path, IEnumerable <IExpression> expressions, GetNfaParams param) { foreach (var expression in expressions) { yield return(expression.GetNfa(path, param)); } }
public State GetNfa(RulePath path, GetNfaParams param) { return(param.OnMarkRule(Thompson.Create(chars), path + chars)); }
public State GetNfa(RulePath path, GetNfaParams param) { return State.Substract(value1.GetNfa(path, param), value2.GetNfa(path, param)); }
public State GetNfa(RulePath path, GetNfaParams param) { return(State.NoCloneOption(expression.GetNfa(path, param))); }
public State GetNfa(RulePath path, GetNfaParams param) { return param.OnMarkRule(Thompson.Create(chars), path + chars); }
public static State[] GetNfasArray(RulePath path, IEnumerable <IExpression> expressions, GetNfaParams param) { return(new List <State>(GetNfas(path, expressions, param)).ToArray()); }
public State GetNfa(RulePath path, GetNfaParams param) { return State.Repeat(count1, count2, value.GetNfa(path, param)); }