Exemple #1
0
 void AbsolutePath(out PathElement expr)
 {
     expr = new RootElement(SP);
     Expect(48);
     if (la.kind == 28 || la.kind == 47)
     {
         QualifiedPath(out var items);
         expr.Next = items;
     }
 }
Exemple #2
0
 void RelativePath(out PathElement rv)
 {
     NodeTest(out var elem);
     rv = elem;
     if (la.kind == 45)
     {
         Predicate(out var predicate);
         elem.Predicate = predicate;
     }
     if (la.kind == 28 || la.kind == 47)
     {
         QualifiedPath(out var rest);
         elem.Next = rest;
     }
 }
Exemple #3
0
 void QualifiedPath(out PathElement elem)
 {
     elem = null;
     if (la.kind == 28)
     {
         Get();
         RelativePath(out elem);
     }
     else if (la.kind == 47)
     {
         Get();
         elem = new DescendantsPathElement(SP);
         RelativePath(out var innerElem);
         elem.Next = innerElem;
     }
     else
     {
         SynErr(55);
     }
 }