示例#1
0
 internal TreeNode(DottedRule rule, int leftBorder, int rightBorder)
 {
     _leftBorder  = leftBorder;
     _rightBorder = rightBorder;
     _children    = new List <TreeNode>();
     _complexNode = rule;
 }
 internal EarleyItem(int setNumber, DottedRule dottedRule, int parentPosition)
 {
     _dottedRule          = dottedRule;
     _orignPosition       = parentPosition;
     _predecessorLinkList = new List <ItemLink>();
     _reducorLinkList     = new List <ItemLink>();
     _setNumber           = setNumber;
 }
示例#3
0
        public override bool Equals(object obj)
        {
            DottedRule dottedRule = obj as DottedRule;

            return(GetPosition() == dottedRule.GetPosition() && GetRule().Equals(dottedRule.GetRule()));
        }
示例#4
0
 public LeoItem(DottedRule dottedRule, int position, Symbol symbol)
 {
     _symbol        = symbol;
     _dotteRule     = dottedRule;
     _orignPosition = position;
 }
示例#5
0
 public LeoItem(EarleyItem ei, Symbol symbol)
 {
     _symbol        = symbol;
     _dotteRule     = ei.GetDottedRule();
     _orignPosition = ei.GetOrignPosition();
 }