Skip to content

Commit 4667729

Browse files
committed
grammar versions added to help
1 parent ac2f84c commit 4667729

File tree

1 file changed

+37
-20
lines changed

1 file changed

+37
-20
lines changed

jTest/help/jwiXML-help.xhtml

+37-20
Original file line numberDiff line numberDiff line change
@@ -67,30 +67,30 @@
6767
<a href="#d2e547">Notes on the XPath/XQuery 4 grammars</a>
6868
<ul>
6969
<li>
70-
<a href="#d2e577">Failures</a>
70+
<a href="#d2e606">Failures</a>
7171
</li>
7272
<li>
73-
<a href="#d2e596">Ambiguities</a>
73+
<a href="#d2e625">Ambiguities</a>
7474
</li>
7575
<li>
76-
<a href="#d2e621">The Set-subtraction operator</a>
76+
<a href="#d2e650">The Set-subtraction operator</a>
7777
</li>
7878
</ul>
7979
</li>
8080
<li>
81-
<a href="#d2e658">Change history</a>
81+
<a href="#d2e687">Change history</a>
8282
<ul>
8383
<li>
84-
<a href="#d2e662">Version 1.1 - 2022nov01</a>
84+
<a href="#d2e691">Version 1.1 - 2022nov01</a>
8585
</li>
8686
<li>
87-
<a href="#d2e680">Version 1.3 - 2023may27</a>
87+
<a href="#d2e709">Version 1.3 - 2023may27</a>
8888
</li>
8989
<li>
90-
<a href="#d2e698">Version 1.4 - 2024feb13</a>
90+
<a href="#d2e727">Version 1.4 - 2024feb13</a>
9191
</li>
9292
<li>
93-
<a href="#d2e765">Version 1.5 - 2024sep23</a>
93+
<a href="#d2e794">Version 1.5 - 2024sep23</a>
9494
</li>
9595
</ul>
9696
</li>
@@ -597,18 +597,35 @@ Multiple nodes may not be the final parse result:&lt;expression/&gt;,@compare,&l
597597
generate the specification grammars <a href="https://qt4cg.org/specifications/xquery-40/xpath-40.html#id-grammar">XPath
598598
EBNF</a> and <a href="https://qt4cg.org/specifications/xquery-40/xquery-40.html#id-grammar">XQuery
599599
EBNF</a>. (See my <a href="https://www.balisage.net/Proceedings/vol29/html/Lumley01/BalisageVol29-Lumley01.html">Balisage paper</a> for details of how these are constructed.)</p>
600+
<p>The grammars are presented in three different versions of iXML:</p>
601+
<ul>
602+
<li>
603+
<code>1.0</code>, the published standard,</li>
604+
<li>
605+
<code>1.1</code>, the current draft which noteably adds the ability to rename
606+
nonterminals (<code>A&gt;b</code>). This is used in areas such as <code>QName</code>s to
607+
accomodate both prefix and local parts as attributes, and</li>
608+
<li>
609+
<code>1.1+</code>, being the <code>1.1</code> version with the addition of a
610+
set-subtraction operator (see below), which is used to exclude certain reserved
611+
keywords from nome name concepts, such as <code>function</code> being reserved from
612+
use a the name of a function call. As far as I'm aware, <b>this iXML feature is not
613+
currently supported by any other implementation</b> and whilst having been
614+
proposed as an additional part of iXML, decisions on it have not yet been made.</li>
615+
</ul>
600616
<p>For both these grammars, there is also a 'reduced tree' version which truncates the very
601-
deep trees that normally result from parsing and a suitable moderately large expression
602-
to be parsed is included for each grammar. Each of the (iXML) grammars contains a date-stamp in a
603-
comment near the top which can be used to verify whether it is 'up to date', by
604-
comparison with the history of the file: <a href="https://github.com/qt4cg/qtspecs/blob/master/specifications/grammar-40/xpath-grammar.xml">https://github.com/qt4cg/qtspecs/blob/master/specifications/grammar-40/xpath-grammar.xml</a>
617+
deep trees that normally result from parsing. A suitable moderately large sample
618+
expression to test parsing is included for each grammar.</p>
619+
<p> Each of the (iXML) grammars contains a date-stamp in a comment near the top which can
620+
be used to verify whether it is 'up to date', by comparison with the history of the
621+
file: <a href="https://github.com/qt4cg/qtspecs/blob/master/specifications/grammar-40/xpath-grammar.xml">https://github.com/qt4cg/qtspecs/blob/master/specifications/grammar-40/xpath-grammar.xml</a>
605622
</p>
606623
<p>Whilst the grammars have been tested across the 35k expressions of the QT4 test sets,
607624
with only some 50 failures, there are known areas where the grammar fails or produces
608625
ambiguity. These notes are intended to explain.</p>
609626
<section>
610627
<h4>
611-
<a id="d2e577">Failures</a>
628+
<a id="d2e606">Failures</a>
612629
</h4>
613630
<ul>
614631
<li>The iXML grammars (which have to effectively act as their own tokenizers) are
@@ -627,7 +644,7 @@ Multiple nodes may not be the final parse result:&lt;expression/&gt;,@compare,&l
627644
</section>
628645
<section>
629646
<h4>
630-
<a id="d2e596">Ambiguities</a>
647+
<a id="d2e625">Ambiguities</a>
631648
</h4>
632649
<p>The grammars, lacking a tokenizer and the ability to look-ahead without consumption,
633650
retain a few ambiguities that are inhernet in the basic EBNF grammars (i.e. without
@@ -644,7 +661,7 @@ Multiple nodes may not be the final parse result:&lt;expression/&gt;,@compare,&l
644661
</section>
645662
<section>
646663
<h4>
647-
<a id="d2e621">The Set-subtraction operator</a>
664+
<a id="d2e650">The Set-subtraction operator</a>
648665
</h4>
649666
<p>The grammars use an experimental 'set-subtraction' operator <code>¬</code> to
650667
indicate certain reserved keywords such as limitations on function names: </p>
@@ -665,11 +682,11 @@ reservedFunctionNames: types |
665682
</section>
666683
<section>
667684
<h3>
668-
<a id="d2e658">Change history</a>
685+
<a id="d2e687">Change history</a>
669686
</h3>
670687
<section>
671688
<h4>
672-
<a id="d2e662">Version 1.1 - 2022nov01</a>
689+
<a id="d2e691">Version 1.1 - 2022nov01</a>
673690
</h4>
674691
<ul>
675692
<li>Improvements to error reporting.</li>
@@ -682,7 +699,7 @@ reservedFunctionNames: types |
682699
</section>
683700
<section>
684701
<h4>
685-
<a id="d2e680">Version 1.3 - 2023may27</a>
702+
<a id="d2e709">Version 1.3 - 2023may27</a>
686703
</h4>
687704
<ul>
688705
<li>Tooltip help boxes added.</li>
@@ -697,7 +714,7 @@ reservedFunctionNames: types |
697714
</section>
698715
<section>
699716
<h4>
700-
<a id="d2e698">Version 1.4 - 2024feb13</a>
717+
<a id="d2e727">Version 1.4 - 2024feb13</a>
701718
</h4>
702719
<ul>
703720
<li>Added syntax highlighting option to formatted iXML display</li>
@@ -728,7 +745,7 @@ reservedFunctionNames: types |
728745
</section>
729746
<section>
730747
<h4>
731-
<a id="d2e765">Version 1.5 - 2024sep23</a>
748+
<a id="d2e794">Version 1.5 - 2024sep23</a>
732749
</h4>
733750
<ul>
734751
<li>Corrected <a href="https://github.com/johnlumley/jwiXML/issues/10">issue#10</a>

0 commit comments

Comments
 (0)