diff --git a/specifications/grammar-40/grammar.dtd b/specifications/grammar-40/grammar.dtd index 788e19239..dbcf20312 100644 --- a/specifications/grammar-40/grammar.dtd +++ b/specifications/grammar-40/grammar.dtd @@ -6,16 +6,16 @@ or via an XSLT stylesheet or other transformation, may generate a parser compiler specification such as for YACC or JavaCC. -Norm and Scott moved this file, and added an explicit prefix, as part of the -transition toward a unified build process for last call and beyond. This involved -moving the location of the CVS repository, For earlier history information, -see /WWW/XML/Group/xpath-query-src/grammar.dtd + In 2025 Michael Kay simplified the DTD to remove parts that were no + longer used or maintained. =========================================================================--> - + @@ -146,44 +146,44 @@ see /WWW/XML/Group/xpath-query-src/grammar.dtd process-value (no | yes) #IMPLIED > - + - + + - + - + - + - + - + - + - + - + - + - +>--> - - - + @@ -127,13 +119,13 @@ apply. - + / - + // @@ -147,8 +139,8 @@ apply. - - + / + // @@ -168,13 +160,6 @@ apply. - ) @@ -189,8 +174,8 @@ apply. - - + / + // @@ -269,17 +254,11 @@ apply. - - - @@ -341,13 +320,16 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral - + + @@ -424,8 +406,8 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral order empty - - + greatest + least @@ -456,7 +438,7 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral decimal-format - + default @@ -482,7 +464,7 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral zero-digit digit pattern-separator - exponent-separator + exponent-separator @@ -509,11 +491,6 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral - @@ -549,10 +526,6 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral - @@ -580,13 +553,13 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral - + + + declare @@ -600,7 +573,7 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral - --> + updating @@ -608,7 +581,7 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral % - + ( @@ -656,7 +629,7 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral - + external := @@ -698,7 +671,7 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral - + external := @@ -716,7 +689,7 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral function - + ( @@ -727,7 +700,7 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral - + external @@ -762,16 +735,15 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral - + - - - + { + - + } @@ -814,7 +786,7 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral declare option - + @@ -852,10 +824,9 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral - - + @@ -868,37 +839,18 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral - + - - - - @@ -910,8 +862,6 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral - - @@ -925,7 +875,7 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral - + @@ -1195,11 +1145,9 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral order by - - - , + - + @@ -1210,15 +1158,15 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral - - + ascending + descending empty - - + greatest + least @@ -1370,15 +1318,6 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral - @@ -1408,195 +1347,191 @@ ErrorVal ::= "$" VarName - - - - or - - - - - and - - - - - - - - - - - - - - - contains - text - - - - - - - - - - otherwise - - - - - || - - - - - - to - - - - - - - - - - - - - - - - * - × - div - ÷ - idiv - mod - - - - - - - union - | - - - - - - - intersect - except - - - - - - - instance - of - - - - - - - - treat - as - - - - - - - - castable - as - - - ? - - - - - - - - cast - as - - - ? - - - - - - - - transform - with - - - - - - - - - - - -> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + or + + + + + + + + and + + + + + + + + + + + + + + + + + + + + otherwise + + + + + + + + || + + + + + + + + to + + + + + + + + + + + - + + + + + + + + + + * + × + div + ÷ + idiv + mod + + + + + + + + + + union + | + + + + + + + + + + intersect + except + + + + + + + + + instance + of + + + - + + + + treat + as + + + + + + + + castable + as + + + ? + + + + + + + + cast + as + + + ? + + + + + + + + -> + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + => - + =!> - + @@ -1609,21 +1544,17 @@ ErrorVal ::= "$" VarName - + =?> - + = != - - + < <= > >= @@ -1660,9 +1591,9 @@ ErrorVal ::= "$" VarName - + { - + } @@ -1676,24 +1607,24 @@ ErrorVal ::= "$" VarName - + { - + } - + (# - + - + #) @@ -1717,14 +1648,14 @@ ErrorVal ::= "$" VarName - + / - + // @@ -1735,8 +1666,8 @@ ErrorVal ::= "$" VarName - - + / + // @@ -1850,7 +1781,7 @@ ErrorVal ::= "$" VarName - + @@ -1928,12 +1859,6 @@ ErrorVal ::= "$" VarName - - [ @@ -1981,18 +1906,12 @@ ErrorVal ::= "$" VarName - * - - @@ -2062,29 +1981,18 @@ ErrorVal ::= "$" VarName . - - ordered - - - - + unordered - - - - @@ -2120,23 +2028,22 @@ ErrorVal ::= "$" VarName - - + < + - + /> - + > - - + </ + - + > @@ -2145,11 +2052,11 @@ ErrorVal ::= "$" VarName - + - + = @@ -2217,28 +2124,31 @@ ErrorVal ::= "$" VarName - + <!-- - + --> - - + + + - + + - + <? - + ?> @@ -2248,9 +2158,9 @@ ErrorVal ::= "$" VarName - + <![CDATA[ - + ]]> @@ -2273,10 +2183,7 @@ ErrorVal ::= "$" VarName document - - - - + @@ -2290,9 +2197,9 @@ ErrorVal ::= "$" VarName - + { - + } @@ -2302,9 +2209,9 @@ ErrorVal ::= "$" VarName - + { - + } @@ -2317,20 +2224,6 @@ ErrorVal ::= "$" VarName - - @@ -2347,43 +2240,20 @@ ErrorVal ::= "$" VarName - - text - - - - + comment - - - - + processing-instruction - - - - - - + @@ -2394,12 +2264,10 @@ ErrorVal ::= "$" VarName - - # @@ -2426,11 +2294,11 @@ ErrorVal ::= "$" VarName map - + { - + } @@ -2494,9 +2362,9 @@ ErrorVal ::= "$" VarName - + ``[ - + ]`` @@ -2514,11 +2382,11 @@ ErrorVal ::= "$" VarName - + `{ - + }` @@ -2563,7 +2431,7 @@ ErrorVal ::= "$" VarName ? * - + + @@ -2576,7 +2444,6 @@ ErrorVal ::= "$" VarName - @@ -2697,11 +2564,11 @@ ErrorVal ::= "$" VarName - + - + @@ -2714,7 +2581,7 @@ ErrorVal ::= "$" VarName - + @@ -2880,7 +2747,7 @@ ErrorVal ::= "$" VarName - + - + + @@ -3097,13 +2964,13 @@ ErrorVal ::= "$" VarName - +--> - - + + without content - + --> @@ -3449,7 +3316,7 @@ ErrorVal ::= "$" VarName - + - - - - - - - @@ -3555,12 +3395,6 @@ ErrorVal ::= "$" VarName - - - - - - @@ -3570,217 +3404,7 @@ ErrorVal ::= "$" VarName - - - - - array - attribute - comment - document-node - element - empty-sequence - function - fn - if - item - map - namespace-node - node - processing-instruction - schema-attribute - schema-element - switch - text - typeswitch - while - - - - - - - - - - - - NaN - after - all - allowing - ancestor - ancestor-or-self - and - any - as - at - base-uri - before - block - boundary-space - by - case - cast - castable - catch - child - collation - construction - contains - content - context - copy - copy-namespaces - count - decimal-format - decimal-separator - declare - default - delete - descendant - descendant-or-self - diacritics - different - digit - distance - div - doc - document - element-with-id - else - empty - encoding - end - entire - eq - every - exactly - except - exit - exponent-separator - first - following - following-sibling - for - from - ft-option - ftand - ftnot - ftor - ge - group - grouping-separator - gt - id - idiv - import - in - infinity - inherit - insensitive - insert - instance - intersect - into - invoke - is - key - language - last - lax - le - let - levels - lowercase - lt - minus-sign - mod - modify - module - most - namespace - ne - next - no - no-inherit - no-preserve - nodes - not - occurs - of - only - option - or - order - ordered - ordering - paragraph - paragraphs - parent - pattern-separator - per-mille - percent - phrase - preceding - preceding-sibling - preserve - previous - relationship - rename - replace - return - returning - revalidation - same - satisfies - schema - score - self - sensitive - sentence - sentences - skip - sliding - some - stable - start - stemming - stop - strict - strip - then - thesaurus - times - to - transform - treat - try - tumbling - type - union - unordered - updating - uppercase - using - validate - value - variable - version - weight - when - where - wildcards - window - with - without - word - words - xquery - zero-digit - - @@ -3890,38 +3514,7 @@ ErrorVal ::= "$" VarName - - - } - - - - < - - - - & - - - - - - XML - XMl - XmL - Xml - xML - xMl - xmL - xml - - + - + - - / - - - - // - - - - greatest - - - - least - - - - external - - - - { - - - - } - - - - ascending - - - - descending - - - - < - - - - + - - - - - - - - - (# - - - - #) - - - + * - + : * :* @@ -4070,42 +3607,14 @@ ErrorVal ::= "$" VarName * : *: - + - - - - - - > - - - - /> - - - - </ - - - - - - - - > - - - - = - - - + " - + " @@ -4125,55 +3634,8 @@ ErrorVal ::= "$" VarName }} - - <!-- - - - - --> - - - - - - - - - - - - - - <? - - - - ?> - - - - <![CDATA[ - - - - - ]]> - - - - ``[ - - - - ]`` - - - - `{ - - - - }` - + + - + @@ -4391,15 +3853,15 @@ ErrorVal ::= "$" VarName ; - + - + : - + @@ -4546,7 +4008,7 @@ ErrorVal ::= "$" VarName - + @@ -4944,378 +4406,7 @@ ErrorVal ::= "$" VarName - - - - - - This is not an actual state, but rather a collection of - sub-terminals that are referenced by g:token rules. - In the file that is generated for input to JavaCC, - each becomes a "private regular expression". - (It would be better to make this distinction - in the g:token element.) - - - No state change. - - - - - - - - - - - - - - - - - - - - - - - - XXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The "(:" token marks the beginning of an expression - Comment, and the ":)" token marks the end. This allows no special - interpretation of other characters in this state. - - - - - - - - No state change. - - - - - - - - This state allows attributes in the native XML syntax, - and marks the beginning of an element construction. Element - constructors also push the current state, popping it at the - conclusion of an end tag. In the START_TAG state, the string ">" is - recognized as a token which is associated with the transition to - the original state. - - - - - - - - - - - - - - No state change. - - - - - - - - This state allows content valid for attributes. The - character "{" marks a transition to the OPERAND state, i.e. the - start of an embedded expression, and the "}" character pops back to - the original state. To allow curly braces to be used as character - content, a double left or right curly brace is interpreted as a - single curly brace character. This state is the same as - APOS_ATTRIBUTE_CONTENT, except that apostrophes are allowed without - escaping, and an unescaped quote marks the end of the - state. - - - - - Transition to an Attribute Value - Template. - - - - - - No state change. - - - - - - - - - - - - This state is the same as QUOT_ATTRIBUTE_CONTENT, except - that quotes are allowed, and an unescaped apostrophe marks the end - of the state. - - - - - Transition to an Attribute Value - Template. - - - - - - No state change. - - - - - - - - - - - - This state allows XML-like content, without these - characters being misinterpreted as expressions. The character "{" - marks a transition to the OPERAND state, i.e. the start of an - embedded expression, and the "}" character pops back to the - ELEMENT_CONTENT state. To allow curly braces to be used as - character content, a double left or right curly brace is - interpreted as a single curly brace character. The string "</" - is interpreted as the beginning of an end tag, which is associated - with a transition to the END_TAG state. - - - - - Transition to an Element Value - Template. - - - - - - - - - - - - - - - - - No state change. - - - - - - - - - - - When the end tag is terminated, the state is popped to - the state that was pushed at the start of the corresponding start - tag. - - - - - No state change. - - - - - - - - - The "<--" token marks the beginning of an XML - Comment, and the "-->" token marks the end. This allows no special - interpretation of other characters in this state. - - - - - No state change. - - - - - - - - - - In this state, only patterns that are valid in a - processing instruction name are recognized. - - - - - - - - No state change. - - - - - - - In this state, only characters are that are valid in - processing instruction content are recognized. - - - - - No state change. - - - - - - - - In this state, only lexemes that are valid in a CDATA - section are recognized. - - - - - No state change. - - - - - - - - This state is entered in a a pragma expression, and recognizes a - QName that transits to a PRAGMA_3 state rather than a OPERATOR state. - - - - - - No state change. - - - - - - This state recognizes the space(s) required to preceed pragma contents. If you do not have - this, and try to recognize S in PRAGMA_3, then Char will be recognized first, - and the pragma production will not work properly. - - - - - - - - - - This state recognizes characters in pragma content, and transits out of this - state when a “#)” pattern is recognized. - - - - - - - - - - - - - - - - - - - - - - - + - + diff --git a/specifications/xquery-40/src/expressions.xml b/specifications/xquery-40/src/expressions.xml index d083add97..ccb67a788 100644 --- a/specifications/xquery-40/src/expressions.xml +++ b/specifications/xquery-40/src/expressions.xml @@ -16463,7 +16463,7 @@ element because it is defined by a - +

The semantics of FLWOR expressions are based on a concept called a tuple stream. - - - - - - - + diff --git a/style/grammar2spec.xsl b/style/grammar2spec.xsl index dc77c5654..4aebac6ee 100644 --- a/style/grammar2spec.xsl +++ b/style/grammar2spec.xsl @@ -298,135 +298,7 @@ - - - - - - - - - state- - - - - - - - - - - - - - - - - - - - - -

- -

-

- - - - - - - - - - - - - - - - -
PatternTransition To State
- - - - [ - - ] - - - - - - - - , - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - #lexaction-pushstate - - - #lexaction-pushstate-with-param - - - #lexaction-popstate - - - #lexaction-backup - - - - - - () - - -
- - - -
- - (maintain state) - -
-
-

- - - - - - + @@ -624,7 +496,7 @@ - + @@ -886,7 +758,7 @@ - + - + - + - + - + - + - + + - + -->