%%% . type union | intersect except doc id element-with-id key ( , ) ( ) child :: descendant :: attribute :: self :: descendant-or-self :: namespace :: xquery encoding version encoding module namespace = ; declare boundary-space preserve strip declare default collation declare base-uri declare construction strip preserve declare ordering ordered unordered declare default order empty declare copy-namespaces , preserve no-preserve inherit no-inherit declare decimal-format default decimal-format = decimal-separator grouping-separator infinity minus-sign NaN percent per-mille zero-digit digit pattern-separator exponent-separator import schema at , namespace = fixed default element namespace import module namespace = at , declare namespace = declare fixed default element function namespace declare ft-option declare updating % ( , ) - true ( ) false ( ) variable $ := := declare context value as item as := := updating function ( ) ( ) , := , $ item-type as declare option , ; ; , return for , $ in member $ in allowing empty in key $ value $ at $ score $ let , $ := for tumbling window $ in sliding window $ in start when only end when $ previous $ next $ count $ where while group by , := collation $ stable order by , empty collation return some every , satisfies $ in switch ( ) default return { } case return typeswitch ( ) default $ return { } case $ as return | if ( ) then else else if ( ) else try catch | or and contains text otherwise || to * × div ÷ idiv mod union | intersect except instance of treat as castable as ? cast as ? transform with => =!> =?> = != <= > >= eq ne lt le gt ge is << >> validate type lax strict ! attribute child descendant descendant-or-self following following-sibling namespace self :: @ ancestor ancestor-or-self parent preceding preceding-sibling :: .. ( | ) * ( , ) ( ) , , := [ ] ?[ ] ? ?? :: pairs keys values items * type ( ) $ ( ) . ordered unordered ? document element attribute namespace text comment processing-instruction # function fn map , : [ , ] array ` ` {{ }} `` ? ?? :: as empty-sequence ( ) ? * item ( ) node ( ) document-node ( ) text ( ) comment ( ) namespace-node ( ) processing-instruction ( ) attribute ( , ) schema-attribute ( ) element ( , ? ) schema-element ( ) function fn ( * ) function fn ( , ) as map ( * ) map ( , ) record ( * ) record ( , ) ? as , * enum ( , ) array ( * ) array ( ) ( | ) weight ftor ftand not in ftnot ( ) any word all words phrase occurs times exactly at at most from to ordered window distance words sentences paragraphs same different sentence paragraph at start at end entire content using case insensitive case sensitive lowercase uppercase diacritics insensitive diacritics sensitive stemming no stemming thesaurus default thesaurus ( default , ) no thesaurus at relationship levels exactly at at most from to stop words stop words default no stop words at ( , ) union except language wildcards no wildcards option without content declare revalidation strict lax skip as first last into after before insert node nodes delete node nodes replace value of node with rename node as invoke updating ( , ) copy $ := , $ := modify return copy $ := , $ := modify return block ; declare $ := , $ := $ := exit returning while ( ) 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 - - } < & XML XMl XmL Xml xML xMl xmL xml . . e E + - / // greatest least external { } ascending descending < + - (# #) * : * :* * : *: > /> </ > = " " ' ' {{ }} <!-- --> - <? ?> <![CDATA[ ]]> ``[ ]`` `{ }` 0x 0b . . . . e E + - ' ' & ' " " & " Q { & { } } & lt gt amp quot apos ; "" '' &# x ; : _ _ _ 0 1 _ . - _ (: :) 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.