Updating xqDoc to current XQuery versions 1.0-ml and 3.1

12 views
Skip to first unread message

Loren Cahlander

unread,
Jan 11, 2018, 2:06:24 PM1/11/18
to ta...@x-query.com, Darin McBeath, Darin McBeath, EXPath, exp...@googlegroups.com, Loren Cahlander
I had previously been working on the xqDoc ANTLR and Java code to handle the changes to the XQuery language.  The codebase that I downloaded included the invoked functions and the referred to variables.

I have added annotations as well as some of the XQuery 3.1 additions into the antler file https://github.com/lcahlander/xqDoc/blob/master/src/org/xqdoc/xquery/parser/jul2017/XQuery.g

It requires the antlr-2.7.5 jar file.

I have checked in the code at https://github.com/lcahlander/xqDoc

It would be good to have test case XQuery files to run the parser against so that it handles all of the enhancements to the language.

I think that it needs to become an EXPath module.

I would like feedback from folks.

Dan McCreary

unread,
Jan 14, 2018, 7:45:58 AM1/14/18
to Loren Cahlander, ta...@x-query.com, Darin McBeath, Darin McBeath, EXPath, EXPath
Loren,

Thank you very much for updating the ANTLR files.  I know that tools that Sonar need the updated grammer files to be useful for XQuery 3.0.


It is generous of you to spend your own personal time to learn the complex ANTLR grammar format and then share the fixes with the community!

- Dan
--
Dan McCreary
skype: dmccreary47

Loren Cahlander

unread,
Jan 14, 2018, 8:41:39 AM1/14/18
to Dan McCreary, Loren Cahlander, ta...@x-query.com, Darin McBeath, Darin McBeath, EXPath, EXPath
Dan,

Can you help me with test XQuery files with all of the additions to XQuery 3.1?

I want to make sure that all cases are covered in the ANTLR file.

Thanks,
Loren

Reece Dunn

unread,
Oct 14, 2018, 10:55:20 AM10/14/18
to EXPath
On Thursday, 11 January 2018 19:06:24 UTC, Loren Cahlander wrote:
I had previously been working on the xqDoc ANTLR and Java code to handle the changes to the XQuery language.  The codebase that I downloaded included the invoked functions and the referred to variables.

You may be interested in my https://github.com/rhdunn/xquery-intellij-plugin/blob/master/docs/XQuery%20IntelliJ%20Plugin.md document which describes the grammar for different vendor extensions, including MarkLogic, BaseX, and Saxon.
 
I have added annotations as well as some of the XQuery 3.1 additions into the antler file https://github.com/lcahlander/xqDoc/blob/master/src/org/xqdoc/xquery/parser/jul2017/XQuery.g

It requires the antlr-2.7.5 jar file.

I have checked in the code at https://github.com/lcahlander/xqDoc

It would be good to have test case XQuery files to run the parser against so that it handles all of the enhancements to the language.

I am using the https://github.com/rhdunn/xquery-intellij-plugin/tree/master/src/test/resources/tests/parser test files to test my XQuery parser. This includes tests for missing tokens, and the main syntax tests are often missing a query body, so these tests may need filtering and updating to be useful to you. It may also be useful splitting it out into a separate repository.

Kind regards,
Reece

Loren Cahlander

unread,
Oct 14, 2018, 12:53:35 PM10/14/18
to EXPath, Loren Cahlander
I shall work on adding those extensions.  I would like to update to Antlr 4, but I doubt that I will have the time.

--
You received this message because you are subscribed to the Google Groups "EXPath" group.
To unsubscribe from this group and stop receiving emails from it, send an email to expath+un...@googlegroups.com.
To post to this group, send email to exp...@googlegroups.com.
Visit this group at https://groups.google.com/group/expath.
For more options, visit https://groups.google.com/d/optout.

signature.asc

Loren Cahlander

unread,
Nov 21, 2018, 12:56:41 PM11/21/18
to ta...@x-query.com, Darin McBeath, Darin McBeath, EXPath, EXPath, Loren Cahlander
I have updated the xqDoc Antlr grammar to version 4 for XQuery.

I am sure that I probably missed something.  I would appreciate some peer review of my code and any suggestions that any of you might have.

signature.asc
Reply all
Reply to author
Forward
0 new messages