Subject: Re: [xsl] Are XPath expressions parsed using compiler parsing techniques? From: "Adam Retter adam.retter@xxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Tue, 10 May 2022 09:04:24 -0000 |
Hi Roger, Due to the complexity they are typically parsed using one of the traditional compiler parsing algorithms, either through a manually coded parser such as the ones in Saxon and the experimental parser for FusionDB, or through a parser compiler compiler toolkit such as Antlr, Yacc, etc. I gave a talk on some aspects of our new Hand-rolled Recursive Descent approach here (you might recognise "the book" in the background at the beginning of the video) at Declarative Amsterdam 2020 - https://www.youtube.com/watch?v=nxLqE_7ZO2A and the slides: https://declarative.amsterdam/resources/da/slides/da.2020.retter.slides.pdf There are also various pre-baked Open Source XPath and XQuery parsers in Java and Scala using Antlr and various other toolkits kicking around my various GitHubs - let me know if you want links to them. Kind regards. Adam. On Sun, 8 May 2022 at 23:19, Roger L Costello costello@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Hi Folks, > > I dug out my old compiler "Dragon book" and started rereading it. > > Chapter 1 lists some of the tools that employ compiler techniques. This one caught my attention: > > Query interpreters: A query interpreter translates a predicate containing relational and boolean operators into commands to search a database of records satisfying that predicate. > > An XPath expression is a query. Not against a database, but against an XML document. Are XPath expressions parsed using compiler parsing algorithms? Is a syntax tree constructed for an XPath expression? Is the syntax tree traversed? > > /Roger > > -- Adam Retter skype: adam.retter tweet: adamretter http://www.adamretter.org.uk
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Are XPath expressions par, Michael Kay mike@xxx | Thread | Re: [xsl] Are XPath expressions par, John Lumley john@xxx |
Re: [xsl] Are XPath expressions par, Alain Couthures alai | Date | Re: [xsl] Are XPath expressions par, John Lumley john@xxx |
Month |