| | |
| | | **
|
| | | ****************************************************************************/
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using System.Linq;
|
| | |
| | | ///
|
| | | public partial class CharClassSet : CharClass, IEnumerable<IEnumerable<Element>>
|
| | | {
|
| | | public IEnumerable<Element> Positives { get; set; }
|
| | | public IEnumerable<Element> Negatives { get; set; }
|
| | | private IEnumerable<Element> Positives { get; set; }
|
| | | private IEnumerable<Element> Negatives { get; set; }
|
| | |
|
| | | bool IsSubSet { get; set; }
|
| | | bool HasPositive { get { return Positives != null && Positives.Any(); } }
|
| | |
| | |
|
| | | public class Expr
|
| | | {
|
| | | public Op Operator { get; private set; }
|
| | | public Op Operator { get; }
|
| | |
|
| | | public List<Expr> Factors { get; private set; }
|
| | | public List<Expr> Factors { get; }
|
| | | public Expr(Op op, List<Expr> factors) { Operator = op; Factors = factors; }
|
| | | public Expr(Op op, params Expr[] factors) : this(op, factors.ToList()) { }
|
| | |
|
| | | public CharClass Term { get; private set; }
|
| | | public CharClass Term { get; }
|
| | | public Expr(CharClass c) { Operator = Op.Term; Term = c; }
|
| | | public static implicit operator Expr(CharClass c) { return new Expr(c); }
|
| | | public static implicit operator Expr(string s) { return Char[s]; }
|
| | |
| | | {
|
| | | public Expr Expr { get; set; }
|
| | | public Queue<Expr> Children { get; set; }
|
| | | public List<CharClassSet> SubSets { get; set; }
|
| | | public List<CharClassSet> SubSets { get; }
|
| | | public StackFrame()
|
| | | {
|
| | | Expr = null;
|