[1] program unit ::=
program [2]
| module declaration [103]
[2] program [1] ::= program type [100]?, program-level declaration [108]?, preamble declaration [114]*, group member [95]*, identified group [93]*
[3] main process rule [96] ::=
process end rule [4]
| process rule [5]
| process start rule [6]
[4] process end rule [3] ::= PROCESS-END, condition [318]?, local scope [143]
[5] process rule [3] ::= PROCESS, condition [318]?, local scope [143]
[6] process start rule [3] ::= PROCESS-START, condition [318]?, local scope [143]
[7] markup processing rule [96] ::=
data content rule [8]
| document end rule [9]
| document start rule [10]
| dtd end rule [11]
| dtd start rule [12]
| element rule [13]
| epilog start rule [14]
| external data entity rule [15]
| invalid data rule [16]
| marked section rule [17]
| markup note rule [20]
| markup wrapper rule [21]
| processing instruction rule [22]
| prolog end rule [23]
| prolog in error rule [24]
| sgml comment processing rule [18]
| sgml declaration end rule [25]
| translation rule [26]
| xmlns-change rule [27]
[8] data content rule [7] ::= DATA-CONTENT, condition [318]?, local scope [143]
[9] document end rule [7] ::= DOCUMENT-END, condition [318]?, local scope [143]
[10] document start rule [7] ::= DOCUMENT-START, condition [318]?, local scope [143]
[11] dtd end rule [7] ::= DTD-END, condition [318]?, local scope [143]
[12] dtd start rule [7] ::= DTD-START, condition [318]?, local scope [143]
[13] element rule [7] ::= ELEMENT, (element rule name set [32] | #IMPLIED), condition [318]?, local scope [143]
[14] epilog start rule [7] ::= EPILOG-START, condition [318]?, local scope [143]
[15] external data entity rule [7] ::= (EXTERNAL-DATA-ENTITY | EXTERNAL-ENTITY), (entity name set [36] | #IMPLIED), condition [318]?, local scope [143]
[16] invalid data rule [7] ::= INVALID-DATA, condition [318]?, local scope [143]
[17] marked section rule [7] ::= MARKED-SECTION, marked section type [29], condition [318]?, local scope [143]
[18] sgml comment processing rule [7] ::= (MARKUP-COMMENT | SGML-COMMENT), condition [318]?, local scope [143]
[19] markup error rule [96] ::= (MARKUP-ERROR | SGML-ERROR), condition [318]?, LOG?, local scope [143]
[20] markup note rule [7] ::= MARKUP-NOTE, (sub-category name [30] | #IMPLIED), condition [318]?, local scope [143]
[21] markup wrapper rule [7] ::= MARKUP-WRAPPER, (sub-category name [30] | #IMPLIED), condition [318]?, local scope [143]
[22] processing instruction rule [7] ::= PROCESSING-INSTRUCTION, processing instruction matcher [28], condition [318]?, local scope [143]
[23] prolog end rule [7] ::= PROLOG-END, condition [318]?, local scope [143]
[24] prolog in error rule [7] ::= PROLOG-IN-ERROR, condition [318]?, local scope [143]
[25] sgml declaration end rule [7] ::= SGML-DECLARATION-END, condition [318]?, local scope [143]
[26] translation rule [7] ::= TRANSLATE, pattern expression [335], condition [318]?, local scope [143]
[27] xmlns-change rule [7] ::= XMLNS-CHANGE, condition [318]?, local scope [143]
[28] processing instruction matcher [22] ::=
pattern expression [335]
| NAMED, pattern expression [335], (VALUED, pattern expression [335])?
| VALUED, pattern expression [335], (NAMED, pattern expression [335])?
[29] marked section type [17] ::=
INCLUDE-START
| INCLUDE-END
| RCDATA
| CDATA
| IGNORE
[30] sub-category name [20] [21] ::=
DATATYPE
| NAMESPACE
| XMLNS
[31] element name set [40] [45] ::=
qualified element name [34]
| "(", qualified element name [34], ((OR | "|"), qualified element name [34])*, ")"
[32] element rule name set [13] ::=
restricted qualified element name [33]
| "(", restricted qualified element name [33], ((OR | "|"), restricted qualified element name [33])*, ")"
[33] restricted qualified element name [32] ::= (#BASE | #FULL)?, element name [35]
[34] qualified element name [31] [49] ::= (#BASE | #FULL | #XMLNS)?, element name [35]
[35] element name [33] [34] [42] ::=
constant string literal [276]
| name [457]
[36] entity name set [15] ::=
entity name [37]
| "(", entity name [37], ((OR | "|"), entity name [37])*, ")"
[37] entity name [36] [91] ::=
constant string literal [276]
| name [457]
[38] ancestry qualifier [39] [40] [43] [45] [55] [71] [73] [194] [217] [242] [244] ::= OF, specific element selector [40]
[39] anonymous element selector [45] ::=
aliased element selector [42]
| constrained element selector [43]
| element selection class [41], ancestry qualifier [38]?
[40] specific element selector [38] [263] ::=
aliased element selector [42]
| constrained element selector [43]
| element selection class [41], element name set [31], ancestry qualifier [38]?
[41] element selection class [39] [40] ::=
ANCESTOR
| OPEN, ELEMENT
| PREPARENT
[42] aliased element selector [39] [40] ::= CURRENT, ELEMENT, element name [35]
[43] constrained element selector [39] [40] ::=
DOCTYPE
| ELEMENT, ancestry qualifier [38]?
| PARENT, ancestry qualifier [38]?
[44] element alias [217] ::= name [457]
[45] element test primary [323] ::=
anonymous element selector [39], (IS | ISNT), element name set [31]
| short reference map selector [55], (IS | ISNT), short reference map name set [50]
| CONTENT, ancestry qualifier [38]?, (IS | ISNT), content type set [46]
| LAST, PROPER?, CONTENT, ancestry qualifier [38]?, (IS | ISNT), element name or data set [48]
| LAST, PROPER?, SUBELEMENT, ancestry qualifier [38]?, (IS | ISNT), element name set [31]
| PREVIOUS, ancestry qualifier [38]?, (IS | ISNT), element name set [31]
| STATUS, (OF, LAST, SUBELEMENT)?, ancestry qualifier [38]?, (IS | ISNT), (PROPER | INCLUSION)
[46] content type set [45] ::=
content type [47]
| "(", content type [47], ((OR | "|"), content type [47])*, ")"
[47] content type [46] ::=
ANY
| CDATA
| CONREF
| DECLARED-EMPTY
| ELEMENT
| EMPTY
| EMPTY-TAG
| MIXED
| RCDATA
[48] element name or data set [45] ::=
element name or data [49]
| "(", element name or data [49], ((OR | "|"), element name or data [49])*, ")"
[49] element name or data [48] ::=
qualified element name [34]
| #DATA
[50] short reference map name set [45] ::=
short reference map name [51]
| "(", short reference map name [51], ((OR | "|"), short reference map name [51])*, ")"
[51] short reference map name [50] ::=
constant string literal [276]
| name [457]
| #EMPTY
| #NONE
[52] entity test primary [323] ::=
qualified attribute part identifier [68], (IS | ISNT), entity category set [56]
| ENTITY, (IS | ISNT), entity category set [56]
| notation selector [54], (IS | ISNT), notation category set [58]
| notation selector [54], equivalence comparer [327], notation name set [66]
[53] entity selector [54] ::=
ENTITY
| qualified attribute part identifier [68]
[54] notation selector [52] ::= NOTATION, (OF, entity selector [53])?
[55] short reference map selector [45] ::= USEMAP, ancestry qualifier [38]?
[56] entity category set [52] ::=
entity category [57]
| "(", entity category [57], ((AND | "&"), entity category [57])*, ")"
| "(", entity category [57], ((OR | "|"), entity category [57])*, ")"
[57] entity category [56] ::=
anonymous entity type [64]
| default entity type [63]
| entity class [62]
| entity scope [65]
| entity type [61]
| external identifier type [60]
[58] notation category set [52] ::= notation category [59]
[59] notation category [58] ::= external identifier type [60]
[60] external identifier type [57] [59] ::=
PUBLIC
| SYSTEM
| IN-LIBRARY
[61] entity type [57] ::=
CDATA-ENTITY
| NDATA-ENTITY
| SDATA-ENTITY
| SUBDOC-ENTITY
[62] entity class [57] ::=
GENERAL
| PARAMETER
[63] default entity type [57] ::= DEFAULT-ENTITY
[64] anonymous entity type [57] [91] [92] ::=
#CAPACITY
| #CHARSET
| #DOCUMENT
| #DTD
| #SCHEMA
| #SYNTAX
[65] entity scope [57] ::=
INTERNAL
| EXTERNAL
[66] notation name set [52] ::=
notation name [67]
| "(", notation name [67], ((OR | "|"), notation name [67])*, ")"
[67] notation name [66] ::=
constant string literal [276]
| name [457]
[68] qualified attribute part identifier [52] [53] [71] [72] [73] [74] [263] ::=
complex qualified attribute identifier [72]
| simple qualified attribute identifier [71], item indexer [445]?
[69] qualified attribute identifier [83] [194] [217] [244] [265] ::=
complex qualified attribute identifier [72]
| simple qualified attribute identifier [71]
[70] qualified attribute set identifier [84] [217] [244] ::=
complex qualified attribute set identifier [74]
| simple qualified attribute set identifier [73]
[71] simple qualified attribute identifier [68] [69] [194] ::=
ATTRIBUTE, attribute name [77], ancestry qualifier [38]?
| DATA-ATTRIBUTE, attribute name [77], (OF, "(", qualified attribute part identifier [68], ")")?
[72] complex qualified attribute identifier [68] [69] ::=
simple qualified attribute set identifier [73], indexer [444]
| DATA-ATTRIBUTE, attribute name [77], OF, qualified attribute part identifier [68]
[73] simple qualified attribute set identifier [70] [72] [243] ::=
attribute subset specifier [75]?, ATTRIBUTES, ancestry qualifier [38]?
| attribute subset specifier [75]?, DATA-ATTRIBUTES, (OF, "(", qualified attribute part identifier [68], ")")?
[74] complex qualified attribute set identifier [70] ::= attribute subset specifier [75]?, DATA-ATTRIBUTES, OF, qualified attribute part identifier [68]
[75] attribute subset specifier [73] [74] ::=
NON-IMPLIED
| SPECIFIED
[76] attribute alias [217] ::= name [457]
[77] attribute name [71] [72] [194] [304] ::=
constant string literal [276]
| name [457]
[78] attribute type set [83] ::=
attribute type [79]
| "(", attribute type [79], ((AND | "&"), attribute type [79])*, ")"
| "(", attribute type [79], ((OR | "|"), attribute type [79])*, ")"
[79] attribute type [78] ::=
attribute declaration type [81]
| attribute default type [82]
| attribute specification type [80]
[80] attribute specification type [79] ::=
DEFAULTED
| IMPLIED
| SPECIFIED
[81] attribute declaration type [79] ::=
CDATA
| ENTITY
| ENTITIES
| GROUP
| ID
| IDREF
| IDREFS
| NAME
| NAMES
| NOTATION
| NUMBER
| NUMBERS
| NMTOKEN
| NMTOKENS
| NUTOKEN
| NUTOKENS
[82] attribute default type [79] ::=
DECLARED-CONREF
| DECLARED-CURRENT
| DECLARED-DEFAULTED
| DECLARED-FIXED
| DECLARED-IMPLIED
| DECLARED-REQUIRED
[83] attribute test primary [323] ::= qualified attribute identifier [69], (IS | ISNT), attribute type set [78]
[84] attributes test primary [323] ::= qualified attribute set identifier [70], (HAS | HASNT), (KEY | "^"), string primary [263]
[85] input processing rule [96] ::=
find rule [87]
| find end rule [86]
| find start rule [88]
| external text entity rule [90]
[86] find end rule [85] ::= FIND-END, condition [318]?, local scope [143]
[87] find rule [85] ::= FIND, NULL?, pattern expression [335], condition [318]?, local scope [143]
[88] find start rule [85] ::= FIND-START, condition [318]?, local scope [143]
[89] extended entity name set [90] ::=
extended entity name [91]
| "(", extended entity name [91], ((OR | "|"), extended entity name [91])*, ")"
[90] external text entity rule [85] ::= EXTERNAL-TEXT-ENTITY, (extended entity name set [89] | implied entity type set [92]), condition [318]?, local scope [143]
[91] extended entity name [89] ::=
entity name [37]
| anonymous entity type [64]
[92] implied entity type set [90] ::=
#IMPLIED
| "(", (anonymous entity type [64], (OR | "|"))*, #IMPLIED, ((OR | "|"), anonymous entity type [64])*, ")"
[93] identified group [2] ::=
GROUP, group identification [94], group member [95]*
| GROUP, "(", group identification [94], ")", group member [95]*
[94] group identification [93] ::=
group name set [97]
| #IMPLIED
[95] group member [2] [93] ::=
common declaration [115]
| include [101]
| rule [96]
[96] rule [95] ::=
markup processing rule [7]
| input processing rule [85]
| line breaking rule [127]
| main process rule [3]
| markup error rule [19]
[97] group name set [94] [99] [168] ::= group name [98], ((AND | "&"), group name [98])*
[98] group name [97] ::=
constant string literal [276]
| name [457]
[99] current group set [195] ::=
group name set [97]
| #GROUP, ((AND | "&"), group name set [97])?
| #IMPLIED
[100] program type [2] ::=
(CONTEXT-TRANSLATE | DOWN-TRANSLATE | UP-TRANSLATE), (WITH, (SGML | XML))?
| CROSS-TRANSLATE
[101] include [95] ::= INCLUDE, constant string literal [276]
[102] include guard declaration [115] ::= INCLUDE-GUARD, (name [457] | constant string literal [276])
[103] module declaration [1] ::= MODULE, (SHARED, AS, name [457])?
[104] import declaration [115] ::=
IMPORT, constant string expression [271], EXPORT?, PREFIXED, BY, name [457], use clause [105]*, supply clause [106]*
| IMPORT, constant string expression [271], EXPORT?, UNPREFIXED, use clause [105]*, supply clause [106]*
| IMPORT, constant string expression [271], ONLY, use clause [105]+, supply clause [106]*
[105] use clause [104] ::=
EXPORT?, USE, name [457], (AS, name [457])?
| EXPORT?, USE, #CONVERSION-FUNCTIONS
[106] supply clause [104] ::= SUPPLY, name [457], (AS, name [457])?
[107] library declaration [115] ::= LIBRARY, (constant string expression [271], constant string expression [271])+
[108] program-level declaration [2] ::=
default io declaration [109]
| escape declaration [110]
| main buffering declaration [111]*
| main mode declaration [112]*
| main output referent declaration [113]
[109] default io declaration [108] ::= DECLARE, NO-DEFAULT-IO
[110] escape declaration [108] [466] ::= ESCAPE, constant string expression [271]
[111] main buffering declaration [108] ::= DECLARE, (#ERROR | #MAIN-INPUT | #MAIN-OUTPUT | #PROCESS-INPUT | #PROCESS-OUTPUT), HAS, (BUFFERED | UNBUFFERED)
[112] main mode declaration [108] ::= DECLARE, (#MAIN-INPUT | #MAIN-OUTPUT | #PROCESS-INPUT | #PROCESS-OUTPUT), HAS, (BINARY-MODE | TEXT-MODE)
[113] main output referent declaration [108] ::= DECLARE, #MAIN-OUTPUT, HAS, (REFERENTS-ALLOWED | REFERENTS-NOT-ALLOWED | REFERENTS-DISPLAYED)
[114] preamble declaration [2] ::=
common declaration [115]
| global object definition [116]
| naming declaration [119]
[115] common declaration [95] [114] ::=
binary input declaration [117]
| binary output declaration [118]
| delimiter declaration [301]
| import declaration [104]
| include guard declaration [102]
| library declaration [107]
| macro definition [449]
| output break declaration [126]
| symbol declaration [300]
[116] global object definition [114] ::=
catch definition [399]
| function definition [353]
| global shelf definition [423]
| require function definition [364]
| require shelf definition [424]
| user-defined type declaration [131]
[117] binary input declaration [115] ::= BINARY-INPUT, constant numeric expression [246]
[118] binary output declaration [115] ::= BINARY-OUTPUT, constant numeric expression [246]
[119] naming declaration [114] ::=
data letters declaration [120]
| entity namecase declaration [121]
| general namecase declaration [122]
| markup identification declaration [123]
| name letters declaration [124]
| newline declaration [125]
[120] data letters declaration [119] ::=
DECLARE, DATA-LETTERS, constant string expression [271], constant string expression [271]?
| LETTERS, constant string expression [271], constant string expression [271]?
[121] entity namecase declaration [119] ::= NAMECASE, ENTITY, (YES | NO)
[122] general namecase declaration [119] ::= NAMECASE, GENERAL, (YES | NO)
[123] markup identification declaration [119] ::= DECLARE, MARKUP-IDENTIFICATION, (#FULL | #BASE)
[124] name letters declaration [119] ::= DECLARE, NAME-LETTERS, constant string expression [271], constant string expression [271]
[125] newline declaration [119] ::= NEWLINE, constant string expression [271]
[126] output break declaration [115] ::= BREAK-WIDTH, constant numeric expression [246], (number [245] | TO, constant numeric expression [246])?
[127] line breaking rule [96] ::=
insertion break rule [128]
| replacement break rule [129]
[128] insertion break rule [127] ::= INSERTION-BREAK, constant string expression [271], condition [318]?
[129] replacement break rule [127] ::= REPLACEMENT-BREAK, constant string expression [271], constant string expression [271], condition [318]?
[130] first-class type [355] [356] [358] [359] [360] [362] [376] [377] [378] [379] [380] [381] [424] ::=
user-defined type name [137]
| COUNTER
| INTEGER
| INT32
| STREAM
| SWITCH
[131] user-defined type declaration [116] ::=
opaque type declaration [132]
| record type declaration [133]
| user-defined type require [136]
[132] opaque type declaration [131] ::= (DECLARE | EXPORT), OPAQUE, user-defined type name [137], CREATED, BY, system-specific function name [469], (IN, FUNCTION-LIBRARY, system-specific library name [470])?
[133] record type declaration [131] ::= (DECLARE | EXPORT, (AS, OPAQUE)?), RECORD, user-defined type name [137], (record type inheritance clause [134]?, field declaration [135]* | ELSEWHERE)
[134] record type inheritance clause [133] ::= EXTENDS, user-defined type name [137]
[135] field declaration [133] ::= FIELD, shelf declaration [429]
[136] user-defined type require [131] ::= REQUIRE, OPAQUE, user-defined type name [137]
[137] user-defined type name [130] [132] [133] [134] [136] [140] [208] [374] [397] [433] ::= name [457]
[138] user-defined type expression [208] [232] [393] ::=
boolean term [321], "->", user-defined type expression [138], "|", user-defined type expression [138]
| user-defined type subexpression [139]
[139] user-defined type subexpression [138] [141] ::=
argument primary [392], (user-defined infix function name [465], argument primary [392])+
| user-defined type primary [140]
[140] user-defined type primary [139] [392] ::=
user-defined type name [137], CAST, user-defined type primary [140]
| value function call [386]
| shelf item reference [440]
[141] user-defined type test primary [323] ::= user-defined type subexpression [139], (reference comparer [142], user-defined type subexpression [139])+
[142] reference comparer [141] ::=
"=="
| "!=="
[143] local scope [4] [5] [6] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [86] [87] [88] [90] [201] [202] [204] [205] [208] [209] [210] [211] [216] [219] [220] [222] [223] [385] ::= local declaration [425]*, action [146]*, catch alternative [145]*, always block [144]*
[144] always block [143] ::= ALWAYS, action [146]*
[145] catch alternative [143] ::= CATCH, (built-in catch invocation [406] | catch invocation [409]), action [146]*
[146] action [143] [144] [145] ::= using prefix [193]*, guarded action [147]
[147] guarded action [146] ::= basic action [148], condition [318]?
[148] basic action [147] ::=
activate action [149]
| assert action [150]
| clear action [151]
| close action [152]
| collect garbage action [153]
| copy action [154]
| copy and clear action [155]
| deactivate action [156]
| decrement action [157]
| discard action [158]
| do action [201]
| do conditional action [202]
| do markup parse action [203]
| do scan action [204]
| do select action [205]
| do select-type action [208]
| do skip action [209]
| exit action [159]
| fail action [160]
| flush action [161]
| void function call [387]
| halt action [164]
| increment action [165]
| log-message action [166]
| new action [167]
| next group action [168]
| not reached action [169]
| open action [170]
| output action [171]
| output to action [172]
| put action [173]
| remove action [176]
| remove key action [177]
| reopen action [178]
| repeat action [210]
| repeat for action [211]
| repeat over action [216]
| repeat scan action [218]
| reset action [179]
| return action [180]
| set action [181]
| set external function association action [395]
| set key action [182]
| set new action [183]
| set stream action [184]
| sgml in action [186]
| sgml out action [187]
| submit action [188]
| succeed action [189]
| suppress action [190]
| test system action [191]
| throw action [192]
[149] activate action [148] ::= ACTIVATE, (shelf item reference [440], ((AND | "&"), shelf item reference [440])* | "(", shelf item reference [440], ((AND | "&"), shelf item reference [440])*, ")")
[150] assert action [148] ::= ASSERT, boolean expression [319], (MESSAGE, string expression [258])?
[151] clear action [148] ::= CLEAR, shelf reference [441], ((AND | "&"), shelf reference [441])*
[152] close action [148] ::= CLOSE, shelf item reference [440], ((AND | "&"), shelf item reference [440])*
[153] collect garbage action [148] ::= COLLECT-GARBAGE
[154] copy action [148] ::= COPY, shelf reference [441], TO, shelf reference [441]
[155] copy and clear action [148] ::= COPY-CLEAR, shelf reference [441], TO, shelf reference [441]
[156] deactivate action [148] ::= DEACTIVATE, (shelf item reference [440], ((AND | "&"), shelf item reference [440])* | "(", shelf item reference [440], ((AND | "&"), shelf item reference [440])*, ")")
[157] decrement action [148] ::= DECREMENT, shelf item reference [440], (BY, numeric expression [233])?
[158] discard action [148] ::= DISCARD, shelf item reference [440], ((AND | "&"), shelf item reference [440])*
[159] exit action [148] ::= EXIT
[160] fail action [148] ::= FAIL
[161] flush action [148] ::= FLUSH, unmodified output stream set [162]
[162] unmodified output stream set [161] ::= unmodified output stream [163], ((AND | "&"), unmodified output stream [163])*
[163] unmodified output stream [162] ::=
built-in output stream shelf name [296]
| shelf item reference [440]
[164] halt action [148] ::= (HALT | HALT-EVERYTHING), (WITH, numeric expression [233])?
[165] increment action [148] ::= INCREMENT, shelf item reference [440], (BY, numeric expression [233])?
[166] log-message action [148] ::= LOG-MESSAGE, string expression [258], (CLASS, string expression [258])?, (SEVERITY, numeric expression [233])?
[167] new action [148] ::= NEW, new shelf item reference [439], ((AND | "&"), new shelf item reference [439])*
[168] next group action [148] ::= NEXT, GROUP, IS, (group name set [97] | "(", group name set [97], ")")
[169] not reached action [148] ::= NOT-REACHED, (MESSAGE, string expression [258])?
[170] open action [148] ::= OPEN, shelf item reference [440], stream attachment modifier set [412]?, break modifier [422]?, AS, stream attachment [411]
[171] output action [148] ::= OUTPUT, string expression [258]
[172] output to action [148] ::= OUTPUT-TO, modified output stream set [174]
[173] put action [148] ::= PUT, modified output stream set [174], string expression [258]
[174] modified output stream set [172] [173] [198] ::= modified output stream [175], ((AND | "&"), modified output stream [175])*
[175] modified output stream [174] ::=
built-in output stream shelf name [296]
| shelf item reference [440], stream output modifier set [416]?
[176] remove action [148] ::= REMOVE, shelf item reference [440]
[177] remove key action [148] ::= REMOVE, (KEY | "^"), OF, shelf item reference [440]
[178] reopen action [148] ::= REOPEN, shelf item reference [440], stream attachment modifier set [412]?, break modifier [422]?, (AS, stream attachment [411])?
[179] reset action [148] ::= RESET, shelf item reference [440], (TO, numeric expression [233])?
[180] return action [148] ::= RETURN, expression [232]?
[181] set action [148] ::= SET, shelf item reference [440], TO, expression [232]
[182] set key action [148] ::= SET, (KEY | "^"), OF, shelf item reference [440], TO, string expression [258]
[183] set new action [148] ::= SET, NEW, new shelf item reference [439], protected set stream modifier set [414]?, TO, expression [232]
[184] set stream action [148] ::= SET, settable stream [185], protected set stream modifier set [414]?, TO, string expression [258]
[185] settable stream [184] ::=
stream attachment [411]
| THIS, REFERENT
[186] sgml in action [148] ::= SGML-IN, (string expression [258] | #NONE)
[187] sgml out action [148] ::= SGML-OUT, (string expression [258] | #NONE)
[188] submit action [148] ::= SUBMIT, string expression [258]
[189] succeed action [148] ::= SUCCEED
[190] suppress action [148] ::= SUPPRESS
[191] test system action [148] ::= TEST-SYSTEM, (WITH, string expression [258])?
[192] throw action [148] ::=
THROW, catch invocation [409]
| RETHROW
[193] using prefix [146] ::=
using attribute association prefix [194]
| using group prefix [195]
| using input prefix [196]
| using nested-referents prefix [197]
| using output prefix [198]
| using referents association prefix [199]
| using shelf item association prefix [200]
[194] using attribute association prefix [193] ::= USING, qualified attribute identifier [69], (AS, attribute name [77])?
The alias, attribute name [77], is required if the qualified attribute identifier [69] is a simple qualified attribute identifier [71] that doesn't have an ancestry qualifier [38] (if using ATTRIBUTE) and doesn't have an OF part (if using DATA-ATTRIBUTE).
[195] using group prefix [193] ::=
USING, GROUP, current group set [99]
| USING, GROUP, "(", current group set [99], ")"
[196] using input prefix [193] ::= USING, INPUT, AS, string expression [258]
[197] using nested-referents prefix [193] ::= USING, NESTED-REFERENTS
[198] using output prefix [193] ::= USING, OUTPUT, AS, modified output stream set [174]
[199] using referents association prefix [193] ::= USING, REFERENTS, indexer [444]
[200] using shelf item association prefix [193] ::= USING, shelf item reference [440], AS, shelf name [443]
[201] do action [148] ::= DO, local scope [143], DONE
[202] do conditional action [148] ::= DO, condition [318], local scope [143], (ELSE, condition [318], local scope [143])*, (ELSE, local scope [143], DONE)?
[203] do markup parse action [148] ::=
do generic parse action [222]
| do sgml parse action [220]
| do xml parse action [223]
[204] do scan action [148] ::= DO, SCAN, string expression [258], match alternative [219]+, (ELSE, local scope [143])?, DONE
[205] do select action [148] ::= DO, SELECT, numeric expression [233], (CASE, constant numeric range set [206], local scope [143])+, (ELSE, local scope [143])?, DONE
[206] constant numeric range set [205] ::=
constant numeric range [207], ((OR | "|"), constant numeric range [207])*
| "(", constant numeric range [207], ((OR | "|"), constant numeric range [207])*, ")"
[207] constant numeric range [206] ::= constant numeric expression [246], (TO, constant numeric expression [246])?
[208] do select-type action [148] ::= DO, SELECT-TYPE, user-defined type expression [138], AS, shelf alias [442], (CASE, user-defined type name [137], local scope [143])+, (ELSE, local scope [143])?, DONE
[209] do skip action [148] ::= DO, SKIP, (OVER, pattern expression [335] | PAST, numeric expression [233], (OVER, pattern expression [335])?), local scope [143], (ELSE, local scope [143])?, DONE
[210] repeat action [148] ::= REPEAT, local scope [143], AGAIN
[211] repeat for action [148] ::= REPEAT, for part [212]?, from part [213]?, to part [214]?, by part [215]?, local scope [143], AGAIN
[212] for part [211] ::= FOR, INTEGER, shelf alias [442]
[213] from part [211] ::= FROM, numeric expression [233]
[214] to part [211] ::= TO, numeric expression [233]
[215] by part [211] ::= BY, numeric expression [233]
[216] repeat over action [148] ::= REPEAT, OVER, repeat over component [217], ((AND | "&"), repeat over component [217])*, local scope [143], AGAIN
[217] repeat over component [216] ::=
qualified attribute identifier [69], (AS, attribute alias [76])?
| qualified attribute set identifier [70], (AS, attribute alias [76])?
| shelf reference [441], (AS, shelf alias [442])?
| REFERENTS
| REVERSED?, CURRENT, ELEMENTS, ancestry qualifier [38]?, element alias [44]
[218] repeat scan action [148] ::= REPEAT, SCAN, string expression [258], match alternative [219]+, AGAIN
[219] match alternative [204] [218] ::= MATCH, UNANCHORED?, NULL?, pattern expression [335], condition [318]?, local scope [143]
[220] do sgml parse action [203] ::= DO, SGML-PARSE, sgml parse type [221], SCAN, sgml parse scanning source [230], local scope [143], DONE
[221] sgml parse type [220] ::=
(DOCUMENT | SUBDOCUMENT), (WITH, ID-CHECKING, boolean expression [319])?, (WITH, UTF-8, boolean expression [319])?, (CREATING, sgml dtd pseudo-shelf item [227])?
| INSTANCE, instance element specifier [225]?, sgml dtd specifier [226], (WITH, ID-CHECKING, boolean expression [319])?, (WITH, UTF-8, boolean expression [319])?
[222] do generic parse action [203] ::= DO, MARKUP-PARSE, void function call [387], local scope [143], DONE
[223] do xml parse action [203] ::= DO, XML-PARSE, xml parse type [224]?, SCAN, sgml parse scanning source [230], local scope [143], DONE
[224] xml parse type [223] ::=
DOCUMENT, (WITH, ID-CHECKING, boolean expression [319])?, (WITH, UTF-8, boolean expression [319])?, (CREATING, xml dtd pseudo-shelf item [229])?
| INSTANCE, instance element specifier [225]?, xml dtd specifier [228], (WITH, ID-CHECKING, boolean expression [319])?, (WITH, UTF-8, boolean expression [319])?
[225] instance element specifier [221] [224] ::= WITH, DOCUMENT-ELEMENT, string expression [258]
[226] sgml dtd specifier [221] ::= WITH, (sgml dtd pseudo-shelf item [227] | CURRENT, (DTD | SGML-DTD))
[227] sgml dtd pseudo-shelf item [221] [226] ::= (DTDS | SGML-DTDS), indexer [444]
[228] xml dtd specifier [224] ::= WITH, (xml dtd pseudo-shelf item [229] | CURRENT, XML-DTD)
[229] xml dtd pseudo-shelf item [224] [228] ::= XML-DTDS, indexer [444]
[230] sgml parse scanning source [220] [223] ::=
INPUT, void function call [387]
| string expression [258]
[231] dtd pool test primary [323] ::= (DTDS | SGML-DTDS | XML-DTDS), (HAS | HASNT), (KEY | "^"), string expression [258]
[232] expression [180] [181] [183] ::=
boolean expression [319]
| numeric expression [233]
| string expression [258]
| user-defined type expression [138]
[233] numeric expression [157] [164] [165] [166] [179] [205] [209] [213] [214] [215] [232] [242] [345] [371] [393] [437] [445] ::=
boolean term [321], "->", numeric expression [233], "|", numeric expression [233]
| numeric subexpression [234]
[234] numeric subexpression [233] [253] [254] [255] [256] [260] [261] [421] [422] ::= numeric term [236], (numeric additive operator [235], numeric term [236])*
[235] numeric additive operator [234] [246] ::=
PLUS
| "+"
| MINUS
| "-"
| UNION
| DIFFERENCE
[236] numeric term [234] ::= numeric factor [238], (numeric multiplicative operator [237], numeric factor [238])*
[237] numeric multiplicative operator [236] [247] ::=
TIMES
| "*"
| DIVIDE
| "/"
| MODULO
| MASK
| SHIFT
[238] numeric factor [236] ::= numeric tertiary [239], ("**", numeric factor [238])?
[239] numeric tertiary [238] ::=
numeric secondary [241]
| string secondary [262], (numeric conversion operator [240], numeric secondary [241])?
[240] numeric conversion operator [239] [249] ::=
BASE
| BINARY
[241] numeric secondary [239] ::=
argument primary [392], (user-defined infix function name [465], argument primary [392])+
| numeric primary [242]
[242] numeric primary [241] [392] [445] ::=
value function call [386]
| string primary [263]
| (NEGATE | "-"), numeric primary [242]
| COMPLEMENT, numeric primary [242]
| built-in read-only numeric shelf name [257]
| shelf item reference [440]
| BINARY, string primary [263]
| CHILDREN, ancestry qualifier [38]?
| (ITEM, OF | "@", OF), item-of reference [243]
| LENGTH, OF, string primary [263]
| (NUMBER, OF | NUMBER-OF), number-of reference [244]
| OCCURRENCE, ancestry qualifier [38]?
| SYSTEM-CALL, string primary [263]
| number [245]
| "(", numeric expression [233], ")"
[243] item-of reference [242] ::=
shelf item reference [440]
| simple qualified attribute set identifier [73], key indexer [446]
| REFERENTS, key indexer [446]
| THIS, REFERENT
[244] number-of reference [242] ::=
qualified attribute identifier [69]
| qualified attribute set identifier [70]
| shelf reference [441]
| CURRENT, ELEMENTS, ancestry qualifier [38]?
| CURRENT, SUBDOCUMENTS
| REFERENTS
[245] number [126] [242] [250] [281] [282] [303] [304] [305] [308] [309] [313] [314] [316] [317] [422] [456] [468] ::= digit [459]+
[246] constant numeric expression [117] [118] [126] [207] [250] [273] [434] [435] ::= constant numeric term [247], (numeric additive operator [235], constant numeric term [247])*
[247] constant numeric term [246] ::= constant numeric factor [248], (numeric multiplicative operator [237], constant numeric factor [248])*
[248] constant numeric factor [247] ::= constant numeric secondary [249], ("**", constant numeric factor [248])?
[249] constant numeric secondary [248] ::=
constant numeric primary [250]
| constant string primary [274], numeric conversion operator [240], constant numeric primary [250]
[250] constant numeric primary [249] [272] ::=
constant string primary [274]
| (NEGATE | "-"), constant numeric primary [250]
| COMPLEMENT, constant numeric primary [250]
| BINARY, constant string primary [274]
| LENGTH, OF, constant string primary [274]
| number [245]
| "(", constant numeric expression [246], ")"
[251] numeric test primary [323] ::= VALUE?, full numeric test [252]
[252] full numeric test [251] ::=
ascending numeric comparison [253]
| descending numeric comparison [254]
| equality numeric comparison [255]
| inequality numeric comparison [256]
[253] ascending numeric comparison [252] ::= numeric subexpression [234], (equality comparer [328], numeric subexpression [234])*, strongly ascending comparer [332], numeric subexpression [234], (weakly ascending comparer [330], numeric subexpression [234])*
[254] descending numeric comparison [252] ::= numeric subexpression [234], (equality comparer [328], numeric subexpression [234])*, strongly descending comparer [333], numeric subexpression [234], (weakly descending comparer [331], numeric subexpression [234])*
[255] equality numeric comparison [252] ::= numeric subexpression [234], (equality comparer [328], numeric subexpression [234])+
[256] inequality numeric comparison [252] ::= numeric subexpression [234], inequality comparer [329], numeric subexpression [234]
[257] built-in read-only numeric shelf name [242] ::=
#CLASS
| #ERROR-CODE
| #ITEM
| #LINE-NUMBER
| #MARKUP-ERROR-COUNT
| #MARKUP-ERROR-TOTAL
| #MARKUP-WARNING-COUNT
| #MARKUP-WARNING-TOTAL
| #SGML-ERROR-COUNT
| #SGML-ERROR-TOTAL
| #SGML-WARNING-COUNT
| #SGML-WARNING-TOTAL
[258] string expression [150] [166] [169] [171] [173] [182] [184] [186] [187] [188] [191] [196] [204] [218] [225] [230] [231] [232] [263] [292] [372] [373] [393] [411] [420] [438] [446] [469] [470] ::=
boolean term [321], "->", string expression [258], "|", string expression [258]
| string subexpression [259]
[259] string subexpression [258] [287] [288] [289] [290] [291] [292] ::= string term [260], ((JOIN | "||"), string term [260])*
[260] string term [259] ::=
string factor [261], ((REPEATED | "||*"), numeric subexpression [234])*
| string factor [261], TAKE, UNANCHORED?, pattern secondary [339]
| string factor [261], DROP, UNANCHORED?, pattern secondary [339]
| REFERENT, string primary [263]
| SILENT-REFERENT, string primary [263]
[261] string factor [260] ::= string secondary [262], ((FORMAT | "%"), (numeric subexpression [234] | string secondary [262]))*
[262] string secondary [239] [261] ::=
argument primary [392], (user-defined infix function name [465], argument primary [392])+
| string primary [263]
[263] string primary [84] [242] [260] [262] [293] [342] [392] [446] [448] ::=
stream input/output mode [266]?, value function call [386]
| SOURCE?, built-in read-only source shelf name [299]
| built-in read-only stream shelf name [297]
| built-in read-write stream shelf name [298]
| constant string value [275]
| external function association enquiry [396]
| pattern name [341]
| qualified attribute part identifier [68]
| referent item reference [264]
| shelf item reference [440]
| stream input/output mode [266]?, FILE, string primary [263]
| DATE, string primary [263]
| (KEY, OF | "^", OF), key-of reference [265]
| NAME, OF, shelf item reference [440]
| NAME, OF, specific element selector [40]
| XMLNS-NAME, (OF, specific element selector [40])?
| "~", string primary [263]
| string literal [267]
| "(", string expression [258], ")"
[264] referent item reference [263] ::=
REFERENTS, indexer [444]
| THIS, REFERENT
[265] key-of reference [263] ::=
qualified attribute identifier [69]
| shelf item reference [440]
| REFERENTS, item indexer [445]
| THIS, REFERENT
[266] stream input/output mode [263] ::=
(BUFFERED | UNBUFFERED), (TEXT-MODE | BINARY-MODE)?
| (TEXT-MODE | BINARY-MODE), (BUFFERED | UNBUFFERED)?
[267] string literal [263] [342] [456] ::= string literal part [268], ("_", string literal part [268])*
[268] string literal part [267] ::=
double-quoted string literal part [269]
| single-quoted string literal part [270]
[269] double-quoted string literal part [268] ::= """, (described character [281] | described substring [282] | escaped text [280] | format item [302] | unescaped character [467] | "'")*, """
[270] single-quoted string literal part [268] ::= "'", (described character [281] | described substring [282] | escaped text [280] | format item [302] | unescaped character [467] | """)*, "'"
[271] constant string expression [104] [107] [110] [120] [124] [125] [128] [129] [274] [300] [301] ::= constant string term [272], ((JOIN | "||"), constant string term [272])*
[272] constant string term [271] ::= constant string factor [273], ((REPEATED | "||*"), constant numeric primary [250])?
[273] constant string factor [272] ::= constant string primary [274], ((FORMAT | "%"), (constant numeric expression [246] | constant string primary [274]))*
[274] constant string primary [249] [250] [273] [275] [350] ::=
constant string value [275]
| constant string literal [276]
| "(", constant string expression [271], ")"
[275] constant string value [263] [274] ::= COMPILED-DATE, constant string primary [274]
[276] constant string literal [35] [37] [51] [67] [77] [98] [101] [102] [274] [421] ::= constant string literal part [277], ("_", constant string literal part [277])*
[277] constant string literal part [276] ::=
double-quoted constant string literal part [278]
| single-quoted constant string literal part [279]
[278] double-quoted constant string literal part [277] ::= """, (described character [281] | described substring [282] | escaped text [280] | unescaped character [467] | "'")*, """
[279] single-quoted constant string literal part [277] ::= "'", (described character [281] | described substring [282] | escaped text [280] | unescaped character [467] | """)*, "'"
[280] escaped text [269] [270] [278] [279] ::= escape [466], (escape [466] | """ | "'" | "#" | ")")
[281] described character [269] [270] [278] [279] ::=
escape [466], "_"
| escape [466], "n"
| escape [466], "t"
| escape [466], number [245], "#"
[282] described substring [269] [270] [278] [279] [468] ::= escape [466], number [245], "r", "{", describing number [468], (",", describing number [468])*, "}"
[283] stream test primary [323] ::=
shelf item reference [440], (HAS | HASNT), NAME
| shelf item reference [440], (IS | ISNT), stream type set [284]
| #CURRENT-OUTPUT, (IS | ISNT), ATTACHED
| OUTPUT, (IS | ISNT), stream type set [284]
| SGML, (IS | ISNT), stream type set [284]
The use of the OUTPUT and SGML keywords is deprecated in favour of #MAIN-OUTPUT and #SGML or #MARKUP-PARSER, respectively.
[284] stream type set [283] ::=
stream type [285]
| "(", stream type [285], ((AND | "&"), stream type [285])*, ")"
| "(", stream type [285], ((OR | "|"), stream type [285])*, ")"
[285] stream type [284] ::=
ATTACHED
| BUFFER
| CLOSED
| EXTERNAL
| FILE
| MARKUP-PARSER
| OPEN
| REFERENT
| SGML-PARSER
SGML-PARSER is deprecated in favour of the more general MARKUP-PARSER.
[286] string test primary [323] ::=
ascending string comparison [287]
| descending string comparison [288]
| equality string comparison [289]
| inequality string comparison [290]
| string match test primary [291]
| string set test primary [292]
[287] ascending string comparison [286] ::= string subexpression [259], (equality comparer [328], string subexpression [259])*, strongly ascending comparer [332], string subexpression [259], (weakly ascending comparer [330], string subexpression [259])*
[288] descending string comparison [286] ::= string subexpression [259], (equality comparer [328], string subexpression [259])*, strongly descending comparer [333], string subexpression [259], (weakly descending comparer [331], string subexpression [259])*
[289] equality string comparison [286] ::= string subexpression [259], (equality comparer [328], string subexpression [259])+
[290] inequality string comparison [286] ::= string subexpression [259], inequality comparer [329], string subexpression [259]
[291] string match test primary [286] ::= string subexpression [259], MATCHES, UNANCHORED?, pattern secondary [339]
[292] string set test primary [286] ::=
string subexpression [259], comparer [326], UL, string subexpression [259]
| string subexpression [259], comparer [326], UL?, "(", string expression [258], ((OR | "|"), string expression [258])*, ")"
[293] source test primary [323] ::=
FILE, string primary [263], EXISTS
| FILE, string primary [263], (IS | ISNT), file info enquiry set [294]
| #CURRENT-INPUT, (IS | ISNT), ATTACHED
[294] file info enquiry set [293] ::=
file info enquiry [295]
| "(", file info enquiry [295], ((AND | "&"), file info enquiry [295])*, ")"
[295] file info enquiry [294] ::=
DIRECTORY
| FILE
| READABLE
| WRITABLE
[296] built-in output stream shelf name [163] [175] ::=
#CONSOLE
| #CURRENT-OUTPUT
| #ERROR
| #SUPPRESS
| #MAIN-OUTPUT
| #OUTPUT
| #SGML
| #MARKUP-PARSER
| OUTPUT
| SGML
The use of the OUTPUT and SGML keywords is deprecated in favour of #MAIN-OUTPUT and #SGML or #MARKUP-PARSER, respectively.
The use of the #OUTPUT keyword is deprecated in favour of #CURRENT-OUTPUT.
[297] built-in read-only stream shelf name [263] ::=
#ADDITIONAL-INFO
| #APPINFO
| #COMMAND-LINE-NAMES
| #ARGS
| #DOCTYPE
| #FILE-NAME
| #LANGUAGE-VERSION
| #MESSAGE
| #PLATFORM-INFO
| #RECOVERY-INFO
| #XMLNS-NAMES
[298] built-in read-write stream shelf name [263] ::=
#LIBPATH
| #LIBRARY
| #LIBVALUE
[299] built-in read-only source shelf name [263] ::=
#PROCESS-INPUT
| #MAIN-INPUT
[300] symbol declaration [115] ::= SYMBOL, constant string expression [271]+
[301] delimiter declaration [115] ::= DELIMITER, constant string expression [271]
[302] format item [269] [270] ::=
alphabetic format item [303]
| attribute format item [304]
| binary format item [305]
| break format item [306]
| content format item [307]
| current name format item [308]
| decimal format item [309]
| end break suppress format item [310]
| macro format item [311]
| other format item [312]
| pattern format item [313]
| roman format item [314]
| start break suppress format item [315]
| stream format item [316]
| symbol format item [317]
[303] alphabetic format item [302] ::= escape [466], (number [245], "f" | "j" | "k" | "l" | "u" | "w")*, "a", "(", shelf item reference [440], ")"
[304] attribute format item [302] ::= escape [466], (number [245], "f" | "k" | "e" | "h" | "l" | "o" | "p" | "s" | "u" | "z")*, "v", "(", attribute name [77], ")"
[305] binary format item [302] ::= escape [466], (number [245], "f" | number [245])*, "b", "(", shelf item reference [440], ")"
[306] break format item [302] ::= escape [466], "/"
[307] content format item [302] ::= escape [466], ("h" | "l" | "s" | "u" | "z")*, "c"
[308] current name format item [302] ::= escape [466], ("e" | number [245], "f" | "k" | "l" | "o" | "p" | "u")*, "q"
[309] decimal format item [302] ::= escape [466], (number [245], "f" | ("k" | "z") | "l" | number [245], "r" | "s" | "u" | number [245])*, "d", "(", shelf item reference [440], ")"
[310] end break suppress format item [302] ::= escape [466], "]"
[311] macro format item [302] ::= escape [466], ("u" | "l")?, "@", (escape [466] | "(", name [457], ")")
[312] other format item [302] ::=
escape [466], "s", "_"
| escape [466], "s", "n"
| escape [466], "s", "t"
| escape [466], "e", "n"
[313] pattern format item [302] ::= escape [466], (number [245], "f" | "k" | "h" | "l" | "s" | "u")*, "x", "(", pattern name [341], ")"
[314] roman format item [302] ::= escape [466], (number [245], "f" | "k" | "l" | "u")*, "i", "(", shelf item reference [440], ")"
[315] start break suppress format item [302] ::= escape [466], "["
[316] stream format item [302] ::= escape [466], (number [245], "f" | "k" | "l" | "u" | "e")*, "g", "(", (shelf item reference [440] | pattern name [341]), ")"
[317] symbol format item [302] ::= escape [466], (number [245], "f" | "k")*, "y", "(", shelf item reference [440], ")"
[318] condition [4] [5] [6] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [86] [87] [88] [90] [128] [129] [147] [202] [219] [342] ::= (WHEN | UNLESS), boolean expression [319]
[319] boolean expression [150] [221] [224] [232] [318] [325] [370] [393] [436] ::= boolean conditional [320], ((OR | "|"), boolean conditional [320])*
[320] boolean conditional [319] ::=
boolean term [321], "->", boolean conditional [320], "|", boolean conditional [320]
| boolean term [321]
[321] boolean term [138] [233] [258] [320] ::= boolean factor [322], ((AND | "&"), boolean factor [322])*
[322] boolean factor [321] ::= (NOT | "!")?, boolean tertiary [323]
[323] boolean tertiary [322] ::=
argument test primary [398]
| attribute test primary [83]
| attributes test primary [84]
| catch test primary [410]
| dtd pool test primary [231]
| element test primary [45]
| entity test primary [52]
| numeric test primary [251]
| pattern test primary [352]
| shelf test primary [448]
| source test primary [293]
| stream test primary [283]
| string test primary [286]
| user-defined type test primary [141]
| boolean secondary [324], ((equality comparer [328], boolean secondary [324])+ | inequality comparer [329], boolean secondary [324])?
[324] boolean secondary [323] ::=
argument primary [392], (user-defined infix function name [465], argument primary [392])+
| boolean primary [325]
[325] boolean primary [324] [342] [392] ::=
built-in read-only switch shelf name [334]
| shelf item reference [440]
| value function call [386]
| FALSE
| TRUE
| "~", boolean primary [325]
| ACTIVE, boolean primary [325]
| "(", boolean expression [319], ")"
[326] comparer [292] ::=
equivalence comparer [327]
| strongly ascending comparer [332]
| strongly descending comparer [333]
[327] equivalence comparer [52] [326] ::=
equality comparer [328]
| inequality comparer [329]
[328] equality comparer [253] [254] [255] [287] [288] [289] [323] [327] [330] [331] ::=
IS, EQUAL
| "="
[329] inequality comparer [256] [290] [323] [327] ::=
ISNT, EQUAL
| "!", "="
[330] weakly ascending comparer [253] [287] ::=
equality comparer [328]
| strongly ascending comparer [332]
[331] weakly descending comparer [254] [288] ::=
equality comparer [328]
| strongly descending comparer [333]
[332] strongly ascending comparer [253] [287] [326] [330] ::=
IS, LESS-EQUAL
| ISNT, GREATER-THAN
| "<="
| IS, LESS-THAN
| ISNT, GREATER-EQUAL
| "<"
[333] strongly descending comparer [254] [288] [326] [331] ::=
IS, GREATER-EQUAL
| ISNT, LESS-THAN
| ">="
| IS, GREATER-THAN
| ISNT, LESS-EQUAL
| ">"
[334] built-in read-only switch shelf name [325] ::=
#FIRST
| #LAST
[335] pattern expression [26] [28] [87] [209] [219] [342] ::= pattern product [336], ((OR | "|"), pattern product [336])*
[336] pattern product [335] ::=
pattern factor [337], pattern product [336]?
| LOOKAHEAD, pattern product [336]
| NOT, pattern product [336]
| (character set [347] | character class name [346]), ("**" | "++"), ("=>", pattern name [341])?, pattern product [336]
[337] pattern factor [336] ::=
(pattern entity type [343] | pattern nonentity type [344])?, pattern tertiary [338]
| pattern entity type [343], NAMED, pattern tertiary [338], (VALUED, pattern tertiary [338])?
| pattern entity type [343], VALUED, pattern tertiary [338], (NAMED, pattern tertiary [338])?
| pattern nonentity type [344], VALUED, pattern tertiary [338]
[338] pattern tertiary [337] ::= pattern secondary [339], ("=>", pattern name [341])?
[339] pattern secondary [260] [291] [338] ::= pattern primary [340], occurrence indicator [345]?
[340] pattern primary [339] ::= UL?, ul pattern primary [342]
[341] pattern name [263] [313] [316] [336] [338] [342] [352] ::= name [457]
[342] ul pattern primary [340] ::=
character class name [346]
| character set [347]
| string literal [267]
| positional pattern [351]
| ANOTHER?, pattern name [341]
| value function call [386]
| "~", string primary [263]
| "~", boolean primary [325]
| "(", condition [318], ")"
| "(", pattern expression [335], condition [318]?, ")"
[343] pattern entity type [337] ::=
CDATA
| SDATA
| ENTITY
[344] pattern nonentity type [337] ::=
PCDATA
| NON-CDATA
| NON-SDATA
| TEXT
[345] occurrence indicator [339] ::=
"?"
| "+"
| "*"
| "{", numeric expression [233], "}"
| "{", numeric expression [233], TO, numeric expression [233], "}"
| "{", numeric expression [233], "}", "+"
[346] character class name [336] [342] [350] ::=
ANY
| ANY-TEXT
| BLANK
| DIGIT
| LC
| LETTER
| SPACE
| UC
| WHITE-SPACE
[347] character set [336] [342] ::=
"[", character set term [349], (character set exception operator [348], character set term [349])?, "]"
| "[", character set exception operator [348], character set term [349], "]"
[348] character set exception operator [347] ::=
"\"
| EXCEPT
[349] character set term [347] ::= character set product [350], ((OR | "|"), character set product [350])*
[350] character set product [349] ::=
character class name [346]
| constant string primary [274], (TO, constant string primary [274])?
[351] positional pattern [342] ::=
CONTENT-END
| CONTENT-START
| LINE-END
| LINE-START
| VALUE-END
| VALUE-START
| WORD-END
| WORD-START
[352] pattern test primary [323] ::= pattern name [341], (IS | ISNT), SPECIFIED
[353] function definition [116] ::=
external prefix function definition [354]
| external infix function definition [355]
| external conversion function definition [356]
| external markup-parser function definition [357]
| internal prefix function definition [358]
| internal infix function definition [359]
| internal conversion function definition [360]
[354] external prefix function definition [353] [368] ::= (DEFINE | EXPORT), function categorization kind [361]?, EXTERNAL, external passed type [362]?, (PREFIX-FUNCTION | FUNCTION), function name [363], function argument list definition [365]?, external function binding [384]
[355] external infix function definition [353] [368] ::= (DEFINE | EXPORT), OVERLOADED?, EXTERNAL, (first-class type [130] | SOURCE), INFIX-FUNCTION, (first-class type [130] | SOURCE), name [457], function name [363], (first-class type [130] | SOURCE), name [457], external function binding [384]
[356] external conversion function definition [353] [368] ::= (DEFINE | EXPORT), EXTERNAL, (first-class type [130] | SOURCE), CONVERSION-FUNCTION, function argument definition [368], external function binding [384]
[357] external markup-parser function definition [353] [369] ::= (DEFINE | EXPORT), EXTERNAL, MARKUP-PARSER, (PREFIX-FUNCTION | FUNCTION), function name [363], function argument list definition [365]?, external function binding [384]
[358] internal prefix function definition [353] [368] ::= (DEFINE | EXPORT), function categorization kind [361]?, (first-class type [130] | INPUT)?, (PREFIX-FUNCTION | FUNCTION), function name [363], function argument list definition [365]?, internal function binding [385]
[359] internal infix function definition [353] [368] ::= (DEFINE | EXPORT), OVERLOADED?, (first-class type [130] | INPUT), INFIX-FUNCTION, first-class type [130], name [457], function name [363], first-class type [130], name [457], internal function binding [385]
[360] internal conversion function definition [353] [368] ::= (DEFINE | EXPORT), (first-class type [130] | INPUT), CONVERSION-FUNCTION, function argument definition [368], internal function binding [385]
[361] function categorization kind [354] [358] ::=
DYNAMIC?, OVERLOADED
| OVERRIDING
[362] external passed type [354] [364] ::=
first-class type [130]
| OUTPUT
| SOURCE
[363] function name [354] [355] [357] [358] [359] [364] [397] ::= name [457]
[364] require function definition [116] ::= REQUIRE, (external passed type [362] | INPUT | MARKUP-PARSER)?, (PREFIX-FUNCTION | FUNCTION), function name [363], function argument list definition [365]?
[365] function argument list definition [354] [357] [358] [364] ::=
parenthesized function argument list definition [366]
| unparenthesized function argument list definition [367]
[366] parenthesized function argument list definition [365] ::=
"(", ")"
| "(", function argument definition [368], (argument separator [382], function argument definition [368])*, (argument separator [382], remainder shelf argument definition [378], (argument separator [382], ".", ".", ".")?, ")")?
| "(", remainder shelf argument definition [378], argument separator [382], ".", ".", ".", ")"
[367] unparenthesized function argument list definition [365] ::=
argument herald [383]?, function argument definition [368], (argument herald [383], function argument definition [368])*, (argument herald [383], remainder shelf argument definition [378], (argument herald [383], ".", ".", ".")?)?
| argument herald [383], remainder shelf argument definition [378], (argument herald [383], ".", ".", ".")?
| remainder shelf argument definition [378], argument herald [383], ".", ".", "."
[368] function argument definition [356] [360] [366] [367] ::=
expression argument definition [369]
| modifiable shelf argument definition [376]
| read-only shelf argument definition [377]
| write-only shelf argument definition [379]
| converting argument definition [380]
A converting argument definition [380] is only allowed as the first argument of an OVERLOADED external prefix function definition [354] or internal prefix function definition [358], as an argument of an OVERLOADED external infix function definition [355] or internal infix function definition [359], or as the argument of an external conversion function definition [356] or internal conversion function definition [360].
[369] expression argument definition [368] [405] ::=
boolean expression argument definition [370]
| numeric expression argument definition [371]
| parser-input expression argument definition [372]
| string expression argument definition [373]
| user-defined type expression argument definition [374]
| second-class expression argument definition [375]
A parser-input expression argument definition [372] is only allowed for an external markup-parser function definition [357].
A second-class expression argument definition [375] is only allowed for an EXTERNAL function.
[370] boolean expression argument definition [369] ::= VALUE, SWITCH, name [457], (OPTIONAL, (INITIAL, "{", boolean expression [319], "}")?)?
[371] numeric expression argument definition [369] ::= VALUE, (COUNTER | INTEGER | INT32), name [457], (OPTIONAL, (INITIAL, "{", numeric expression [233], "}")?)?
[372] parser-input expression argument definition [369] ::= VALUE, PARSER-INPUT, name [457], (OPTIONAL, (INITIAL, "{", string expression [258], "}")?)?
A parser-input expression argument definition [372] is only allowed as an argument for an EXTERNAL MARKUP-PARSER function.
[373] string expression argument definition [369] ::= VALUE, STREAM, name [457], (OPTIONAL, (INITIAL, "{", string expression [258], "}")?)?
[374] user-defined type expression argument definition [369] ::= VALUE, user-defined type name [137], name [457], OPTIONAL?
[375] second-class expression argument definition [369] ::= VALUE, (SOURCE | OUTPUT), name [457]
A second-class expression argument definition [375] is only allowed as an argument for an EXTERNAL function.
[376] modifiable shelf argument definition [368] ::= MODIFIABLE, first-class type [130], name [457], OPTIONAL?
[377] read-only shelf argument definition [368] [405] ::= READ-ONLY, first-class type [130], name [457], OPTIONAL?
[378] remainder shelf argument definition [366] [367] ::= REMAINDER, first-class type [130], name [457]
[379] write-only shelf argument definition [368] ::= WRITE-ONLY, first-class type [130], name [457]
[380] converting argument definition [368] ::=
VALUE, "(", ANY, INTO, first-class type [130], ")"
| VALUE, "(", source type name [381], ((OR | "|"), source type name [381])*, INTO, first-class type [130], ")"
[381] source type name [380] ::=
first-class type [130]
| SOURCE
| NUMERIC-LITERAL
A SOURCE argument is only allowed for an EXTERNAL function definition.
[382] argument separator [366] [388] [403] ::=
argument herald [383]
| ","
[383] argument herald [367] [382] [389] [390] [404] ::= name [457]
[384] external function binding [354] [355] [356] [357] ::= AS, system-specific function name [469], (IN, FUNCTION-LIBRARY, system-specific library name [470])?
[385] internal function binding [358] [359] [360] ::=
AS, local scope [143]
| ELSEWHERE
[386] value function call [140] [242] [263] [325] [342] [411] ::=
prefix function name [461], parenthesized call arguments [388]
| prefix function name [461], unparenthesized call arguments [389]
[387] void function call [148] [222] [230] ::=
prefix function name [461], parenthesized call arguments [388]
| prefix function name [461], void unparenthesized call arguments [390]
[388] parenthesized call arguments [386] [387] [409] ::= "(", (argument expression [391], (argument separator [382], argument expression [391])*)?, ")"
[389] unparenthesized call arguments [386] [409] ::= (argument herald [383]?, argument primary [392], (argument herald [383], argument primary [392])*)?
[390] void unparenthesized call arguments [387] ::= (argument herald [383]?, argument expression [391], (argument herald [383], argument expression [391])*)?
[391] argument expression [388] [390] ::=
argument shelf reference [394]
| argument value expression [393]
[392] argument primary [139] [241] [262] [324] [389] ::=
argument shelf reference [394]
| numeric primary [242]
| string primary [263]
| boolean primary [325]
| user-defined type primary [140]
[393] argument value expression [391] ::=
boolean expression [319]
| numeric expression [233]
| string expression [258]
| user-defined type expression [138]
[394] argument shelf reference [391] [392] [398] ::= shelf item reference [440]
[395] set external function association action [148] ::=
SET, external function identification [397], TO, system-specific function name [469]
| SET, FUNCTION-LIBRARY, OF, external function identification [397], TO, system-specific library name [470]
[396] external function association enquiry [263] ::= (FUNCTION-LIBRARY, OF)?, external function identification [397]
[397] external function identification [395] [396] ::=
(EXTERNAL-FUNCTION | EXTERNAL-OUTPUT-FUNCTION), function name [363]
| CREATOR, OF, user-defined type name [137]
[398] argument test primary [323] ::= argument shelf reference [394], (IS | ISNT), SPECIFIED
[399] catch definition [116] ::= (DECLARE | EXPORT | REQUIRE), catch signature [400]
[400] catch signature [399] ::= CATCH, catch name [401], catch argument list definition [402]?
[401] catch name [400] [409] [410] ::= name [457]
[402] catch argument list definition [400] ::=
parenthesized catch argument list definition [403]
| unparenthesized catch argument list definition [404]
[403] parenthesized catch argument list definition [402] ::=
"(", ")"
| "(", catch argument definition [405], (argument separator [382], catch argument definition [405])*, ")"
[404] unparenthesized catch argument list definition [402] ::= argument herald [383]?, catch argument definition [405], (argument herald [383], catch argument definition [405])*
[405] catch argument definition [403] [404] ::=
expression argument definition [369]
| read-only shelf argument definition [377]
[406] built-in catch invocation [145] ::=
external-exception invocation [407]
| program-error invocation [408]
[407] external-exception invocation [406] ::= #EXTERNAL-EXCEPTION, (IDENTITY, name [457])?, (MESSAGE, name [457])?, (LOCATION, name [457])?
[408] program-error invocation [406] ::= #PROGRAM-ERROR, (CODE, name [457])?, (MESSAGE, name [457])?, (LOCATION, name [457])?
[409] catch invocation [145] [192] ::=
catch name [401], parenthesized call arguments [388]
| catch name [401], unparenthesized call arguments [389]
[410] catch test primary [323] ::= (catch name [401] | #EXTERNAL-EXCEPTION | #PROGRAM-ERROR), (IS | ISNT), (CATCHABLE | THROWN)
[411] stream attachment [170] [178] [185] ::=
BUFFER
| FILE?, string expression [258]
| REFERENT, string expression [258]
| value function call [386]
The use of the FILE keyword is optional, however its omission is deprecated.
[412] stream attachment modifier set [170] [178] ::= WITH, stream attachment modifier group [413], (WITH, stream attachment modifier group [413])*
[413] stream attachment modifier group [412] ::=
stream attachment modifier [418]
| "(", stream attachment modifier [418], ((AND | "&"), stream attachment modifier [418])*, ")"
[414] protected set stream modifier set [183] [184] ::= WITH, protected set stream modifier group [415], (WITH, protected set stream modifier group [415])*
[415] protected set stream modifier group [414] ::=
stream creation modifier [420]
| stream output modifier [421]
| "(", set stream modifier [419], ((AND | "&"), set stream modifier [419])*, ")"
[416] stream output modifier set [175] ::= WITH, stream output modifier group [417], (WITH, stream output modifier group [417])*
[417] stream output modifier group [416] ::=
stream output modifier [421]
| "(", stream output modifier [421], ((AND | "&"), stream output modifier [421])*, ")"
[418] stream attachment modifier [413] ::= set stream modifier [419]
[419] set stream modifier [415] [418] ::=
break modifier [422]
| stream creation modifier [420]
| stream output modifier [421]
[420] stream creation modifier [415] [419] ::=
BINARY-MODE
| BUFFERED
| DOMAIN-FREE
| REFERENTS-ALLOWED, (DEFAULTING, "{", string expression [258], (",", string expression [258])?, "}")?
| REFERENTS-DISPLAYED
| REFERENTS-NOT-ALLOWED
| TEXT-MODE
| UNBUFFERED
[421] stream output modifier [415] [417] [419] ::=
constant string literal [276]
| BINARY, numeric subexpression [234]
[422] break modifier [170] [178] [419] ::= BREAK-WIDTH, numeric subexpression [234], (number [245] | TO, numeric subexpression [234])?
[423] global shelf definition [116] ::= EXPORT?, (CONSTANT | GLOBAL), shelf declaration [429], ((AND | "&"), shelf declaration [429])*
[424] require shelf definition [116] ::= REQUIRE, (GLOBAL | CONSTANT), first-class type [130], shelf name [443]
[425] local declaration [143] ::=
global shelf save declaration [426]
| groups save declaration [427]
| local shelf declaration [428]
[426] global shelf save declaration [425] ::= (SAVE | SAVE-CLEAR), shelf name [443], ((AND | "&"), shelf name [443])*
[427] groups save declaration [425] ::= SAVE, GROUPS
[428] local shelf declaration [425] ::= LOCAL, shelf declaration [429], ((AND | "&"), shelf declaration [429])*
[429] shelf declaration [135] [423] [428] ::=
boolean shelf declaration [430]
| numeric shelf declaration [431]
| string shelf declaration [432]
| user-defined type shelf declaration [433]
[430] boolean shelf declaration [429] ::= SWITCH, shelf name [443], (fixed-size shelf declaration [435] | variable-size shelf declaration [434]), boolean shelf initializer [436]?
[431] numeric shelf declaration [429] ::= (COUNTER | INTEGER | INT32), shelf name [443], (fixed-size shelf declaration [435] | variable-size shelf declaration [434]), numeric shelf initializer [437]?
[432] string shelf declaration [429] ::= STREAM, shelf name [443], (fixed-size shelf declaration [435] | variable-size shelf declaration [434]), string shelf initializer [438]?
[433] user-defined type shelf declaration [429] ::= user-defined type name [137], shelf name [443], (fixed-size shelf declaration [435] | variable-size shelf declaration [434])
[434] variable-size shelf declaration [430] [431] [432] [433] ::= VARIABLE, (TO, constant numeric expression [246])?, (INITIAL-SIZE, constant numeric expression [246])?
[435] fixed-size shelf declaration [430] [431] [432] [433] ::= (SIZE, constant numeric expression [246])?
[436] boolean shelf initializer [430] ::= (INITIAL, "{", boolean expression [319], (",", boolean expression [319])*, "}")?
[437] numeric shelf initializer [431] ::= (INITIAL, "{", numeric expression [233], (",", numeric expression [233])*, "}")?
[438] string shelf initializer [432] ::= (INITIAL, "{", (string expression [258] | UNATTACHED), (",", (string expression [258] | UNATTACHED))*, "}")?
[439] new shelf item reference [167] [183] ::= shelf reference [441], key indexer [446]?, ((AFTER | BEFORE), indexer [444])?
[440] shelf item reference [140] [149] [152] [156] [157] [158] [163] [165] [170] [175] [176] [177] [178] [179] [181] [182] [200] [242] [243] [263] [265] [283] [303] [305] [309] [314] [316] [317] [325] [394] ::= shelf reference [441], indexer [444]?
[441] shelf reference [151] [154] [155] [217] [244] [439] [440] [448] ::= shelf name [443]
[442] shelf alias [208] [212] [217] ::= shelf name [443]
[443] shelf name [200] [424] [426] [430] [431] [432] [433] [441] [442] ::= name [457]
[444] indexer [72] [199] [227] [229] [264] [439] [440] ::=
item indexer [445]
| key indexer [446]
| lastmost indexer [447]
[445] item indexer [68] [265] [444] [448] ::=
ITEM, numeric primary [242]
| "@", numeric primary [242]
| "[", numeric expression [233], "]"
This use of the keywords ITEM and "@" is deprecated in favour of the more general "[" and "]" indexing form.
[446] key indexer [243] [439] [444] ::=
KEY, string primary [263]
| "^", string primary [263]
| "{", string expression [258], "}"
This use of the keywords KEY and "^" is deprecated in favour of the more general "{" and "}" indexing form.
[447] lastmost indexer [444] ::= LASTMOST
[448] shelf test primary [323] ::=
shelf reference [441], item indexer [445]?, (IS | ISNT), KEYED
| shelf reference [441], (HAS | HASNT), (KEY | "^"), string primary [263]
| REFERENTS, (HAS | HASNT), (KEY | "^"), string primary [263]
[449] macro definition [115] ::= MACRO, macro name [450], parameter template [451]*, IS, replacement template item [456]*, MACRO-END
[450] macro name [449] ::= macro token [453]+
[451] parameter template [449] ::=
ARG, macro parameter [452], macro token [453]+
| TOKEN, macro parameter [452], macro token [453]*
[452] macro parameter [451] [453] [456] ::=
delimiter token [454]
| name [457]
[453] macro token [450] [451] ::= LITERAL?, macro parameter [452]
[454] delimiter token [452] [456] ::=
infix function name [460]
| delimiter character [455]
[455] delimiter character [454] ::= "(" | ")" | "{" | "}" | "[" | "]" | "`" | ":" | "."
[456] replacement template item [449] ::=
macro parameter [452]
| LITERAL?, string literal [267]
| LITERAL?, delimiter token [454]
| LITERAL?, name [457]
| LITERAL?, number [245]
[457] name [35] [37] [44] [51] [67] [76] [77] [98] [102] [103] [104] [105] [106] [137] [311] [341] [355] [359] [363] [370] [371] [372] [373] [374] [375] [376] [377] [378] [379] [383] [401] [407] [408] [443] [452] [456] [460] [461] ::= (letter [458] | user-defined name character [471]), (digit [459] | letter [458] | user-defined name character [471] | "." | "-" | "_")*
[458] letter [457] ::= "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z" | "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z"
[459] digit [245] [457] ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
[460] infix function name [454] [465] ::= infix function start character [462], function following character [464]* | name [457]
[461] prefix function name [386] [387] ::= prefix function start character [463], function following character [464]* | name [457]
[462] infix function start character [460] ::= function following character [464] | prefix function start character [463]
[463] prefix function start character [461] [462] ::= "!" | "-" | "+" | "%" | "?" | "/" | "~" | "$" | "\" | "@" | "^" | ","
[464] function following character [460] [461] [462] ::= "*" | "=" | "|" | "<" | ">" | "&"
[465] user-defined infix function name [139] [241] [262] [324] ::= Any infix function name [460] defined in a program rather than by OmniMark, and which are not overloadings of operators defined by OmniMark to be overloadable.
[466] escape [280] [281] [282] [303] [304] [305] [306] [307] [308] [309] [310] [311] [312] [313] [314] [315] [316] [317] [467] ::= The escape [466] character is defined by an escape declaration [110]. If there is no escape declaration [110], the escape character is "%".
[467] unescaped character [269] [270] [278] [279] ::= An unescaped character [467] is any character that is not a "'", a """, a control character, or escape [466].
[468] describing number [282] ::= A describing number [468] is a number in the base indicated by the number [245] non-terminal in the described substring [282] production. The base can range from two to 36; the digits in each describing number [468] must be of the appropriate base, using letters (upper- or lower-case) for digit values over nine.
[469] system-specific function name [132] [384] [395] ::= A system-specific function name [469] is implemented as a string expression [258].
[470] system-specific library name [132] [384] [395] ::= A system-specific library name [470] is implemented as a string expression [258].
[471] user-defined name character [457] ::= A user-defined name character [471] is any character that appears in a LETTERS declaration that is not explicitly excluded from being a name character.
Copyright © Stilo Corporation, 2003. All rights reserved.
ETR62, 2003/12/18