// Neven-xpath.pdf import edu.neu.ccs.demeter.dj.*; import java.util.*; XPath = List(Exp) EOF. Exp : Simple | BinaryCompound | UnaryCompound. Simple : ElementTest | WildCard. BinaryCompound = "(" BOp Exp Exp ")". UnaryCompound = "{-{" UOp Exp "}-}". BOp : Disjunction | Child | Descendant | Filter. UOp : Chi | Des. Chi = "/". Des = "desc". Disjunction = "|". Child = "/". Descendant = "desc" . Filter = "filt". ElementTest = Name. WildCard = "*". Name = Ident. Main = String. List(S) ~ "(" {S} ")". CountingVisitor = int extends Visitor .