From 319faecec01680e21d17b75a4fb8a0140c124d21 Mon Sep 17 00:00:00 2001 From: Tomos Hillman Date: Tue, 26 Oct 2021 14:43:44 +0100 Subject: [PATCH 001/152] Added some pragma basics as a basis for demonstrating how to use github and PRs to collaborate on a proposal. --- ixml-specification.html | 5 +++++ ixml.ixml | 15 +++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ixml-specification.html b/ixml-specification.html index 74273dd7..995bbc01 100644 --- a/ixml-specification.html +++ b/ixml-specification.html @@ -445,6 +445,11 @@

Character sets

@code: capital, letter?. -capital: ["A"-"Z"]. -letter: ["a"-"z"]. + +

Pragmas

+

Pragmas are ways to mark-up the grammar that optionally allow conforming parsers to extend their behaviours. They are written in such a way that ignoring a pragma results in the desired fall-back behaviour.

+

Pragmas are allowed wherever a terminal or non-terminal mark are allowed. They start with a # symbol, and consist of a qualified name and a quoted string:

+
-pragma: "#", name, string.

Complete

         ixml: S, rule+S, S.
diff --git a/ixml.ixml b/ixml.ixml
index 8a5bfa7d..f6d4547b 100644
--- a/ixml.ixml
+++ b/ixml.ixml
@@ -8,8 +8,10 @@
       comment: -"{", (cchar; comment)*, -"}".
        -cchar: ~["{}"].
 
-         rule: (mark, S)?, name, S, ["=:"], S, -alts, ".".
+         rule: (mOrP, S)?, name, S, ["=:"], S, -alts, ".".
+        -mOrP: mark; pragma, mark?;
         @mark: ["@^-"].
+       pragma: "#", name, S, string.
          alts: alt+([";|"], S).
           alt: term*(",", S).
         -term: factor;
@@ -23,18 +25,19 @@
       repeat1: factor, "+", S, sep?.
        option: factor, "?", S.
           sep: factor.
-  nonterminal: (mark, S)?, name, S.
+  nonterminal: (mOrP, S)?, name, S.
 
     -terminal: literal; 
                charset.
       literal: quoted;
                encoded.
-      -quoted: (tmark, S)?, -string.
+      -quoted: (tmOrP, S)?, -string.
 
         @name: namestart, namefollower*.
    -namestart: ["_"; Ll; Lu; Lm; Lt; Lo].
 -namefollower: namestart; ["-.·‿⁀"; Nd; Mn].
 
+       -tmOrP: tmark; pragma, tmark?
        @tmark: ["^-"].
        string: -'"', dstring, -'"', S;
                -"'", sstring, -"'", S.
@@ -44,13 +47,13 @@
                '"', -'"'. {all characters, quotes must be doubled}
         schar: ~["'"];
                "'", -"'". {all characters, quotes must be doubled}
-     -encoded: (tmark, S)?, -"#", @hex, S.
+     -encoded: (tmOrP, S)?, -"#", @hex, S.
           hex: ["0"-"9"; "a"-"f"; "A"-"F"]+.
 
      -charset: inclusion; 
                exclusion.
-    inclusion: (tmark, S)?,         set.
-    exclusion: (tmark, S)?, "~", S, set.
+    inclusion: (tmOrP, S)?,         set.
+    exclusion: (tmOrP, S)?, "~", S, set.
          -set: "[", S,  member*([";|"], S), "]", S.
       -member: literal;
                range;

From 988bab40bf78276eda59eafdc76f730c803b0fbc Mon Sep 17 00:00:00 2001
From: Tomos Hillman 
Date: Wed, 27 Oct 2021 19:18:43 +0100
Subject: [PATCH 002/152] Adds some more suggested detail for pragma
 implementation

---
 ixml-specification.html | 46 ++++++++++++++++++++++++++++++++++-------
 1 file changed, 38 insertions(+), 8 deletions(-)

diff --git a/ixml-specification.html b/ixml-specification.html
index 995bbc01..0c092d4c 100644
--- a/ixml-specification.html
+++ b/ixml-specification.html
@@ -449,8 +449,20 @@ 

Character sets

Pragmas

Pragmas are ways to mark-up the grammar that optionally allow conforming parsers to extend their behaviours. They are written in such a way that ignoring a pragma results in the desired fall-back behaviour.

Pragmas are allowed wherever a terminal or non-terminal mark are allowed. They start with a # symbol, and consist of a qualified name and a quoted string:

-
-pragma: "#", name, string.
- +
@pragma: -"#", #name "" name, string.

Pragmas starting with reserved XML names or namespaces, the null namespace, or the Invisible XML namespace are considered to be reserved and should not be used except as directed by this specification.

There are a number of potential uses for pragmas, some of which are required to define pragmas for the invisible XML grammar. +

Namespace declarations

Namespaces can be declared using the xmlns and xmlns:xxx name patterns, where xxx represents an XML name prefix. The value of a namespace pragma represents the namespace URI.

+
#xmlns "http://invisiblexml.org/ns"
+#xmlns:xsl "http://www.w3.org/1999/XSL/Transform"
+

This provides a way to declare namespaces and prefixes for use with qualified names in invisible XML. Declarations on the first rule are taken to apply to the whole grammar.

+

Name templates

+

It is sometimes desirable to set an element name dynamically; for instance where the name of an element or attribute should be taken from the value rather than the name of a terminal or non-terminal.

+

Where the name pragma is defined within a rule, the terminal or non-terminal which it annotates is used as the name for that rule, where such a rule results in a node with a qualified name:

+
rule: pragma.
+@pragma: -"#", #name "" name, string.
+name: "new-name"
+string: "value"
+

would result in

+
<rule new-name="value"/>

Complete

         ixml: S, rule+S, S.
 
@@ -462,8 +474,10 @@ 

Complete

comment: -"{", (cchar; comment)*, -"}". -cchar: ~["{}"]. - rule: (mark, S)?, name, S, ["=:"], S, -alts, ".". + rule: (mOrP, S)?, name, S, ["=:"], S, -alts, ".". + -mOrP: mark; pragma, mark?; @mark: ["@^-"]. + pragma: "#", name, S, string. alts: alt+([";|"], S). alt: term*(",", S). -term: factor; @@ -477,18 +491,19 @@

Complete

repeat1: factor, "+", S, sep?. option: factor, "?", S. sep: factor. - nonterminal: (mark, S)?, name, S. + nonterminal: (mOrP, S)?, name, S. -terminal: literal; charset. literal: quoted; encoded. - -quoted: (tmark, S)?, -string. + -quoted: (tmOrP, S)?, -string. @name: namestart, namefollower*. -namestart: ["_"; Ll; Lu; Lm; Lt; Lo]. -namefollower: namestart; ["-.·‿⁀"; Nd; Mn]. + -tmOrP: tmark; pragma, tmark? @tmark: ["^-"]. string: -'"', dstring, -'"', S; -"'", sstring, -"'", S. @@ -498,13 +513,13 @@

Complete

'"', -'"'. {all characters, quotes must be doubled} schar: ~["'"]; "'", -"'". {all characters, quotes must be doubled} - -encoded: (tmark, S)?, -"#", @hex, S. + -encoded: (tmOrP, S)?, -"#", @hex, S. hex: ["0"-"9"; "a"-"f"; "A"-"F"]+. -charset: inclusion; exclusion. - inclusion: (tmark, S)?, set. - exclusion: (tmark, S)?, "~", S, set. + inclusion: (tmOrP, S)?, set. + exclusion: (tmOrP, S)?, "~", S, set. -set: "[", S, member*([";|"], S), "]", S. -member: literal; range; @@ -715,6 +730,21 @@

IXML in IXML

<nonterminal mark='-' name='alts'/>, <literal dstring='.'/> </alt>.</rule>
+

Pragmas in XML representations

+ +

Pragmas in XML representations of grammars should be captured as namespaced attributes or pseudo-attributes.

+ +
#xmlns:xsl "http://www.w3.org/1999/XSL/Transform"
+#xmlns:eg  "http://example.org/ns
+xsl:message: #eg:name "value" string
+ +

Becomes:

+
<rule name="xsl:message" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:eg="http://example.org/ns">
+  <alt>
+    <nonterminal eg:name="value" name="string"/>
+  </alt>
+</rule>
+

Pragmas are an optional feature, and may be ignored.

Conformance

From 94442ead5279b28eea608794694d5d61e8117609 Mon Sep 17 00:00:00 2001 From: Tomos Hillman Date: Wed, 27 Oct 2021 19:21:37 +0100 Subject: [PATCH 003/152] Just adds some whitespace for readability --- ixml-specification.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ixml-specification.html b/ixml-specification.html index 0c092d4c..51eb5182 100644 --- a/ixml-specification.html +++ b/ixml-specification.html @@ -449,8 +449,11 @@

Character sets

Pragmas

Pragmas are ways to mark-up the grammar that optionally allow conforming parsers to extend their behaviours. They are written in such a way that ignoring a pragma results in the desired fall-back behaviour.

Pragmas are allowed wherever a terminal or non-terminal mark are allowed. They start with a # symbol, and consist of a qualified name and a quoted string:

-
@pragma: -"#", #name "" name, string.

Pragmas starting with reserved XML names or namespaces, the null namespace, or the Invisible XML namespace are considered to be reserved and should not be used except as directed by this specification.

There are a number of potential uses for pragmas, some of which are required to define pragmas for the invisible XML grammar. -

Namespace declarations

Namespaces can be declared using the xmlns and xmlns:xxx name patterns, where xxx represents an XML name prefix. The value of a namespace pragma represents the namespace URI.

+
@pragma: -"#", #name "" name, string.
+

Pragmas starting with reserved XML names or namespaces, the null namespace, or the Invisible XML namespace are considered to be reserved and should not be used except as directed by this specification.

+

There are a number of potential uses for pragmas, some of which are required to define pragmas for the invisible XML grammar.

+

Namespace declarations

+

Namespaces can be declared using the xmlns and xmlns:xxx name patterns, where xxx represents an XML name prefix. The value of a namespace pragma represents the namespace URI.

#xmlns "http://invisiblexml.org/ns"
 #xmlns:xsl "http://www.w3.org/1999/XSL/Transform"

This provides a way to declare namespaces and prefixes for use with qualified names in invisible XML. Declarations on the first rule are taken to apply to the whole grammar.

From 7eb74b7c008de91c8383daf2f7aa1c2421b8e155 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Tue, 2 Nov 2021 10:29:07 -0600 Subject: [PATCH 004/152] Correct typo in example Add missing close quotation for eg namespace in example of pragmas --- .gitignore | 1 + ixml-specification.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..b25c15b8 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*~ diff --git a/ixml-specification.html b/ixml-specification.html index 51eb5182..7b165cc4 100644 --- a/ixml-specification.html +++ b/ixml-specification.html @@ -738,7 +738,7 @@

Pragmas in XML representations

Pragmas in XML representations of grammars should be captured as namespaced attributes or pseudo-attributes.

#xmlns:xsl "http://www.w3.org/1999/XSL/Transform"
-#xmlns:eg  "http://example.org/ns
+#xmlns:eg  "http://example.org/ns"
 xsl:message: #eg:name "value" string

Becomes:

From 1e138d1229e509854121407040774dafafeb963f Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Tue, 16 Nov 2021 09:39:09 -0700 Subject: [PATCH 005/152] add pragmas.md Draft document to summarize pragma issues (and help MSM stop forgetting what we've already discussed). --- misc/pragmas.md | 170 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 misc/pragmas.md diff --git a/misc/pragmas.md b/misc/pragmas.md new file mode 100644 index 00000000..8135ee34 --- /dev/null +++ b/misc/pragmas.md @@ -0,0 +1,170 @@ +# Pragmas for ixml + +2021-11-16 + + +This document describes a proposal for adding *pragmas* to the +Invisible-XML specification. + +It was prepared (or rather, is being prepared) by Tom Hillman and +Michael Sperberg-McQueen. It is currently not finished. + +The general idea of pragmas is to provide a channel for information +that is not part of the ixml specification but can be used by some +implementations to provide useful behavior, without getting in the way +of other implementations for which the information is irrelevant. The +additional information contained in pragmas may be used to control +options in a processor (like optimization levels in a C compiler) or +to extend the specification. + +The proposal described here is inspired in part by the `xsl:fallback` +and `use-when` mechanisms of XSLT and the *extension expression* +and *annotation* mechanisms of XQuery. + +## Use cases + +Among the use cases that motivate the proposal are these. + +* Namespace declarations. + + Using pragmas to specify that all or some elements of the XML +returned by an ixml processor should go into a specified namespace. + +* Renaming + + Using pragmas to specify that an element or attribute name +serializing a nonterminal should be given a name different from the +nonterminal itself. (As in Steven Pemberton's proposal for element +renaming.) + +* Name indirection + + Using pragmas to specify that an element or attribute name should be +taken not from the grammar but from the string value of a given +nonterminal. + +* Rule rewriting + + Using pragmas to specify that a rule as given is shorthand for a set +of other rules. (As in John Lumley's grammar rewriting for XPath.) + +* Tokenization annotation. + + Using pragmas to annotate nonterminals in an ixml grammar to +indicate that they (a) define a regular language and (b) can be safely +recognized by a greedy regular-expression match. + +* Text injection. + + Using pragmas to indicate that a particular string should be +injected into the XML representation of the input as (part of) a text +node, or as an attribute or element. (This can help make the output of +an ixml parse conform to a pre-existing schema.) + +* Attribute grammar specification. + + Using pragmas to annotate a grammar with information about +grammatical attributes to be associated with nodes of the parse tree, +whether they are inherited from an ancestor or an elder sibling or +synthesized from the children of a node, and what values should be +assigned to them. (Note that grammatical attributes are not to be +confused with XML attributes, although in particular cases it may be +helpful to render a grammatical attribute as an XML attribute.) + +*Are there other use cases that need to be mentioned here?* + +Note that some of these use cases may in practice be handled by +changes to the syntax of ixml. We include them in the list of use +cases for pragmas not because we think they are best handled by +pragmas (although for some of these cases, that may be true) but +because they are (a) plausible ideas for things one might want to do +which are (b) not supported by ixml in its current form, and thus (c) +natural examples of the kinds of things an extension mechanism oughtly +ideally to support. + +Some of these use cases seem most naturally handled by annotations +which apply to a grammar as a whole, some by annotations which apply +to individual rules, and some by annotations which apply to individual +symbols in the grammar. + +We do not see a strong use case for annotations which apply to +arbitrary expressions in a grammar. + +## Requirements and desiderata + +Our tentative list of requirements and desiderata is as follows. + +By *requirement* we mean a property or functionality which must be +achieved for a pragmas proposal to be worth adopting. +By *desideratum* we mean a property or functionality that should be +included if possible, but which need not lead to the rejection of the +proposal if it proves impossible to achieve. + +Requirements: + +* It must be straightforward for processors to ignore pragmas they do +not understand, and to determine whether they `understand' a given +pragma or not. + +* It must be clear to human readers and software which expressions in +standard ixml notation are and are not affected or overridden by a +given pragma. + +* Any pragma must thus specify (explicitly or implicitly) both what +should be done by a processor that understands and processes the +pragma and what should be done by a processor that does not understand +and process the pragma. We refer to the latter as the *fallback +expression*. + + +Desiderata: + +* Ideally, the result of evaluating the fallback expression should be +a useful and meaningful result, but this is more a matter for the +individual writing a grammar than for this proposal. + +* It should ideally be possible to specify pragmas as annotations +applying to a symbol, a rule, or a grammar as a whole, and it should +be possible to know which is which. It is not required that the +distinction be a syntactic one, however, since it can also be +expressed by the semantics of the particular pragma. + +## Design questions + +Several design questions can be distinguished, not necessarily +completely orthogonal. + +* What syntax should pragmas have in invisible XML? + +* What representation should pragmas have in the XML serialization of +an ixml grammar? + +### ixml syntax of pragmas + +*Watch this space.* + +### XML syntax of pragmas + +*Attachment to symbols as attribute.* + +*Insertion of elements as children of `rule`.* + +*Insertion of elements as children of `ixml`.* + + +## Proposal + + +*Discussion of `#qname 'string'` proposal.* + +*Discussion of `*qname data*` proposal.* + +*Discussion of XML translation depending on position.* + +## Worked examples + +*This section should contain, for some or all of the use cases, fully +worked examples showing simple grammars that use the annotations in +question.* + + From 468f8ab4a51d447637a5c2388a89c45a38f25cdb Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Tue, 16 Nov 2021 12:24:44 -0700 Subject: [PATCH 006/152] Update pragmas.md Provide a bit more prose. --- misc/pragmas.md | 400 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 384 insertions(+), 16 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 8135ee34..2c30be3f 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -19,7 +19,9 @@ to extend the specification. The proposal described here is inspired in part by the `xsl:fallback` and `use-when` mechanisms of XSLT and the *extension expression* -and *annotation* mechanisms of XQuery. +and *annotation* mechanisms of XQuery. SGML and XML processing +instructions are also possible models. + ## Use cases @@ -134,37 +136,403 @@ expressed by the semantics of the particular pragma. Several design questions can be distinguished, not necessarily completely orthogonal. -* What syntax should pragmas have in invisible XML? +* What syntax should pragmas have in invisible XML? * What representation should pragmas have in the XML serialization of an ixml grammar? -### ixml syntax of pragmas +* Where can pragmas appear? -*Watch this space.* -### XML syntax of pragmas +## Proposal(s) -*Attachment to symbols as attribute.* +Two concrete proposals have been made; they have been given arbitrary +names for discussion. -*Insertion of elements as children of `rule`.* +### The hash-QName proposal -*Insertion of elements as children of `ixml`.* +In this proposal, pragmas take the form of a hash mark, a QName, and a +string. Because ixml has two string delimiters, pragmas can nest, but +only two deep. +They can occur immediately before a terminal or nonterminal symbol, +before the mark if any. + +In the XML form, they are realized as extension attributes whose name +is the QName given in the pragma and whose value is the value of the +string. + +For example: + +```` + #my:color 'blue' a = b, #my:flavor 'vanilla' c?. +```` + +The corresponding XML form is: + +```` + + + + + + +```` + +Annotations pertaining to a particular occurrence of a symbol appear +immediately before that occurrence, as here the `my:flavor` pragma. + +Annotations pertaining to a rule as a whole, or which provide a +nonterminal with default value for some property appear immediately +before the nonterminal on the left-hand side of a rule, as here the +`my:color` pragma. + +Annotations pertaining to the grammar as a whole appear immediately +before the first rule, and thus appear as attributes on the first +`rule` element of the grammar. + +There are no syntactic distinctions among these cases: if the rule +shown is the first rule in the grammar, `my:color` might be supplying +a default property value for `a`, or annotating the rule, or +annotating the grammar as a whole. The difference must be carried by +the semantics of the pragma: those defining the `my:color` pragma +should be clear about what it means and what its scope is. + +### The brackets-QName proposal + +In this proposal, pragmas take the form of a left square bracket, an +optional mark, a QName, the pragma's data, and a right square bracket. +Nested pairs of square brackets are allowed, so pragmas can nest +arbitrarily deep. + +Pragmas can occur immediately before a terminal or nonterminal symbol, +before the mark if any, or in the whitespace immediately before the +full stop of a rule. + +In the XML form, the serialization of the pragma depends on its +position and the mark following the opening bracket. + +* Pragmas occurring before the full stop of a rule are serialized as +extension elements following the final `alt` of the right-hand side of +the rule. + +* Pragmas occurring before a symbol are serialized as attributes if +marked `@` (ignoring marks on any nested pragmas). + +* Pragmas occurring before a symbol are not serialized at all if +marked `-`. + +* Pragmas occurring before a symbol are serialized as extension +elements if unmarked or marked `^`. + + The extension elements appear as the first children of the XML +representation of the symbol. In the canonical XML representation, the +pragma data is serialized as a 'pragma-data' element within the +extension element, which will contain the pragma-data as a character +sequence. Depending on the semantics of the pragma itself, the +extension element may also contain additional elements. (See the +examples in the final section of this paper.) + +For example: + +```` + [my:color blue] a = b, [@my:flavor vanilla] c? [my:spin ...]. +```` + +The corresponding XML form is: + +```` + + blue + + + + + + ... + + +```` + +Annotations pertaining to a particular occurrence of a symbol appear +immediately before that occurrence, as here the `my:flavor` pragma. + +Annotations which provide a nonterminal with default value for some +property appear immediately before the nonterminal on the left-hand +side of a rule, as here the `my:color` pragma. + +Annotations pertaining to a rule as a whole may occur either before +the left-hand side of the rule, which may be preferred for +light-weight annotations, or before the full stop at the end of the +rule, which is preferable for long complicated annotations. + +Annotations pertaining to the grammar as a whole appear immediately +before the first rule, and thus appear as attributes on the first +`rule` element of the grammar. + +Pragmas occurring before a full stop apply to the rule as a whole. +Pragmas occurring before a symbol in the right-hand side of a rule +apply to that occurrence of that symbol. Pragmas occurring before the +left-hand side of a rule may apply to that symbol in general, or to +the rule as a whole, or (if occurring before the first rule) to the +grammar as a whole; such distinctions are conveyed semantically, not +syntactically. -## Proposal +## Worked examples +*This section should contain, for some or all of the use cases, fully +worked examples showing simple grammars that use the annotations in +question.* -*Discussion of `#qname 'string'` proposal.* -*Discussion of `*qname data*` proposal.* +### Namespace declarations. + +Using pragmas to specify that all or some elements of the XML returned +by an ixml processor should go into a specified namespace. + +For example, let's assume that we want some elements to go into one +namespace, some into another, and some into none, and that namespace +bindings should remain constant throughout the grammar (so: no +changing the default namespace in the middle of the document). + +We define the namespace 'http://example.com/ixml-namespaces" as +providing for namespace bindings, and we adopt the convention that a +prefix `ppp` is bound to a namespace name `nnn` if a pragma of the form +```` + [@nsd:ppp nnn] +```` + +is encountered in a context where the prefix *nsd* is bound to +"'http://example.com/ixml-namespaces". + +To bootstrap the process, we adopt the principle that a +pragma of the form +```` + [@ns:ns http://example.com/ixml-namespaces] +```` + +binds the prefix `ns` to that namespace. (Alternatively, we could +follow the example of XML namespaces and reserve some string for +namespace bindings, but this example is trying to show a way to do +this that does not rely on a decree in the spec but could in principle +be handled as an extension.) + +So a grammar in which some elements are in the *x* namespace, some in +the *y* namespace, and some in no namespace at all, might be + +```` + [@nsd:nsd http://example.com/ixml-namespaces] + [@nsd:x http://example.org/NS/existential] + [@nsd:y http://example.com/NS/yoyo] + x:sentence: x:a, ' ', y:b?, '. ', c. + x:a: 'Speed'. + y:b: 'kills'. + c: 'It really does.'. + +The XML representation of the grammar might be: + +```` + + + + + + + + + + + + + + + + + + + + + + + + + + +```` + +*We have another bootstrapping problem here: because the prefix* +`nsd` *is not declared, the XML shown is not namespace-well-formed. We +need some way of getting it declared, preferably other than by fiat, +but I don't currently see an alternative to fiat.* + +To make the XML be namespace well-formed, we will need somehow to get +at least a namespace declaration for *nsd* to be injected on the +`ixml` element, and preferably also namespace bindings for the +prefixes *x* and *y*, so the `ixml` start tag takes something like the +following form. +```` + + ```` + +### Renaming + +Using pragmas to specify that an element or attribute name +serializing a nonterminal should be given a name different from the +nonterminal itself. (As in Steven Pemberton's proposal for element +renaming.) -*Discussion of XML translation depending on position.* +### Name indirection -## Worked examples +Using pragmas to specify that an element or attribute name should be +taken not from the grammar but from the string value of a given +nonterminal. -*This section should contain, for some or all of the use cases, fully -worked examples showing simple grammars that use the annotations in -question.* +### Rule rewriting + +Using pragmas to specify that a rule as given is shorthand for a set +of other rules. (As in John Lumley's grammar rewriting for XPath.) + +### Tokenization annotation. + +Using pragmas to annotate nonterminals in an ixml grammar to +indicate that they (a) define a regular language and (b) can be safely +recognized by a greedy regular-expression match. + +### Text injection. +Using pragmas to indicate that a particular string should be +injected into the XML representation of the input as (part of) a text +node, or as an attribute or element. (This can help make the output of +an ixml parse conform to a pre-existing schema.) +### Attribute grammar specification. + +*Example: synthesized value attribute for arithmetic expressions.* + +Consider the following simple grammar for arithmetic expressions +involving addition and multiplication over single-digit integers. + +```` + expr: expr, s, '+', s, term. + term: term, s, '*', s, factor. + factor: '0'; '1'; '2'; '3'; '4'; '5'; '6'; '7'; '8'; '9'; '(', s, expr, s, ')'. + s: [#20; #A; #D; #9]*. +```` + +In an attribute-grammar system, we might define the *value* of an +expression as a synthesized (bottom-up) grammatical attribute +following the rules: + +* The value of a *factor* consisting of a single digit is the value of +the integer usually so written: '0' has the value of zero, '1` has the +value of one, etc. + +* The value of a *factor* consisting of a parenthesized *expr* is the +value of the *expr*. + +* The value of a *term* consisting solely of a *factor* is the value +of the *factor*. + +* The value of a *term* consisting solely of a *term* followed by an +asterisk and a *factor* is the product of the values of the *term* and +the *factor*. + +* The value of an *expr* consisting solely of a *term* is the value +of the *term*. + +* The value of an *expr* consisting solely of an *expr* followed by a +plus sign and a *term* is the sum of the values of the *expr* and +the *term*. + +Extending this to handle subtraction, division, and multiple-digit +numbers would be straightforward but require a lot more rules which +would not involve any interesting new principles. + +A conventional system for reading attribute grammars and making +parsers which parse input and calculate the values of grammatical +attributes might represent this grammar thus, naming the grammatical +attribute *v* (this example follows, roughly the syntax of Alblas 191, +and like Alblas assumes whitespace is someone else's problem). + +```` + expr_0 → expr_1 '+' term. + [ expr_0.v = expr_1.v + term.v] + + term_0 → term_1 '*' factor. + [ term_0.v = term_1.v * factor.v] + + factor → '0'. + [ factor.v = 0 ] + factor → '1'. + [ factor.v = 1 ] + factor → '2'. + [ factor.v = 2 ] + factor → '3'. + [ factor.v = 3 ] + factor → '4'. + [ factor.v = 4 ] + factor → '5'. + [ factor.v = 5 ] + factor → '6'. + [ factor.v = 6 ] + factor → '7'. + [ factor.v = 7 ] + factor → '8'. + [ factor.v = 8 ] + factor → '9'. + [ factor.v = 9 ] + factor → '(' expr ')'. + [ factor.v = expr.v ] +```` + +Note that some nonterminals are subscripted so that references to +their grammatical attributes can be unambiguous. To express this +grammar in ixml, we need either to allow multiple rules for the same +nonterminal, or to allow pragmas before connectors like comma or +semicolon, or we need to allow string-to-typed-value functions in the +style of XPath. I'll assume the latter two, along with a string() +function that returns the string value of a nonterminal. With these +assumptions, and the assumption that by means not specified the +prefix *ag* has been bound to an appropriate grammar for +attribute-grammar functionality, the attribute grammar could be +written thus using the brackets-QName syntax + +```` + [@ag:id e0] expr: [@ag:id e1] expr, s, '+', s, term + [ag:rule e0.v := e1.v + term.v ]. + {@ag:id t0] term: [@ag:id t1] term, s, '_', s, factor + [ag:rule t0.v := t1.v * factor.v]. + factor: digit [@ag:rule factor.v := number(string(digit))]; + '(', s, expr, s, ')' [@ag:rule factor.v := expr.v ]. + digit: '0'; '1'; '2'; '3'; '4'; '5'; '6'; '7'; '8'; '9'. + s: [#20; #A; #D; #9]_. +```` + +Here *ag:id* is assumed to associate a unique identifier with a +particular instance of a nonterminal, and *ag:rule* is assumed to +contain a set of assignment statements specifying the values of +particular attributes, in a subset of XPath syntax. (A more serious +proposal would need some way to distinguish *e0.v* meaning "the *v* +attribute of *e0* from the same string as a name which happens to +contain a string. This is not that serious proposal.) + + +*Example: synthesized value attribute and inherited environment attribute with variable bindings, for arithmetic expressions with 'let'.* + + +## Open issues + +* Is it really OK not to have a way to have pragmas turn into elements +before the first `rule` element? From f5e0b744a2c4f37f4069d66b6e735a4295279db9 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Tue, 16 Nov 2021 12:27:38 -0700 Subject: [PATCH 007/152] Update pragmas.md I hate Markdown. --- misc/pragmas.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 2c30be3f..02d90711 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -332,7 +332,7 @@ the *y* namespace, and some in no namespace at all, might be x:a: 'Speed'. y:b: 'kills'. c: 'It really does.'. - +```` The XML representation of the grammar might be: ```` From 7db2f7426e5dcb6dfe5c79e456420a8d66c1bd09 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Tue, 23 Nov 2021 08:51:55 -0700 Subject: [PATCH 008/152] Update pragmas.md Some copy edits and begin a new example --- misc/pragmas.md | 56 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 46 insertions(+), 10 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 02d90711..356de101 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -14,8 +14,10 @@ that is not part of the ixml specification but can be used by some implementations to provide useful behavior, without getting in the way of other implementations for which the information is irrelevant. The additional information contained in pragmas may be used to control -options in a processor (like optimization levels in a C compiler) or -to extend the specification. +options in a processor or to extend the specification (in roughly the +same way as pragmas and structured comments in C or Pascal +programs may be used to control optimization levels in some +compilers). The proposal described here is inspired in part by the `xsl:fallback` and `use-when` mechanisms of XSLT and the *extension expression* @@ -48,13 +50,18 @@ nonterminal. * Rule rewriting Using pragmas to specify that a rule as given is shorthand for a set -of other rules. (As in John Lumley's grammar rewriting for XPath.) +of other rules. (Example: John Lumley's grammar rewriting for XPath.) -* Tokenization annotation. +* Tokenization annotation. - Using pragmas to annotate nonterminals in an ixml grammar to -indicate that they (a) define a regular language and (b) can be safely -recognized by a greedy regular-expression match. + Using pragmas to annotate nonterminals in an ixml grammar to +indicate that they (a) define a regular language and (b) can be safely +recognized by a greedy regular-expression match. + +* Alternative formulations. + + Using pragmas to provide alternative formulations of rules in an +ixml grammar to allow different annotation or better optimization. * Text injection. @@ -404,12 +411,41 @@ nonterminal. Using pragmas to specify that a rule as given is shorthand for a set of other rules. (As in John Lumley's grammar rewriting for XPath.) -### Tokenization annotation. +### Tokenization annotation and alternative formulations. -Using pragmas to annotate nonterminals in an ixml grammar to -indicate that they (a) define a regular language and (b) can be safely +We can use pragmas to annotate nonterminals in an ixml grammar to +indicate that they define a regular language and can be safely recognized by a greedy regular-expression match. +For example, consider the grammar for a simple programming language. +A processor might read programs a little faster if it could read +identifiers in a single operation; this will be true if when an +identifier is encountered, the identifier will always consist of the +longest available sequence of characters legal in an identifier. In +the toy Program.ixml grammar, the rule for identifiers is: + +```` + identifier: letter+, S. +```` + +We can annotate *identifier* to signal that it's safe to consume an +identifier using a single regular-expression match by using a pragma +in a 'lexical scanning' (ls) namespace: + +```` + [ls:token] identifier: letter+, S. +```` + +The rules for comments in ixml itself offer another wrinkle. + +```` + comment: -"{", (cchar; comment)*, -"}". + -cchar: ~["{}"]. +```` + +Within a comment, any sequence of characters matching *cchar* can be +recognized in a single operation; there is no need to look for + ### Text injection. Using pragmas to indicate that a particular string should be From 18a2dbe5aeb664e2164835fe1525c9779a69987f Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Tue, 30 Nov 2021 08:25:46 -0700 Subject: [PATCH 009/152] Revising pragmas.md --- misc/pragmas.md | 53 +++++++++++++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 356de101..9e2abefd 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -1,6 +1,10 @@ # Pragmas for ixml -2021-11-16 +2021-11-16, rev. 2021-11-23 + +*Tentative decisions and to-do items* + +* *Drop hash-quotes proposal.* This document describes a proposal for adding *pragmas* to the @@ -10,14 +14,18 @@ It was prepared (or rather, is being prepared) by Tom Hillman and Michael Sperberg-McQueen. It is currently not finished. The general idea of pragmas is to provide a channel for information -that is not part of the ixml specification but can be used by some -implementations to provide useful behavior, without getting in the way -of other implementations for which the information is irrelevant. The -additional information contained in pragmas may be used to control -options in a processor or to extend the specification (in roughly the -same way as pragmas and structured comments in C or Pascal -programs may be used to control optimization levels in some -compilers). +that is not a required part of the ixml specification but can be used +by some implementations to provide useful behavior, without +interfering with the operation of other implementations for which the +information is irrelevant. Pragmas can also be used to provide +optional features in the ixml specification. The additional +information contained in pragmas may be used to control options in a +processor or to extend the specification (in roughly the same way as +pragmas and structured comments in C or Pascal programs may be used to +control optimization levels in some compilers). + +On this view, pragmas are a form of annotation, and we use the terms +*pragma* and *annotation* accordingly. The proposal described here is inspired in part by the `xsl:fallback` and `use-when` mechanisms of XSLT and the *extension expression* @@ -52,25 +60,25 @@ nonterminal. Using pragmas to specify that a rule as given is shorthand for a set of other rules. (Example: John Lumley's grammar rewriting for XPath.) -* Tokenization annotation. +* Tokenization annotation Using pragmas to annotate nonterminals in an ixml grammar to indicate that they (a) define a regular language and (b) can be safely recognized by a greedy regular-expression match. -* Alternative formulations. +* Alternative formulations Using pragmas to provide alternative formulations of rules in an ixml grammar to allow different annotation or better optimization. -* Text injection. +* Text injection Using pragmas to indicate that a particular string should be injected into the XML representation of the input as (part of) a text node, or as an attribute or element. (This can help make the output of an ixml parse conform to a pre-existing schema.) -* Attribute grammar specification. +* Attribute grammar specification Using pragmas to annotate a grammar with information about grammatical attributes to be associated with nodes of the parse tree, @@ -88,7 +96,7 @@ cases for pragmas not because we think they are best handled by pragmas (although for some of these cases, that may be true) but because they are (a) plausible ideas for things one might want to do which are (b) not supported by ixml in its current form, and thus (c) -natural examples of the kinds of things an extension mechanism oughtly +natural examples of the kinds of things an extension mechanism ought ideally to support. Some of these use cases seem most naturally handled by annotations @@ -104,7 +112,7 @@ arbitrary expressions in a grammar. Our tentative list of requirements and desiderata is as follows. By *requirement* we mean a property or functionality which must be -achieved for a pragmas proposal to be worth adopting. +achieved for a pragmas proposal to be worth adopting. By *desideratum* we mean a property or functionality that should be included if possible, but which need not lead to the rejection of the proposal if it proves impossible to achieve. @@ -140,8 +148,10 @@ expressed by the semantics of the particular pragma. ## Design questions -Several design questions can be distinguished, not necessarily -completely orthogonal. +Several design questions can be distinguished; they are not completely +orthogonal. + +* What information should be encodable with pragmas? * What syntax should pragmas have in invisible XML? @@ -228,8 +238,13 @@ the rule. * Pragmas occurring before a symbol are serialized as attributes if marked `@` (ignoring marks on any nested pragmas). -* Pragmas occurring before a symbol are not serialized at all if -marked `-`. +* Pragmas occurring before a symbol are serialized as processing +instructions if marked `-`. + + The processing instructions appear as the first children of the XML +representation of the symbol; the name and data of the processing +instruction in the XML form are the name and pragma data of the pragma +in the ixml form. * Pragmas occurring before a symbol are serialized as extension elements if unmarked or marked `^`. From f173518b6306592345190b9607b04c921f03d9e6 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Tue, 30 Nov 2021 08:49:50 -0700 Subject: [PATCH 010/152] Copy edit pragmas.md --- misc/pragmas.md | 159 ++++++++++++++++++------------------------------ 1 file changed, 60 insertions(+), 99 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 9e2abefd..9bb76ee1 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -163,59 +163,10 @@ an ixml grammar? ## Proposal(s) -Two concrete proposals have been made; they have been given arbitrary -names for discussion. - -### The hash-QName proposal - -In this proposal, pragmas take the form of a hash mark, a QName, and a -string. Because ixml has two string delimiters, pragmas can nest, but -only two deep. - -They can occur immediately before a terminal or nonterminal symbol, -before the mark if any. - -In the XML form, they are realized as extension attributes whose name -is the QName given in the pragma and whose value is the value of the -string. - -For example: - -```` - #my:color 'blue' a = b, #my:flavor 'vanilla' c?. -```` - -The corresponding XML form is: - -```` - - - - - - -```` - -Annotations pertaining to a particular occurrence of a symbol appear -immediately before that occurrence, as here the `my:flavor` pragma. - -Annotations pertaining to a rule as a whole, or which provide a -nonterminal with default value for some property appear immediately -before the nonterminal on the left-hand side of a rule, as here the -`my:color` pragma. - -Annotations pertaining to the grammar as a whole appear immediately -before the first rule, and thus appear as attributes on the first -`rule` element of the grammar. - -There are no syntactic distinctions among these cases: if the rule -shown is the first rule in the grammar, `my:color` might be supplying -a default property value for `a`, or annotating the rule, or -annotating the grammar as a whole. The difference must be carried by -the semantics of the pragma: those defining the `my:color` pragma -should be clear about what it means and what its scope is. +The current proposal is given the arbitrary name of 'brackets QName' for +discussion; an earlier proposal (the 'hash-QName' proposal) has been +withdrawn, though traces of it may remain in other documents in this +branch. ### The brackets-QName proposal @@ -224,38 +175,41 @@ optional mark, a QName, the pragma's data, and a right square bracket. Nested pairs of square brackets are allowed, so pragmas can nest arbitrarily deep. -Pragmas can occur immediately before a terminal or nonterminal symbol, -before the mark if any, or in the whitespace immediately before the -full stop of a rule. +In the ixml form of a grammar, pragmas can occur immediately + +* before a terminal or nonterminal symbol, before the mark if any, or + +* in the whitespace immediately before the full stop of a rule. In the XML form, the serialization of the pragma depends on its -position and the mark following the opening bracket. +position and in some cases on the mark following the opening bracket. * Pragmas occurring before the full stop of a rule are serialized as extension elements following the final `alt` of the right-hand side of -the rule. +the rule, regardless of the mark. + +* Pragmas occurring before a symbol are -* Pragmas occurring before a symbol are serialized as attributes if -marked `@` (ignoring marks on any nested pragmas). + * serialized as attributes if marked `@` (ignoring marks on any + nested pragmas). -* Pragmas occurring before a symbol are serialized as processing -instructions if marked `-`. + * serialized as processing instructions if marked `-`. - The processing instructions appear as the first children of the XML -representation of the symbol; the name and data of the processing -instruction in the XML form are the name and pragma data of the pragma -in the ixml form. + The processing instructions appear as the first children of the + XML representation of the symbol; the name and data of the + processing instruction in the XML form are the name and pragma + data of the pragma in the ixml form. -* Pragmas occurring before a symbol are serialized as extension -elements if unmarked or marked `^`. + * serialized as extension elements if unmarked or marked `^`. - The extension elements appear as the first children of the XML -representation of the symbol. In the canonical XML representation, the -pragma data is serialized as a 'pragma-data' element within the -extension element, which will contain the pragma-data as a character -sequence. Depending on the semantics of the pragma itself, the -extension element may also contain additional elements. (See the -examples in the final section of this paper.) + The extension elements appear as the first children of the XML + representation of the symbol. In the canonical XML + representation, the pragma data is serialized as a 'pragma-data' + element within the extension element, which will contain the + pragma-data as a character sequence. Depending on the semantics + of the pragma itself, the extension element may also contain + additional elements. (See the examples in the final section of + this paper.) For example: @@ -279,30 +233,37 @@ The corresponding XML form is: ```` - -Annotations pertaining to a particular occurrence of a symbol appear -immediately before that occurrence, as here the `my:flavor` pragma. - -Annotations which provide a nonterminal with default value for some -property appear immediately before the nonterminal on the left-hand -side of a rule, as here the `my:color` pragma. - -Annotations pertaining to a rule as a whole may occur either before -the left-hand side of the rule, which may be preferred for -light-weight annotations, or before the full stop at the end of the -rule, which is preferable for long complicated annotations. - -Annotations pertaining to the grammar as a whole appear immediately -before the first rule, and thus appear as attributes on the first -`rule` element of the grammar. - -Pragmas occurring before a full stop apply to the rule as a whole. -Pragmas occurring before a symbol in the right-hand side of a rule -apply to that occurrence of that symbol. Pragmas occurring before the -left-hand side of a rule may apply to that symbol in general, or to -the rule as a whole, or (if occurring before the first rule) to the -grammar as a whole; such distinctions are conveyed semantically, not -syntactically. + +Annotations appearing immediately before an occurrence of a symbol in +the right-hand side of a rule pertain to the occurrence of that +symbol. In the example, this is the case for the `my:flavor` pragma +on *c*. + +Annotations appearing before the full stop at the end of the rule +pertain to the rule as a whole. In the example, this is the case for +the `my:spin` pragma. + +Annotations appearing immediately before the nonterminal on the +left-hand side of a rule do one of three things: + +* They may provide the nonterminal on the left-hand side with a +default value for some property. + +* They may pertain to the rule as a whole. + +* They may pertain to the grammar as a whole. + +These cases are not distinguished by their syntax; the distinction +follows from the meaning of the pragma. + +In the example, this is the case for the `my:color` pragma. + +It follows that there are two ways to provide annotations pertaining +to a rule as a whole: they may occur either before the left-hand side +of the rule, which may be preferred for light-weight annotations, or +before the full stop at the end of the rule, which is preferable for +long complicated annotations. + ## Worked examples From 62ee438bbec0c58f84d24a8ae88db8cbe02dfe56 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Tue, 30 Nov 2021 20:07:21 -0700 Subject: [PATCH 011/152] Pragmas.md Copy edit, revise proposal to allow grammar-attached pragmas, revise namespaces example, supply renaming and rewriting examples, finish tokenization example, add lists of open issues and decisions for the group. --- misc/pragmas.md | 540 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 437 insertions(+), 103 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 9bb76ee1..84243b39 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -1,10 +1,6 @@ # Pragmas for ixml -2021-11-16, rev. 2021-11-23 - -*Tentative decisions and to-do items* - -* *Drop hash-quotes proposal.* +2021-11-16, rev. most recently 2021-11-30 This document describes a proposal for adding *pragmas* to the @@ -30,13 +26,21 @@ On this view, pragmas are a form of annotation, and we use the terms The proposal described here is inspired in part by the `xsl:fallback` and `use-when` mechanisms of XSLT and the *extension expression* and *annotation* mechanisms of XQuery. SGML and XML processing -instructions are also possible models. +instructions have also contributed to our thinking. ## Use cases Among the use cases that motivate the proposal are these. +Note that some of these use cases may in practice be handled by +changes to the core syntax of ixml. We include them in the list of use +cases for pragmas not because we think they are best handled by +pragmas but because they are (a) plausible ideas for things one might +want to do which are (b) not supported by ixml in its current form, +and thus (c) natural examples of the kinds of things an extension +mechanism like pragmas ought ideally to be able to support. + * Namespace declarations. Using pragmas to specify that all or some elements of the XML @@ -90,15 +94,6 @@ helpful to render a grammatical attribute as an XML attribute.) *Are there other use cases that need to be mentioned here?* -Note that some of these use cases may in practice be handled by -changes to the syntax of ixml. We include them in the list of use -cases for pragmas not because we think they are best handled by -pragmas (although for some of these cases, that may be true) but -because they are (a) plausible ideas for things one might want to do -which are (b) not supported by ixml in its current form, and thus (c) -natural examples of the kinds of things an extension mechanism ought -ideally to support. - Some of these use cases seem most naturally handled by annotations which apply to a grammar as a whole, some by annotations which apply to individual rules, and some by annotations which apply to individual @@ -114,13 +109,13 @@ Our tentative list of requirements and desiderata is as follows. By *requirement* we mean a property or functionality which must be achieved for a pragmas proposal to be worth adopting. By *desideratum* we mean a property or functionality that should be -included if possible, but which need not lead to the rejection of the -proposal if it proves impossible to achieve. +included if possible, but which does not doom the proposal to +pointlessness if it proves impossible to achieve. Requirements: * It must be straightforward for processors to ignore pragmas they do -not understand, and to determine whether they `understand' a given +not understand, and to determine whether they 'understand' a given pragma or not. * It must be clear to human readers and software which expressions in @@ -138,7 +133,9 @@ Desiderata: * Ideally, the result of evaluating the fallback expression should be a useful and meaningful result, but this is more a matter for the -individual writing a grammar than for this proposal. +individual writing a grammar than for this proposal. The desideratum +for a pragmas proposal is to make it easy (or at least not +unnecessarily hard) to write useful fallbacks. * It should ideally be possible to specify pragmas as annotations applying to a symbol, a rule, or a grammar as a whole, and it should @@ -175,51 +172,137 @@ optional mark, a QName, the pragma's data, and a right square bracket. Nested pairs of square brackets are allowed, so pragmas can nest arbitrarily deep. -In the ixml form of a grammar, pragmas can occur immediately +#### The ixml form + +In the ixml form of a grammar, pragmas can occur within whitespace in +several locations: + +* before the first rule of the grammar, after the last rule of the + grammar, or between rules; these pragmas apply to the grammar + as a whole or to the rules following the pragma. + +* before a terminal or nonterminal symbol on the right-hand side of a + rule, before or after the mark if any; these pragmas apply to that + occurrence of the symbol. + +* between the mark on the left-hand side of a rule and the + nonterminal; these pragmas apply to the rule. + +* immediately before the full stop of a rule; these pragmas apply to + the rule. -* before a terminal or nonterminal symbol, before the mark if any, or +Two locations are allowed for pragmas applying to rule in order to +allow them to appear either first or last; this is essentially a +rhetorical choice, as it can make a large difference to readability. -* in the whitespace immediately before the full stop of a rule. +#### Marks on pragmas -In the XML form, the serialization of the pragma depends on its -position and in some cases on the mark following the opening bracket. +Depending on the mark used in the ixml pragma, it may correspond to +various XML constructs in the XML form of the grammar: -* Pragmas occurring before the full stop of a rule are serialized as -extension elements following the final `alt` of the right-hand side of -the rule, regardless of the mark. +* An ixml pragma marked `^` corresponds to an extension element. -* Pragmas occurring before a symbol are +* An ixml pragma marked `@` corresponds to an extension attribute. - * serialized as attributes if marked `@` (ignoring marks on any - nested pragmas). +* An ixml pragma marked `?` corresponds to a processing instruction. - * serialized as processing instructions if marked `-`. +#### The XML form - The processing instructions appear as the first children of the - XML representation of the symbol; the name and data of the - processing instruction in the XML form are the name and pragma - data of the pragma in the ixml form. +These XML constructs may occur in locations corresponding to those in +which pragmas may appear in the ixml grammar: - * serialized as extension elements if unmarked or marked `^`. +* as a child or attribute of the `ixml` element before, between, or + after `rule` elements. - The extension elements appear as the first children of the XML - representation of the symbol. In the canonical XML - representation, the pragma data is serialized as a 'pragma-data' - element within the extension element, which will contain the - pragma-data as a character sequence. Depending on the semantics - of the pragma itself, the extension element may also contain - additional elements. (See the examples in the final section of - this paper.) +* as a child or attribute of a `rule` element. An ixml pragma marked + `^` or `?` occurring on the left-hand side of a rule corresponds to an + extension element or processing instruction occurring before the + first `alt` child of the `rule` element; if it occurs immediately + before the full stop of the rule, it corresponds to an element or + processing instruction occurring after the last `alt` of the `rule`. + +* as a child or attribute of a `nonterminal`, `literal`, `inclusion`, + or `exclusion` element. + +To ensure that the ixml grammar has an XML representation, any two +pragmas marked `@` and attached to the same construct must have +different expanded names. + +When a grammar in XML form is serialized into ixml form, extension +attributes appearing on the `rule` element may be serialized either on +the left-hand side of the rule or before the full stop. Pragmas +attached to a symbol in the right-hand side of a rule may be +serialized either before or after the mark; the two positions are +equivalent. + +For attributes, the attribute name is the QName of the ixml pragma +and the attribute value is the pragma data. + +For processing instructions, the PI name is the QName of the +ixml pragma and the PI value is the pragma data. + +For extension elements, the element name is the QName of the ixml +pragma and the pragma data appears as character data within a child +named `pragma-data`. Other child elements may follow the +`pragma-data` element; their content is required to be reconstructible +from the pragma data and the fallback expression, but they may express +the information in a more convenient form. (For example, the pragma +data may be a structured expression which a conforming application +will parse; the parsed form of the pragma data may be enclosed in the +pragma.) In this way we ensure that the ixml and XML forms of a +grammar contain the same information, although the XML form of the +grammar may be easier to process by machine. + +#### Annotating symbols, rules, or grammars + +Viewed the other way around, as described in the Desiderata, pragmas +can apply to symbols, rules, to a subset of rules, or to the grammar +as a whole, as follows: + +* Pragmas applicable to one occurrence of one symbol appear in ixml + before that symbol, either before or after the mark if any; in XML + they appear as attributes or children of the corresponding XML + element (`nonterminal`, `literal`, etc.). + +* Pragmas applicable to one rule appear in ixml either before the + left-hand side of that rule (after the mark) or before the full stop + of the rule; in XML they appear as attributes or children of the + `rule` element. + + Note that while we speak of the pragma as applying to the rule, + it may in practice apply more narrowly to the symbol on the + left-hand side of the rule, e.g. to provide a default value for + some property which may be overridden on individual occurrences + of the nonterminal, just as marks in ixml do now. + +* Pragmas applicable to a set of rules appear in ixml before the first + rule of the set and in XML before the first `rule` element of the + set. N.B. there is no syntactic method for specifying the last rule + of the set. If it matters, it must be handled semantically in the + specification of the pragma. Any software that does not understand + or implement the pragma in question may and should assume that the + pragma applies to all following rules. (It is not clear exactly + what use a parser that doesn't understand the pragma would make of + that information; we specify this only out of an abundance of + caution.) + +* Pragmas applicable to the grammar as a whole appear the first rule. + +#### An example For example: ```` - [my:color blue] a = b, [@my:flavor vanilla] c? [my:spin ...]. + [my:pitch C#] + ^ [my:color blue] a = b, [@my:flavor vanilla] c? [my:spin ...]. ```` The corresponding XML form is: ```` + + C# + blue @@ -234,35 +317,25 @@ The corresponding XML form is: ```` -Annotations appearing immediately before an occurrence of a symbol in -the right-hand side of a rule pertain to the occurrence of that -symbol. In the example, this is the case for the `my:flavor` pragma -on *c*. - -Annotations appearing before the full stop at the end of the rule -pertain to the rule as a whole. In the example, this is the case for -the `my:spin` pragma. +Annotations appearing between rules in the ixml correspond to nodes in +the XML appearing as children or attributes of the `ixml` element. In +the example, this is the case for the `my:pitch` pragma. -Annotations appearing immediately before the nonterminal on the -left-hand side of a rule do one of three things: +Annotations appearing in the ixml between the mark and the nonterminal +on the left-hand side of a rule correspond in the XML to attributes or +children of `rule` elements. In the example, this is the case for the +`my:color` pragma. -* They may provide the nonterminal on the left-hand side with a -default value for some property. +Annotations appearing immediately before an occurrence of a symbol in +the right-hand side of an ixml rule pertain to the occurrence of that +symbol and correspond to attributes or children of the corresponding +element in the XML grammar. In the example, this is the case for the +`my:flavor` pragma on the nonterminal *c*. -* They may pertain to the rule as a whole. - -* They may pertain to the grammar as a whole. - -These cases are not distinguished by their syntax; the distinction -follows from the meaning of the pragma. - -In the example, this is the case for the `my:color` pragma. - -It follows that there are two ways to provide annotations pertaining -to a rule as a whole: they may occur either before the left-hand side -of the rule, which may be preferred for light-weight annotations, or -before the full stop at the end of the rule, which is preferable for -long complicated annotations. +Annotations appearing before the full stop at the end of the rule +pertain to the rule as a whole and correspond to extension elements +appear as the last children of a `rule` element. In the example, this +is the case for the `my:spin` pragma. ## Worked examples @@ -282,27 +355,53 @@ namespace, some into another, and some into none, and that namespace bindings should remain constant throughout the grammar (so: no changing the default namespace in the middle of the document). -We define the namespace 'http://example.com/ixml-namespaces" as -providing for namespace bindings, and we adopt the convention that a -prefix `ppp` is bound to a namespace name `nnn` if a pragma of the form +We define the namespace 'http://example.com/ixml-namespaces" (*final +decision on namespace name pending*) as providing for namespace +bindings, and we adopt the convention that a prefix `ppp` is bound to +a namespace name `nnn` if a pragma of the form + ```` - [@nsd:ppp nnn] +[@nsd:ppp nnn] ```` is encountered in a context where the prefix *nsd* is bound to -"'http://example.com/ixml-namespaces". +"`http://example.com/ixml-namespaces`". To bootstrap the process, we adopt the principle that a pragma of the form + ```` [@ns:ns http://example.com/ixml-namespaces] ```` -binds the prefix `ns` to that namespace. (Alternatively, we could -follow the example of XML namespaces and reserve some string for -namespace bindings, but this example is trying to show a way to do -this that does not rely on a decree in the spec but could in principle -be handled as an extension.) +binds the prefix *ns* to that namespace. + +That is, a pragma-aware processor must be on the alert for pragmas +with the following properties: + +* In the pragma's QName, the prefix and local name are the same + NCName (non-colonized name). + +* The pragma's data is the magic namespace name + "`http://example.com/ixml-namespaces`". + +When that pragma is found, it is interpreted as binding prefix *ns* +(whatever it might be) to the indicated namespace. Any subsequent +pragma with a QName using that prefix and a URI as pragma data is to +be interpreted as a namespace declaration in the obvious way. + +The corresponding constructs in the XML grammar are (a) a namespace +declaration binding the prefix *ns* to the given namespace and (b) an +attribute with the qualified name *ns:ns* with the value +"`http://example.com/ixml-namespaces`". + +*(Alternatively, we could follow the example of XML namespaces and +reserve some string for namespace bindings, but this example is trying +to show a way to do this that does not trample over what should be the +user's choice of names. Note that either way, at least one thing must +be specified in the spec for the bootstrapping process to work: +either a magic prefix, analogous to the* `xmlns` *prefix of the XML +Names recommendation, or a magic URI as shown here.)* So a grammar in which some elements are in the *x* namespace, some in the *y* namespace, and some in no namespace at all, might be @@ -319,12 +418,11 @@ the *y* namespace, and some in no namespace at all, might be The XML representation of the grammar might be: ```` - - + nsd:y="http://example.com/NS/yoyo" > + @@ -353,21 +451,14 @@ The XML representation of the grammar might be: ```` -*We have another bootstrapping problem here: because the prefix* -`nsd` *is not declared, the XML shown is not namespace-well-formed. We -need some way of getting it declared, preferably other than by fiat, -but I don't currently see an alternative to fiat.* +An ixml parser supporting these namespace pragmas will emit +appropriate namespace bindings on the `x:sentence` element and the +prefixed names in the grammar will serialize in instances as prefixed +names in the XML, with appropriate namespace bindings. + +This example does not define a capability for changing namespace +bindings within a document. It's an example. -To make the XML be namespace well-formed, we will need somehow to get -at least a namespace declaration for *nsd* to be injected on the -`ixml` element, and preferably also namespace bindings for the -prefixes *x* and *y*, so the `ixml` start tag takes something like the -following form. -```` - - ```` ### Renaming @@ -376,6 +467,43 @@ serializing a nonterminal should be given a name different from the nonterminal itself. (As in Steven Pemberton's proposal for element renaming.) +In the following grammar, the two forms of month have different +syntaxes, so they are required to have different nonterminal names, +and so they are required to be serialized using different XML element +names. + +We define a renaming pragma which specifies the name to be used +when serializing a nonterminal as XML. A parser which does not +support the pragma will produce results in which some months +are named `month` and others `nmonth`; a parser which does +support the pragma will call them all `month`. + +```` + [@nsd:nsd http://example.com/ixml-namespaces] + [@nsd:sp https://lists.w3.org/Archives/Public/public-ixml/2021Oct/0014.html] + + date: day, " ", month, " ", year. + day: d, d?. + month: "January"; "February"; etc. + year: d, d, d, d. + + iso: year, "-", [sp:rename month] nmonth, "-", day. + nmonth: d, d. +```` + +The namespace bindings in the example assume namespace pragmas as +described above. Since we require pragmas to be associated with +extended names, some mechanism for binding shortnames to namespaces is +required for convenience. If we wish, however, we can formulate this +example with a literal URI-qualified name. In that case, the *iso* +rule would read as follows. + +```` + iso: year, "-", + [Q{https://lists.w3.org/Archives/Public/public-ixml/2021Oct/0014.html}:rename month] nmonth, + "-", day. +```` + ### Name indirection Using pragmas to specify that an element or attribute name should be @@ -385,7 +513,160 @@ nonterminal. ### Rule rewriting Using pragmas to specify that a rule as given is shorthand for a set -of other rules. (As in John Lumley's grammar rewriting for XPath.) +of other rules. Consider the following simple grammar for +arithmetic expressions. + +```` +expr: term; expr, addop, term. +term: factor; term, mulop, factor. +factor: number; var; -'(', -expr, -')'. +... +```` + +We might find it inconvenient that the number 42 is represented as +```` + + + + 42 + + + +```` + +One simple rule to simplify the XML representation of sentences in +this language is to specify that if an element *E* has only one child, +*E* should not be tagged and only the child should appear in the XML. + +We can do this in ixml by expanding the grammar, splitting each +nonterminal into two rules, one producing a visible serialization and +one hiding the nonterminal on serialization. + +```` +-EXPR: TERM; expr. +expr: EXPR, addop, TERM. +-TERM: FACTOR; term. +term: TERM, mulop, FACTOR. +-FACTOR: number; var; -'(', EXPR, -')'. +... +```` + +Now 42 parses more simply as `42`. + +The rewrite is mechanical enough that we can automate it, and +error-prone enough that it may be worth automating. If a rule has +some right-hand sides guaranteed to produce at most one child each and +some guaranteed to produce at least two children each, it's split into +two rules. The first gets a new nonterminal and has the original +single-child right-hand sides as alternatives, as well as a reference +to the original nonterminal. It's marked hidden. The second rule +gets the original nonterminal. All references to the original +nonterminal are changed to be references to the new nonterminal. + +If we call the relevant pragma *rewrite:no-unit-rules*, or more +briefly *r:nur*, the grammar takes the following form. Note that in +order to ensure that the first pragma is correctly interpreted as +belonging to the first rule and not to the grammar as a whole, we must +specify an explicit mark for the first rule. We specify one for the +second rule as well just for visual parallelism. (In practice, we +also need a rule that means "don't rewrite the entire rule, but +replace references to rules rewritten using *r:nur*; we call this +second pragma *r:ref*.) + +```` +^ [r:nur] expr: term; expr, addop, term. +^ [r:nur] term: factor; term, mulop, factor. +- [r:ref] factor: number; var; -'(', -expr, -')'. +... +```` + +The XML representation of this grammar can plausibly exploit the +ability of extension elements to contain an XML representation of the +new rules. Both the `r:nur` and the `r:ref` elements within a rule +instruct the implementation to replace the enclosing rule with the +rules appearing as children of the extension elements. + +```` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ... + +```` + + ### Tokenization annotation and alternative formulations. @@ -421,6 +702,35 @@ The rules for comments in ixml itself offer another wrinkle. Within a comment, any sequence of characters matching *cchar* can be recognized in a single operation; there is no need to look for +alternate parses that consume only some of the characters. So we +annotate the grammar and supply an alternative formulation of +*comment* that replaces it with two new rules: + +```` + ^ [ls:rewrite + comment: -"{", (cchars; comment)*, -"}". + [ls:token] cchars: cchar+. + ] + comment: -"{", (cchar; comment)*, -"}". + -cchar: ~["{}"]. +```` + +Or we may find it easier to read if we inject the alternative +formulation after, not before, the existing rule: + +```` + comment: -"{", (cchar; comment)*, -"}" + [ls:rewrite + comment: -"{", (cchars; comment)*, -"}". + [ls:token] cchars: cchar+. + ]. + -cchar: ~["{}"]. +```` + +Either way, the rewrite contains an alternative formulation of the +grammar which recognizes the same sentences and provides the same XML +representation but may be processed faster by some processors. + ### Text injection. @@ -541,10 +851,34 @@ attribute of *e0* from the same string as a name which happens to contain a string. This is not that serious proposal.) -*Example: synthesized value attribute and inherited environment attribute with variable bindings, for arithmetic expressions with 'let'.* +*Example: synthesized value attribute and inherited environment + attribute with variable bindings, for arithmetic expressions with + 'let'.* + +[Left as an exercise for the reader.] ## Open issues -* Is it really OK not to have a way to have pragmas turn into elements -before the first `rule` element? +* Ideally we would prefer to allow annotations on rules to precede the +mark on the left-hand side; an earlier version of the bracket-QName +proposal did allow them there, rather than after the mark. The +current version was changed in order to allow pragmas at the beginning +of a grammar to be attached to the grammar as a whole. + +* One result is that while for pragmas on symbols in a right-hand side + it doesn't matter whether they come before or after the mark, on the + left-hand side it does matter. It might be less confusing to + require that pragmas follow the mark on the right-hand side, to make + it parallel to the left-hand side. Or it might be less irritating + to allow them either before or after the mark. At the moment, the + proposal takes the second course. + +## Decisions to be made by the group + +* What name should be used for the magic namespace-binding namespace? + In the examples, we use "`http://example.com/ixml-namespaces`". + +* Alternatively, should the spec provide a magic namespace-binding + prefix analogous to `xmlns`? + From 8b5cf9feb4888c675ea92d13ac319c6e61cc1d1a Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Tue, 30 Nov 2021 20:14:24 -0700 Subject: [PATCH 012/152] pragmas.md Add an open issue --- misc/temp.xy.ixml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 misc/temp.xy.ixml diff --git a/misc/temp.xy.ixml b/misc/temp.xy.ixml new file mode 100644 index 00000000..c7613e5e --- /dev/null +++ b/misc/temp.xy.ixml @@ -0,0 +1,4 @@ +x--sentence: x--a, ' ', y--b?, '. ', c. +x--a: 'Speed'. +y--b: 'kills'. +c: 'It really does.'. From 14aa0aa4512608f5fbe4e50e28f1ada9158e3c52 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Tue, 30 Nov 2021 20:14:54 -0700 Subject: [PATCH 013/152] pragmas.md Add an open issue and a decision for the group --- misc/pragmas.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/misc/pragmas.md b/misc/pragmas.md index 84243b39..d4e1592b 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -874,6 +874,14 @@ of a grammar to be attached to the grammar as a whole. to allow them either before or after the mark. At the moment, the proposal takes the second course. +* The fact that extension elements can contain things that are +implicit but not explicit in the ixml form means that a schema for +the visible-XML form of a grammar, as described here, requires +manual intervention and not just a mechanical derivation from the +ixml grammar for ixml. That will make some people nervous, as +it makes us. But at the moment, it says here that this is the right +compromise. + ## Decisions to be made by the group * What name should be used for the magic namespace-binding namespace? @@ -882,3 +890,4 @@ of a grammar to be attached to the grammar as a whole. * Alternatively, should the spec provide a magic namespace-binding prefix analogous to `xmlns`? +* *I could have sworn there were more things to put here.* From f1ed728406891db9ec021b8367d6fd1eaad922b5 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Wed, 1 Dec 2021 11:35:19 -0700 Subject: [PATCH 014/152] pragmas.md One more copy-editing pass --- misc/pragmas.md | 194 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 140 insertions(+), 54 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index d4e1592b..c9f10183 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -1,6 +1,6 @@ # Pragmas for ixml -2021-11-16, rev. most recently 2021-11-30 +2021-11-16, rev. most recently 2021-12-01 This document describes a proposal for adding *pragmas* to the @@ -62,7 +62,7 @@ nonterminal. * Rule rewriting Using pragmas to specify that a rule as given is shorthand for a set -of other rules. (Example: John Lumley's grammar rewriting for XPath.) +of other rules, which can be obtained by rewriting the rule as given. * Tokenization annotation @@ -152,8 +152,8 @@ orthogonal. * What syntax should pragmas have in invisible XML? -* What representation should pragmas have in the XML serialization of -an ixml grammar? +* What representation should pragmas have in the XML form of a +grammar? * Where can pragmas appear? @@ -191,9 +191,10 @@ several locations: * immediately before the full stop of a rule; these pragmas apply to the rule. -Two locations are allowed for pragmas applying to rule in order to -allow them to appear either first or last; this is essentially a -rhetorical choice, as it can make a large difference to readability. +Two locations are allowed for pragmas applying to rules, in order to +allow them to appear either first or last. This is essentially a +rhetorical choice, but an important one as it can make a large +difference to readability. #### Marks on pragmas @@ -206,37 +207,55 @@ various XML constructs in the XML form of the grammar: * An ixml pragma marked `?` corresponds to a processing instruction. +To ensure that the ixml grammar has an XML representation, any two +pragmas marked `@` and attached to the same construct must have +different expanded names. + +Since ixml pragmas marked `@` all correspond to attributes, the +precise location at which the pragmas appear in the ixml form of a +grammar cannot (*or:* must not; *or:* by definition does not) convey +information relevant to the meaning or processing of the pragma. A +pragma marked `@`, for example, has the same meaning whether it +appears before the first rule in the grammar or after the last rule, +or at some point between rules in the grammar. Similarly the +positions of pragmas marked `@` relative to other pragmas attached to +the same construct carry no meaningful information. + + #### The XML form These XML constructs may occur in locations corresponding to those in which pragmas may appear in the ixml grammar: * as a child or attribute of the `ixml` element before, between, or - after `rule` elements. + after `rule` elements. These correspond to ixml pragmas occurring + before, between, or after rule elements. -* as a child or attribute of a `rule` element. An ixml pragma marked - `^` or `?` occurring on the left-hand side of a rule corresponds to an - extension element or processing instruction occurring before the - first `alt` child of the `rule` element; if it occurs immediately - before the full stop of the rule, it corresponds to an element or - processing instruction occurring after the last `alt` of the `rule`. +* as as attribute of a `rule` element, or as an extension element or + processing instruction occurring as a child of `rule`, either before + all `alt` children of the rule or after them. A pragma occurring + before the `alt` children corresponds to an ixml pragma marked `^` + or `?` occurring on the left-hand side of a rule; a pragma occurring + after the last `alt` child corresponds to an ixml pragma marked `^` + of `?` appearing in the whitespace before the full stop of the rule. * as a child or attribute of a `nonterminal`, `literal`, `inclusion`, - or `exclusion` element. + or `exclusion` element. These correspond to ixml pragmas occurring + immediately before the terminal or nonterminal symbol in question, + before or after the mark. -To ensure that the ixml grammar has an XML representation, any two -pragmas marked `@` and attached to the same construct must have -different expanded names. -When a grammar in XML form is serialized into ixml form, extension -attributes appearing on the `rule` element may be serialized either on +When a grammar in XML form is written out into ixml form, extension +attributes appearing on the `ixml` element may be serialized either +before the first rule, after the last one, or between any two rules. +Attributes appearing on the `rule` element may be serialized either on the left-hand side of the rule or before the full stop. Pragmas attached to a symbol in the right-hand side of a rule may be -serialized either before or after the mark; the two positions are -equivalent. +serialized either before or after the mark. In all of these cases, +the possible positions are all equivalent. -For attributes, the attribute name is the QName of the ixml pragma -and the attribute value is the pragma data. +For attributes, the attribute name is the QName of the ixml pragma and +the attribute value is the pragma data. For processing instructions, the PI name is the QName of the ixml pragma and the PI value is the pragma data. @@ -326,7 +345,7 @@ on the left-hand side of a rule correspond in the XML to attributes or children of `rule` elements. In the example, this is the case for the `my:color` pragma. -Annotations appearing immediately before an occurrence of a symbol in +Annotations appearing immediately before an occurrence of a symbol in the right-hand side of an ixml rule pertain to the occurrence of that symbol and correspond to attributes or children of the corresponding element in the XML grammar. In the example, this is the case for the @@ -379,7 +398,7 @@ binds the prefix *ns* to that namespace. That is, a pragma-aware processor must be on the alert for pragmas with the following properties: -* In the pragma's QName, the prefix and local name are the same +* In the pragma's QName, the prefix and local name are the same NCName (non-colonized name). * The pragma's data is the magic namespace name @@ -390,9 +409,9 @@ When that pragma is found, it is interpreted as binding prefix *ns* pragma with a QName using that prefix and a URI as pragma data is to be interpreted as a namespace declaration in the obvious way. -The corresponding constructs in the XML grammar are (a) a namespace -declaration binding the prefix *ns* to the given namespace and (b) an -attribute with the qualified name *ns:ns* with the value +In the XML form for grammars, the corresponding constructs are (a) a +namespace declaration binding the prefix *ns* to the given namespace +and (b) an attribute with the qualified name *ns:ns* with the value "`http://example.com/ixml-namespaces`". *(Alternatively, we could follow the example of XML namespaces and @@ -456,6 +475,11 @@ appropriate namespace bindings on the `x:sentence` element and the prefixed names in the grammar will serialize in instances as prefixed names in the XML, with appropriate namespace bindings. +The fallback behavior of a parser that does not support these pragmas +will be as under the current spec, which someone wearing a +language-lawyer hat tells us is probably to emit output that is +well-formed XML but not *namespace-well-formed* XML. + This example does not define a capability for changing namespace bindings within a document. It's an example. @@ -467,7 +491,7 @@ serializing a nonterminal should be given a name different from the nonterminal itself. (As in Steven Pemberton's proposal for element renaming.) -In the following grammar, the two forms of month have different +In the grammar below, the two forms of month have different syntaxes, so they are required to have different nonterminal names, and so they are required to be serialized using different XML element names. @@ -499,11 +523,16 @@ example with a literal URI-qualified name. In that case, the *iso* rule would read as follows. ```` - iso: year, "-", - [Q{https://lists.w3.org/Archives/Public/public-ixml/2021Oct/0014.html}:rename month] nmonth, - "-", day. +iso: + year, "-", + [Q{https://lists.w3.org/Archives/Public/public-ixml/2021Oct/0014.html}:rename month] nmonth, + "-", day. ```` +The fallback behavior of a parser that does not support these pragmas +will be to produce output using both the element name `month` and the +element name `nmonth`. + ### Name indirection Using pragmas to specify that an element or attribute name should be @@ -568,10 +597,10 @@ briefly *r:nur*, the grammar takes the following form. Note that in order to ensure that the first pragma is correctly interpreted as belonging to the first rule and not to the grammar as a whole, we must specify an explicit mark for the first rule. We specify one for the -second rule as well just for visual parallelism. (In practice, we +second rule as well just for visual parallelism. In practice, we also need a rule that means "don't rewrite the entire rule, but replace references to rules rewritten using *r:nur*; we call this -second pragma *r:ref*.) +second pragma *r:ref*. ```` ^ [r:nur] expr: term; expr, addop, term. @@ -666,6 +695,9 @@ rules appearing as children of the extension elements. ```` +The fallback behavior of a processor that doesn't support these +pragmas will be to serialize `expr` and `term` elements even when they +have only one child. ### Tokenization annotation and alternative formulations. @@ -702,8 +734,15 @@ The rules for comments in ixml itself offer another wrinkle. Within a comment, any sequence of characters matching *cchar* can be recognized in a single operation; there is no need to look for -alternate parses that consume only some of the characters. So we -annotate the grammar and supply an alternative formulation of +alternate parses that consume only some of the characters. But there +is no nonterminal here that matches all and only non-empty sequences +of *cchar*. In order to use the *ls:token* annotation here, we must +first rewrite the grammar at this point. So we introduce an +annotation named *ls:rewrite* to be attached to a single grammar rule +with the meaning that the pragma data provide an alternate form of the +rule. + +We can now annotate the grammar and supply an alternative formulation of *comment* that replaces it with two new rules: ```` @@ -720,10 +759,10 @@ formulation after, not before, the existing rule: ```` comment: -"{", (cchar; comment)*, -"}" - [ls:rewrite - comment: -"{", (cchars; comment)*, -"}". - [ls:token] cchars: cchar+. - ]. + [ls:rewrite + comment: -"{", (cchars; comment)*, -"}". + [ls:token] cchars: cchar+. + ]. -cchar: ~["{}"]. ```` @@ -731,6 +770,15 @@ Either way, the rewrite contains an alternative formulation of the grammar which recognizes the same sentences and provides the same XML representation but may be processed faster by some processors. +The fallback behavior of a processor that doesn't support these +pragmas will be to parse as usual using the grammar as specified. + +Note however that there is no guarantee or requirement that the +alternate rules in an *ls:rewrite* pragma be equivalent to the +fallback rules: pragmas may change the behavior of a processor, and +they may change the meaning of an expression (or here the meaning of a +grammar or part of it). + ### Text injection. @@ -785,7 +833,7 @@ would not involve any interesting new principles. A conventional system for reading attribute grammars and making parsers which parse input and calculate the values of grammatical attributes might represent this grammar thus, naming the grammatical -attribute *v* (this example follows, roughly the syntax of Alblas 191, +attribute *v* (this example follows, roughly the syntax of Alblas 1991, and like Alblas assumes whitespace is someone else's problem). ```` @@ -847,8 +895,8 @@ particular instance of a nonterminal, and *ag:rule* is assumed to contain a set of assignment statements specifying the values of particular attributes, in a subset of XPath syntax. (A more serious proposal would need some way to distinguish *e0.v* meaning "the *v* -attribute of *e0* from the same string as a name which happens to -contain a string. This is not that serious proposal.) +attribute of *e0*" from *e0.v* occurring as a name which happens to +contain a dot. This is not that serious proposal.) *Example: synthesized value attribute and inherited environment @@ -861,10 +909,10 @@ contain a string. This is not that serious proposal.) ## Open issues * Ideally we would prefer to allow annotations on rules to precede the -mark on the left-hand side; an earlier version of the bracket-QName -proposal did allow them there, rather than after the mark. The -current version was changed in order to allow pragmas at the beginning -of a grammar to be attached to the grammar as a whole. + mark on the left-hand side; an earlier version of the bracket-QName + proposal did allow them there, rather than after the mark. The + current version was changed in order to allow pragmas at the + beginning of a grammar to be attached to the grammar as a whole. * One result is that while for pragmas on symbols in a right-hand side it doesn't matter whether they come before or after the mark, on the @@ -875,15 +923,45 @@ of a grammar to be attached to the grammar as a whole. proposal takes the second course. * The fact that extension elements can contain things that are -implicit but not explicit in the ixml form means that a schema for -the visible-XML form of a grammar, as described here, requires -manual intervention and not just a mechanical derivation from the -ixml grammar for ixml. That will make some people nervous, as -it makes us. But at the moment, it says here that this is the right -compromise. + implicit but not explicit in the ixml form means that a schema for + the visible-XML form of a grammar, as described here, requires + manual intervention and not just a mechanical derivation from the + ixml grammar for ixml. That will make some people nervous, as it + makes us. But at the moment, it says here that this is the right + compromise. + +* Should ixml pragmas marked `@` be restricted in where they can + appear (e.g. before the first rule, not later; on the LHS of a rule, + not before the stop)? Rationale for current decision: it's simpler + not to restrict them, and restricting them does not allow us to get + rid of the rule that their precise location carries no meaning, + since we would still have to specify that their position relative to + other pragmas is not signficant. + +* Should the ixml pragmas for namespace declarations cause standard + XML namespace declarations for all prefixes declared? That would + allow an XSLT or XQuery processor to understand the namespace + bindings relevant for QNames appearing as nonterminal names. + Rationale for current decision: it's an example, not a proposal for + the spec, and it's complicated enough already. + +* Allow pragmas between `alt` elements / immediately before the + separator between top-level alternatives in a right-hand side? + + Con: things are complicated enough as it is. Pro: it would allow + pragmas to support the attribute-grammar use case. It would make + occurrence before, after, or between `alt` elements within a `rule` + parallel to occurrence before, after, or between `rule` elements + within the `ixml` element. + ## Decisions to be made by the group +The group may wish to weigh in on any of the open issues listed above, +assuming the authors have not made a decision and removed all trace of +the open issue before sending this document to the group. Some open +questions will need to be made by the group, not by the authors. + * What name should be used for the magic namespace-binding namespace? In the examples, we use "`http://example.com/ixml-namespaces`". @@ -891,3 +969,11 @@ compromise. prefix analogous to `xmlns`? * *I could have sworn there were more things to put here.* + +## References + +Alblas 1991. Henk Alblas, "Introduction to attribute grammars," in +*Attribute grammars, applications and systems:* *International summer +school SAGA, Prague, Czechoslovakia, June 4-13, 1991, Proceedings*, +ed. H. Alblas and B. Melichar (Berlin et al: Springer, 1991) = LNCS +545, pp. 1-15. From e74a462389ca60c39be5fe52c515ffb336be7745 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Fri, 3 Dec 2021 19:45:16 -0700 Subject: [PATCH 015/152] Small copy edits in pragmas.md. --- misc/pragmas.md | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index c9f10183..00aaffcc 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -815,14 +815,14 @@ value of the *expr*. * The value of a *term* consisting solely of a *factor* is the value of the *factor*. -* The value of a *term* consisting solely of a *term* followed by an +* The value of a *term* consisting of a *term* followed by an asterisk and a *factor* is the product of the values of the *term* and the *factor*. * The value of an *expr* consisting solely of a *term* is the value of the *term*. -* The value of an *expr* consisting solely of an *expr* followed by a +* The value of an *expr* consisting of an *expr* followed by a plus sign and a *term* is the sum of the values of the *expr* and the *term*. @@ -832,9 +832,10 @@ would not involve any interesting new principles. A conventional system for reading attribute grammars and making parsers which parse input and calculate the values of grammatical -attributes might represent this grammar thus, naming the grammatical -attribute *v* (this example follows, roughly the syntax of Alblas 1991, -and like Alblas assumes whitespace is someone else's problem). +attributes might represent this grammar as follows. We name the +grammatical attribute *v*. (This example follows roughly the syntax of +Alblas 1991, and like Alblas assumes whitespace is someone else's +problem.) ```` expr_0 → expr_1 '+' term. @@ -869,15 +870,15 @@ and like Alblas assumes whitespace is someone else's problem). Note that some nonterminals are subscripted so that references to their grammatical attributes can be unambiguous. To express this -grammar in ixml, we need either to allow multiple rules for the same -nonterminal, or to allow pragmas before connectors like comma or -semicolon, or we need to allow string-to-typed-value functions in the -style of XPath. I'll assume the latter two, along with a string() -function that returns the string value of a nonterminal. With these -assumptions, and the assumption that by means not specified the -prefix *ag* has been bound to an appropriate grammar for +grammar in ixml, we need either (1) to allow multiple rules for the +same nonterminal, or (2) to allow pragmas before connectors like comma +or semicolon, or (3) we need to allow string-to-typed-value functions +in the style of XPath. I'll assume the latter two, along with a +string() function that returns the string value of a nonterminal. With +these assumptions, and the assumption that by means not specified the +prefix *ag* has been bound to an appropriate namespace for attribute-grammar functionality, the attribute grammar could be -written thus using the brackets-QName syntax +written thus using the brackets-QName syntax: ```` [@ag:id e0] expr: [@ag:id e1] expr, s, '+', s, term @@ -887,7 +888,7 @@ written thus using the brackets-QName syntax factor: digit [@ag:rule factor.v := number(string(digit))]; '(', s, expr, s, ')' [@ag:rule factor.v := expr.v ]. digit: '0'; '1'; '2'; '3'; '4'; '5'; '6'; '7'; '8'; '9'. - s: [#20; #A; #D; #9]_. + s: [#20; #A; #D; #9]. ```` Here *ag:id* is assumed to associate a unique identifier with a From 7131e0498ae871d7c531734b784098d2709276be Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Fri, 3 Dec 2021 19:54:48 -0700 Subject: [PATCH 016/152] Correct some errors caught by Tom Hillman in pragmas.md --- misc/pragmas.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 00aaffcc..f5e94c28 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -748,7 +748,7 @@ We can now annotate the grammar and supply an alternative formulation of ```` ^ [ls:rewrite comment: -"{", (cchars; comment)*, -"}". - [ls:token] cchars: cchar+. + [ls:token] -cchars: cchar+. ] comment: -"{", (cchar; comment)*, -"}". -cchar: ~["{}"]. @@ -761,7 +761,7 @@ formulation after, not before, the existing rule: comment: -"{", (cchar; comment)*, -"}" [ls:rewrite comment: -"{", (cchars; comment)*, -"}". - [ls:token] cchars: cchar+. + - [ls:token] cchars: cchar+. ]. -cchar: ~["{}"]. ```` @@ -806,7 +806,7 @@ expression as a synthesized (bottom-up) grammatical attribute following the rules: * The value of a *factor* consisting of a single digit is the value of -the integer usually so written: '0' has the value of zero, '1` has the +the integer usually so written: '0' has the value of zero, '1' has the value of one, etc. * The value of a *factor* consisting of a parenthesized *expr* is the @@ -883,7 +883,7 @@ written thus using the brackets-QName syntax: ```` [@ag:id e0] expr: [@ag:id e1] expr, s, '+', s, term [ag:rule e0.v := e1.v + term.v ]. - {@ag:id t0] term: [@ag:id t1] term, s, '_', s, factor + [@ag:id t0] term: [@ag:id t1] term, s, '_', s, factor [ag:rule t0.v := t1.v * factor.v]. factor: digit [@ag:rule factor.v := number(string(digit))]; '(', s, expr, s, ')' [@ag:rule factor.v := expr.v ]. @@ -955,6 +955,9 @@ contain a dot. This is not that serious proposal.) parallel to occurrence before, after, or between `rule` elements within the `ixml` element. +* Require pragmas occurring outside rules to be followed by a + full stop, so that pragmas can occur both before the mark on + a left-hand side and between rules? ## Decisions to be made by the group From 17bd0b96d38ff07800de42834ce9c49c2c0c11d5 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Fri, 3 Dec 2021 21:58:22 -0700 Subject: [PATCH 017/152] pragmas.md Realize we have been assuming dynamic names and more. Add a scaled-back proposal and add a dynamic names use case. --- misc/pragmas.md | 217 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 213 insertions(+), 4 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index f5e94c28..6471831b 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -165,6 +165,40 @@ discussion; an earlier proposal (the 'hash-QName' proposal) has been withdrawn, though traces of it may remain in other documents in this branch. +In working out the details of the brackets-QName proposal it has +become clear that as described below it requires that ixml be extended +in various ways with mechanisms for: + +* Binding prefixes to namespaces so that QNames can be interpreted as +usual in XML and related specifications. (See the *Namespace +declarations* use case below.) + +* Serializing a nonterminal as an element or attribute whose name +is taken not from the grammar (as in ixml as currently specified) +but from the input data. (See the *Name indirection* use case below.) + +* Deciding whether to serialize a given nonterminal as an +element or as an attribute based on what is found in the data. +(This may require nothing more elaborate than what is +described in the *Renaming* use case below.) + +As suggested in the worked examples for the use cases, some of these +can themselves be introduced using pragmas, but it is clear that +extending ixml in these ways for the sake of pragmas may feel like a +heavy lift to some members of the community group. So we have also +prepared a scaled-back proposal, described below as the +*pragma-element* proposal, since one of its most visible properties is +that in the XML form of a grammar, all pragmas are represented as +`pragma` elements, and not in the various ways possible in the +brackets-QName proposal. + +The brackets-QName proposal is described first because it was +developed first and the authors currently think of the pragma-element +proposal in terms of its differences from the brackets-QName proposal. +Other things being equal, the authors realize it would be better +to describe the simpler proposal first. But time is short and other +things are not equal. + ### The brackets-QName proposal In this proposal, pragmas take the form of a left square bracket, an @@ -196,6 +230,42 @@ allow them to appear either first or last. This is essentially a rhetorical choice, but an important one as it can make a large difference to readability. +The relevant changes to the ixml grammar are these. First, in several +rules the nonterminal *S* is replaced by *SP* (space-or-pragma), to +allow pragmas to appear as described above: + +```` +ixml: SP, rule+SP, SP. +rule: (mark, SP)?, name, S, ["=:"], S, -alts, (pragma, SP)?, ".". +nonterminal: (mark, SP)?, name, S. +-quoted: (tmark, SP)?, -string. +-encoded: (tmark, SP)?, -"#", @hex, S. +inclusion: (tmark, SP)?, set. +exclusion: (tmark, SP)?, "~", S, set. +```` + +The new nonterminal *SP* and the nonterminals needed for pragmas +themselves are defined as follows. +```` +-SP: (S; pragma)*. +pragma: "[", @pmark?, @name, (S, pragma-data)?, "]". +@pmark: ["@^?"]. +pragma-data: (pragma-chars; pragma)*. +-pragma-chars: ~["[]"]*. +```` + +To make these ixml fragments easier to read, they use only +the marks currently supported by ixml. To read pragmas +in ixml form and produce the XML representation described +below will require either magic (i.e. the specification simply +says that pragmas are a special case and have their own rules +for translation into XML) or pragmas like those described below +in the worked examples. + +*The grammar fragments just given assume that pragmas +always use QNames; they should be extended to support +EQNames as well.* + #### Marks on pragmas Depending on the mark used in the ixml pragma, it may correspond to @@ -272,6 +342,9 @@ pragma.) In this way we ensure that the ixml and XML forms of a grammar contain the same information, although the XML form of the grammar may be easier to process by machine. +*See also the scaled-down proposal below.* + + #### Annotating symbols, rules, or grammars Viewed the other way around, as described in the Desiderata, pragmas @@ -357,6 +430,36 @@ appear as the last children of a `rule` element. In the example, this is the case for the `my:spin` pragma. +### Scaled-down proposal + +The scaled-down proposal differs from the brackets-QName +proposal primarily in its XML representations. + +* The ixml form is as described above, except that marks are + not allowed on pragmas. *(Or just ignored for the moment?)* + +* In the XML form of a grammar, all pragmas take the form of a +`pragma` element along the following lines, with the ellipses replaced +by appropriate attribute values, character sequences (inside +the `pragma-data` element), or element sequences (following +the `pragma-data` element). + +```` + + ... + ... + +```` + +This approach would be less pleasant to use than the current proposal, +but it would possibly be simpler to explain and to specify. + +The schema governing XML representations of grammars will +need to allow arbitrary sequences of elements following +the `pragma-data` child of `pragma`. This is probably best +handled by fiat. + + ## Worked examples *This section should contain, for some or all of the use cases, fully @@ -539,6 +642,103 @@ Using pragmas to specify that an element or attribute name should be taken not from the grammar but from the string value of a given nonterminal. +Consider the following grammar which recognizes a superset of +a simple subset of XML. It's a subset of XML for simplicity, and it's +a superset of the subset because a grammar written at this level +cannot enforce the well-formedness constraints of XML. +```` +{ A grammar for a small subset of XML, for use as an illustration. } + +element: start-tag, content, end-tag; sole-tag. + +-start-tag: "<", @gi, (ws, attribute)*, ws?, ">". +-end-tag: "". +-sole-tag: "<", @gi, (ws, attribute)*, ws?, "/>". + +attribute: @name, ws?, "=", ws?, @value. +@value: dqstring; sqstring. +-dqstring: dq, ~['"']*, dq. +-sqstring: sq, ~["'"]*, sq. +-dq: -['"']. +-sq: -["'"]. + +-content: (PCDATA; processing-instruction; comment; element)*. + +PCDATA: (~["<>&"]; "&"; "<"; ">")*. +processing-instruction: "". +comment: "<--", commentdata, "-->". + +gi: name. +gi2: name. +{ name is left as an exercise for the reader. } + +ws: (#20; #A; #C; #9)+. +```` + +Among the input sequences which should be accepted +by this grammar is the following XML representation of a +haiku. + +```` + + When the old pond + gets a new frog + it's a new pond. + +```` + +We might like an ixml processor to read this and produce +the same XML that any XML parser would produce. (This +desire makes sense only when the ixml processor's results +are supplied to a user in a DOM or XDM or SAX or other +XML API or model.) What the grammar above will produce +is isomorphic to this result, but not the same (*WARNING: +output produced manually, may be inaccurate*): + +```` + + + + + When the old pond + + + gets a new frog + + + It's a new pond. + + +```` + +We can specify that we want normal XML from the grammar using +the pragmas: + +* `xp:name` *expression* - specifies that the name under which a +nonterminal is to be serialized is given by the value of the supplied +XPath expression, interpreted with the standard ixml result element as +the context node and with the result coerced to type *xs:string*. + +* `xp:serialize` *keyword* - specifies that the nonterminal is to be +serialized as specified by the keyword (which is assumed to be +`attribute`, `element`, or the name of some other XPath node test). + +* `xp:drop` - specifies that the nonterminal so annotated is to be +suppressed entirely, along with the entire parse tree dominated by the +nonterminal.' + +With these pragmas, we can annotate the *element* and *attribute* +rules appropriately: +```` +^ [xp:name @gi] element: start-tag, content, end-tag; sole-tag. +... +-end-tag: "". +... +^ [xp:serialize attribute] + [xp:name @name] + attribute: @name, ws?, "=", ws?, @value. +```` + ### Rule rewriting Using pragmas to specify that a rule as given is shorthand for a set @@ -909,12 +1109,25 @@ contain a dot. This is not that serious proposal.) ## Open issues +* The standard rules for translating an ixml grammar to XML form + by parsing it against *ixml.ixml* do not produce the results + described here. Either we just impose them by fiat, or we need + a fully worked out proposal for generating XML names from + the input data. + + This is a major stumbling block. + * Ideally we would prefer to allow annotations on rules to precede the mark on the left-hand side; an earlier version of the bracket-QName proposal did allow them there, rather than after the mark. The current version was changed in order to allow pragmas at the beginning of a grammar to be attached to the grammar as a whole. + If pragmas occurring outside rules are syntactically distinct (e.g. + if they are always to be followed by a full stop), then pragmas can + occur both before the mark on a left-hand side and between rules. + Worth doing? + * One result is that while for pragmas on symbols in a right-hand side it doesn't matter whether they come before or after the mark, on the left-hand side it does matter. It might be less confusing to @@ -955,10 +1168,6 @@ contain a dot. This is not that serious proposal.) parallel to occurrence before, after, or between `rule` elements within the `ixml` element. -* Require pragmas occurring outside rules to be followed by a - full stop, so that pragmas can occur both before the mark on - a left-hand side and between rules? - ## Decisions to be made by the group The group may wish to weigh in on any of the open issues listed above, From f7ecbe3cf028eb0b971ff31147117557e9e64e05 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Fri, 3 Dec 2021 22:06:54 -0700 Subject: [PATCH 018/152] ixml.ixml Attempt to work out grammatical details a bit. --- ixml.ixml | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/ixml.ixml b/ixml.ixml index f6d4547b..b062771a 100644 --- a/ixml.ixml +++ b/ixml.ixml @@ -1,5 +1,7 @@ - ixml: S, rule+S, S. + ixml: SP, rule+SP, SP. + -SP: (S; pragma)*. + -S: (whitespace; comment)*. -whitespace: -[Zs]; tab; lf; cr. -tab: -#9. @@ -8,10 +10,17 @@ comment: -"{", (cchar; comment)*, -"}". -cchar: ~["{}"]. - rule: (mOrP, S)?, name, S, ["=:"], S, -alts, ".". - -mOrP: mark; pragma, mark?; + pragma: "[", @pmark?, @pname, (S, pragma-data)?, "]". + @pname: -QName; -EQName. + -QName: -name, ':', -name. + -EQName: 'Q{', -ns-name, '}', -name. + -ns-name: ~["{}"; '"'; "'"]* { oversimplification }. + @pmark: ["@^?"]. + pragma-data: (pragma-chars; pragma)*. +-pragma-chars: ~["[]"]*. + + rule: (mark, SP)?, name, S, ["=:"], S, -alts, (pragma, SP)?, ".". @mark: ["@^-"]. - pragma: "#", name, S, string. alts: alt+([";|"], S). alt: term*(",", S). -term: factor; @@ -25,19 +34,18 @@ repeat1: factor, "+", S, sep?. option: factor, "?", S. sep: factor. - nonterminal: (mOrP, S)?, name, S. + nonterminal: (mark, SP)?, name, S. -terminal: literal; charset. literal: quoted; encoded. - -quoted: (tmOrP, S)?, -string. + -quoted: (tmark, SP)?, -string. @name: namestart, namefollower*. -namestart: ["_"; Ll; Lu; Lm; Lt; Lo]. -namefollower: namestart; ["-.·‿⁀"; Nd; Mn]. - -tmOrP: tmark; pragma, tmark? @tmark: ["^-"]. string: -'"', dstring, -'"', S; -"'", sstring, -"'", S. @@ -47,13 +55,13 @@ '"', -'"'. {all characters, quotes must be doubled} schar: ~["'"]; "'", -"'". {all characters, quotes must be doubled} - -encoded: (tmOrP, S)?, -"#", @hex, S. + -encoded: (tmark, SP)?, -"#", @hex, S. hex: ["0"-"9"; "a"-"f"; "A"-"F"]+. -charset: inclusion; exclusion. - inclusion: (tmOrP, S)?, set. - exclusion: (tmOrP, S)?, "~", S, set. + inclusion: (tmark, SP)?, set. + exclusion: (tmark, SP)?, "~", S, set. -set: "[", S, member*([";|"], S), "]", S. -member: literal; range; From 2abd9e6662dbcdf6697a8c5057a517e747368a9c Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Sat, 4 Dec 2021 08:51:53 -0700 Subject: [PATCH 019/152] ixml.ixml Don't use the name EQName, it means something different i think --- ixml.ixml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ixml.ixml b/ixml.ixml index b062771a..eb87976f 100644 --- a/ixml.ixml +++ b/ixml.ixml @@ -11,9 +11,9 @@ -cchar: ~["{}"]. pragma: "[", @pmark?, @pname, (S, pragma-data)?, "]". - @pname: -QName; -EQName. + @pname: -QName; -UQName. -QName: -name, ':', -name. - -EQName: 'Q{', -ns-name, '}', -name. + -UQName: 'Q{', -ns-name, '}', -name. -ns-name: ~["{}"; '"'; "'"]* { oversimplification }. @pmark: ["@^?"]. pragma-data: (pragma-chars; pragma)*. From d77c60a38bbe2d1afcf6221d22696a2a791c1752 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Sat, 4 Dec 2021 08:53:37 -0700 Subject: [PATCH 020/152] Restructure pragmas.md Work out a better way to present the fixed- and variable-form proposals. --- misc/pragmas.md | 328 ++++++++++++++++++++++++++++-------------------- 1 file changed, 194 insertions(+), 134 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 6471831b..1a1e9942 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -1,6 +1,6 @@ # Pragmas for ixml -2021-11-16, rev. most recently 2021-12-01 +2021-11-16, rev. most recently 2021-12-04 This document describes a proposal for adding *pragmas* to the @@ -165,9 +165,11 @@ discussion; an earlier proposal (the 'hash-QName' proposal) has been withdrawn, though traces of it may remain in other documents in this branch. +### The brackets-QName proposal + In working out the details of the brackets-QName proposal it has -become clear that as described below it requires that ixml be extended -in various ways with mechanisms for: +become clear that as initially conceived it requires that ixml be +extended in various ways with mechanisms for: * Binding prefixes to namespaces so that QNames can be interpreted as usual in XML and related specifications. (See the *Namespace @@ -182,29 +184,22 @@ element or as an attribute based on what is found in the data. (This may require nothing more elaborate than what is described in the *Renaming* use case below.) -As suggested in the worked examples for the use cases, some of these -can themselves be introduced using pragmas, but it is clear that -extending ixml in these ways for the sake of pragmas may feel like a -heavy lift to some members of the community group. So we have also -prepared a scaled-back proposal, described below as the -*pragma-element* proposal, since one of its most visible properties is -that in the XML form of a grammar, all pragmas are represented as -`pragma` elements, and not in the various ways possible in the -brackets-QName proposal. - -The brackets-QName proposal is described first because it was -developed first and the authors currently think of the pragma-element -proposal in terms of its differences from the brackets-QName proposal. -Other things being equal, the authors realize it would be better -to describe the simpler proposal first. But time is short and other -things are not equal. +Some of these extensions can themselves be introduced using pragmas, +as illustrated in the *Worked examples* section below, but it is clear +that adding so much new functionality to ixml for the sake of pragmas +may feel like a heavy lift to some members of the community group. So +the discussion below describes two variants of the bracket-QName +proposal: a 'fixed-form' variant and a 'variable-form' variant, so +named for the relative fixity or variation in the XML representation +of pragmas in the two forms of the proposal. For brevity they are +often referred to as F and V respectively. Since they have a great +deal in common, they are described in parallel rather than separately. -### The brackets-QName proposal +In both forms of this proposal, pragmas in ixml take the form of a +left square bracket, an optional mark, a QName or a 'URI-qualified +name', the pragma's data, and a right square bracket. Nested pairs of +square brackets are allowed, so pragmas can nest arbitrarily deep. -In this proposal, pragmas take the form of a left square bracket, an -optional mark, a QName, the pragma's data, and a right square bracket. -Nested pairs of square brackets are allowed, so pragmas can nest -arbitrarily deep. #### The ixml form @@ -235,41 +230,49 @@ rules the nonterminal *S* is replaced by *SP* (space-or-pragma), to allow pragmas to appear as described above: ```` -ixml: SP, rule+SP, SP. -rule: (mark, SP)?, name, S, ["=:"], S, -alts, (pragma, SP)?, ".". -nonterminal: (mark, SP)?, name, S. --quoted: (tmark, SP)?, -string. --encoded: (tmark, SP)?, -"#", @hex, S. -inclusion: (tmark, SP)?, set. -exclusion: (tmark, SP)?, "~", S, set. + ixml: SP, rule+SP, SP. + rule: (mark, SP)?, name, S, ["=:"], S, -alts, (pragma, SP)?, ".". + nonterminal: (mark, SP)?, name, S. + -quoted: (tmark, SP)?, -string. + -encoded: (tmark, SP)?, -"#", @hex, S. + inclusion: (tmark, SP)?, set. + exclusion: (tmark, SP)?, "~", S, set. ```` The new nonterminal *SP* and the nonterminals needed for pragmas themselves are defined as follows. + +```` + -SP: (S; pragma)*. + pragma: "[", @pmark?, @pname, (S, pragma-data)?, "]". + @pname: -QName; -UQName. + -QName: -name, ':', -name. + -UQName: 'Q{', -ns-name, '}', -name. + -ns-name: ~["{}"; '"'; "'"]* { oversimplification }. + @pmark: ["@^?"]. + pragma-data: (pragma-chars; pragma)*. + -pragma-chars: ~["[]"]*. ```` --SP: (S; pragma)*. -pragma: "[", @pmark?, @name, (S, pragma-data)?, "]". -@pmark: ["@^?"]. -pragma-data: (pragma-chars; pragma)*. --pragma-chars: ~["[]"]*. + +Note that these ixml fragments use only the marks and serialization +rules currently supported by ixml. If the variable-form proposal is +adopted, it will probably make sense to add new marks or new +serialization rules, or both. + +A simple example illustrates the core syntactic ideas: +```` + [my:pitch C#] + ^ [my:color blue] a = b, [@my:flavor vanilla] c? [my:spin ...]. ```` -To make these ixml fragments easier to read, they use only -the marks currently supported by ixml. To read pragmas -in ixml form and produce the XML representation described -below will require either magic (i.e. the specification simply -says that pragmas are a special case and have their own rules -for translation into XML) or pragmas like those described below -in the worked examples. +This fragment assumes that the prefix *my* is bound to some namespace, +by means not shown here (*and to be determined*). -*The grammar fragments just given assume that pragmas -always use QNames; they should be extended to support -EQNames as well.* -#### Marks on pragmas +#### Marks on pragmas in V -Depending on the mark used in the ixml pragma, it may correspond to -various XML constructs in the XML form of the grammar: +In the variable-form proposal, the *pmark* signals which of various +XML constructs represents the pragma in the XML form of the grammar: * An ixml pragma marked `^` corresponds to an extension element. @@ -291,38 +294,80 @@ or at some point between rules in the grammar. Similarly the positions of pragmas marked `@` relative to other pragmas attached to the same construct carry no meaningful information. +#### Marks on pragmas in F + +In the fixed-form proposal, the *pmark* is included but has no special +meaning for a standard processor, since all pragmas have the same +representation in XML grammars. + + +#### The XML form of pragmas in F #### + +In F, all pragmas in the XML form of a grammar take the form +implicitly described by the grammar fragments shown earlier: a +`pragma` element with attributes named *pname* and *pmark* and a child +element named `pragma-data`. -#### The XML form +It is not signaled in the ixml grammar (because ixml has no way to say +it), but other child elements may follow the `pragma-data` element. +Their content is required to be reconstructible from the pragma data +and the fallback expression, but they may express the information in a +more convenient form. (For example, the pragma data may be a +structured expression which a conforming application will parse; the +parsed form of the pragma data may be enclosed in the pragma.) In this +way we ensure that the ixml and XML forms of a grammar contain the +same information, although the XML form of the grammar may be easier +to process by machine. -These XML constructs may occur in locations corresponding to those in -which pragmas may appear in the ixml grammar: +For example, the ixml pragma `[my:pitch C#]` corresponds to the following +XML pragma -* as a child or attribute of the `ixml` element before, between, or +```` + + C# + ... + +```` + +The ellipsis shows where additional elements not constrained by this +proposal may appear. The only constraint is that it must be possible +in principle to construct them from the ixml form of the grammar. + +It follows from the grammar fragments above that in an XML grammar, +pragmas may occur in locations, which annotate different parts of the +grammar.: + +* as a child of the `ixml` element before, between, or after `rule` elements. These correspond to ixml pragmas occurring before, between, or after rule elements. -* as as attribute of a `rule` element, or as an extension element or - processing instruction occurring as a child of `rule`, either before - all `alt` children of the rule or after them. A pragma occurring - before the `alt` children corresponds to an ixml pragma marked `^` - or `?` occurring on the left-hand side of a rule; a pragma occurring - after the last `alt` child corresponds to an ixml pragma marked `^` - of `?` appearing in the whitespace before the full stop of the rule. +* as a child of the `rule` element, either before all `alt` children + of the rule or after them. A pragma occurring before the `alt` + children corresponds to an ixml pragma occurring on the left-hand + side of a rule; a pragma occurring after the last `alt` child + corresponds to an ixml pragma appearing in the whitespace before the + full stop of the rule. -* as a child or attribute of a `nonterminal`, `literal`, `inclusion`, - or `exclusion` element. These correspond to ixml pragmas occurring +* as a child of a `nonterminal`, `literal`, `inclusion`, or +`exclusion` element. These correspond to ixml pragmas occurring immediately before the terminal or nonterminal symbol in question, before or after the mark. +#### The XML form of pragmas in V + +In the variable-form proposal, XML pragmas may occur in the same +locations as elements or processing instructions, and may also occur +as attributes on the parent element. + When a grammar in XML form is written out into ixml form, extension attributes appearing on the `ixml` element may be serialized either before the first rule, after the last one, or between any two rules. Attributes appearing on the `rule` element may be serialized either on -the left-hand side of the rule or before the full stop. Pragmas +the left-hand side of the rule or before the full stop. Pragmas attached to a symbol in the right-hand side of a rule may be -serialized either before or after the mark. In all of these cases, -the possible positions are all equivalent. +serialized either before or after the mark. In all of these cases, the +possible positions are all equivalent. For attributes, the attribute name is the QName of the ixml pragma and the attribute value is the pragma data. @@ -332,17 +377,8 @@ ixml pragma and the PI value is the pragma data. For extension elements, the element name is the QName of the ixml pragma and the pragma data appears as character data within a child -named `pragma-data`. Other child elements may follow the -`pragma-data` element; their content is required to be reconstructible -from the pragma data and the fallback expression, but they may express -the information in a more convenient form. (For example, the pragma -data may be a structured expression which a conforming application -will parse; the parsed form of the pragma data may be enclosed in the -pragma.) In this way we ensure that the ixml and XML forms of a -grammar contain the same information, although the XML form of the -grammar may be easier to process by machine. - -*See also the scaled-down proposal below.* +named `pragma-data`. As in proposal F, the element may contain other +XML elements with a structured representation of relevant information. #### Annotating symbols, rules, or grammars @@ -380,6 +416,8 @@ as a whole, as follows: * Pragmas applicable to the grammar as a whole appear the first rule. +F and V are the same in this regard. + #### An example For example: @@ -389,7 +427,7 @@ For example: ^ [my:color blue] a = b, [@my:flavor vanilla] c? [my:spin ...]. ```` -The corresponding XML form is: +The corresponding XML form in proposal V is: ```` @@ -409,6 +447,32 @@ The corresponding XML form is: ```` +In F, the corresponding XML form is: + +```` + + C# + + + + blue + + + + + + + ... + + +```` + Annotations appearing between rules in the ixml correspond to nodes in the XML appearing as children or attributes of the `ixml` element. In the example, this is the case for the `my:pitch` pragma. @@ -430,36 +494,6 @@ appear as the last children of a `rule` element. In the example, this is the case for the `my:spin` pragma. -### Scaled-down proposal - -The scaled-down proposal differs from the brackets-QName -proposal primarily in its XML representations. - -* The ixml form is as described above, except that marks are - not allowed on pragmas. *(Or just ignored for the moment?)* - -* In the XML form of a grammar, all pragmas take the form of a -`pragma` element along the following lines, with the ellipses replaced -by appropriate attribute values, character sequences (inside -the `pragma-data` element), or element sequences (following -the `pragma-data` element). - -```` - - ... - ... - -```` - -This approach would be less pleasant to use than the current proposal, -but it would possibly be simpler to explain and to specify. - -The schema governing XML representations of grammars will -need to allow arbitrary sequences of elements following -the `pragma-data` child of `pragma`. This is probably best -handled by fiat. - - ## Worked examples *This section should contain, for some or all of the use cases, fully @@ -537,7 +571,7 @@ the *y* namespace, and some in no namespace at all, might be y:b: 'kills'. c: 'It really does.'. ```` -The XML representation of the grammar might be: +The XML representation of the grammar might be (in form V): ```` ```` +In form F, the beginning of the grammar is different: + +```` + + + http://example.com/ixml-namespaces + + + http://example.com/NS/existential + + + http://example.com/NS/yoyo + + ... +```` + An ixml parser supporting these namespace pragmas will emit appropriate namespace bindings on the `x:sentence` element and the prefixed names in the grammar will serialize in instances as prefixed @@ -647,32 +697,32 @@ a simple subset of XML. It's a subset of XML for simplicity, and it's a superset of the subset because a grammar written at this level cannot enforce the well-formedness constraints of XML. ```` -{ A grammar for a small subset of XML, for use as an illustration. } - -element: start-tag, content, end-tag; sole-tag. - --start-tag: "<", @gi, (ws, attribute)*, ws?, ">". --end-tag: "". --sole-tag: "<", @gi, (ws, attribute)*, ws?, "/>". - -attribute: @name, ws?, "=", ws?, @value. -@value: dqstring; sqstring. --dqstring: dq, ~['"']*, dq. --sqstring: sq, ~["'"]*, sq. --dq: -['"']. --sq: -["'"]. - --content: (PCDATA; processing-instruction; comment; element)*. - -PCDATA: (~["<>&"]; "&"; "<"; ">")*. -processing-instruction: "". -comment: "<--", commentdata, "-->". - -gi: name. -gi2: name. -{ name is left as an exercise for the reader. } - -ws: (#20; #A; #C; #9)+. + { A grammar for a small subset of XML, for use as an illustration. } + + element: start-tag, content, end-tag; sole-tag. + + -start-tag: "<", @gi, (ws, attribute)*, ws?, ">". + -end-tag: "". + -sole-tag: "<", @gi, (ws, attribute)*, ws?, "/>". + + attribute: @name, ws?, "=", ws?, @value. + @value: dqstring; sqstring. + -dqstring: dq, ~['"']*, dq. + -sqstring: sq, ~["'"]*, sq. + -dq: -['"']. + -sq: -["'"]. + + -content: (PCDATA; processing-instruction; comment; element)*. + + PCDATA: (~["<>&"]; "&"; "<"; ">")*. + processing-instruction: "". + comment: "<--", commentdata, "-->". + + gi: name. + gi2: name. + { name is left as an exercise for the reader. } + + ws: (#20; #A; #C; #9)+. ```` Among the input sequences which should be accepted @@ -895,6 +945,10 @@ rules appearing as children of the extension elements. ```` +The attentive reader will note that the XML form shown is that for the +V proposal; the form it would take in the F proposal should be easily +constructed. + The fallback behavior of a processor that doesn't support these pragmas will be to serialize `expr` and `term` elements even when they have only one child. @@ -1109,6 +1163,12 @@ contain a dot. This is not that serious proposal.) ## Open issues +* In the fixed-form variant, drop *pmark* entirely? The current text + leaves it in, on the theory that if it is retained, then it is possible + in principle to adopt the fixed-form variant in the ixml spec and + then use pragmas to specify the behavior of the variable-form + variant. + * The standard rules for translating an ixml grammar to XML form by parsing it against *ixml.ixml* do not produce the results described here. Either we just impose them by fiat, or we need From 7bb4f363d9d1a2b9a20500e471245c69c6907aa9 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Sat, 4 Dec 2021 08:57:57 -0700 Subject: [PATCH 021/152] pragmas.md Add slot for pragmas-for-pragmas demo --- misc/pragmas.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/misc/pragmas.md b/misc/pragmas.md index 1a1e9942..c30b82b2 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -1160,6 +1160,15 @@ contain a dot. This is not that serious proposal.) [Left as an exercise for the reader.] +### Pragmas for proposal V + +In the ideal case, it should be possible to use pragmas defined +as in proposal F to describe the behavior of processors under +proposal V. + +*Example to be worked out with list of the required pragmas +and annotated version of the ixml grammar fragments given +earlier.* ## Open issues From 5df6d24bb8c5dfabfba2520cc2d33e57bc3355bb Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Sat, 4 Dec 2021 11:09:31 -0700 Subject: [PATCH 022/152] pragmas for pragmas in pragmas.md Add a sketch of pragmas for proposal V. --- misc/pragmas.md | 80 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/misc/pragmas.md b/misc/pragmas.md index c30b82b2..dda5e674 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -1170,6 +1170,86 @@ proposal V. and annotated version of the ixml grammar fragments given earlier.* +The differences between proposals F and V all lie in the +XML representation of pragmas: + +* In F, the element and attribute names of the pragma element + are fixed; in V the element name is assigned dynamically. + +* In F, all pragmas are elements; in V, some are attributes and some + are processing instructions. + +* In F, the *pname* and *pmark* appear as attributes on the + pragma; in V they affect the name and form of the XML pragma + but do not appear as content, attributes, or children. + +The section above on name indirection illustrates ways to solve the +first and third of these. We can adapt the pragmas shown there and +add a third for the remaining item, so that we have three pragmas, +which we define in terms of their operation on an XML representation +of the raw parse tree (i.e. the one an ixml processor would produce if +it ignored all marks); a processor might implement the pragma +differently, as long as the result were the same. + +The first two of these pragmas are defined to apply to a rule and they +describe the relation of the serialized XML for instances of that rule +to the raw parse tree for that instance. + +* `pr:as` *pmark*?: If the *pmark* argument is `^` or absent, the + nonterminal is serialized as an element; if it's `@`, the + nonterminal is serialized as an attribute; if it's `?`, the + nonterminal is serialized as a processing instruction. + +* `pr:name` *pname*: The *pname* is specified by an expression (we + will assume a small subset of XPath). If the value is a lexical + QName, that QName is the name of the corresponding XML node; if the + value is a URIQualifiedName (of the form + Q{namespace-name}local-name), then a prefix is chosen, a lexical + QName is formed from that prefix and the specified local name, and + any namespace declarations necessary to bind the chosen prefix to + the specified URI are created and added to an appropriate element. + +The third pragma applies to nonterminals in a right-hand side. + +* `pr:drop`: The parse tree rooted in the nonterminal annotated with + `pr:drop` does not appear in the serialization. Since that subtree + may be used (e.g. to supply an element name), it is important as a + practical matter that this pragma be interpreted after the others. + +With these three pragmas, the ixml rule for *pragma* can be annotated +as follows: + +```` + ^ [pr:as string(pmark)] + [pr:name string(pname)] + pragma: "[", [pr:drop] @pmark?, [pr:drop] @pname, (S, pragma-data)?, "]". +``` + +Alternatively, we could define a single pragma with a sequence of +comma-separated property/value pairs, using parenthesized +comma-separated values to specify multiple values: + +```` + ^ [pr:v name: string(pname), + as: string(pmark), + drop: (pmark, pname)] + pragma: "[", @pmark?, @pname, (S, pragma-data)?, "]". +``` + +Note: The `pr:v` (for 'pragmas proposal V') pragma seems less general +than the earlier set, but it feels slightly lighter-weight. + +Note: The `pr:as` pragma is very ad hoc; a more general approach would +say that its argument should be one of 'element', 'attribute', +'processing-instruction', 'comment', 'text'. But then we would need +some way of saying "if the string value of *pmark* is '^', then +'element', otherwise ...", and that seems likely to lead to a long +slide down a slippery slope to a Turing-complete programming +language. One of the nice things about defining your own pragmas is +that you can give them ad hoc semantics if you need to, without +spoiling things for other people. + + ## Open issues * In the fixed-form variant, drop *pmark* entirely? The current text From 04db6bfc2a1cccc90616fec5bab6c07204b54b4b Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Sat, 4 Dec 2021 11:23:10 -0700 Subject: [PATCH 023/152] Update pragmas.md I hate MarkDown. --- misc/pragmas.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index dda5e674..0ed3a1ce 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -1223,7 +1223,7 @@ as follows: ^ [pr:as string(pmark)] [pr:name string(pname)] pragma: "[", [pr:drop] @pmark?, [pr:drop] @pname, (S, pragma-data)?, "]". -``` +```` Alternatively, we could define a single pragma with a sequence of comma-separated property/value pairs, using parenthesized @@ -1234,7 +1234,7 @@ comma-separated values to specify multiple values: as: string(pmark), drop: (pmark, pname)] pragma: "[", @pmark?, @pname, (S, pragma-data)?, "]". -``` +```` Note: The `pr:v` (for 'pragmas proposal V') pragma seems less general than the earlier set, but it feels slightly lighter-weight. From a4a817656e9822612089be81b95bec45ea6fbc81 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Sat, 4 Dec 2021 14:50:02 -0700 Subject: [PATCH 024/152] pragmas.md one more copy-editing pass (but slacked off at the end) --- misc/pragmas.md | 160 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 110 insertions(+), 50 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 0ed3a1ce..a4af8921 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -80,7 +80,7 @@ ixml grammar to allow different annotation or better optimization. Using pragmas to indicate that a particular string should be injected into the XML representation of the input as (part of) a text node, or as an attribute or element. (This can help make the output of -an ixml parse conform to a pre-existing schema.) +an ixml parser conform to a pre-existing schema.) * Attribute grammar specification @@ -88,9 +88,9 @@ an ixml parse conform to a pre-existing schema.) grammatical attributes to be associated with nodes of the parse tree, whether they are inherited from an ancestor or an elder sibling or synthesized from the children of a node, and what values should be -assigned to them. (Note that grammatical attributes are not to be -confused with XML attributes, although in particular cases it may be -helpful to render a grammatical attribute as an XML attribute.) +assigned to them. Grammatical attributes are not to be confused with +XML attributes, although in particular cases it may be helpful to +render a grammatical attribute as an XML attribute. *Are there other use cases that need to be mentioned here?* @@ -222,36 +222,36 @@ several locations: Two locations are allowed for pragmas applying to rules, in order to allow them to appear either first or last. This is essentially a -rhetorical choice, but an important one as it can make a large -difference to readability. +rhetorical choice, but an important one as it can make a difference to +readability. The relevant changes to the ixml grammar are these. First, in several rules the nonterminal *S* is replaced by *SP* (space-or-pragma), to allow pragmas to appear as described above: ```` - ixml: SP, rule+SP, SP. - rule: (mark, SP)?, name, S, ["=:"], S, -alts, (pragma, SP)?, ".". - nonterminal: (mark, SP)?, name, S. - -quoted: (tmark, SP)?, -string. - -encoded: (tmark, SP)?, -"#", @hex, S. - inclusion: (tmark, SP)?, set. - exclusion: (tmark, SP)?, "~", S, set. +ixml: SP, rule+SP, SP. +rule: (mark, SP)?, name, S, ["=:"], S, -alts, (pragma, SP)?, ".". +nonterminal: (mark, SP)?, name, S. +-quoted: (tmark, SP)?, -string. +-encoded: (tmark, SP)?, -"#", @hex, S. +inclusion: (tmark, SP)?, set. +exclusion: (tmark, SP)?, "~", S, set. ```` The new nonterminal *SP* and the nonterminals needed for pragmas themselves are defined as follows. ```` - -SP: (S; pragma)*. - pragma: "[", @pmark?, @pname, (S, pragma-data)?, "]". - @pname: -QName; -UQName. - -QName: -name, ':', -name. - -UQName: 'Q{', -ns-name, '}', -name. - -ns-name: ~["{}"; '"'; "'"]* { oversimplification }. - @pmark: ["@^?"]. - pragma-data: (pragma-chars; pragma)*. - -pragma-chars: ~["[]"]*. +-SP: (S; pragma)*. +pragma: -"[", @pmark?, @pname, (S, pragma-data)?, -"]". +@pname: -QName; -UQName. +-QName: -name, ':', -name. +-UQName: 'Q{', -ns-name, '}', -name. +-ns-name: ~["{}"; '"'; "'"]* { oversimplification }. +@pmark: ["@^?"]. +pragma-data: (pragma-chars; pragma)*. +-pragma-chars: ~["[]"]*. ```` Note that these ixml fragments use only the marks and serialization @@ -334,8 +334,8 @@ proposal may appear. The only constraint is that it must be possible in principle to construct them from the ixml form of the grammar. It follows from the grammar fragments above that in an XML grammar, -pragmas may occur in locations, which annotate different parts of the -grammar.: +pragmas may occur in different locations which annotate different +parts of the grammar.: * as a child of the `ixml` element before, between, or after `rule` elements. These correspond to ixml pragmas occurring @@ -357,8 +357,8 @@ grammar.: #### The XML form of pragmas in V In the variable-form proposal, XML pragmas may occur in the same -locations as elements or processing instructions, and may also occur -as attributes on the parent element. +locations when they take the form of elements or processing +instructions. They also occur as attributes on the parent element. When a grammar in XML form is written out into ixml form, extension attributes appearing on the `ixml` element may be serialized either @@ -381,11 +381,52 @@ named `pragma-data`. As in proposal F, the element may contain other XML elements with a structured representation of relevant information. +#### Pragmas and other extension mechanisms + +Some XML formats make the provision that any namespace-qualified +attributes and elements may occur in documents, provided their +namespace is not reserved for other purposes. For example, both XSLT +and XSD provide that namespace-qualified attributes in other namespace +may appear on elements in the core namespace, and both allow what we +might call foreign elements in other locations, although not at all +locations in a document. + +In general, the purpose of such provisions is similar to that of +pragmas, so it makes sense to ask how such foreign elements and +attributes relate to the XML pragmas described here. In particular, +when can they be rendered as pragmas in the ixml form? + +Under proposal F, pragmas in XML are always `pragma` elements; foreign +attributes and elements are not formally pragmas and the ixml spec +would under proposal F define no correspondence between them and any +ixml notation. + +Under proposal V, the situation is more complex: + +* Non-ixml namespaced attributes on the `ixml`, `rule`, `nonterminal`, + `literal`, `inclusion`, and `exclusion` elements can be recognized + as pragmas. + +* Non-ixml namespaced elements can be recognized as pragmas if they + appear in one of the specified locations. + +* Processing instructions can be recognized as pragmas if they occur + in one of the specified locations. + +Any pragma recognized can be written out in ixml notation. In the +case of attributes and processing instructions, the pragma data will +be taken from the value of the node. In the case of elements, the +pragma data will be the string value of the `pragma-data` element +appearing as a child of the element, if there is one. + +Non-ixml constructs not recognized as pragmas cannot be translated +interoperably to ixml form. + #### Annotating symbols, rules, or grammars -Viewed the other way around, as described in the Desiderata, pragmas -can apply to symbols, rules, to a subset of rules, or to the grammar -as a whole, as follows: +As described in the Desiderata, pragmas can apply to symbols, rules, +to a subset of rules, or to the grammar as a whole. There are several +cases. * Pragmas applicable to one occurrence of one symbol appear in ixml before that symbol, either before or after the mark if any; in XML @@ -414,7 +455,8 @@ as a whole, as follows: that information; we specify this only out of an abundance of caution.) -* Pragmas applicable to the grammar as a whole appear the first rule. +* Pragmas applicable to the grammar as a whole appear before the first + rule. F and V are the same in this regard. @@ -511,6 +553,13 @@ namespace, some into another, and some into none, and that namespace bindings should remain constant throughout the grammar (so: no changing the default namespace in the middle of the document). +*Note that there is a bootstrapping issue here: the proposal made in +this document requires that pragmas be identified by qualified names, +which requires some level of namespace support in ixml itself. So +there is a certain unavoidable artificiality in the approach taken in +the following discussion, of trying to support pragmas for namespace +declarations without asssuming namespace support in the base ixml.* + We define the namespace 'http://example.com/ixml-namespaces" (*final decision on namespace name pending*) as providing for namespace bindings, and we adopt the convention that a prefix `ppp` is bound to @@ -541,10 +590,18 @@ with the following properties: * The pragma's data is the magic namespace name "`http://example.com/ixml-namespaces`". -When that pragma is found, it is interpreted as binding prefix *ns* -(whatever it might be) to the indicated namespace. Any subsequent -pragma with a QName using that prefix and a URI as pragma data is to -be interpreted as a namespace declaration in the obvious way. +Alternatively, the prefix *ns* might be bound to the namespace +indicate using a pragma of the form + +```` + [@Q{http://example.com/ixml-namespaces}:ns http://example.com/ixml-namespaces] +```` + +When either form of the pragma is found, it is interpreted as binding +prefix *ns* (whatever prefix that might be) to the indicated +namespace. Any subsequent pragma with a QName using that prefix and a +URI as pragma data is to be interpreted as a namespace declaration in +the obvious way. In the XML form for grammars, the corresponding constructs are (a) a namespace declaration binding the prefix *ns* to the given namespace @@ -630,13 +687,14 @@ names in the XML, with appropriate namespace bindings. The fallback behavior of a parser that does not support these pragmas will be as under the current spec, which someone wearing a -language-lawyer hat tells us is probably to emit output that is +language-lawyer hat tells us is probably to emit output that lacks +necessary namespace declarations and is technically speaking well-formed XML but not *namespace-well-formed* XML. This example does not define a capability for changing namespace bindings within a document. It's an example. - + ### Renaming Using pragmas to specify that an element or attribute name @@ -657,15 +715,16 @@ support the pragma will call them all `month`. ```` [@nsd:nsd http://example.com/ixml-namespaces] - [@nsd:sp https://lists.w3.org/Archives/Public/public-ixml/2021Oct/0014.html] + [@nsd:sp + https://lists.w3.org/Archives/Public/public-ixml/2021Oct/0014.html] - date: day, " ", month, " ", year. - day: d, d?. - month: "January"; "February"; etc. - year: d, d, d, d. + date: day, " ", month, " ", year. + day: d, d?. + month: "January"; "February"; etc. + year: d, d, d, d. - iso: year, "-", [sp:rename month] nmonth, "-", day. - nmonth: d, d. + iso: year, "-", [sp:rename month] nmonth, "-", day. + nmonth: d, d. ```` The namespace bindings in the example assume namespace pragmas as @@ -697,7 +756,7 @@ a simple subset of XML. It's a subset of XML for simplicity, and it's a superset of the subset because a grammar written at this level cannot enforce the well-formedness constraints of XML. ```` - { A grammar for a small subset of XML, for use as an illustration. } + { A grammar for a small subset of XML, as an illustration. } element: start-tag, content, end-tag; sole-tag. @@ -749,20 +808,20 @@ output produced manually, may be inaccurate*): - + When the old pond - + gets a new frog - + It's a new pond. ```` -We can specify that we want normal XML from the grammar using -the pragmas: +We can use the following pragmas to obtain normal XML from +parsing with the grammar: * `xp:name` *expression* - specifies that the name under which a nonterminal is to be serialized is given by the value of the supplied @@ -1051,7 +1110,8 @@ involving addition and multiplication over single-digit integers. ```` expr: expr, s, '+', s, term. term: term, s, '*', s, factor. - factor: '0'; '1'; '2'; '3'; '4'; '5'; '6'; '7'; '8'; '9'; '(', s, expr, s, ')'. + factor: '0'; '1'; '2'; '3'; '4'; '5'; '6'; '7'; '8'; '9'; + -'(', s, expr, s, -')'. s: [#20; #A; #D; #9]*. ```` From df6f77f7853469eb15e9b14cfc760d112ccd397c Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Sat, 4 Dec 2021 19:15:05 -0700 Subject: [PATCH 025/152] Update pragmas.md Minor copy edits --- misc/pragmas.md | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index a4af8921..8ab4b033 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -1318,32 +1318,35 @@ spoiling things for other people. then use pragmas to specify the behavior of the variable-form variant. -* The standard rules for translating an ixml grammar to XML form - by parsing it against *ixml.ixml* do not produce the results - described here. Either we just impose them by fiat, or we need - a fully worked out proposal for generating XML names from - the input data. - - This is a major stumbling block. - * Ideally we would prefer to allow annotations on rules to precede the mark on the left-hand side; an earlier version of the bracket-QName proposal did allow them there, rather than after the mark. The current version was changed in order to allow pragmas at the beginning of a grammar to be attached to the grammar as a whole. - If pragmas occurring outside rules are syntactically distinct (e.g. - if they are always to be followed by a full stop), then pragmas can - occur both before the mark on a left-hand side and between rules. - Worth doing? + If pragmas occurring outside rules are syntactically distinct, then + pragmas can occur both before the mark on a left-hand side and + between rules. It does complicate the grammar a bit. Worth doing? + + Easiest approach may be to require a full stop after pragmas occurring + outside of rules. + + * Change ixml rule to `ixml: SPS, rule+SPS, SPS.` + * Define SPS as `-SPS: (S; (pragma, S, '.'))*.` + + Or alternatively just change the rule for ixml and define two forms + of pragma: + + * `ixml: S, (rule; Pragma)+S, S.` + * `Pragma: pragma, S, '.'.` -* One result is that while for pragmas on symbols in a right-hand side - it doesn't matter whether they come before or after the mark, on the - left-hand side it does matter. It might be less confusing to - require that pragmas follow the mark on the right-hand side, to make - it parallel to the left-hand side. Or it might be less irritating - to allow them either before or after the mark. At the moment, the - proposal takes the second course. +* One result of the current design is that while for pragmas on symbols + in a *right-hand side* it doesn't matter whether they come before or + after the mark, on the *left-hand side* it does matter. It might be + less confusing to require that pragmas follow the mark on the + right-hand side, to make it parallel to the left-hand side. Or it + might be less irritating to allow them either before or after the mark. + At the moment, the proposal takes the second course. * The fact that extension elements can contain things that are implicit but not explicit in the ixml form means that a schema for @@ -1353,7 +1356,7 @@ spoiling things for other people. makes us. But at the moment, it says here that this is the right compromise. -* Should ixml pragmas marked `@` be restricted in where they can +* Should ixml pragmas marked `@` be restricted in where they can appear (e.g. before the first rule, not later; on the LHS of a rule, not before the stop)? Rationale for current decision: it's simpler not to restrict them, and restricting them does not allow us to get From ed45354bc525600df23ecc2be5484a234e5dd048 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Mon, 6 Dec 2021 10:41:26 -0700 Subject: [PATCH 026/152] Note decisions in the pragma.md proposal --- misc/pragmas.md | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 8ab4b033..a6ee9326 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -1316,7 +1316,9 @@ spoiling things for other people. leaves it in, on the theory that if it is retained, then it is possible in principle to adopt the fixed-form variant in the ixml spec and then use pragmas to specify the behavior of the variable-form - variant. + variant. + + *Keep it.* * Ideally we would prefer to allow annotations on rules to precede the mark on the left-hand side; an earlier version of the bracket-QName @@ -1340,6 +1342,8 @@ spoiling things for other people. * `ixml: S, (rule; Pragma)+S, S.` * `Pragma: pragma, S, '.'.` + *Agreed: use full stops, with second grammar form.* + * One result of the current design is that while for pragmas on symbols in a *right-hand side* it doesn't matter whether they come before or after the mark, on the *left-hand side* it does matter. It might be @@ -1348,13 +1352,14 @@ spoiling things for other people. might be less irritating to allow them either before or after the mark. At the moment, the proposal takes the second course. + *Agreement on previous item covers this.* + * The fact that extension elements can contain things that are implicit but not explicit in the ixml form means that a schema for the visible-XML form of a grammar, as described here, requires manual intervention and not just a mechanical derivation from the ixml grammar for ixml. That will make some people nervous, as it - makes us. But at the moment, it says here that this is the right - compromise. + makes us. * Should ixml pragmas marked `@` be restricted in where they can appear (e.g. before the first rule, not later; on the LHS of a rule, @@ -1364,6 +1369,8 @@ spoiling things for other people. since we would still have to specify that their position relative to other pragmas is not signficant. + *Restrict all grammar-level pragmas to occur before the first rule.* + * Should the ixml pragmas for namespace declarations cause standard XML namespace declarations for all prefixes declared? That would allow an XSLT or XQuery processor to understand the namespace @@ -1371,6 +1378,11 @@ spoiling things for other people. Rationale for current decision: it's an example, not a proposal for the spec, and it's complicated enough already. + *In the V proposal, this is required, since attributes and elements + may be using qualified names with bound prefixes. In the F + proposal, it's not required but it may be advantageous. It will + probably be simpler to specify that it always happens.* + * Allow pragmas between `alt` elements / immediately before the separator between top-level alternatives in a right-hand side? @@ -1380,6 +1392,19 @@ spoiling things for other people. parallel to occurrence before, after, or between `rule` elements within the `ixml` element. + *No. Make the attribute-grammar example work some other way.* + +* Is `pragma-data` really necessary? + + *Make it an attribute, and make pragmas cease to nest.* + +* What do we ask for w.r.t. namespaces? + + *We need a way to declare namespaces that apply to the + entire grammar. We can use a defined pragma.* + + + ## Decisions to be made by the group The group may wish to weigh in on any of the open issues listed above, From bd3903019a3ea74ecefa7c86c074ea11345928b1 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Mon, 6 Dec 2021 11:54:41 -0700 Subject: [PATCH 027/152] pragmas.md: add explicit namespaces proposals U and S --- misc/pragmas.md | 172 ++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 153 insertions(+), 19 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index a6ee9326..179d16a1 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -28,6 +28,19 @@ and `use-when` mechanisms of XSLT and the *extension expression* and *annotation* mechanisms of XQuery. SGML and XML processing instructions have also contributed to our thinking. +In working out the proposal for pragmas, we have come to believe that +in order for pragmas to work as designed, some form of namespace +binding must be available in ixml. This could be done by inventing +new syntax for namespace bindings, but what we propose here is to use +the syntax of pragmas to declare namespace bindings: the net effect is +that the spec (a) defines a syntax for pragmas and (b) defines one +particular set of pragmas that all ixml processors must support. + +This document thus includes both a proposal for pragmas and a proposal +for namespace binding, each of which assumes the other. Each proposal +has two variants (F and V for the pragmas proposal, U and S for the +namespaces proposal). + ## Use cases @@ -132,16 +145,23 @@ expression*. Desiderata: * Ideally, the result of evaluating the fallback expression should be -a useful and meaningful result, but this is more a matter for the -individual writing a grammar than for this proposal. The desideratum -for a pragmas proposal is to make it easy (or at least not -unnecessarily hard) to write useful fallbacks. + a useful and meaningful result, but this is more a matter for the + individual writing a grammar than for this proposal. The + desideratum for a pragmas proposal is to make it easy (or at least + not unnecessarily hard) to write useful fallbacks. * It should ideally be possible to specify pragmas as annotations -applying to a symbol, a rule, or a grammar as a whole, and it should -be possible to know which is which. It is not required that the -distinction be a syntactic one, however, since it can also be -expressed by the semantics of the particular pragma. + applying to a symbol, a rule, or a grammar as a whole, and it should + be possible to know which is which. It is not required that the + distinction be a syntactic one, however, since it can also be + expressed by the semantics of the particular pragma. + +* It should ideally be possible for processors to generate the XML + representation of an ixml grammar containing pragmas, even if they + do not understand the pragmas contained. And conversely it should + ideally be possible for processors to write out the ixml form of an + XML grammar containing pragmas, even if the processor does not + understand the pragmas appearing in the grammar. ## Design questions @@ -158,12 +178,12 @@ grammar? * Where can pragmas appear? -## Proposal(s) +## Pragma Proposal(s) -The current proposal is given the arbitrary name of 'brackets QName' for -discussion; an earlier proposal (the 'hash-QName' proposal) has been -withdrawn, though traces of it may remain in other documents in this -branch. +The current proposal for pragmas is given the arbitrary name of +'brackets QName' for discussion; an earlier proposal (the 'hash-QName' +proposal) has been withdrawn, though traces of it may remain in other +documents in this branch. ### The brackets-QName proposal @@ -179,10 +199,10 @@ declarations* use case below.) is taken not from the grammar (as in ixml as currently specified) but from the input data. (See the *Name indirection* use case below.) -* Deciding whether to serialize a given nonterminal as an -element or as an attribute based on what is found in the data. -(This may require nothing more elaborate than what is -described in the *Renaming* use case below.) +* Deciding whether to serialize a given nonterminal as an element or +as an attribute based on what is found in the data. (This may require +nothing more elaborate than what is described in the *Renaming* use +case below.) Some of these extensions can themselves be introduced using pragmas, as illustrated in the *Worked examples* section below, but it is clear @@ -1310,6 +1330,111 @@ that you can give them ad hoc semantics if you need to, without spoiling things for other people. +## Namespace binding proposals + +As described in the worked example for *Namespace declarations* above, +there are at least two ways for ixml to use pragmas provide the +namespace declaration functionality necessary to allow QNames to be +used in pragmas. We call them U (for 'user-specified namespace +binding prefix') and S (for 'specification-defined namespace binding +prefix'). + +The two proposals differ in how pragmas are recognized as +namespace-binding pragmas but are otherwise similar. + +### Namespace binding, common rules + +In both proposal, the ixml spec requires that conforming processors +understand the syntax for pragmas (this is implicit in the rule that +they follow the syntax for ixml grammars) and that conforming +processors understand and implement namespace-binding pragmas which +work as follows: + +* A namespace-binding pragma whose QName has the local name *n* binds + *n* as a namespace prefix to the namespace whose name by the pragma + data. + + As is the case for for XML namespaces generally, the pragma data + should be a legal URI, but ixml processors are not obligated to + check the URI for syntactic correctness (although they are may do + so), and normally should not attempt to dereference it. + +* All namespace-binding pragmas pertain to the grammar as a whole and + must be given before the first rule of the grammar. + +* A nonterminal taking the lexical form of a QName must if serialized + be serialized as an XML element name with the same local name and + with a prefix bound to the same namespace. Normally the prefix + should be as given in the grammar. *(If all namespaces are declared + before the first rule, there should be no reason it should be + impossible to use the same prefix. Perhaps we can make this a + 'must'.)* + + The ixml processor is responsible for including appropriate + namespace declarations in the XML output. + +The proposals differ in their rules for how a pragma is recognized as +a namespace-binding pragma. + + +### Namespace binding in proposal U + +In this proposal, namespace-binding pragmas are those whose QName is +in a particular well-known namespace; a bootstrapping rule is used to +recognize the binding of a user-specified prefix to that namespace. + +* A pragma whose QName has the same name as its prefix and its local + name and whose value is the namespace-binding namespace + '`http://example.com/ixml-namespaces`" binds the given prefix to + that namespace. This pragma must be marked `@`. For example: + + ```` + [@nsd:nsd http://example.com/ixml-namespaces] + ```` + +* The equivalent pragma using a URI-qualified name similarly binds the + given prefix to that namespace. + + For example: + + ```` + [@Q{http://example.com/ixml-namespaces}:nsd + http://example.com/ixml-namespaces] + ```` + +In the examples just given, the prefix *nsd* is only an example: the +user can specify any desired prefix to use for namespace bindings. + +* Any pragma whose QName has the namespace + "`http://example.com/ixml-namespaces`" is recognized as a + namespace-binding pragma. + +* Any pragma with an unprefixed name whose local name is bound as a + prefix to the namespace "`http://example.com/ixml-namespaces`" is + recognized as a namespace-binding pragma defining a default + namespace. + + +### Namespace binding in proposal S + +In this proposal, namespace-binding pragmas are recognized by their +use of a reserved prefix in their QName. + +* The prefix *ixmlns* is understood by all conforming ixml software as + bound to the namespace-binding namespace + '`http://example.com/ixml-namespaces`". + + *Open question: use the name 'ixmlns' or some other name? Perhaps + 'xmlns'?* + +* Any pragma whose QName has the prefix *ixmlns* is recognized as a + namespace-binding pragma. + +* Any pragma with the unprefixed *ixmlns* is recognized as a + namespace-binding pragma defining a default namespace. + + + ## Open issues * In the fixed-form variant, drop *pmark* entirely? The current text @@ -1412,8 +1537,17 @@ assuming the authors have not made a decision and removed all trace of the open issue before sending this document to the group. Some open questions will need to be made by the group, not by the authors. -* What name should be used for the magic namespace-binding namespace? - In the examples, we use "`http://example.com/ixml-namespaces`". +* What name should be used for the magic namespace-binding namespace? + In the examples, we use "`http://example.com/ixml-namespaces`". + + Should we use "`http://www.w3.org/2000/xmlns/`", to which the prefix + `xmlns` is bound by convention? + +* What name should be used for the magic namespace-binding prefix in + proposal S? If we use `xmlns`, are we transgressing the rule that + says names beginning with 'xml' are reserved for W3C + Recommendations? + * Alternatively, should the spec provide a magic namespace-binding prefix analogous to `xmlns`? From 57e87b113626ef43a4437e6451748c8d5ccc31d3 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Mon, 6 Dec 2021 11:55:21 -0700 Subject: [PATCH 028/152] pragmas.md - keep pmark --- misc/pragmas.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 179d16a1..3532e99b 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -1437,14 +1437,6 @@ use of a reserved prefix in their QName. ## Open issues -* In the fixed-form variant, drop *pmark* entirely? The current text - leaves it in, on the theory that if it is retained, then it is possible - in principle to adopt the fixed-form variant in the ixml spec and - then use pragmas to specify the behavior of the variable-form - variant. - - *Keep it.* - * Ideally we would prefer to allow annotations on rules to precede the mark on the left-hand side; an earlier version of the bracket-QName proposal did allow them there, rather than after the mark. The From 20239505b17b3a2ab2cf2b31dab9b649f5cbb76c Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Mon, 6 Dec 2021 11:58:04 -0700 Subject: [PATCH 029/152] pragmas.md: make pragma-data an attribute, make pragmas cease to nest --- misc/pragmas.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 3532e99b..be547150 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -1511,10 +1511,6 @@ use of a reserved prefix in their QName. *No. Make the attribute-grammar example work some other way.* -* Is `pragma-data` really necessary? - - *Make it an attribute, and make pragmas cease to nest.* - * What do we ask for w.r.t. namespaces? *We need a way to declare namespaces that apply to the From bbc37db7eb7247ccadad7df44c0df1a80df712a8 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Mon, 6 Dec 2021 11:58:49 -0700 Subject: [PATCH 030/152] ixml.ixml: make pragmas cease to nest, make pragma-data an attribute --- ixml.ixml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ixml.ixml b/ixml.ixml index eb87976f..9337a8e4 100644 --- a/ixml.ixml +++ b/ixml.ixml @@ -10,13 +10,13 @@ comment: -"{", (cchar; comment)*, -"}". -cchar: ~["{}"]. - pragma: "[", @pmark?, @pname, (S, pragma-data)?, "]". + pragma: "[", @pmark?, @pname, (S, @pragma-data)?, "]". @pname: -QName; -UQName. -QName: -name, ':', -name. -UQName: 'Q{', -ns-name, '}', -name. -ns-name: ~["{}"; '"'; "'"]* { oversimplification }. @pmark: ["@^?"]. - pragma-data: (pragma-chars; pragma)*. + @pragma-data: (pragma-chars; '[', pragma-chars, ']')*. -pragma-chars: ~["[]"]*. rule: (mark, SP)?, name, S, ["=:"], S, -alts, (pragma, SP)?, ".". From fad6d60201d12e3598a3187183b598b00dc1d11b Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Mon, 6 Dec 2021 12:16:47 -0700 Subject: [PATCH 031/152] pragmas.md - add manual toc --- misc/pragmas.md | 41 +++++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index be547150..03c12f89 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -41,6 +41,36 @@ for namespace binding, each of which assumes the other. Each proposal has two variants (F and V for the pragmas proposal, U and S for the namespaces proposal). +Contents: +* [Use cases](#use-cases) +* [Requirements and desiderata](#requirements-and-desiderata) +* [Design questions](#design-questions) +* [Pragma proposal(s)](#pragma-proposals) + * [The brackets-QName proposal](#the-brackets-qname-proposal) + * [The ixml form](#the-ixml-form) + * [Marks on pragmas in V](#marks-on-pragmas-in-v) + * [Marks on pragmas in F](#marks-on-pragmas-in-f) + * [The XML form of pragmas in F](#the-xml-form-of-pragmas-in-f) + * [The XML form of pragmas in V](#the-xml-form-of-pragmas-in-v) + * [Pragmas and other extension mechanism](#pragmas-and-other-extension-mechanisms) + * [Annotating symbols, rules, or grammars](#annotating-symbols-rules-or-grammars) + * [An example](#an-example) +* [Worked examples](#worked-examples) + * [Namespace declarations](#namespace-declarations) + * [Renaming](#renaming) + * [Name indirection](#name-indirection) + * [Rule rewriting](#rule-rewriting) + * [Tokenization annotation and alternative formulations.](#tokenization-annotation-and-alternative-formulations) + * [Text injection](#text-injection) + * [Attribute grammar specification](#attribute-grammar-specification) + * [Pragmas for proposal V](#Pragmas-for-proposal-V) +* [Namespace binding proposals](#Namespace-binding-proposals) + * [Namespace binding, common rules](#namespace-binding-common-rules) + * [Namespace binding in proposal U](#namespace-binding-in-proposal-u) + * [Namespace binding in proposal S](#namespace-binding-in-proposal-s) +* [Open issues](#open-issues) +* [Decisions to be made by the group](#decisions-to-be-made-by-the-group) +* [References](#references) ## Use cases @@ -1033,7 +1063,7 @@ pragmas will be to serialize `expr` and `term` elements even when they have only one child. -### Tokenization annotation and alternative formulations. +### Tokenization annotation and alternative formulations We can use pragmas to annotate nonterminals in an ixml grammar to indicate that they define a regular language and can be safely @@ -1113,14 +1143,14 @@ they may change the meaning of an expression (or here the meaning of a grammar or part of it). -### Text injection. +### Text injection Using pragmas to indicate that a particular string should be injected into the XML representation of the input as (part of) a text node, or as an attribute or element. (This can help make the output of an ixml parse conform to a pre-existing schema.) -### Attribute grammar specification. +### Attribute grammar specification *Example: synthesized value attribute for arithmetic expressions.* @@ -1511,11 +1541,6 @@ use of a reserved prefix in their QName. *No. Make the attribute-grammar example work some other way.* -* What do we ask for w.r.t. namespaces? - - *We need a way to declare namespaces that apply to the - entire grammar. We can use a defined pragma.* - ## Decisions to be made by the group From 3c917b950014b9a414b416dedaa62558c6a1214a Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Mon, 6 Dec 2021 12:34:12 -0700 Subject: [PATCH 032/152] ixml.ixml, pragmas.md - changes to top-level pragmas Implement today's decisions on top-level pragmas: followed by full stop, before first rule only. Now go back to allowing pragmas on rules to precede the mark. --- ixml.ixml | 21 +++++++++++++-------- misc/pragmas.md | 44 -------------------------------------------- 2 files changed, 13 insertions(+), 52 deletions(-) diff --git a/ixml.ixml b/ixml.ixml index 9337a8e4..73095ed4 100644 --- a/ixml.ixml +++ b/ixml.ixml @@ -1,5 +1,8 @@ - ixml: SP, rule+SP, SP. + ixml: prolog, rule+S, S. + -prolog: (S; Pragma)*. + -Pragma: pragma, S, -'.'. + -SP: (S; pragma)*. -S: (whitespace; comment)*. @@ -19,7 +22,8 @@ @pragma-data: (pragma-chars; '[', pragma-chars, ']')*. -pragma-chars: ~["[]"]*. - rule: (mark, SP)?, name, S, ["=:"], S, -alts, (pragma, SP)?, ".". + rule: annotation, name, S, ["=:"], S, -alts, (pragma, SP)?, ".". + -annotation: (pragma, SP)?, (mark, SP)?. @mark: ["@^-"]. alts: alt+([";|"], S). alt: term*(",", S). @@ -34,14 +38,15 @@ repeat1: factor, "+", S, sep?. option: factor, "?", S. sep: factor. - nonterminal: (mark, SP)?, name, S. + nonterminal: annotation, name, S. -terminal: literal; charset. literal: quoted; encoded. - -quoted: (tmark, SP)?, -string. - + -quoted: tannotation, -string. + -tannotation: (pragma, SP)?, (tmark, SP)?. + @name: namestart, namefollower*. -namestart: ["_"; Ll; Lu; Lm; Lt; Lo]. -namefollower: namestart; ["-.·‿⁀"; Nd; Mn]. @@ -55,13 +60,13 @@ '"', -'"'. {all characters, quotes must be doubled} schar: ~["'"]; "'", -"'". {all characters, quotes must be doubled} - -encoded: (tmark, SP)?, -"#", @hex, S. + -encoded: tannotation, -"#", @hex, S. hex: ["0"-"9"; "a"-"f"; "A"-"F"]+. -charset: inclusion; exclusion. - inclusion: (tmark, SP)?, set. - exclusion: (tmark, SP)?, "~", S, set. + inclusion: tannotation, set. + exclusion: tannotation, "~", S, set. -set: "[", S, member*([";|"], S), "]", S. -member: literal; range; diff --git a/misc/pragmas.md b/misc/pragmas.md index 03c12f89..326491aa 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -1467,40 +1467,6 @@ use of a reserved prefix in their QName. ## Open issues -* Ideally we would prefer to allow annotations on rules to precede the - mark on the left-hand side; an earlier version of the bracket-QName - proposal did allow them there, rather than after the mark. The - current version was changed in order to allow pragmas at the - beginning of a grammar to be attached to the grammar as a whole. - - If pragmas occurring outside rules are syntactically distinct, then - pragmas can occur both before the mark on a left-hand side and - between rules. It does complicate the grammar a bit. Worth doing? - - Easiest approach may be to require a full stop after pragmas occurring - outside of rules. - - * Change ixml rule to `ixml: SPS, rule+SPS, SPS.` - * Define SPS as `-SPS: (S; (pragma, S, '.'))*.` - - Or alternatively just change the rule for ixml and define two forms - of pragma: - - * `ixml: S, (rule; Pragma)+S, S.` - * `Pragma: pragma, S, '.'.` - - *Agreed: use full stops, with second grammar form.* - -* One result of the current design is that while for pragmas on symbols - in a *right-hand side* it doesn't matter whether they come before or - after the mark, on the *left-hand side* it does matter. It might be - less confusing to require that pragmas follow the mark on the - right-hand side, to make it parallel to the left-hand side. Or it - might be less irritating to allow them either before or after the mark. - At the moment, the proposal takes the second course. - - *Agreement on previous item covers this.* - * The fact that extension elements can contain things that are implicit but not explicit in the ixml form means that a schema for the visible-XML form of a grammar, as described here, requires @@ -1508,16 +1474,6 @@ use of a reserved prefix in their QName. ixml grammar for ixml. That will make some people nervous, as it makes us. -* Should ixml pragmas marked `@` be restricted in where they can - appear (e.g. before the first rule, not later; on the LHS of a rule, - not before the stop)? Rationale for current decision: it's simpler - not to restrict them, and restricting them does not allow us to get - rid of the rule that their precise location carries no meaning, - since we would still have to specify that their position relative to - other pragmas is not signficant. - - *Restrict all grammar-level pragmas to occur before the first rule.* - * Should the ixml pragmas for namespace declarations cause standard XML namespace declarations for all prefixes declared? That would allow an XSLT or XQuery processor to understand the namespace From b722beff2777feb9acb1269d62ca42b31738849b Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Mon, 6 Dec 2021 13:12:46 -0700 Subject: [PATCH 033/152] ixml.ixml, pragmas.md Prose revision for the prolog. --- ixml.ixml | 8 ++-- misc/pragmas.md | 120 +++++++++++++++++++++++++++++++----------------- 2 files changed, 82 insertions(+), 46 deletions(-) diff --git a/ixml.ixml b/ixml.ixml index 73095ed4..41b1a542 100644 --- a/ixml.ixml +++ b/ixml.ixml @@ -1,10 +1,8 @@ ixml: prolog, rule+S, S. - -prolog: (S; Pragma)*. - -Pragma: pragma, S, -'.'. + -prolog: S, Pragma*S, S. + -Pragma: pragma, S, '.'. - -SP: (S; pragma)*. - -S: (whitespace; comment)*. -whitespace: -[Zs]; tab; lf; cr. -tab: -#9. @@ -25,6 +23,8 @@ rule: annotation, name, S, ["=:"], S, -alts, (pragma, SP)?, ".". -annotation: (pragma, SP)?, (mark, SP)?. @mark: ["@^-"]. + -SP: (S; pragma)*. + alts: alt+([";|"], S). alt: term*(",", S). -term: factor; diff --git a/misc/pragmas.md b/misc/pragmas.md index 326491aa..ee53a6da 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -256,16 +256,15 @@ square brackets are allowed, so pragmas can nest arbitrarily deep. In the ixml form of a grammar, pragmas can occur within whitespace in several locations: -* before the first rule of the grammar, after the last rule of the - grammar, or between rules; these pragmas apply to the grammar - as a whole or to the rules following the pragma. +* before the first rule of the grammar; these pragmas apply to the + grammar as a whole. * before a terminal or nonterminal symbol on the right-hand side of a rule, before or after the mark if any; these pragmas apply to that occurrence of the symbol. -* between the mark on the left-hand side of a rule and the - nonterminal; these pragmas apply to the rule. +* on the left-hand side of a rule before the rule name, before or + after the mark if any; these pragmas apply to the rule. * immediately before the full stop of a rule; these pragmas apply to the rule. @@ -276,21 +275,31 @@ rhetorical choice, but an important one as it can make a difference to readability. The relevant changes to the ixml grammar are these. First, in several -rules the nonterminal *S* is replaced by *SP* (space-or-pragma), to -allow pragmas to appear as described above: +rules the options `(mark, S)?` and `(tmark, S)?` are replaced by new +nonterminals which provide for both marks and pragmas. In some +locations the nonterminal *S* is replaced by *SP* (space-or-pragma), +to allow pragmas to appear as described above. + ```` -ixml: SP, rule+SP, SP. -rule: (mark, SP)?, name, S, ["=:"], S, -alts, (pragma, SP)?, ".". -nonterminal: (mark, SP)?, name, S. --quoted: (tmark, SP)?, -string. --encoded: (tmark, SP)?, -"#", @hex, S. -inclusion: (tmark, SP)?, set. -exclusion: (tmark, SP)?, "~", S, set. + rule: annotation, name, S, ["=:"], S, -alts, (pragma, SP)?, ".". + nonterminal: annotation, name, S. + -quoted: tannotation, -string. + -encoded: tannotation, -"#", @hex, S. + inclusion: tannotation, set. + exclusion: tannotation, "~", S, set. + + -SP: (S; pragma)* + -annotation: (pragma, SP)?, (mark, SP)?. + -tannotation: (pragma, SP)?, (tmark, SP)?.. ```` -The new nonterminal *SP* and the nonterminals needed for pragmas -themselves are defined as follows. +To allow pragmas pertaining to the grammar as a whole to precede the +first rule of the grammar, the production rule for *ixml* is changed. +To ensure that pragmas in the prolog can be distinguished +syntactically from pragmas attached to the left-hand side of the first +rule, pragmas in the prolog are required to be followed by full stops. + ```` -SP: (S; pragma)*. @@ -1403,6 +1412,14 @@ work as follows: The ixml processor is responsible for including appropriate namespace declarations in the XML output. +* In the XML form of an ixml grammar, all namespaces bound in in the + ixml grammar should be bound in the XML form of the grammar. + + This should normally take the form of namespace declarations on the + `ixml` element. The pragmas should also be represented in the usual + way, if that differs from being realized as a namespace-binding + attribute. + The proposals differ in their rules for how a pragma is recognized as a namespace-binding pragma. @@ -1474,18 +1491,6 @@ use of a reserved prefix in their QName. ixml grammar for ixml. That will make some people nervous, as it makes us. -* Should the ixml pragmas for namespace declarations cause standard - XML namespace declarations for all prefixes declared? That would - allow an XSLT or XQuery processor to understand the namespace - bindings relevant for QNames appearing as nonterminal names. - Rationale for current decision: it's an example, not a proposal for - the spec, and it's complicated enough already. - - *In the V proposal, this is required, since attributes and elements - may be using qualified names with bound prefixes. In the F - proposal, it's not required but it may be advantageous. It will - probably be simpler to specify that it always happens.* - * Allow pragmas between `alt` elements / immediately before the separator between top-level alternatives in a right-hand side? @@ -1497,32 +1502,63 @@ use of a reserved prefix in their QName. *No. Make the attribute-grammar example work some other way.* +* How should the prolog be defined? Several formulations have + occurred to me, some equivalent and some not. Which is clearest and + nicest? + + * Inline the full stop: + + `-prolog: S, pragma*(S, (-'.', S)), S.` + + * Require only one full stop, at the end of the prolog: + `-prolog: S, pragma*S, S, -'.', S.` + + * Use a different name for pragmas with full stops, to simplify the + rule for *prolog:* + + ```` + -prolog: S, Pragma*S, S. + -Pragma: pragma, S, '.'. + ```` + + * Use the nonterminal *ppragma* rather than *Pragma:* + + ```` + -prolog: S, ppragma*S, S. + -ppragma: pragma, S, '.'. + ```` ## Decisions to be made by the group -The group may wish to weigh in on any of the open issues listed above, -assuming the authors have not made a decision and removed all trace of -the open issue before sending this document to the group. Some open -questions will need to be made by the group, not by the authors. +* If the proposal is adopted, which form of the pragmas proposal + should be chosen? V or F? Or some other variant? -* What name should be used for the magic namespace-binding namespace? - In the examples, we use "`http://example.com/ixml-namespaces`". +* If the proposal is adopted, which form of the namespace binding + proposal should be chosen? U or S? Or some other variant? - Should we use "`http://www.w3.org/2000/xmlns/`", to which the prefix - `xmlns` is bound by convention? +* If proposal S is adopted, what name should be used for the magic + namespace-binding prefix in proposal S? The proposal above uses + *ixmlns*; it might feel more convenient if we use `xmlns`. If we do + so, are we violating the rule that says names beginning with 'xml' + are reserved for W3C Recommendations? -* What name should be used for the magic namespace-binding prefix in - proposal S? If we use `xmlns`, are we transgressing the rule that - says names beginning with 'xml' are reserved for W3C - Recommendations? +* What name should be used for the magic namespace-binding namespace? + In the examples, we use "`http://example.com/ixml-namespaces`". + Should we use "`http://www.w3.org/2000/xmlns/`", to which the prefix + `xmlns` is bound by convention? -* Alternatively, should the spec provide a magic namespace-binding - prefix analogous to `xmlns`? +* The group may also wish to weigh in on any of the open issues listed + above, if any are left when this document goes to the group. * *I could have sworn there were more things to put here.* +* Once the group has resolved the questions just listed, the remaining + question is: should the proposal as thus refined by adopted for + ixml 1.0 or not? + + ## References Alblas 1991. Henk Alblas, "Introduction to attribute grammars," in From 6b3de67e58b5a68017ec77b1df5b8ac67b5cd43f Mon Sep 17 00:00:00 2001 From: Tomos Hillman Date: Tue, 7 Dec 2021 16:45:33 +0000 Subject: [PATCH 034/152] Removes pragma proposals from specification (find the details in misc/pragmas.md instead) --- ixml-specification.html | 52 ++++++----------------------------------- 1 file changed, 7 insertions(+), 45 deletions(-) diff --git a/ixml-specification.html b/ixml-specification.html index 7b165cc4..74273dd7 100644 --- a/ixml-specification.html +++ b/ixml-specification.html @@ -445,27 +445,7 @@

Character sets

@code: capital, letter?. -capital: ["A"-"Z"]. -letter: ["a"-"z"].
- -

Pragmas

-

Pragmas are ways to mark-up the grammar that optionally allow conforming parsers to extend their behaviours. They are written in such a way that ignoring a pragma results in the desired fall-back behaviour.

-

Pragmas are allowed wherever a terminal or non-terminal mark are allowed. They start with a # symbol, and consist of a qualified name and a quoted string:

-
@pragma: -"#", #name "" name, string.
-

Pragmas starting with reserved XML names or namespaces, the null namespace, or the Invisible XML namespace are considered to be reserved and should not be used except as directed by this specification.

-

There are a number of potential uses for pragmas, some of which are required to define pragmas for the invisible XML grammar.

-

Namespace declarations

-

Namespaces can be declared using the xmlns and xmlns:xxx name patterns, where xxx represents an XML name prefix. The value of a namespace pragma represents the namespace URI.

-
#xmlns "http://invisiblexml.org/ns"
-#xmlns:xsl "http://www.w3.org/1999/XSL/Transform"
-

This provides a way to declare namespaces and prefixes for use with qualified names in invisible XML. Declarations on the first rule are taken to apply to the whole grammar.

-

Name templates

-

It is sometimes desirable to set an element name dynamically; for instance where the name of an element or attribute should be taken from the value rather than the name of a terminal or non-terminal.

-

Where the name pragma is defined within a rule, the terminal or non-terminal which it annotates is used as the name for that rule, where such a rule results in a node with a qualified name:

-
rule: pragma.
-@pragma: -"#", #name "" name, string.
-name: "new-name"
-string: "value"
-

would result in

-
<rule new-name="value"/>
+

Complete

         ixml: S, rule+S, S.
 
@@ -477,10 +457,8 @@ 

Complete

comment: -"{", (cchar; comment)*, -"}". -cchar: ~["{}"]. - rule: (mOrP, S)?, name, S, ["=:"], S, -alts, ".". - -mOrP: mark; pragma, mark?; + rule: (mark, S)?, name, S, ["=:"], S, -alts, ".". @mark: ["@^-"]. - pragma: "#", name, S, string. alts: alt+([";|"], S). alt: term*(",", S). -term: factor; @@ -494,19 +472,18 @@

Complete

repeat1: factor, "+", S, sep?. option: factor, "?", S. sep: factor. - nonterminal: (mOrP, S)?, name, S. + nonterminal: (mark, S)?, name, S. -terminal: literal; charset. literal: quoted; encoded. - -quoted: (tmOrP, S)?, -string. + -quoted: (tmark, S)?, -string. @name: namestart, namefollower*. -namestart: ["_"; Ll; Lu; Lm; Lt; Lo]. -namefollower: namestart; ["-.·‿⁀"; Nd; Mn]. - -tmOrP: tmark; pragma, tmark? @tmark: ["^-"]. string: -'"', dstring, -'"', S; -"'", sstring, -"'", S. @@ -516,13 +493,13 @@

Complete

'"', -'"'. {all characters, quotes must be doubled} schar: ~["'"]; "'", -"'". {all characters, quotes must be doubled} - -encoded: (tmOrP, S)?, -"#", @hex, S. + -encoded: (tmark, S)?, -"#", @hex, S. hex: ["0"-"9"; "a"-"f"; "A"-"F"]+. -charset: inclusion; exclusion. - inclusion: (tmOrP, S)?, set. - exclusion: (tmOrP, S)?, "~", S, set. + inclusion: (tmark, S)?, set. + exclusion: (tmark, S)?, "~", S, set. -set: "[", S, member*([";|"], S), "]", S. -member: literal; range; @@ -733,21 +710,6 @@

IXML in IXML

<nonterminal mark='-' name='alts'/>, <literal dstring='.'/> </alt>.</rule>
-

Pragmas in XML representations

- -

Pragmas in XML representations of grammars should be captured as namespaced attributes or pseudo-attributes.

- -
#xmlns:xsl "http://www.w3.org/1999/XSL/Transform"
-#xmlns:eg  "http://example.org/ns"
-xsl:message: #eg:name "value" string
- -

Becomes:

-
<rule name="xsl:message" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:eg="http://example.org/ns">
-  <alt>
-    <nonterminal eg:name="value" name="string"/>
-  </alt>
-</rule>
-

Pragmas are an optional feature, and may be ignored.

Conformance

From 445899d360d27c88e22b54832f73a9f99e3249e5 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Mon, 13 Dec 2021 11:34:02 -0700 Subject: [PATCH 035/152] Update pragmas.md Delete the bits that say this is not yet finished. It's as finished as it is going to get. --- misc/pragmas.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index ee53a6da..6532ec8f 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -6,8 +6,8 @@ This document describes a proposal for adding *pragmas* to the Invisible-XML specification. -It was prepared (or rather, is being prepared) by Tom Hillman and -Michael Sperberg-McQueen. It is currently not finished. +It was prepared by Tom Hillman and +Michael Sperberg-McQueen. It is currently as complete as we expect to make it. The general idea of pragmas is to provide a channel for information that is not a required part of the ixml specification but can be used From d4384a1cac501116ad57e2dfd01db8a33a474582 Mon Sep 17 00:00:00 2001 From: Steven Pemberton Date: Tue, 14 Dec 2021 23:40:20 +0100 Subject: [PATCH 036/152] Action 2021-12-14 Strings may not span a line end Change to the ixml definition, plus a sentence of description disallowing strings to straddle a line end --- ixml-specification.html | 1123 ++++++++++++++++++--------------------- ixml.ixml | 8 +- ixml.xml | 8 +- 3 files changed, 540 insertions(+), 599 deletions(-) diff --git a/ixml-specification.html b/ixml-specification.html index b2cb11de..11d05772 100644 --- a/ixml-specification.html +++ b/ixml-specification.html @@ -1,18 +1,14 @@ - - - - - Invisible XML Specification - - - - - -

Invisible XML Specification (Draft)

- -

Editor: Steven Pemberton, CWI, Amsterdam

- -

Version: 2021-11-23

- -

Status

- -

This is the current state of the ixml base grammar; it is close to final.

- - - -

Introduction

- -

Data is an abstraction: there is no essential difference between the JSON

-
{"temperature": {"scale": "C"; "value": 21}}
- -

and an equivalent XML

-
<temperature scale="C" value="21"/>
- -

or

-
<temperature>
+  
+  
+    

Invisible XML Specification (Draft)

+

Editor: Steven Pemberton, CWI, Amsterdam

+

Version: + 2021-12-14

+

Status

+

This is the current state of the ixml base grammar; it is close to final.

+ +

Introduction

+

Data is an abstraction: there is no essential difference between the JSON

+
{"temperature": {"scale": "C"; "value": 21}}
+

and an equivalent XML

+
<temperature scale="C" value="21"/>
+

or

+
<temperature>
    <scale>C</scale>
    <value>21</value>
 </temperature>
- -

since the underlying abstractions being represented are the same.

- -

We choose which representations of our data to use, CSV, JSON, XML, or -whatever, depending on habit, convenience, and the context in which it occurs. -On the other hand, having an interoperable generic toolchain such as that -provided by XML to process data is of immense value. How do we resolve the -conflicting requirements of convenience, habit, and context, and still enable a -generic toolchain?

- -

Invisible XML (ixml) is a method for treating non-XML documents as if they -were XML, enabling authors to write documents and data in a format they prefer -while providing XML for processes that are more effective with XML content. For -example, it can turn CSS code like

-
body {color: blue; font-weight: bold}
- -

into XML like

-
<css>
+    

since the underlying abstractions being represented are the same.

+

We choose which representations of our data to use, CSV, JSON, XML, or + whatever, depending on habit, convenience, and the context in which it + occurs. + On the other hand, having an interoperable generic toolchain such as that + provided by XML to process data is of immense value. How do we resolve the + conflicting requirements of convenience, habit, and context, and still + enable a + generic toolchain?

+

Invisible XML (ixml) is a method for treating non-XML documents as if + they + were XML, enabling authors to write documents and data in a format they + prefer + while providing XML for processes that are more effective with XML + content. For + example, it can turn CSS code like

+
body {color: blue; font-weight: bold}
+

into XML like

+
<css>
    <rule>
       <selector>body</selector>
       <block>
@@ -108,42 +96,36 @@ 

Introduction

</block> </rule> </css>
- -

or, if preferred, as:

-
<css>
+    

or, if preferred, as:

+
<css>
    <rule>
       <simple-selector name="body"/>
       <property name="color" value="blue"/>
       <property name="font-weight" value="bold"/>
    </rule>
 </css>
- -

As another example, the expression

-
pi×(10+b)
- -

can result in the XML

-
<prod>
+    

As another example, the expression

+
pi×(10+b)
+

can result in the XML

+
<prod>
    <id>pi</id>
    <sum>
       <number>10</number>
       <id>b</id>
    </sum>
 </prod>
- -

or

-
<prod>
+    

or

+
<prod>
    <id name='pi'/>
    <sum>
       <number value='10'/>
       <id name='b'/>
    </sum>
 </prod>
- -

and the URL

-
http://www.w3.org/TR/1999/xhtml.html
- -

can give

-
<url>
+    

and the URL

+
http://www.w3.org/TR/1999/xhtml.html
+

can give

+
<url>
    <scheme name='http'/>
    <authority>
       <host>
@@ -158,18 +140,15 @@ 

Introduction

<seg sname='xhtml.html'/> </path> </url>
- -

or

-
<url scheme='http'>://
+    

or

+
<url scheme='http'>
    <host>www.w3.org</host>
    <path>/TR/1999/xhtml.html</path>
 </url>
- -

The JSON value:

-
{"name": "pi", "value": 3.145926}
- -

can give

-
<json>
+    

The JSON value:

+
{"name": "pi", "value": 3.145926}
+

can give

+
<json>
    <object>
       <pair string='name'>
          <string>pi</string>
@@ -179,16 +158,15 @@ 

Introduction

</pair> </object> </json>
- -

How it works

- -

A grammar is used to describe the input format. An input is parsed using -this grammar, and the resulting parse tree is serialised as XML. Special marks -in the grammar affect details of this serialisation, excluding parts of the -tree, or serialising parts as attributes instead of elements.

- -

As an example, consider this simplified grammar for URLs:d

-
url: scheme, ":", authority, path.
+    

How it works

+

A grammar is used to describe the input format. An input is parsed using + this grammar, and the resulting parse tree is serialised as XML. Special + marks + in the grammar affect details of this serialisation, excluding parts of + the + tree, or serialising parts as attributes instead of elements.

+

As an example, consider this simplified grammar for URLs:

+
url: scheme, ":", authority, path.
 
 scheme: letter+.
 
@@ -200,20 +178,22 @@ 

How it works

seg: fletter*. -letter: ["a"-"z"]; ["A"-"Z"]; ["0"-"9"]. -fletter: letter; ".".
- -

This means that a URL consists of a scheme (whatever that is), -followed by a colon, followed by an authority, and then a -path. A scheme, is one or more letters (whatever a letter -is). An authority starts with two slashes, followed by a host. A host -is one or more subs, separated by points. A sub is one or more -letters. A path is a slash followed by a seg, repeated one or -more times. A seg is zero or more fletters. A letter is a lowercase -letter, an uppercase letter, or a digit. A fletter is a letter or a point.

- -

So, given the input string -http://www.w3.org/TR/1999/xhtml.html, this would produce the -serialisation

-
<url>
+    

This means that a URL consists of a scheme (whatever that is), + followed by a colon, followed by an authority, and then a + path. A scheme, is one or more letters (whatever a + letter + is). An authority starts with two slashes, followed by a host. A + host + is one or more subs, separated by points. A sub is one or more + letters. A path is a slash followed by a seg, repeated + one or + more times. A seg is zero or more fletters. A letter is a + lowercase + letter, an uppercase letter, or a digit. A fletter is a letter or a point.

+

So, given the input string + http://www.w3.org/TR/1999/xhtml.html, this would produce the + serialisation

+
<url>
    <scheme>http</scheme>:
    <authority>//
       <host>
@@ -228,213 +208,192 @@ 

How it works

/<seg>xhtml.html</seg> </path> </url>
- -

If the rule for letter had not had a "-" before it, the -serialisation for scheme, for instance, would have been:

-
<scheme><letter>h</letter><letter>t</letter><letter>t</letter><letter>p</letter></scheme>
- -

Changing the rule for scheme to

-
scheme: name.
+    

If the rule for letter had not had a "-" before it, + the + serialisation for scheme, for instance, would have been:

+
<scheme><letter>h</letter><letter>t</letter><letter>t</letter><letter>p</letter></scheme>
+

Changing the rule for scheme to

+
scheme: name.
 @name: letter+.
- -

would change the serialisation for scheme to:

-
<scheme name="http"/>:
- -

Changing the rule for scheme instead to:

-
@scheme: letter+.
- -

would change the serialisation for url to:

-
<url scheme="http">
- -

Changing the definitions of sub and seg from

-
sub: letter+.
+    

would change the serialisation for scheme to:

+
<scheme name="http"/>:
+

Changing the rule for scheme instead to:

+
@scheme: letter+.
+

would change the serialisation for url to:

+
<url scheme="http">
+

Changing the definitions of sub and seg from

+
sub: letter+.
 seg: fletter*.
- -

to

-
-sub: letter+.
+    

to

+
-sub: letter+.
 -seg: fletter*.
- -

would prevent the sub and seg elements appearing -in the serialised result, giving:

-
<url scheme='http'>://
+    

would prevent the sub and seg elements + appearing + in the serialised result, giving:

+
<url scheme='http'>://
    <host>www.w3.org</host>
    <path>/TR/1999/xhtml.html</path>
 </url>
- -

Changing the rule

-
url: scheme, ":", authority, path.
- -

to

-
url: scheme, -":", authority, path.
- -

and

-
authority: "//", host.authority: "//", host.s;
- -

to

-
authority: -"//", host.
- -

would remove the spurious characters from the serialisation:

-
<url scheme='http'>
+    

Changing the rule

+
url: scheme, ":", authority, path.
+

to

+
url: scheme, -":", authority, path.
+

and

+
authority: "//", host.
+

to

+
authority: -"//", host.
+

would remove the spurious characters from the serialisation:

+
<url scheme='http'>
    <host>www.w3.org</host>
    <path>/TR/1999/xhtml.html</path>
 </url>
- -

The Grammar

- -

Here we describe the format of the grammar used to describe documents. Note -that it is in its own format, and therefore describes itself.

- -

A grammar is a sequence of one or more rules, surrounded and separated by -spacing and comments:

-
ixml: s, rule+s, s.
- -

An s stands for an optional sequence of spacing and comments. A -comment is enclosed in braces, and may included nested comments, to enable -commenting out parts of a grammar:

-
         -s: (whitespace; comment)*.
+    

The Grammar

+

Here we describe the format of the grammar used to describe documents. + Note + that it is in its own format, and therefore describes itself.

+

A grammar is a sequence of one or more rules, surrounded and separated by + spacing and comments:

+
ixml: s, rule+s, s.
+

An s stands for an optional sequence of spacing and + comments. A + comment is enclosed in braces, and may included nested comments, to enable + commenting out parts of a grammar:

+
         -s: (whitespace; comment)*.
 -whitespace: -[Zs]; tab; lf; cr.
        -tab: -#9.
         -lf: -#a.
         -cr: -#d.
     comment: -"{", (cchar; comment)*, -"}".
      -cchar: ~["{}"].
- -

Rules

- -

A rule consists of an optional mark, a name, and one or more alternatives. -The grammar here uses colons to define rules; an equals sign is also -allowed.

-
rule: (mark, s)?, name, s, -["=:"], s, -alts, -".".
- -

A mark is one of @, ^ or -, and -indicates whether the item so marked will be serialised as an attribute -(@), an element with its children (^), which is the -default, or only its children (-).

-
@mark: ["@^-"].
- -

A name starts with a letter or underscore, and continues with a letter, -digit, underscore, a small number of punctuation characters, and the Unicode -combiner characters; Unicode classes are used to define the sets of characters -used, for instance, for letters and digits. This is close to, but not identical -with the XML definition of a name; it is the grammar author's responsibility to -ensure that all serialised names match the requirements for an XML name [XML].

-
        @name: namestart, namefollower*.
+    

Rules

+

A rule consists of an optional mark, a name, and one or more + alternatives. + The grammar here uses colons to define rules; an equals sign is also + allowed.

+
rule: (mark, s)?, name, s, -["=:"], s, -alts, -".".
+

A mark is one of @, ^ or -, and + indicates whether the item so marked will be serialised as an attribute + (@), an element with its children (^), which is + the + default, or only its children (-).

+
@mark: ["@^-"].
+

A name starts with a letter or underscore, and continues with a letter, + digit, underscore, a small number of punctuation characters, and the + Unicode + combiner characters; Unicode classes are used to define the sets of + characters + used, for instance, for letters and digits. This is close to, but not + identical + with the XML definition of a name; it is the grammar author's + responsibility to + ensure that all serialised names match the requirements for an XML name [XML].

+
        @name: namestart, namefollower*.
    -namestart: ["_"; L].
 -namefollower: namestart; ["-.·‿⁀"; Nd; Mn].
- -

Alternatives are separated by a semicolon or a vertical bar. The grammar -here uses semicolons.

-
alts: alt+(-[";|"], s).
- -

An alternative is zero or more terms, separated by commas:

-
alt: term*(-",", s).
- -

A term is a singleton factor, an optional factor, or a repeated factor, -repeated zero or more times, or one or more times.

-
-term: factor;
+    

Alternatives are separated by a semicolon or a vertical bar. The grammar + here uses semicolons.

+
alts: alt+(-[";|"], s).
+

An alternative is zero or more terms, separated by commas:

+
alt: term*(-",", s).
+

A term is a singleton factor, an optional factor, or a repeated factor, + repeated zero or more times, or one or more times.

+
-term: factor;
        option;
        repeat0;
        repeat1.
- -

A factor is a terminal, a nonterminal, or a bracketed series of -alternatives:

-
-factor: terminal;
+    

A factor is a terminal, a nonterminal, or a bracketed series of + alternatives:

+
-factor: terminal;
          nonterminal;
          -"(", s, alts, -")", s.
- -

A factor repeated zero or more times is followed by an asterisk, optionally -followed by a separator, e.g. abc* and abc*",". For -instance "a"*"#" would match the empty string, a -a#a a#a#a etc.

-
repeat0: factor, -"*", s, sep?.
- -

Similarly, a factor repeated one or more times is followed by a plus, -optionally followed by a separator, e.g. abc+ and -abc+",". For instance "a"+"#" would match a -a#a a#a#a etc., but not the empty string.

-
repeat1: factor, -"+", s, sep?.
- -

An optional factor is followed by a question mark, e.g. abc?. -For instance "a"? would match a or the empty -string.

-
option: factor, -"?", s.
- -

A separator may be any factor. E.g. abc*def or abc*(","; -"."). For instance "a"+("#"; "!") would match a#a a!a -a#a!a a!a#a a#a#a etc.

-
sep: factor.
- -

Nonterminals

- -

A nonterminal is an optionally marked name:

-
nonterminal: (mark, s)?, name, s.
- -

This name refers to the rule that defines this name, which must exist, and -there must only be one such rule.

- -

Terminals

- -

A terminal is a literal or a set of characters. It matches one or more -characters in the input. A terminal must not be marked as an attribute. Since a -terminal has no children, if it is marked with "-", it will serialise to the -empty string.

-
-terminal: literal; 
+    

A factor repeated zero or more times is followed by an asterisk, + optionally + followed by a separator, e.g. abc* and abc*",". + For + instance "a"*"#" would match the empty string, a + a#a a#a#a etc.

+
repeat0: factor, -"*", s, sep?.
+

Similarly, a factor repeated one or more times is followed by a plus, + optionally followed by a separator, e.g. abc+ and + abc+",". For instance "a"+"#" would match a + a#a a#a#a etc., but not the empty string.

+
repeat1: factor, -"+", s, sep?.
+

An optional factor is followed by a question mark, e.g. abc?. + For instance "a"? would match a or the empty + string.

+
option: factor, -"?", s.
+

A separator may be any factor. E.g. abc*def or abc*(","; + "."). For instance "a"+("#"; "!") would match a#a + a!a + a#a!a a!a#a a#a#a etc.

+
sep: factor.
+

Nonterminals

+

A nonterminal is an optionally marked name:

+
nonterminal: (mark, s)?, name, s.
+

This name refers to the rule that defines this name, which must exist, + and + there must only be one such rule.

+

Terminals

+

A terminal is a literal or a set of characters. It matches one or more + characters in the input. A terminal must not be marked as an attribute. + Since a + terminal has no children, if it is marked with "-", it will serialise to + the + empty string.

+
-terminal: literal; 
            charset.
- -

A literal is either a quoted string, or a hexadecimally encoded -character:

-
  literal: quoted;
+    

A literal is either a quoted string, or a hexadecimally encoded + character:

+
  literal: quoted;
            encoded.
- -

A quoted string is an optionally marked string of one or more characters, -enclosed with single or double quotes. The enclosing quote is represented in a -string by doubling it. A quoted string matches only the exact same string in -the input. Examples: "yes" 'yes'.

- -

These two strings are identical: 'Isn''t it?' "Isn't it?"

-
 -quoted: (tmark, s)?, -string.
+    

A quoted string is an optionally marked string of one or more characters, + enclosed with single or double quotes. A string may not extend over a + line-break. The enclosing quote is represented in a + string by doubling it. A quoted string matches only the exact same string + in + the input. Examples: "yes" 'yes'.

+

These two strings are identical: 'Isn''t it?' "Isn't it?"

+
 -quoted: (tmark, s)?, -string.
   @tmark: ["^-"].
   string: -'"', dstring, -'"', s;
           -"'", sstring, -"'", s.
 @dstring: dchar+.
 @sstring: schar+.
-   dchar: ~['"'];
-          '"', -'"'. {all characters, quotes are doubled}
-   schar: ~["'"];
-          "'", -"'". {all characters, quotes are doubled}
- -

An encoded character is an optionally marked hexadecimal number. It -represents a single character and matches that character in the input. It -starts with a hash symbol, followed by any number of hexadecimal digits, for -example #a0. The digits are interpreted as a number in -hexadecimal, and the character at that Unicode code-point is used [Unicode]. The number must be within the Unicode code-point -range.

-
-encoded: (tmark, s)?, -"#", @hex, s.
+   dchar: ~['"'; #a; #d];
+          '"', -'"'. {all characters except line breaks; quotes must be doubled}
+   schar: ~["'"; #a; #d];
+          "'", -"'". {all characters except line breaks; quotes must be doubled}
+

An encoded character is an optionally marked hexadecimal number. It + represents a single character and matches that character in the input. It + starts with a hash symbol, followed by any number of hexadecimal digits, + for + example #a0. The digits are interpreted as a number in + hexadecimal, and the character at that Unicode code-point is used [Unicode]. + The number must be within the Unicode code-point + range.

+
-encoded: (tmark, s)?, -"#", @hex, s.
      hex: ["0"-"9"; "a"-"f"; "A"-"F"]+.
- -

Character sets

- -

A character set is an inclusion or an exclusion: an inclusion matches one -character in the input that is in the set, an exclusion matches one character -not in the set.

- -

An inclusion is enclosed in square brackets, and represents the set of -characters defined by any combination of literal characters, a range of -characters, hex encoded characters, or Unicode classes. Examples -["a"-"z"] ["xyz"] [Lc] ["0"-"9"; "!@#"; Lc]. Note that -["abc"] ["a"; "b"; "c"] ["a"-"c"] [#61-#63] all -represent the same set of characters.

- -

An exclusion is an inclusion preceded by a tilde ~. For -example, ~["{}"] matches any character that is not an opening or -closing brace.

- -

Note that the empty inclusion [] would fail to match any -character in the input; on the other hand ~[] would match any one -character, whatever it is.

-
 -charset: inclusion; 
+    

Character sets

+

A character set is an inclusion or an exclusion: an inclusion matches one + character in the input that is in the set, an exclusion matches one + character + not in the set.

+

An inclusion is enclosed in square brackets, and represents the set of + characters defined by any combination of literal characters, a range of + characters, hex encoded characters, or Unicode classes. Examples + ["a"-"z"] ["xyz"] [Lc] ["0"-"9"; "!@#"; Lc]. Note that + ["abc"] ["a"; "b"; "c"] ["a"-"c"] [#61-#63] all + represent the same set of characters.

+

An exclusion is an inclusion preceded by a tilde ~. For + example, ~["{}"] matches any character that is not an + opening or + closing brace.

+

Note that the empty inclusion [] would fail to match any + character in the input; on the other hand ~[] would match + any one + character, whatever it is.

+
 -charset: inclusion; 
            exclusion.
 inclusion: (tmark, s)?,          set.
 exclusion: (tmark, s)?, -"~", s, set.
@@ -442,30 +401,29 @@ 

Character sets

-member: literal; range; class.
- -

A range matches any character in the range from the start character to the -end, inclusive, using the Unicode ordering:

-
range: from, -"-", s, to.
+    

A range matches any character in the range from the start character to + the + end, inclusive, using the Unicode ordering:

+
range: from, -"-", s, to.
 @from: character.
   @to: character.
- -

A character is a string of length one, or a hex encoded character:

-
-character: -'"', dchar, -'"', s;
+    

A character is a string of length one, or a hex encoded character:

+
-character: -'"', dchar, -'"', s;
             -"'", schar, -"'", s;
             "#", hex, s.
- -

A class is two letters, representing any character from the Unicode -character category [Categories] of that name. E.g. -[Ll] matches any lower-case letter, [Ll; Lu] matches -any upper- or lower-case character; it is an error if there is no such -class.

-
  class: code, s.
+    

A class is two letters, representing any character from the Unicode + character category [Categories] of that name. + E.g. + [Ll] matches any lower-case letter, [Ll; Lu] + matches + any upper- or lower-case character; it is an error if there is no such + class.

+
  class: code, s.
    @code: capital, letter?.
 -capital: ["A"-"Z"].
 -letter: ["a"-"z"].
- -

Complete

-
         ixml: s, rule+s, s.
+    

Complete

+
         ixml: s, rule+s, s.
 
            -s: (whitespace; comment)*.
   -whitespace: -[Zs]; tab; lf; cr.
@@ -507,11 +465,10 @@ 

Complete

-"'", sstring, -"'", s. @dstring: dchar+. @sstring: schar+. - dchar: ~['"']; - '"', -'"'. {all characters, quotes must be doubled} - schar: ~["'"]; - "'", -"'". {all characters, quotes must be doubled} - -encoded: (tmark, s)?, -"#", @hex, s. + dchar: ~['"'; #a; #d]; + '"', -'"'. {all characters except line breaks; quotes must be doubled} + schar: ~["'"; #a; #d]; + "'", -"'". {all characters except line breaks; quotes must be doubled}
-encoded: (tmark, s)?, -"#", @hex, s. hex: ["0"-"9"; "a"-"f"; "A"-"F"]+. -charset: inclusion; @@ -532,61 +489,64 @@

Complete

@code: capital, letter?. -capital: ["A"-"Z"]. -letter: ["a"-"z"].
- -

Parsing

- -

The root symbol of the grammar is the name of the first rule in the grammar. -If it is marked as hidden, all of its productions must produce exactly one -non-hidden nonterminal and no non-hidden terminals before or after that -nonterminal (in order to match the XML requirement of a single-rooted -document).

- -

Processors must accept and parse any conforming grammar, and produce at -least one parse of any input that conforms to the grammar starting at the root -symbol. If more than one parse results, one is chosen; it is not defined how -this choice is made, but the resulting parse must be marked as ambiguous by -including the attribute ixml:state="ambiguous" on the document -element of the serialisation. The ixml namespace URI is -"http://invisiblexml.org/NS".

- -

Serialisation

- -

If the parse fails, some XML document must be produced with -ixml:state="failed" on the document element. The document should -provide helpful information about where and why it failed; it may be a partial -parse tree that includes parts of the parse that succeeded.

- -

If the parse succeeds, the resulting parse-tree is serialised as XML by -serialising the root node. If the root node is marked as an attribute, that -marking is ignored.

- -

A parse node is either a nonterminal or a terminal.

- -

Any parse node may be marked as an element, as an attribute, or as hidden -(children only). The mark comes from the use of the node in a rule if present, -otherwise, for a nonterminal, from the definition of the rule for that -nonterminal. If a node is not marked, it is treated as if marked as an element. -It is an error if the name of a node to be output does not match the -requirements of an XML name.

-
    -
  • A nonterminal element is serialised by - outputting the name of the node as an XML tag, serialising all exposed - attribute descendants, and then serialising all non-attribute children in - order. An attribute is exposed if it is an attribute child, or an exposed - attribute of a hidden element child (note this is recursive).
  • -
  • A nonterminal hidden node is serialised - by serialising all non-attribute children in order.
  • -
  • A nonterminal attribute is serialised - by outputting the name of the node as an attribute, and serialising all - non-hidden terminal descendants of the node (regardless of marking of - intermediate nonterminals), in order, as the value of the attribute.
  • -
  • A non-hidden terminal is serialised by outputting its - string.
  • -
  • A hidden terminal is not serialised.
  • -
- -

An example grammar that illustrates these rules is

-
expr: open, -arith, @close.
+    

Parsing

+

The root symbol of the grammar is the name of the first rule in the + grammar. + If it is marked as hidden, all of its productions must produce exactly one + non-hidden nonterminal and no non-hidden terminals before or after that + nonterminal (in order to match the XML requirement of a single-rooted + document).

+

Processors must accept and parse any conforming grammar, and produce at + least one parse of any input that conforms to the grammar starting at the + root + symbol. If more than one parse results, one is chosen; it is not defined + how + this choice is made, but the resulting parse must be marked as ambiguous + by + including the attribute ixml:state="ambiguous" on the + document + element of the serialisation. The ixml namespace URI is + "http://invisiblexml.org/NS".

+

Serialisation

+

If the parse fails, some XML document must be produced with + ixml:state="failed" on the document element. The document + should + provide helpful information about where and why it failed; it may be a + partial + parse tree that includes parts of the parse that succeeded.

+

If the parse succeeds, the resulting parse-tree is serialised as XML by + serialising the root node. If the root node is marked as an attribute, + that + marking is ignored.

+

A parse node is either a nonterminal or a terminal.

+

Any parse node may be marked as an element, as an attribute, or as hidden + (children only). The mark comes from the use of the node in a rule if + present, + otherwise, for a nonterminal, from the definition of the rule for that + nonterminal. If a node is not marked, it is treated as if marked as an + element. + It is an error if the name of a node to be output does not match the + requirements of an XML name.

+
    +
  • A nonterminal element is + serialised by outputting the name of the node as an XML tag, serialising + all exposed attribute descendants, and then serialising all + non-attribute children in order. An attribute is exposed if it is an + attribute child, or an exposed attribute of a hidden element child (note + this is recursive).
  • +
  • A nonterminal hidden node is + serialised by serialising all non-attribute children in order.
  • +
  • A nonterminal attribute is + serialised by outputting the name of the node as an attribute, and + serialising all non-hidden terminal descendants of the node (regardless + of marking of intermediate nonterminals), in order, as the value of the + attribute.
  • +
  • A non-hidden terminal is serialised by outputting + its string.
  • +
  • A hidden terminal is not serialised.
  • +
+

An example grammar that illustrates these rules is

+
expr: open, -arith, @close.
 @open: "(".
 close: ")".
 arith: left, op, right.
@@ -595,55 +555,46 @@ 

Serialisation

@name: "a"; "b". -op: sign. @sign: "+".
- -

Applied to the string (a+b), it yields the serialisation

-
<expr open="(" sign="+" close=")">
+    

Applied to the string (a+b), it yields the serialisation

+
<expr open="(" sign="+" close=")">
    <left name="a"/>
    <right>b</right>
 </expr>
- -

Hints for Implementors

- -

Many parsing algorithms only mention terminals, and nonterminals, and don't -explain how to deal with the repetition constructs used in ixml. However, these -can be handled simply by converting them to equivalent simple constructs. In -the examples below, f and sep are -factors from the grammar above. The other nonterminals are -generated nonterminals.

- -

Optional factor:

-
f? ⇒ f-option
+    

Hints for Implementors

+

Many parsing algorithms only mention terminals, and nonterminals, and + don't + explain how to deal with the repetition constructs used in ixml. However, + these + can be handled simply by converting them to equivalent simple constructs. + In + the examples below, f and sep are + factors from the grammar above. The other nonterminals are + generated nonterminals.

+

Optional factor:

+
f? ⇒ f-option
 -f-option: f; .
- -

Zero or more repetitions:

-
f* ⇒ f-star
+    

Zero or more repetitions:

+
f* ⇒ f-star
 -f-star: f, f-star; .
- -

One or more repetitions:

-
f+ ⇒ f-plus
--f-plus: f, f-star.
--f-star: f, f-star; .
- -

One or more repetitions with separator:

-
f+sep ⇒ f-plus-sep
--f-plus-sep: f, sep-part-option. 
--sep-part-option: sep, f-plus-sep; .
- -

Zero or more repetitions with separator:

-
f*sep ⇒ f-star-sep
--f-star-sep: f-plus-sep; .
--f-plus-sep: f, sep-part-option.
--sep-part-option: sep, f-plus-sep; .
- -

IXML in IXML

- -

Since the ixml grammar is expressed in its own notation, the above grammar -can be processed into an XML document by parsing it using itself, and then -serialising. Note that all semantically significant terminals are recorded in -attributes, and non-significant characters are not serialised. The -serialisation begins as below, but the entire -serialisation is available:

-
<ixml>
+    

One or more repetitions:

+
f+ ⇒ f-plus
+-f-plus: f, f*.
+

One or more repetitions with separator:

+
f+sep ⇒ f-plus-sep
+-f-plus-sep: f, (sep, f)*.
+

Zero or more repetitions with separator:

+
f*sep ⇒ f-star-sep
+-f-star-sep: f+sep; .
+

IXML in IXML

+

Since the ixml grammar is expressed in its own notation, the above + grammar + can be processed into an XML document by parsing it using itself, and then + serialising. Note that all semantically significant terminals are recorded + in + attributes, and non-significant characters are not serialised. The + serialisation begins as below, but the entire + serialisation is available:

+
<ixml>
    <rule name='ixml'>
       <alt>
          <nonterminal name='s'/>
@@ -744,168 +695,154 @@ 

IXML in IXML

<literal tmark='-' dstring='.'/> </alt> </rule
- -

Conformance

- -

In this specification, the verb "must" expresses unconditional requirements -for conformance to the specification; the verb "should" expresses requirements -that are encouraged but which are not conditions of conformance; the verb "may" -expresses optional features which are neither required nor prohibited.

- -

Conformance to this specification can meaningfully be claimed for grammars -and for processors.

- -

Note: although input described by a grammar is sometimes described as -"obeying" or "conforming to" the grammar, conformance to this specification -cannot be claimed of input streams or of input + grammar pairs.

- -

Conformance of grammars

- -

An ixml grammar in ixml form conforms to this specification if

-
    -
  • it is described by the grammar given in this specification, and
  • -
  • it satisfies all the other requirements specified for ixml grammars.
  • -
- -

An ixml grammar in XML form conforms to this specification if

-
    -
  • it can be derived from an ixml grammar in ixml form by parsing as - described in this specification, and
  • -
  • it satisfies all the other requirements specified for ixml grammars.
  • -
- -

Note: The normative formulations of conformance requirements are those given -elsewhere in this specification. But for convenience the requirements that go -beyond what is expressed in the grammar itself can be summarized as follows. -Reasonable effort has been used to make this list complete, but omission of any -conformance requirement from this list does not affect its status as a -conformance requirement.

-
    -
  • All rule names that are serialised must match the requirements for an XML - name.
  • -
  • All nonterminal names which are marked to be serialised must match the - requirements of an XML name. {Is this not the same thing?}
  • -
  • For every nonterminal name occurring on the right-hand side of a rule, - exactly one rule defining that name must exist in the grammar.
  • -
  • The grammar must not contain more than one rule defining any given name. - {needed?}
  • -
  • Terminal symbols must not be marked as attributes.
  • -
  • Any character class used must be one that is listed in the Unicode - specification.
  • -
  • The number represented in a hex encoding of a character must be within - the Unicode character range, and must not denote a Noncharacter or - Surrogate code point.
  • -
  • If the first rule in a grammar is marked as hidden, all of its - productions must produce exactly one non-hidden nonterminal and no - non-hidden terminals before or after that nonterminal.
  • -
- -

Conformance of processors

- -

A processor conforms to this specification if it accepts grammars in ixml -{or XML?} form and uses those grammars to parse input and produce -XML documents representing serialized trees as specified elsewhere in this -specification. A conforming processor must not accept non-conforming -grammars.

- -

In addition to requirements mentioned elsewhere in this specification, the -following also apply to conforming processors:

-
    -
  • For any conforming grammar and any input, processors must: +

    Conformance

    +

    In this specification, the verb "must" expresses unconditional + requirements + for conformance to the specification; the verb "should" expresses + requirements + that are encouraged but which are not conditions of conformance; the verb + "may" + expresses optional features which are neither required nor prohibited.

    +

    Conformance to this specification can meaningfully be claimed for + grammars + and for processors.

    +

    Note: although input described by a grammar is sometimes described as + "obeying" or "conforming to" the grammar, conformance to this + specification + cannot be claimed of input streams or of input + grammar pairs.

    +

    Conformance of grammars

    +

    An ixml grammar in ixml form conforms to this specification if

      -
    • parse the input using the grammar specified, and produce an XML - document representing a parse tree for the input, or
    • -
    • establish that the input is not described by the grammar, and produce - an XML document reporting that fact, or
    • -
    • fail for whatever reason (e.g. because available resource limits were - exceeded). {so a processor that always fails is - conformant?}
    • +
    • it is described by the grammar given in this specification, and
    • +
    • it satisfies all the other requirements specified for ixml grammars.
    -

    Note: the first and second items of the list above, together with other - requirements, require that grammars be processed by an algorithm that - accepts and parses any context-free grammar. Known parsing algorithms of - this class include [Earley], [Unger], [CYK], [GLR], and [GLL]; see also [Grune].

    -
  • -
  • If more than one parse tree describes the input, the processor must - serialize one of them. It is not defined how this choice is made, but the - resulting parse should be marked as ambiguous by including on the document - element of the serialisation the attribute - ixml:state="ambiguous", unless the user has activated an - option to suppress this attribute. Processors may produce more than one - parse tree, but the default mode of operation must serialize exactly - one.
  • -
  • If the parse fails, the processor must produce a 'failure document', some - XML document with ixml:state="failed" on the document element, - with helpful information about where and why it failed; it may be a partial - parse tree that includes parts of the parse that succeeded.
  • -
  • If the root node in the grammar is marked as an attribute, processors - must ignore that marking when serialising the rule as the root.
  • -
  • The form in which XML documents are produced is not constrained by this - specification; processors should be capable of producing serialized XML as - a character stream, but other forms (e.g. DOM instances or XDM instances) - may also be used.
  • -
  • In the normal case, when the input has a determinate length (either known - in advance or signaled by some end-of-stream signal), the processor must by - default parse the input in its entirety against the grammar and return - either a parse tree or a failure document. Processors may provide user - options for other behaviors (such as parsing the largest, or smallest, - prefix of the input that is described by the grammar). Processors may also - support invocation with input streams of indeterminate length.
  • -
- -

References

- -

[Unicode] The Unicode Consortium (ed.), The Unicode Standard -— Version 13.0. Unicode Consortium, 2020, ISBN 978-1-936213-26-9, http://www.unicode.org/versions/Unicode13.0.0/

- - -

[Categories] General Category Values https://unicode.org/reports/tr44/#General_Category_Values -(See also http://www.fileformat.info/info/unicode/category/index.htm)

- -

[XML] Tim Bray et al. (eds.), Extensible Markup Language (XML) 1.0 -(Fifth Edition), W3C, 2008, https://www.w3.org/TR/xml/

- -

Informational References

- -

[Earley] Earley, Jay (1970), "An efficient context-free parsing -algorithm", Communications of the ACM, 13 (2): 94–102, doi:10.1145/362007.362035

- -

[Unger] Unger, S. H. A global parser for context-free phrase -structure grammars. Commun. ACM, 11(4):240–247, April 1968

- -

[CYK] Sakai, Itiroo. Syntax in universal translation. In 1961 -International Conference on Machine Translation of Languages and Applied -Language Analysis, pages 593–608

- -

[GLR] Masaru Tomita. Generalized LR Parsing. Springer Science & -Business Media. ISBN 978-1-4615-4034-2.

- -

[GLL] GLL Parsing Elizabeth Scott and Adrian Johnstone Electronic -Notes in Theoretical Computer Science, Volume 253, Issue 7, 17 September 2010, -Pages 177-189

- -

[Grune] Grune, D. and Jacobs, C. (2008). Parsing techniques : a -practical guide (2nd ed.). New York: Springer. p. 579. ISBN 978-0-387-20248-8. -https://dickgrune.com/Books/PTAPG_2nd_Edition/CompleteList.pdf

- -

Acknowledgments

- -

This specification was produced by the W3C ixml community group, that at the -time of publishing consisted of the members: {list of names}

- -

Thanks are due to Hans-Dieter Hiep for an early close reading of the -specification, and consequent many helpful comments.

- +

[Categories] General Category Values https://unicode.org/reports/tr44/#General_Category_Values + (See also http://www.fileformat.info/info/unicode/category/index.htm)

+

[XML] Tim Bray et al. (eds.), Extensible Markup Language (XML) + 1.0 + (Fifth Edition), W3C, 2008, https://www.w3.org/TR/xml/

+

Informational References

+

[Earley] Earley, Jay (1970), "An efficient context-free + parsing + algorithm", Communications of the ACM, 13 (2): 94–102, doi:10.1145/362007.362035

+

[Unger] Unger, S. H. A global parser for context-free phrase + structure grammars. Commun. ACM, 11(4):240–247, April 1968

+

[CYK] Sakai, Itiroo. Syntax in universal translation. In 1961 + International Conference on Machine Translation of Languages and Applied + Language Analysis, pages 593–608

+

[GLR] Masaru Tomita. Generalized LR Parsing. Springer Science + & + Business Media. ISBN 978-1-4615-4034-2.

+

[GLL] GLL Parsing Elizabeth Scott and Adrian Johnstone + Electronic + Notes in Theoretical Computer Science, Volume 253, Issue 7, 17 September + 2010, + Pages 177-189

+

[Grune] Grune, D. and Jacobs, C. (2008). Parsing techniques : + a + practical guide (2nd ed.). New York: Springer. p. 579. ISBN + 978-0-387-20248-8. + https://dickgrune.com/Books/PTAPG_2nd_Edition/CompleteList.pdf

+

Acknowledgments

+

This specification was produced by the W3C ixml community group, that at + the + time of publishing consisted of the members: {list of names}

+

Thanks are due to Hans-Dieter Hiep for an early close reading of the + specification, and consequent many helpful comments.

+ diff --git a/ixml.ixml b/ixml.ixml index 2751c401..f2be592b 100644 --- a/ixml.ixml +++ b/ixml.ixml @@ -40,10 +40,10 @@ -"'", sstring, -"'", s. @dstring: dchar+. @sstring: schar+. - dchar: ~['"']; - '"', -'"'. {all characters, quotes must be doubled} - schar: ~["'"]; - "'", -"'". {all characters, quotes must be doubled} + dchar: ~['"'; #a; #d]; + '"', -'"'. {all characters except line breaks; quotes must be doubled} + schar: ~["'"; #a; #d]; + "'", -"'". {all characters except line breaks; quotes must be doubled} -encoded: (tmark, s)?, -"#", @hex, s. hex: ["0"-"9"; "a"-"f"; "A"-"F"]+. diff --git a/ixml.xml b/ixml.xml index 9a8a0fd7..4f8a6780 100644 --- a/ixml.xml +++ b/ixml.xml @@ -309,6 +309,8 @@ + + @@ -316,11 +318,13 @@ - all characters, quotes must be doubled + all characters except line breaks; quotes must be doubled + + @@ -328,7 +332,7 @@ - all characters, quotes must be doubled + all characters except line breaks; quotes must be doubled

Conformance

diff --git a/ixml.ixml b/ixml.ixml index 3916ea9c..a8976c62 100644 --- a/ixml.ixml +++ b/ixml.ixml @@ -53,12 +53,12 @@ -member: literal; range; class. - range: from, -"-", s, to. + range: from, -"-", s, to, s. @from: character. @to: character. - -character: -'"', dchar, -'"', s; - -"'", schar, -"'", s; - "#", hex, s. + -character: -'"', dchar, -'"'; + -"'", schar, -"'"; + "#", hex. class: code, s. @code: capital, letter?. -capital: ["A"-"Z"]. diff --git a/ixml.xml b/ixml.xml index c86121f2..b17d41e3 100644 --- a/ixml.xml +++ b/ixml.xml @@ -424,6 +424,7 @@ + @@ -441,18 +442,15 @@ - - - From e6041f797de04706b058f3050462437a5de07f1b Mon Sep 17 00:00:00 2001 From: Steven Pemberton Date: Tue, 25 Jan 2022 16:21:54 +0100 Subject: [PATCH 082/152] Corrected error in rule for range --- ixml-specification.html | 4 ++-- ixml.ixml | 2 +- ixml.xml | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ixml-specification.html b/ixml-specification.html index 7d0e9792..dad93ae0 100644 --- a/ixml-specification.html +++ b/ixml-specification.html @@ -443,7 +443,7 @@

Character sets

A range matches any character in the range from the start character to the end, inclusive, using the Unicode ordering:

-
range: from, -"-", s, to, s.
+
range: from, s, -"-", s, to, s.
 @from: character.
   @to: character.
@@ -518,7 +518,7 @@

Complete

-member: literal; range; class. - range: from, -"-", s, to, s. + range: from, s, -"-", s, to, s. @from: character. @to: character. -character: -'"', dchar, -'"'; diff --git a/ixml.ixml b/ixml.ixml index a8976c62..ff9e4ee8 100644 --- a/ixml.ixml +++ b/ixml.ixml @@ -53,7 +53,7 @@ -member: literal; range; class. - range: from, -"-", s, to, s. + range: from, s, -"-", s, to, s. @from: character. @to: character. -character: -'"', dchar, -'"'; diff --git a/ixml.xml b/ixml.xml index b17d41e3..933100d6 100644 --- a/ixml.xml +++ b/ixml.xml @@ -421,6 +421,7 @@ + From bdac8e06b621c6e415e244aa6fdcacacfed1e0d6 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Wed, 26 Jan 2022 14:29:18 -0700 Subject: [PATCH 083/152] Replace tabs with spaces --- misc/pragmas.md | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 085184a1..0937d525 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -68,12 +68,12 @@ Contents: * [Renaming](#renaming) * [Name indirection](#name-indirection) * [Rule rewriting](#rule-rewriting) - * [Tokenization annotation and alternative formulations.](#tokenization-annotation-and-alternative-formulations) - * [Text injection](#text-injection) - * [Attribute grammar specification](#attribute-grammar-specification) - * [Pragmas for proposal V](#Pragmas-for-proposal-V) + * [Tokenization annotation and alternative formulations.](#tokenization-annotation-and-alternative-formulations) + * [Text injection](#text-injection) + * [Attribute grammar specification](#attribute-grammar-specification) + * [Pragmas for proposal V](#Pragmas-for-proposal-V) * [Namespace binding proposals](#Namespace-binding-proposals) - * [Namespace binding, common rules](#namespace-binding-common-rules) + * [Namespace binding, common rules](#namespace-binding-common-rules) * [Namespace binding in proposal U](#namespace-binding-in-proposal-u) * [Namespace binding in proposal S](#namespace-binding-in-proposal-s) * [Open issues](#open-issues) @@ -691,9 +691,9 @@ the *y* namespace, and some in no namespace at all, might be [@nsd:x http://example.org/NS/existential] [@nsd:y http://example.com/NS/yoyo] x:sentence: x:a, ' ', y:b?, '. ', c. - x:a: 'Speed'. - y:b: 'kills'. - c: 'It really does.'. + x:a: 'Speed'. + y:b: 'kills'. + c: 'It really does.'. ```` The XML representation of the grammar might be (in form V): @@ -876,14 +876,14 @@ output produced manually, may be inaccurate*): - When the old pond - + When the old pond + - gets a new frog - + gets a new frog + - It's a new pond. - + It's a new pond. + ```` @@ -1127,9 +1127,9 @@ We can now annotate the grammar and supply an alternative formulation of ```` ^ [ls:rewrite - comment: -"{", (cchars; comment)*, -"}". - [ls:token] -cchars: cchar+. - ] + comment: -"{", (cchars; comment)*, -"}". + [ls:token] -cchars: cchar+. + ] comment: -"{", (cchar; comment)*, -"}". -cchar: ~["{}"]. ```` @@ -1142,7 +1142,7 @@ formulation after, not before, the existing rule: [ls:rewrite comment: -"{", (cchars; comment)*, -"}". - [ls:token] cchars: cchar+. - ]. + ]. -cchar: ~["{}"]. ```` @@ -1227,9 +1227,9 @@ problem.) factor → '0'. [ factor.v = 0 ] - factor → '1'. - [ factor.v = 1 ] - factor → '2'. + factor → '1'. + [ factor.v = 1 ] + factor → '2'. [ factor.v = 2 ] factor → '3'. [ factor.v = 3 ] @@ -1266,7 +1266,7 @@ written thus using the brackets-QName syntax: [ag:rule e0.v := e1.v + term.v ]. [@ag:id t0] term: [@ag:id t1] term, s, '_', s, factor [ag:rule t0.v := t1.v * factor.v]. - factor: digit [@ag:rule factor.v := number(string(digit))]; + factor: digit [@ag:rule factor.v := number(string(digit))]; '(', s, expr, s, ')' [@ag:rule factor.v := expr.v ]. digit: '0'; '1'; '2'; '3'; '4'; '5'; '6'; '7'; '8'; '9'. s: [#20; #A; #D; #9]. From a83544a3014ccab78ac4de246afb188ea4319ef0 Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Sat, 5 Feb 2022 09:53:18 +0000 Subject: [PATCH 084/152] Reorganized tests, test catalogs --- .../ambig.alt.output.xml | 0 .../tests-SP-MSM => ambiguous}/ambig.inp | 0 .../tests-SP-MSM => ambiguous}/ambig.ixml | 0 .../ambig.output.xml | 0 .../ambig2.alt.output.xml | 0 .../tests-SP-MSM => ambiguous}/ambig2.inp | 0 .../tests-SP-MSM => ambiguous}/ambig2.ixml | 0 .../ambig2.output.xml | 0 .../ambig3.alt-2.output.xml | 0 .../ambig3.alt-3.output.xml | 0 .../ambig3.alt.output.xml | 0 .../tests-SP-MSM => ambiguous}/ambig3.inp | 0 .../tests-SP-MSM => ambiguous}/ambig3.ixml | 0 .../ambig3.output.xml | 0 .../ambig4.alt.output.xml | 0 .../tests-SP-MSM => ambiguous}/ambig4.inp | 0 .../tests-SP-MSM => ambiguous}/ambig4.ixml | 0 .../ambig4.output.xml | 0 .../ambig5.alt.output.xml | 0 .../tests-SP-MSM => ambiguous}/ambig5.inp | 0 .../tests-SP-MSM => ambiguous}/ambig5.ixml | 0 .../ambig5.output.xml | 0 .../ambig6.alt.output.xml | 0 .../tests-SP-MSM => ambiguous}/ambig6.inp | 0 .../tests-SP-MSM => ambiguous}/ambig6.ixml | 0 .../ambig6.output.xml | 0 .../ambig7.alt.output.xml | 0 .../tests-SP-MSM => ambiguous}/ambig7.inp | 0 .../tests-SP-MSM => ambiguous}/ambig7.ixml | 0 .../ambig7.output.xml | 0 .../css.alt.output.xml | 0 .../tests-SP-MSM => ambiguous}/css.inp | 0 .../tests-SP-MSM => ambiguous}/css.ixml | 0 .../tests-SP-MSM => ambiguous}/css.output.xml | 0 .../tests-SP-MSM => ambiguous}/date.inp | 0 .../tests-SP-MSM => ambiguous}/date.ixml | 0 .../date.output.xml | 0 .../empty-parens.inp | 0 .../empty-parens.ixml | 0 .../empty-parens.output.xml | 0 .../expr0.alt.output.xml | 0 .../tests-SP-MSM => ambiguous}/expr0.inp | 0 .../tests-SP-MSM => ambiguous}/expr0.ixml | 0 .../expr0.output.xml | 0 tests/ambiguous/lf2.inp | 3 + tests/ambiguous/lf2.ixml | 3 + tests/ambiguous/lf2.output.xml | 13 + tests/ambiguous/test-catalog.xml | 264 ++++ .../tests-SP-MSM => correct}/address.inp | 0 .../tests-SP-MSM => correct}/address.ixml | 0 .../address.output.xml | 0 .../tests-SP-MSM => correct}/arith.inp | 0 .../tests-SP-MSM => correct}/arith.ixml | 0 .../tests-SP-MSM => correct}/arith.output.xml | 0 .../attribute-value.inp | 0 .../attribute-value.ixml | 0 .../attribute-value.output.xml | 0 .../tests-SP-MSM => correct}/diary.inp | 0 .../tests-SP-MSM => correct}/diary.ixml | 0 .../tests-SP-MSM => correct}/diary.output.xml | 0 .../tests-SP-MSM => correct}/diary2.inp | 0 .../tests-SP-MSM => correct}/diary2.ixml | 0 .../diary2.output.xml | 0 .../tests-SP-MSM => correct}/diary3.inp | 0 .../tests-SP-MSM => correct}/diary3.ixml | 0 .../diary3.output.xml | 0 tests/correct/element-content.inp | 1 + tests/correct/element-content.ixml | 2 + tests/correct/element-content.output.xml | 1 + .../tests-SP-MSM => correct}/email.inp | 0 .../tests-SP-MSM => correct}/email.ixml | 0 .../tests-SP-MSM => correct}/email.output.xml | 0 tests/correct/empty-group.inp | 1 + tests/correct/empty-group.ixml | 3 + tests/correct/empty-group.output.xml | 4 + .../{steven/tests-SP-MSM => correct}/expr.inp | 0 .../tests-SP-MSM => correct}/expr.ixml | 0 .../tests-SP-MSM => correct}/expr.output.xml | 0 .../tests-SP-MSM => correct}/expr1.inp | 0 .../tests-SP-MSM => correct}/expr1.ixml | 0 .../tests-SP-MSM => correct}/expr2.inp | 0 .../tests-SP-MSM => correct}/expr2.ixml | 0 .../tests-SP-MSM => correct}/expr2.output.xml | 0 .../tests-SP-MSM => correct}/expr3.inp | 0 .../tests-SP-MSM => correct}/expr3.ixml | 0 .../tests-SP-MSM => correct}/expr3.output.xml | 0 .../tests-SP-MSM => correct}/expr4.inp | 0 .../tests-SP-MSM => correct}/expr4.ixml | 0 .../tests-SP-MSM => correct}/expr4.output.xml | 0 .../tests-SP-MSM => correct}/expr5.inp | 0 .../tests-SP-MSM => correct}/expr5.ixml | 0 .../tests-SP-MSM => correct}/expr5.output.xml | 0 .../tests-SP-MSM => correct}/expr6.inp | 0 .../tests-SP-MSM => correct}/expr6.ixml | 0 .../tests-SP-MSM => correct}/expr6.output.xml | 0 .../{steven/tests-SP-MSM => correct}/hash.inp | 0 .../tests-SP-MSM => correct}/hash.ixml | 0 .../tests-SP-MSM => correct}/hash.output.xml | 0 .../{steven/tests-SP-MSM => correct}/hex.inp | 0 .../{steven/tests-SP-MSM => correct}/hex.ixml | 0 .../tests-SP-MSM => correct}/hex.output.xml | 0 .../{steven/tests-SP-MSM => correct}/hex1.inp | 0 .../tests-SP-MSM => correct}/hex1.ixml | 0 .../tests-SP-MSM => correct}/hex1.output.xml | 0 .../{steven/tests-SP-MSM => correct}/hex3.inp | 0 .../tests-SP-MSM => correct}/hex3.ixml | 0 .../tests-SP-MSM => correct}/hex3.output.xml | 0 .../{steven/tests-SP-MSM => correct}/json.inp | 0 .../tests-SP-MSM => correct}/json.ixml | 0 .../tests-SP-MSM => correct}/json.output.xml | 0 .../tests-SP-MSM => correct}/json1.inp | 0 .../tests-SP-MSM => correct}/json1.ixml | 0 .../tests-SP-MSM => correct}/json1.output.xml | 0 tests/{steven/tests-SP-MSM => correct}/lf.inp | 0 .../{steven/tests-SP-MSM => correct}/lf.ixml | 0 .../tests-SP-MSM => correct}/lf.output.xml | 0 .../tests-SP-MSM => correct}/marked.inp | 0 .../tests-SP-MSM => correct}/marked.ixml | 0 .../marked.output.xml | 0 .../nested-comment.inp | 0 .../nested-comment.ixml | 0 .../nested-comment.output.xml | 0 .../tests-SP-MSM => correct}/para-test.inp | 0 .../tests-SP-MSM => correct}/para-test.ixml | 0 .../{steven/tests-SP-MSM => correct}/poly.inp | 0 .../tests-SP-MSM => correct}/poly.ixml | 0 .../tests-SP-MSM => correct}/poly.output.xml | 0 .../tests-SP-MSM => correct}/program.inp | 0 .../tests-SP-MSM => correct}/program.ixml | 0 .../program.output.xml | 0 tests/correct/range-comments.inp | 1 + tests/correct/range-comments.ixml | 2 + tests/correct/range-comments.output.xml | 6 + .../tests-SP-MSM => correct}/range.inp | 0 .../tests-SP-MSM => correct}/range.ixml | 0 .../tests-SP-MSM => correct}/range.output.xml | 1 - tests/correct/ranges.inp | 1 + tests/correct/ranges.ixml | 15 + tests/correct/ranges.output.xml | 9 + tests/correct/ranges1.inp | 1 + tests/correct/ranges1.ixml | 20 + tests/correct/ranges1.output.xml | 9 + .../tests-SP-MSM => correct}/string.inp | 0 .../tests-SP-MSM => correct}/string.ixml | 0 .../string.output.xml | 0 .../{steven/tests-SP-MSM => correct}/tab.inp | 0 .../{steven/tests-SP-MSM => correct}/tab.ixml | 0 .../tests-SP-MSM => correct}/tab.output.xml | 0 .../test-catalog.xml} | 652 ++------ .../{steven/tests-SP-MSM => correct}/test.inp | 0 .../tests-SP-MSM => correct}/test.ixml | 0 .../tests-SP-MSM => correct}/test.output.xml | 0 .../unicode-range.inp | 0 .../unicode-range.ixml | 0 .../unicode-range.output.xml | 0 .../unicode-range1.inp | 0 .../unicode-range1.ixml | 0 .../unicode-range1.output.xml | 0 .../unicode-range2.inp | 0 .../unicode-range2.ixml | 0 .../unicode-range2.output.xml | 0 .../tests-SP-MSM => correct}/vcard.inp | 0 .../tests-SP-MSM => correct}/vcard.ixml | 0 .../tests-SP-MSM => correct}/vcard.output.xml | 0 .../{steven/tests-SP-MSM => correct}/xml.inp | 0 .../{steven/tests-SP-MSM => correct}/xml.ixml | 0 .../tests-SP-MSM => correct}/xml.output.xml | 0 .../{steven/tests-SP-MSM => correct}/xml1.inp | 0 .../tests-SP-MSM => correct}/xml1.ixml | 0 .../tests-SP-MSM => correct}/xml1.output.xml | 0 .../tests-SP-MSM => correct}/xpath.inp | 0 .../tests-SP-MSM => correct}/xpath.ixml | 0 .../tests-SP-MSM => extra}/expr1.output.xml | 0 .../ixml-one-line.output.xml | 0 .../tests-SP-MSM => extra}/ixml2.output.xml | 0 .../para-test.disputed-output.xml | 0 .../url1.disputed-output.xml | 0 .../tests-SP-MSM => extra}/xml.dup.output.xml | 0 .../tests-SP-MSM => extra}/xpath.output.xml | 0 tests/{steven/tests-SP-MSM => ixml}/bnf.inp | 0 tests/{steven/tests-SP-MSM => ixml}/bnf.ixml | 0 .../tests-SP-MSM => ixml}/bnf.output.xml | 0 .../tests-SP-MSM => ixml}/ixml-no-spaces.inp | 0 .../tests-SP-MSM => ixml}/ixml-no-spaces.ixml | 0 .../ixml-no-spaces.output.xml | 0 .../ixml-one-line.corr.output.xml | 0 .../tests-SP-MSM => ixml}/ixml-one-line.inp | 0 .../tests-SP-MSM => ixml}/ixml-one-line.ixml | 0 .../tests-SP-MSM => ixml}/ixml-spaces.inp | 0 .../tests-SP-MSM => ixml}/ixml-spaces.ixml | 0 .../ixml-spaces.output.xml | 0 tests/{steven/tests-SP-MSM => ixml}/ixml.inp | 0 tests/{steven/tests-SP-MSM => ixml}/ixml.ixml | 0 .../tests-SP-MSM => ixml}/ixml.output.xml | 0 tests/{steven/tests-SP-MSM => ixml}/ixml1.inp | 0 .../{steven/tests-SP-MSM => ixml}/ixml1.ixml | 0 .../tests-SP-MSM => ixml}/ixml1.output.xml | 0 tests/{steven/tests-SP-MSM => ixml}/ixml2.inp | 0 .../{steven/tests-SP-MSM => ixml}/ixml2.ixml | 0 tests/{steven/tests-SP-MSM => ixml}/ixml3.inp | 0 .../{steven/tests-SP-MSM => ixml}/ixml3.ixml | 0 .../tests-SP-MSM => ixml}/ixml3.output.xml | 0 tests/ixml/test-catalog.xml | 202 +++ .../tests-SP-MSM => parse}/parse-error.inp | 0 .../tests-SP-MSM => parse}/parse-error.ixml | 0 tests/parse/test-catalog.xml | 60 + tests/{steven/tests-SP-MSM => parse}/url.inp | 0 tests/{steven/tests-SP-MSM => parse}/url.ixml | 0 tests/{steven/tests-SP-MSM => parse}/url1.inp | 0 .../{steven/tests-SP-MSM => parse}/url1.ixml | 0 tests/readme.md | 52 +- tests/reference/ixml.ixml | 67 + tests/reference/ixml.xml | 485 ++++++ tests/steven/SP-syntaxtests-package.zip | Bin 12868 -> 0 bytes tests/steven/ambiguous/readme.md | 1 - tests/steven/catalog.xml | 33 - tests/steven/readme.md | 41 - tests/steven/syntaxtests.zip | Bin 28633 -> 0 bytes tests/steven/tests-SP-MSM/README.md | 9 - tests/steven/tests.zip | Bin 129234 -> 0 bytes tests/syntax/catalog-as-grammar-tests.xml | 333 ++++ .../syntax/catalog-as-instance-tests-ixml.xml | 640 ++++++++ .../syntax/catalog-as-instance-tests-xml.xml | 468 ++++++ tests/syntax/class-range.ixml | 2 + tests/syntax/defn1.ixml | 4 + tests/syntax/defn10.ixml | 4 + tests/syntax/defn11.ixml | 4 + tests/syntax/defn2.ixml | 4 + tests/syntax/defn3.ixml | 4 + tests/syntax/defn4.ixml | 4 + tests/syntax/defn5.ixml | 4 + tests/syntax/defn6.ixml | 4 + tests/syntax/defn8.ixml | 4 + tests/syntax/defn9.ixml | 4 + tests/syntax/elem1.ixml | 4 + tests/syntax/elem2.ixml | 4 + tests/syntax/elem3.ixml | 4 + tests/syntax/elem4.ixml | 4 + tests/syntax/elem5.ixml | 4 + tests/syntax/elem6.ixml | 4 + tests/syntax/elem7.ixml | 4 + tests/syntax/empty-string.ixml | 4 + tests/syntax/expr10.ixml | 2 + tests/syntax/hex2.ixml | 1 + tests/syntax/illegal-class.ixml | 2 + tests/syntax/name-with-spaces.ixml | 3 + tests/syntax/rule.ixml | 3 + tests/syntax/rule1.ixml | 3 + tests/syntax/rule10.ixml | 2 + tests/syntax/rule2.ixml | 3 + tests/syntax/rule3.ixml | 3 + tests/syntax/rule4.ixml | 3 + tests/syntax/rule5.ixml | 3 + tests/syntax/rule6.ixml | 3 + tests/syntax/rule7.ixml | 3 + tests/syntax/rule8.ixml | 1 + tests/syntax/rule9.ixml | 4 + tests/syntax/unterminated-comment.ixml | 3 + tests/syntax/unterminated-comment1.ixml | 4 + tests/syntax/unterminated-comment2.ixml | 5 + tests/syntax/unused-rule.ixml | 6 + tests/syntax/unused-rules.ixml | 7 + tests/test-catalog.xml | 30 + tests/tests/ambiguous/ambig.inp | 2 + tests/tests/ambiguous/ambig.ixml | 3 + tests/tests/ambiguous/ambig.req | 22 + tests/tests/ambiguous/ambig2.inp | 0 tests/tests/ambiguous/ambig2.ixml | 1 + tests/tests/ambiguous/ambig2.req | 10 + tests/tests/ambiguous/ambig2a.inp | 0 tests/tests/ambiguous/ambig2a.ixml | 3 + tests/tests/ambiguous/ambig2a.req | 12 + tests/tests/ambiguous/ambig3.inp | 1 + tests/tests/ambiguous/ambig3.ixml | 3 + tests/tests/ambiguous/ambig3.req | 19 + tests/tests/ambiguous/ambig4.inp | 2 + tests/tests/ambiguous/ambig4.ixml | 5 + tests/tests/ambiguous/ambig4.req | 27 + tests/tests/ambiguous/ambig5.inp | 1 + tests/tests/ambiguous/ambig5.ixml | 3 + tests/tests/ambiguous/ambig5.req | 20 + tests/tests/ambiguous/ambig6.inp | 1 + tests/tests/ambiguous/ambig6.ixml | 4 + tests/tests/ambiguous/ambig6.req | 14 + tests/tests/ambiguous/ambig7.inp | 1 + tests/tests/ambiguous/ambig7.ixml | 3 + tests/tests/ambiguous/ambig7.req | 16 + tests/tests/ambiguous/css.inp | 2 + tests/tests/ambiguous/css.ixml | 12 + tests/tests/ambiguous/css.req | 47 + tests/tests/ambiguous/date.inp | 1 + tests/tests/ambiguous/date.ixml | 38 + tests/tests/ambiguous/date.req | 58 + tests/tests/ambiguous/empty-parens.inp | 0 tests/tests/ambiguous/empty-parens.ixml | 1 + tests/tests/ambiguous/empty-parens.req | 10 + tests/tests/ambiguous/expr0.inp | 1 + tests/tests/ambiguous/expr0.ixml | 14 + tests/tests/ambiguous/expr0.req | 38 + tests/tests/ambiguous/lf2.inp | 3 + tests/tests/ambiguous/lf2.ixml | 3 + tests/tests/ambiguous/lf2.req | 22 + tests/tests/correct/a.ixml-fail | 1 + tests/tests/correct/address.inp | 4 + tests/tests/correct/address.ixml | 22 + tests/tests/correct/address.req | 42 + tests/tests/correct/arith.inp | 1 + tests/tests/correct/arith.ixml | 8 + tests/tests/correct/arith.req | 18 + tests/tests/correct/attribute-value.inp | 1 + tests/tests/correct/attribute-value.ixml | 2 + tests/tests/correct/attribute-value.req | 7 + tests/tests/correct/diary.inp | 9 + tests/tests/correct/diary.ixml | 15 + tests/tests/correct/diary.req | 53 + tests/tests/correct/diary2.inp | 9 + tests/tests/correct/diary2.ixml | 15 + tests/tests/correct/diary2.req | 53 + tests/tests/correct/diary3.inp | 9 + tests/tests/correct/diary3.ixml | 13 + tests/tests/correct/diary3.req | 51 + tests/tests/correct/element-content.inp | 1 + tests/tests/correct/element-content.ixml | 2 + tests/tests/correct/element-content.req | 7 + tests/tests/correct/email.inp | 1 + tests/tests/correct/email.ixml | 8 + tests/tests/correct/email.req | 13 + tests/tests/correct/empty-group.inp | 1 + tests/tests/correct/empty-group.ixml | 3 + tests/tests/correct/empty-group.req | 10 + tests/tests/correct/expr.inp | 1 + tests/tests/correct/expr.ixml | 15 + tests/tests/correct/expr.req | 30 + tests/tests/correct/expr1.inp | 2 + tests/tests/correct/expr1.ixml | 13 + tests/tests/correct/expr1.req | 37 + tests/tests/correct/expr2.inp | 1 + tests/tests/correct/expr2.ixml | 10 + tests/tests/correct/expr2.req | 26 + tests/tests/correct/expr3.inp | 2 + tests/tests/correct/expr3.ixml | 11 + tests/tests/correct/expr3.req | 28 + tests/tests/correct/expr4.inp | 1 + tests/tests/correct/expr4.ixml | 8 + tests/tests/correct/expr4.req | 23 + tests/tests/correct/expr5.inp | 1 + tests/tests/correct/expr5.ixml | 14 + tests/tests/correct/expr5.req | 23 + tests/tests/correct/expr6.inp | 1 + tests/tests/correct/expr6.ixml | 15 + tests/tests/correct/expr6.req | 35 + tests/tests/correct/hash.inp | 2 + tests/tests/correct/hash.ixml | 5 + tests/tests/correct/hash.req | 18 + tests/tests/correct/hex.inp | 1 + tests/tests/correct/hex.ixml | 1 + tests/tests/correct/hex.req | 6 + tests/tests/correct/hex1.inp | 1 + tests/tests/correct/hex1.ixml | 1 + tests/tests/correct/hex1.req | 6 + tests/tests/correct/hex3.inp | 1 + tests/tests/correct/hex3.ixml | 1 + tests/tests/correct/hex3.req | 6 + tests/tests/correct/json.inp | 18 + tests/tests/correct/json.ixml | 29 + tests/tests/correct/json.req | 159 ++ tests/tests/correct/json1.inp | 1 + tests/tests/correct/json1.ixml | 19 + tests/tests/correct/json1.req | 32 + tests/tests/correct/lf.inp | 3 + tests/tests/correct/lf.ixml | 3 + tests/tests/correct/lf.req | 15 + tests/tests/correct/lf.res | 17 + tests/tests/correct/lf1.inp | 3 + tests/tests/correct/lf1.ixml | 3 + tests/tests/correct/lf1.req | 18 + tests/tests/correct/marked.inp | 1 + tests/tests/correct/marked.ixml | 3 + tests/tests/correct/marked.req | 8 + tests/tests/correct/nested-comment.inp | 1 + tests/tests/correct/nested-comment.ixml | 6 + tests/tests/correct/nested-comment.req | 14 + tests/tests/correct/para-test.inp | 9 + tests/tests/correct/para-test.ixml | 4 + tests/tests/correct/para-test.req | 31 + tests/tests/correct/para-test.res | 31 + tests/tests/correct/poly.inp | 2 + tests/tests/correct/poly.ixml | 9 + tests/tests/correct/poly.req | 19 + tests/tests/correct/program.inp | 1 + tests/tests/correct/program.ixml | 17 + tests/tests/correct/program.req | 45 + tests/tests/correct/range-comments.inp | 1 + tests/tests/correct/range-comments.ixml | 2 + tests/tests/correct/range-comments.req | 12 + tests/tests/correct/range.inp | 1 + tests/tests/correct/range.ixml | 3 + tests/tests/correct/range.req | 11 + tests/tests/correct/ranges.inp | 1 + tests/tests/correct/ranges.ixml | 15 + tests/tests/correct/ranges.req | 27 + tests/tests/correct/ranges1.inp | 1 + tests/tests/correct/ranges1.ixml | 20 + tests/tests/correct/ranges1.req | 32 + tests/tests/correct/string.inp | 1 + tests/tests/correct/string.ixml | 5 + tests/tests/correct/string.req | 14 + tests/tests/correct/tab.inp | 1 + tests/tests/correct/tab.ixml | 3 + tests/tests/correct/tab.req | 10 + tests/tests/correct/test.inp | 2 + tests/tests/correct/test.ixml | 4 + tests/tests/correct/test.req | 13 + tests/tests/correct/unicode-range.inp | 1 + tests/tests/correct/unicode-range.ixml | 1 + tests/tests/correct/unicode-range.req | 5 + tests/tests/correct/unicode-range.res | 14 + tests/tests/correct/unicode-range1.inp | 1 + tests/tests/correct/unicode-range1.ixml | 1 + tests/tests/correct/unicode-range1.req | 5 + tests/tests/correct/unicode-range1.res | 10 + tests/tests/correct/unicode-range2.inp | 1 + tests/tests/correct/unicode-range2.ixml | 1 + tests/tests/correct/unicode-range2.req | 6 + tests/tests/correct/vcard.inp | 10 + tests/tests/correct/vcard.ixml | 11 + tests/tests/correct/vcard.req | 69 + tests/tests/correct/xml.inp | 4 + tests/tests/correct/xml.ixml | 11 + tests/tests/correct/xml.req | 30 + tests/tests/correct/xml1.inp | 4 + tests/tests/correct/xml1.ixml | 10 + tests/tests/correct/xml1.req | 29 + tests/tests/correct/xpath.inp | 2 + tests/tests/correct/xpath.ixml | 260 ++++ tests/tests/correct/xpath.req | 314 ++++ tests/tests/ixml/bnf.inp | 24 + tests/tests/ixml/bnf.ixml | 26 + tests/tests/ixml/bnf.req | 345 +++++ tests/tests/ixml/ixml-comments.inp | 60 + tests/tests/ixml/ixml-comments.ixml | 60 + tests/tests/ixml/ixml-comments.out | 1342 +++++++++++++++++ tests/tests/ixml/ixml-comments.req | 1342 +++++++++++++++++ tests/tests/ixml/ixml-comments.res | 1342 +++++++++++++++++ tests/tests/ixml/ixml-no-spaces.inp | 60 + tests/tests/ixml/ixml-no-spaces.ixml | 60 + tests/tests/ixml/ixml-no-spaces.req | 530 +++++++ tests/tests/ixml/ixml-one-line.inp | 1 + tests/tests/ixml/ixml-one-line.ixml | 1 + tests/tests/ixml/ixml-one-line.req | 499 ++++++ tests/tests/ixml/ixml-one-line.res | 15 + tests/tests/ixml/ixml-spaces.inp | 60 + tests/tests/ixml/ixml-spaces.ixml | 60 + tests/tests/ixml/ixml-spaces.req | 530 +++++++ tests/tests/ixml/ixml.inp | 67 + tests/tests/ixml/ixml.ixml | 67 + tests/tests/ixml/ixml.req | 632 ++++++++ tests/tests/ixml/ixml1.inp | 45 + tests/tests/ixml/ixml1.ixml | 45 + tests/tests/ixml/ixml1.req | 572 +++++++ tests/tests/ixml/ixml2.inp | 60 + tests/tests/ixml/ixml2.ixml | 60 + tests/tests/ixml/ixml2.req | 477 ++++++ tests/tests/ixml/ixml3.inp | 61 + tests/tests/ixml/ixml3.ixml | 61 + tests/tests/ixml/ixml3.req | 483 ++++++ tests/tests/parse/elem1.inp | 1 + tests/tests/parse/elem1.ixml | 4 + tests/tests/parse/elem1.req | 20 + tests/tests/parse/parse-error.inp | 1 + tests/tests/parse/parse-error.ixml | 2 + tests/tests/parse/parse-error.req | 18 + tests/tests/parse/url.inp | 1 + tests/tests/parse/url.ixml | 12 + tests/tests/parse/url.req | 28 + tests/tests/parse/url1.inp | 1 + tests/tests/parse/url1.ixml | 11 + tests/tests/parse/url1.req | 25 + tests/tests/semantic/unused-rule.inp | 0 tests/tests/semantic/unused-rule.ixml | 6 + tests/tests/semantic/unused-rule.req | 17 + tests/tests/semantic/unused-rules.inp | 0 tests/tests/semantic/unused-rules.ixml | 7 + tests/tests/semantic/unused-rules.req | 18 + tests/tests/syntax/MISSING.inp | 1 + tests/tests/syntax/class-range.inp | 1 + tests/tests/syntax/class-range.ixml | 2 + tests/tests/syntax/class-range.req | 15 + tests/tests/syntax/defn1.inp | 0 tests/tests/syntax/defn1.ixml | 4 + tests/tests/syntax/defn1.req | 12 + tests/tests/syntax/defn10.inp | 0 tests/tests/syntax/defn10.ixml | 4 + tests/tests/syntax/defn10.req | 12 + tests/tests/syntax/defn11.inp | 0 tests/tests/syntax/defn11.ixml | 4 + tests/tests/syntax/defn11.req | 12 + tests/tests/syntax/defn2.inp | 0 tests/tests/syntax/defn2.ixml | 4 + tests/tests/syntax/defn2.req | 12 + tests/tests/syntax/defn3.inp | 0 tests/tests/syntax/defn3.ixml | 4 + tests/tests/syntax/defn3.req | 16 + tests/tests/syntax/defn3.rq | 14 + tests/tests/syntax/defn4.inp | 0 tests/tests/syntax/defn4.ixml | 4 + tests/tests/syntax/defn4.req | 16 + tests/tests/syntax/defn5.inp | 0 tests/tests/syntax/defn5.ixml | 4 + tests/tests/syntax/defn5.req | 12 + tests/tests/syntax/defn6.inp | 0 tests/tests/syntax/defn6.ixml | 4 + tests/tests/syntax/defn6.req | 12 + tests/tests/syntax/defn8.inp | 0 tests/tests/syntax/defn8.ixml | 4 + tests/tests/syntax/defn8.req | 12 + tests/tests/syntax/defn9.inp | 0 tests/tests/syntax/defn9.ixml | 4 + tests/tests/syntax/defn9.req | 16 + tests/tests/syntax/elem2.inp | 0 tests/tests/syntax/elem2.ixml | 4 + tests/tests/syntax/elem2.req | 12 + tests/tests/syntax/elem3.inp | 0 tests/tests/syntax/elem3.ixml | 4 + tests/tests/syntax/elem3.req | 16 + tests/tests/syntax/elem4.inp | 0 tests/tests/syntax/elem4.ixml | 4 + tests/tests/syntax/elem4.req | 12 + tests/tests/syntax/elem5.inp | 0 tests/tests/syntax/elem5.ixml | 4 + tests/tests/syntax/elem5.req | 16 + tests/tests/syntax/elem6.inp | 0 tests/tests/syntax/elem6.ixml | 4 + tests/tests/syntax/elem6.req | 12 + tests/tests/syntax/elem7.inp | 0 tests/tests/syntax/elem7.ixml | 4 + tests/tests/syntax/elem7.req | 24 + tests/tests/syntax/empty-string.inp | 1 + tests/tests/syntax/empty-string.ixml | 4 + tests/tests/syntax/empty-string.req | 13 + tests/tests/syntax/expr10.inp | 1 + tests/tests/syntax/expr10.ixml | 2 + tests/tests/syntax/expr10.req | 14 + tests/tests/syntax/hex2.inp | 1 + tests/tests/syntax/hex2.ixml | 1 + tests/tests/syntax/hex2.req | 18 + tests/tests/syntax/illegal-class.inp | 1 + tests/tests/syntax/illegal-class.ixml | 2 + tests/tests/syntax/illegal-class.req | 11 + tests/tests/syntax/name-with-spaces.inp | 1 + tests/tests/syntax/name-with-spaces.ixml | 3 + tests/tests/syntax/name-with-spaces.req | 32 + tests/tests/syntax/rule.inp | 0 tests/tests/syntax/rule.ixml | 3 + tests/tests/syntax/rule.req | 15 + tests/tests/syntax/rule1.inp | 0 tests/tests/syntax/rule1.ixml | 3 + tests/tests/syntax/rule1.req | 15 + tests/tests/syntax/rule10.inp | 0 tests/tests/syntax/rule10.ixml | 2 + tests/tests/syntax/rule10.req | 18 + tests/tests/syntax/rule2.inp | 0 tests/tests/syntax/rule2.ixml | 4 + tests/tests/syntax/rule2.req | 12 + tests/tests/syntax/rule3.inp | 0 tests/tests/syntax/rule3.ixml | 3 + tests/tests/syntax/rule3.req | 15 + tests/tests/syntax/rule4.inp | 0 tests/tests/syntax/rule4.ixml | 3 + tests/tests/syntax/rule4.req | 11 + tests/tests/syntax/rule5.inp | 0 tests/tests/syntax/rule5.ixml | 3 + tests/tests/syntax/rule5.req | 15 + tests/tests/syntax/rule6.inp | 0 tests/tests/syntax/rule6.ixml | 3 + tests/tests/syntax/rule6.req | 15 + tests/tests/syntax/rule7.inp | 0 tests/tests/syntax/rule7.ixml | 3 + tests/tests/syntax/rule7.req | 15 + tests/tests/syntax/rule8.inp | 0 tests/tests/syntax/rule8.ixml | 1 + tests/tests/syntax/rule8.req | 17 + tests/tests/syntax/rule9.inp | 0 tests/tests/syntax/rule9.ixml | 4 + tests/tests/syntax/rule9.req | 12 + tests/tests/syntax/unterminated-comment.inp | 0 tests/tests/syntax/unterminated-comment.ixml | 3 + tests/tests/syntax/unterminated-comment.req | 11 + tests/tests/syntax/unterminated-comment1.inp | 0 tests/tests/syntax/unterminated-comment1.ixml | 4 + tests/tests/syntax/unterminated-comment1.req | 12 + tests/tests/syntax/unterminated-comment2.inp | 0 tests/tests/syntax/unterminated-comment2.ixml | 5 + tests/tests/syntax/unterminated-comment2.req | 17 + tests/tools/href-check.xsl | 71 + 595 files changed, 15504 insertions(+), 615 deletions(-) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig.alt.output.xml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig.inp (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig.ixml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig.output.xml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig2.alt.output.xml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig2.inp (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig2.ixml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig2.output.xml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig3.alt-2.output.xml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig3.alt-3.output.xml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig3.alt.output.xml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig3.inp (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig3.ixml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig3.output.xml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig4.alt.output.xml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig4.inp (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig4.ixml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig4.output.xml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig5.alt.output.xml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig5.inp (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig5.ixml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig5.output.xml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig6.alt.output.xml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig6.inp (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig6.ixml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig6.output.xml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig7.alt.output.xml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig7.inp (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig7.ixml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/ambig7.output.xml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/css.alt.output.xml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/css.inp (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/css.ixml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/css.output.xml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/date.inp (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/date.ixml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/date.output.xml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/empty-parens.inp (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/empty-parens.ixml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/empty-parens.output.xml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/expr0.alt.output.xml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/expr0.inp (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/expr0.ixml (100%) rename tests/{steven/tests-SP-MSM => ambiguous}/expr0.output.xml (100%) create mode 100644 tests/ambiguous/lf2.inp create mode 100644 tests/ambiguous/lf2.ixml create mode 100644 tests/ambiguous/lf2.output.xml create mode 100644 tests/ambiguous/test-catalog.xml rename tests/{steven/tests-SP-MSM => correct}/address.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/address.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/address.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/arith.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/arith.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/arith.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/attribute-value.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/attribute-value.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/attribute-value.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/diary.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/diary.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/diary.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/diary2.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/diary2.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/diary2.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/diary3.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/diary3.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/diary3.output.xml (100%) create mode 100644 tests/correct/element-content.inp create mode 100644 tests/correct/element-content.ixml create mode 100644 tests/correct/element-content.output.xml rename tests/{steven/tests-SP-MSM => correct}/email.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/email.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/email.output.xml (100%) create mode 100644 tests/correct/empty-group.inp create mode 100644 tests/correct/empty-group.ixml create mode 100644 tests/correct/empty-group.output.xml rename tests/{steven/tests-SP-MSM => correct}/expr.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/expr.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/expr.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/expr1.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/expr1.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/expr2.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/expr2.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/expr2.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/expr3.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/expr3.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/expr3.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/expr4.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/expr4.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/expr4.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/expr5.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/expr5.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/expr5.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/expr6.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/expr6.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/expr6.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/hash.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/hash.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/hash.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/hex.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/hex.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/hex.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/hex1.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/hex1.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/hex1.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/hex3.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/hex3.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/hex3.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/json.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/json.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/json.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/json1.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/json1.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/json1.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/lf.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/lf.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/lf.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/marked.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/marked.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/marked.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/nested-comment.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/nested-comment.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/nested-comment.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/para-test.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/para-test.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/poly.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/poly.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/poly.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/program.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/program.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/program.output.xml (100%) create mode 100644 tests/correct/range-comments.inp create mode 100644 tests/correct/range-comments.ixml create mode 100644 tests/correct/range-comments.output.xml rename tests/{steven/tests-SP-MSM => correct}/range.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/range.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/range.output.xml (98%) create mode 100644 tests/correct/ranges.inp create mode 100644 tests/correct/ranges.ixml create mode 100644 tests/correct/ranges.output.xml create mode 100644 tests/correct/ranges1.inp create mode 100644 tests/correct/ranges1.ixml create mode 100644 tests/correct/ranges1.output.xml rename tests/{steven/tests-SP-MSM => correct}/string.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/string.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/string.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/tab.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/tab.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/tab.output.xml (100%) rename tests/{steven/tests-SP-MSM/tests-catalog.xml => correct/test-catalog.xml} (56%) rename tests/{steven/tests-SP-MSM => correct}/test.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/test.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/test.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/unicode-range.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/unicode-range.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/unicode-range.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/unicode-range1.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/unicode-range1.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/unicode-range1.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/unicode-range2.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/unicode-range2.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/unicode-range2.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/vcard.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/vcard.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/vcard.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/xml.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/xml.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/xml.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/xml1.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/xml1.ixml (100%) rename tests/{steven/tests-SP-MSM => correct}/xml1.output.xml (100%) rename tests/{steven/tests-SP-MSM => correct}/xpath.inp (100%) rename tests/{steven/tests-SP-MSM => correct}/xpath.ixml (100%) rename tests/{steven/tests-SP-MSM => extra}/expr1.output.xml (100%) rename tests/{steven/tests-SP-MSM => extra}/ixml-one-line.output.xml (100%) rename tests/{steven/tests-SP-MSM => extra}/ixml2.output.xml (100%) rename tests/{steven/tests-SP-MSM => extra}/para-test.disputed-output.xml (100%) rename tests/{steven/tests-SP-MSM => extra}/url1.disputed-output.xml (100%) rename tests/{steven/tests-SP-MSM => extra}/xml.dup.output.xml (100%) rename tests/{steven/tests-SP-MSM => extra}/xpath.output.xml (100%) rename tests/{steven/tests-SP-MSM => ixml}/bnf.inp (100%) rename tests/{steven/tests-SP-MSM => ixml}/bnf.ixml (100%) rename tests/{steven/tests-SP-MSM => ixml}/bnf.output.xml (100%) rename tests/{steven/tests-SP-MSM => ixml}/ixml-no-spaces.inp (100%) rename tests/{steven/tests-SP-MSM => ixml}/ixml-no-spaces.ixml (100%) rename tests/{steven/tests-SP-MSM => ixml}/ixml-no-spaces.output.xml (100%) rename tests/{steven/tests-SP-MSM => ixml}/ixml-one-line.corr.output.xml (100%) rename tests/{steven/tests-SP-MSM => ixml}/ixml-one-line.inp (100%) rename tests/{steven/tests-SP-MSM => ixml}/ixml-one-line.ixml (100%) rename tests/{steven/tests-SP-MSM => ixml}/ixml-spaces.inp (100%) rename tests/{steven/tests-SP-MSM => ixml}/ixml-spaces.ixml (100%) rename tests/{steven/tests-SP-MSM => ixml}/ixml-spaces.output.xml (100%) rename tests/{steven/tests-SP-MSM => ixml}/ixml.inp (100%) rename tests/{steven/tests-SP-MSM => ixml}/ixml.ixml (100%) rename tests/{steven/tests-SP-MSM => ixml}/ixml.output.xml (100%) rename tests/{steven/tests-SP-MSM => ixml}/ixml1.inp (100%) rename tests/{steven/tests-SP-MSM => ixml}/ixml1.ixml (100%) rename tests/{steven/tests-SP-MSM => ixml}/ixml1.output.xml (100%) rename tests/{steven/tests-SP-MSM => ixml}/ixml2.inp (100%) rename tests/{steven/tests-SP-MSM => ixml}/ixml2.ixml (100%) rename tests/{steven/tests-SP-MSM => ixml}/ixml3.inp (100%) rename tests/{steven/tests-SP-MSM => ixml}/ixml3.ixml (100%) rename tests/{steven/tests-SP-MSM => ixml}/ixml3.output.xml (100%) create mode 100644 tests/ixml/test-catalog.xml rename tests/{steven/tests-SP-MSM => parse}/parse-error.inp (100%) rename tests/{steven/tests-SP-MSM => parse}/parse-error.ixml (100%) create mode 100644 tests/parse/test-catalog.xml rename tests/{steven/tests-SP-MSM => parse}/url.inp (100%) rename tests/{steven/tests-SP-MSM => parse}/url.ixml (100%) rename tests/{steven/tests-SP-MSM => parse}/url1.inp (100%) rename tests/{steven/tests-SP-MSM => parse}/url1.ixml (100%) create mode 100644 tests/reference/ixml.ixml create mode 100644 tests/reference/ixml.xml delete mode 100644 tests/steven/SP-syntaxtests-package.zip delete mode 100644 tests/steven/ambiguous/readme.md delete mode 100644 tests/steven/catalog.xml delete mode 100644 tests/steven/readme.md delete mode 100644 tests/steven/syntaxtests.zip delete mode 100644 tests/steven/tests-SP-MSM/README.md delete mode 100644 tests/steven/tests.zip create mode 100644 tests/syntax/catalog-as-grammar-tests.xml create mode 100644 tests/syntax/catalog-as-instance-tests-ixml.xml create mode 100644 tests/syntax/catalog-as-instance-tests-xml.xml create mode 100644 tests/syntax/class-range.ixml create mode 100644 tests/syntax/defn1.ixml create mode 100644 tests/syntax/defn10.ixml create mode 100644 tests/syntax/defn11.ixml create mode 100644 tests/syntax/defn2.ixml create mode 100644 tests/syntax/defn3.ixml create mode 100644 tests/syntax/defn4.ixml create mode 100644 tests/syntax/defn5.ixml create mode 100644 tests/syntax/defn6.ixml create mode 100644 tests/syntax/defn8.ixml create mode 100644 tests/syntax/defn9.ixml create mode 100644 tests/syntax/elem1.ixml create mode 100644 tests/syntax/elem2.ixml create mode 100644 tests/syntax/elem3.ixml create mode 100644 tests/syntax/elem4.ixml create mode 100644 tests/syntax/elem5.ixml create mode 100644 tests/syntax/elem6.ixml create mode 100644 tests/syntax/elem7.ixml create mode 100644 tests/syntax/empty-string.ixml create mode 100644 tests/syntax/expr10.ixml create mode 100644 tests/syntax/hex2.ixml create mode 100644 tests/syntax/illegal-class.ixml create mode 100644 tests/syntax/name-with-spaces.ixml create mode 100644 tests/syntax/rule.ixml create mode 100644 tests/syntax/rule1.ixml create mode 100644 tests/syntax/rule10.ixml create mode 100644 tests/syntax/rule2.ixml create mode 100644 tests/syntax/rule3.ixml create mode 100644 tests/syntax/rule4.ixml create mode 100644 tests/syntax/rule5.ixml create mode 100644 tests/syntax/rule6.ixml create mode 100644 tests/syntax/rule7.ixml create mode 100644 tests/syntax/rule8.ixml create mode 100644 tests/syntax/rule9.ixml create mode 100644 tests/syntax/unterminated-comment.ixml create mode 100644 tests/syntax/unterminated-comment1.ixml create mode 100644 tests/syntax/unterminated-comment2.ixml create mode 100644 tests/syntax/unused-rule.ixml create mode 100644 tests/syntax/unused-rules.ixml create mode 100644 tests/test-catalog.xml create mode 100644 tests/tests/ambiguous/ambig.inp create mode 100644 tests/tests/ambiguous/ambig.ixml create mode 100644 tests/tests/ambiguous/ambig.req create mode 100644 tests/tests/ambiguous/ambig2.inp create mode 100644 tests/tests/ambiguous/ambig2.ixml create mode 100644 tests/tests/ambiguous/ambig2.req create mode 100644 tests/tests/ambiguous/ambig2a.inp create mode 100644 tests/tests/ambiguous/ambig2a.ixml create mode 100644 tests/tests/ambiguous/ambig2a.req create mode 100644 tests/tests/ambiguous/ambig3.inp create mode 100644 tests/tests/ambiguous/ambig3.ixml create mode 100644 tests/tests/ambiguous/ambig3.req create mode 100644 tests/tests/ambiguous/ambig4.inp create mode 100644 tests/tests/ambiguous/ambig4.ixml create mode 100644 tests/tests/ambiguous/ambig4.req create mode 100644 tests/tests/ambiguous/ambig5.inp create mode 100644 tests/tests/ambiguous/ambig5.ixml create mode 100644 tests/tests/ambiguous/ambig5.req create mode 100644 tests/tests/ambiguous/ambig6.inp create mode 100644 tests/tests/ambiguous/ambig6.ixml create mode 100644 tests/tests/ambiguous/ambig6.req create mode 100644 tests/tests/ambiguous/ambig7.inp create mode 100644 tests/tests/ambiguous/ambig7.ixml create mode 100644 tests/tests/ambiguous/ambig7.req create mode 100644 tests/tests/ambiguous/css.inp create mode 100644 tests/tests/ambiguous/css.ixml create mode 100644 tests/tests/ambiguous/css.req create mode 100644 tests/tests/ambiguous/date.inp create mode 100644 tests/tests/ambiguous/date.ixml create mode 100644 tests/tests/ambiguous/date.req create mode 100644 tests/tests/ambiguous/empty-parens.inp create mode 100644 tests/tests/ambiguous/empty-parens.ixml create mode 100644 tests/tests/ambiguous/empty-parens.req create mode 100644 tests/tests/ambiguous/expr0.inp create mode 100644 tests/tests/ambiguous/expr0.ixml create mode 100644 tests/tests/ambiguous/expr0.req create mode 100644 tests/tests/ambiguous/lf2.inp create mode 100644 tests/tests/ambiguous/lf2.ixml create mode 100644 tests/tests/ambiguous/lf2.req create mode 100644 tests/tests/correct/a.ixml-fail create mode 100644 tests/tests/correct/address.inp create mode 100644 tests/tests/correct/address.ixml create mode 100644 tests/tests/correct/address.req create mode 100644 tests/tests/correct/arith.inp create mode 100644 tests/tests/correct/arith.ixml create mode 100644 tests/tests/correct/arith.req create mode 100644 tests/tests/correct/attribute-value.inp create mode 100644 tests/tests/correct/attribute-value.ixml create mode 100644 tests/tests/correct/attribute-value.req create mode 100644 tests/tests/correct/diary.inp create mode 100644 tests/tests/correct/diary.ixml create mode 100644 tests/tests/correct/diary.req create mode 100644 tests/tests/correct/diary2.inp create mode 100644 tests/tests/correct/diary2.ixml create mode 100644 tests/tests/correct/diary2.req create mode 100644 tests/tests/correct/diary3.inp create mode 100644 tests/tests/correct/diary3.ixml create mode 100644 tests/tests/correct/diary3.req create mode 100644 tests/tests/correct/element-content.inp create mode 100644 tests/tests/correct/element-content.ixml create mode 100644 tests/tests/correct/element-content.req create mode 100644 tests/tests/correct/email.inp create mode 100644 tests/tests/correct/email.ixml create mode 100644 tests/tests/correct/email.req create mode 100644 tests/tests/correct/empty-group.inp create mode 100644 tests/tests/correct/empty-group.ixml create mode 100644 tests/tests/correct/empty-group.req create mode 100644 tests/tests/correct/expr.inp create mode 100644 tests/tests/correct/expr.ixml create mode 100644 tests/tests/correct/expr.req create mode 100644 tests/tests/correct/expr1.inp create mode 100644 tests/tests/correct/expr1.ixml create mode 100644 tests/tests/correct/expr1.req create mode 100644 tests/tests/correct/expr2.inp create mode 100644 tests/tests/correct/expr2.ixml create mode 100644 tests/tests/correct/expr2.req create mode 100644 tests/tests/correct/expr3.inp create mode 100644 tests/tests/correct/expr3.ixml create mode 100644 tests/tests/correct/expr3.req create mode 100644 tests/tests/correct/expr4.inp create mode 100644 tests/tests/correct/expr4.ixml create mode 100644 tests/tests/correct/expr4.req create mode 100644 tests/tests/correct/expr5.inp create mode 100644 tests/tests/correct/expr5.ixml create mode 100644 tests/tests/correct/expr5.req create mode 100644 tests/tests/correct/expr6.inp create mode 100644 tests/tests/correct/expr6.ixml create mode 100644 tests/tests/correct/expr6.req create mode 100644 tests/tests/correct/hash.inp create mode 100644 tests/tests/correct/hash.ixml create mode 100644 tests/tests/correct/hash.req create mode 100644 tests/tests/correct/hex.inp create mode 100644 tests/tests/correct/hex.ixml create mode 100644 tests/tests/correct/hex.req create mode 100644 tests/tests/correct/hex1.inp create mode 100644 tests/tests/correct/hex1.ixml create mode 100644 tests/tests/correct/hex1.req create mode 100644 tests/tests/correct/hex3.inp create mode 100644 tests/tests/correct/hex3.ixml create mode 100644 tests/tests/correct/hex3.req create mode 100644 tests/tests/correct/json.inp create mode 100644 tests/tests/correct/json.ixml create mode 100644 tests/tests/correct/json.req create mode 100644 tests/tests/correct/json1.inp create mode 100644 tests/tests/correct/json1.ixml create mode 100644 tests/tests/correct/json1.req create mode 100644 tests/tests/correct/lf.inp create mode 100644 tests/tests/correct/lf.ixml create mode 100644 tests/tests/correct/lf.req create mode 100644 tests/tests/correct/lf.res create mode 100644 tests/tests/correct/lf1.inp create mode 100644 tests/tests/correct/lf1.ixml create mode 100644 tests/tests/correct/lf1.req create mode 100644 tests/tests/correct/marked.inp create mode 100644 tests/tests/correct/marked.ixml create mode 100644 tests/tests/correct/marked.req create mode 100644 tests/tests/correct/nested-comment.inp create mode 100644 tests/tests/correct/nested-comment.ixml create mode 100644 tests/tests/correct/nested-comment.req create mode 100644 tests/tests/correct/para-test.inp create mode 100644 tests/tests/correct/para-test.ixml create mode 100644 tests/tests/correct/para-test.req create mode 100644 tests/tests/correct/para-test.res create mode 100644 tests/tests/correct/poly.inp create mode 100644 tests/tests/correct/poly.ixml create mode 100644 tests/tests/correct/poly.req create mode 100644 tests/tests/correct/program.inp create mode 100644 tests/tests/correct/program.ixml create mode 100644 tests/tests/correct/program.req create mode 100644 tests/tests/correct/range-comments.inp create mode 100644 tests/tests/correct/range-comments.ixml create mode 100644 tests/tests/correct/range-comments.req create mode 100644 tests/tests/correct/range.inp create mode 100644 tests/tests/correct/range.ixml create mode 100644 tests/tests/correct/range.req create mode 100644 tests/tests/correct/ranges.inp create mode 100644 tests/tests/correct/ranges.ixml create mode 100644 tests/tests/correct/ranges.req create mode 100644 tests/tests/correct/ranges1.inp create mode 100644 tests/tests/correct/ranges1.ixml create mode 100644 tests/tests/correct/ranges1.req create mode 100644 tests/tests/correct/string.inp create mode 100644 tests/tests/correct/string.ixml create mode 100644 tests/tests/correct/string.req create mode 100644 tests/tests/correct/tab.inp create mode 100644 tests/tests/correct/tab.ixml create mode 100644 tests/tests/correct/tab.req create mode 100644 tests/tests/correct/test.inp create mode 100644 tests/tests/correct/test.ixml create mode 100644 tests/tests/correct/test.req create mode 100644 tests/tests/correct/unicode-range.inp create mode 100644 tests/tests/correct/unicode-range.ixml create mode 100644 tests/tests/correct/unicode-range.req create mode 100644 tests/tests/correct/unicode-range.res create mode 100644 tests/tests/correct/unicode-range1.inp create mode 100644 tests/tests/correct/unicode-range1.ixml create mode 100644 tests/tests/correct/unicode-range1.req create mode 100644 tests/tests/correct/unicode-range1.res create mode 100644 tests/tests/correct/unicode-range2.inp create mode 100644 tests/tests/correct/unicode-range2.ixml create mode 100644 tests/tests/correct/unicode-range2.req create mode 100644 tests/tests/correct/vcard.inp create mode 100644 tests/tests/correct/vcard.ixml create mode 100644 tests/tests/correct/vcard.req create mode 100644 tests/tests/correct/xml.inp create mode 100644 tests/tests/correct/xml.ixml create mode 100644 tests/tests/correct/xml.req create mode 100644 tests/tests/correct/xml1.inp create mode 100644 tests/tests/correct/xml1.ixml create mode 100644 tests/tests/correct/xml1.req create mode 100644 tests/tests/correct/xpath.inp create mode 100644 tests/tests/correct/xpath.ixml create mode 100644 tests/tests/correct/xpath.req create mode 100644 tests/tests/ixml/bnf.inp create mode 100644 tests/tests/ixml/bnf.ixml create mode 100644 tests/tests/ixml/bnf.req create mode 100644 tests/tests/ixml/ixml-comments.inp create mode 100644 tests/tests/ixml/ixml-comments.ixml create mode 100644 tests/tests/ixml/ixml-comments.out create mode 100644 tests/tests/ixml/ixml-comments.req create mode 100644 tests/tests/ixml/ixml-comments.res create mode 100644 tests/tests/ixml/ixml-no-spaces.inp create mode 100644 tests/tests/ixml/ixml-no-spaces.ixml create mode 100644 tests/tests/ixml/ixml-no-spaces.req create mode 100644 tests/tests/ixml/ixml-one-line.inp create mode 100644 tests/tests/ixml/ixml-one-line.ixml create mode 100644 tests/tests/ixml/ixml-one-line.req create mode 100644 tests/tests/ixml/ixml-one-line.res create mode 100644 tests/tests/ixml/ixml-spaces.inp create mode 100644 tests/tests/ixml/ixml-spaces.ixml create mode 100644 tests/tests/ixml/ixml-spaces.req create mode 100644 tests/tests/ixml/ixml.inp create mode 100644 tests/tests/ixml/ixml.ixml create mode 100644 tests/tests/ixml/ixml.req create mode 100644 tests/tests/ixml/ixml1.inp create mode 100644 tests/tests/ixml/ixml1.ixml create mode 100644 tests/tests/ixml/ixml1.req create mode 100644 tests/tests/ixml/ixml2.inp create mode 100644 tests/tests/ixml/ixml2.ixml create mode 100644 tests/tests/ixml/ixml2.req create mode 100644 tests/tests/ixml/ixml3.inp create mode 100644 tests/tests/ixml/ixml3.ixml create mode 100644 tests/tests/ixml/ixml3.req create mode 100644 tests/tests/parse/elem1.inp create mode 100644 tests/tests/parse/elem1.ixml create mode 100644 tests/tests/parse/elem1.req create mode 100644 tests/tests/parse/parse-error.inp create mode 100644 tests/tests/parse/parse-error.ixml create mode 100644 tests/tests/parse/parse-error.req create mode 100644 tests/tests/parse/url.inp create mode 100644 tests/tests/parse/url.ixml create mode 100644 tests/tests/parse/url.req create mode 100644 tests/tests/parse/url1.inp create mode 100644 tests/tests/parse/url1.ixml create mode 100644 tests/tests/parse/url1.req create mode 100644 tests/tests/semantic/unused-rule.inp create mode 100644 tests/tests/semantic/unused-rule.ixml create mode 100644 tests/tests/semantic/unused-rule.req create mode 100644 tests/tests/semantic/unused-rules.inp create mode 100644 tests/tests/semantic/unused-rules.ixml create mode 100644 tests/tests/semantic/unused-rules.req create mode 100644 tests/tests/syntax/MISSING.inp create mode 100644 tests/tests/syntax/class-range.inp create mode 100644 tests/tests/syntax/class-range.ixml create mode 100644 tests/tests/syntax/class-range.req create mode 100644 tests/tests/syntax/defn1.inp create mode 100644 tests/tests/syntax/defn1.ixml create mode 100644 tests/tests/syntax/defn1.req create mode 100644 tests/tests/syntax/defn10.inp create mode 100644 tests/tests/syntax/defn10.ixml create mode 100644 tests/tests/syntax/defn10.req create mode 100644 tests/tests/syntax/defn11.inp create mode 100644 tests/tests/syntax/defn11.ixml create mode 100644 tests/tests/syntax/defn11.req create mode 100644 tests/tests/syntax/defn2.inp create mode 100644 tests/tests/syntax/defn2.ixml create mode 100644 tests/tests/syntax/defn2.req create mode 100644 tests/tests/syntax/defn3.inp create mode 100644 tests/tests/syntax/defn3.ixml create mode 100644 tests/tests/syntax/defn3.req create mode 100644 tests/tests/syntax/defn3.rq create mode 100644 tests/tests/syntax/defn4.inp create mode 100644 tests/tests/syntax/defn4.ixml create mode 100644 tests/tests/syntax/defn4.req create mode 100644 tests/tests/syntax/defn5.inp create mode 100644 tests/tests/syntax/defn5.ixml create mode 100644 tests/tests/syntax/defn5.req create mode 100644 tests/tests/syntax/defn6.inp create mode 100644 tests/tests/syntax/defn6.ixml create mode 100644 tests/tests/syntax/defn6.req create mode 100644 tests/tests/syntax/defn8.inp create mode 100644 tests/tests/syntax/defn8.ixml create mode 100644 tests/tests/syntax/defn8.req create mode 100644 tests/tests/syntax/defn9.inp create mode 100644 tests/tests/syntax/defn9.ixml create mode 100644 tests/tests/syntax/defn9.req create mode 100644 tests/tests/syntax/elem2.inp create mode 100644 tests/tests/syntax/elem2.ixml create mode 100644 tests/tests/syntax/elem2.req create mode 100644 tests/tests/syntax/elem3.inp create mode 100644 tests/tests/syntax/elem3.ixml create mode 100644 tests/tests/syntax/elem3.req create mode 100644 tests/tests/syntax/elem4.inp create mode 100644 tests/tests/syntax/elem4.ixml create mode 100644 tests/tests/syntax/elem4.req create mode 100644 tests/tests/syntax/elem5.inp create mode 100644 tests/tests/syntax/elem5.ixml create mode 100644 tests/tests/syntax/elem5.req create mode 100644 tests/tests/syntax/elem6.inp create mode 100644 tests/tests/syntax/elem6.ixml create mode 100644 tests/tests/syntax/elem6.req create mode 100644 tests/tests/syntax/elem7.inp create mode 100644 tests/tests/syntax/elem7.ixml create mode 100644 tests/tests/syntax/elem7.req create mode 100644 tests/tests/syntax/empty-string.inp create mode 100644 tests/tests/syntax/empty-string.ixml create mode 100644 tests/tests/syntax/empty-string.req create mode 100644 tests/tests/syntax/expr10.inp create mode 100644 tests/tests/syntax/expr10.ixml create mode 100644 tests/tests/syntax/expr10.req create mode 100644 tests/tests/syntax/hex2.inp create mode 100644 tests/tests/syntax/hex2.ixml create mode 100644 tests/tests/syntax/hex2.req create mode 100644 tests/tests/syntax/illegal-class.inp create mode 100644 tests/tests/syntax/illegal-class.ixml create mode 100644 tests/tests/syntax/illegal-class.req create mode 100644 tests/tests/syntax/name-with-spaces.inp create mode 100644 tests/tests/syntax/name-with-spaces.ixml create mode 100644 tests/tests/syntax/name-with-spaces.req create mode 100644 tests/tests/syntax/rule.inp create mode 100644 tests/tests/syntax/rule.ixml create mode 100644 tests/tests/syntax/rule.req create mode 100644 tests/tests/syntax/rule1.inp create mode 100644 tests/tests/syntax/rule1.ixml create mode 100644 tests/tests/syntax/rule1.req create mode 100644 tests/tests/syntax/rule10.inp create mode 100644 tests/tests/syntax/rule10.ixml create mode 100644 tests/tests/syntax/rule10.req create mode 100644 tests/tests/syntax/rule2.inp create mode 100644 tests/tests/syntax/rule2.ixml create mode 100644 tests/tests/syntax/rule2.req create mode 100644 tests/tests/syntax/rule3.inp create mode 100644 tests/tests/syntax/rule3.ixml create mode 100644 tests/tests/syntax/rule3.req create mode 100644 tests/tests/syntax/rule4.inp create mode 100644 tests/tests/syntax/rule4.ixml create mode 100644 tests/tests/syntax/rule4.req create mode 100644 tests/tests/syntax/rule5.inp create mode 100644 tests/tests/syntax/rule5.ixml create mode 100644 tests/tests/syntax/rule5.req create mode 100644 tests/tests/syntax/rule6.inp create mode 100644 tests/tests/syntax/rule6.ixml create mode 100644 tests/tests/syntax/rule6.req create mode 100644 tests/tests/syntax/rule7.inp create mode 100644 tests/tests/syntax/rule7.ixml create mode 100644 tests/tests/syntax/rule7.req create mode 100644 tests/tests/syntax/rule8.inp create mode 100644 tests/tests/syntax/rule8.ixml create mode 100644 tests/tests/syntax/rule8.req create mode 100644 tests/tests/syntax/rule9.inp create mode 100644 tests/tests/syntax/rule9.ixml create mode 100644 tests/tests/syntax/rule9.req create mode 100644 tests/tests/syntax/unterminated-comment.inp create mode 100644 tests/tests/syntax/unterminated-comment.ixml create mode 100644 tests/tests/syntax/unterminated-comment.req create mode 100644 tests/tests/syntax/unterminated-comment1.inp create mode 100644 tests/tests/syntax/unterminated-comment1.ixml create mode 100644 tests/tests/syntax/unterminated-comment1.req create mode 100644 tests/tests/syntax/unterminated-comment2.inp create mode 100644 tests/tests/syntax/unterminated-comment2.ixml create mode 100644 tests/tests/syntax/unterminated-comment2.req create mode 100644 tests/tools/href-check.xsl diff --git a/tests/steven/tests-SP-MSM/ambig.alt.output.xml b/tests/ambiguous/ambig.alt.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/ambig.alt.output.xml rename to tests/ambiguous/ambig.alt.output.xml diff --git a/tests/steven/tests-SP-MSM/ambig.inp b/tests/ambiguous/ambig.inp similarity index 100% rename from tests/steven/tests-SP-MSM/ambig.inp rename to tests/ambiguous/ambig.inp diff --git a/tests/steven/tests-SP-MSM/ambig.ixml b/tests/ambiguous/ambig.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/ambig.ixml rename to tests/ambiguous/ambig.ixml diff --git a/tests/steven/tests-SP-MSM/ambig.output.xml b/tests/ambiguous/ambig.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/ambig.output.xml rename to tests/ambiguous/ambig.output.xml diff --git a/tests/steven/tests-SP-MSM/ambig2.alt.output.xml b/tests/ambiguous/ambig2.alt.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/ambig2.alt.output.xml rename to tests/ambiguous/ambig2.alt.output.xml diff --git a/tests/steven/tests-SP-MSM/ambig2.inp b/tests/ambiguous/ambig2.inp similarity index 100% rename from tests/steven/tests-SP-MSM/ambig2.inp rename to tests/ambiguous/ambig2.inp diff --git a/tests/steven/tests-SP-MSM/ambig2.ixml b/tests/ambiguous/ambig2.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/ambig2.ixml rename to tests/ambiguous/ambig2.ixml diff --git a/tests/steven/tests-SP-MSM/ambig2.output.xml b/tests/ambiguous/ambig2.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/ambig2.output.xml rename to tests/ambiguous/ambig2.output.xml diff --git a/tests/steven/tests-SP-MSM/ambig3.alt-2.output.xml b/tests/ambiguous/ambig3.alt-2.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/ambig3.alt-2.output.xml rename to tests/ambiguous/ambig3.alt-2.output.xml diff --git a/tests/steven/tests-SP-MSM/ambig3.alt-3.output.xml b/tests/ambiguous/ambig3.alt-3.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/ambig3.alt-3.output.xml rename to tests/ambiguous/ambig3.alt-3.output.xml diff --git a/tests/steven/tests-SP-MSM/ambig3.alt.output.xml b/tests/ambiguous/ambig3.alt.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/ambig3.alt.output.xml rename to tests/ambiguous/ambig3.alt.output.xml diff --git a/tests/steven/tests-SP-MSM/ambig3.inp b/tests/ambiguous/ambig3.inp similarity index 100% rename from tests/steven/tests-SP-MSM/ambig3.inp rename to tests/ambiguous/ambig3.inp diff --git a/tests/steven/tests-SP-MSM/ambig3.ixml b/tests/ambiguous/ambig3.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/ambig3.ixml rename to tests/ambiguous/ambig3.ixml diff --git a/tests/steven/tests-SP-MSM/ambig3.output.xml b/tests/ambiguous/ambig3.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/ambig3.output.xml rename to tests/ambiguous/ambig3.output.xml diff --git a/tests/steven/tests-SP-MSM/ambig4.alt.output.xml b/tests/ambiguous/ambig4.alt.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/ambig4.alt.output.xml rename to tests/ambiguous/ambig4.alt.output.xml diff --git a/tests/steven/tests-SP-MSM/ambig4.inp b/tests/ambiguous/ambig4.inp similarity index 100% rename from tests/steven/tests-SP-MSM/ambig4.inp rename to tests/ambiguous/ambig4.inp diff --git a/tests/steven/tests-SP-MSM/ambig4.ixml b/tests/ambiguous/ambig4.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/ambig4.ixml rename to tests/ambiguous/ambig4.ixml diff --git a/tests/steven/tests-SP-MSM/ambig4.output.xml b/tests/ambiguous/ambig4.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/ambig4.output.xml rename to tests/ambiguous/ambig4.output.xml diff --git a/tests/steven/tests-SP-MSM/ambig5.alt.output.xml b/tests/ambiguous/ambig5.alt.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/ambig5.alt.output.xml rename to tests/ambiguous/ambig5.alt.output.xml diff --git a/tests/steven/tests-SP-MSM/ambig5.inp b/tests/ambiguous/ambig5.inp similarity index 100% rename from tests/steven/tests-SP-MSM/ambig5.inp rename to tests/ambiguous/ambig5.inp diff --git a/tests/steven/tests-SP-MSM/ambig5.ixml b/tests/ambiguous/ambig5.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/ambig5.ixml rename to tests/ambiguous/ambig5.ixml diff --git a/tests/steven/tests-SP-MSM/ambig5.output.xml b/tests/ambiguous/ambig5.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/ambig5.output.xml rename to tests/ambiguous/ambig5.output.xml diff --git a/tests/steven/tests-SP-MSM/ambig6.alt.output.xml b/tests/ambiguous/ambig6.alt.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/ambig6.alt.output.xml rename to tests/ambiguous/ambig6.alt.output.xml diff --git a/tests/steven/tests-SP-MSM/ambig6.inp b/tests/ambiguous/ambig6.inp similarity index 100% rename from tests/steven/tests-SP-MSM/ambig6.inp rename to tests/ambiguous/ambig6.inp diff --git a/tests/steven/tests-SP-MSM/ambig6.ixml b/tests/ambiguous/ambig6.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/ambig6.ixml rename to tests/ambiguous/ambig6.ixml diff --git a/tests/steven/tests-SP-MSM/ambig6.output.xml b/tests/ambiguous/ambig6.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/ambig6.output.xml rename to tests/ambiguous/ambig6.output.xml diff --git a/tests/steven/tests-SP-MSM/ambig7.alt.output.xml b/tests/ambiguous/ambig7.alt.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/ambig7.alt.output.xml rename to tests/ambiguous/ambig7.alt.output.xml diff --git a/tests/steven/tests-SP-MSM/ambig7.inp b/tests/ambiguous/ambig7.inp similarity index 100% rename from tests/steven/tests-SP-MSM/ambig7.inp rename to tests/ambiguous/ambig7.inp diff --git a/tests/steven/tests-SP-MSM/ambig7.ixml b/tests/ambiguous/ambig7.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/ambig7.ixml rename to tests/ambiguous/ambig7.ixml diff --git a/tests/steven/tests-SP-MSM/ambig7.output.xml b/tests/ambiguous/ambig7.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/ambig7.output.xml rename to tests/ambiguous/ambig7.output.xml diff --git a/tests/steven/tests-SP-MSM/css.alt.output.xml b/tests/ambiguous/css.alt.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/css.alt.output.xml rename to tests/ambiguous/css.alt.output.xml diff --git a/tests/steven/tests-SP-MSM/css.inp b/tests/ambiguous/css.inp similarity index 100% rename from tests/steven/tests-SP-MSM/css.inp rename to tests/ambiguous/css.inp diff --git a/tests/steven/tests-SP-MSM/css.ixml b/tests/ambiguous/css.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/css.ixml rename to tests/ambiguous/css.ixml diff --git a/tests/steven/tests-SP-MSM/css.output.xml b/tests/ambiguous/css.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/css.output.xml rename to tests/ambiguous/css.output.xml diff --git a/tests/steven/tests-SP-MSM/date.inp b/tests/ambiguous/date.inp similarity index 100% rename from tests/steven/tests-SP-MSM/date.inp rename to tests/ambiguous/date.inp diff --git a/tests/steven/tests-SP-MSM/date.ixml b/tests/ambiguous/date.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/date.ixml rename to tests/ambiguous/date.ixml diff --git a/tests/steven/tests-SP-MSM/date.output.xml b/tests/ambiguous/date.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/date.output.xml rename to tests/ambiguous/date.output.xml diff --git a/tests/steven/tests-SP-MSM/empty-parens.inp b/tests/ambiguous/empty-parens.inp similarity index 100% rename from tests/steven/tests-SP-MSM/empty-parens.inp rename to tests/ambiguous/empty-parens.inp diff --git a/tests/steven/tests-SP-MSM/empty-parens.ixml b/tests/ambiguous/empty-parens.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/empty-parens.ixml rename to tests/ambiguous/empty-parens.ixml diff --git a/tests/steven/tests-SP-MSM/empty-parens.output.xml b/tests/ambiguous/empty-parens.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/empty-parens.output.xml rename to tests/ambiguous/empty-parens.output.xml diff --git a/tests/steven/tests-SP-MSM/expr0.alt.output.xml b/tests/ambiguous/expr0.alt.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/expr0.alt.output.xml rename to tests/ambiguous/expr0.alt.output.xml diff --git a/tests/steven/tests-SP-MSM/expr0.inp b/tests/ambiguous/expr0.inp similarity index 100% rename from tests/steven/tests-SP-MSM/expr0.inp rename to tests/ambiguous/expr0.inp diff --git a/tests/steven/tests-SP-MSM/expr0.ixml b/tests/ambiguous/expr0.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/expr0.ixml rename to tests/ambiguous/expr0.ixml diff --git a/tests/steven/tests-SP-MSM/expr0.output.xml b/tests/ambiguous/expr0.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/expr0.output.xml rename to tests/ambiguous/expr0.output.xml diff --git a/tests/ambiguous/lf2.inp b/tests/ambiguous/lf2.inp new file mode 100644 index 00000000..984acbd1 --- /dev/null +++ b/tests/ambiguous/lf2.inp @@ -0,0 +1,3 @@ +Now is the time +For all good people +To have fun. diff --git a/tests/ambiguous/lf2.ixml b/tests/ambiguous/lf2.ixml new file mode 100644 index 00000000..ed08b3ae --- /dev/null +++ b/tests/ambiguous/lf2.ixml @@ -0,0 +1,3 @@ +input: line+lf, lf?. +line: ~[#a]*. +lf: -#a. diff --git a/tests/ambiguous/lf2.output.xml b/tests/ambiguous/lf2.output.xml new file mode 100644 index 00000000..2859893d --- /dev/null +++ b/tests/ambiguous/lf2.output.xml @@ -0,0 +1,13 @@ + + + Now is the time + + For all good people + + To have fun. + + diff --git a/tests/ambiguous/test-catalog.xml b/tests/ambiguous/test-catalog.xml new file mode 100644 index 00000000..c74edcad --- /dev/null +++ b/tests/ambiguous/test-catalog.xml @@ -0,0 +1,264 @@ + + + +

Tests provided by Steven Pemberton in December 2021, + with corrections of 21 December. Reorganized by Norm Tovey-Walsh, February 2022.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +

The grammar is a: "a"* ; "b"*. + and the input is the empty string.

+

If the grammar is rewritten to BNF, it + will clearly have two parse trees against + the BNF grammar, but it does not have + two parse trees against the EBNF grammar.

+

So MSM has added an alternative result + which does not mark the + result ambiguous.

+

What the spec should say will require + careful discussion.

+
+ + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

The grammar is a: b, ()?, c. b: "b". c: "c". + and the input is bc.

+

As with ambig2, this is or is not ambiguous depending on + exactly how we define ambiguity. The parse may interpret + the middle term as present or as absent, so there are two + derivations, or may be depending on how we define + 'derivation'. There is only one parse tree for the EBNF + grammar.

+

So MSM has specified two alternative results + which differ only in including or excluding + the ambiguity flag.

+

What the spec should say will require + careful discussion.

+
+ + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + change="Converted it into the catalog format"/> + + + + + + + + +
diff --git a/tests/steven/tests-SP-MSM/address.inp b/tests/correct/address.inp similarity index 100% rename from tests/steven/tests-SP-MSM/address.inp rename to tests/correct/address.inp diff --git a/tests/steven/tests-SP-MSM/address.ixml b/tests/correct/address.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/address.ixml rename to tests/correct/address.ixml diff --git a/tests/steven/tests-SP-MSM/address.output.xml b/tests/correct/address.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/address.output.xml rename to tests/correct/address.output.xml diff --git a/tests/steven/tests-SP-MSM/arith.inp b/tests/correct/arith.inp similarity index 100% rename from tests/steven/tests-SP-MSM/arith.inp rename to tests/correct/arith.inp diff --git a/tests/steven/tests-SP-MSM/arith.ixml b/tests/correct/arith.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/arith.ixml rename to tests/correct/arith.ixml diff --git a/tests/steven/tests-SP-MSM/arith.output.xml b/tests/correct/arith.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/arith.output.xml rename to tests/correct/arith.output.xml diff --git a/tests/steven/tests-SP-MSM/attribute-value.inp b/tests/correct/attribute-value.inp similarity index 100% rename from tests/steven/tests-SP-MSM/attribute-value.inp rename to tests/correct/attribute-value.inp diff --git a/tests/steven/tests-SP-MSM/attribute-value.ixml b/tests/correct/attribute-value.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/attribute-value.ixml rename to tests/correct/attribute-value.ixml diff --git a/tests/steven/tests-SP-MSM/attribute-value.output.xml b/tests/correct/attribute-value.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/attribute-value.output.xml rename to tests/correct/attribute-value.output.xml diff --git a/tests/steven/tests-SP-MSM/diary.inp b/tests/correct/diary.inp similarity index 100% rename from tests/steven/tests-SP-MSM/diary.inp rename to tests/correct/diary.inp diff --git a/tests/steven/tests-SP-MSM/diary.ixml b/tests/correct/diary.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/diary.ixml rename to tests/correct/diary.ixml diff --git a/tests/steven/tests-SP-MSM/diary.output.xml b/tests/correct/diary.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/diary.output.xml rename to tests/correct/diary.output.xml diff --git a/tests/steven/tests-SP-MSM/diary2.inp b/tests/correct/diary2.inp similarity index 100% rename from tests/steven/tests-SP-MSM/diary2.inp rename to tests/correct/diary2.inp diff --git a/tests/steven/tests-SP-MSM/diary2.ixml b/tests/correct/diary2.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/diary2.ixml rename to tests/correct/diary2.ixml diff --git a/tests/steven/tests-SP-MSM/diary2.output.xml b/tests/correct/diary2.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/diary2.output.xml rename to tests/correct/diary2.output.xml diff --git a/tests/steven/tests-SP-MSM/diary3.inp b/tests/correct/diary3.inp similarity index 100% rename from tests/steven/tests-SP-MSM/diary3.inp rename to tests/correct/diary3.inp diff --git a/tests/steven/tests-SP-MSM/diary3.ixml b/tests/correct/diary3.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/diary3.ixml rename to tests/correct/diary3.ixml diff --git a/tests/steven/tests-SP-MSM/diary3.output.xml b/tests/correct/diary3.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/diary3.output.xml rename to tests/correct/diary3.output.xml diff --git a/tests/correct/element-content.inp b/tests/correct/element-content.inp new file mode 100644 index 00000000..fda91d52 --- /dev/null +++ b/tests/correct/element-content.inp @@ -0,0 +1 @@ +"'<>/&. diff --git a/tests/correct/element-content.ixml b/tests/correct/element-content.ixml new file mode 100644 index 00000000..5b0fa6c1 --- /dev/null +++ b/tests/correct/element-content.ixml @@ -0,0 +1,2 @@ +content: -a, -".". +a: ~["."]*. diff --git a/tests/correct/element-content.output.xml b/tests/correct/element-content.output.xml new file mode 100644 index 00000000..bb02c891 --- /dev/null +++ b/tests/correct/element-content.output.xml @@ -0,0 +1 @@ +"'<>/& diff --git a/tests/steven/tests-SP-MSM/email.inp b/tests/correct/email.inp similarity index 100% rename from tests/steven/tests-SP-MSM/email.inp rename to tests/correct/email.inp diff --git a/tests/steven/tests-SP-MSM/email.ixml b/tests/correct/email.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/email.ixml rename to tests/correct/email.ixml diff --git a/tests/steven/tests-SP-MSM/email.output.xml b/tests/correct/email.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/email.output.xml rename to tests/correct/email.output.xml diff --git a/tests/correct/empty-group.inp b/tests/correct/empty-group.inp new file mode 100644 index 00000000..e5d8f44b --- /dev/null +++ b/tests/correct/empty-group.inp @@ -0,0 +1 @@ +bc \ No newline at end of file diff --git a/tests/correct/empty-group.ixml b/tests/correct/empty-group.ixml new file mode 100644 index 00000000..76f9bd31 --- /dev/null +++ b/tests/correct/empty-group.ixml @@ -0,0 +1,3 @@ +a: b, (), c. +b: "b". +c: "c". diff --git a/tests/correct/empty-group.output.xml b/tests/correct/empty-group.output.xml new file mode 100644 index 00000000..b16a482b --- /dev/null +++ b/tests/correct/empty-group.output.xml @@ -0,0 +1,4 @@ + + b + c + diff --git a/tests/steven/tests-SP-MSM/expr.inp b/tests/correct/expr.inp similarity index 100% rename from tests/steven/tests-SP-MSM/expr.inp rename to tests/correct/expr.inp diff --git a/tests/steven/tests-SP-MSM/expr.ixml b/tests/correct/expr.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/expr.ixml rename to tests/correct/expr.ixml diff --git a/tests/steven/tests-SP-MSM/expr.output.xml b/tests/correct/expr.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/expr.output.xml rename to tests/correct/expr.output.xml diff --git a/tests/steven/tests-SP-MSM/expr1.inp b/tests/correct/expr1.inp similarity index 100% rename from tests/steven/tests-SP-MSM/expr1.inp rename to tests/correct/expr1.inp diff --git a/tests/steven/tests-SP-MSM/expr1.ixml b/tests/correct/expr1.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/expr1.ixml rename to tests/correct/expr1.ixml diff --git a/tests/steven/tests-SP-MSM/expr2.inp b/tests/correct/expr2.inp similarity index 100% rename from tests/steven/tests-SP-MSM/expr2.inp rename to tests/correct/expr2.inp diff --git a/tests/steven/tests-SP-MSM/expr2.ixml b/tests/correct/expr2.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/expr2.ixml rename to tests/correct/expr2.ixml diff --git a/tests/steven/tests-SP-MSM/expr2.output.xml b/tests/correct/expr2.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/expr2.output.xml rename to tests/correct/expr2.output.xml diff --git a/tests/steven/tests-SP-MSM/expr3.inp b/tests/correct/expr3.inp similarity index 100% rename from tests/steven/tests-SP-MSM/expr3.inp rename to tests/correct/expr3.inp diff --git a/tests/steven/tests-SP-MSM/expr3.ixml b/tests/correct/expr3.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/expr3.ixml rename to tests/correct/expr3.ixml diff --git a/tests/steven/tests-SP-MSM/expr3.output.xml b/tests/correct/expr3.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/expr3.output.xml rename to tests/correct/expr3.output.xml diff --git a/tests/steven/tests-SP-MSM/expr4.inp b/tests/correct/expr4.inp similarity index 100% rename from tests/steven/tests-SP-MSM/expr4.inp rename to tests/correct/expr4.inp diff --git a/tests/steven/tests-SP-MSM/expr4.ixml b/tests/correct/expr4.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/expr4.ixml rename to tests/correct/expr4.ixml diff --git a/tests/steven/tests-SP-MSM/expr4.output.xml b/tests/correct/expr4.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/expr4.output.xml rename to tests/correct/expr4.output.xml diff --git a/tests/steven/tests-SP-MSM/expr5.inp b/tests/correct/expr5.inp similarity index 100% rename from tests/steven/tests-SP-MSM/expr5.inp rename to tests/correct/expr5.inp diff --git a/tests/steven/tests-SP-MSM/expr5.ixml b/tests/correct/expr5.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/expr5.ixml rename to tests/correct/expr5.ixml diff --git a/tests/steven/tests-SP-MSM/expr5.output.xml b/tests/correct/expr5.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/expr5.output.xml rename to tests/correct/expr5.output.xml diff --git a/tests/steven/tests-SP-MSM/expr6.inp b/tests/correct/expr6.inp similarity index 100% rename from tests/steven/tests-SP-MSM/expr6.inp rename to tests/correct/expr6.inp diff --git a/tests/steven/tests-SP-MSM/expr6.ixml b/tests/correct/expr6.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/expr6.ixml rename to tests/correct/expr6.ixml diff --git a/tests/steven/tests-SP-MSM/expr6.output.xml b/tests/correct/expr6.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/expr6.output.xml rename to tests/correct/expr6.output.xml diff --git a/tests/steven/tests-SP-MSM/hash.inp b/tests/correct/hash.inp similarity index 100% rename from tests/steven/tests-SP-MSM/hash.inp rename to tests/correct/hash.inp diff --git a/tests/steven/tests-SP-MSM/hash.ixml b/tests/correct/hash.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/hash.ixml rename to tests/correct/hash.ixml diff --git a/tests/steven/tests-SP-MSM/hash.output.xml b/tests/correct/hash.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/hash.output.xml rename to tests/correct/hash.output.xml diff --git a/tests/steven/tests-SP-MSM/hex.inp b/tests/correct/hex.inp similarity index 100% rename from tests/steven/tests-SP-MSM/hex.inp rename to tests/correct/hex.inp diff --git a/tests/steven/tests-SP-MSM/hex.ixml b/tests/correct/hex.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/hex.ixml rename to tests/correct/hex.ixml diff --git a/tests/steven/tests-SP-MSM/hex.output.xml b/tests/correct/hex.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/hex.output.xml rename to tests/correct/hex.output.xml diff --git a/tests/steven/tests-SP-MSM/hex1.inp b/tests/correct/hex1.inp similarity index 100% rename from tests/steven/tests-SP-MSM/hex1.inp rename to tests/correct/hex1.inp diff --git a/tests/steven/tests-SP-MSM/hex1.ixml b/tests/correct/hex1.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/hex1.ixml rename to tests/correct/hex1.ixml diff --git a/tests/steven/tests-SP-MSM/hex1.output.xml b/tests/correct/hex1.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/hex1.output.xml rename to tests/correct/hex1.output.xml diff --git a/tests/steven/tests-SP-MSM/hex3.inp b/tests/correct/hex3.inp similarity index 100% rename from tests/steven/tests-SP-MSM/hex3.inp rename to tests/correct/hex3.inp diff --git a/tests/steven/tests-SP-MSM/hex3.ixml b/tests/correct/hex3.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/hex3.ixml rename to tests/correct/hex3.ixml diff --git a/tests/steven/tests-SP-MSM/hex3.output.xml b/tests/correct/hex3.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/hex3.output.xml rename to tests/correct/hex3.output.xml diff --git a/tests/steven/tests-SP-MSM/json.inp b/tests/correct/json.inp similarity index 100% rename from tests/steven/tests-SP-MSM/json.inp rename to tests/correct/json.inp diff --git a/tests/steven/tests-SP-MSM/json.ixml b/tests/correct/json.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/json.ixml rename to tests/correct/json.ixml diff --git a/tests/steven/tests-SP-MSM/json.output.xml b/tests/correct/json.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/json.output.xml rename to tests/correct/json.output.xml diff --git a/tests/steven/tests-SP-MSM/json1.inp b/tests/correct/json1.inp similarity index 100% rename from tests/steven/tests-SP-MSM/json1.inp rename to tests/correct/json1.inp diff --git a/tests/steven/tests-SP-MSM/json1.ixml b/tests/correct/json1.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/json1.ixml rename to tests/correct/json1.ixml diff --git a/tests/steven/tests-SP-MSM/json1.output.xml b/tests/correct/json1.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/json1.output.xml rename to tests/correct/json1.output.xml diff --git a/tests/steven/tests-SP-MSM/lf.inp b/tests/correct/lf.inp similarity index 100% rename from tests/steven/tests-SP-MSM/lf.inp rename to tests/correct/lf.inp diff --git a/tests/steven/tests-SP-MSM/lf.ixml b/tests/correct/lf.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/lf.ixml rename to tests/correct/lf.ixml diff --git a/tests/steven/tests-SP-MSM/lf.output.xml b/tests/correct/lf.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/lf.output.xml rename to tests/correct/lf.output.xml diff --git a/tests/steven/tests-SP-MSM/marked.inp b/tests/correct/marked.inp similarity index 100% rename from tests/steven/tests-SP-MSM/marked.inp rename to tests/correct/marked.inp diff --git a/tests/steven/tests-SP-MSM/marked.ixml b/tests/correct/marked.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/marked.ixml rename to tests/correct/marked.ixml diff --git a/tests/steven/tests-SP-MSM/marked.output.xml b/tests/correct/marked.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/marked.output.xml rename to tests/correct/marked.output.xml diff --git a/tests/steven/tests-SP-MSM/nested-comment.inp b/tests/correct/nested-comment.inp similarity index 100% rename from tests/steven/tests-SP-MSM/nested-comment.inp rename to tests/correct/nested-comment.inp diff --git a/tests/steven/tests-SP-MSM/nested-comment.ixml b/tests/correct/nested-comment.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/nested-comment.ixml rename to tests/correct/nested-comment.ixml diff --git a/tests/steven/tests-SP-MSM/nested-comment.output.xml b/tests/correct/nested-comment.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/nested-comment.output.xml rename to tests/correct/nested-comment.output.xml diff --git a/tests/steven/tests-SP-MSM/para-test.inp b/tests/correct/para-test.inp similarity index 100% rename from tests/steven/tests-SP-MSM/para-test.inp rename to tests/correct/para-test.inp diff --git a/tests/steven/tests-SP-MSM/para-test.ixml b/tests/correct/para-test.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/para-test.ixml rename to tests/correct/para-test.ixml diff --git a/tests/steven/tests-SP-MSM/poly.inp b/tests/correct/poly.inp similarity index 100% rename from tests/steven/tests-SP-MSM/poly.inp rename to tests/correct/poly.inp diff --git a/tests/steven/tests-SP-MSM/poly.ixml b/tests/correct/poly.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/poly.ixml rename to tests/correct/poly.ixml diff --git a/tests/steven/tests-SP-MSM/poly.output.xml b/tests/correct/poly.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/poly.output.xml rename to tests/correct/poly.output.xml diff --git a/tests/steven/tests-SP-MSM/program.inp b/tests/correct/program.inp similarity index 100% rename from tests/steven/tests-SP-MSM/program.inp rename to tests/correct/program.inp diff --git a/tests/steven/tests-SP-MSM/program.ixml b/tests/correct/program.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/program.ixml rename to tests/correct/program.ixml diff --git a/tests/steven/tests-SP-MSM/program.output.xml b/tests/correct/program.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/program.output.xml rename to tests/correct/program.output.xml diff --git a/tests/correct/range-comments.inp b/tests/correct/range-comments.inp new file mode 100644 index 00000000..f121bdbf --- /dev/null +++ b/tests/correct/range-comments.inp @@ -0,0 +1 @@ +name diff --git a/tests/correct/range-comments.ixml b/tests/correct/range-comments.ixml new file mode 100644 index 00000000..3ccff1e1 --- /dev/null +++ b/tests/correct/range-comments.ixml @@ -0,0 +1,2 @@ +name: letter*. +letter: [{comment}"a"{comment}-{comment}"z"{comment}]. diff --git a/tests/correct/range-comments.output.xml b/tests/correct/range-comments.output.xml new file mode 100644 index 00000000..440f69c6 --- /dev/null +++ b/tests/correct/range-comments.output.xml @@ -0,0 +1,6 @@ + + n + a + m + e + diff --git a/tests/steven/tests-SP-MSM/range.inp b/tests/correct/range.inp similarity index 100% rename from tests/steven/tests-SP-MSM/range.inp rename to tests/correct/range.inp diff --git a/tests/steven/tests-SP-MSM/range.ixml b/tests/correct/range.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/range.ixml rename to tests/correct/range.ixml diff --git a/tests/steven/tests-SP-MSM/range.output.xml b/tests/correct/range.output.xml similarity index 98% rename from tests/steven/tests-SP-MSM/range.output.xml rename to tests/correct/range.output.xml index 00634bae..21e6ca46 100644 --- a/tests/steven/tests-SP-MSM/range.output.xml +++ b/tests/correct/range.output.xml @@ -1,4 +1,3 @@ - 5 diff --git a/tests/correct/ranges.inp b/tests/correct/ranges.inp new file mode 100644 index 00000000..0ace0494 --- /dev/null +++ b/tests/correct/ranges.inp @@ -0,0 +1 @@ + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ diff --git a/tests/correct/ranges.ixml b/tests/correct/ranges.ixml new file mode 100644 index 00000000..9d61f0ce --- /dev/null +++ b/tests/correct/ranges.ixml @@ -0,0 +1,15 @@ +test: other, digit, other, cap, other, lc, other, lf?. +other: ~[#a; #30-#39; #41-#5A; #61-#7A]+. +cap: [#41-#5A]+. +lc: [#61-#7A]+. +digit: [#30-#39]+. +-lf: -#a. +{ +0123456789abcdef + !"#$%&'()*+,-./ +0123456789:;<=>? +@ABCDEFGHIJKLMNO +PQRSTUVWXYZ[\]^_ +`abcdefghijklmno +pqrstuvwxyz{|}~ +} \ No newline at end of file diff --git a/tests/correct/ranges.output.xml b/tests/correct/ranges.output.xml new file mode 100644 index 00000000..c9cb99ce --- /dev/null +++ b/tests/correct/ranges.output.xml @@ -0,0 +1,9 @@ + + !"#$%&'()*+,-./ + 0123456789 + :;<=>?@ + ABCDEFGHIJKLMNOPQRSTUVWXYZ + [\]^_` + abcdefghijklmnopqrstuvwxyz + {|}~ + diff --git a/tests/correct/ranges1.inp b/tests/correct/ranges1.inp new file mode 100644 index 00000000..8d188c4c --- /dev/null +++ b/tests/correct/ranges1.inp @@ -0,0 +1 @@ +!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ diff --git a/tests/correct/ranges1.ixml b/tests/correct/ranges1.ixml new file mode 100644 index 00000000..5fc72892 --- /dev/null +++ b/tests/correct/ranges1.ixml @@ -0,0 +1,20 @@ +chars: punctuation, nonpunct?; upper, nonupper?; lower, nonlower?; digit, nondigit?. +-nonpunct: upper, nonupper?; lower, nonlower?; digit, nondigit?. +-nonupper: punctuation, nonpunct?; lower, nonlower?; digit, nondigit?. +-nonlower: punctuation, nonpunct?; upper, nonupper?; digit, nondigit?. +-nondigit: punctuation, nonpunct?; upper, nonupper?; lower, nonlower?. + +upper: [#41-#5A]+. +lower: [#61-#7A]+. +digit: [#30-#39]+. +punctuation: ~[#a; #30-#39; #41-#5A; #61-#7A]+. +{-lf: -#a.} +{ +0123456789abcdef + !"#$%&'()*+,-./ +0123456789:;<=>? +@ABCDEFGHIJKLMNO +PQRSTUVWXYZ[\]^_ +`abcdefghijklmno +pqrstuvwxyz{|}~ +} \ No newline at end of file diff --git a/tests/correct/ranges1.output.xml b/tests/correct/ranges1.output.xml new file mode 100644 index 00000000..c7356480 --- /dev/null +++ b/tests/correct/ranges1.output.xml @@ -0,0 +1,9 @@ + + !"#$%&'()*+,-./ + 0123456789 + :;<=>?@ + ABCDEFGHIJKLMNOPQRSTUVWXYZ + [\]^_` + abcdefghijklmnopqrstuvwxyz + {|}~ + diff --git a/tests/steven/tests-SP-MSM/string.inp b/tests/correct/string.inp similarity index 100% rename from tests/steven/tests-SP-MSM/string.inp rename to tests/correct/string.inp diff --git a/tests/steven/tests-SP-MSM/string.ixml b/tests/correct/string.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/string.ixml rename to tests/correct/string.ixml diff --git a/tests/steven/tests-SP-MSM/string.output.xml b/tests/correct/string.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/string.output.xml rename to tests/correct/string.output.xml diff --git a/tests/steven/tests-SP-MSM/tab.inp b/tests/correct/tab.inp similarity index 100% rename from tests/steven/tests-SP-MSM/tab.inp rename to tests/correct/tab.inp diff --git a/tests/steven/tests-SP-MSM/tab.ixml b/tests/correct/tab.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/tab.ixml rename to tests/correct/tab.ixml diff --git a/tests/steven/tests-SP-MSM/tab.output.xml b/tests/correct/tab.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/tab.output.xml rename to tests/correct/tab.output.xml diff --git a/tests/steven/tests-SP-MSM/tests-catalog.xml b/tests/correct/test-catalog.xml similarity index 56% rename from tests/steven/tests-SP-MSM/tests-catalog.xml rename to tests/correct/test-catalog.xml index a437b748..1c544f70 100644 --- a/tests/steven/tests-SP-MSM/tests-catalog.xml +++ b/tests/correct/test-catalog.xml @@ -1,13 +1,13 @@ + release-date="2021-12-21" + name="Amsterdam Test Suite 1, correct tests">

Tests provided by Steven Pemberton in December 2021, - with corrections of 21 December.

- + with corrections of 21 December. Reorganized by Norm Tovey-Walsh, February 2022.

+
- + - - - - - - - - - - - - - - - - - - - - - - - - - - -

The grammar is a: "a"* ; "b"*. - and the input is the empty string.

-

If the grammar is rewritten to BNF, it - will clearly have two parse trees against - the BNF grammar, but it does not have - two parse trees against the EBNF grammar.

-

So MSM has added an alternative result - which does not mark the - result ambiguous.

-

What the spec should say will require - careful discussion.

-
- - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

The grammar is a: b, ()?, c. b: "b". c: "c". - and the input is bc.

-

As with ambig2, this is or is not ambiguous depending on - exactly how we define ambiguity. The parse may interpret - the middle term as present or as absent, so there are two - derivations, or may be depending on how we define - 'derivation'. There is only one parse tree for the EBNF - grammar.

-

So MSM has specified two alternative results - which differ only in including or excluding - the ambiguity flag.

-

What the spec should say will require - careful discussion.

-
- - - - - -
-
- @@ -217,7 +47,7 @@ - + @@ -232,61 +62,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -303,7 +79,7 @@ - + @@ -320,7 +96,7 @@ - + @@ -337,7 +113,7 @@ - + @@ -352,20 +128,6 @@ - - - - - - - - - - - - - - @@ -384,31 +146,7 @@ - - - - - - - - - - - - - - - - - @@ -439,7 +177,7 @@ - + @@ -456,7 +194,7 @@ - + @@ -473,7 +211,7 @@ - + @@ -490,7 +228,7 @@ - + @@ -509,7 +247,7 @@ - + @@ -526,7 +264,7 @@ - + @@ -543,7 +281,7 @@ - + @@ -558,7 +296,7 @@ - + @@ -573,7 +311,7 @@ - + @@ -588,184 +326,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - -

Note that the input and the grammar are the same.

-

The expected result supplied in tests.zip cannot be - right: it excludes the delimiter characters like ":" and - ",", although they are not marked hidden in the grammar, and - it marks whitespace as "s", not as "S". It appears to be - parsing the input with a different grammar more like the - current ixml grammar. It has been replaced by output - thought correct. However, the old file has been left in - place, in case of disputes over correctness.

-

The comment text "allcharacters,quotesmustbedoubled" - looks like a possible error, but the comments in the input - are also missing inter-word spaces.

-
- - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

The exclude element in the rule for dchar included 18 - extraneous blanks; after the exclude, the terminal element - concluded with an extraneous blank line containing 12 - blanks. These have now been removed.

-
- - - - -
-
- - - - - - - - - - - -

The test grammar includes the rule - -letgit: ["a"{first}-"z"; "A"-"Z"; "0"-"9"].

-

The ixml grammar of December 2021, like its - predecessors, translates the first range into - ]]>, - which does not provide a single-character start - for the range. The semantics of such a range are - not defined by the spec. (One naive translation - into conventional regular expressions produces a - range including the letters 'a', 'f', 'i', - and 'r' through 'z', which makes the name 'ixml' - fail on the 'm'.)

-

Until the ixml grammar is corrected to turn this into - comment>first]]> or - something else that keeps the comment out of the - 'from' attribute, this should be treated as a test - case with an error in the test case grammar.

-
- - - - - -
-
- - - - - - - - - - - - - - - - @@ -781,7 +342,7 @@ - + @@ -803,7 +364,7 @@ - + @@ -821,7 +382,7 @@ - + @@ -837,7 +398,7 @@ - + @@ -855,7 +416,7 @@ - + @@ -864,7 +425,7 @@ - + - - -

The grammar as written allows no hash mark and fragment - identifier. The intent may have been to formulate a grammar - that allowed them, but the simplest change to bring it into - a consistent state is to change the result.

-

For the record, the originally asserted result is now in - file 'url1.disputed-output.xml'.

-
- -
- @@ -1108,7 +617,7 @@ - + @@ -1127,7 +636,7 @@ - + @@ -1146,7 +655,7 @@ - + @@ -1170,7 +679,92 @@ - + + + + + + + change="Converted it into the catalog format"/> + + + + + + + + + + + + + + change="Converted it into the catalog format"/> + + + + + + + + + + + + + + change="Converted it into the catalog format"/> + + + + + + + + + + + + + + change="Converted it into the catalog format"/> + + + + + + + + + + + + + + change="Converted it into the catalog format"/> + + + + + + + + + + + + + + change="Converted it into the catalog format"/> + + + + + + + +
+ diff --git a/tests/steven/tests-SP-MSM/test.inp b/tests/correct/test.inp similarity index 100% rename from tests/steven/tests-SP-MSM/test.inp rename to tests/correct/test.inp diff --git a/tests/steven/tests-SP-MSM/test.ixml b/tests/correct/test.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/test.ixml rename to tests/correct/test.ixml diff --git a/tests/steven/tests-SP-MSM/test.output.xml b/tests/correct/test.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/test.output.xml rename to tests/correct/test.output.xml diff --git a/tests/steven/tests-SP-MSM/unicode-range.inp b/tests/correct/unicode-range.inp similarity index 100% rename from tests/steven/tests-SP-MSM/unicode-range.inp rename to tests/correct/unicode-range.inp diff --git a/tests/steven/tests-SP-MSM/unicode-range.ixml b/tests/correct/unicode-range.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/unicode-range.ixml rename to tests/correct/unicode-range.ixml diff --git a/tests/steven/tests-SP-MSM/unicode-range.output.xml b/tests/correct/unicode-range.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/unicode-range.output.xml rename to tests/correct/unicode-range.output.xml diff --git a/tests/steven/tests-SP-MSM/unicode-range1.inp b/tests/correct/unicode-range1.inp similarity index 100% rename from tests/steven/tests-SP-MSM/unicode-range1.inp rename to tests/correct/unicode-range1.inp diff --git a/tests/steven/tests-SP-MSM/unicode-range1.ixml b/tests/correct/unicode-range1.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/unicode-range1.ixml rename to tests/correct/unicode-range1.ixml diff --git a/tests/steven/tests-SP-MSM/unicode-range1.output.xml b/tests/correct/unicode-range1.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/unicode-range1.output.xml rename to tests/correct/unicode-range1.output.xml diff --git a/tests/steven/tests-SP-MSM/unicode-range2.inp b/tests/correct/unicode-range2.inp similarity index 100% rename from tests/steven/tests-SP-MSM/unicode-range2.inp rename to tests/correct/unicode-range2.inp diff --git a/tests/steven/tests-SP-MSM/unicode-range2.ixml b/tests/correct/unicode-range2.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/unicode-range2.ixml rename to tests/correct/unicode-range2.ixml diff --git a/tests/steven/tests-SP-MSM/unicode-range2.output.xml b/tests/correct/unicode-range2.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/unicode-range2.output.xml rename to tests/correct/unicode-range2.output.xml diff --git a/tests/steven/tests-SP-MSM/vcard.inp b/tests/correct/vcard.inp similarity index 100% rename from tests/steven/tests-SP-MSM/vcard.inp rename to tests/correct/vcard.inp diff --git a/tests/steven/tests-SP-MSM/vcard.ixml b/tests/correct/vcard.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/vcard.ixml rename to tests/correct/vcard.ixml diff --git a/tests/steven/tests-SP-MSM/vcard.output.xml b/tests/correct/vcard.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/vcard.output.xml rename to tests/correct/vcard.output.xml diff --git a/tests/steven/tests-SP-MSM/xml.inp b/tests/correct/xml.inp similarity index 100% rename from tests/steven/tests-SP-MSM/xml.inp rename to tests/correct/xml.inp diff --git a/tests/steven/tests-SP-MSM/xml.ixml b/tests/correct/xml.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/xml.ixml rename to tests/correct/xml.ixml diff --git a/tests/steven/tests-SP-MSM/xml.output.xml b/tests/correct/xml.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/xml.output.xml rename to tests/correct/xml.output.xml diff --git a/tests/steven/tests-SP-MSM/xml1.inp b/tests/correct/xml1.inp similarity index 100% rename from tests/steven/tests-SP-MSM/xml1.inp rename to tests/correct/xml1.inp diff --git a/tests/steven/tests-SP-MSM/xml1.ixml b/tests/correct/xml1.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/xml1.ixml rename to tests/correct/xml1.ixml diff --git a/tests/steven/tests-SP-MSM/xml1.output.xml b/tests/correct/xml1.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/xml1.output.xml rename to tests/correct/xml1.output.xml diff --git a/tests/steven/tests-SP-MSM/xpath.inp b/tests/correct/xpath.inp similarity index 100% rename from tests/steven/tests-SP-MSM/xpath.inp rename to tests/correct/xpath.inp diff --git a/tests/steven/tests-SP-MSM/xpath.ixml b/tests/correct/xpath.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/xpath.ixml rename to tests/correct/xpath.ixml diff --git a/tests/steven/tests-SP-MSM/expr1.output.xml b/tests/extra/expr1.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/expr1.output.xml rename to tests/extra/expr1.output.xml diff --git a/tests/steven/tests-SP-MSM/ixml-one-line.output.xml b/tests/extra/ixml-one-line.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/ixml-one-line.output.xml rename to tests/extra/ixml-one-line.output.xml diff --git a/tests/steven/tests-SP-MSM/ixml2.output.xml b/tests/extra/ixml2.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/ixml2.output.xml rename to tests/extra/ixml2.output.xml diff --git a/tests/steven/tests-SP-MSM/para-test.disputed-output.xml b/tests/extra/para-test.disputed-output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/para-test.disputed-output.xml rename to tests/extra/para-test.disputed-output.xml diff --git a/tests/steven/tests-SP-MSM/url1.disputed-output.xml b/tests/extra/url1.disputed-output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/url1.disputed-output.xml rename to tests/extra/url1.disputed-output.xml diff --git a/tests/steven/tests-SP-MSM/xml.dup.output.xml b/tests/extra/xml.dup.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/xml.dup.output.xml rename to tests/extra/xml.dup.output.xml diff --git a/tests/steven/tests-SP-MSM/xpath.output.xml b/tests/extra/xpath.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/xpath.output.xml rename to tests/extra/xpath.output.xml diff --git a/tests/steven/tests-SP-MSM/bnf.inp b/tests/ixml/bnf.inp similarity index 100% rename from tests/steven/tests-SP-MSM/bnf.inp rename to tests/ixml/bnf.inp diff --git a/tests/steven/tests-SP-MSM/bnf.ixml b/tests/ixml/bnf.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/bnf.ixml rename to tests/ixml/bnf.ixml diff --git a/tests/steven/tests-SP-MSM/bnf.output.xml b/tests/ixml/bnf.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/bnf.output.xml rename to tests/ixml/bnf.output.xml diff --git a/tests/steven/tests-SP-MSM/ixml-no-spaces.inp b/tests/ixml/ixml-no-spaces.inp similarity index 100% rename from tests/steven/tests-SP-MSM/ixml-no-spaces.inp rename to tests/ixml/ixml-no-spaces.inp diff --git a/tests/steven/tests-SP-MSM/ixml-no-spaces.ixml b/tests/ixml/ixml-no-spaces.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/ixml-no-spaces.ixml rename to tests/ixml/ixml-no-spaces.ixml diff --git a/tests/steven/tests-SP-MSM/ixml-no-spaces.output.xml b/tests/ixml/ixml-no-spaces.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/ixml-no-spaces.output.xml rename to tests/ixml/ixml-no-spaces.output.xml diff --git a/tests/steven/tests-SP-MSM/ixml-one-line.corr.output.xml b/tests/ixml/ixml-one-line.corr.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/ixml-one-line.corr.output.xml rename to tests/ixml/ixml-one-line.corr.output.xml diff --git a/tests/steven/tests-SP-MSM/ixml-one-line.inp b/tests/ixml/ixml-one-line.inp similarity index 100% rename from tests/steven/tests-SP-MSM/ixml-one-line.inp rename to tests/ixml/ixml-one-line.inp diff --git a/tests/steven/tests-SP-MSM/ixml-one-line.ixml b/tests/ixml/ixml-one-line.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/ixml-one-line.ixml rename to tests/ixml/ixml-one-line.ixml diff --git a/tests/steven/tests-SP-MSM/ixml-spaces.inp b/tests/ixml/ixml-spaces.inp similarity index 100% rename from tests/steven/tests-SP-MSM/ixml-spaces.inp rename to tests/ixml/ixml-spaces.inp diff --git a/tests/steven/tests-SP-MSM/ixml-spaces.ixml b/tests/ixml/ixml-spaces.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/ixml-spaces.ixml rename to tests/ixml/ixml-spaces.ixml diff --git a/tests/steven/tests-SP-MSM/ixml-spaces.output.xml b/tests/ixml/ixml-spaces.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/ixml-spaces.output.xml rename to tests/ixml/ixml-spaces.output.xml diff --git a/tests/steven/tests-SP-MSM/ixml.inp b/tests/ixml/ixml.inp similarity index 100% rename from tests/steven/tests-SP-MSM/ixml.inp rename to tests/ixml/ixml.inp diff --git a/tests/steven/tests-SP-MSM/ixml.ixml b/tests/ixml/ixml.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/ixml.ixml rename to tests/ixml/ixml.ixml diff --git a/tests/steven/tests-SP-MSM/ixml.output.xml b/tests/ixml/ixml.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/ixml.output.xml rename to tests/ixml/ixml.output.xml diff --git a/tests/steven/tests-SP-MSM/ixml1.inp b/tests/ixml/ixml1.inp similarity index 100% rename from tests/steven/tests-SP-MSM/ixml1.inp rename to tests/ixml/ixml1.inp diff --git a/tests/steven/tests-SP-MSM/ixml1.ixml b/tests/ixml/ixml1.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/ixml1.ixml rename to tests/ixml/ixml1.ixml diff --git a/tests/steven/tests-SP-MSM/ixml1.output.xml b/tests/ixml/ixml1.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/ixml1.output.xml rename to tests/ixml/ixml1.output.xml diff --git a/tests/steven/tests-SP-MSM/ixml2.inp b/tests/ixml/ixml2.inp similarity index 100% rename from tests/steven/tests-SP-MSM/ixml2.inp rename to tests/ixml/ixml2.inp diff --git a/tests/steven/tests-SP-MSM/ixml2.ixml b/tests/ixml/ixml2.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/ixml2.ixml rename to tests/ixml/ixml2.ixml diff --git a/tests/steven/tests-SP-MSM/ixml3.inp b/tests/ixml/ixml3.inp similarity index 100% rename from tests/steven/tests-SP-MSM/ixml3.inp rename to tests/ixml/ixml3.inp diff --git a/tests/steven/tests-SP-MSM/ixml3.ixml b/tests/ixml/ixml3.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/ixml3.ixml rename to tests/ixml/ixml3.ixml diff --git a/tests/steven/tests-SP-MSM/ixml3.output.xml b/tests/ixml/ixml3.output.xml similarity index 100% rename from tests/steven/tests-SP-MSM/ixml3.output.xml rename to tests/ixml/ixml3.output.xml diff --git a/tests/ixml/test-catalog.xml b/tests/ixml/test-catalog.xml new file mode 100644 index 00000000..7bb565a9 --- /dev/null +++ b/tests/ixml/test-catalog.xml @@ -0,0 +1,202 @@ + + + +

Tests provided by Steven Pemberton in December 2021, + with corrections of 21 December. Reorganized by Norm Tovey-Walsh, February 2022.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Note that the input and the grammar are the same.

+

The expected result supplied in tests.zip cannot be + right: it excludes the delimiter characters like ":" and + ",", although they are not marked hidden in the grammar, and + it marks whitespace as "s", not as "S". It appears to be + parsing the input with a different grammar more like the + current ixml grammar. It has been replaced by output + thought correct. However, the old file has been left in + place, in case of disputes over correctness.

+

The comment text "allcharacters,quotesmustbedoubled" + looks like a possible error, but the comments in the input + are also missing inter-word spaces.

+
+ + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

The exclude element in the rule for dchar included 18 + extraneous blanks; after the exclude, the terminal element + concluded with an extraneous blank line containing 12 + blanks. These have now been removed.

+
+ + + + +
+
+ + + + + + + + + + + +

The test grammar includes the rule + -letgit: ["a"{first}-"z"; "A"-"Z"; "0"-"9"].

+

The ixml grammar of December 2021, like its + predecessors, translates the first range into + ]]>, + which does not provide a single-character start + for the range. The semantics of such a range are + not defined by the spec. (One naive translation + into conventional regular expressions produces a + range including the letters 'a', 'f', 'i', + and 'r' through 'z', which makes the name 'ixml' + fail on the 'm'.)

+

Until the ixml grammar is corrected to turn this into + comment>first]]> or + something else that keeps the comment out of the + 'from' attribute, this should be treated as a test + case with an error in the test case grammar.

+
+ + + + + +
+
+ + + + + + + + + + + + + + + + +
diff --git a/tests/steven/tests-SP-MSM/parse-error.inp b/tests/parse/parse-error.inp similarity index 100% rename from tests/steven/tests-SP-MSM/parse-error.inp rename to tests/parse/parse-error.inp diff --git a/tests/steven/tests-SP-MSM/parse-error.ixml b/tests/parse/parse-error.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/parse-error.ixml rename to tests/parse/parse-error.ixml diff --git a/tests/parse/test-catalog.xml b/tests/parse/test-catalog.xml new file mode 100644 index 00000000..274e5ed4 --- /dev/null +++ b/tests/parse/test-catalog.xml @@ -0,0 +1,60 @@ + + + +

Tests provided by Steven Pemberton in December 2021, + with corrections of 21 December. Reorganized by Norm Tovey-Walsh, February 2022.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

The grammar as written allows no hash mark and fragment + identifier. The intent may have been to formulate a grammar + that allowed them, but the simplest change to bring it into + a consistent state is to change the result.

+

For the record, the originally asserted result is now in + file 'url1.disputed-output.xml'.

+
+
+
+ +
diff --git a/tests/steven/tests-SP-MSM/url.inp b/tests/parse/url.inp similarity index 100% rename from tests/steven/tests-SP-MSM/url.inp rename to tests/parse/url.inp diff --git a/tests/steven/tests-SP-MSM/url.ixml b/tests/parse/url.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/url.ixml rename to tests/parse/url.ixml diff --git a/tests/steven/tests-SP-MSM/url1.inp b/tests/parse/url1.inp similarity index 100% rename from tests/steven/tests-SP-MSM/url1.inp rename to tests/parse/url1.inp diff --git a/tests/steven/tests-SP-MSM/url1.ixml b/tests/parse/url1.ixml similarity index 100% rename from tests/steven/tests-SP-MSM/url1.ixml rename to tests/parse/url1.ixml diff --git a/tests/readme.md b/tests/readme.md index cff20571..f8d3a115 100644 --- a/tests/readme.md +++ b/tests/readme.md @@ -1 +1,51 @@ -This is a folder where you can submit example test files for a future test suite. +This directory contains a version of Steven Pemberton's tests.zip +file, modified by Michael Sperberg-McQueen, further modified by Norm +Tovey-Walsh, and packaged with a test catalog using the test-catalog +vocabulary defined in MSM's ixml-tests repository. + +Note that a large number of tests have been changed vis-a-vis +tests.zip. In many cases this only involved removing non-grammatical +whitespace from the end of the input, but in other cases larger +interventions were made. The details are in the catalog. + +In each directory, there are three files per test: +* file.ixml: the ixml grammar for the test +* file.inp: sample input for that grammar +* file.req: the expected output for that input + +MSM has made test catalogs for these tests using the test-catalog vocabulary +defined in his ixml-tests repository. + +* SP-syntaxtests-package.zip +* tests-SP-MSM + +For the syntaxtests directory, the result is packaged in a zip file +containing the tests and catalogs. (No input files or result files +are included, because none are needed: none of the tests consume input +other than the grammar files, and none produces output.) + +The SP-syntaxtests-package.zip file contains three catalogs, which +specify the tests in different ways: + +* In `catalog-as-instance-tests-ixml.xml`, the catalog specifies the +tests as instance tests, using `../../../ixml.ixml` as the grammar +against which they are to be parsed. + +* In `catalog-as-instance-tests-xml.xml`, the catalog specifies the +tests as instance tests, using `../../../ixml.xml` as the grammar +against which they are to be parsed. Processors which don't support +the XML form of ixml grammars won't want to bother running these. + +* In `catalog-as-grammar-tests.xml`, the processor is to use its +inbuilt ixml grammar. Assuming the processor is using the current +ixml grammar, the results should be the same. + +In the directory tests-SP-MSM, a test catalog is packaged with +corrected input and result files. As noted case by case in the +catalog, a number of changes were made, often stripping ungrammatical +whitespace from the input files and in some case stripping +nonsignficant whitespace from the expected result, to avoid causing +problems for XML comparators using deep-equal(), or for other +comparators looking at output with different pretty-printing +practices. + diff --git a/tests/reference/ixml.ixml b/tests/reference/ixml.ixml new file mode 100644 index 00000000..6bff1cfd --- /dev/null +++ b/tests/reference/ixml.ixml @@ -0,0 +1,67 @@ +{ From the 2022-01-25 draft specification } + + ixml: s, rule+s, s. + + -s: (whitespace; comment)*. + -whitespace: -[Zs]; tab; lf; cr. + -tab: -#9. + -lf: -#a. + -cr: -#d. + comment: -"{", (cchar; comment)*, -"}". + -cchar: ~["{}"]. + + rule: (mark, s)?, name, s, -["=:"], s, -alts, -".". + @mark: ["@^-"]. + alts: alt+(-[";|"], s). + alt: term*(-",", s). + -term: factor; + option; + repeat0; + repeat1. + -factor: terminal; + nonterminal; + -"(", s, alts, -")", s. + repeat0: factor, -"*", s, sep?. + repeat1: factor, -"+", s, sep?. + option: factor, -"?", s. + sep: factor. + nonterminal: (mark, s)?, name, s. + + -terminal: literal; + charset. + literal: quoted; + encoded. + -quoted: (tmark, s)?, string. + + @name: namestart, namefollower*. + -namestart: ["_"; L]. +-namefollower: namestart; ["-.·‿⁀"; Nd; Mn]. + + @tmark: ["^-"]. + @string: -'"', dchar+, -'"', s; + -"'", schar+, -"'", s. + dchar: ~['"'; #a; #d]; + '"', -'"'. {all characters except line breaks; quotes must be doubled} + schar: ~["'"; #a; #d]; + "'", -"'". {all characters except line breaks; quotes must be doubled} + -encoded: (tmark, s)?, -"#", @hex, s. + hex: ["0"-"9"; "a"-"f"; "A"-"F"]+. + + -charset: inclusion; + exclusion. + inclusion: (tmark, s)?, set. + exclusion: (tmark, s)?, -"~", s, set. + -set: -"[", s, member*(-[";|"], s), -"]", s. + -member: literal; + range; + class. + range: from, s, -"-", s, to, s. + @from: character. + @to: character. + -character: -'"', dchar, -'"'; + -"'", schar, -"'"; + "#", hex. + class: code, s. + @code: capital, letter?. + -capital: ["A"-"Z"]. + -letter: ["a"-"z"]. diff --git a/tests/reference/ixml.xml b/tests/reference/ixml.xml new file mode 100644 index 00000000..933100d6 --- /dev/null +++ b/tests/reference/ixml.xml @@ -0,0 +1,485 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + all characters except line breaks; quotes must be doubled + + + + + + + + + + + + + + all characters except line breaks; quotes must be doubled + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/steven/SP-syntaxtests-package.zip b/tests/steven/SP-syntaxtests-package.zip deleted file mode 100644 index fb096cf6175db582f1970027637f0b6732b21220..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12868 zcmbVS2{@G9`yN|~(qd^-jS1OiM0S!yF(_sxA*sQTbuu&75*76oew9j86fKmH%D%K% zB3t$%vJ0V5Lh65BQ=d2U^40&Ub6sY+?)yH^dCqg5bH8J3z`-eiLZP@(t9OSH^UL1V zP&iPiE>RRp0ws*1d%H5oUJMGIL6@~5Gsw_MrQaRb(ix%RnXkUo;8dMh#G#n`wAb;3##0WhmM(sG9B}(8 zo$btTR~edLn%pU-E1DY=xwHJn%%@vEj-aclBEUheVzTRp_SLs zOFLz2yVN2=o@{BuwvRofVGh1eHNq$rOXh90!CgDD^=lVTK%|UY*P=#Gp;W>5FSnZZ z?4ytj4heoOddqz~f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&b`*puhh7XDD3EpP|h72@0Hz_4zoQ?FIPp%PefOJ}n2F z(9`lcI9VV2z&ULf{3++Z4}kzB^blwcN>)#Fn)30nOuiYEEDkAPfE-dp24<0BwLswv z*u}pyzztD=4H=?{*vyn*wKU<_8A#Z_S|tDu8Ju%~v$~XU@NG*Fg#W5#037lx5y6>J zVKpA%;AIHlzseB6hHOYgY-UtgjYK%M`BGNlznUt54cUrwV6(b|aO@TY>|b3Iz=pg+ zL~LeESS>#|wmrB&!M7ZgDZknxfDIXdb6~Std2sAL1nghE55R_uy*aR1Ejl=PTU;WtezSi+XD!I#~bdj0c^-&L&RpTC94?* z$6hJOiVe$e$Qqjio7L}vV}~MO!}1$)zvjSZ^|0XBtAto}!}1$)wC2EOb*13gw-B&l z`3-qgb6~SNO>k_P<*d44`3?C_b6~T2M{w*^1ngf8JjfHsNkYVC<~OS^1jkkaFMi8G zR+k7+KrRs?1v3>{O&>T#_Dl-61q8q$3uq2-R)+@;F0=A?{V=}=Ktp~HA~Z8JtlkbB zI%EbklG6h?Ag5;z4ps*T&cVCtclopUIe-T8a}a5mOTcQ=z-dBe(7<|I01cToh|tU^ zvHCG^=pP8sutOShXArTOvRS>CdIJOCRa1XBrP{3go5;8{Sz-IM3 z;Mhe7*sux-xgT?2vzi)k>@90qb;BwoWN{#3Gn0_jw}4}(BVfb23&_Pl#AfCot8)Rz zUIr}knem2o7m$yEh|Sc^YEHnhgJxjEJ%$-p1=vcERe?ywoCd4y0H+d0|2_>QDp*Z` zOo%zSSRDj7SI!@B!L~8vCm?b$L&)j{z`6E|%$(OuX8=SFat06?n2}?><--}eXJ`0z c=LZzfou7q*YaVnVmjeINz%9%Za>`Nv2d4qAG5`Po diff --git a/tests/steven/ambiguous/readme.md b/tests/steven/ambiguous/readme.md deleted file mode 100644 index c7753d55..00000000 --- a/tests/steven/ambiguous/readme.md +++ /dev/null @@ -1 +0,0 @@ -These tests all have ambiguous parses in one way or another diff --git a/tests/steven/catalog.xml b/tests/steven/catalog.xml deleted file mode 100644 index 13816b1f..00000000 --- a/tests/steven/catalog.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - -

Top-level catalog for tests provided by - Steven Pemberton in December 2021.

-

There are two sub-groups, one general - and one focused on syntax issues.

-
- - - - - - - - - - -
diff --git a/tests/steven/readme.md b/tests/steven/readme.md deleted file mode 100644 index 24ee9d9f..00000000 --- a/tests/steven/readme.md +++ /dev/null @@ -1,41 +0,0 @@ -In each directory, there are three files per test: -* file.ixml: the ixml grammar for the test -* file.inp: sample input for that grammar -* file.req: the expected output for that input - -MSM has made test catalogs for these tests using the test-catalog vocabulary -defined in his ixml-tests repository. - -* SP-syntaxtests-package.zip -* tests-SP-MSM - -For the syntaxtests directory, the result is packaged in a zip file -containing the tests and catalogs. (No input files or result files -are included, because none are needed: none of the tests consume input -other than the grammar files, and none produces output.) - -The SP-syntaxtests-package.zip file contains three catalogs, which -specify the tests in different ways: - -* In `catalog-as-instance-tests-ixml.xml`, the catalog specifies the -tests as instance tests, using `../../../ixml.ixml` as the grammar -against which they are to be parsed. - -* In `catalog-as-instance-tests-xml.xml`, the catalog specifies the -tests as instance tests, using `../../../ixml.xml` as the grammar -against which they are to be parsed. Processors which don't support -the XML form of ixml grammars won't want to bother running these. - -* In `catalog-as-grammar-tests.xml`, the processor is to use its -inbuilt ixml grammar. Assuming the processor is using the current -ixml grammar, the results should be the same. - -In the directory tests-SP-MSM, a test catalog is packaged with -corrected input and result files. As noted case by case in the -catalog, a number of changes were made, often stripping ungrammatical -whitespace from the input files and in some case stripping -nonsignficant whitespace from the expected result, to avoid causing -problems for XML comparators using deep-equal(), or for other -comparators looking at output with different pretty-printing -practices. - diff --git a/tests/steven/syntaxtests.zip b/tests/steven/syntaxtests.zip deleted file mode 100644 index eea263ad085fe10bf2be8ee2ea977c5c095a3d48..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 28633 zcmb`P2|SeB`@oSsTMR|i82dITMT(TNMlmXt%3v&IYmiW~H06>=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dm%N))Jdb1J{0UM^X^I&6B(ouFF4jbHYvHT4a z)OoP6Y33+Q-32 zktl@O**w_TJZqF)h{Hxk56rs8WiulMn?H@R^{laaBT)#msd=!mNzo{~42O-39+)D{ zgN@B}M%m^d6&#HdxWzzbE137pgN;pQM%iUJY@{z?YBLWuHe(rO>)2rRM*0%wFY{ny z(~?nkE)E;%OPHk0gN@BQM%l`)6Kz+au<0NVvf0s{XB*{HI^ diff --git a/tests/steven/tests-SP-MSM/README.md b/tests/steven/tests-SP-MSM/README.md deleted file mode 100644 index 1b5aa2ab..00000000 --- a/tests/steven/tests-SP-MSM/README.md +++ /dev/null @@ -1,9 +0,0 @@ -This directory contains a version of Steven Pemberton's tests.zip -file, modified by Michael Sperberg-McQueen and packaged with a test -catalog using the test-catalog vocabulary defined in MSM's ixml-tests -repository. - -Note that a large number of tests have been changed vis-a-vis -tests.zip. In many cases this only involved removing non-grammatical -whitespace from the end of the input, but in other cases larger -interventions were made. The details are in the catalog. diff --git a/tests/steven/tests.zip b/tests/steven/tests.zip deleted file mode 100644 index b169adc9a1b935b68e0d4ba306340abc1db9b2f8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 129234 zcmeFZQ;=m_x2~ObR@%00+qP9{+m*I$8(+H#bF zU-R>z0(?#Jub239l0OC-TN`5}N&%fY;vvH@}lZi{=~VB_4!7kgizyUno7Q=f=d7oko(6Lq5$sq4NV3 zz8=P=V|XiVB&m{CtZFbxs1v#o4mW4?VKpzNDQM^<7vGVU_~SLiSJUd0cXX+`RMv^w z8IkaDB5hQ~S@hO}nbWo%#`p8o*e6>%IYNxGa|5)+tMXRud;%&8fXD4CvUS%V9QdoW zF;g2*v8Tim_BTF8`vD*%#Aplr7_`SIBk?BPM=7;E@DSuYl~Kx$_5-9~mvE?L(qk*% zddsg;Hf$1of5ypz#GSb8%b!zKabCRljYC9@w)3wzQFUd&$c*1iyA&}^drX$Fg~WOe zh7J!1mL<@=coxF#!)qXo7&N;PPvkc3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)h7^&&**oK>I_DLCyfMgZ^r%{QzofKkEy zWvLjPvrbb;h6^9MZwVrpZ%p+fMKtF)BYO5;)GV~-!UycR@H8 z&k}=k8Wg=5Pk;-bg6G29%n{L?)1c^KcmiDb-a8k*S`5xz=%7x&=-qXJ5H0l8hXz%LsxuOnG(uuwK&J73l{N^W diff --git a/tests/syntax/catalog-as-grammar-tests.xml b/tests/syntax/catalog-as-grammar-tests.xml new file mode 100644 index 00000000..b50c39a9 --- /dev/null +++ b/tests/syntax/catalog-as-grammar-tests.xml @@ -0,0 +1,333 @@ + + + +

Syntax tests provided by Steven Pemberton in December 2021.

+

All tests are negative (the file.ixml files do not conform + to the grammar for ixml).

+

Since these are all parsed against the grammar for ixml + grammars, the expected result could be given as + 'assert-not-a-grammar' as well as 'assert-not-a-sentence'. The + inputs are not sentences in the language defined by the grammar + for grammars, which means they are not ixml grammars.

+

Three catalogs are provided, using different formulations. This + one describes all the tests as grammar tests and relies on + the ixml grammar built into the processor.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/tests/syntax/catalog-as-instance-tests-ixml.xml b/tests/syntax/catalog-as-instance-tests-ixml.xml new file mode 100644 index 00000000..50424a3d --- /dev/null +++ b/tests/syntax/catalog-as-instance-tests-ixml.xml @@ -0,0 +1,640 @@ + + + +

Syntax tests provided by Steven Pemberton in December 2021.

+

All tests are negative (the file.ixml files do not conform + to the grammar for ixml).

+

Since these are all parsed against the grammar for ixml + grammars, the expected result could be given as + 'assert-not-a-grammar' as well as 'assert-not-a-sentence'. The + inputs are not sentences in the language defined by the grammar + for grammars, which means they are not ixml grammars.

+

Three catalogs are provided, using different formulations. This + one uses the ixml form of the ixml grammar and describes all the + tests as instance tests.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/tests/syntax/catalog-as-instance-tests-xml.xml b/tests/syntax/catalog-as-instance-tests-xml.xml new file mode 100644 index 00000000..b1d20f70 --- /dev/null +++ b/tests/syntax/catalog-as-instance-tests-xml.xml @@ -0,0 +1,468 @@ + + + +

Syntax tests provided by Steven Pemberton in December 2021.

+

All tests are negative (the file.ixml files do not conform + to the grammar for ixml).

+

Since these are all parsed against the grammar for ixml + grammars, the expected result could be given as + 'assert-not-a-grammar' as well as 'assert-not-a-sentence'. The + inputs are not sentences in the language defined by the grammar + for grammars, which means they are not ixml grammars.

+

Three catalogs are provided, using different formulations. This + one uses the XML form of the ixml grammar and describes all the + tests as instance tests.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/tests/syntax/class-range.ixml b/tests/syntax/class-range.ixml new file mode 100644 index 00000000..56135313 --- /dev/null +++ b/tests/syntax/class-range.ixml @@ -0,0 +1,2 @@ +a: class-range. +class-range: [L-N]. diff --git a/tests/syntax/defn1.ixml b/tests/syntax/defn1.ixml new file mode 100644 index 00000000..da9e19cf --- /dev/null +++ b/tests/syntax/defn1.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: @".". {Not allowed for terminals} +d: . diff --git a/tests/syntax/defn10.ixml b/tests/syntax/defn10.ixml new file mode 100644 index 00000000..6d359f27 --- /dev/null +++ b/tests/syntax/defn10.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: -(a, b, c). {No marker allowed} +d: . diff --git a/tests/syntax/defn11.ixml b/tests/syntax/defn11.ixml new file mode 100644 index 00000000..07976d46 --- /dev/null +++ b/tests/syntax/defn11.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: ^(a, b, c). {No marker allowed} +d: . diff --git a/tests/syntax/defn2.ixml b/tests/syntax/defn2.ixml new file mode 100644 index 00000000..c5eae6b5 --- /dev/null +++ b/tests/syntax/defn2.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: @'.'. {Not allowed for terminals} +d: . diff --git a/tests/syntax/defn3.ixml b/tests/syntax/defn3.ixml new file mode 100644 index 00000000..224dc618 --- /dev/null +++ b/tests/syntax/defn3.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: 'unterminated. {unterminated string} +d: . diff --git a/tests/syntax/defn4.ixml b/tests/syntax/defn4.ixml new file mode 100644 index 00000000..18b4a351 --- /dev/null +++ b/tests/syntax/defn4.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: "unterminated. {unterminated string} +d: . diff --git a/tests/syntax/defn5.ixml b/tests/syntax/defn5.ixml new file mode 100644 index 00000000..dda32739 --- /dev/null +++ b/tests/syntax/defn5.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: @#9. {no @ for terminals} +d: . diff --git a/tests/syntax/defn6.ixml b/tests/syntax/defn6.ixml new file mode 100644 index 00000000..b5c04364 --- /dev/null +++ b/tests/syntax/defn6.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: @~["abc"]. {No @ allowed} +d: . diff --git a/tests/syntax/defn8.ixml b/tests/syntax/defn8.ixml new file mode 100644 index 00000000..bb08e921 --- /dev/null +++ b/tests/syntax/defn8.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: @["abc"]. {No @ allowed} +d: . diff --git a/tests/syntax/defn9.ixml b/tests/syntax/defn9.ixml new file mode 100644 index 00000000..2ece1130 --- /dev/null +++ b/tests/syntax/defn9.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: @(a, b, c). {No @ allowed} +d: . diff --git a/tests/syntax/elem1.ixml b/tests/syntax/elem1.ixml new file mode 100644 index 00000000..99231113 --- /dev/null +++ b/tests/syntax/elem1.ixml @@ -0,0 +1,4 @@ +a: "a", b, c. +b: "b", c, d. +c: "c", []. {it should block here, since nothing matches} +d: "d". diff --git a/tests/syntax/elem2.ixml b/tests/syntax/elem2.ixml new file mode 100644 index 00000000..b9449a92 --- /dev/null +++ b/tests/syntax/elem2.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: [1]. {illegal} +d: . diff --git a/tests/syntax/elem3.ixml b/tests/syntax/elem3.ixml new file mode 100644 index 00000000..1e2c0fa7 --- /dev/null +++ b/tests/syntax/elem3.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: ["a"-""]. {Must be length 1} +d: . diff --git a/tests/syntax/elem4.ixml b/tests/syntax/elem4.ixml new file mode 100644 index 00000000..c2b2db09 --- /dev/null +++ b/tests/syntax/elem4.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: ["a"-"dd"]. {Must be length 1} +d: . diff --git a/tests/syntax/elem5.ixml b/tests/syntax/elem5.ixml new file mode 100644 index 00000000..2bbcd111 --- /dev/null +++ b/tests/syntax/elem5.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: [""-"d"]. {Must be length 1} +d: . diff --git a/tests/syntax/elem6.ixml b/tests/syntax/elem6.ixml new file mode 100644 index 00000000..875fc398 --- /dev/null +++ b/tests/syntax/elem6.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: ["aa"-"d"]. {Must be length 1} +d: . diff --git a/tests/syntax/elem7.ixml b/tests/syntax/elem7.ixml new file mode 100644 index 00000000..8e04f9b4 --- /dev/null +++ b/tests/syntax/elem7.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: ["a".."d"]. {Not ..} +d: . diff --git a/tests/syntax/empty-string.ixml b/tests/syntax/empty-string.ixml new file mode 100644 index 00000000..0f71b7b4 --- /dev/null +++ b/tests/syntax/empty-string.ixml @@ -0,0 +1,4 @@ +a: b, c, d. +b: "b". +c: "" {not allowed}. +d: "d". diff --git a/tests/syntax/expr10.ixml b/tests/syntax/expr10.ixml new file mode 100644 index 00000000..f8565ced --- /dev/null +++ b/tests/syntax/expr10.ixml @@ -0,0 +1,2 @@ +expr: factor+("*"; "/"). +term: \ No newline at end of file diff --git a/tests/syntax/hex2.ixml b/tests/syntax/hex2.ixml new file mode 100644 index 00000000..659ed19c --- /dev/null +++ b/tests/syntax/hex2.ixml @@ -0,0 +1 @@ +hex: "a", #, "b". diff --git a/tests/syntax/illegal-class.ixml b/tests/syntax/illegal-class.ixml new file mode 100644 index 00000000..531844d8 --- /dev/null +++ b/tests/syntax/illegal-class.ixml @@ -0,0 +1,2 @@ +a: class. +class: [Xx]. {Non-existent class} diff --git a/tests/syntax/name-with-spaces.ixml b/tests/syntax/name-with-spaces.ixml new file mode 100644 index 00000000..1d13f166 --- /dev/null +++ b/tests/syntax/name-with-spaces.ixml @@ -0,0 +1,3 @@ +a b: b c. {No spaces in names} +b: . +c: . diff --git a/tests/syntax/rule.ixml b/tests/syntax/rule.ixml new file mode 100644 index 00000000..07dd6a10 --- /dev/null +++ b/tests/syntax/rule.ixml @@ -0,0 +1,3 @@ +a: b, c. +b . {missing colon} +c: . diff --git a/tests/syntax/rule1.ixml b/tests/syntax/rule1.ixml new file mode 100644 index 00000000..167e8a1f --- /dev/null +++ b/tests/syntax/rule1.ixml @@ -0,0 +1,3 @@ +a: b, c. +b: b. c. {extra .} +c: . diff --git a/tests/syntax/rule10.ixml b/tests/syntax/rule10.ixml new file mode 100644 index 00000000..e2f5c847 --- /dev/null +++ b/tests/syntax/rule10.ixml @@ -0,0 +1,2 @@ +a: "(" num ")". {missing commas} +num: "1". diff --git a/tests/syntax/rule2.ixml b/tests/syntax/rule2.ixml new file mode 100644 index 00000000..858a1e64 --- /dev/null +++ b/tests/syntax/rule2.ixml @@ -0,0 +1,3 @@ +a: b, c. +a: b, c. {double defined} + diff --git a/tests/syntax/rule3.ixml b/tests/syntax/rule3.ixml new file mode 100644 index 00000000..a7d62838 --- /dev/null +++ b/tests/syntax/rule3.ixml @@ -0,0 +1,3 @@ +a: b, c. +b: b, c, . {spurious comma} +c: ".". diff --git a/tests/syntax/rule4.ixml b/tests/syntax/rule4.ixml new file mode 100644 index 00000000..6fc7a45b --- /dev/null +++ b/tests/syntax/rule4.ixml @@ -0,0 +1,3 @@ +a: b, c. +b: b, c . +c: ".") {Rule ends wrong} diff --git a/tests/syntax/rule5.ixml b/tests/syntax/rule5.ixml new file mode 100644 index 00000000..f5e0f315 --- /dev/null +++ b/tests/syntax/rule5.ixml @@ -0,0 +1,3 @@ +a: b, c. +$b: b, c. {illegal name} +c: ".". diff --git a/tests/syntax/rule6.ixml b/tests/syntax/rule6.ixml new file mode 100644 index 00000000..2125a456 --- /dev/null +++ b/tests/syntax/rule6.ixml @@ -0,0 +1,3 @@ +a: b, c. +b:: b, c. {double colon} +c: ".". diff --git a/tests/syntax/rule7.ixml b/tests/syntax/rule7.ixml new file mode 100644 index 00000000..818e291f --- /dev/null +++ b/tests/syntax/rule7.ixml @@ -0,0 +1,3 @@ +a: b, c. +^^b: b, c. {double marker} +c: ".". diff --git a/tests/syntax/rule8.ixml b/tests/syntax/rule8.ixml new file mode 100644 index 00000000..2a71ac67 --- /dev/null +++ b/tests/syntax/rule8.ixml @@ -0,0 +1 @@ +a: "", "" diff --git a/tests/syntax/rule9.ixml b/tests/syntax/rule9.ixml new file mode 100644 index 00000000..2592128b --- /dev/null +++ b/tests/syntax/rule9.ixml @@ -0,0 +1,4 @@ +a: 1, b, c. {illegal terminal} +b: . +c: . + diff --git a/tests/syntax/unterminated-comment.ixml b/tests/syntax/unterminated-comment.ixml new file mode 100644 index 00000000..1c434245 --- /dev/null +++ b/tests/syntax/unterminated-comment.ixml @@ -0,0 +1,3 @@ +a: b. {This is an unterminated comment +b: c. +c: . diff --git a/tests/syntax/unterminated-comment1.ixml b/tests/syntax/unterminated-comment1.ixml new file mode 100644 index 00000000..e2f881c0 --- /dev/null +++ b/tests/syntax/unterminated-comment1.ixml @@ -0,0 +1,4 @@ +a: b. {This is an unterminated comment +{with a nested comment} +b: c. +c: . diff --git a/tests/syntax/unterminated-comment2.ixml b/tests/syntax/unterminated-comment2.ixml new file mode 100644 index 00000000..9e3db3b1 --- /dev/null +++ b/tests/syntax/unterminated-comment2.ixml @@ -0,0 +1,5 @@ +a: b. {This is an unterminated comment + +b: c. +{with a nested unterminated comment +c: . diff --git a/tests/syntax/unused-rule.ixml b/tests/syntax/unused-rule.ixml new file mode 100644 index 00000000..00a49efb --- /dev/null +++ b/tests/syntax/unused-rule.ixml @@ -0,0 +1,6 @@ +a: b, undefined. +b: c. +c: . +unused: e. +e: f. +f: . diff --git a/tests/syntax/unused-rules.ixml b/tests/syntax/unused-rules.ixml new file mode 100644 index 00000000..c44422ba --- /dev/null +++ b/tests/syntax/unused-rules.ixml @@ -0,0 +1,7 @@ +a: b, undefined1. +b: c. +c: undefined2. +unused1: e. +e: f. +unused2: . +f: . diff --git a/tests/test-catalog.xml b/tests/test-catalog.xml new file mode 100644 index 00000000..ee5a9e95 --- /dev/null +++ b/tests/test-catalog.xml @@ -0,0 +1,30 @@ + + + +

Top-level catalog for tests provided by + Steven Pemberton in December 2021.

+

There are two sub-groups, one general + and one focused on syntax issues.

+
+ + + + + + + + + + + +
diff --git a/tests/tests/ambiguous/ambig.inp b/tests/tests/ambiguous/ambig.inp new file mode 100644 index 00000000..689fe269 --- /dev/null +++ b/tests/tests/ambiguous/ambig.inp @@ -0,0 +1,2 @@ +i+i+i + diff --git a/tests/tests/ambiguous/ambig.ixml b/tests/tests/ambiguous/ambig.ixml new file mode 100644 index 00000000..71085799 --- /dev/null +++ b/tests/tests/ambiguous/ambig.ixml @@ -0,0 +1,3 @@ +expr: e. +e: e, "+", e; e, "-", e; "i". + diff --git a/tests/tests/ambiguous/ambig.req b/tests/tests/ambiguous/ambig.req new file mode 100644 index 00000000..158573af --- /dev/null +++ b/tests/tests/ambiguous/ambig.req @@ -0,0 +1,22 @@ +expr: e. +e: e, "+", e; e, "-", e; "i". + +# +i+i+i + +# + + + + + i+ + + i+ + i + + + diff --git a/tests/tests/ambiguous/ambig2.inp b/tests/tests/ambiguous/ambig2.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/ambiguous/ambig2.ixml b/tests/tests/ambiguous/ambig2.ixml new file mode 100644 index 00000000..07a22f2a --- /dev/null +++ b/tests/tests/ambiguous/ambig2.ixml @@ -0,0 +1 @@ +a: "a"* ; "b"*. diff --git a/tests/tests/ambiguous/ambig2.req b/tests/tests/ambiguous/ambig2.req new file mode 100644 index 00000000..3ee583b4 --- /dev/null +++ b/tests/tests/ambiguous/ambig2.req @@ -0,0 +1,10 @@ +a: "a"* ; "b"*. +# +# + + +
diff --git a/tests/tests/ambiguous/ambig2a.inp b/tests/tests/ambiguous/ambig2a.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/ambiguous/ambig2a.ixml b/tests/tests/ambiguous/ambig2a.ixml new file mode 100644 index 00000000..141d6dc2 --- /dev/null +++ b/tests/tests/ambiguous/ambig2a.ixml @@ -0,0 +1,3 @@ +a: b; c. +-b: "b"*. +-c: "c"*. diff --git a/tests/tests/ambiguous/ambig2a.req b/tests/tests/ambiguous/ambig2a.req new file mode 100644 index 00000000..6c2a25f8 --- /dev/null +++ b/tests/tests/ambiguous/ambig2a.req @@ -0,0 +1,12 @@ +a: b; c. +-b: "b"*. +-c: "c"*. +# +# + + + diff --git a/tests/tests/ambiguous/ambig3.inp b/tests/tests/ambiguous/ambig3.inp new file mode 100644 index 00000000..6e4f387c --- /dev/null +++ b/tests/tests/ambiguous/ambig3.inp @@ -0,0 +1 @@ +a b diff --git a/tests/tests/ambiguous/ambig3.ixml b/tests/tests/ambiguous/ambig3.ixml new file mode 100644 index 00000000..2318c34c --- /dev/null +++ b/tests/tests/ambiguous/ambig3.ixml @@ -0,0 +1,3 @@ +a: "a", spaces, b. +b: spaces, "b". +spaces: " "*. diff --git a/tests/tests/ambiguous/ambig3.req b/tests/tests/ambiguous/ambig3.req new file mode 100644 index 00000000..2e0f3bf6 --- /dev/null +++ b/tests/tests/ambiguous/ambig3.req @@ -0,0 +1,19 @@ +a: "a", spaces, b. +b: spaces, "b". +spaces: " "*. +# +a b +# + + +a + + + b + diff --git a/tests/tests/ambiguous/ambig4.inp b/tests/tests/ambiguous/ambig4.inp new file mode 100644 index 00000000..2f715528 --- /dev/null +++ b/tests/tests/ambiguous/ambig4.inp @@ -0,0 +1,2 @@ +red=#f00 +green=#0f0 diff --git a/tests/tests/ambiguous/ambig4.ixml b/tests/tests/ambiguous/ambig4.ixml new file mode 100644 index 00000000..0d7a38f3 --- /dev/null +++ b/tests/tests/ambiguous/ambig4.ixml @@ -0,0 +1,5 @@ +properties: property+. +property: name, "=", value+",", eol. +name: [L]+. +value: ~[","]+. +eol: -#a. diff --git a/tests/tests/ambiguous/ambig4.req b/tests/tests/ambiguous/ambig4.req new file mode 100644 index 00000000..70a434c2 --- /dev/null +++ b/tests/tests/ambiguous/ambig4.req @@ -0,0 +1,27 @@ +properties: property+. +property: name, "=", value+",", eol. +name: [L]+. +value: ~[","]+. +eol: -#a. +# +red=#f00 +green=#0f0 +# + + + + + red= + #f00 + + + + green= + #0f0 + + + diff --git a/tests/tests/ambiguous/ambig5.inp b/tests/tests/ambiguous/ambig5.inp new file mode 100644 index 00000000..48082f72 --- /dev/null +++ b/tests/tests/ambiguous/ambig5.inp @@ -0,0 +1 @@ +12 diff --git a/tests/tests/ambiguous/ambig5.ixml b/tests/tests/ambiguous/ambig5.ixml new file mode 100644 index 00000000..fd589d5d --- /dev/null +++ b/tests/tests/ambiguous/ambig5.ixml @@ -0,0 +1,3 @@ +data: number+. +number: digit+. +digit: ["0"-"9"]. diff --git a/tests/tests/ambiguous/ambig5.req b/tests/tests/ambiguous/ambig5.req new file mode 100644 index 00000000..b274dbb0 --- /dev/null +++ b/tests/tests/ambiguous/ambig5.req @@ -0,0 +1,20 @@ +data: number+. +number: digit+. +digit: ["0"-"9"]. +# +12 +# + + + + + 1 + + + 2 + + diff --git a/tests/tests/ambiguous/ambig6.inp b/tests/tests/ambiguous/ambig6.inp new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/tests/tests/ambiguous/ambig6.inp @@ -0,0 +1 @@ +{} diff --git a/tests/tests/ambiguous/ambig6.ixml b/tests/tests/ambiguous/ambig6.ixml new file mode 100644 index 00000000..f0731182 --- /dev/null +++ b/tests/tests/ambiguous/ambig6.ixml @@ -0,0 +1,4 @@ +block: "{", rule*";", "}". +rule: name, "=", value; . +name: [L]+. +value: [Nd]+. diff --git a/tests/tests/ambiguous/ambig6.req b/tests/tests/ambiguous/ambig6.req new file mode 100644 index 00000000..280c9fae --- /dev/null +++ b/tests/tests/ambiguous/ambig6.req @@ -0,0 +1,14 @@ +block: "{", rule*";", "}". +rule: name, "=", value; . +name: [L]+. +value: [Nd]+. +# +{} +# + + +{} diff --git a/tests/tests/ambiguous/ambig7.inp b/tests/tests/ambiguous/ambig7.inp new file mode 100644 index 00000000..c53e6295 --- /dev/null +++ b/tests/tests/ambiguous/ambig7.inp @@ -0,0 +1 @@ +bc diff --git a/tests/tests/ambiguous/ambig7.ixml b/tests/tests/ambiguous/ambig7.ixml new file mode 100644 index 00000000..9e8392ba --- /dev/null +++ b/tests/tests/ambiguous/ambig7.ixml @@ -0,0 +1,3 @@ +a: b, ()?, c. +b: "b". +c: "c". diff --git a/tests/tests/ambiguous/ambig7.req b/tests/tests/ambiguous/ambig7.req new file mode 100644 index 00000000..ecd076c2 --- /dev/null +++ b/tests/tests/ambiguous/ambig7.req @@ -0,0 +1,16 @@ +a: b, ()?, c. +b: "b". +c: "c". +# +bc +# + + + + b + c + diff --git a/tests/tests/ambiguous/css.inp b/tests/tests/ambiguous/css.inp new file mode 100644 index 00000000..1f2c561f --- /dev/null +++ b/tests/tests/ambiguous/css.inp @@ -0,0 +1,2 @@ +body { color: blue; font-weight: bold; margin: 0; } +head {} diff --git a/tests/tests/ambiguous/css.ixml b/tests/tests/ambiguous/css.ixml new file mode 100644 index 00000000..987b8c26 --- /dev/null +++ b/tests/tests/ambiguous/css.ixml @@ -0,0 +1,12 @@ +css: S, rule+. +rule: selector, block. +block: -"{", S, property*(-";", S), -"}", S. +property: @name, S, -":", S, value; empty. +selector: name, S. +name: letter+. +-letter: ["a"-"z"; "-"]. +digit: ["0"-"9"]. +value: (@name; @number), S. +number: digit+. +-empty: . +-S: -[" "; #a]*. diff --git a/tests/tests/ambiguous/css.req b/tests/tests/ambiguous/css.req new file mode 100644 index 00000000..74111a2a --- /dev/null +++ b/tests/tests/ambiguous/css.req @@ -0,0 +1,47 @@ +css: S, rule+. +rule: selector, block. +block: -"{", S, property*(-";", S), -"}", S. +property: @name, S, -":", S, value; empty. +selector: name, S. +name: letter+. +-letter: ["a"-"z"; "-"]. +digit: ["0"-"9"]. +value: (@name; @number), S. +number: digit+. +-empty: . +-S: -[" "; #a]*. +# +body { color: blue; font-weight: bold; margin: 0; } +head {} +# + + + + + + body + + + + + + + + + + + + + + + + + head + + + + diff --git a/tests/tests/ambiguous/date.inp b/tests/tests/ambiguous/date.inp new file mode 100644 index 00000000..1cbea1a5 --- /dev/null +++ b/tests/tests/ambiguous/date.inp @@ -0,0 +1 @@ +The conference starts Thursday, 9th Feb 2017 at 10:00. diff --git a/tests/tests/ambiguous/date.ixml b/tests/tests/ambiguous/date.ixml new file mode 100644 index 00000000..15da79c0 --- /dev/null +++ b/tests/tests/ambiguous/date.ixml @@ -0,0 +1,38 @@ +date: bla, day, S, number, S, month, S, year, bla; + bla, number, S, month, S, year, bla; + bla, day, ",", S, number, S, month, S, year, bla. +day: Monday; Tuesday; Wednesday; Thursday; Friday; Saturday; Sunday. +Monday: "Mon"; "Monday". +Tuesday: "Tue"; "Tuesday". +Wednesday: "Wed"; "Weds"; "Wednesday". +Thursday: "Thu"; "Thur"; "Thurs"; "Thursday". +Friday: "Fri"; "Friday". +Saturday: "Sat"; "Saturday". +Sunday: "Sun"; "Sunday". +number: cardinal; ordinal. +cardinal: digits1, "st"; digits2, "nd"; digits3, "rd"; digits4,"th". +ordinal: digits. +-digits: digit+. +-digit: ["0"-"9"]. +-digits1: "1"; digits, "1". +-digits2: "2"; digits, "2". +-digits3: "3"; digits, "3". +-digits4: digit4; digits, digit4. +-digit4: ["4"-"9"]; "0". +-bla: ; char, bla. +-char: [" "-"~"]. +month: January; February; March; April; May; June; July; August; September; October; November; December. +year: digit, digit, digit, digit. +January: "January"; "Jan". +February: "February"; "Feb". +March: "March"; "Mar". +April: "April"; "Apr". +May: "May". +June: "June"; "Jun". +July: "July"; "Jul". +August: "August"; "Aug". +September: "September"; "Sept"; "Sep". +October: "October"; "Oct". +November: "November"; "Nov". +December: "December"; "Dec". +-S: " "*. diff --git a/tests/tests/ambiguous/date.req b/tests/tests/ambiguous/date.req new file mode 100644 index 00000000..d2718514 --- /dev/null +++ b/tests/tests/ambiguous/date.req @@ -0,0 +1,58 @@ +date: bla, day, S, number, S, month, S, year, bla; + bla, number, S, month, S, year, bla; + bla, day, ",", S, number, S, month, S, year, bla. +day: Monday; Tuesday; Wednesday; Thursday; Friday; Saturday; Sunday. +Monday: "Mon"; "Monday". +Tuesday: "Tue"; "Tuesday". +Wednesday: "Wed"; "Weds"; "Wednesday". +Thursday: "Thu"; "Thur"; "Thurs"; "Thursday". +Friday: "Fri"; "Friday". +Saturday: "Sat"; "Saturday". +Sunday: "Sun"; "Sunday". +number: cardinal; ordinal. +cardinal: digits1, "st"; digits2, "nd"; digits3, "rd"; digits4,"th". +ordinal: digits. +-digits: digit+. +-digit: ["0"-"9"]. +-digits1: "1"; digits, "1". +-digits2: "2"; digits, "2". +-digits3: "3"; digits, "3". +-digits4: digit4; digits, digit4. +-digit4: ["4"-"9"]; "0". +-bla: ; char, bla. +-char: [" "-"~"]. +month: January; February; March; April; May; June; July; August; September; October; November; December. +year: digit, digit, digit, digit. +January: "January"; "Jan". +February: "February"; "Feb". +March: "March"; "Mar". +April: "April"; "Apr". +May: "May". +June: "June"; "Jun". +July: "July"; "Jul". +August: "August"; "Aug". +September: "September"; "Sept"; "Sep". +October: "October"; "Oct". +November: "November"; "Nov". +December: "December"; "Dec". +-S: " "*. +# +The conference starts Thursday, 9th Feb 2017 at 10:00. +# + + +The conference starts + + Thursday + , + + 9th + + + Feb + + 2017 at 10:00. diff --git a/tests/tests/ambiguous/empty-parens.inp b/tests/tests/ambiguous/empty-parens.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/ambiguous/empty-parens.ixml b/tests/tests/ambiguous/empty-parens.ixml new file mode 100644 index 00000000..295f1c8f --- /dev/null +++ b/tests/tests/ambiguous/empty-parens.ixml @@ -0,0 +1 @@ +a: "a"; ()?. diff --git a/tests/tests/ambiguous/empty-parens.req b/tests/tests/ambiguous/empty-parens.req new file mode 100644 index 00000000..8a456ffd --- /dev/null +++ b/tests/tests/ambiguous/empty-parens.req @@ -0,0 +1,10 @@ +a: "a"; ()?. +# +# + + + diff --git a/tests/tests/ambiguous/expr0.inp b/tests/tests/ambiguous/expr0.inp new file mode 100644 index 00000000..77086402 --- /dev/null +++ b/tests/tests/ambiguous/expr0.inp @@ -0,0 +1 @@ +a÷b÷c diff --git a/tests/tests/ambiguous/expr0.ixml b/tests/tests/ambiguous/expr0.ixml new file mode 100644 index 00000000..a6a1d7ce --- /dev/null +++ b/tests/tests/ambiguous/expr0.ixml @@ -0,0 +1,14 @@ +{expr: operand+operator. +operand: id; number. +-id: @name. +name: letter+. +-number: @value. +value: digit+. +letter: ["a"-"z"]. +digit: ["0"-"9"]. +operator: "+"; "-"; "×"; "÷". + } +expr: id; number; expr, operator, expr. +id: ["a"-"z"]+. +number: ["0"-"9"]+. +operator: "+"; "-"; "×"; "÷". diff --git a/tests/tests/ambiguous/expr0.req b/tests/tests/ambiguous/expr0.req new file mode 100644 index 00000000..11543fd7 --- /dev/null +++ b/tests/tests/ambiguous/expr0.req @@ -0,0 +1,38 @@ +{expr: operand+operator. +operand: id; number. +-id: @name. +name: letter+. +-number: @value. +value: digit+. +letter: ["a"-"z"]. +digit: ["0"-"9"]. +operator: "+"; "-"; "×"; "÷". + } +expr: id; number; expr, operator, expr. +id: ["a"-"z"]+. +number: ["0"-"9"]+. +operator: "+"; "-"; "×"; "÷". +# +a÷b÷c +# + + + + + a + + ÷ + + + b + + ÷ + + c + + + diff --git a/tests/tests/ambiguous/lf2.inp b/tests/tests/ambiguous/lf2.inp new file mode 100644 index 00000000..984acbd1 --- /dev/null +++ b/tests/tests/ambiguous/lf2.inp @@ -0,0 +1,3 @@ +Now is the time +For all good people +To have fun. diff --git a/tests/tests/ambiguous/lf2.ixml b/tests/tests/ambiguous/lf2.ixml new file mode 100644 index 00000000..ed08b3ae --- /dev/null +++ b/tests/tests/ambiguous/lf2.ixml @@ -0,0 +1,3 @@ +input: line+lf, lf?. +line: ~[#a]*. +lf: -#a. diff --git a/tests/tests/ambiguous/lf2.req b/tests/tests/ambiguous/lf2.req new file mode 100644 index 00000000..a2e5a0f5 --- /dev/null +++ b/tests/tests/ambiguous/lf2.req @@ -0,0 +1,22 @@ +input: line+lf, lf?. +line: ~[#a]*. +lf: -#a. +# +Now is the time +For all good people +To have fun. +# + + + + Now is the time + + For all good people + + To have fun. + + diff --git a/tests/tests/correct/a.ixml-fail b/tests/tests/correct/a.ixml-fail new file mode 100644 index 00000000..309d7c2a --- /dev/null +++ b/tests/tests/correct/a.ixml-fail @@ -0,0 +1 @@ +S: 'a'; S. diff --git a/tests/tests/correct/address.inp b/tests/tests/correct/address.inp new file mode 100644 index 00000000..11a9245a --- /dev/null +++ b/tests/tests/correct/address.inp @@ -0,0 +1,4 @@ +Steven Pemberton +21 Sandridge Road +St Albans AL1 4BY +United Kingdom diff --git a/tests/tests/correct/address.ixml b/tests/tests/correct/address.ixml new file mode 100644 index 00000000..629c4a5c --- /dev/null +++ b/tests/tests/correct/address.ixml @@ -0,0 +1,22 @@ +address: person, lf, street, lf, postcode, city, lf, country, lf; + person, lf, street, lf, city, postcode, lf, country, lf. +person: (title, S?)?, (initials; given, S), surname, S?. +title: "Mr."; "Mrs."; "Dr."; "Ms.". +initials: initial+. +initial: LETTER, ".", S?. +surname: name. +given: name. +-name: LETTER, letters. +street: no, S?, streetname; streetname, S?, no, S?. +streetname: name, S; name, S, name. +city: name, S; name, S, name, S. +country: name, S?; name, S, name, S?. +postcode: digits, S, LETTER, LETTER, S?; + LETTER, LETTER, digits, S, digit, LETTER, LETTER, S?. +no: digits. +-LETTER: ["A"-"Z"]. +-letters: ["a"-"z"]*. +-digit: ["0"-"9"]. +-digits: ["0"-"9"]+. +-S: " "+. +-lf: -#a. diff --git a/tests/tests/correct/address.req b/tests/tests/correct/address.req new file mode 100644 index 00000000..e3667c4f --- /dev/null +++ b/tests/tests/correct/address.req @@ -0,0 +1,42 @@ +address: person, lf, street, lf, postcode, city, lf, country, lf; + person, lf, street, lf, city, postcode, lf, country, lf. +person: (title, S?)?, (initials; given, S), surname, S?. +title: "Mr."; "Mrs."; "Dr."; "Ms.". +initials: initial+. +initial: LETTER, ".", S?. +surname: name. +given: name. +-name: LETTER, letters. +street: no, S?, streetname; streetname, S?, no, S?. +streetname: name, S; name, S, name. +city: name, S; name, S, name, S. +country: name, S?; name, S, name, S?. +postcode: digits, S, LETTER, LETTER, S?; + LETTER, LETTER, digits, S, digit, LETTER, LETTER, S?. +no: digits. +-LETTER: ["A"-"Z"]. +-letters: ["a"-"z"]*. +-digit: ["0"-"9"]. +-digits: ["0"-"9"]+. +-S: " "+. +-lf: -#a. +# +Steven Pemberton +21 Sandridge Road +St Albans AL1 4BY +United Kingdom +# + +
+ + Steven + Pemberton + + + 21 + Sandridge Road + + St Albans + AL1 4BY + United Kingdom +
diff --git a/tests/tests/correct/arith.inp b/tests/tests/correct/arith.inp new file mode 100644 index 00000000..5853e7f5 --- /dev/null +++ b/tests/tests/correct/arith.inp @@ -0,0 +1 @@ +(a+b) diff --git a/tests/tests/correct/arith.ixml b/tests/tests/correct/arith.ixml new file mode 100644 index 00000000..446c4696 --- /dev/null +++ b/tests/tests/correct/arith.ixml @@ -0,0 +1,8 @@ +expr: open, -arith, close. +open: "(". +close: ")". +arith: left, -op, right. +op: @plus. +plus: "+". +left: "a". +right:"b". diff --git a/tests/tests/correct/arith.req b/tests/tests/correct/arith.req new file mode 100644 index 00000000..60d39fde --- /dev/null +++ b/tests/tests/correct/arith.req @@ -0,0 +1,18 @@ +expr: open, -arith, close. +open: "(". +close: ")". +arith: left, -op, right. +op: @plus. +plus: "+". +left: "a". +right:"b". +# +(a+b) +# + + + ( + a + b + ) + diff --git a/tests/tests/correct/attribute-value.inp b/tests/tests/correct/attribute-value.inp new file mode 100644 index 00000000..fda91d52 --- /dev/null +++ b/tests/tests/correct/attribute-value.inp @@ -0,0 +1 @@ +"'<>/&. diff --git a/tests/tests/correct/attribute-value.ixml b/tests/tests/correct/attribute-value.ixml new file mode 100644 index 00000000..17421be1 --- /dev/null +++ b/tests/tests/correct/attribute-value.ixml @@ -0,0 +1,2 @@ +content: @a, -".". +a: ~["."]*. diff --git a/tests/tests/correct/attribute-value.req b/tests/tests/correct/attribute-value.req new file mode 100644 index 00000000..9537dfe6 --- /dev/null +++ b/tests/tests/correct/attribute-value.req @@ -0,0 +1,7 @@ +content: @a, -".". +a: ~["."]*. +# +"'<>/&. +# + + diff --git a/tests/tests/correct/diary.inp b/tests/tests/correct/diary.inp new file mode 100644 index 00000000..216fcfe1 --- /dev/null +++ b/tests/tests/correct/diary.inp @@ -0,0 +1,9 @@ +24 December 2021 +Panic shopping! Panic packing! Will we make it before midnight? + +25 December 2021 +Food! Presents! + +26 December 2021 +Groan. + diff --git a/tests/tests/correct/diary.ixml b/tests/tests/correct/diary.ixml new file mode 100644 index 00000000..49c02709 --- /dev/null +++ b/tests/tests/correct/diary.ixml @@ -0,0 +1,15 @@ +diary: entry+. +entry: date, para. +date: day, s, month, s, year, -#a. +day: digit, digit?. +-digit:["0"-"9"]. +month: "January"; "February"; "March"; "April"; "May"; "June"; + "July"; "August"; "September"; "October"; "November"; "December". +year: digit, digit, digit, digit. + +para: word+s, s?, blank. +-blank: -#a, -#a. +-word: (letter; punctuation)+. +-letter: [L]. +-punctuation: [".;:,'?!"]. +-s: " "+. diff --git a/tests/tests/correct/diary.req b/tests/tests/correct/diary.req new file mode 100644 index 00000000..422135c2 --- /dev/null +++ b/tests/tests/correct/diary.req @@ -0,0 +1,53 @@ +diary: entry+. +entry: date, para. +date: day, s, month, s, year, -#a. +day: digit, digit?. +-digit:["0"-"9"]. +month: "January"; "February"; "March"; "April"; "May"; "June"; + "July"; "August"; "September"; "October"; "November"; "December". +year: digit, digit, digit, digit. + +para: word+s, s?, blank. +-blank: -#a, -#a. +-word: (letter; punctuation)+. +-letter: [L]. +-punctuation: [".;:,'?!"]. +-s: " "+. +# +24 December 2021 +Panic shopping! Panic packing! Will we make it before midnight? + +25 December 2021 +Food! Presents! + +26 December 2021 +Groan. + +# + + + + + 24 + December + 2021 + + Panic shopping! Panic packing! Will we make it before midnight? + + + + 25 + December + 2021 + + Food! Presents! + + + + 26 + December + 2021 + + Groan. + + diff --git a/tests/tests/correct/diary2.inp b/tests/tests/correct/diary2.inp new file mode 100644 index 00000000..216fcfe1 --- /dev/null +++ b/tests/tests/correct/diary2.inp @@ -0,0 +1,9 @@ +24 December 2021 +Panic shopping! Panic packing! Will we make it before midnight? + +25 December 2021 +Food! Presents! + +26 December 2021 +Groan. + diff --git a/tests/tests/correct/diary2.ixml b/tests/tests/correct/diary2.ixml new file mode 100644 index 00000000..f1900a03 --- /dev/null +++ b/tests/tests/correct/diary2.ixml @@ -0,0 +1,15 @@ +diary: entry+. +entry: date, para. +date: day, s, month, s, year, -#a. +day: digit, digit?. +-digit:["0"-"9"]. +month: "January"; "February"; "March"; "April"; "May"; "June"; + "July"; "August"; "September"; "October"; "November"; "December". +year: digit, digit, digit, digit. + +para: char*, blank. +-blank: -#a, -#a. +-char: letter; punctuation; s. +-letter: [L]. +-punctuation: [".;:,'?!"]. +-s: " ". diff --git a/tests/tests/correct/diary2.req b/tests/tests/correct/diary2.req new file mode 100644 index 00000000..f4570a4f --- /dev/null +++ b/tests/tests/correct/diary2.req @@ -0,0 +1,53 @@ +diary: entry+. +entry: date, para. +date: day, s, month, s, year, -#a. +day: digit, digit?. +-digit:["0"-"9"]. +month: "January"; "February"; "March"; "April"; "May"; "June"; + "July"; "August"; "September"; "October"; "November"; "December". +year: digit, digit, digit, digit. + +para: char*, blank. +-blank: -#a, -#a. +-char: letter; punctuation; s. +-letter: [L]. +-punctuation: [".;:,'?!"]. +-s: " ". +# +24 December 2021 +Panic shopping! Panic packing! Will we make it before midnight? + +25 December 2021 +Food! Presents! + +26 December 2021 +Groan. + +# + + + + + 24 + December + 2021 + + Panic shopping! Panic packing! Will we make it before midnight? + + + + 25 + December + 2021 + + Food! Presents! + + + + 26 + December + 2021 + + Groan. + + diff --git a/tests/tests/correct/diary3.inp b/tests/tests/correct/diary3.inp new file mode 100644 index 00000000..216fcfe1 --- /dev/null +++ b/tests/tests/correct/diary3.inp @@ -0,0 +1,9 @@ +24 December 2021 +Panic shopping! Panic packing! Will we make it before midnight? + +25 December 2021 +Food! Presents! + +26 December 2021 +Groan. + diff --git a/tests/tests/correct/diary3.ixml b/tests/tests/correct/diary3.ixml new file mode 100644 index 00000000..cc1f24f6 --- /dev/null +++ b/tests/tests/correct/diary3.ixml @@ -0,0 +1,13 @@ +diary: entry+. +entry: date, para. +date: day, s, month, s, year, -#a. +-s: -" "+. +day: digit, digit?. +-digit:["0"-"9"]. +month: "January"; "February"; "March"; "April"; "May"; "June"; + "July"; "August"; "September"; "October"; "November"; "December". +year: digit, digit, digit, digit. + +para: char*, blank. +-blank: -#a, -#a. +-char: ~[#a]. diff --git a/tests/tests/correct/diary3.req b/tests/tests/correct/diary3.req new file mode 100644 index 00000000..83e762cb --- /dev/null +++ b/tests/tests/correct/diary3.req @@ -0,0 +1,51 @@ +diary: entry+. +entry: date, para. +date: day, s, month, s, year, -#a. +-s: -" "+. +day: digit, digit?. +-digit:["0"-"9"]. +month: "January"; "February"; "March"; "April"; "May"; "June"; + "July"; "August"; "September"; "October"; "November"; "December". +year: digit, digit, digit, digit. + +para: char*, blank. +-blank: -#a, -#a. +-char: ~[#a]. +# +24 December 2021 +Panic shopping! Panic packing! Will we make it before midnight? + +25 December 2021 +Food! Presents! + +26 December 2021 +Groan. + +# + + + + + 24 + December + 2021 + + Panic shopping! Panic packing! Will we make it before midnight? + + + + 25 + December + 2021 + + Food! Presents! + + + + 26 + December + 2021 + + Groan. + + diff --git a/tests/tests/correct/element-content.inp b/tests/tests/correct/element-content.inp new file mode 100644 index 00000000..fda91d52 --- /dev/null +++ b/tests/tests/correct/element-content.inp @@ -0,0 +1 @@ +"'<>/&. diff --git a/tests/tests/correct/element-content.ixml b/tests/tests/correct/element-content.ixml new file mode 100644 index 00000000..5b0fa6c1 --- /dev/null +++ b/tests/tests/correct/element-content.ixml @@ -0,0 +1,2 @@ +content: -a, -".". +a: ~["."]*. diff --git a/tests/tests/correct/element-content.req b/tests/tests/correct/element-content.req new file mode 100644 index 00000000..493058a8 --- /dev/null +++ b/tests/tests/correct/element-content.req @@ -0,0 +1,7 @@ +content: -a, -".". +a: ~["."]*. +# +"'<>/&. +# + +"'<>/& diff --git a/tests/tests/correct/email.inp b/tests/tests/correct/email.inp new file mode 100644 index 00000000..023051f7 --- /dev/null +++ b/tests/tests/correct/email.inp @@ -0,0 +1 @@ +~my_mail+{nospam}$?@sub-domain.example.info diff --git a/tests/tests/correct/email.ixml b/tests/tests/correct/email.ixml new file mode 100644 index 00000000..9d48c04a --- /dev/null +++ b/tests/tests/correct/email.ixml @@ -0,0 +1,8 @@ +email: user, -"@", host. +@user: atom+".". +-atom: char+. +@host: domain+".". +-domain: word+"-". +-word: letgit+. +-letgit: ["A"-"Z"; "a"-"z"; "0"-"9"]. +-char: letgit; ["!#$%&'*+-/=?^_`{|}~"]. diff --git a/tests/tests/correct/email.req b/tests/tests/correct/email.req new file mode 100644 index 00000000..7ca05810 --- /dev/null +++ b/tests/tests/correct/email.req @@ -0,0 +1,13 @@ +email: user, -"@", host. +@user: atom+".". +-atom: char+. +@host: domain+".". +-domain: word+"-". +-word: letgit+. +-letgit: ["A"-"Z"; "a"-"z"; "0"-"9"]. +-char: letgit; ["!#$%&'*+-/=?^_`{|}~"]. +# +~my_mail+{nospam}$?@sub-domain.example.info +# + + diff --git a/tests/tests/correct/empty-group.inp b/tests/tests/correct/empty-group.inp new file mode 100644 index 00000000..e5d8f44b --- /dev/null +++ b/tests/tests/correct/empty-group.inp @@ -0,0 +1 @@ +bc \ No newline at end of file diff --git a/tests/tests/correct/empty-group.ixml b/tests/tests/correct/empty-group.ixml new file mode 100644 index 00000000..76f9bd31 --- /dev/null +++ b/tests/tests/correct/empty-group.ixml @@ -0,0 +1,3 @@ +a: b, (), c. +b: "b". +c: "c". diff --git a/tests/tests/correct/empty-group.req b/tests/tests/correct/empty-group.req new file mode 100644 index 00000000..4cea1194 --- /dev/null +++ b/tests/tests/correct/empty-group.req @@ -0,0 +1,10 @@ +a: b, (), c. +b: "b". +c: "c". +# +bc# + +
+ b + c + diff --git a/tests/tests/correct/expr.inp b/tests/tests/correct/expr.inp new file mode 100644 index 00000000..878bc02d --- /dev/null +++ b/tests/tests/correct/expr.inp @@ -0,0 +1 @@ +pi+(10×b) diff --git a/tests/tests/correct/expr.ixml b/tests/tests/correct/expr.ixml new file mode 100644 index 00000000..02d952b0 --- /dev/null +++ b/tests/tests/correct/expr.ixml @@ -0,0 +1,15 @@ +expression: expr. +-expr: term; sum; diff. +sum: expr, -"+", term. +diff: expr, "-", term. +-term: factor; prod; div. +prod: term, -"×", factor. +div: term, "÷", factor. +-factor: id; number; bracketed. +bracketed: -"(", expr, -")". +id: @name. +name: letter+. +number: @value. +value: digit+. +-letter: ["a"-"z"]. +-digit: ["0"-"9"]. diff --git a/tests/tests/correct/expr.req b/tests/tests/correct/expr.req new file mode 100644 index 00000000..312afb78 --- /dev/null +++ b/tests/tests/correct/expr.req @@ -0,0 +1,30 @@ +expression: expr. +-expr: term; sum; diff. +sum: expr, -"+", term. +diff: expr, "-", term. +-term: factor; prod; div. +prod: term, -"×", factor. +div: term, "÷", factor. +-factor: id; number; bracketed. +bracketed: -"(", expr, -")". +id: @name. +name: letter+. +number: @value. +value: digit+. +-letter: ["a"-"z"]. +-digit: ["0"-"9"]. +# +pi+(10×b) +# + + + + + + + + + + + + diff --git a/tests/tests/correct/expr1.inp b/tests/tests/correct/expr1.inp new file mode 100644 index 00000000..b762436c --- /dev/null +++ b/tests/tests/correct/expr1.inp @@ -0,0 +1,2 @@ +1+2+3*4+5 + diff --git a/tests/tests/correct/expr1.ixml b/tests/tests/correct/expr1.ixml new file mode 100644 index 00000000..a9a6393b --- /dev/null +++ b/tests/tests/correct/expr1.ixml @@ -0,0 +1,13 @@ +expression: expr. +-expr: term+plusop. +@plusop: "+"; "-". +term: -factor; factor, mulop, factor+mulop. +@mulop: "*"; "/". +factor: id; number; bracketed. +bracketed: -"(", expr, -")". +id: @name. +name: letter+. +number: @value. +value: digit+. +-letter: ["a"-"z"]. +-digit: ["0"-"9"]. diff --git a/tests/tests/correct/expr1.req b/tests/tests/correct/expr1.req new file mode 100644 index 00000000..bd0b0c8a --- /dev/null +++ b/tests/tests/correct/expr1.req @@ -0,0 +1,37 @@ +expression: expr. +-expr: term+plusop. +@plusop: "+"; "-". +term: -factor; factor, mulop, factor+mulop. +@mulop: "*"; "/". +factor: id; number; bracketed. +bracketed: -"(", expr, -")". +id: @name. +name: letter+. +number: @value. +value: digit+. +-letter: ["a"-"z"]. +-digit: ["0"-"9"]. +# +1+2+3*4+5 + +# + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tests/correct/expr2.inp b/tests/tests/correct/expr2.inp new file mode 100644 index 00000000..0cae92a7 --- /dev/null +++ b/tests/tests/correct/expr2.inp @@ -0,0 +1 @@ +234×(bbbb+cccc+dddd)×12 \ No newline at end of file diff --git a/tests/tests/correct/expr2.ixml b/tests/tests/correct/expr2.ixml new file mode 100644 index 00000000..6c55b2a6 --- /dev/null +++ b/tests/tests/correct/expr2.ixml @@ -0,0 +1,10 @@ +expression: expr. +-expr: term; sum; diff. +sum: term, -"+", term+-"+". +diff: term, -"-", term+-"-". +-term: factor; prod; div. +prod: factor, -"×", factor+-"×". +div: factor, -"÷", factor+-"÷". +-factor: name; number; -"(", ^expr, -")". +name: ["a"-"z"]+. +number: ["0"-"9"]+. diff --git a/tests/tests/correct/expr2.req b/tests/tests/correct/expr2.req new file mode 100644 index 00000000..00313033 --- /dev/null +++ b/tests/tests/correct/expr2.req @@ -0,0 +1,26 @@ +expression: expr. +-expr: term; sum; diff. +sum: term, -"+", term+-"+". +diff: term, -"-", term+-"-". +-term: factor; prod; div. +prod: factor, -"×", factor+-"×". +div: factor, -"÷", factor+-"÷". +-factor: name; number; -"(", ^expr, -")". +name: ["a"-"z"]+. +number: ["0"-"9"]+. +# +234×(bbbb+cccc+dddd)×12# + + + + 234 + + + bbbb + cccc + dddd + + + 12 + + diff --git a/tests/tests/correct/expr3.inp b/tests/tests/correct/expr3.inp new file mode 100644 index 00000000..fbd27c0a --- /dev/null +++ b/tests/tests/correct/expr3.inp @@ -0,0 +1,2 @@ +234×(bbbb+cccc+dddd)×12 + diff --git a/tests/tests/correct/expr3.ixml b/tests/tests/correct/expr3.ixml new file mode 100644 index 00000000..4df1d6a7 --- /dev/null +++ b/tests/tests/correct/expr3.ixml @@ -0,0 +1,11 @@ +expression: expr. +-expr: term; sum; diff. +sum: term, "+", term+"+". +diff: term, "-", term+"-". +-term: factor; prod; div. +prod: factor, "×", factor+"×". +div: factor, "÷", factor+"÷". +-factor: name; number; bracketed. +bracketed: "(", expr, ")". +name: ["a"-"z"]+. +number: ["0"-"9"]+. diff --git a/tests/tests/correct/expr3.req b/tests/tests/correct/expr3.req new file mode 100644 index 00000000..0d42a022 --- /dev/null +++ b/tests/tests/correct/expr3.req @@ -0,0 +1,28 @@ +expression: expr. +-expr: term; sum; diff. +sum: term, "+", term+"+". +diff: term, "-", term+"-". +-term: factor; prod; div. +prod: factor, "×", factor+"×". +div: factor, "÷", factor+"÷". +-factor: name; number; bracketed. +bracketed: "(", expr, ")". +name: ["a"-"z"]+. +number: ["0"-"9"]+. +# +234×(bbbb+cccc+dddd)×12 + +# + + + + 234× + ( + + bbbb+ + cccc+ + dddd + )× + 12 + + diff --git a/tests/tests/correct/expr4.inp b/tests/tests/correct/expr4.inp new file mode 100644 index 00000000..7d7b8281 --- /dev/null +++ b/tests/tests/correct/expr4.inp @@ -0,0 +1 @@ +pi+(10×a×b)+3.14 diff --git a/tests/tests/correct/expr4.ixml b/tests/tests/correct/expr4.ixml new file mode 100644 index 00000000..932eeb9b --- /dev/null +++ b/tests/tests/correct/expr4.ixml @@ -0,0 +1,8 @@ +expression: expr. +-expr: term; sum. +sum: term, "+", term+"+". +-term: factor; prod. +prod: factor, "×", factor+"×". +-factor: id; number; "(", expr, ")". +id: ["a"-"z"]+. +number: ["0"-"9"]+, (".", ["0"-"9"]+)?. diff --git a/tests/tests/correct/expr4.req b/tests/tests/correct/expr4.req new file mode 100644 index 00000000..29e4a942 --- /dev/null +++ b/tests/tests/correct/expr4.req @@ -0,0 +1,23 @@ +expression: expr. +-expr: term; sum. +sum: term, "+", term+"+". +-term: factor; prod. +prod: factor, "×", factor+"×". +-factor: id; number; "(", expr, ")". +id: ["a"-"z"]+. +number: ["0"-"9"]+, (".", ["0"-"9"]+)?. +# +pi+(10×a×b)+3.14 +# + + + + pi+( + + 10× + a× + b + )+ + 3.14 + + diff --git a/tests/tests/correct/expr5.inp b/tests/tests/correct/expr5.inp new file mode 100644 index 00000000..ba65a938 --- /dev/null +++ b/tests/tests/correct/expr5.inp @@ -0,0 +1 @@ +(3) diff --git a/tests/tests/correct/expr5.ixml b/tests/tests/correct/expr5.ixml new file mode 100644 index 00000000..b1533f7a --- /dev/null +++ b/tests/tests/correct/expr5.ixml @@ -0,0 +1,14 @@ +expression: expr. +-expr: term; sum; diff. +sum: expr, -"+", term. +diff: expr, "-", term. +-term: factor; prod; div. +prod: term, -"×", factor. +div: term, "÷", factor. +-factor: id; number; bracketed. +bracketed: -"(", expr, -")". +id: @name. +name: letter+. +number: digit+. +-letter: ["a"-"z"]. +-digit: ["0"-"9"]. diff --git a/tests/tests/correct/expr5.req b/tests/tests/correct/expr5.req new file mode 100644 index 00000000..68a80b61 --- /dev/null +++ b/tests/tests/correct/expr5.req @@ -0,0 +1,23 @@ +expression: expr. +-expr: term; sum; diff. +sum: expr, -"+", term. +diff: expr, "-", term. +-term: factor; prod; div. +prod: term, -"×", factor. +div: term, "÷", factor. +-factor: id; number; bracketed. +bracketed: -"(", expr, -")". +id: @name. +name: letter+. +number: digit+. +-letter: ["a"-"z"]. +-digit: ["0"-"9"]. +# +(3) +# + + + + 3 + + diff --git a/tests/tests/correct/expr6.inp b/tests/tests/correct/expr6.inp new file mode 100644 index 00000000..ea242b87 --- /dev/null +++ b/tests/tests/correct/expr6.inp @@ -0,0 +1 @@ +a^2+b×3+c^2 diff --git a/tests/tests/correct/expr6.ixml b/tests/tests/correct/expr6.ixml new file mode 100644 index 00000000..3bc9fcb2 --- /dev/null +++ b/tests/tests/correct/expr6.ixml @@ -0,0 +1,15 @@ +expression: expr. +-expr: term; sum; diff. +sum: term, "+", term+"+". +diff: term, "-", term+"-". +-term: power; prod; div. +prod: power, "×", power+"×". +div: power, "÷", power+"÷". +-power: fact; exp. +exp: fact, "^", fact+"^". +-fact: id; number; bracketed. +bracketed: "(", exp, ")". +id: letter+. +number: digit+. +-letter: ["a"-"z"]. +-digit: ['0'-'9']. diff --git a/tests/tests/correct/expr6.req b/tests/tests/correct/expr6.req new file mode 100644 index 00000000..25606c21 --- /dev/null +++ b/tests/tests/correct/expr6.req @@ -0,0 +1,35 @@ +expression: expr. +-expr: term; sum; diff. +sum: term, "+", term+"+". +diff: term, "-", term+"-". +-term: power; prod; div. +prod: power, "×", power+"×". +div: power, "÷", power+"÷". +-power: fact; exp. +exp: fact, "^", fact+"^". +-fact: id; number; bracketed. +bracketed: "(", exp, ")". +id: letter+. +number: digit+. +-letter: ["a"-"z"]. +-digit: ['0'-'9']. +# +a^2+b×3+c^2 +# + + + + + a^ + 2 + + + + b× + 3 + + + + c^ + 2 + + + diff --git a/tests/tests/correct/hash.inp b/tests/tests/correct/hash.inp new file mode 100644 index 00000000..00e7e018 --- /dev/null +++ b/tests/tests/correct/hash.inp @@ -0,0 +1,2 @@ +#1 #12 #123 #1234 #12345 #123456 #1. + diff --git a/tests/tests/correct/hash.ixml b/tests/tests/correct/hash.ixml new file mode 100644 index 00000000..3a057ae0 --- /dev/null +++ b/tests/tests/correct/hash.ixml @@ -0,0 +1,5 @@ +hashes: hash*S, ".". +hash: "#", d6. +@d6: d, (d, (d, (d, (d, d?)?)?)?)?. +-d: ["0"-"9"]. +-S: " "+. diff --git a/tests/tests/correct/hash.req b/tests/tests/correct/hash.req new file mode 100644 index 00000000..3b617fdf --- /dev/null +++ b/tests/tests/correct/hash.req @@ -0,0 +1,18 @@ +hashes: hash*S, ".". +hash: "#", d6. +@d6: d, (d, (d, (d, (d, d?)?)?)?)?. +-d: ["0"-"9"]. +-S: " "+. +# +#1 #12 #123 #1234 #12345 #123456 #1. + +# + + + # + # + # + # + # + # + #. diff --git a/tests/tests/correct/hex.inp b/tests/tests/correct/hex.inp new file mode 100644 index 00000000..b2901ea9 --- /dev/null +++ b/tests/tests/correct/hex.inp @@ -0,0 +1 @@ +a b diff --git a/tests/tests/correct/hex.ixml b/tests/tests/correct/hex.ixml new file mode 100644 index 00000000..a89f2e15 --- /dev/null +++ b/tests/tests/correct/hex.ixml @@ -0,0 +1 @@ +hex: "a", [#20], "b". diff --git a/tests/tests/correct/hex.req b/tests/tests/correct/hex.req new file mode 100644 index 00000000..c2885a97 --- /dev/null +++ b/tests/tests/correct/hex.req @@ -0,0 +1,6 @@ +hex: "a", [#20], "b". +# +a b +# + +a b diff --git a/tests/tests/correct/hex1.inp b/tests/tests/correct/hex1.inp new file mode 100644 index 00000000..b2901ea9 --- /dev/null +++ b/tests/tests/correct/hex1.inp @@ -0,0 +1 @@ +a b diff --git a/tests/tests/correct/hex1.ixml b/tests/tests/correct/hex1.ixml new file mode 100644 index 00000000..dc0ea049 --- /dev/null +++ b/tests/tests/correct/hex1.ixml @@ -0,0 +1 @@ +hex: "a", #20, "b". diff --git a/tests/tests/correct/hex1.req b/tests/tests/correct/hex1.req new file mode 100644 index 00000000..f052320e --- /dev/null +++ b/tests/tests/correct/hex1.req @@ -0,0 +1,6 @@ +hex: "a", #20, "b". +# +a b +# + +a b diff --git a/tests/tests/correct/hex3.inp b/tests/tests/correct/hex3.inp new file mode 100644 index 00000000..f32982dd --- /dev/null +++ b/tests/tests/correct/hex3.inp @@ -0,0 +1 @@ +a!b diff --git a/tests/tests/correct/hex3.ixml b/tests/tests/correct/hex3.ixml new file mode 100644 index 00000000..847fbd36 --- /dev/null +++ b/tests/tests/correct/hex3.ixml @@ -0,0 +1 @@ +hex: "a", [#1-#7e], "b". diff --git a/tests/tests/correct/hex3.req b/tests/tests/correct/hex3.req new file mode 100644 index 00000000..9eaaeaf1 --- /dev/null +++ b/tests/tests/correct/hex3.req @@ -0,0 +1,6 @@ +hex: "a", [#1-#7e], "b". +# +a!b +# + +a!b diff --git a/tests/tests/correct/json.inp b/tests/tests/correct/json.inp new file mode 100644 index 00000000..696a9676 --- /dev/null +++ b/tests/tests/correct/json.inp @@ -0,0 +1,18 @@ +{"menu": { + "id": "file", + "value": "File", + "popup": { + "menuitem": [ + {"value": "New", "onclick": "CreateNewDoc()"}, + {"value": "Open", "onclick": "OpenDoc()"}, + {"value": "Close", "onclick": "CloseDoc()"} + ] + } + }, + "number": -0.0e+00, + "string": "\uffff", + "bool": true, + "also": false, + "no": null +} + diff --git a/tests/tests/correct/json.ixml b/tests/tests/correct/json.ixml new file mode 100644 index 00000000..a30ab870 --- /dev/null +++ b/tests/tests/correct/json.ixml @@ -0,0 +1,29 @@ +json: element. +element: value. +-value: string; + number; + object; + array; + "true", S; + "false", S; + "null", S. +object: "{", S, members, "}", S. +-members: member*(",", S). +member: @string, S, ":", S, element. +array: "[", S, elements, "]", S. +elements: element*(",", S). +string: -'"', character*, -'"'. +-character: ~['"\'; #0-#19]; + "\", escape. +escape: ['"\/bfnrt']; + "u", hex, hex, hex, hex. +hex: digit; ["A"-"F"; "a"-"f"]. +number: int, frac, exp. +int: "-"?, digit; + "-"?, onenine, digit*. +digit: ["0"-"9"]. +onenine: ["1"-"9"]. +frac: (".", digit+)?. +exp: (["eE"], sign, digit+)?. +sign: ["+-"]?. +-S: -[#9; #a; #d; " "]*. diff --git a/tests/tests/correct/json.req b/tests/tests/correct/json.req new file mode 100644 index 00000000..b1c3fa84 --- /dev/null +++ b/tests/tests/correct/json.req @@ -0,0 +1,159 @@ +json: element. +element: value. +-value: string; + number; + object; + array; + "true", S; + "false", S; + "null", S. +object: "{", S, members, "}", S. +-members: member*(",", S). +member: @string, S, ":", S, element. +array: "[", S, elements, "]", S. +elements: element*(",", S). +string: -'"', character*, -'"'. +-character: ~['"\'; #0-#19]; + "\", escape. +escape: ['"\/bfnrt']; + "u", hex, hex, hex, hex. +hex: digit; ["A"-"F"; "a"-"f"]. +number: int, frac, exp. +int: "-"?, digit; + "-"?, onenine, digit*. +digit: ["0"-"9"]. +onenine: ["1"-"9"]. +frac: (".", digit+)?. +exp: (["eE"], sign, digit+)?. +sign: ["+-"]?. +-S: -[#9; #a; #d; " "]*. +# +{"menu": { + "id": "file", + "value": "File", + "popup": { + "menuitem": [ + {"value": "New", "onclick": "CreateNewDoc()"}, + {"value": "Open", "onclick": "OpenDoc()"}, + {"value": "Close", "onclick": "CloseDoc()"} + ] + } + }, + "number": -0.0e+00, + "string": "\uffff", + "bool": true, + "also": false, + "no": null +} + +# + + + + { + : + + { + : + + file + + , + : + + File + + , + : + + { + : + + [ + + + { + : + + New + + , + : + + CreateNewDoc() + + } + , + + { + : + + Open + + , + : + + OpenDoc() + + } + , + + { + : + + Close + + , + : + + CloseDoc() + + } + + ] + + } + + } + + , + : + + + - + 0 + + . + 0 + + e + + + 0 + 0 + + + + , + : + + \ + u + f + f + f + f + + + + , + : + true + , + : + false + , + : + null + } + + diff --git a/tests/tests/correct/json1.inp b/tests/tests/correct/json1.inp new file mode 100644 index 00000000..d8da20d3 --- /dev/null +++ b/tests/tests/correct/json1.inp @@ -0,0 +1 @@ +{"name": "pi", "value": 3.145926} diff --git a/tests/tests/correct/json1.ixml b/tests/tests/correct/json1.ixml new file mode 100644 index 00000000..190e3e97 --- /dev/null +++ b/tests/tests/correct/json1.ixml @@ -0,0 +1,19 @@ +json: S, object. +object: "{", S, members, "}", S. +-members: pair*(",", S). +pair: @string, S, ":", S, value. +array: "[", S, value*(",", S), "]", S. +-value: string, S; number, S; object; array; "true", S; "false", S; "null", S. +string: -"""", char*, -"""". +-char: ~['"'; "\" {;[#0-#1F];}]; '\', ('"'; "\"; "/"; "b"; "f"; "n"; "r"; "t"; "u", hexdigits). +number: "-"?, int, frac?, exp?. +-int: "0"; digit19, digit*. +-frac: ".", digit+. +-exp: ("e"; "E"), sign?, digit+. +-sign: "+"; "-". +-S: " "*. +-digit: ["0"-"9"]. +-digit19: ["1"-"9"]. +-hexdigits: hexdigit, hexdigit, hexdigit, hexdigit. +-hexdigit: digit; ["a"-"f"]; ["A"-"F"]. + diff --git a/tests/tests/correct/json1.req b/tests/tests/correct/json1.req new file mode 100644 index 00000000..37bf7cac --- /dev/null +++ b/tests/tests/correct/json1.req @@ -0,0 +1,32 @@ +json: S, object. +object: "{", S, members, "}", S. +-members: pair*(",", S). +pair: @string, S, ":", S, value. +array: "[", S, value*(",", S), "]", S. +-value: string, S; number, S; object; array; "true", S; "false", S; "null", S. +string: -"""", char*, -"""". +-char: ~['"'; "\" {;[#0-#1F];}]; '\', ('"'; "\"; "/"; "b"; "f"; "n"; "r"; "t"; "u", hexdigits). +number: "-"?, int, frac?, exp?. +-int: "0"; digit19, digit*. +-frac: ".", digit+. +-exp: ("e"; "E"), sign?, digit+. +-sign: "+"; "-". +-S: " "*. +-digit: ["0"-"9"]. +-digit19: ["1"-"9"]. +-hexdigits: hexdigit, hexdigit, hexdigit, hexdigit. +-hexdigit: digit; ["a"-"f"]; ["A"-"F"]. + +# +{"name": "pi", "value": 3.145926} +# + + + { + : + pi + , + : + 3.145926 + } + diff --git a/tests/tests/correct/lf.inp b/tests/tests/correct/lf.inp new file mode 100644 index 00000000..f4f31b7e --- /dev/null +++ b/tests/tests/correct/lf.inp @@ -0,0 +1,3 @@ +Now is the time +For all good people +To have fun. \ No newline at end of file diff --git a/tests/tests/correct/lf.ixml b/tests/tests/correct/lf.ixml new file mode 100644 index 00000000..0512a073 --- /dev/null +++ b/tests/tests/correct/lf.ixml @@ -0,0 +1,3 @@ +input: line+lf. +line: ~[#a]*. +lf: -#a. diff --git a/tests/tests/correct/lf.req b/tests/tests/correct/lf.req new file mode 100644 index 00000000..bd861117 --- /dev/null +++ b/tests/tests/correct/lf.req @@ -0,0 +1,15 @@ +input: line+lf. +line: ~[#a]*. +lf: -#a. +# +Now is the time +For all good people +To have fun.# + + + Now is the time + + For all good people + + To have fun. + diff --git a/tests/tests/correct/lf.res b/tests/tests/correct/lf.res new file mode 100644 index 00000000..1ef119db --- /dev/null +++ b/tests/tests/correct/lf.res @@ -0,0 +1,17 @@ +input: line+lf. +line: ~[#a]*. +lf: -#a. +# +Now is the time +For all good people +To have fun.# + + + Now is the time + + For all good people + + To have fun. + + + diff --git a/tests/tests/correct/lf1.inp b/tests/tests/correct/lf1.inp new file mode 100644 index 00000000..984acbd1 --- /dev/null +++ b/tests/tests/correct/lf1.inp @@ -0,0 +1,3 @@ +Now is the time +For all good people +To have fun. diff --git a/tests/tests/correct/lf1.ixml b/tests/tests/correct/lf1.ixml new file mode 100644 index 00000000..0512a073 --- /dev/null +++ b/tests/tests/correct/lf1.ixml @@ -0,0 +1,3 @@ +input: line+lf. +line: ~[#a]*. +lf: -#a. diff --git a/tests/tests/correct/lf1.req b/tests/tests/correct/lf1.req new file mode 100644 index 00000000..a2644245 --- /dev/null +++ b/tests/tests/correct/lf1.req @@ -0,0 +1,18 @@ +input: line+lf. +line: ~[#a]*. +lf: -#a. +# +Now is the time +For all good people +To have fun. +# + + + Now is the time + + For all good people + + To have fun. + + + diff --git a/tests/tests/correct/marked.inp b/tests/tests/correct/marked.inp new file mode 100644 index 00000000..5931a55d --- /dev/null +++ b/tests/tests/correct/marked.inp @@ -0,0 +1 @@ +!d \ No newline at end of file diff --git a/tests/tests/correct/marked.ixml b/tests/tests/correct/marked.ixml new file mode 100644 index 00000000..e97cd097 --- /dev/null +++ b/tests/tests/correct/marked.ixml @@ -0,0 +1,3 @@ +a: @b; "!", c. +b: c. +c: "d". \ No newline at end of file diff --git a/tests/tests/correct/marked.req b/tests/tests/correct/marked.req new file mode 100644 index 00000000..872d5531 --- /dev/null +++ b/tests/tests/correct/marked.req @@ -0,0 +1,8 @@ +a: @b; "!", c. +b: c. +c: "d".# +!d# + +! + d + diff --git a/tests/tests/correct/nested-comment.inp b/tests/tests/correct/nested-comment.inp new file mode 100644 index 00000000..61780798 --- /dev/null +++ b/tests/tests/correct/nested-comment.inp @@ -0,0 +1 @@ +b diff --git a/tests/tests/correct/nested-comment.ixml b/tests/tests/correct/nested-comment.ixml new file mode 100644 index 00000000..aab5c763 --- /dev/null +++ b/tests/tests/correct/nested-comment.ixml @@ -0,0 +1,6 @@ +a: b, c. +b: "b". {here is a comment +{with a nested comment +b: "c". +}} +c: . diff --git a/tests/tests/correct/nested-comment.req b/tests/tests/correct/nested-comment.req new file mode 100644 index 00000000..9cc3f237 --- /dev/null +++ b/tests/tests/correct/nested-comment.req @@ -0,0 +1,14 @@ +a: b, c. +b: "b". {here is a comment +{with a nested comment +b: "c". +}} +c: . +# +b +# + + + b + + diff --git a/tests/tests/correct/para-test.inp b/tests/tests/correct/para-test.inp new file mode 100644 index 00000000..74573674 --- /dev/null +++ b/tests/tests/correct/para-test.inp @@ -0,0 +1,9 @@ +31 December 2021 +Para entry. + +Here is another paragraph. +See? +It consists of several lines. + +And another. +The end. diff --git a/tests/tests/correct/para-test.ixml b/tests/tests/correct/para-test.ixml new file mode 100644 index 00000000..629d100d --- /dev/null +++ b/tests/tests/correct/para-test.ixml @@ -0,0 +1,4 @@ +document: para+lf. +para: line+. +line: ~[#a]+, lf. +-lf: -#a. diff --git a/tests/tests/correct/para-test.req b/tests/tests/correct/para-test.req new file mode 100644 index 00000000..0c6021ac --- /dev/null +++ b/tests/tests/correct/para-test.req @@ -0,0 +1,31 @@ +document: para+lf. +para: line+. +line: ~[#a]+, lf. +-lf: -#a. +# +31 December 2021 +Para entry. + +Here is another paragraph. +See? +It consists of several lines. + +And another. +The end. +# + + + + 31 December 2021 + Para entry. + + + Here is another paragraph. + See? + It consists of several lines. + + + And another. + The end. + + diff --git a/tests/tests/correct/para-test.res b/tests/tests/correct/para-test.res new file mode 100644 index 00000000..0c6021ac --- /dev/null +++ b/tests/tests/correct/para-test.res @@ -0,0 +1,31 @@ +document: para+lf. +para: line+. +line: ~[#a]+, lf. +-lf: -#a. +# +31 December 2021 +Para entry. + +Here is another paragraph. +See? +It consists of several lines. + +And another. +The end. +# + + + + 31 December 2021 + Para entry. + + + Here is another paragraph. + See? + It consists of several lines. + + + And another. + The end. + + diff --git a/tests/tests/correct/poly.inp b/tests/tests/correct/poly.inp new file mode 100644 index 00000000..7d48ce23 --- /dev/null +++ b/tests/tests/correct/poly.inp @@ -0,0 +1,2 @@ +44x⁷⁸⁹+13x²-20x+1 + diff --git a/tests/tests/correct/poly.ixml b/tests/tests/correct/poly.ixml new file mode 100644 index 00000000..fb57f6ce --- /dev/null +++ b/tests/tests/correct/poly.ixml @@ -0,0 +1,9 @@ +polynomial: f, (plus; minus)*. {4x2+3x-2} +plus: -"+", -f. +minus: -"-", -f. +@power: exp. +@constant: @n. +-f: @n, -"x", @power?; constant. +n: ["0"-"9"]+. +exp: ("⁰"; "¹"; "²";"³"; "⁴"; "⁵"; "⁶"; "⁷"; "⁸"; "⁹")+. + diff --git a/tests/tests/correct/poly.req b/tests/tests/correct/poly.req new file mode 100644 index 00000000..96285536 --- /dev/null +++ b/tests/tests/correct/poly.req @@ -0,0 +1,19 @@ +polynomial: f, (plus; minus)*. {4x2+3x-2} +plus: -"+", -f. +minus: -"-", -f. +@power: exp. +@constant: @n. +-f: @n, -"x", @power?; constant. +n: ["0"-"9"]+. +exp: ("⁰"; "¹"; "²";"³"; "⁴"; "⁵"; "⁶"; "⁷"; "⁸"; "⁹")+. + +# +44x⁷⁸⁹+13x²-20x+1 + +# + + + + + + diff --git a/tests/tests/correct/program.inp b/tests/tests/correct/program.inp new file mode 100644 index 00000000..3c861058 --- /dev/null +++ b/tests/tests/correct/program.inp @@ -0,0 +1 @@ +{a=0;f(a, 0);} diff --git a/tests/tests/correct/program.ixml b/tests/tests/correct/program.ixml new file mode 100644 index 00000000..5c9f47f6 --- /dev/null +++ b/tests/tests/correct/program.ixml @@ -0,0 +1,17 @@ +program: block. +block: "{", S, statement*(";", S), "}", S. +statement: if-statement; while-statement; assignment; call; block; . +if-statement: "if", S, condition, "then", S, statement, else-part?. +else-part: "else", S, statement. +while-statement: "while", S, condition, "do", S, statement. +assignment: variable, "=", S, expression. +variable: identifier. +call: identifier, "(", S, parameter*(",", S), ")", S. +parameter: -expression. +identifier: letter+, S. +expression: identifier; number. +number: digit+, S. +-letter: ["a"-"z"]; ["A"-"Z"]. +-digit: ["0"-"9"]. +condition: identifier. +-S: " "*. diff --git a/tests/tests/correct/program.req b/tests/tests/correct/program.req new file mode 100644 index 00000000..6c11a8a2 --- /dev/null +++ b/tests/tests/correct/program.req @@ -0,0 +1,45 @@ +program: block. +block: "{", S, statement*(";", S), "}", S. +statement: if-statement; while-statement; assignment; call; block; . +if-statement: "if", S, condition, "then", S, statement, else-part?. +else-part: "else", S, statement. +while-statement: "while", S, condition, "do", S, statement. +assignment: variable, "=", S, expression. +variable: identifier. +call: identifier, "(", S, parameter*(",", S), ")", S. +parameter: -expression. +identifier: letter+, S. +expression: identifier; number. +number: digit+, S. +-letter: ["a"-"z"]; ["A"-"Z"]. +-digit: ["0"-"9"]. +condition: identifier. +-S: " "*. +# +{a=0;f(a, 0);} +# + + + { + + + + a + = + + 0 + + + ; + + + f( + + a + , + + 0 + ) + ; + } + diff --git a/tests/tests/correct/range-comments.inp b/tests/tests/correct/range-comments.inp new file mode 100644 index 00000000..f121bdbf --- /dev/null +++ b/tests/tests/correct/range-comments.inp @@ -0,0 +1 @@ +name diff --git a/tests/tests/correct/range-comments.ixml b/tests/tests/correct/range-comments.ixml new file mode 100644 index 00000000..3ccff1e1 --- /dev/null +++ b/tests/tests/correct/range-comments.ixml @@ -0,0 +1,2 @@ +name: letter*. +letter: [{comment}"a"{comment}-{comment}"z"{comment}]. diff --git a/tests/tests/correct/range-comments.req b/tests/tests/correct/range-comments.req new file mode 100644 index 00000000..57ca2c9b --- /dev/null +++ b/tests/tests/correct/range-comments.req @@ -0,0 +1,12 @@ +name: letter*. +letter: [{comment}"a"{comment}-{comment}"z"{comment}]. +# +name +# + + + n + a + m + e + diff --git a/tests/tests/correct/range.inp b/tests/tests/correct/range.inp new file mode 100644 index 00000000..1d470f6d --- /dev/null +++ b/tests/tests/correct/range.inp @@ -0,0 +1 @@ +5 . diff --git a/tests/tests/correct/range.ixml b/tests/tests/correct/range.ixml new file mode 100644 index 00000000..aafbb68e --- /dev/null +++ b/tests/tests/correct/range.ixml @@ -0,0 +1,3 @@ +data: range1, range2, -".". +range1: ["0"-"9"]. +range2: [#0-#9]. diff --git a/tests/tests/correct/range.req b/tests/tests/correct/range.req new file mode 100644 index 00000000..d8c50394 --- /dev/null +++ b/tests/tests/correct/range.req @@ -0,0 +1,11 @@ +data: range1, range2, -".". +range1: ["0"-"9"]. +range2: [#0-#9]. +# +5 . +# + + + 5 + + diff --git a/tests/tests/correct/ranges.inp b/tests/tests/correct/ranges.inp new file mode 100644 index 00000000..0ace0494 --- /dev/null +++ b/tests/tests/correct/ranges.inp @@ -0,0 +1 @@ + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ diff --git a/tests/tests/correct/ranges.ixml b/tests/tests/correct/ranges.ixml new file mode 100644 index 00000000..9d61f0ce --- /dev/null +++ b/tests/tests/correct/ranges.ixml @@ -0,0 +1,15 @@ +test: other, digit, other, cap, other, lc, other, lf?. +other: ~[#a; #30-#39; #41-#5A; #61-#7A]+. +cap: [#41-#5A]+. +lc: [#61-#7A]+. +digit: [#30-#39]+. +-lf: -#a. +{ +0123456789abcdef + !"#$%&'()*+,-./ +0123456789:;<=>? +@ABCDEFGHIJKLMNO +PQRSTUVWXYZ[\]^_ +`abcdefghijklmno +pqrstuvwxyz{|}~ +} \ No newline at end of file diff --git a/tests/tests/correct/ranges.req b/tests/tests/correct/ranges.req new file mode 100644 index 00000000..faaa217e --- /dev/null +++ b/tests/tests/correct/ranges.req @@ -0,0 +1,27 @@ +test: other, digit, other, cap, other, lc, other, lf?. +other: ~[#a; #30-#39; #41-#5A; #61-#7A]+. +cap: [#41-#5A]+. +lc: [#61-#7A]+. +digit: [#30-#39]+. +-lf: -#a. +{ +0123456789abcdef + !"#$%&'()*+,-./ +0123456789:;<=>? +@ABCDEFGHIJKLMNO +PQRSTUVWXYZ[\]^_ +`abcdefghijklmno +pqrstuvwxyz{|}~ +}# + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ +# + + + !"#$%&'()*+,-./ + 0123456789 + :;<=>?@ + ABCDEFGHIJKLMNOPQRSTUVWXYZ + [\]^_` + abcdefghijklmnopqrstuvwxyz + {|}~ + diff --git a/tests/tests/correct/ranges1.inp b/tests/tests/correct/ranges1.inp new file mode 100644 index 00000000..8d188c4c --- /dev/null +++ b/tests/tests/correct/ranges1.inp @@ -0,0 +1 @@ +!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ diff --git a/tests/tests/correct/ranges1.ixml b/tests/tests/correct/ranges1.ixml new file mode 100644 index 00000000..5fc72892 --- /dev/null +++ b/tests/tests/correct/ranges1.ixml @@ -0,0 +1,20 @@ +chars: punctuation, nonpunct?; upper, nonupper?; lower, nonlower?; digit, nondigit?. +-nonpunct: upper, nonupper?; lower, nonlower?; digit, nondigit?. +-nonupper: punctuation, nonpunct?; lower, nonlower?; digit, nondigit?. +-nonlower: punctuation, nonpunct?; upper, nonupper?; digit, nondigit?. +-nondigit: punctuation, nonpunct?; upper, nonupper?; lower, nonlower?. + +upper: [#41-#5A]+. +lower: [#61-#7A]+. +digit: [#30-#39]+. +punctuation: ~[#a; #30-#39; #41-#5A; #61-#7A]+. +{-lf: -#a.} +{ +0123456789abcdef + !"#$%&'()*+,-./ +0123456789:;<=>? +@ABCDEFGHIJKLMNO +PQRSTUVWXYZ[\]^_ +`abcdefghijklmno +pqrstuvwxyz{|}~ +} \ No newline at end of file diff --git a/tests/tests/correct/ranges1.req b/tests/tests/correct/ranges1.req new file mode 100644 index 00000000..51a7351b --- /dev/null +++ b/tests/tests/correct/ranges1.req @@ -0,0 +1,32 @@ +chars: punctuation, nonpunct?; upper, nonupper?; lower, nonlower?; digit, nondigit?. +-nonpunct: upper, nonupper?; lower, nonlower?; digit, nondigit?. +-nonupper: punctuation, nonpunct?; lower, nonlower?; digit, nondigit?. +-nonlower: punctuation, nonpunct?; upper, nonupper?; digit, nondigit?. +-nondigit: punctuation, nonpunct?; upper, nonupper?; lower, nonlower?. + +upper: [#41-#5A]+. +lower: [#61-#7A]+. +digit: [#30-#39]+. +punctuation: ~[#a; #30-#39; #41-#5A; #61-#7A]+. +{-lf: -#a.} +{ +0123456789abcdef + !"#$%&'()*+,-./ +0123456789:;<=>? +@ABCDEFGHIJKLMNO +PQRSTUVWXYZ[\]^_ +`abcdefghijklmno +pqrstuvwxyz{|}~ +}# +!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ +# + + + !"#$%&'()*+,-./ + 0123456789 + :;<=>?@ + ABCDEFGHIJKLMNOPQRSTUVWXYZ + [\]^_` + abcdefghijklmnopqrstuvwxyz + {|}~ + diff --git a/tests/tests/correct/string.inp b/tests/tests/correct/string.inp new file mode 100644 index 00000000..8717d841 --- /dev/null +++ b/tests/tests/correct/string.inp @@ -0,0 +1 @@ +aaa.bbb.ccc. diff --git a/tests/tests/correct/string.ixml b/tests/tests/correct/string.ixml new file mode 100644 index 00000000..8dc014e5 --- /dev/null +++ b/tests/tests/correct/string.ixml @@ -0,0 +1,5 @@ +S : @able, baker, @charlie. +able: string. +baker: string. +charlie: string. +string: ["abc"]*, ".". diff --git a/tests/tests/correct/string.req b/tests/tests/correct/string.req new file mode 100644 index 00000000..d1e4cc03 --- /dev/null +++ b/tests/tests/correct/string.req @@ -0,0 +1,14 @@ +S : @able, baker, @charlie. +able: string. +baker: string. +charlie: string. +string: ["abc"]*, ".". +# +aaa.bbb.ccc. +# + + + + bbb. + + diff --git a/tests/tests/correct/tab.inp b/tests/tests/correct/tab.inp new file mode 100644 index 00000000..2c0bcdaf --- /dev/null +++ b/tests/tests/correct/tab.inp @@ -0,0 +1 @@ + abc diff --git a/tests/tests/correct/tab.ixml b/tests/tests/correct/tab.ixml new file mode 100644 index 00000000..48149f1f --- /dev/null +++ b/tests/tests/correct/tab.ixml @@ -0,0 +1,3 @@ +data: s?, word. +-s: [#20; #9]+. +word: [L]+. diff --git a/tests/tests/correct/tab.req b/tests/tests/correct/tab.req new file mode 100644 index 00000000..73709bb3 --- /dev/null +++ b/tests/tests/correct/tab.req @@ -0,0 +1,10 @@ +data: s?, word. +-s: [#20; #9]+. +word: [L]+. +# + abc +# + + + abc + diff --git a/tests/tests/correct/test.inp b/tests/tests/correct/test.inp new file mode 100644 index 00000000..0898d286 --- /dev/null +++ b/tests/tests/correct/test.inp @@ -0,0 +1,2 @@ +.. + diff --git a/tests/tests/correct/test.ixml b/tests/tests/correct/test.ixml new file mode 100644 index 00000000..f05624d9 --- /dev/null +++ b/tests/tests/correct/test.ixml @@ -0,0 +1,4 @@ +test: foo, bar. +foo: -".". +bar: ".". + diff --git a/tests/tests/correct/test.req b/tests/tests/correct/test.req new file mode 100644 index 00000000..eec6245c --- /dev/null +++ b/tests/tests/correct/test.req @@ -0,0 +1,13 @@ +test: foo, bar. +foo: -".". +bar: ".". + +# +.. + +# + + + + . + diff --git a/tests/tests/correct/unicode-range.inp b/tests/tests/correct/unicode-range.inp new file mode 100644 index 00000000..fe348db9 --- /dev/null +++ b/tests/tests/correct/unicode-range.inp @@ -0,0 +1 @@ +ŤĤıŞıŞÀŤėšť diff --git a/tests/tests/correct/unicode-range.ixml b/tests/tests/correct/unicode-range.ixml new file mode 100644 index 00000000..c5546dd9 --- /dev/null +++ b/tests/tests/correct/unicode-range.ixml @@ -0,0 +1 @@ +latin: ["À"-"ž"]+. diff --git a/tests/tests/correct/unicode-range.req b/tests/tests/correct/unicode-range.req new file mode 100644 index 00000000..c0305073 --- /dev/null +++ b/tests/tests/correct/unicode-range.req @@ -0,0 +1,5 @@ +latin: ["À"-"ž"]+. +# +ŤĤıŞıŞÀŤėšť +# +ŤĤıŞıŞŤėšť diff --git a/tests/tests/correct/unicode-range.res b/tests/tests/correct/unicode-range.res new file mode 100644 index 00000000..22a9df13 --- /dev/null +++ b/tests/tests/correct/unicode-range.res @@ -0,0 +1,14 @@ +latin: ["À"-"ž"]+. +# +ŤĤıŞıŞÀŤėšť +# + +**** Bound of range must be a single character + 1 latin: ["À"-"ž"]+. + ^ + +**** Bound of range must be a single character + 1 latin: ["À"-"ž"]+. + ^ +**** Parsing failed at line 1: Bound of range must be a single character +Failed diff --git a/tests/tests/correct/unicode-range1.inp b/tests/tests/correct/unicode-range1.inp new file mode 100644 index 00000000..cd75137e --- /dev/null +++ b/tests/tests/correct/unicode-range1.inp @@ -0,0 +1 @@ +¡¢£¤¥¦§¨©«¬®¯°±²³´µ¶·¸¹»¼½¾¿×÷ diff --git a/tests/tests/correct/unicode-range1.ixml b/tests/tests/correct/unicode-range1.ixml new file mode 100644 index 00000000..fc7f47c2 --- /dev/null +++ b/tests/tests/correct/unicode-range1.ixml @@ -0,0 +1 @@ +chars: [#1-"÷"]+. diff --git a/tests/tests/correct/unicode-range1.req b/tests/tests/correct/unicode-range1.req new file mode 100644 index 00000000..f907e9fc --- /dev/null +++ b/tests/tests/correct/unicode-range1.req @@ -0,0 +1,5 @@ +chars: [#1-"÷"]+. +# +¡¢£¤¥¦§¨©«¬®¯°±²³´µ¶·¸¹»¼½¾¿×÷ +# +¡¢£¤¥¦§¨©«¬®¯°±²³´µ¶·¸¹»¼½¾¿×÷ diff --git a/tests/tests/correct/unicode-range1.res b/tests/tests/correct/unicode-range1.res new file mode 100644 index 00000000..9a610692 --- /dev/null +++ b/tests/tests/correct/unicode-range1.res @@ -0,0 +1,10 @@ +chars: [#1-"÷"]+. +# +¡¢£¤¥¦§¨©«¬®¯°±²³´µ¶·¸¹»¼½¾¿×÷ +# + +**** Bound of range must be a single character + 1 chars: [#1-"÷"]+. + ^ +**** Parsing failed at line 1: Bound of range must be a single character +Failed diff --git a/tests/tests/correct/unicode-range2.inp b/tests/tests/correct/unicode-range2.inp new file mode 100644 index 00000000..8baef1b4 --- /dev/null +++ b/tests/tests/correct/unicode-range2.inp @@ -0,0 +1 @@ +abc diff --git a/tests/tests/correct/unicode-range2.ixml b/tests/tests/correct/unicode-range2.ixml new file mode 100644 index 00000000..a5a5b9d3 --- /dev/null +++ b/tests/tests/correct/unicode-range2.ixml @@ -0,0 +1 @@ +chars: [#60-#70]+. diff --git a/tests/tests/correct/unicode-range2.req b/tests/tests/correct/unicode-range2.req new file mode 100644 index 00000000..2e9addcf --- /dev/null +++ b/tests/tests/correct/unicode-range2.req @@ -0,0 +1,6 @@ +chars: [#60-#70]+. +# +abc +# + +abc diff --git a/tests/tests/correct/vcard.inp b/tests/tests/correct/vcard.inp new file mode 100644 index 00000000..746ca436 --- /dev/null +++ b/tests/tests/correct/vcard.inp @@ -0,0 +1,10 @@ +BEGIN:VCARD +VERSION:3.0 +N:Lastname;Surname +FN:Displayname +ORG:EVenX +URL:http://www.evenx.com/ +EMAIL:info@evenx.com +TEL;TYPE=voice,work,pref:+49 1234 56788 +ADR;TYPE=intl,work,postal,parcel:;;Wallstr. 1;Berlin;;12345;Germany +END:VCARD diff --git a/tests/tests/correct/vcard.ixml b/tests/tests/correct/vcard.ixml new file mode 100644 index 00000000..3e7f10fe --- /dev/null +++ b/tests/tests/correct/vcard.ixml @@ -0,0 +1,11 @@ +card: -"BEGIN:", name, eoln, property+, -"END:", endname, eoln. +property: name, parameters, -":", attribute+-";", -eoln. +parameters: (-";", parameter)*. +parameter: name, -"=", pvalue. +@pvalue: ~[";:"; #a]+. +attribute: value. +@value: achar*. +-achar: ~["#;"; #a]. +@name: ["a"-"z"; "A"-"Z"]+. +@endname: name. +-eoln: -#a. diff --git a/tests/tests/correct/vcard.req b/tests/tests/correct/vcard.req new file mode 100644 index 00000000..1af0452f --- /dev/null +++ b/tests/tests/correct/vcard.req @@ -0,0 +1,69 @@ +card: -"BEGIN:", name, eoln, property+, -"END:", endname, eoln. +property: name, parameters, -":", attribute+-";", -eoln. +parameters: (-";", parameter)*. +parameter: name, -"=", pvalue. +@pvalue: ~[";:"; #a]+. +attribute: value. +@value: achar*. +-achar: ~["#;"; #a]. +@name: ["a"-"z"; "A"-"Z"]+. +@endname: name. +-eoln: -#a. +# +BEGIN:VCARD +VERSION:3.0 +N:Lastname;Surname +FN:Displayname +ORG:EVenX +URL:http://www.evenx.com/ +EMAIL:info@evenx.com +TEL;TYPE=voice,work,pref:+49 1234 56788 +ADR;TYPE=intl,work,postal,parcel:;;Wallstr. 1;Berlin;;12345;Germany +END:VCARD +# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tests/correct/xml.inp b/tests/tests/correct/xml.inp new file mode 100644 index 00000000..25d43926 --- /dev/null +++ b/tests/tests/correct/xml.inp @@ -0,0 +1,4 @@ + + Now is the time for stuff. + + diff --git a/tests/tests/correct/xml.ixml b/tests/tests/correct/xml.ixml new file mode 100644 index 00000000..8a33aa9c --- /dev/null +++ b/tests/tests/correct/xml.ixml @@ -0,0 +1,11 @@ +xml: element. +element: -"<", name, (" "+, attribute)*, (-">", content, -""; -"/>"). +@name: ["a"-"z"; "A"-"Z"]+. +@close: name. +attribute: name, -"=", value. +@value: -'"', dchar*, -'"'; -"'", schar*, -"'". +content: (cchar; element)*. +-dchar: ~['"']. +-schar: ~["'"]. +-cchar: ~["<"]. + diff --git a/tests/tests/correct/xml.req b/tests/tests/correct/xml.req new file mode 100644 index 00000000..b559127f --- /dev/null +++ b/tests/tests/correct/xml.req @@ -0,0 +1,30 @@ +xml: element. +element: -"<", name, (" "+, attribute)*, (-">", content, -""; -"/>"). +@name: ["a"-"z"; "A"-"Z"]+. +@close: name. +attribute: name, -"=", value. +@value: -'"', dchar*, -'"'; -"'", schar*, -"'". +content: (cchar; element)*. +-dchar: ~['"']. +-schar: ~["'"]. +-cchar: ~["<"]. + +# + + Now is the time for stuff. + + +# + + + + + + + Now is the + + time + for stuff. + + + diff --git a/tests/tests/correct/xml1.inp b/tests/tests/correct/xml1.inp new file mode 100644 index 00000000..6dfb50b4 --- /dev/null +++ b/tests/tests/correct/xml1.inp @@ -0,0 +1,4 @@ + + This is a test. + + diff --git a/tests/tests/correct/xml1.ixml b/tests/tests/correct/xml1.ixml new file mode 100644 index 00000000..5fae05e3 --- /dev/null +++ b/tests/tests/correct/xml1.ixml @@ -0,0 +1,10 @@ +xml: element. +element: -"<", name, (-" "+, attribute)*, (-">", content, -""; -"/>"). +@name: ["a"-"z"; "A"-"Z"]+. +@close: name. +attribute: name, -"=", value. +@value: -'"', dchar*, -'"'; -"'", schar*, -"'". +content: (cchar; element)*. +-dchar: ~['"'; "<"]. +-schar: ~["'"; "<"]. +-cchar: ~["<"]. diff --git a/tests/tests/correct/xml1.req b/tests/tests/correct/xml1.req new file mode 100644 index 00000000..153b9a0b --- /dev/null +++ b/tests/tests/correct/xml1.req @@ -0,0 +1,29 @@ +xml: element. +element: -"<", name, (-" "+, attribute)*, (-">", content, -""; -"/>"). +@name: ["a"-"z"; "A"-"Z"]+. +@close: name. +attribute: name, -"=", value. +@value: -'"', dchar*, -'"'; -"'", schar*, -"'". +content: (cchar; element)*. +-dchar: ~['"'; "<"]. +-schar: ~["'"; "<"]. +-cchar: ~["<"]. +# + + This is a test. + + +# + + + + + + + This + + is + a test. + + + diff --git a/tests/tests/correct/xpath.inp b/tests/tests/correct/xpath.inp new file mode 100644 index 00000000..442406aa --- /dev/null +++ b/tests/tests/correct/xpath.inp @@ -0,0 +1,2 @@ +a + diff --git a/tests/tests/correct/xpath.ixml b/tests/tests/correct/xpath.ixml new file mode 100644 index 00000000..c68e21e7 --- /dev/null +++ b/tests/tests/correct/xpath.ixml @@ -0,0 +1,260 @@ +XPath: Expr. + +ParamList: Param, ( ',', Param )*. +Param: '$', EQName, TypeDeclaration?. +FunctionBody: EnclosedExpr. +EnclosedExpr: '{', Expr?, '}'. + +Expr: ExprSingle, ( s?,',',s?, ExprSingle )*. + +-ExprSingle: OrExpr; OrExprSingle. + + +-OrExprSingle: AndExpr. +OrExpr: AndExpr, (s?, 'or', s?, AndExpr )+. +AndExpr: ComparisonExpr, (s?, 'and', s?, ComparisonExpr )*. +ComparisonExpr: StringConcatExpr, (s, ( @ValueComp ; @GeneralComp ;@ NodeComp ), s, StringConcatExpr )?. +StringConcatExpr: RangeExpr, (s?, '||', s?, RangeExpr )*. +RangeExpr: AdditiveExpr, ( s, 'to', s, AdditiveExpr )?. +AdditiveExpr: MultiplicativeExpr; + MultiplicativeExpr, s?, @AddOp, s?, AdditiveExpr. +@AddOp: ( '+' ; '-' ). +MultiplicativeExpr: UnionExpr; + UnionExpr, s?, @MultOp, s?, MultiplicativeExpr. +@MultOp: '*' ; 'div' ; 'idiv' ; 'mod'. +UnionExpr: IntersectExceptExpr, ( ( 'union' ; '|' ), IntersectExceptExpr )*. +IntersectExceptExpr: InstanceofExpr, ( s, ( 'intersect' ;'except' ), s, InstanceofExpr )*. +InstanceofExpr: TreatExpr, ( s, 'instance', s, 'of', s, @SequenceType )?. +TreatExpr: CastExpr, ( s, -'treat', s, -'as', s, @SequenceType )?. +CastExpr: ArrowExpr, ( s, -'cast', s,-'as', s, @SingleType )?. +ArrowExpr: UnaryExpr, ( '=>', ArrowFunctionSpecifier, ArgumentList )*. + + +UnaryExpr: ( '-' ; '+' )*, ValueExpr. +-ValueExpr: SimpleMapExpr. +GeneralComp: '='; '!='; '<'; '<='; '>'; '>='. +ValueComp: 'eq'; 'ne'; 'lt'; 'le'; 'gt'; 'ge'. +NodeComp: 'is'; '<<'; '>>'. +SimpleMapExpr: PathExpr, ( '!', PathExpr )*. +PathExpr: '/', ( RelativePathExpr ); + '//', RelativePathExpr; + RelativePathExpr. +RelativePathExpr: StepExpr, ( ( '/'; '//' ), StepExpr )*. + +-StepExpr: PostfixExpr; AxisStep. +-AxisStep: ( ReverseStep;ForwardStep ). +ForwardStep: @ForwardAxis, NodeTest; + AbbrevForwardStep. +ForwardAxis: 'child::'; + 'descendant::'; + 'attribute::'; + 'self::'; + 'descendant-or-self::'; + 'following-sibling::'; + 'following::'; + 'namespace::'. +AbbrevForwardStep: '@'?, QName. +ReverseStep: @ReverseAxis, NodeTest; + @AbbrevReverseStep. +ReverseAxis: 'parent::'; + 'ancestor::'; + 'preceding-sibling::'; + 'preceding::'; + 'ancestor-or-self::'. +AbbrevReverseStep: '..'. + + +-NodeTest: KindTest; NameTest. +-NameTest: EQName; Wildcard. + +PostfixExpr: PrimaryExpr. +ArgumentList: -'(',s?, ( -Argument,(s?, -',', s?, -Argument )* )?, s?, -')'. + +KeySpecifier: NCName;| IntegerLiteral; ParenthesizedExpr; '*'. +-ArrowFunctionSpecifier: EQName; VarRef; ParenthesizedExpr. + +-PrimaryExpr: Literal; + VarRef; + ParenthesizedExpr; + ContextItemExpr; + FunctionCall; + FunctionItemExpr; + MapConstructor; + ArrayConstructor; + UnaryLookup. +-Literal: NumericLiteral; StringLiteral. +-NumericLiteral: IntegerLiteral; DecimalLiteral;| DoubleLiteral. +VarRef: -'$', @VarName. +VarName: EQName. +ParenthesizedExpr: -'(', Expr?, -')'. +ContextItemExpr: -'.'. +FunctionCall: @FunctionEQName, -ArgumentList. +-Argument: ExprSingle; ArgumentPlaceholder. +ArgumentPlaceholder: -'?'. +FunctionItemExpr: NamedFunctionRef; InlineFunctionExpr. +NamedFunctionRef: FunctionEQName, '#', IntegerLiteral. +InlineFunctionExpr: -'function', -'(', ParamList?, ')', ( s, 'as', s, SequenceType )?, FunctionBody. +MapConstructor: -'map', -'{', ( MapConstructorEntry, ( ',', MapConstructorEntry )* )?, -'}'. +MapConstructorEntry: MapKeyExpr, -':', MapValueExpr. +MapKeyExpr: ExprSingle. +MapValueExpr: ExprSingle. +ArrayConstructor: SquareArrayConstructor; CurlyArrayConstructor. +SquareArrayConstructor: -'[', ( ExprSingle, ( -',', ExprSingle )* )?, -']'. +CurlyArrayConstructor: -'array', '{', Expr?, -'}'. +UnaryLookup: -'?', KeySpecifier. + +SingleType: SimpleTypeName, '?'?. +TypeDeclaration: 'as', SequenceType. +SequenceType: 'empty-sequence()'; + ItemType, OccurrenceIndicator?. +@OccurrenceIndicator: '?'; '*'; '+'. +ItemType: KindTest; + 'item()'; + FunctionTest; + MapTest; + ArrayTest; + AtomicOrUnionType; + ParenthesizedItemType. +AtomicOrUnionType: EQName. + + +-KindTest: DocumentTest; + ElementTest; + AttributeTest; + SchemaElementTest; + SchemaAttributeTest; + PITest; + CommentTest; + TextTest; + NamespaceNodeTest; + AnyKindTest. +AnyKindTest: 'node()'. +DocumentTest: -'document-node(' , ( ElementTest ; SchemaElementTest )?, -')'. +TextTest: -'text()'. +CommentTest: -'comment()'. +NamespaceNodeTest: -'namespace-node()'. +PITest: -'processing-instruction(' , ( NCName ; StringLiteral )?, -')'. +AttributeTest: -'attribute(' ,( AttribNameOrWildcard, ( ',', TypeName )? )?, -')'. +AttribNameOrWildcard: AttributeName; '*'. +SchemaAttributeTest: -'schema-attribute(', AttributeDeclaration, -')'. +AttributeDeclaration: AttributeName. +ElementTest: -'element(' , ( ElementNameOrWildcard, ( ',', TypeName, '?'? )? )?, -')'. +ElementNameOrWildcard: ElementName;'*'. +SchemaElementTest: -'schema-element(', ElementDeclaration, -')'. +ElementDeclaration: ElementName. + +AttributeName: EQName. +ElementName: EQName. +SimpleTypeName: EQName. +TypeName: EQName. + +FunctionTest: AnyFunctionTest; TypedFunctionTest. +AnyFunctionTest: -'function(*)'. +TypedFunctionTest: -'function(', ( SequenceType, ( -',', SequenceType )* )?, -')', s, 'as', s, SequenceType. +MapTest: AnyMapTest; TypedMapTest. +AnyMapTest: -'map(*)'. +TypedMapTest: -'map(', s, AtomicOrUnionType,s, -',', s, SequenceType, s, -')'. +ArrayTest: AnyArrayTest; TypedArrayTest. +AnyArrayTest: -'array(*)'. +TypedArrayTest: -'array(', s, SequenceType, s, -')'. +ParenthesizedItemType: -'(',s, ItemType,s, -')'. + +FunctionEQName: FunctionName; URIQualifiedName. +EQName: QName; URIQualifiedName. + +QName: FunctionName; + 'array'; + 'attribute'; + 'comment'; + 'document-node'; + 'element'; + 'empty-sequence'; + 'function'; + 'if'; + 'item'; + 'map'; + 'namespace-node'; + 'node'; + 'processing-instruction'; + 'schema-attribute'; + 'schema-element'; + 'switch'; + 'text'; + 'typeswitch'. + + -FunctionName: QNameToken; + 'ancestor'; + 'ancestor-or-self'; + 'and'; + 'cast'; + 'castable'; + 'child'; + 'descendant'; + 'descendant-or-self'; + 'div'; + 'else'; + 'eq'; + 'every'; + 'except'; + 'following'; + 'following-sibling'; + 'for'; + 'ge'; + 'gt'; + 'idiv'; + 'instance'; + 'intersect'; + 'is'; + 'le'; + 'let'; + 'lt'; + 'mod'; + 'namespace'; + 'ne'; + 'or'; + 'parent'; + 'preceding'; + 'preceding-sibling'; + 'return'; + 'satisfies'; + 'self'; + 'some'; + 'to'; + 'treat'; + 'union'. + +StringLiteral: -'"', ( EscapeQuot; ~['"'] )*, -'"'; + -"'", ( EscapeApos ; ~["'"] )*, -"'". +IntegerLiteral: -Digits. +DecimalLiteral: '.', -Digits; + -Digits, '.', ['0'-'9']*. +DoubleLiteral: ( '.', -Digits ; -Digits, ( '.', ['0'-'9']* )? ), ['e'; 'E'], -Digits. + +-URIQualifiedName: BracedURILiteral, NCName. +BracedURILiteral: 'Q', '{', ~['{';'}']*, '}'. +EscapeQuot: '""'. +EscapeApos: "''". + +QNameToken: PrefixedName; UnprefixedName. +PrefixedName: @Prefix, -':', @LocalPart. +UnprefixedName: LocalPart. +Prefix: NCName. +LocalPart: NCName. +NCName: @Name. + +-NameStartChar: ['A'-'Z']; + '_'; + ['a'-'z']. +-NameChar: NameStartChar; + '-'; + '.'; + ['0'-'9']. +Name: NameStartChar, NameChar*. +-s: -' '+. +Wildcard: '*'; + NCName, ':', '*'; + '*', ':', NCName; + BracedURILiteral, '*'. +Digits: ['0'-'9']+. + + diff --git a/tests/tests/correct/xpath.req b/tests/tests/correct/xpath.req new file mode 100644 index 00000000..c8966fa9 --- /dev/null +++ b/tests/tests/correct/xpath.req @@ -0,0 +1,314 @@ +XPath: Expr. + +ParamList: Param, ( ',', Param )*. +Param: '$', EQName, TypeDeclaration?. +FunctionBody: EnclosedExpr. +EnclosedExpr: '{', Expr?, '}'. + +Expr: ExprSingle, ( s?,',',s?, ExprSingle )*. + +-ExprSingle: OrExpr; OrExprSingle. + + +-OrExprSingle: AndExpr. +OrExpr: AndExpr, (s?, 'or', s?, AndExpr )+. +AndExpr: ComparisonExpr, (s?, 'and', s?, ComparisonExpr )*. +ComparisonExpr: StringConcatExpr, (s, ( @ValueComp ; @GeneralComp ;@ NodeComp ), s, StringConcatExpr )?. +StringConcatExpr: RangeExpr, (s?, '||', s?, RangeExpr )*. +RangeExpr: AdditiveExpr, ( s, 'to', s, AdditiveExpr )?. +AdditiveExpr: MultiplicativeExpr; + MultiplicativeExpr, s?, @AddOp, s?, AdditiveExpr. +@AddOp: ( '+' ; '-' ). +MultiplicativeExpr: UnionExpr; + UnionExpr, s?, @MultOp, s?, MultiplicativeExpr. +@MultOp: '*' ; 'div' ; 'idiv' ; 'mod'. +UnionExpr: IntersectExceptExpr, ( ( 'union' ; '|' ), IntersectExceptExpr )*. +IntersectExceptExpr: InstanceofExpr, ( s, ( 'intersect' ;'except' ), s, InstanceofExpr )*. +InstanceofExpr: TreatExpr, ( s, 'instance', s, 'of', s, @SequenceType )?. +TreatExpr: CastExpr, ( s, -'treat', s, -'as', s, @SequenceType )?. +CastExpr: ArrowExpr, ( s, -'cast', s,-'as', s, @SingleType )?. +ArrowExpr: UnaryExpr, ( '=>', ArrowFunctionSpecifier, ArgumentList )*. + + +UnaryExpr: ( '-' ; '+' )*, ValueExpr. +-ValueExpr: SimpleMapExpr. +GeneralComp: '='; '!='; '<'; '<='; '>'; '>='. +ValueComp: 'eq'; 'ne'; 'lt'; 'le'; 'gt'; 'ge'. +NodeComp: 'is'; '<<'; '>>'. +SimpleMapExpr: PathExpr, ( '!', PathExpr )*. +PathExpr: '/', ( RelativePathExpr ); + '//', RelativePathExpr; + RelativePathExpr. +RelativePathExpr: StepExpr, ( ( '/'; '//' ), StepExpr )*. + +-StepExpr: PostfixExpr; AxisStep. +-AxisStep: ( ReverseStep;ForwardStep ). +ForwardStep: @ForwardAxis, NodeTest; + AbbrevForwardStep. +ForwardAxis: 'child::'; + 'descendant::'; + 'attribute::'; + 'self::'; + 'descendant-or-self::'; + 'following-sibling::'; + 'following::'; + 'namespace::'. +AbbrevForwardStep: '@'?, QName. +ReverseStep: @ReverseAxis, NodeTest; + @AbbrevReverseStep. +ReverseAxis: 'parent::'; + 'ancestor::'; + 'preceding-sibling::'; + 'preceding::'; + 'ancestor-or-self::'. +AbbrevReverseStep: '..'. + + +-NodeTest: KindTest; NameTest. +-NameTest: EQName; Wildcard. + +PostfixExpr: PrimaryExpr. +ArgumentList: -'(',s?, ( -Argument,(s?, -',', s?, -Argument )* )?, s?, -')'. + +KeySpecifier: NCName;| IntegerLiteral; ParenthesizedExpr; '*'. +-ArrowFunctionSpecifier: EQName; VarRef; ParenthesizedExpr. + +-PrimaryExpr: Literal; + VarRef; + ParenthesizedExpr; + ContextItemExpr; + FunctionCall; + FunctionItemExpr; + MapConstructor; + ArrayConstructor; + UnaryLookup. +-Literal: NumericLiteral; StringLiteral. +-NumericLiteral: IntegerLiteral; DecimalLiteral;| DoubleLiteral. +VarRef: -'$', @VarName. +VarName: EQName. +ParenthesizedExpr: -'(', Expr?, -')'. +ContextItemExpr: -'.'. +FunctionCall: @FunctionEQName, -ArgumentList. +-Argument: ExprSingle; ArgumentPlaceholder. +ArgumentPlaceholder: -'?'. +FunctionItemExpr: NamedFunctionRef; InlineFunctionExpr. +NamedFunctionRef: FunctionEQName, '#', IntegerLiteral. +InlineFunctionExpr: -'function', -'(', ParamList?, ')', ( s, 'as', s, SequenceType )?, FunctionBody. +MapConstructor: -'map', -'{', ( MapConstructorEntry, ( ',', MapConstructorEntry )* )?, -'}'. +MapConstructorEntry: MapKeyExpr, -':', MapValueExpr. +MapKeyExpr: ExprSingle. +MapValueExpr: ExprSingle. +ArrayConstructor: SquareArrayConstructor; CurlyArrayConstructor. +SquareArrayConstructor: -'[', ( ExprSingle, ( -',', ExprSingle )* )?, -']'. +CurlyArrayConstructor: -'array', '{', Expr?, -'}'. +UnaryLookup: -'?', KeySpecifier. + +SingleType: SimpleTypeName, '?'?. +TypeDeclaration: 'as', SequenceType. +SequenceType: 'empty-sequence()'; + ItemType, OccurrenceIndicator?. +@OccurrenceIndicator: '?'; '*'; '+'. +ItemType: KindTest; + 'item()'; + FunctionTest; + MapTest; + ArrayTest; + AtomicOrUnionType; + ParenthesizedItemType. +AtomicOrUnionType: EQName. + + +-KindTest: DocumentTest; + ElementTest; + AttributeTest; + SchemaElementTest; + SchemaAttributeTest; + PITest; + CommentTest; + TextTest; + NamespaceNodeTest; + AnyKindTest. +AnyKindTest: 'node()'. +DocumentTest: -'document-node(' , ( ElementTest ; SchemaElementTest )?, -')'. +TextTest: -'text()'. +CommentTest: -'comment()'. +NamespaceNodeTest: -'namespace-node()'. +PITest: -'processing-instruction(' , ( NCName ; StringLiteral )?, -')'. +AttributeTest: -'attribute(' ,( AttribNameOrWildcard, ( ',', TypeName )? )?, -')'. +AttribNameOrWildcard: AttributeName; '*'. +SchemaAttributeTest: -'schema-attribute(', AttributeDeclaration, -')'. +AttributeDeclaration: AttributeName. +ElementTest: -'element(' , ( ElementNameOrWildcard, ( ',', TypeName, '?'? )? )?, -')'. +ElementNameOrWildcard: ElementName;'*'. +SchemaElementTest: -'schema-element(', ElementDeclaration, -')'. +ElementDeclaration: ElementName. + +AttributeName: EQName. +ElementName: EQName. +SimpleTypeName: EQName. +TypeName: EQName. + +FunctionTest: AnyFunctionTest; TypedFunctionTest. +AnyFunctionTest: -'function(*)'. +TypedFunctionTest: -'function(', ( SequenceType, ( -',', SequenceType )* )?, -')', s, 'as', s, SequenceType. +MapTest: AnyMapTest; TypedMapTest. +AnyMapTest: -'map(*)'. +TypedMapTest: -'map(', s, AtomicOrUnionType,s, -',', s, SequenceType, s, -')'. +ArrayTest: AnyArrayTest; TypedArrayTest. +AnyArrayTest: -'array(*)'. +TypedArrayTest: -'array(', s, SequenceType, s, -')'. +ParenthesizedItemType: -'(',s, ItemType,s, -')'. + +FunctionEQName: FunctionName; URIQualifiedName. +EQName: QName; URIQualifiedName. + +QName: FunctionName; + 'array'; + 'attribute'; + 'comment'; + 'document-node'; + 'element'; + 'empty-sequence'; + 'function'; + 'if'; + 'item'; + 'map'; + 'namespace-node'; + 'node'; + 'processing-instruction'; + 'schema-attribute'; + 'schema-element'; + 'switch'; + 'text'; + 'typeswitch'. + + -FunctionName: QNameToken; + 'ancestor'; + 'ancestor-or-self'; + 'and'; + 'cast'; + 'castable'; + 'child'; + 'descendant'; + 'descendant-or-self'; + 'div'; + 'else'; + 'eq'; + 'every'; + 'except'; + 'following'; + 'following-sibling'; + 'for'; + 'ge'; + 'gt'; + 'idiv'; + 'instance'; + 'intersect'; + 'is'; + 'le'; + 'let'; + 'lt'; + 'mod'; + 'namespace'; + 'ne'; + 'or'; + 'parent'; + 'preceding'; + 'preceding-sibling'; + 'return'; + 'satisfies'; + 'self'; + 'some'; + 'to'; + 'treat'; + 'union'. + +StringLiteral: -'"', ( EscapeQuot; ~['"'] )*, -'"'; + -"'", ( EscapeApos ; ~["'"] )*, -"'". +IntegerLiteral: -Digits. +DecimalLiteral: '.', -Digits; + -Digits, '.', ['0'-'9']*. +DoubleLiteral: ( '.', -Digits ; -Digits, ( '.', ['0'-'9']* )? ), ['e'; 'E'], -Digits. + +-URIQualifiedName: BracedURILiteral, NCName. +BracedURILiteral: 'Q', '{', ~['{';'}']*, '}'. +EscapeQuot: '""'. +EscapeApos: "''". + +QNameToken: PrefixedName; UnprefixedName. +PrefixedName: @Prefix, -':', @LocalPart. +UnprefixedName: LocalPart. +Prefix: NCName. +LocalPart: NCName. +NCName: @Name. + +-NameStartChar: ['A'-'Z']; + '_'; + ['a'-'z']. +-NameChar: NameStartChar; + '-'; + '.'; + ['0'-'9']. +Name: NameStartChar, NameChar*. +-s: -' '+. +Wildcard: '*'; + NCName, ':', '*'; + '*', ':', NCName; + BracedURILiteral, '*'. +Digits: ['0'-'9']+. + + +# +a + +# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tests/ixml/bnf.inp b/tests/tests/ixml/bnf.inp new file mode 100644 index 00000000..8a968d5d --- /dev/null +++ b/tests/tests/ixml/bnf.inp @@ -0,0 +1,24 @@ +::= +-::= | +::= "::=" | + "::=" +::= +-::= | "|" +::= | +-::= | +::= +::= | | | +@::= "<" ">" +@::= "@" | "^" | "-" +::= +::= ["a"-"z"] | ["A"-"Z"] | ["0"-"9"] +::= | "-" | +@::= """" """" +::= | +::= [" "-"!"] | ["#"-"~"] | """""" {all characters, quotes must be doubled} +::= "[" "-" "]" +-::= """" """" | """" """" """" """" +-::= " " | | +::= "{" "}" +-::= | +-::= [" "-"|"] | "~" {Everything except: } diff --git a/tests/tests/ixml/bnf.ixml b/tests/tests/ixml/bnf.ixml new file mode 100644 index 00000000..effb2bf0 --- /dev/null +++ b/tests/tests/ixml/bnf.ixml @@ -0,0 +1,26 @@ +ixml: S, rules. +-rules: rule; rule, rules. +rule: mark, name, S, -"::=", S, def; + name, S, -"::=", S, def. +def: alts. +-alts: alt; alt, -"|", S, alts. +alt: terms; empty. +-terms: term; term, terms. +empty: . +term: mark, name, S; name, S; string, S; range. +@name: -"<", letters, -">". +@mark: "@", S; "^", S; "-", S. +letters: letter, more-letters. +letter: ["a"-"z"]; ["A"-"Z"]; ["0"-"9"]. +more-letters: letter, more-letters; "-", more-letters; . +@string: -"""", chars, -"""". +chars: char, chars; char. +char: [" "-"!"]; ["#"-"~"]; -'"', '"'. {all characters, quotes must be doubled} +range: -"[", S, from, S, -"-", S, to, S, -"]", S. +@from: character. +@to: character. +-character: -"""", char, -""""; -"""", """", -"""", -"""". +-S: -[" "; #a], S; comment, S; . +comment: "{", schars, "}". +-schars: schar, schars; . +-schar: [" "-"|"]; "~". {Everything except: } diff --git a/tests/tests/ixml/bnf.req b/tests/tests/ixml/bnf.req new file mode 100644 index 00000000..d0d24a48 --- /dev/null +++ b/tests/tests/ixml/bnf.req @@ -0,0 +1,345 @@ +ixml: S, rules. +-rules: rule; rule, rules. +rule: mark, name, S, -"::=", S, def; + name, S, -"::=", S, def. +def: alts. +-alts: alt; alt, -"|", S, alts. +alt: terms; empty. +-terms: term; term, terms. +empty: . +term: mark, name, S; name, S; string, S; range. +@name: -"<", letters, -">". +@mark: "@", S; "^", S; "-", S. +letters: letter, more-letters. +letter: ["a"-"z"]; ["A"-"Z"]; ["0"-"9"]. +more-letters: letter, more-letters; "-", more-letters; . +@string: -"""", chars, -"""". +chars: char, chars; char. +char: [" "-"!"]; ["#"-"~"]; -'"', '"'. {all characters, quotes must be doubled} +range: -"[", S, from, S, -"-", S, to, S, -"]", S. +@from: character. +@to: character. +-character: -"""", char, -""""; -"""", """", -"""", -"""". +-S: -[" "; #a], S; comment, S; . +comment: "{", schars, "}". +-schars: schar, schars; . +-schar: [" "-"|"]; "~". {Everything except: } +# +::= +-::= | +::= "::=" | + "::=" +::= +-::= | "|" +::= | +-::= | +::= +::= | | | +@::= "<" ">" +@::= "@" | "^" | "-" +::= +::= ["a"-"z"] | ["A"-"Z"] | ["0"-"9"] +::= | "-" | +@::= """" """" +::= | +::= [" "-"!"] | ["#"-"~"] | """""" {all characters, quotes must be doubled} +::= "[" "-" "]" +-::= """" """" | """" """" """" """" +-::= " " | | +::= "{" "}" +-::= | +-::= [" "-"|"] | "~" {Everything except: } +# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {all characters, quotes must be doubled} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {Everything except: } + + + + + diff --git a/tests/tests/ixml/ixml-comments.inp b/tests/tests/ixml/ixml-comments.inp new file mode 100644 index 00000000..1798d55f --- /dev/null +++ b/tests/tests/ixml/ixml-comments.inp @@ -0,0 +1,60 @@ +{❌}ixml{❌}:{❌}S{❌},{❌}rule{❌}+{❌}S{❌},{❌}S{❌}.{❌} +{❌}-{❌}S{❌}:{❌}({❌}whitespace{❌};{❌}comment{❌}){❌}*{❌}.{❌} +{❌}-{❌}whitespace{❌}:{❌}-{❌}[{❌}Zs{❌}]{❌};{❌}tab{❌};{❌}lf{❌};{❌}cr{❌}.{❌} +{❌}-{❌}tab{❌}:{❌}-{❌}#9{❌}.{❌} +{❌}-{❌}lf{❌}:{❌}-{❌}#a{❌}.{❌} +{❌}-{❌}cr{❌}:{❌}-{❌}#d{❌}.{❌} +{❌}comment{❌}:{❌}-{❌}"{"{❌},{❌}({❌}cchar{❌};{❌}comment{❌}){❌}*{❌},{❌}-{❌}"}"{❌}.{❌} +{❌}-{❌}cchar{❌}:{❌}~{❌}[{❌}"{}"{❌}]{❌}.{❌} +{❌}rule{❌}:{❌}({❌}mark{❌},{❌}S{❌}){❌}?{❌},{❌}name{❌},{❌}S{❌},{❌}[{❌}"=:"{❌}]{❌},{❌}S{❌},{❌}-{❌}alts{❌},{❌}"."{❌}.{❌} +{❌}@{❌}mark{❌}:{❌}[{❌}"@^-"{❌}]{❌}.{❌} +{❌}alts{❌}:{❌}alt{❌}+{❌}({❌}[{❌}";|"{❌}]{❌},{❌}S{❌}){❌}.{❌} +{❌}alt{❌}:{❌}term{❌}*{❌}({❌}","{❌},{❌}S{❌}){❌}.{❌} +{❌}-{❌}term{❌}:{❌}factor{❌};{❌} +{❌}{❌}{❌}{❌}{❌}option{❌};{❌} +{❌}{❌}{❌}{❌}{❌}repeat0{❌};{❌} +{❌}{❌}{❌}{❌}{❌}repeat1{❌}.{❌} +{❌}-{❌}factor{❌}:{❌}terminal{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}nonterminal{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}"("{❌},{❌}S{❌},{❌}alts{❌},{❌}")"{❌},{❌}S{❌}.{❌} +{❌}repeat0{❌}:{❌}factor{❌},{❌}"*"{❌},{❌}S{❌},{❌}sep{❌}?{❌}.{❌} +{❌}repeat1{❌}:{❌}factor{❌},{❌}"+"{❌},{❌}S{❌},{❌}sep{❌}?{❌}.{❌} +{❌}option{❌}:{❌}factor{❌},{❌}"?"{❌},{❌}S{❌}.{❌} +{❌}sep{❌}:{❌}factor{❌}.{❌} +{❌}nonterminal{❌}:{❌}({❌}mark{❌},{❌}S{❌}){❌}?{❌},{❌}name{❌},{❌}S{❌}.{❌} +{❌}-{❌}terminal{❌}:{❌}literal{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}{❌}charset{❌}.{❌} +{❌}literal{❌}:{❌}quoted{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}encoded{❌}.{❌} +{❌}-{❌}quoted{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}-{❌}string{❌}.{❌} +{❌}@{❌}name{❌}:{❌}namestart{❌},{❌}namefollower{❌}*{❌}.{❌} +{❌}-{❌}namestart{❌}:{❌}[{❌}"_"{❌};{❌}Ll{❌};{❌}Lu{❌};{❌}Lm{❌};{❌}Lt{❌};{❌}Lo{❌}]{❌}.{❌} +{❌}-{❌}namefollower{❌}:{❌}namestart{❌};{❌}[{❌}"-.·‿⁀"{❌};{❌}Nd{❌};{❌}Mn{❌}]{❌}.{❌} +{❌}@{❌}tmark{❌}:{❌}[{❌}"^-"{❌}]{❌}.{❌} +{❌}string{❌}:{❌}-{❌}'"'{❌},{❌}dstring{❌},{❌}-{❌}'"'{❌},{❌}S{❌};{❌} +{❌}-{❌}"'"{❌},{❌}sstring{❌},{❌}-{❌}"'"{❌},{❌}S{❌}.{❌} +{❌}@{❌}dstring{❌}:{❌}dchar{❌}+{❌}.{❌} +{❌}@{❌}sstring{❌}:{❌}schar{❌}+{❌}.{❌} +{❌}dchar{❌}:{❌}~{❌}[{❌}'"'{❌}]{❌};{❌} +{❌}{❌}{❌}{❌}{❌}'"'{❌},{❌}-{❌}'"'{❌}.{❌}{{❌}all{❌}characters{❌},{❌}quotes{❌}must{❌}be{❌}doubled{❌}} +{❌}schar{❌}:{❌}~{❌}[{❌}"'"{❌}]{❌};{❌} +{❌}{❌}{❌}{❌}{❌}"'"{❌},{❌}-{❌}"'"{❌}.{❌}{{❌}all{❌}characters{❌},{❌}quotes{❌}must{❌}be{❌}doubled{❌}} +{❌}-{❌}encoded{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}-{❌}"#"{❌},{❌}@{❌}hex{❌},{❌}S{❌}.{❌} +{❌}hex{❌}:{❌}[{❌}"0"{❌}-{❌}"9"{❌};{❌}"a"{❌}-{❌}"f"{❌};{❌}"A"{❌}-{❌}"F"{❌}]{❌}+{❌}.{❌} +{❌}-{❌}charset{❌}:{❌}inclusion{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}{❌}exclusion{❌}.{❌} +{❌}inclusion{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}set{❌}.{❌} +{❌}exclusion{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}"~"{❌},{❌}S{❌},{❌}set{❌}.{❌} +{❌}-{❌}set{❌}:{❌}"["{❌},{❌}S{❌},{❌}member{❌}*{❌}({❌}[{❌}";|"{❌}]{❌},{❌}S{❌}){❌},{❌}"]"{❌},{❌}S{❌}.{❌} +{❌}-{❌}member{❌}:{❌}literal{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}range{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}class{❌}.{❌} +{❌}range{❌}:{❌}from{❌},{❌}"-"{❌},{❌}S{❌},{❌}to{❌}.{❌} +{❌}@{❌}from{❌}:{❌}character{❌}.{❌} +{❌}@{❌}to{❌}:{❌}character{❌}.{❌} +{❌}-{❌}character{❌}:{❌}-{❌}'"'{❌},{❌}dchar{❌},{❌}-{❌}'"'{❌},{❌}S{❌};{❌} +{❌}-{❌}"'"{❌},{❌}schar{❌},{❌}-{❌}"'"{❌},{❌}S{❌};{❌} +{❌}"#"{❌},{❌}hex{❌},{❌}S{❌}.{❌} +{❌}class{❌}:{❌}@{❌}code{❌},{❌}S{❌}.{❌} +{❌}code{❌}:{❌}letter{❌},{❌}letter{❌}.{❌} +{❌}-{❌}letter{❌}:{❌}[{❌}"a"{❌}-{❌}"z"{❌};{❌}"A"{❌}-{❌}"Z"{❌}]{❌}.{❌} diff --git a/tests/tests/ixml/ixml-comments.ixml b/tests/tests/ixml/ixml-comments.ixml new file mode 100644 index 00000000..1798d55f --- /dev/null +++ b/tests/tests/ixml/ixml-comments.ixml @@ -0,0 +1,60 @@ +{❌}ixml{❌}:{❌}S{❌},{❌}rule{❌}+{❌}S{❌},{❌}S{❌}.{❌} +{❌}-{❌}S{❌}:{❌}({❌}whitespace{❌};{❌}comment{❌}){❌}*{❌}.{❌} +{❌}-{❌}whitespace{❌}:{❌}-{❌}[{❌}Zs{❌}]{❌};{❌}tab{❌};{❌}lf{❌};{❌}cr{❌}.{❌} +{❌}-{❌}tab{❌}:{❌}-{❌}#9{❌}.{❌} +{❌}-{❌}lf{❌}:{❌}-{❌}#a{❌}.{❌} +{❌}-{❌}cr{❌}:{❌}-{❌}#d{❌}.{❌} +{❌}comment{❌}:{❌}-{❌}"{"{❌},{❌}({❌}cchar{❌};{❌}comment{❌}){❌}*{❌},{❌}-{❌}"}"{❌}.{❌} +{❌}-{❌}cchar{❌}:{❌}~{❌}[{❌}"{}"{❌}]{❌}.{❌} +{❌}rule{❌}:{❌}({❌}mark{❌},{❌}S{❌}){❌}?{❌},{❌}name{❌},{❌}S{❌},{❌}[{❌}"=:"{❌}]{❌},{❌}S{❌},{❌}-{❌}alts{❌},{❌}"."{❌}.{❌} +{❌}@{❌}mark{❌}:{❌}[{❌}"@^-"{❌}]{❌}.{❌} +{❌}alts{❌}:{❌}alt{❌}+{❌}({❌}[{❌}";|"{❌}]{❌},{❌}S{❌}){❌}.{❌} +{❌}alt{❌}:{❌}term{❌}*{❌}({❌}","{❌},{❌}S{❌}){❌}.{❌} +{❌}-{❌}term{❌}:{❌}factor{❌};{❌} +{❌}{❌}{❌}{❌}{❌}option{❌};{❌} +{❌}{❌}{❌}{❌}{❌}repeat0{❌};{❌} +{❌}{❌}{❌}{❌}{❌}repeat1{❌}.{❌} +{❌}-{❌}factor{❌}:{❌}terminal{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}nonterminal{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}"("{❌},{❌}S{❌},{❌}alts{❌},{❌}")"{❌},{❌}S{❌}.{❌} +{❌}repeat0{❌}:{❌}factor{❌},{❌}"*"{❌},{❌}S{❌},{❌}sep{❌}?{❌}.{❌} +{❌}repeat1{❌}:{❌}factor{❌},{❌}"+"{❌},{❌}S{❌},{❌}sep{❌}?{❌}.{❌} +{❌}option{❌}:{❌}factor{❌},{❌}"?"{❌},{❌}S{❌}.{❌} +{❌}sep{❌}:{❌}factor{❌}.{❌} +{❌}nonterminal{❌}:{❌}({❌}mark{❌},{❌}S{❌}){❌}?{❌},{❌}name{❌},{❌}S{❌}.{❌} +{❌}-{❌}terminal{❌}:{❌}literal{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}{❌}charset{❌}.{❌} +{❌}literal{❌}:{❌}quoted{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}encoded{❌}.{❌} +{❌}-{❌}quoted{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}-{❌}string{❌}.{❌} +{❌}@{❌}name{❌}:{❌}namestart{❌},{❌}namefollower{❌}*{❌}.{❌} +{❌}-{❌}namestart{❌}:{❌}[{❌}"_"{❌};{❌}Ll{❌};{❌}Lu{❌};{❌}Lm{❌};{❌}Lt{❌};{❌}Lo{❌}]{❌}.{❌} +{❌}-{❌}namefollower{❌}:{❌}namestart{❌};{❌}[{❌}"-.·‿⁀"{❌};{❌}Nd{❌};{❌}Mn{❌}]{❌}.{❌} +{❌}@{❌}tmark{❌}:{❌}[{❌}"^-"{❌}]{❌}.{❌} +{❌}string{❌}:{❌}-{❌}'"'{❌},{❌}dstring{❌},{❌}-{❌}'"'{❌},{❌}S{❌};{❌} +{❌}-{❌}"'"{❌},{❌}sstring{❌},{❌}-{❌}"'"{❌},{❌}S{❌}.{❌} +{❌}@{❌}dstring{❌}:{❌}dchar{❌}+{❌}.{❌} +{❌}@{❌}sstring{❌}:{❌}schar{❌}+{❌}.{❌} +{❌}dchar{❌}:{❌}~{❌}[{❌}'"'{❌}]{❌};{❌} +{❌}{❌}{❌}{❌}{❌}'"'{❌},{❌}-{❌}'"'{❌}.{❌}{{❌}all{❌}characters{❌},{❌}quotes{❌}must{❌}be{❌}doubled{❌}} +{❌}schar{❌}:{❌}~{❌}[{❌}"'"{❌}]{❌};{❌} +{❌}{❌}{❌}{❌}{❌}"'"{❌},{❌}-{❌}"'"{❌}.{❌}{{❌}all{❌}characters{❌},{❌}quotes{❌}must{❌}be{❌}doubled{❌}} +{❌}-{❌}encoded{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}-{❌}"#"{❌},{❌}@{❌}hex{❌},{❌}S{❌}.{❌} +{❌}hex{❌}:{❌}[{❌}"0"{❌}-{❌}"9"{❌};{❌}"a"{❌}-{❌}"f"{❌};{❌}"A"{❌}-{❌}"F"{❌}]{❌}+{❌}.{❌} +{❌}-{❌}charset{❌}:{❌}inclusion{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}{❌}exclusion{❌}.{❌} +{❌}inclusion{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}set{❌}.{❌} +{❌}exclusion{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}"~"{❌},{❌}S{❌},{❌}set{❌}.{❌} +{❌}-{❌}set{❌}:{❌}"["{❌},{❌}S{❌},{❌}member{❌}*{❌}({❌}[{❌}";|"{❌}]{❌},{❌}S{❌}){❌},{❌}"]"{❌},{❌}S{❌}.{❌} +{❌}-{❌}member{❌}:{❌}literal{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}range{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}class{❌}.{❌} +{❌}range{❌}:{❌}from{❌},{❌}"-"{❌},{❌}S{❌},{❌}to{❌}.{❌} +{❌}@{❌}from{❌}:{❌}character{❌}.{❌} +{❌}@{❌}to{❌}:{❌}character{❌}.{❌} +{❌}-{❌}character{❌}:{❌}-{❌}'"'{❌},{❌}dchar{❌},{❌}-{❌}'"'{❌},{❌}S{❌};{❌} +{❌}-{❌}"'"{❌},{❌}schar{❌},{❌}-{❌}"'"{❌},{❌}S{❌};{❌} +{❌}"#"{❌},{❌}hex{❌},{❌}S{❌}.{❌} +{❌}class{❌}:{❌}@{❌}code{❌},{❌}S{❌}.{❌} +{❌}code{❌}:{❌}letter{❌},{❌}letter{❌}.{❌} +{❌}-{❌}letter{❌}:{❌}[{❌}"a"{❌}-{❌}"z"{❌};{❌}"A"{❌}-{❌}"Z"{❌}]{❌}.{❌} diff --git a/tests/tests/ixml/ixml-comments.out b/tests/tests/ixml/ixml-comments.out new file mode 100644 index 00000000..2303b069 --- /dev/null +++ b/tests/tests/ixml/ixml-comments.out @@ -0,0 +1,1342 @@ +{ }ixml{ }:{ }S{ },{ }rule{ }+{ }S{ },{ }S{ }.{ } +{ }-{ }S{ }:{ }({ }whitespace{ };{ }comment{ }){ }*{ }.{ } +{ }-{ }whitespace{ }:{ }-{ }[{ }Zs{ }]{ };{ }tab{ };{ }lf{ };{ }cr{ }.{ } +{ }-{ }tab{ }:{ }-{ }#9{ }.{ } +{ }-{ }lf{ }:{ }-{ }#a{ }.{ } +{ }-{ }cr{ }:{ }-{ }#d{ }.{ } +{ }comment{ }:{ }-{ }"{"{ },{ }({ }cchar{ };{ }comment{ }){ }*{ },{ }-{ }"}"{ }.{ } +{ }-{ }cchar{ }:{ }~{ }[{ }"{}"{ }]{ }.{ } +{ }rule{ }:{ }({ }mark{ },{ }S{ }){ }?{ },{ }name{ },{ }S{ },{ }[{ }"=:"{ }]{ },{ }S{ },{ }-{ }alts{ },{ }"."{ }.{ } +{ }@{ }mark{ }:{ }[{ }"@^-"{ }]{ }.{ } +{ }alts{ }:{ }alt{ }+{ }({ }[{ }";|"{ }]{ },{ }S{ }){ }.{ } +{ }alt{ }:{ }term{ }*{ }({ }","{ },{ }S{ }){ }.{ } +{ }-{ }term{ }:{ }factor{ };{ } +{ }{ }{ }{ }{ }option{ };{ } +{ }{ }{ }{ }{ }repeat0{ };{ } +{ }{ }{ }{ }{ }repeat1{ }.{ } +{ }-{ }factor{ }:{ }terminal{ };{ } +{ }{ }{ }{ }{ }{ }nonterminal{ };{ } +{ }{ }{ }{ }{ }{ }"("{ },{ }S{ },{ }alts{ },{ }")"{ },{ }S{ }.{ } +{ }repeat0{ }:{ }factor{ },{ }"*"{ },{ }S{ },{ }sep{ }?{ }.{ } +{ }repeat1{ }:{ }factor{ },{ }"+"{ },{ }S{ },{ }sep{ }?{ }.{ } +{ }option{ }:{ }factor{ },{ }"?"{ },{ }S{ }.{ } +{ }sep{ }:{ }factor{ }.{ } +{ }nonterminal{ }:{ }({ }mark{ },{ }S{ }){ }?{ },{ }name{ },{ }S{ }.{ } +{ }-{ }terminal{ }:{ }literal{ };{ } +{ }{ }{ }{ }{ }{ }{ }charset{ }.{ } +{ }literal{ }:{ }quoted{ };{ } +{ }{ }{ }{ }{ }{ }encoded{ }.{ } +{ }-{ }quoted{ }:{ }({ }tmark{ },{ }S{ }){ }?{ },{ }-{ }string{ }.{ } +{ }@{ }name{ }:{ }namestart{ },{ }namefollower{ }*{ }.{ } +{ }-{ }namestart{ }:{ }[{ }"_"{ };{ }Ll{ };{ }Lu{ };{ }Lm{ };{ }Lt{ };{ }Lo{ }]{ }.{ } +{ }-{ }namefollower{ }:{ }namestart{ };{ }[{ }"-.·‿⁀"{ };{ }Nd{ };{ }Mn{ }]{ }.{ } +{ }@{ }tmark{ }:{ }[{ }"^-"{ }]{ }.{ } +{ }string{ }:{ }-{ }'"'{ },{ }dstring{ },{ }-{ }'"'{ },{ }S{ };{ } +{ }-{ }"'"{ },{ }sstring{ },{ }-{ }"'"{ },{ }S{ }.{ } +{ }@{ }dstring{ }:{ }dchar{ }+{ }.{ } +{ }@{ }sstring{ }:{ }schar{ }+{ }.{ } +{ }dchar{ }:{ }~{ }[{ }'"'{ }]{ };{ } +{ }{ }{ }{ }{ }'"'{ },{ }-{ }'"'{ }.{ }{{ }all{ }characters{ },{ }quotes{ }must{ }be{ }doubled{ }} +{ }schar{ }:{ }~{ }[{ }"'"{ }]{ };{ } +{ }{ }{ }{ }{ }"'"{ },{ }-{ }"'"{ }.{ }{{ }all{ }characters{ },{ }quotes{ }must{ }be{ }doubled{ }} +{ }-{ }encoded{ }:{ }({ }tmark{ },{ }S{ }){ }?{ },{ }-{ }"#"{ },{ }@{ }hex{ },{ }S{ }.{ } +{ }hex{ }:{ }[{ }"0"{ }-{ }"9"{ };{ }"a"{ }-{ }"f"{ };{ }"A"{ }-{ }"F"{ }]{ }+{ }.{ } +{ }-{ }charset{ }:{ }inclusion{ };{ } +{ }{ }{ }{ }{ }{ }{ }exclusion{ }.{ } +{ }inclusion{ }:{ }({ }tmark{ },{ }S{ }){ }?{ },{ }set{ }.{ } +{ }exclusion{ }:{ }({ }tmark{ },{ }S{ }){ }?{ },{ }"~"{ },{ }S{ },{ }set{ }.{ } +{ }-{ }set{ }:{ }"["{ },{ }S{ },{ }member{ }*{ }({ }[{ }";|"{ }]{ },{ }S{ }){ },{ }"]"{ },{ }S{ }.{ } +{ }-{ }member{ }:{ }literal{ };{ } +{ }{ }{ }{ }{ }{ }range{ };{ } +{ }{ }{ }{ }{ }{ }class{ }.{ } +{ }range{ }:{ }from{ },{ }"-"{ },{ }S{ },{ }to{ }.{ } +{ }@{ }from{ }:{ }character{ }.{ } +{ }@{ }to{ }:{ }character{ }.{ } +{ }-{ }character{ }:{ }-{ }'"'{ },{ }dchar{ },{ }-{ }'"'{ },{ }S{ };{ } +{ }-{ }"'"{ },{ }schar{ },{ }-{ }"'"{ },{ }S{ };{ } +{ }"#"{ },{ }hex{ },{ }S{ }.{ } +{ }class{ }:{ }@{ }code{ },{ }S{ }.{ } +{ }code{ }:{ }letter{ },{ }letter{ }.{ } +{ }-{ }letter{ }:{ }[{ }"a"{ }-{ }"z"{ };{ }"A"{ }-{ }"Z"{ }]{ }.{ } +# +{ }ixml{ }:{ }S{ },{ }rule{ }+{ }S{ },{ }S{ }.{ } +{ }-{ }S{ }:{ }({ }whitespace{ };{ }comment{ }){ }*{ }.{ } +{ }-{ }whitespace{ }:{ }-{ }[{ }Zs{ }]{ };{ }tab{ };{ }lf{ };{ }cr{ }.{ } +{ }-{ }tab{ }:{ }-{ }#9{ }.{ } +{ }-{ }lf{ }:{ }-{ }#a{ }.{ } +{ }-{ }cr{ }:{ }-{ }#d{ }.{ } +{ }comment{ }:{ }-{ }"{"{ },{ }({ }cchar{ };{ }comment{ }){ }*{ },{ }-{ }"}"{ }.{ } +{ }-{ }cchar{ }:{ }~{ }[{ }"{}"{ }]{ }.{ } +{ }rule{ }:{ }({ }mark{ },{ }S{ }){ }?{ },{ }name{ },{ }S{ },{ }[{ }"=:"{ }]{ },{ }S{ },{ }-{ }alts{ },{ }"."{ }.{ } +{ }@{ }mark{ }:{ }[{ }"@^-"{ }]{ }.{ } +{ }alts{ }:{ }alt{ }+{ }({ }[{ }";|"{ }]{ },{ }S{ }){ }.{ } +{ }alt{ }:{ }term{ }*{ }({ }","{ },{ }S{ }){ }.{ } +{ }-{ }term{ }:{ }factor{ };{ } +{ }{ }{ }{ }{ }option{ };{ } +{ }{ }{ }{ }{ }repeat0{ };{ } +{ }{ }{ }{ }{ }repeat1{ }.{ } +{ }-{ }factor{ }:{ }terminal{ };{ } +{ }{ }{ }{ }{ }{ }nonterminal{ };{ } +{ }{ }{ }{ }{ }{ }"("{ },{ }S{ },{ }alts{ },{ }")"{ },{ }S{ }.{ } +{ }repeat0{ }:{ }factor{ },{ }"*"{ },{ }S{ },{ }sep{ }?{ }.{ } +{ }repeat1{ }:{ }factor{ },{ }"+"{ },{ }S{ },{ }sep{ }?{ }.{ } +{ }option{ }:{ }factor{ },{ }"?"{ },{ }S{ }.{ } +{ }sep{ }:{ }factor{ }.{ } +{ }nonterminal{ }:{ }({ }mark{ },{ }S{ }){ }?{ },{ }name{ },{ }S{ }.{ } +{ }-{ }terminal{ }:{ }literal{ };{ } +{ }{ }{ }{ }{ }{ }{ }charset{ }.{ } +{ }literal{ }:{ }quoted{ };{ } +{ }{ }{ }{ }{ }{ }encoded{ }.{ } +{ }-{ }quoted{ }:{ }({ }tmark{ },{ }S{ }){ }?{ },{ }-{ }string{ }.{ } +{ }@{ }name{ }:{ }namestart{ },{ }namefollower{ }*{ }.{ } +{ }-{ }namestart{ }:{ }[{ }"_"{ };{ }Ll{ };{ }Lu{ };{ }Lm{ };{ }Lt{ };{ }Lo{ }]{ }.{ } +{ }-{ }namefollower{ }:{ }namestart{ };{ }[{ }"-.·‿⁀"{ };{ }Nd{ };{ }Mn{ }]{ }.{ } +{ }@{ }tmark{ }:{ }[{ }"^-"{ }]{ }.{ } +{ }string{ }:{ }-{ }'"'{ },{ }dstring{ },{ }-{ }'"'{ },{ }S{ };{ } +{ }-{ }"'"{ },{ }sstring{ },{ }-{ }"'"{ },{ }S{ }.{ } +{ }@{ }dstring{ }:{ }dchar{ }+{ }.{ } +{ }@{ }sstring{ }:{ }schar{ }+{ }.{ } +{ }dchar{ }:{ }~{ }[{ }'"'{ }]{ };{ } +{ }{ }{ }{ }{ }'"'{ },{ }-{ }'"'{ }.{ }{{ }all{ }characters{ },{ }quotes{ }must{ }be{ }doubled{ }} +{ }schar{ }:{ }~{ }[{ }"'"{ }]{ };{ } +{ }{ }{ }{ }{ }"'"{ },{ }-{ }"'"{ }.{ }{{ }all{ }characters{ },{ }quotes{ }must{ }be{ }doubled{ }} +{ }-{ }encoded{ }:{ }({ }tmark{ },{ }S{ }){ }?{ },{ }-{ }"#"{ },{ }@{ }hex{ },{ }S{ }.{ } +{ }hex{ }:{ }[{ }"0"{ }-{ }"9"{ };{ }"a"{ }-{ }"f"{ };{ }"A"{ }-{ }"F"{ }]{ }+{ }.{ } +{ }-{ }charset{ }:{ }inclusion{ };{ } +{ }{ }{ }{ }{ }{ }{ }exclusion{ }.{ } +{ }inclusion{ }:{ }({ }tmark{ },{ }S{ }){ }?{ },{ }set{ }.{ } +{ }exclusion{ }:{ }({ }tmark{ },{ }S{ }){ }?{ },{ }"~"{ },{ }S{ },{ }set{ }.{ } +{ }-{ }set{ }:{ }"["{ },{ }S{ },{ }member{ }*{ }({ }[{ }";|"{ }]{ },{ }S{ }){ },{ }"]"{ },{ }S{ }.{ } +{ }-{ }member{ }:{ }literal{ };{ } +{ }{ }{ }{ }{ }{ }range{ };{ } +{ }{ }{ }{ }{ }{ }class{ }.{ } +{ }range{ }:{ }from{ },{ }"-"{ },{ }S{ },{ }to{ }.{ } +{ }@{ }from{ }:{ }character{ }.{ } +{ }@{ }to{ }:{ }character{ }.{ } +{ }-{ }character{ }:{ }-{ }'"'{ },{ }dchar{ },{ }-{ }'"'{ },{ }S{ };{ } +{ }-{ }"'"{ },{ }schar{ },{ }-{ }"'"{ },{ }S{ };{ } +{ }"#"{ },{ }hex{ },{ }S{ }.{ } +{ }class{ }:{ }@{ }code{ },{ }S{ }.{ } +{ }code{ }:{ }letter{ },{ }letter{ }.{ } +{ }-{ }letter{ }:{ }[{ }"a"{ }-{ }"z"{ };{ }"A"{ }-{ }"Z"{ }]{ }.{ } +# + + + + + : + + + + + , + + + + + + + + + + + + + , + + + + + . + + + + + : + + + ( + + + + + + + ; + + + + + + + ) + * + + + . + + + + + : + + + + [ + + + + ] + + + ; + + + + + + ; + + + + + + ; + + + + + + . + + + + + : + + + + + + + . + + + + + : + + + + + + + . + + + + + : + + + + + + + . + + + + : + + + + + + , + + ( + + + + + + + ; + + + + + + + ) + * + + , + + + + + + . + + + + + : + + + ~ + [ + + + + ] + + + . + + + + : + + + , + + + + , + + + + , + + [ + + + + ] + + , + + + + , + + + + + , + + + + + . + + + + + : + + + [ + + + + ] + + + . + + + + : + + + + + + + + + ( + + + + [ + + + + ] + + , + + + + + + ) + + + + . + + + + : + + + + + + * + + ( + + + + + + , + + + + + + ) + + + + . + + + + + : + + + + + + ; + + + + + + + + + + + ; + + + + + + + + + + + ; + + + + + + + + + + + . + + + + + : + + + + + + ; + + + + + + + + + + + + ; + + + + + + + + + + + , + + + + , + + + + , + + + + , + + + + + . + + + + : + + + + + , + + + + , + + + + , + + + . + + + + : + + + + + , + + + + , + + + + , + + + . + + + + : + + + + + , + + + + , + + + + + . + + + + : + + + + + + . + + + + : + + + , + + + + , + + + + + . + + + + + : + + + + + + ; + + + + + + + + + + + + + . + + + + : + + + + + + ; + + + + + + + + + + + + . + + + + + : + + + , + + + + + + . + + + + + : + + + + + , + + + + + * + + + . + + + + + : + + + [ + + + + ; + + + + ; + + + + ; + + + + ; + + + + ; + + + + ] + + + . + + + + + : + + + + + + ; + + + [ + + + + ; + + + + ; + + + + ] + + + . + + + + + : + + + [ + + + + ] + + + . + + + + : + + + + + + , + + + + , + + + + + , + + + + + ; + + + + + + + , + + + + , + + + + + , + + + + + . + + + + + : + + + + + + + + + + . + + + + + : + + + + + + + + + + . + + + + : + + + ~ + [ + + + + ] + + + ; + + + + + + + + + + , + + + + + + . + + + all + characters + , + quotes + must + be + doubled + + + + + : + + + ~ + [ + + + + ] + + + ; + + + + + + + + + + , + + + + + + . + + + all + characters + , + quotes + must + be + doubled + + + + + + : + + + , + + + + + , + + + + + , + + + + + . + + + + : + + + + [ + + - + + ; + + - + + ; + + - + + ] + + + + + + . + + + + + : + + + + + + ; + + + + + + + + + + + + + . + + + + : + + + , + + + + + . + + + + : + + + , + + + + , + + + + , + + + + + . + + + + + : + + + + + , + + + + , + + + + + * + + ( + + + + [ + + + + ] + + , + + + + + + ) + + + , + + + + , + + + + + . + + + + + : + + + + + + ; + + + + + + + + + + + + ; + + + + + + + + + + + + . + + + + : + + + + + , + + + + , + + + + , + + + + + . + + + + + : + + + + + + . + + + + + : + + + + + + . + + + + + : + + + + + + , + + + + , + + + + + , + + + + + ; + + + + + + + , + + + + , + + + + + , + + + + + ; + + + + + + , + + + + , + + + + + . + + + + : + + + + + + , + + + + + . + + + + : + + + + + , + + + + + . + + + + + : + + + [ + + - + + ; + + - + + ] + + + . + + diff --git a/tests/tests/ixml/ixml-comments.req b/tests/tests/ixml/ixml-comments.req new file mode 100644 index 00000000..a063ad62 --- /dev/null +++ b/tests/tests/ixml/ixml-comments.req @@ -0,0 +1,1342 @@ +{❌}ixml{❌}:{❌}S{❌},{❌}rule{❌}+{❌}S{❌},{❌}S{❌}.{❌} +{❌}-{❌}S{❌}:{❌}({❌}whitespace{❌};{❌}comment{❌}){❌}*{❌}.{❌} +{❌}-{❌}whitespace{❌}:{❌}-{❌}[{❌}Zs{❌}]{❌};{❌}tab{❌};{❌}lf{❌};{❌}cr{❌}.{❌} +{❌}-{❌}tab{❌}:{❌}-{❌}#9{❌}.{❌} +{❌}-{❌}lf{❌}:{❌}-{❌}#a{❌}.{❌} +{❌}-{❌}cr{❌}:{❌}-{❌}#d{❌}.{❌} +{❌}comment{❌}:{❌}-{❌}"{"{❌},{❌}({❌}cchar{❌};{❌}comment{❌}){❌}*{❌},{❌}-{❌}"}"{❌}.{❌} +{❌}-{❌}cchar{❌}:{❌}~{❌}[{❌}"{}"{❌}]{❌}.{❌} +{❌}rule{❌}:{❌}({❌}mark{❌},{❌}S{❌}){❌}?{❌},{❌}name{❌},{❌}S{❌},{❌}[{❌}"=:"{❌}]{❌},{❌}S{❌},{❌}-{❌}alts{❌},{❌}"."{❌}.{❌} +{❌}@{❌}mark{❌}:{❌}[{❌}"@^-"{❌}]{❌}.{❌} +{❌}alts{❌}:{❌}alt{❌}+{❌}({❌}[{❌}";|"{❌}]{❌},{❌}S{❌}){❌}.{❌} +{❌}alt{❌}:{❌}term{❌}*{❌}({❌}","{❌},{❌}S{❌}){❌}.{❌} +{❌}-{❌}term{❌}:{❌}factor{❌};{❌} +{❌}{❌}{❌}{❌}{❌}option{❌};{❌} +{❌}{❌}{❌}{❌}{❌}repeat0{❌};{❌} +{❌}{❌}{❌}{❌}{❌}repeat1{❌}.{❌} +{❌}-{❌}factor{❌}:{❌}terminal{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}nonterminal{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}"("{❌},{❌}S{❌},{❌}alts{❌},{❌}")"{❌},{❌}S{❌}.{❌} +{❌}repeat0{❌}:{❌}factor{❌},{❌}"*"{❌},{❌}S{❌},{❌}sep{❌}?{❌}.{❌} +{❌}repeat1{❌}:{❌}factor{❌},{❌}"+"{❌},{❌}S{❌},{❌}sep{❌}?{❌}.{❌} +{❌}option{❌}:{❌}factor{❌},{❌}"?"{❌},{❌}S{❌}.{❌} +{❌}sep{❌}:{❌}factor{❌}.{❌} +{❌}nonterminal{❌}:{❌}({❌}mark{❌},{❌}S{❌}){❌}?{❌},{❌}name{❌},{❌}S{❌}.{❌} +{❌}-{❌}terminal{❌}:{❌}literal{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}{❌}charset{❌}.{❌} +{❌}literal{❌}:{❌}quoted{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}encoded{❌}.{❌} +{❌}-{❌}quoted{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}-{❌}string{❌}.{❌} +{❌}@{❌}name{❌}:{❌}namestart{❌},{❌}namefollower{❌}*{❌}.{❌} +{❌}-{❌}namestart{❌}:{❌}[{❌}"_"{❌};{❌}Ll{❌};{❌}Lu{❌};{❌}Lm{❌};{❌}Lt{❌};{❌}Lo{❌}]{❌}.{❌} +{❌}-{❌}namefollower{❌}:{❌}namestart{❌};{❌}[{❌}"-.·‿⁀"{❌};{❌}Nd{❌};{❌}Mn{❌}]{❌}.{❌} +{❌}@{❌}tmark{❌}:{❌}[{❌}"^-"{❌}]{❌}.{❌} +{❌}string{❌}:{❌}-{❌}'"'{❌},{❌}dstring{❌},{❌}-{❌}'"'{❌},{❌}S{❌};{❌} +{❌}-{❌}"'"{❌},{❌}sstring{❌},{❌}-{❌}"'"{❌},{❌}S{❌}.{❌} +{❌}@{❌}dstring{❌}:{❌}dchar{❌}+{❌}.{❌} +{❌}@{❌}sstring{❌}:{❌}schar{❌}+{❌}.{❌} +{❌}dchar{❌}:{❌}~{❌}[{❌}'"'{❌}]{❌};{❌} +{❌}{❌}{❌}{❌}{❌}'"'{❌},{❌}-{❌}'"'{❌}.{❌}{{❌}all{❌}characters{❌},{❌}quotes{❌}must{❌}be{❌}doubled{❌}} +{❌}schar{❌}:{❌}~{❌}[{❌}"'"{❌}]{❌};{❌} +{❌}{❌}{❌}{❌}{❌}"'"{❌},{❌}-{❌}"'"{❌}.{❌}{{❌}all{❌}characters{❌},{❌}quotes{❌}must{❌}be{❌}doubled{❌}} +{❌}-{❌}encoded{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}-{❌}"#"{❌},{❌}@{❌}hex{❌},{❌}S{❌}.{❌} +{❌}hex{❌}:{❌}[{❌}"0"{❌}-{❌}"9"{❌};{❌}"a"{❌}-{❌}"f"{❌};{❌}"A"{❌}-{❌}"F"{❌}]{❌}+{❌}.{❌} +{❌}-{❌}charset{❌}:{❌}inclusion{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}{❌}exclusion{❌}.{❌} +{❌}inclusion{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}set{❌}.{❌} +{❌}exclusion{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}"~"{❌},{❌}S{❌},{❌}set{❌}.{❌} +{❌}-{❌}set{❌}:{❌}"["{❌},{❌}S{❌},{❌}member{❌}*{❌}({❌}[{❌}";|"{❌}]{❌},{❌}S{❌}){❌},{❌}"]"{❌},{❌}S{❌}.{❌} +{❌}-{❌}member{❌}:{❌}literal{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}range{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}class{❌}.{❌} +{❌}range{❌}:{❌}from{❌},{❌}"-"{❌},{❌}S{❌},{❌}to{❌}.{❌} +{❌}@{❌}from{❌}:{❌}character{❌}.{❌} +{❌}@{❌}to{❌}:{❌}character{❌}.{❌} +{❌}-{❌}character{❌}:{❌}-{❌}'"'{❌},{❌}dchar{❌},{❌}-{❌}'"'{❌},{❌}S{❌};{❌} +{❌}-{❌}"'"{❌},{❌}schar{❌},{❌}-{❌}"'"{❌},{❌}S{❌};{❌} +{❌}"#"{❌},{❌}hex{❌},{❌}S{❌}.{❌} +{❌}class{❌}:{❌}@{❌}code{❌},{❌}S{❌}.{❌} +{❌}code{❌}:{❌}letter{❌},{❌}letter{❌}.{❌} +{❌}-{❌}letter{❌}:{❌}[{❌}"a"{❌}-{❌}"z"{❌};{❌}"A"{❌}-{❌}"Z"{❌}]{❌}.{❌} +# +{❌}ixml{❌}:{❌}S{❌},{❌}rule{❌}+{❌}S{❌},{❌}S{❌}.{❌} +{❌}-{❌}S{❌}:{❌}({❌}whitespace{❌};{❌}comment{❌}){❌}*{❌}.{❌} +{❌}-{❌}whitespace{❌}:{❌}-{❌}[{❌}Zs{❌}]{❌};{❌}tab{❌};{❌}lf{❌};{❌}cr{❌}.{❌} +{❌}-{❌}tab{❌}:{❌}-{❌}#9{❌}.{❌} +{❌}-{❌}lf{❌}:{❌}-{❌}#a{❌}.{❌} +{❌}-{❌}cr{❌}:{❌}-{❌}#d{❌}.{❌} +{❌}comment{❌}:{❌}-{❌}"{"{❌},{❌}({❌}cchar{❌};{❌}comment{❌}){❌}*{❌},{❌}-{❌}"}"{❌}.{❌} +{❌}-{❌}cchar{❌}:{❌}~{❌}[{❌}"{}"{❌}]{❌}.{❌} +{❌}rule{❌}:{❌}({❌}mark{❌},{❌}S{❌}){❌}?{❌},{❌}name{❌},{❌}S{❌},{❌}[{❌}"=:"{❌}]{❌},{❌}S{❌},{❌}-{❌}alts{❌},{❌}"."{❌}.{❌} +{❌}@{❌}mark{❌}:{❌}[{❌}"@^-"{❌}]{❌}.{❌} +{❌}alts{❌}:{❌}alt{❌}+{❌}({❌}[{❌}";|"{❌}]{❌},{❌}S{❌}){❌}.{❌} +{❌}alt{❌}:{❌}term{❌}*{❌}({❌}","{❌},{❌}S{❌}){❌}.{❌} +{❌}-{❌}term{❌}:{❌}factor{❌};{❌} +{❌}{❌}{❌}{❌}{❌}option{❌};{❌} +{❌}{❌}{❌}{❌}{❌}repeat0{❌};{❌} +{❌}{❌}{❌}{❌}{❌}repeat1{❌}.{❌} +{❌}-{❌}factor{❌}:{❌}terminal{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}nonterminal{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}"("{❌},{❌}S{❌},{❌}alts{❌},{❌}")"{❌},{❌}S{❌}.{❌} +{❌}repeat0{❌}:{❌}factor{❌},{❌}"*"{❌},{❌}S{❌},{❌}sep{❌}?{❌}.{❌} +{❌}repeat1{❌}:{❌}factor{❌},{❌}"+"{❌},{❌}S{❌},{❌}sep{❌}?{❌}.{❌} +{❌}option{❌}:{❌}factor{❌},{❌}"?"{❌},{❌}S{❌}.{❌} +{❌}sep{❌}:{❌}factor{❌}.{❌} +{❌}nonterminal{❌}:{❌}({❌}mark{❌},{❌}S{❌}){❌}?{❌},{❌}name{❌},{❌}S{❌}.{❌} +{❌}-{❌}terminal{❌}:{❌}literal{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}{❌}charset{❌}.{❌} +{❌}literal{❌}:{❌}quoted{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}encoded{❌}.{❌} +{❌}-{❌}quoted{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}-{❌}string{❌}.{❌} +{❌}@{❌}name{❌}:{❌}namestart{❌},{❌}namefollower{❌}*{❌}.{❌} +{❌}-{❌}namestart{❌}:{❌}[{❌}"_"{❌};{❌}Ll{❌};{❌}Lu{❌};{❌}Lm{❌};{❌}Lt{❌};{❌}Lo{❌}]{❌}.{❌} +{❌}-{❌}namefollower{❌}:{❌}namestart{❌};{❌}[{❌}"-.·‿⁀"{❌};{❌}Nd{❌};{❌}Mn{❌}]{❌}.{❌} +{❌}@{❌}tmark{❌}:{❌}[{❌}"^-"{❌}]{❌}.{❌} +{❌}string{❌}:{❌}-{❌}'"'{❌},{❌}dstring{❌},{❌}-{❌}'"'{❌},{❌}S{❌};{❌} +{❌}-{❌}"'"{❌},{❌}sstring{❌},{❌}-{❌}"'"{❌},{❌}S{❌}.{❌} +{❌}@{❌}dstring{❌}:{❌}dchar{❌}+{❌}.{❌} +{❌}@{❌}sstring{❌}:{❌}schar{❌}+{❌}.{❌} +{❌}dchar{❌}:{❌}~{❌}[{❌}'"'{❌}]{❌};{❌} +{❌}{❌}{❌}{❌}{❌}'"'{❌},{❌}-{❌}'"'{❌}.{❌}{{❌}all{❌}characters{❌},{❌}quotes{❌}must{❌}be{❌}doubled{❌}} +{❌}schar{❌}:{❌}~{❌}[{❌}"'"{❌}]{❌};{❌} +{❌}{❌}{❌}{❌}{❌}"'"{❌},{❌}-{❌}"'"{❌}.{❌}{{❌}all{❌}characters{❌},{❌}quotes{❌}must{❌}be{❌}doubled{❌}} +{❌}-{❌}encoded{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}-{❌}"#"{❌},{❌}@{❌}hex{❌},{❌}S{❌}.{❌} +{❌}hex{❌}:{❌}[{❌}"0"{❌}-{❌}"9"{❌};{❌}"a"{❌}-{❌}"f"{❌};{❌}"A"{❌}-{❌}"F"{❌}]{❌}+{❌}.{❌} +{❌}-{❌}charset{❌}:{❌}inclusion{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}{❌}exclusion{❌}.{❌} +{❌}inclusion{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}set{❌}.{❌} +{❌}exclusion{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}"~"{❌},{❌}S{❌},{❌}set{❌}.{❌} +{❌}-{❌}set{❌}:{❌}"["{❌},{❌}S{❌},{❌}member{❌}*{❌}({❌}[{❌}";|"{❌}]{❌},{❌}S{❌}){❌},{❌}"]"{❌},{❌}S{❌}.{❌} +{❌}-{❌}member{❌}:{❌}literal{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}range{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}class{❌}.{❌} +{❌}range{❌}:{❌}from{❌},{❌}"-"{❌},{❌}S{❌},{❌}to{❌}.{❌} +{❌}@{❌}from{❌}:{❌}character{❌}.{❌} +{❌}@{❌}to{❌}:{❌}character{❌}.{❌} +{❌}-{❌}character{❌}:{❌}-{❌}'"'{❌},{❌}dchar{❌},{❌}-{❌}'"'{❌},{❌}S{❌};{❌} +{❌}-{❌}"'"{❌},{❌}schar{❌},{❌}-{❌}"'"{❌},{❌}S{❌};{❌} +{❌}"#"{❌},{❌}hex{❌},{❌}S{❌}.{❌} +{❌}class{❌}:{❌}@{❌}code{❌},{❌}S{❌}.{❌} +{❌}code{❌}:{❌}letter{❌},{❌}letter{❌}.{❌} +{❌}-{❌}letter{❌}:{❌}[{❌}"a"{❌}-{❌}"z"{❌};{❌}"A"{❌}-{❌}"Z"{❌}]{❌}.{❌} +# + + + + + : + + + + + , + + + + + + + + + + + + + , + + + + + . + + + + + : + + + ( + + + + + + + ; + + + + + + + ) + * + + + . + + + + + : + + + + [ + + + + ] + + + ; + + + + + + ; + + + + + + ; + + + + + + . + + + + + : + + + + + + + . + + + + + : + + + + + + + . + + + + + : + + + + + + + . + + + + : + + + + + + , + + ( + + + + + + + ; + + + + + + + ) + * + + , + + + + + + . + + + + + : + + + ~ + [ + + + + ] + + + . + + + + : + + + , + + + + , + + + + , + + [ + + + + ] + + , + + + + , + + + + + , + + + + + . + + + + + : + + + [ + + + + ] + + + . + + + + : + + + + + + + + + ( + + + + [ + + + + ] + + , + + + + + + ) + + + + . + + + + : + + + + + + * + + ( + + + + + + , + + + + + + ) + + + + . + + + + + : + + + + + + ; + + + + + + + + + + + ; + + + + + + + + + + + ; + + + + + + + + + + + . + + + + + : + + + + + + ; + + + + + + + + + + + + ; + + + + + + + + + + + , + + + + , + + + + , + + + + , + + + + + . + + + + : + + + + + , + + + + , + + + + , + + + . + + + + : + + + + + , + + + + , + + + + , + + + . + + + + : + + + + + , + + + + , + + + + + . + + + + : + + + + + + . + + + + : + + + , + + + + , + + + + + . + + + + + : + + + + + + ; + + + + + + + + + + + + + . + + + + : + + + + + + ; + + + + + + + + + + + + . + + + + + : + + + , + + + + + + . + + + + + : + + + + + , + + + + + * + + + . + + + + + : + + + [ + + + + ; + + + + ; + + + + ; + + + + ; + + + + ; + + + + ] + + + . + + + + + : + + + + + + ; + + + [ + + + + ; + + + + ; + + + + ] + + + . + + + + + : + + + [ + + + + ] + + + . + + + + : + + + + + + , + + + + , + + + + + , + + + + + ; + + + + + + + , + + + + , + + + + + , + + + + + . + + + + + : + + + + + + + + + + . + + + + + : + + + + + + + + + + . + + + + : + + + ~ + [ + + + + ] + + + ; + + + + + + + + + + , + + + + + + . + + + all + characters + , + quotes + must + be + doubled + + + + + : + + + ~ + [ + + + + ] + + + ; + + + + + + + + + + , + + + + + + . + + + all + characters + , + quotes + must + be + doubled + + + + + + : + + + , + + + + + , + + + + + , + + + + + . + + + + : + + + + [ + + - + + ; + + - + + ; + + - + + ] + + + + + + . + + + + + : + + + + + + ; + + + + + + + + + + + + + . + + + + : + + + , + + + + + . + + + + : + + + , + + + + , + + + + , + + + + + . + + + + + : + + + + + , + + + + , + + + + + * + + ( + + + + [ + + + + ] + + , + + + + + + ) + + + , + + + + , + + + + + . + + + + + : + + + + + + ; + + + + + + + + + + + + ; + + + + + + + + + + + + . + + + + : + + + + + , + + + + , + + + + , + + + + + . + + + + + : + + + + + + . + + + + + : + + + + + + . + + + + + : + + + + + + , + + + + , + + + + + , + + + + + ; + + + + + + + , + + + + , + + + + + , + + + + + ; + + + + + + , + + + + , + + + + + . + + + + : + + + + + + , + + + + + . + + + + : + + + + + , + + + + + . + + + + + : + + + [ + + - + + ; + + - + + ] + + + . + + diff --git a/tests/tests/ixml/ixml-comments.res b/tests/tests/ixml/ixml-comments.res new file mode 100644 index 00000000..ce994f7f --- /dev/null +++ b/tests/tests/ixml/ixml-comments.res @@ -0,0 +1,1342 @@ +{❌}ixml{❌}:{❌}S{❌},{❌}rule{❌}+{❌}S{❌},{❌}S{❌}.{❌} +{❌}-{❌}S{❌}:{❌}({❌}whitespace{❌};{❌}comment{❌}){❌}*{❌}.{❌} +{❌}-{❌}whitespace{❌}:{❌}-{❌}[{❌}Zs{❌}]{❌};{❌}tab{❌};{❌}lf{❌};{❌}cr{❌}.{❌} +{❌}-{❌}tab{❌}:{❌}-{❌}#9{❌}.{❌} +{❌}-{❌}lf{❌}:{❌}-{❌}#a{❌}.{❌} +{❌}-{❌}cr{❌}:{❌}-{❌}#d{❌}.{❌} +{❌}comment{❌}:{❌}-{❌}"{"{❌},{❌}({❌}cchar{❌};{❌}comment{❌}){❌}*{❌},{❌}-{❌}"}"{❌}.{❌} +{❌}-{❌}cchar{❌}:{❌}~{❌}[{❌}"{}"{❌}]{❌}.{❌} +{❌}rule{❌}:{❌}({❌}mark{❌},{❌}S{❌}){❌}?{❌},{❌}name{❌},{❌}S{❌},{❌}[{❌}"=:"{❌}]{❌},{❌}S{❌},{❌}-{❌}alts{❌},{❌}"."{❌}.{❌} +{❌}@{❌}mark{❌}:{❌}[{❌}"@^-"{❌}]{❌}.{❌} +{❌}alts{❌}:{❌}alt{❌}+{❌}({❌}[{❌}";|"{❌}]{❌},{❌}S{❌}){❌}.{❌} +{❌}alt{❌}:{❌}term{❌}*{❌}({❌}","{❌},{❌}S{❌}){❌}.{❌} +{❌}-{❌}term{❌}:{❌}factor{❌};{❌} +{❌}{❌}{❌}{❌}{❌}option{❌};{❌} +{❌}{❌}{❌}{❌}{❌}repeat0{❌};{❌} +{❌}{❌}{❌}{❌}{❌}repeat1{❌}.{❌} +{❌}-{❌}factor{❌}:{❌}terminal{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}nonterminal{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}"("{❌},{❌}S{❌},{❌}alts{❌},{❌}")"{❌},{❌}S{❌}.{❌} +{❌}repeat0{❌}:{❌}factor{❌},{❌}"*"{❌},{❌}S{❌},{❌}sep{❌}?{❌}.{❌} +{❌}repeat1{❌}:{❌}factor{❌},{❌}"+"{❌},{❌}S{❌},{❌}sep{❌}?{❌}.{❌} +{❌}option{❌}:{❌}factor{❌},{❌}"?"{❌},{❌}S{❌}.{❌} +{❌}sep{❌}:{❌}factor{❌}.{❌} +{❌}nonterminal{❌}:{❌}({❌}mark{❌},{❌}S{❌}){❌}?{❌},{❌}name{❌},{❌}S{❌}.{❌} +{❌}-{❌}terminal{❌}:{❌}literal{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}{❌}charset{❌}.{❌} +{❌}literal{❌}:{❌}quoted{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}encoded{❌}.{❌} +{❌}-{❌}quoted{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}-{❌}string{❌}.{❌} +{❌}@{❌}name{❌}:{❌}namestart{❌},{❌}namefollower{❌}*{❌}.{❌} +{❌}-{❌}namestart{❌}:{❌}[{❌}"_"{❌};{❌}Ll{❌};{❌}Lu{❌};{❌}Lm{❌};{❌}Lt{❌};{❌}Lo{❌}]{❌}.{❌} +{❌}-{❌}namefollower{❌}:{❌}namestart{❌};{❌}[{❌}"-.·‿⁀"{❌};{❌}Nd{❌};{❌}Mn{❌}]{❌}.{❌} +{❌}@{❌}tmark{❌}:{❌}[{❌}"^-"{❌}]{❌}.{❌} +{❌}string{❌}:{❌}-{❌}'"'{❌},{❌}dstring{❌},{❌}-{❌}'"'{❌},{❌}S{❌};{❌} +{❌}-{❌}"'"{❌},{❌}sstring{❌},{❌}-{❌}"'"{❌},{❌}S{❌}.{❌} +{❌}@{❌}dstring{❌}:{❌}dchar{❌}+{❌}.{❌} +{❌}@{❌}sstring{❌}:{❌}schar{❌}+{❌}.{❌} +{❌}dchar{❌}:{❌}~{❌}[{❌}'"'{❌}]{❌};{❌} +{❌}{❌}{❌}{❌}{❌}'"'{❌},{❌}-{❌}'"'{❌}.{❌}{{❌}all{❌}characters{❌},{❌}quotes{❌}must{❌}be{❌}doubled{❌}} +{❌}schar{❌}:{❌}~{❌}[{❌}"'"{❌}]{❌};{❌} +{❌}{❌}{❌}{❌}{❌}"'"{❌},{❌}-{❌}"'"{❌}.{❌}{{❌}all{❌}characters{❌},{❌}quotes{❌}must{❌}be{❌}doubled{❌}} +{❌}-{❌}encoded{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}-{❌}"#"{❌},{❌}@{❌}hex{❌},{❌}S{❌}.{❌} +{❌}hex{❌}:{❌}[{❌}"0"{❌}-{❌}"9"{❌};{❌}"a"{❌}-{❌}"f"{❌};{❌}"A"{❌}-{❌}"F"{❌}]{❌}+{❌}.{❌} +{❌}-{❌}charset{❌}:{❌}inclusion{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}{❌}exclusion{❌}.{❌} +{❌}inclusion{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}set{❌}.{❌} +{❌}exclusion{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}"~"{❌},{❌}S{❌},{❌}set{❌}.{❌} +{❌}-{❌}set{❌}:{❌}"["{❌},{❌}S{❌},{❌}member{❌}*{❌}({❌}[{❌}";|"{❌}]{❌},{❌}S{❌}){❌},{❌}"]"{❌},{❌}S{❌}.{❌} +{❌}-{❌}member{❌}:{❌}literal{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}range{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}class{❌}.{❌} +{❌}range{❌}:{❌}from{❌},{❌}"-"{❌},{❌}S{❌},{❌}to{❌}.{❌} +{❌}@{❌}from{❌}:{❌}character{❌}.{❌} +{❌}@{❌}to{❌}:{❌}character{❌}.{❌} +{❌}-{❌}character{❌}:{❌}-{❌}'"'{❌},{❌}dchar{❌},{❌}-{❌}'"'{❌},{❌}S{❌};{❌} +{❌}-{❌}"'"{❌},{❌}schar{❌},{❌}-{❌}"'"{❌},{❌}S{❌};{❌} +{❌}"#"{❌},{❌}hex{❌},{❌}S{❌}.{❌} +{❌}class{❌}:{❌}@{❌}code{❌},{❌}S{❌}.{❌} +{❌}code{❌}:{❌}letter{❌},{❌}letter{❌}.{❌} +{❌}-{❌}letter{❌}:{❌}[{❌}"a"{❌}-{❌}"z"{❌};{❌}"A"{❌}-{❌}"Z"{❌}]{❌}.{❌} +# +{❌}ixml{❌}:{❌}S{❌},{❌}rule{❌}+{❌}S{❌},{❌}S{❌}.{❌} +{❌}-{❌}S{❌}:{❌}({❌}whitespace{❌};{❌}comment{❌}){❌}*{❌}.{❌} +{❌}-{❌}whitespace{❌}:{❌}-{❌}[{❌}Zs{❌}]{❌};{❌}tab{❌};{❌}lf{❌};{❌}cr{❌}.{❌} +{❌}-{❌}tab{❌}:{❌}-{❌}#9{❌}.{❌} +{❌}-{❌}lf{❌}:{❌}-{❌}#a{❌}.{❌} +{❌}-{❌}cr{❌}:{❌}-{❌}#d{❌}.{❌} +{❌}comment{❌}:{❌}-{❌}"{"{❌},{❌}({❌}cchar{❌};{❌}comment{❌}){❌}*{❌},{❌}-{❌}"}"{❌}.{❌} +{❌}-{❌}cchar{❌}:{❌}~{❌}[{❌}"{}"{❌}]{❌}.{❌} +{❌}rule{❌}:{❌}({❌}mark{❌},{❌}S{❌}){❌}?{❌},{❌}name{❌},{❌}S{❌},{❌}[{❌}"=:"{❌}]{❌},{❌}S{❌},{❌}-{❌}alts{❌},{❌}"."{❌}.{❌} +{❌}@{❌}mark{❌}:{❌}[{❌}"@^-"{❌}]{❌}.{❌} +{❌}alts{❌}:{❌}alt{❌}+{❌}({❌}[{❌}";|"{❌}]{❌},{❌}S{❌}){❌}.{❌} +{❌}alt{❌}:{❌}term{❌}*{❌}({❌}","{❌},{❌}S{❌}){❌}.{❌} +{❌}-{❌}term{❌}:{❌}factor{❌};{❌} +{❌}{❌}{❌}{❌}{❌}option{❌};{❌} +{❌}{❌}{❌}{❌}{❌}repeat0{❌};{❌} +{❌}{❌}{❌}{❌}{❌}repeat1{❌}.{❌} +{❌}-{❌}factor{❌}:{❌}terminal{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}nonterminal{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}"("{❌},{❌}S{❌},{❌}alts{❌},{❌}")"{❌},{❌}S{❌}.{❌} +{❌}repeat0{❌}:{❌}factor{❌},{❌}"*"{❌},{❌}S{❌},{❌}sep{❌}?{❌}.{❌} +{❌}repeat1{❌}:{❌}factor{❌},{❌}"+"{❌},{❌}S{❌},{❌}sep{❌}?{❌}.{❌} +{❌}option{❌}:{❌}factor{❌},{❌}"?"{❌},{❌}S{❌}.{❌} +{❌}sep{❌}:{❌}factor{❌}.{❌} +{❌}nonterminal{❌}:{❌}({❌}mark{❌},{❌}S{❌}){❌}?{❌},{❌}name{❌},{❌}S{❌}.{❌} +{❌}-{❌}terminal{❌}:{❌}literal{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}{❌}charset{❌}.{❌} +{❌}literal{❌}:{❌}quoted{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}encoded{❌}.{❌} +{❌}-{❌}quoted{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}-{❌}string{❌}.{❌} +{❌}@{❌}name{❌}:{❌}namestart{❌},{❌}namefollower{❌}*{❌}.{❌} +{❌}-{❌}namestart{❌}:{❌}[{❌}"_"{❌};{❌}Ll{❌};{❌}Lu{❌};{❌}Lm{❌};{❌}Lt{❌};{❌}Lo{❌}]{❌}.{❌} +{❌}-{❌}namefollower{❌}:{❌}namestart{❌};{❌}[{❌}"-.·‿⁀"{❌};{❌}Nd{❌};{❌}Mn{❌}]{❌}.{❌} +{❌}@{❌}tmark{❌}:{❌}[{❌}"^-"{❌}]{❌}.{❌} +{❌}string{❌}:{❌}-{❌}'"'{❌},{❌}dstring{❌},{❌}-{❌}'"'{❌},{❌}S{❌};{❌} +{❌}-{❌}"'"{❌},{❌}sstring{❌},{❌}-{❌}"'"{❌},{❌}S{❌}.{❌} +{❌}@{❌}dstring{❌}:{❌}dchar{❌}+{❌}.{❌} +{❌}@{❌}sstring{❌}:{❌}schar{❌}+{❌}.{❌} +{❌}dchar{❌}:{❌}~{❌}[{❌}'"'{❌}]{❌};{❌} +{❌}{❌}{❌}{❌}{❌}'"'{❌},{❌}-{❌}'"'{❌}.{❌}{{❌}all{❌}characters{❌},{❌}quotes{❌}must{❌}be{❌}doubled{❌}} +{❌}schar{❌}:{❌}~{❌}[{❌}"'"{❌}]{❌};{❌} +{❌}{❌}{❌}{❌}{❌}"'"{❌},{❌}-{❌}"'"{❌}.{❌}{{❌}all{❌}characters{❌},{❌}quotes{❌}must{❌}be{❌}doubled{❌}} +{❌}-{❌}encoded{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}-{❌}"#"{❌},{❌}@{❌}hex{❌},{❌}S{❌}.{❌} +{❌}hex{❌}:{❌}[{❌}"0"{❌}-{❌}"9"{❌};{❌}"a"{❌}-{❌}"f"{❌};{❌}"A"{❌}-{❌}"F"{❌}]{❌}+{❌}.{❌} +{❌}-{❌}charset{❌}:{❌}inclusion{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}{❌}exclusion{❌}.{❌} +{❌}inclusion{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}set{❌}.{❌} +{❌}exclusion{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}"~"{❌},{❌}S{❌},{❌}set{❌}.{❌} +{❌}-{❌}set{❌}:{❌}"["{❌},{❌}S{❌},{❌}member{❌}*{❌}({❌}[{❌}";|"{❌}]{❌},{❌}S{❌}){❌},{❌}"]"{❌},{❌}S{❌}.{❌} +{❌}-{❌}member{❌}:{❌}literal{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}range{❌};{❌} +{❌}{❌}{❌}{❌}{❌}{❌}class{❌}.{❌} +{❌}range{❌}:{❌}from{❌},{❌}"-"{❌},{❌}S{❌},{❌}to{❌}.{❌} +{❌}@{❌}from{❌}:{❌}character{❌}.{❌} +{❌}@{❌}to{❌}:{❌}character{❌}.{❌} +{❌}-{❌}character{❌}:{❌}-{❌}'"'{❌},{❌}dchar{❌},{❌}-{❌}'"'{❌},{❌}S{❌};{❌} +{❌}-{❌}"'"{❌},{❌}schar{❌},{❌}-{❌}"'"{❌},{❌}S{❌};{❌} +{❌}"#"{❌},{❌}hex{❌},{❌}S{❌}.{❌} +{❌}class{❌}:{❌}@{❌}code{❌},{❌}S{❌}.{❌} +{❌}code{❌}:{❌}letter{❌},{❌}letter{❌}.{❌} +{❌}-{❌}letter{❌}:{❌}[{❌}"a"{❌}-{❌}"z"{❌};{❌}"A"{❌}-{❌}"Z"{❌}]{❌}.{❌} +# + + + + + : + + + + + , + + + + + + + + + + + + + , + + + + + . + + + + + : + + + ( + + + + + + + ; + + + + + + + ) + * + + + . + + + + + : + + + + [ + + + + ] + + + ; + + + + + + ; + + + + + + ; + + + + + + . + + + + + : + + + + + + + . + + + + + : + + + + + + + . + + + + + : + + + + + + + . + + + + : + + + + + + , + + ( + + + + + + + ; + + + + + + + ) + * + + , + + + + + + . + + + + + : + + + ~ + [ + + + + ] + + + . + + + + : + + + , + + + + , + + + + , + + [ + + + + ] + + , + + + + , + + + + + , + + + + + . + + + + + : + + + [ + + + + ] + + + . + + + + : + + + + + + + + + ( + + + + [ + + + + ] + + , + + + + + + ) + + + + . + + + + : + + + + + + * + + ( + + + + + + , + + + + + + ) + + + + . + + + + + : + + + + + + ; + + + + + + + + + + + ; + + + + + + + + + + + ; + + + + + + + + + + + . + + + + + : + + + + + + ; + + + + + + + + + + + + ; + + + + + + + + + + + , + + + + , + + + + , + + + + , + + + + + . + + + + : + + + + + , + + + + , + + + + , + + + . + + + + : + + + + + , + + + + , + + + + , + + + . + + + + : + + + + + , + + + + , + + + + + . + + + + : + + + + + + . + + + + : + + + , + + + + , + + + + + . + + + + + : + + + + + + ; + + + + + + + + + + + + + . + + + + : + + + + + + ; + + + + + + + + + + + + . + + + + + : + + + , + + + + + + . + + + + + : + + + + + , + + + + + * + + + . + + + + + : + + + [ + + + + ; + + + + ; + + + + ; + + + + ; + + + + ; + + + + ] + + + . + + + + + : + + + + + + ; + + + [ + + + + ; + + + + ; + + + + ] + + + . + + + + + : + + + [ + + + + ] + + + . + + + + : + + + + + + , + + + + , + + + + + , + + + + + ; + + + + + + + , + + + + , + + + + + , + + + + + . + + + + + : + + + + + + + + + + . + + + + + : + + + + + + + + + + . + + + + : + + + ~ + [ + + + + ] + + + ; + + + + + + + + + + , + + + + + + . + + + all + characters + , + quotes + must + be + doubled + + + + + : + + + ~ + [ + + + + ] + + + ; + + + + + + + + + + , + + + + + + . + + + all + characters + , + quotes + must + be + doubled + + + + + + : + + + , + + + + + , + + + + + , + + + + + . + + + + : + + + + [ + + - + + ; + + - + + ; + + - + + ] + + + + + + . + + + + + : + + + + + + ; + + + + + + + + + + + + + . + + + + : + + + , + + + + + . + + + + : + + + , + + + + , + + + + , + + + + + . + + + + + : + + + + + , + + + + , + + + + + * + + ( + + + + [ + + + + ] + + , + + + + + + ) + + + , + + + + , + + + + + . + + + + + : + + + + + + ; + + + + + + + + + + + + ; + + + + + + + + + + + + . + + + + : + + + + + , + + + + , + + + + , + + + + + . + + + + + : + + + + + + . + + + + + : + + + + + + . + + + + + : + + + + + + , + + + + , + + + + + , + + + + + ; + + + + + + + , + + + + , + + + + + , + + + + + ; + + + + + + , + + + + , + + + + + . + + + + : + + + + + + , + + + + + . + + + + : + + + + + , + + + + + . + + + + + : + + + [ + + - + + ; + + - + + ] + + + . + + diff --git a/tests/tests/ixml/ixml-no-spaces.inp b/tests/tests/ixml/ixml-no-spaces.inp new file mode 100644 index 00000000..9d94beee --- /dev/null +++ b/tests/tests/ixml/ixml-no-spaces.inp @@ -0,0 +1,60 @@ +ixml:S,rule+S,S. +-S:(whitespace;comment)*. +-whitespace:-[Zs];tab;{lf;}cr. +-tab:-#9. +{-lf:-#a.} +-cr:-#d. +comment:-"{",(cchar;comment)*,-"}". +-cchar:~["{}"]. +rule:(mark,S)?,name,S,["=:"],S,-alts,".". +@mark:["@^-"]. +alts:alt+([";|"],S). +alt:term*(",",S). +-term:factor; +option; +repeat0; +repeat1. +-factor:terminal; +nonterminal; +"(",S,alts,")",S. +repeat0:factor,"*",S,sep?. +repeat1:factor,"+",S,sep?. +option:factor,"?",S. +sep:factor. +nonterminal:(mark,S)?,name,S. +-terminal:literal; +charset. +literal:quoted; +encoded. +-quoted:(tmark,S)?,-string. +@name:namestart,namefollower*. +-namestart:["_";Ll;Lu;Lm;Lt;Lo]. +-namefollower:namestart;["-.·‿⁀";Nd;Mn]. +@tmark:["^-"]. +string:-'"',dstring,-'"',S; +-"'",sstring,-"'",S. +@dstring:dchar+. +@sstring:schar+. +dchar:~['"']; +'"',-'"'.{allcharacters,quotesmustbedoubled} +schar:~["'"]; +"'",-"'".{allcharacters,quotesmustbedoubled} +-encoded:(tmark,S)?,-"#",@hex,S. +hex:["0"-"9";"a"-"f";"A"-"F"]+. +-charset:inclusion; +exclusion. +inclusion:(tmark,S)?,set. +exclusion:(tmark,S)?,"~",S,set. +-set:"[",S,member*([";|"],S),"]",S. +-member:literal; +range; +class. +range:from,"-",S,to. +@from:character. +@to:character. +-character:-'"',dchar,-'"',S; +-"'",schar,-"'",S; +"#",hex,S. +class:@code,S. +code:letter,letter. +-letter:["a"-"z";"A"-"Z"]. diff --git a/tests/tests/ixml/ixml-no-spaces.ixml b/tests/tests/ixml/ixml-no-spaces.ixml new file mode 100644 index 00000000..a8722e00 --- /dev/null +++ b/tests/tests/ixml/ixml-no-spaces.ixml @@ -0,0 +1,60 @@ +ixml:S,rule+S,S. +-S:(whitespace;comment)*. +-whitespace:-[Zs];tab;lf;cr. +-tab:-#9. +-lf:-#a. +-cr:-#d. +comment:-"{",(cchar;comment)*,-"}". +-cchar:~["{}"]. +rule:(mark,S)?,name,S,["=:"],S,-alts,".". +@mark:["@^-"]. +alts:alt+([";|"],S). +alt:term*(",",S). +-term:factor; +option; +repeat0; +repeat1. +-factor:terminal; +nonterminal; +"(",S,alts,")",S. +repeat0:factor,"*",S,sep?. +repeat1:factor,"+",S,sep?. +option:factor,"?",S. +sep:factor. +nonterminal:(mark,S)?,name,S. +-terminal:literal; +charset. +literal:quoted; +encoded. +-quoted:(tmark,S)?,-string. +@name:namestart,namefollower*. +-namestart:["_";Ll;Lu;Lm;Lt;Lo]. +-namefollower:namestart;["-.·‿⁀";Nd;Mn]. +@tmark:["^-"]. +string:-'"',dstring,-'"',S; +-"'",sstring,-"'",S. +@dstring:dchar+. +@sstring:schar+. +dchar:~['"']; +'"',-'"'.{allcharacters,quotesmustbedoubled} +schar:~["'"]; +"'",-"'".{allcharacters,quotesmustbedoubled} +-encoded:(tmark,S)?,-"#",@hex,S. +hex:["0"-"9";"a"-"f";"A"-"F"]+. +-charset:inclusion; +exclusion. +inclusion:(tmark,S)?,set. +exclusion:(tmark,S)?,"~",S,set. +-set:"[",S,member*([";|"],S),"]",S. +-member:literal; +range; +class. +range:from,"-",S,to. +@from:character. +@to:character. +-character:-'"',dchar,-'"',S; +-"'",schar,-"'",S; +"#",hex,S. +class:@code,S. +code:letter,letter. +-letter:["a"-"z";"A"-"Z"]. diff --git a/tests/tests/ixml/ixml-no-spaces.req b/tests/tests/ixml/ixml-no-spaces.req new file mode 100644 index 00000000..611a3542 --- /dev/null +++ b/tests/tests/ixml/ixml-no-spaces.req @@ -0,0 +1,530 @@ +ixml:S,rule+S,S. +-S:(whitespace;comment)*. +-whitespace:-[Zs];tab;lf;cr. +-tab:-#9. +-lf:-#a. +-cr:-#d. +comment:-"{",(cchar;comment)*,-"}". +-cchar:~["{}"]. +rule:(mark,S)?,name,S,["=:"],S,-alts,".". +@mark:["@^-"]. +alts:alt+([";|"],S). +alt:term*(",",S). +-term:factor; +option; +repeat0; +repeat1. +-factor:terminal; +nonterminal; +"(",S,alts,")",S. +repeat0:factor,"*",S,sep?. +repeat1:factor,"+",S,sep?. +option:factor,"?",S. +sep:factor. +nonterminal:(mark,S)?,name,S. +-terminal:literal; +charset. +literal:quoted; +encoded. +-quoted:(tmark,S)?,-string. +@name:namestart,namefollower*. +-namestart:["_";Ll;Lu;Lm;Lt;Lo]. +-namefollower:namestart;["-.·‿⁀";Nd;Mn]. +@tmark:["^-"]. +string:-'"',dstring,-'"',S; +-"'",sstring,-"'",S. +@dstring:dchar+. +@sstring:schar+. +dchar:~['"']; +'"',-'"'.{allcharacters,quotesmustbedoubled} +schar:~["'"]; +"'",-"'".{allcharacters,quotesmustbedoubled} +-encoded:(tmark,S)?,-"#",@hex,S. +hex:["0"-"9";"a"-"f";"A"-"F"]+. +-charset:inclusion; +exclusion. +inclusion:(tmark,S)?,set. +exclusion:(tmark,S)?,"~",S,set. +-set:"[",S,member*([";|"],S),"]",S. +-member:literal; +range; +class. +range:from,"-",S,to. +@from:character. +@to:character. +-character:-'"',dchar,-'"',S; +-"'",schar,-"'",S; +"#",hex,S. +class:@code,S. +code:letter,letter. +-letter:["a"-"z";"A"-"Z"]. +# +ixml:S,rule+S,S. +-S:(whitespace;comment)*. +-whitespace:-[Zs];tab;{lf;}cr. +-tab:-#9. +{-lf:-#a.} +-cr:-#d. +comment:-"{",(cchar;comment)*,-"}". +-cchar:~["{}"]. +rule:(mark,S)?,name,S,["=:"],S,-alts,".". +@mark:["@^-"]. +alts:alt+([";|"],S). +alt:term*(",",S). +-term:factor; +option; +repeat0; +repeat1. +-factor:terminal; +nonterminal; +"(",S,alts,")",S. +repeat0:factor,"*",S,sep?. +repeat1:factor,"+",S,sep?. +option:factor,"?",S. +sep:factor. +nonterminal:(mark,S)?,name,S. +-terminal:literal; +charset. +literal:quoted; +encoded. +-quoted:(tmark,S)?,-string. +@name:namestart,namefollower*. +-namestart:["_";Ll;Lu;Lm;Lt;Lo]. +-namefollower:namestart;["-.·‿⁀";Nd;Mn]. +@tmark:["^-"]. +string:-'"',dstring,-'"',S; +-"'",sstring,-"'",S. +@dstring:dchar+. +@sstring:schar+. +dchar:~['"']; +'"',-'"'.{allcharacters,quotesmustbedoubled} +schar:~["'"]; +"'",-"'".{allcharacters,quotesmustbedoubled} +-encoded:(tmark,S)?,-"#",@hex,S. +hex:["0"-"9";"a"-"f";"A"-"F"]+. +-charset:inclusion; +exclusion. +inclusion:(tmark,S)?,set. +exclusion:(tmark,S)?,"~",S,set. +-set:"[",S,member*([";|"],S),"]",S. +-member:literal; +range; +class. +range:from,"-",S,to. +@from:character. +@to:character. +-character:-'"',dchar,-'"',S; +-"'",schar,-"'",S; +"#",hex,S. +class:@code,S. +code:letter,letter. +-letter:["a"-"z";"A"-"Z"]. +# + + + : + + , + + + + + + + , + + . + : + + ( + + + + ; + + + + )* + . + : + + [ + ] + ; + + + ; + lf; + + + . + : + + + . + -lf:-#a. + : + + + . + : + + , + ( + + + + ; + + + + )*, + + . + : + + ~[ + ] + . + : + + , + , + , + [ + ], + , + , + + . + : + + [ + ] + . + : + + + + + ( + + + [ + ], + + + ) + + . + : + + + * + ( + + + , + + + ) + + . + : + + + ; + + + ; + + + ; + + + . + : + + + ; + + + ; + + , + , + , + , + + . + : + + , + , + , + + . + : + + , + , + , + + . + : + + , + , + + . + : + + + . + : + + , + , + + . + : + + + ; + + + . + : + + + ; + + + . + : + + , + + . + : + + , + + * + . + : + + [ + ; + ; + ; + ; + ; + ] + . + : + + + ; + + [ + ; + ; + ] + . + : + + [ + ] + . + : + + , + , + , + + ; + + , + , + , + + . + : + + + + + . + : + + + + + . + : + + ~[ + ] + ; + + , + + . + allcharacters,quotesmustbedoubled + : + + ~[ + ] + ; + + , + + . + allcharacters,quotesmustbedoubled + : + + , + , + , + + . + : + + + [ + -; + -; + -]+ + . + : + + + ; + + + . + : + + , + + . + : + + , + , + , + + . + : + + , + , + + * + ( + + + [ + ], + + + ) + , + , + + . + : + + + ; + + + ; + + + . + : + + , + , + , + + . + : + + + . + : + + + . + : + + , + , + , + + ; + + , + , + , + + ; + + , + , + + . + : + + , + + . + : + + , + + . + : + + [ + -; + -] + . + diff --git a/tests/tests/ixml/ixml-one-line.inp b/tests/tests/ixml/ixml-one-line.inp new file mode 100644 index 00000000..093fda44 --- /dev/null +++ b/tests/tests/ixml/ixml-one-line.inp @@ -0,0 +1 @@ +ixml:S,rule+S,S.-S:(whitespace;comment)*.-whitespace:-[Zs];tab;lf;cr.-tab:-#9.-lf:-#a.-cr:-#d.comment:-"{",(cchar;comment)*,-"}".-cchar:~["{}"].rule:(mark,S)?,name,S,["=:"],S,-alts,".".@mark:["@^-"].alts:alt+([";|"],S).alt:term*(",",S).-term:factor;option;repeat0;repeat1.-factor:terminal;nonterminal;"(",S,alts,")",S.repeat0:factor,"*",S,sep?.repeat1:factor,"+",S,sep?.option:factor,"?",S.sep:factor.nonterminal:(mark,S)?,name,S.-terminal:literal;charset.literal:quoted;encoded.-quoted:(tmark,S)?,-string.@name:namestart,namefollower*.-namestart:["_";Ll;Lu;Lm;Lt;Lo].-namefollower:namestart;["-.·‿⁀";Nd;Mn].@tmark:["^-"].string:-'"',dstring,-'"',S;-"'",sstring,-"'",S.@dstring:dchar+.@sstring:schar+.dchar:~['"'];'"',-'"'.{allcharacters,quotesmustbedoubled}schar:~["'"];"'",-"'".{allcharacters,quotesmustbedoubled}-encoded:(tmark,S)?,-"#",@hex,S.hex:["0"-"9";"a"-"f";"A"-"F"]+.-charset:inclusion;exclusion.inclusion:(tmark,S)?,set.exclusion:(tmark,S)?,"~",S,set.-set:"[",S,member*([";|"],S),"]",S.-member:literal;range;class.range:from,"-",S,to.@from:character.@to:character.-character:-'"',dchar,-'"',S;-"'",schar,-"'",S;"#",hex,S.class:@code,S.code:letter,letter.-letter:["a"-"z";"A"-"Z"]. \ No newline at end of file diff --git a/tests/tests/ixml/ixml-one-line.ixml b/tests/tests/ixml/ixml-one-line.ixml new file mode 100644 index 00000000..093fda44 --- /dev/null +++ b/tests/tests/ixml/ixml-one-line.ixml @@ -0,0 +1 @@ +ixml:S,rule+S,S.-S:(whitespace;comment)*.-whitespace:-[Zs];tab;lf;cr.-tab:-#9.-lf:-#a.-cr:-#d.comment:-"{",(cchar;comment)*,-"}".-cchar:~["{}"].rule:(mark,S)?,name,S,["=:"],S,-alts,".".@mark:["@^-"].alts:alt+([";|"],S).alt:term*(",",S).-term:factor;option;repeat0;repeat1.-factor:terminal;nonterminal;"(",S,alts,")",S.repeat0:factor,"*",S,sep?.repeat1:factor,"+",S,sep?.option:factor,"?",S.sep:factor.nonterminal:(mark,S)?,name,S.-terminal:literal;charset.literal:quoted;encoded.-quoted:(tmark,S)?,-string.@name:namestart,namefollower*.-namestart:["_";Ll;Lu;Lm;Lt;Lo].-namefollower:namestart;["-.·‿⁀";Nd;Mn].@tmark:["^-"].string:-'"',dstring,-'"',S;-"'",sstring,-"'",S.@dstring:dchar+.@sstring:schar+.dchar:~['"'];'"',-'"'.{allcharacters,quotesmustbedoubled}schar:~["'"];"'",-"'".{allcharacters,quotesmustbedoubled}-encoded:(tmark,S)?,-"#",@hex,S.hex:["0"-"9";"a"-"f";"A"-"F"]+.-charset:inclusion;exclusion.inclusion:(tmark,S)?,set.exclusion:(tmark,S)?,"~",S,set.-set:"[",S,member*([";|"],S),"]",S.-member:literal;range;class.range:from,"-",S,to.@from:character.@to:character.-character:-'"',dchar,-'"',S;-"'",schar,-"'",S;"#",hex,S.class:@code,S.code:letter,letter.-letter:["a"-"z";"A"-"Z"]. \ No newline at end of file diff --git a/tests/tests/ixml/ixml-one-line.req b/tests/tests/ixml/ixml-one-line.req new file mode 100644 index 00000000..dfe5b72a --- /dev/null +++ b/tests/tests/ixml/ixml-one-line.req @@ -0,0 +1,499 @@ +ixml:S,rule+S,S.-S:(whitespace;comment)*.-whitespace:-[Zs];tab;lf;cr.-tab:-#9.-lf:-#a.-cr:-#d.comment:-"{",(cchar;comment)*,-"}".-cchar:~["{}"].rule:(mark,S)?,name,S,["=:"],S,-alts,".".@mark:["@^-"].alts:alt+([";|"],S).alt:term*(",",S).-term:factor;option;repeat0;repeat1.-factor:terminal;nonterminal;"(",S,alts,")",S.repeat0:factor,"*",S,sep?.repeat1:factor,"+",S,sep?.option:factor,"?",S.sep:factor.nonterminal:(mark,S)?,name,S.-terminal:literal;charset.literal:quoted;encoded.-quoted:(tmark,S)?,-string.@name:namestart,namefollower*.-namestart:["_";Ll;Lu;Lm;Lt;Lo].-namefollower:namestart;["-.·‿⁀";Nd;Mn].@tmark:["^-"].string:-'"',dstring,-'"',S;-"'",sstring,-"'",S.@dstring:dchar+.@sstring:schar+.dchar:~['"'];'"',-'"'.{allcharacters,quotesmustbedoubled}schar:~["'"];"'",-"'".{allcharacters,quotesmustbedoubled}-encoded:(tmark,S)?,-"#",@hex,S.hex:["0"-"9";"a"-"f";"A"-"F"]+.-charset:inclusion;exclusion.inclusion:(tmark,S)?,set.exclusion:(tmark,S)?,"~",S,set.-set:"[",S,member*([";|"],S),"]",S.-member:literal;range;class.range:from,"-",S,to.@from:character.@to:character.-character:-'"',dchar,-'"',S;-"'",schar,-"'",S;"#",hex,S.class:@code,S.code:letter,letter.-letter:["a"-"z";"A"-"Z"]. +# +ixml:S,rule+S,S.-S:(whitespace;comment)*.-whitespace:-[Zs];tab;lf;cr.-tab:-#9.-lf:-#a.-cr:-#d.comment:-"{",(cchar;comment)*,-"}".-cchar:~["{}"].rule:(mark,S)?,name,S,["=:"],S,-alts,".".@mark:["@^-"].alts:alt+([";|"],S).alt:term*(",",S).-term:factor;option;repeat0;repeat1.-factor:terminal;nonterminal;"(",S,alts,")",S.repeat0:factor,"*",S,sep?.repeat1:factor,"+",S,sep?.option:factor,"?",S.sep:factor.nonterminal:(mark,S)?,name,S.-terminal:literal;charset.literal:quoted;encoded.-quoted:(tmark,S)?,-string.@name:namestart,namefollower*.-namestart:["_";Ll;Lu;Lm;Lt;Lo].-namefollower:namestart;["-.·‿⁀";Nd;Mn].@tmark:["^-"].string:-'"',dstring,-'"',S;-"'",sstring,-"'",S.@dstring:dchar+.@sstring:schar+.dchar:~['"'];'"',-'"'.{allcharacters,quotesmustbedoubled}schar:~["'"];"'",-"'".{allcharacters,quotesmustbedoubled}-encoded:(tmark,S)?,-"#",@hex,S.hex:["0"-"9";"a"-"f";"A"-"F"]+.-charset:inclusion;exclusion.inclusion:(tmark,S)?,set.exclusion:(tmark,S)?,"~",S,set.-set:"[",S,member*([";|"],S),"]",S.-member:literal;range;class.range:from,"-",S,to.@from:character.@to:character.-character:-'"',dchar,-'"',S;-"'",schar,-"'",S;"#",hex,S.class:@code,S.code:letter,letter.-letter:["a"-"z";"A"-"Z"]. +# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + all characters except line breaks; quotes must be doubled + + + + + + + + + + + + + + all characters except line breaks; quotes must be doubled + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tests/ixml/ixml-one-line.res b/tests/tests/ixml/ixml-one-line.res new file mode 100644 index 00000000..b822f3ed --- /dev/null +++ b/tests/tests/ixml/ixml-one-line.res @@ -0,0 +1,15 @@ +ixml:S,rule+S,S.-S:(whitespace;comment)*.-whitespace:-[Zs];tab;lf;cr.-tab:-#9.-lf:-#a.-cr:-#d.comment:-"{",(cchar;comment)*,-"}".-cchar:~["{}"].rule:(mark,S)?,name,S,["=:"],S,-alts,".".@mark:["@^-"].alts:alt+([";|"],S).alt:term*(",",S).-term:factor;option;repeat0;repeat1.-factor:terminal;nonterminal;"(",S,alts,")",S.repeat0:factor,"*",S,sep?.repeat1:factor,"+",S,sep?.option:factor,"?",S.sep:factor.nonterminal:(mark,S)?,name,S.-terminal:literal;charset.literal:quoted;encoded.-quoted:(tmark,S)?,-string.@name:namestart,namefollower*.-namestart:["_";Ll;Lu;Lm;Lt;Lo].-namefollower:namestart;["-.·‿⁀";Nd;Mn].@tmark:["^-"].string:-'"',dstring,-'"',S;-"'",sstring,-"'",S.@dstring:dchar+.@sstring:schar+.dchar:~['"'];'"',-'"'.{allcharacters,quotesmustbedoubled}schar:~["'"];"'",-"'".{allcharacters,quotesmustbedoubled}-encoded:(tmark,S)?,-"#",@hex,S.hex:["0"-"9";"a"-"f";"A"-"F"]+.-charset:inclusion;exclusion.inclusion:(tmark,S)?,set.exclusion:(tmark,S)?,"~",S,set.-set:"[",S,member*([";|"],S),"]",S.-member:literal;range;class.range:from,"-",S,to.@from:character.@to:character.-character:-'"',dchar,-'"',S;-"'",schar,-"'",S;"#",hex,S.class:@code,S.code:letter,letter.-letter:["a"-"z";"A"-"Z"].# +ixml:S,rule+S,S.-S:(whitespace;comment)*.-whitespace:-[Zs];tab;lf;cr.-tab:-#9.-lf:-#a.-cr:-#d.comment:-"{",(cchar;comment)*,-"}".-cchar:~["{}"].rule:(mark,S)?,name,S,["=:"],S,-alts,".".@mark:["@^-"].alts:alt+([";|"],S).alt:term*(",",S).-term:factor;option;repeat0;repeat1.-factor:terminal;nonterminal;"(",S,alts,")",S.repeat0:factor,"*",S,sep?.repeat1:factor,"+",S,sep?.option:factor,"?",S.sep:factor.nonterminal:(mark,S)?,name,S.-terminal:literal;charset.literal:quoted;encoded.-quoted:(tmark,S)?,-string.@name:namestart,namefollower*.-namestart:["_";Ll;Lu;Lm;Lt;Lo].-namefollower:namestart;["-.·‿⁀";Nd;Mn].@tmark:["^-"].string:-'"',dstring,-'"',S;-"'",sstring,-"'",S.@dstring:dchar+.@sstring:schar+.dchar:~['"'];'"',-'"'.{allcharacters,quotesmustbedoubled}schar:~["'"];"'",-"'".{allcharacters,quotesmustbedoubled}-encoded:(tmark,S)?,-"#",@hex,S.hex:["0"-"9";"a"-"f";"A"-"F"]+.-charset:inclusion;exclusion.inclusion:(tmark,S)?,set.exclusion:(tmark,S)?,"~",S,set.-set:"[",S,member*([";|"],S),"]",S.-member:literal;range;class.range:from,"-",S,to.@from:character.@to:character.-character:-'"',dchar,-'"',S;-"'",schar,-"'",S;"#",hex,S.class:@code,S.code:letter,letter.-letter:["a"-"z";"A"-"Z"].# + + + 1 + 561 + ixml:S,rule+S,S.-S:(whitespace;comment)*.-whitespace:-[Zs];tab;lf;cr.-tab:-#9.-lf:-#a.-cr:-#d.comment:-"{",(cchar;comment)*,-"}".-cchar:~["{}"].rule:(mark,S)?,name,S,["=:"],S,-alts,".".@mark:["@^-"].alts:alt+([";|"],S).alt:term*(",",S).-term:factor;option;repeat0;repeat1.-factor:terminal;nonterminal;"(",S,alts,")",S.repeat0:factor,"*",S,sep?.repeat1:factor,"+",S,sep?.option:factor,"?",S.sep:factor.nonterminal:(mark,S)?,name,S.-terminal:literal;charset.literal:quoted;encoded.-quoted:(tmark,S)?,-string.@name:namestart,namefollower*.-namestart:["_";Ll;Lu;Lm;Lt;Lo].-namefollower:namestart;["-.·‿⁀";Nd;Mn].@tmark:["^-"].string:-'"',dstring,-'"',S;-"'",sstring,-"'",S.@dstring:dchar+.@sstring:schar+.dchar:~['"'];'"',-'"'.{allcharacters,quotesmustbedoubled}schar:~["'"];"'",-"'".{allcharacters,quotesmustbedoubled}-encoded:(tmark,S)?,-"#",@hex,S.hex:["0"-"9";"a"-"f";"A"-"F"]+.-charset:inclusion;exclusion.inclusion:(tmark,S)?,set.exclusion:(tmark,S)?,"~",S,set.-set:"[",S,member*([";|"],S),"]",S.-member:literal;range;class.range:from,"-",S,to.@from:character.@to:character.-character:-'"',dchar,-'"',S;-"'",schar,-"'",S;"#",hex,S.class:@code,S.code:letter,letter.-letter:["a"-"z";"A"-"Z"]. + "]"; "{"; #9; #a; #d; [";|"]; [Zs] + diff --git a/tests/tests/ixml/ixml-spaces.inp b/tests/tests/ixml/ixml-spaces.inp new file mode 100644 index 00000000..7c0ead13 --- /dev/null +++ b/tests/tests/ixml/ixml-spaces.inp @@ -0,0 +1,60 @@ + ixml : S , rule + S , S . + - S : ( whitespace ; comment ) * . + - whitespace : - [ Zs ] ; tab ; { lf ; } cr . + - tab : - #9 . +{ - lf : - #a . } + - cr : - #d . + comment : - "{" , ( cchar ; comment ) * , - "}" . + - cchar : ~ [ "{}" ] . + rule : ( mark , S ) ? , name , S , [ "=:" ] , S , - alts , "." . + @ mark : [ "@^-" ] . + alts : alt + ( [ ";|" ] , S ) . + alt : term * ( "," , S ) . + - term : factor ; + option ; + repeat0 ; + repeat1 . + - factor : terminal ; + nonterminal ; + "(" , S , alts , ")" , S . + repeat0 : factor , "*" , S , sep ? . + repeat1 : factor , "+" , S , sep ? . + option : factor , "?" , S . + sep : factor . + nonterminal : ( mark , S ) ? , name , S . + - terminal : literal ; + charset . + literal : quoted ; + encoded . + - quoted : ( tmark , S ) ? , - string . + @ name : namestart , namefollower * . + - namestart : [ "_" ; Ll ; Lu ; Lm ; Lt ; Lo ] . + - namefollower : namestart ; [ "-.·‿⁀" ; Nd ; Mn ] . + @ tmark : [ "^-" ] . + string : - '"' , dstring , - '"' , S ; + - "'" , sstring , - "'" , S . + @ dstring : dchar + . + @ sstring : schar + . + dchar : ~ [ '"' ] ; + '"' , - '"' . { all characters , quotes must be doubled } + schar : ~ [ "'" ] ; + "'" , - "'" . { all characters , quotes must be doubled } + - encoded : ( tmark , S ) ? , - "#" , @ hex , S . + hex : [ "0" - "9" ; "a" - "f" ; "A" - "F" ] + . + - charset : inclusion ; + exclusion . + inclusion : ( tmark , S ) ? , set . + exclusion : ( tmark , S ) ? , "~" , S , set . + - set : "[" , S , member * ( [ ";|" ] , S ) , "]" , S . + - member : literal ; + range ; + class . + range : from , "-" , S , to . + @ from : character . + @ to : character . + - character : - '"' , dchar , - '"' , S ; + - "'" , schar , - "'" , S ; + "#" , hex , S . + class : @ code , S . + code : letter , letter . + - letter : [ "a" - "z" ; "A" - "Z" ] . diff --git a/tests/tests/ixml/ixml-spaces.ixml b/tests/tests/ixml/ixml-spaces.ixml new file mode 100644 index 00000000..9ee14e37 --- /dev/null +++ b/tests/tests/ixml/ixml-spaces.ixml @@ -0,0 +1,60 @@ + ixml : S , rule + S , S . + - S : ( whitespace ; comment ) * . + - whitespace : - [ Zs ] ; tab ; lf ; cr . + - tab : - #9 . + - lf : - #a . + - cr : - #d . + comment : - "{" , ( cchar ; comment ) * , - "}" . + - cchar : ~ [ "{}" ] . + rule : ( mark , S ) ? , name , S , [ "=:" ] , S , - alts , "." . + @ mark : [ "@^-" ] . + alts : alt + ( [ ";|" ] , S ) . + alt : term * ( "," , S ) . + - term : factor ; + option ; + repeat0 ; + repeat1 . + - factor : terminal ; + nonterminal ; + "(" , S , alts , ")" , S . + repeat0 : factor , "*" , S , sep ? . + repeat1 : factor , "+" , S , sep ? . + option : factor , "?" , S . + sep : factor . + nonterminal : ( mark , S ) ? , name , S . + - terminal : literal ; + charset . + literal : quoted ; + encoded . + - quoted : ( tmark , S ) ? , - string . + @ name : namestart , namefollower * . + - namestart : [ "_" ; Ll ; Lu ; Lm ; Lt ; Lo ] . + - namefollower : namestart ; [ "-.·‿⁀" ; Nd ; Mn ] . + @ tmark : [ "^-" ] . + string : - '"' , dstring , - '"' , S ; + - "'" , sstring , - "'" , S . + @ dstring : dchar + . + @ sstring : schar + . + dchar : ~ [ '"' ] ; + '"' , - '"' . { all characters , quotes must be doubled } + schar : ~ [ "'" ] ; + "'" , - "'" . { all characters , quotes must be doubled } + - encoded : ( tmark , S ) ? , - "#" , @ hex , S . + hex : [ "0" - "9" ; "a" - "f" ; "A" - "F" ] + . + - charset : inclusion ; + exclusion . + inclusion : ( tmark , S ) ? , set . + exclusion : ( tmark , S ) ? , "~" , S , set . + - set : "[" , S , member * ( [ ";|" ] , S ) , "]" , S . + - member : literal ; + range ; + class . + range : from , "-" , S , to . + @ from : character . + @ to : character . + - character : - '"' , dchar , - '"' , S ; + - "'" , schar , - "'" , S ; + "#" , hex , S . + class : @ code , S . + code : letter , letter . + - letter : [ "a" - "z" ; "A" - "Z" ] . diff --git a/tests/tests/ixml/ixml-spaces.req b/tests/tests/ixml/ixml-spaces.req new file mode 100644 index 00000000..0fdc1007 --- /dev/null +++ b/tests/tests/ixml/ixml-spaces.req @@ -0,0 +1,530 @@ + ixml : S , rule + S , S . + - S : ( whitespace ; comment ) * . + - whitespace : - [ Zs ] ; tab ; lf ; cr . + - tab : - #9 . + - lf : - #a . + - cr : - #d . + comment : - "{" , ( cchar ; comment ) * , - "}" . + - cchar : ~ [ "{}" ] . + rule : ( mark , S ) ? , name , S , [ "=:" ] , S , - alts , "." . + @ mark : [ "@^-" ] . + alts : alt + ( [ ";|" ] , S ) . + alt : term * ( "," , S ) . + - term : factor ; + option ; + repeat0 ; + repeat1 . + - factor : terminal ; + nonterminal ; + "(" , S , alts , ")" , S . + repeat0 : factor , "*" , S , sep ? . + repeat1 : factor , "+" , S , sep ? . + option : factor , "?" , S . + sep : factor . + nonterminal : ( mark , S ) ? , name , S . + - terminal : literal ; + charset . + literal : quoted ; + encoded . + - quoted : ( tmark , S ) ? , - string . + @ name : namestart , namefollower * . + - namestart : [ "_" ; Ll ; Lu ; Lm ; Lt ; Lo ] . + - namefollower : namestart ; [ "-.·‿⁀" ; Nd ; Mn ] . + @ tmark : [ "^-" ] . + string : - '"' , dstring , - '"' , S ; + - "'" , sstring , - "'" , S . + @ dstring : dchar + . + @ sstring : schar + . + dchar : ~ [ '"' ] ; + '"' , - '"' . { all characters , quotes must be doubled } + schar : ~ [ "'" ] ; + "'" , - "'" . { all characters , quotes must be doubled } + - encoded : ( tmark , S ) ? , - "#" , @ hex , S . + hex : [ "0" - "9" ; "a" - "f" ; "A" - "F" ] + . + - charset : inclusion ; + exclusion . + inclusion : ( tmark , S ) ? , set . + exclusion : ( tmark , S ) ? , "~" , S , set . + - set : "[" , S , member * ( [ ";|" ] , S ) , "]" , S . + - member : literal ; + range ; + class . + range : from , "-" , S , to . + @ from : character . + @ to : character . + - character : - '"' , dchar , - '"' , S ; + - "'" , schar , - "'" , S ; + "#" , hex , S . + class : @ code , S . + code : letter , letter . + - letter : [ "a" - "z" ; "A" - "Z" ] . +# + ixml : S , rule + S , S . + - S : ( whitespace ; comment ) * . + - whitespace : - [ Zs ] ; tab ; { lf ; } cr . + - tab : - #9 . +{ - lf : - #a . } + - cr : - #d . + comment : - "{" , ( cchar ; comment ) * , - "}" . + - cchar : ~ [ "{}" ] . + rule : ( mark , S ) ? , name , S , [ "=:" ] , S , - alts , "." . + @ mark : [ "@^-" ] . + alts : alt + ( [ ";|" ] , S ) . + alt : term * ( "," , S ) . + - term : factor ; + option ; + repeat0 ; + repeat1 . + - factor : terminal ; + nonterminal ; + "(" , S , alts , ")" , S . + repeat0 : factor , "*" , S , sep ? . + repeat1 : factor , "+" , S , sep ? . + option : factor , "?" , S . + sep : factor . + nonterminal : ( mark , S ) ? , name , S . + - terminal : literal ; + charset . + literal : quoted ; + encoded . + - quoted : ( tmark , S ) ? , - string . + @ name : namestart , namefollower * . + - namestart : [ "_" ; Ll ; Lu ; Lm ; Lt ; Lo ] . + - namefollower : namestart ; [ "-.·‿⁀" ; Nd ; Mn ] . + @ tmark : [ "^-" ] . + string : - '"' , dstring , - '"' , S ; + - "'" , sstring , - "'" , S . + @ dstring : dchar + . + @ sstring : schar + . + dchar : ~ [ '"' ] ; + '"' , - '"' . { all characters , quotes must be doubled } + schar : ~ [ "'" ] ; + "'" , - "'" . { all characters , quotes must be doubled } + - encoded : ( tmark , S ) ? , - "#" , @ hex , S . + hex : [ "0" - "9" ; "a" - "f" ; "A" - "F" ] + . + - charset : inclusion ; + exclusion . + inclusion : ( tmark , S ) ? , set . + exclusion : ( tmark , S ) ? , "~" , S , set . + - set : "[" , S , member * ( [ ";|" ] , S ) , "]" , S . + - member : literal ; + range ; + class . + range : from , "-" , S , to . + @ from : character . + @ to : character . + - character : - '"' , dchar , - '"' , S ; + - "'" , schar , - "'" , S ; + "#" , hex , S . + class : @ code , S . + code : letter , letter . + - letter : [ "a" - "z" ; "A" - "Z" ] . +# + + + : + + , + + + + + + + , + + . + : + + ( + + + + ; + + + + )* + . + : + + [ + ] + ; + + + ; + lf ; + + + . + : + + + . + - lf : - #a . + : + + + . + : + + , + ( + + + + ; + + + + )*, + + . + : + + ~[ + ] + . + : + + , + , + , + [ + ], + , + , + + . + : + + [ + ] + . + : + + + + + ( + + + [ + ], + + + ) + + . + : + + + * + ( + + + , + + + ) + + . + : + + + ; + + + ; + + + ; + + + . + : + + + ; + + + ; + + , + , + , + , + + . + : + + , + , + , + + . + : + + , + , + , + + . + : + + , + , + + . + : + + + . + : + + , + , + + . + : + + + ; + + + . + : + + + ; + + + . + : + + , + + . + : + + , + + * + . + : + + [ + ; + ; + ; + ; + ; + ] + . + : + + + ; + + [ + ; + ; + ] + . + : + + [ + ] + . + : + + , + , + , + + ; + + , + , + , + + . + : + + + + + . + : + + + + + . + : + + ~[ + ] + ; + + , + + . + all characters , quotes must be doubled + : + + ~[ + ] + ; + + , + + . + all characters , quotes must be doubled + : + + , + , + , + + . + : + + + [ + -; + -; + -]+ + . + : + + + ; + + + . + : + + , + + . + : + + , + , + , + + . + : + + , + , + + * + ( + + + [ + ], + + + ) + , + , + + . + : + + + ; + + + ; + + + . + : + + , + , + , + + . + : + + + . + : + + + . + : + + , + , + , + + ; + + , + , + , + + ; + + , + , + + . + : + + , + + . + : + + , + + . + : + + [ + -; + -] + . + diff --git a/tests/tests/ixml/ixml.inp b/tests/tests/ixml/ixml.inp new file mode 100644 index 00000000..f2be592b --- /dev/null +++ b/tests/tests/ixml/ixml.inp @@ -0,0 +1,67 @@ + ixml: s, rule+s, s. + + -s: (whitespace; comment)*. + -whitespace: -[Zs]; tab; lf; cr. + -tab: -#9. + -lf: -#a. + -cr: -#d. + comment: -"{", (cchar; comment)*, -"}". + -cchar: ~["{}"]. + + rule: (mark, s)?, name, s, -["=:"], s, -alts, -".". + @mark: ["@^-"]. + alts: alt+(-[";|"], s). + alt: term*(-",", s). + -term: factor; + option; + repeat0; + repeat1. + -factor: terminal; + nonterminal; + -"(", s, alts, -")", s. + repeat0: factor, -"*", s, sep?. + repeat1: factor, -"+", s, sep?. + option: factor, -"?", s. + sep: factor. + nonterminal: (mark, s)?, name, s. + + -terminal: literal; + charset. + literal: quoted; + encoded. + -quoted: (tmark, s)?, -string. + + @name: namestart, namefollower*. + -namestart: ["_"; L]. +-namefollower: namestart; ["-.·‿⁀"; Nd; Mn]. + + @tmark: ["^-"]. + string: -'"', dstring, -'"', s; + -"'", sstring, -"'", s. + @dstring: dchar+. + @sstring: schar+. + dchar: ~['"'; #a; #d]; + '"', -'"'. {all characters except line breaks; quotes must be doubled} + schar: ~["'"; #a; #d]; + "'", -"'". {all characters except line breaks; quotes must be doubled} + -encoded: (tmark, s)?, -"#", @hex, s. + hex: ["0"-"9"; "a"-"f"; "A"-"F"]+. + + -charset: inclusion; + exclusion. + inclusion: (tmark, s)?, set. + exclusion: (tmark, s)?, -"~", s, set. + -set: -"[", s, member*(-[";|"], s), -"]", s. + -member: literal; + range; + class. + range: from, -"-", s, to. + @from: character. + @to: character. + -character: -'"', dchar, -'"', s; + -"'", schar, -"'", s; + "#", hex, s. + class: code, s. + @code: capital, letter?. + -capital: ["A"-"Z"]. + -letter: ["a"-"z"]. diff --git a/tests/tests/ixml/ixml.ixml b/tests/tests/ixml/ixml.ixml new file mode 100644 index 00000000..f2be592b --- /dev/null +++ b/tests/tests/ixml/ixml.ixml @@ -0,0 +1,67 @@ + ixml: s, rule+s, s. + + -s: (whitespace; comment)*. + -whitespace: -[Zs]; tab; lf; cr. + -tab: -#9. + -lf: -#a. + -cr: -#d. + comment: -"{", (cchar; comment)*, -"}". + -cchar: ~["{}"]. + + rule: (mark, s)?, name, s, -["=:"], s, -alts, -".". + @mark: ["@^-"]. + alts: alt+(-[";|"], s). + alt: term*(-",", s). + -term: factor; + option; + repeat0; + repeat1. + -factor: terminal; + nonterminal; + -"(", s, alts, -")", s. + repeat0: factor, -"*", s, sep?. + repeat1: factor, -"+", s, sep?. + option: factor, -"?", s. + sep: factor. + nonterminal: (mark, s)?, name, s. + + -terminal: literal; + charset. + literal: quoted; + encoded. + -quoted: (tmark, s)?, -string. + + @name: namestart, namefollower*. + -namestart: ["_"; L]. +-namefollower: namestart; ["-.·‿⁀"; Nd; Mn]. + + @tmark: ["^-"]. + string: -'"', dstring, -'"', s; + -"'", sstring, -"'", s. + @dstring: dchar+. + @sstring: schar+. + dchar: ~['"'; #a; #d]; + '"', -'"'. {all characters except line breaks; quotes must be doubled} + schar: ~["'"; #a; #d]; + "'", -"'". {all characters except line breaks; quotes must be doubled} + -encoded: (tmark, s)?, -"#", @hex, s. + hex: ["0"-"9"; "a"-"f"; "A"-"F"]+. + + -charset: inclusion; + exclusion. + inclusion: (tmark, s)?, set. + exclusion: (tmark, s)?, -"~", s, set. + -set: -"[", s, member*(-[";|"], s), -"]", s. + -member: literal; + range; + class. + range: from, -"-", s, to. + @from: character. + @to: character. + -character: -'"', dchar, -'"', s; + -"'", schar, -"'", s; + "#", hex, s. + class: code, s. + @code: capital, letter?. + -capital: ["A"-"Z"]. + -letter: ["a"-"z"]. diff --git a/tests/tests/ixml/ixml.req b/tests/tests/ixml/ixml.req new file mode 100644 index 00000000..c86bbaa2 --- /dev/null +++ b/tests/tests/ixml/ixml.req @@ -0,0 +1,632 @@ + ixml: s, rule+s, s. + + -s: (whitespace; comment)*. + -whitespace: -[Zs]; tab; lf; cr. + -tab: -#9. + -lf: -#a. + -cr: -#d. + comment: -"{", (cchar; comment)*, -"}". + -cchar: ~["{}"]. + + rule: (mark, s)?, name, s, -["=:"], s, -alts, -".". + @mark: ["@^-"]. + alts: alt+(-[";|"], s). + alt: term*(-",", s). + -term: factor; + option; + repeat0; + repeat1. + -factor: terminal; + nonterminal; + -"(", s, alts, -")", s. + repeat0: factor, -"*", s, sep?. + repeat1: factor, -"+", s, sep?. + option: factor, -"?", s. + sep: factor. + nonterminal: (mark, s)?, name, s. + + -terminal: literal; + charset. + literal: quoted; + encoded. + -quoted: (tmark, s)?, -string. + + @name: namestart, namefollower*. + -namestart: ["_"; L]. +-namefollower: namestart; ["-.·‿⁀"; Nd; Mn]. + + @tmark: ["^-"]. + string: -'"', dstring, -'"', s; + -"'", sstring, -"'", s. + @dstring: dchar+. + @sstring: schar+. + dchar: ~['"'; #a; #d]; + '"', -'"'. {all characters except line breaks; quotes must be doubled} + schar: ~["'"; #a; #d]; + "'", -"'". {all characters except line breaks; quotes must be doubled} + -encoded: (tmark, s)?, -"#", @hex, s. + hex: ["0"-"9"; "a"-"f"; "A"-"F"]+. + + -charset: inclusion; + exclusion. + inclusion: (tmark, s)?, set. + exclusion: (tmark, s)?, -"~", s, set. + -set: -"[", s, member*(-[";|"], s), -"]", s. + -member: literal; + range; + class. + range: from, -"-", s, to. + @from: character. + @to: character. + -character: -'"', dchar, -'"', s; + -"'", schar, -"'", s; + "#", hex, s. + class: code, s. + @code: capital, letter?. + -capital: ["A"-"Z"]. + -letter: ["a"-"z"]. +# + ixml: s, rule+s, s. + + -s: (whitespace; comment)*. + -whitespace: -[Zs]; tab; lf; cr. + -tab: -#9. + -lf: -#a. + -cr: -#d. + comment: -"{", (cchar; comment)*, -"}". + -cchar: ~["{}"]. + + rule: (mark, s)?, name, s, -["=:"], s, -alts, -".". + @mark: ["@^-"]. + alts: alt+(-[";|"], s). + alt: term*(-",", s). + -term: factor; + option; + repeat0; + repeat1. + -factor: terminal; + nonterminal; + -"(", s, alts, -")", s. + repeat0: factor, -"*", s, sep?. + repeat1: factor, -"+", s, sep?. + option: factor, -"?", s. + sep: factor. + nonterminal: (mark, s)?, name, s. + + -terminal: literal; + charset. + literal: quoted; + encoded. + -quoted: (tmark, s)?, -string. + + @name: namestart, namefollower*. + -namestart: ["_"; L]. +-namefollower: namestart; ["-.·‿⁀"; Nd; Mn]. + + @tmark: ["^-"]. + string: -'"', dstring, -'"', s; + -"'", sstring, -"'", s. + @dstring: dchar+. + @sstring: schar+. + dchar: ~['"'; #a; #d]; + '"', -'"'. {all characters except line breaks; quotes must be doubled} + schar: ~["'"; #a; #d]; + "'", -"'". {all characters except line breaks; quotes must be doubled} + -encoded: (tmark, s)?, -"#", @hex, s. + hex: ["0"-"9"; "a"-"f"; "A"-"F"]+. + + -charset: inclusion; + exclusion. + inclusion: (tmark, s)?, set. + exclusion: (tmark, s)?, -"~", s, set. + -set: -"[", s, member*(-[";|"], s), -"]", s. + -member: literal; + range; + class. + range: from, -"-", s, to. + @from: character. + @to: character. + -character: -'"', dchar, -'"', s; + -"'", schar, -"'", s; + "#", hex, s. + class: code, s. + @code: capital, letter?. + -capital: ["A"-"Z"]. + -letter: ["a"-"z"]. +# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + all characters except line breaks; quotes must be doubled + + + + + + + + + + + + + + all characters except line breaks; quotes must be doubled + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tests/ixml/ixml1.inp b/tests/tests/ixml/ixml1.inp new file mode 100644 index 00000000..88865983 --- /dev/null +++ b/tests/tests/ixml/ixml1.inp @@ -0,0 +1,45 @@ +ixml: S, rule+. +rule: mark?, name, S, ":", S, def, ".", S. +def: alt+(";", S). +alt: term*(",", S). +-term: factor; repeat0; repeat1; option. +repeat0: factor, "*", S, sep?. +sep: factor. +repeat1: factor, "+", S, sep?. +option: factor, "?", S. +-factor: nonterminal; terminal; "(", S, def, ")", S. +nonterminal: mark?, name, S. +terminal: mark?, (quoted; hex; charset; exclude). + +charset: "[", S, element+(";", S), "]", S. +exclude: "~", S, -charset. + +-element: range; character, S; class, S. +range: from, S, "-", S, to, S. +@from: character. +@to: character. +class: letter, letter. {One of the Unicode character classes} + +@name: letgit, xletter*. +-letgit: letter; digit. +-letter: ["a"-"z"; "A"-"Z"]. +-digit: ["0"-"9"]. +-xletter: letgit; "-". + +@mark: "@", S; "^", S; "-", S. + +quoted: -'"', dstring, -'"', S; -"'", sstring, -"'", S. +@dstring: dchar+. +@sstring: schar+. +dchar: ~['"']; '""'. {all characters, dquotes must be doubled} +schar: ~["'"]; "''". {all characters, squotes must be doubled} +-character: '"', dchar, '"'; "'", schar, "'"; hex. + +hex: "#", number. +number: hexit+. +-hexit: digit; ["a"-"f"; "A"-"F"]. + +-S: (" "; comment)*. +comment: "{", cchar*, "}". +-cchar: ~["}"]. +{the end} diff --git a/tests/tests/ixml/ixml1.ixml b/tests/tests/ixml/ixml1.ixml new file mode 100644 index 00000000..158f6b62 --- /dev/null +++ b/tests/tests/ixml/ixml1.ixml @@ -0,0 +1,45 @@ +ixml: S, rule+. +rule: mark?, name, S, ":", S, def, ".", S. +def: alt+(";", S). +alt: term*(",", S). +-term: factor; repeat0; repeat1; option. +repeat0: factor, "*", S, sep?. +sep: factor. +repeat1: factor, "+", S, sep?. +option: factor, "?", S. +-factor: nonterminal; terminal; "(", S, def, ")", S. +nonterminal: mark?, name, S. +terminal: mark?, (quoted; hex; charset; exclude). + +charset: "[", S, element+(";", S), "]", S. +exclude: "~", S, -charset. + +-element: range; character, S; class, S. +range: from, S, "-", S, to, S. +@from: character. +@to: character. +class: letter, letter. {One of the Unicode character classes} + +@name: letgit, xletter*. +-letgit: letter; digit. +-letter: ["a"-"z"; "A"-"Z"]. +-digit: ["0"-"9"]. +-xletter: letgit; "-". + +@mark: "@", S; "^", S; "-", S. + +quoted: -'"', dstring, -'"', S; -"'", sstring, -"'", S. +@dstring: dchar+. +@sstring: schar+. +dchar: ~['"']; '""'. {all characters, dquotes must be doubled} +schar: ~["'"]; "''". {all characters, squotes must be doubled} +-character: '"', dchar, '"'; "'", schar, "'"; hex. + +hex: "#", number. +number: hexit+. +-hexit: digit; ["a"-"f"; "A"-"F"]. + +-S: (" "; -#a; comment)*. +comment: "{", cchar*, "}". +-cchar: ~["}"]. +{the end} diff --git a/tests/tests/ixml/ixml1.req b/tests/tests/ixml/ixml1.req new file mode 100644 index 00000000..8f25cc00 --- /dev/null +++ b/tests/tests/ixml/ixml1.req @@ -0,0 +1,572 @@ +ixml: S, rule+. +rule: mark?, name, S, ":", S, def, ".", S. +def: alt+(";", S). +alt: term*(",", S). +-term: factor; repeat0; repeat1; option. +repeat0: factor, "*", S, sep?. +sep: factor. +repeat1: factor, "+", S, sep?. +option: factor, "?", S. +-factor: nonterminal; terminal; "(", S, def, ")", S. +nonterminal: mark?, name, S. +terminal: mark?, (quoted; hex; charset; exclude). + +charset: "[", S, element+(";", S), "]", S. +exclude: "~", S, -charset. + +-element: range; character, S; class, S. +range: from, S, "-", S, to, S. +@from: character. +@to: character. +class: letter, letter. {One of the Unicode character classes} + +@name: letgit, xletter*. +-letgit: letter; digit. +-letter: ["a"-"z"; "A"-"Z"]. +-digit: ["0"-"9"]. +-xletter: letgit; "-". + +@mark: "@", S; "^", S; "-", S. + +quoted: -'"', dstring, -'"', S; -"'", sstring, -"'", S. +@dstring: dchar+. +@sstring: schar+. +dchar: ~['"']; '""'. {all characters, dquotes must be doubled} +schar: ~["'"]; "''". {all characters, squotes must be doubled} +-character: '"', dchar, '"'; "'", schar, "'"; hex. + +hex: "#", number. +number: hexit+. +-hexit: digit; ["a"-"f"; "A"-"F"]. + +-S: (" "; -#a; comment)*. +comment: "{", cchar*, "}". +-cchar: ~["}"]. +{the end} +# +ixml: S, rule+. +rule: mark?, name, S, ":", S, def, ".", S. +def: alt+(";", S). +alt: term*(",", S). +-term: factor; repeat0; repeat1; option. +repeat0: factor, "*", S, sep?. +sep: factor. +repeat1: factor, "+", S, sep?. +option: factor, "?", S. +-factor: nonterminal; terminal; "(", S, def, ")", S. +nonterminal: mark?, name, S. +terminal: mark?, (quoted; hex; charset; exclude). + +charset: "[", S, element+(";", S), "]", S. +exclude: "~", S, -charset. + +-element: range; character, S; class, S. +range: from, S, "-", S, to, S. +@from: character. +@to: character. +class: letter, letter. {One of the Unicode character classes} + +@name: letgit, xletter*. +-letgit: letter; digit. +-letter: ["a"-"z"; "A"-"Z"]. +-digit: ["0"-"9"]. +-xletter: letgit; "-". + +@mark: "@", S; "^", S; "-", S. + +quoted: -'"', dstring, -'"', S; -"'", sstring, -"'", S. +@dstring: dchar+. +@sstring: schar+. +dchar: ~['"']; '""'. {all characters, dquotes must be doubled} +schar: ~["'"]; "''". {all characters, squotes must be doubled} +-character: '"', dchar, '"'; "'", schar, "'"; hex. + +hex: "#", number. +number: hexit+. +-hexit: digit; ["a"-"f"; "A"-"F"]. + +-S: (" "; comment)*. +comment: "{", cchar*, "}". +-cchar: ~["}"]. +{the end} +# + + + : + + + , + + + + + . + : + + + , + , + , + + + , + , + , + + + , + + + . + : + + + + + + ( + + + + + , + + + ) + + + . + : + + + + * + ( + + + + + , + + + ) + + + . + : + + + + ; + + + ; + + + ; + + + + . + : + + + , + + + , + , + + + . + : + + + + + . + : + + + , + + + , + , + + + . + : + + + , + + + , + + + . + : + + + + ; + + + ; + + + + , + , + , + + + , + + + . + : + + + , + , + + + . + : + + + , ( + + + + ; + + + ; + + + ; + + + + ) + . + : + + + + + , + , + + + + ( + + + + + , + + + ) + , + + + , + + + . + : + + + + + , + , + + + . + : + + + + ; + + , + + ; + + , + + + . + : + + + , + , + + + , + , + , + + + . + : + + + + + . + : + + + + + . + : + + + , + + + . + {One of the Unicode character classes} + + : + + + , + + * + + . + : + + + + ; + + + + . + : + + + + [ + -; + -] + + + . + : + + + + [ + -] + + + . + : + + + + ; + + + + + + . + : + + + + + , + + ; + + + + , + + ; + + + + , + + + . + : + + + + + , + , + + + , + + ; + + + + , + , + + + , + + + . + : + + + + + + + . + : + + + + + + + . + : + + + + ~[' + "'] + + ; + + + + + + . + {all characters, dquotes must be doubled} + + : + + + + ~[" + '"] + + ; + + + + + + . + {all characters, squotes must be doubled} + + : + + + + + , + , + + + + ; + + + + , + , + + + + ; + + + + . + : + + + + + , + + + . + : + + + + + + + . + : + + + + ; + + + [ + -; + -] + + + . + : + + + ( + + + + + + ; + + + + )* + + . + : + + + + + , + + *, + + + + + . + : + + + + ~[" + }"] + + + . + {the end} + + diff --git a/tests/tests/ixml/ixml2.inp b/tests/tests/ixml/ixml2.inp new file mode 100644 index 00000000..fd94e434 --- /dev/null +++ b/tests/tests/ixml/ixml2.inp @@ -0,0 +1,60 @@ +ixml: S, rule+. +rule: mark?, name, ["=:"], S, -alts, ".", S. +alts: alt+([";|"], S). +alt: term*(",", S). +-term: factor; + repeat0; + repeat1; + option. +repeat0: factor, "*", S, sep?. +repeat1: factor, "+", S, sep?. +option: factor, "?", S. +sep: factor. + +-factor: nonterminal; + terminal; + "(", S, alts, ")", S. +nonterminal: mark?, name. +-terminal: literal; charset. +-literal: quoted; encoded. +-charset: inclusion; exclusion. + +quoted: tmark?, -string. +encoded: tmark?, @hex. +inclusion: tmark?, "[", S, element+([";|"], S), "]", S. +exclusion: tmark?, "~", S, "[", S, element+([";|"], S), "]", S. + +@tmark: ["^-"], S. +-element: range; + string; + hex; + class. +range: from, "-", S, to. +@from: character. +@to: character. +-character: -'"', dchar, -'"', S; + -"'", schar, -"'", S; + hex. +class: letter, letter, S. {One of the Unicode character classes} +-letter: ["a"-"z"; "A"-"Z"]. +@name: letgit, xletter*, S. +-letgit: ["a"-"z"; "A"-"Z"; "0"-"9"]. +-xletter: letgit; "-". + +@mark: ["@^-"], S. + +string: -'"', dstring, -'"', S; + -"'", sstring, -"'", S. +@dstring: dchar+. +@sstring: schar+. +dchar: ~['"']; + '""'. {all characters, dquotes must be doubled} +schar: ~["'"]; + "''". {all characters, squotes must be doubled} +hex: "#", ["0"-"9"; "a"-"f"; "A"-"F"]+, S. + +-S: (" "; #9; comment)*. +comment: "{", cchar*, "}". +-cchar: ~["}"]. + +{the end} diff --git a/tests/tests/ixml/ixml2.ixml b/tests/tests/ixml/ixml2.ixml new file mode 100644 index 00000000..547bbb17 --- /dev/null +++ b/tests/tests/ixml/ixml2.ixml @@ -0,0 +1,60 @@ +ixml: S, rule+. +rule: mark?, name, ["=:"], S, -alts, ".", S. +alts: alt+([";|"], S). +alt: term*(",", S). +-term: factor; + repeat0; + repeat1; + option. +repeat0: factor, "*", S, sep?. +repeat1: factor, "+", S, sep?. +option: factor, "?", S. +sep: factor. + +-factor: nonterminal; + terminal; + "(", S, alts, ")", S. +nonterminal: mark?, name. +-terminal: literal; charset. +-literal: quoted; encoded. +-charset: inclusion; exclusion. + +quoted: tmark?, -string. +encoded: tmark?, @hex. +inclusion: tmark?, "[", S, element+([";|"], S), "]", S. +exclusion: tmark?, "~", S, "[", S, element+([";|"], S), "]", S. + +@tmark: ["^-"], S. +-element: range; + string; + hex; + class. +range: from, "-", S, to. +@from: character. +@to: character. +-character: -'"', dchar, -'"', S; + -"'", schar, -"'", S; + hex. +class: letter, letter, S. {One of the Unicode character classes} +-letter: ["a"-"z"; "A"-"Z"]. +@name: letgit, xletter*, S. +-letgit: ["a"{first}-"z"; "A"-"Z"; "0"-"9"]. +-xletter: letgit; "-". + +@mark: ["@^-"], S. + +string: -'"', dstring, -'"', S; + -"'", sstring, -"'", S. +@dstring: dchar+. +@sstring: schar+. +dchar: ~['"']; + '""'. {all characters, dquotes must be doubled} +schar: ~["'"]; + "''". {all characters, squotes must be doubled} +hex: "#", ["0"-"9"; "a"-"f"; "A"-"F"]+, S. + +-S: (" "; -#a; #9; comment)*. +comment: "{", cchar*, "}". +-cchar: ~["}"]. + +{the end} diff --git a/tests/tests/ixml/ixml2.req b/tests/tests/ixml/ixml2.req new file mode 100644 index 00000000..e9192bfe --- /dev/null +++ b/tests/tests/ixml/ixml2.req @@ -0,0 +1,477 @@ +ixml: S, rule+. +rule: mark?, name, ["=:"], S, -alts, ".", S. +alts: alt+([";|"], S). +alt: term*(",", S). +-term: factor; + repeat0; + repeat1; + option. +repeat0: factor, "*", S, sep?. +repeat1: factor, "+", S, sep?. +option: factor, "?", S. +sep: factor. + +-factor: nonterminal; + terminal; + "(", S, alts, ")", S. +nonterminal: mark?, name. +-terminal: literal; charset. +-literal: quoted; encoded. +-charset: inclusion; exclusion. + +quoted: tmark?, -string. +encoded: tmark?, @hex. +inclusion: tmark?, "[", S, element+([";|"], S), "]", S. +exclusion: tmark?, "~", S, "[", S, element+([";|"], S), "]", S. + +@tmark: ["^-"], S. +-element: range; + string; + hex; + class. +range: from, "-", S, to. +@from: character. +@to: character. +-character: -'"', dchar, -'"', S; + -"'", schar, -"'", S; + hex. +class: letter, letter, S. {One of the Unicode character classes} +-letter: ["a"-"z"; "A"-"Z"]. +@name: letgit, xletter*, S. +-letgit: ["a"{first}-"z"; "A"-"Z"; "0"-"9"]. +-xletter: letgit; "-". + +@mark: ["@^-"], S. + +string: -'"', dstring, -'"', S; + -"'", sstring, -"'", S. +@dstring: dchar+. +@sstring: schar+. +dchar: ~['"']; + '""'. {all characters, dquotes must be doubled} +schar: ~["'"]; + "''". {all characters, squotes must be doubled} +hex: "#", ["0"-"9"; "a"-"f"; "A"-"F"]+, S. + +-S: (" "; -#a; #9; comment)*. +comment: "{", cchar*, "}". +-cchar: ~["}"]. + +{the end} +# +ixml: S, rule+. +rule: mark?, name, ["=:"], S, -alts, ".", S. +alts: alt+([";|"], S). +alt: term*(",", S). +-term: factor; + repeat0; + repeat1; + option. +repeat0: factor, "*", S, sep?. +repeat1: factor, "+", S, sep?. +option: factor, "?", S. +sep: factor. + +-factor: nonterminal; + terminal; + "(", S, alts, ")", S. +nonterminal: mark?, name. +-terminal: literal; charset. +-literal: quoted; encoded. +-charset: inclusion; exclusion. + +quoted: tmark?, -string. +encoded: tmark?, @hex. +inclusion: tmark?, "[", S, element+([";|"], S), "]", S. +exclusion: tmark?, "~", S, "[", S, element+([";|"], S), "]", S. + +@tmark: ["^-"], S. +-element: range; + string; + hex; + class. +range: from, "-", S, to. +@from: character. +@to: character. +-character: -'"', dchar, -'"', S; + -"'", schar, -"'", S; + hex. +class: letter, letter, S. {One of the Unicode character classes} +-letter: ["a"-"z"; "A"-"Z"]. +@name: letgit, xletter*, S. +-letgit: ["a"-"z"; "A"-"Z"; "0"-"9"]. +-xletter: letgit; "-". + +@mark: ["@^-"], S. + +string: -'"', dstring, -'"', S; + -"'", sstring, -"'", S. +@dstring: dchar+. +@sstring: schar+. +dchar: ~['"']; + '""'. {all characters, dquotes must be doubled} +schar: ~["'"]; + "''". {all characters, squotes must be doubled} +hex: "#", ["0"-"9"; "a"-"f"; "A"-"F"]+, S. + +-S: (" "; #9; comment)*. +comment: "{", cchar*, "}". +-cchar: ~["}"]. + +{the end} +# + + + : + + , + + + + . + : + + , + , + [ + ], + , + , + , + + . + : + + + + + ( + + + [ + ], + + + ) + + . + : + + + * + ( + + + , + + + ) + + . + : + + + ; + + + ; + + + ; + + + . + : + + , + , + , + + . + : + + , + , + , + + . + : + + , + , + + . + : + + + . + : + + + ; + + + ; + + , + , + , + , + + . + : + + , + + . + : + + + ; + + + . + : + + + ; + + + . + : + + + ; + + + . + : + + , + + . + : + + , + + . + : + + , + , + , + + + + ( + + + [ + ], + + + ) + , + , + + . + : + + , + , + , + , + , + + + + ( + + + [ + ], + + + ) + , + , + + . + : + + [ + ], + + . + : + + + ; + + + ; + + + ; + + + . + : + + , + , + , + + . + : + + + . + : + + + . + : + + , + , + , + + ; + + , + , + , + + ; + + + . + : + + , + , + + . + {One of the Unicode character classes} + + : + + [ + -; + -] + . + : + + , + + *, + + . + : + + [ + -; + -; + -] + . + : + + + ; + + + . + : + + [ + ], + + . + : + + , + , + , + + ; + + , + , + , + + . + : + + + + + . + : + + + + + . + : + + ~[ + ] + ; + + + . + {all characters, dquotes must be doubled} + + : + + ~[ + ] + ; + + + . + {all characters, squotes must be doubled} + + : + + , + + [ + -; + -; + -]+, + + . + : + + ( + + + + ; + + + ; + + + + )* + . + : + + , + + *, + + . + : + + ~[ + ] + . + {the end} + + diff --git a/tests/tests/ixml/ixml3.inp b/tests/tests/ixml/ixml3.inp new file mode 100644 index 00000000..98f81dbf --- /dev/null +++ b/tests/tests/ixml/ixml3.inp @@ -0,0 +1,61 @@ +{A test for what happens with comments in nonterminal attributes} +ixml: S, rule+. +rule: mark?, name, ["=:"], S, -alts, ".", S. +alts: alt+([";|"], S). +alt: term*(",", S). +-term: factor; + repeat0; + repeat1; + option. +repeat0: factor, "*", S, sep?. +repeat1: factor, "+", S, sep?. +option: factor, "?", S. +sep: factor. + +-factor: nonterminal; + terminal; + "(", S, alts, ")", S. +nonterminal: mark?, name. +-terminal: literal; charset. +-literal: quoted; encoded. +-charset: inclusion; exclusion. + +quoted: tmark?, -string. +encoded: tmark?, @hex. +inclusion: tmark?, "[", S, element+([";|"], S), "]", S. +exclusion: tmark?, "~", S, "[", S, element+([";|"], S), "]", S. + +@tmark: ["^-"], S. +-element: range; + string; + hex; + class. +range: from, S, "-", S, to, S. +@from: character. +@to: character. +-character: -'"', dchar, -'"'; + -"'", schar, -"'"; + hex. +class: letter, letter, S. {One of the Unicode character classes} +-letter: ["a"-"z"; "A"-"Z"]. +@name: letgit, xletter*, S. +-letgit: ["a" - "z" {AAA}; "A"-"Z"; "0"-"9"]. +-xletter: letgit; "-". + +@mark: ["@^-"], S. + +string: -'"', dstring, -'"', S; + -"'", sstring, -"'", S. +@dstring: dchar+. +@sstring: schar+. +dchar: ~['"']; + '""'. {all characters, dquotes must be doubled} +schar: ~["'"]; + "''". {all characters, squotes must be doubled} +hex: "#", ["0"-"9"; "a"-"f"; "A"-"F"]+. + +-S: (" "; #9 {comment}; comment)*. +^comment: "{", cchar*, "}". +-cchar: ~["}"]. + +{the end} diff --git a/tests/tests/ixml/ixml3.ixml b/tests/tests/ixml/ixml3.ixml new file mode 100644 index 00000000..46db8852 --- /dev/null +++ b/tests/tests/ixml/ixml3.ixml @@ -0,0 +1,61 @@ +{A test for what happens with comments in nonterminal attributes} +ixml: S, rule+. +rule: mark?, name, ["=:"], S, -alts, ".", S. +alts: alt+([";|"], S). +alt: term*(",", S). +-term: factor; + repeat0; + repeat1; + option. +repeat0: factor, "*", S, sep?. +repeat1: factor, "+", S, sep?. +option: factor, "?", S. +sep: factor. + +-factor: nonterminal; + terminal; + "(", S, alts, ")", S. +nonterminal: mark?, name. +-terminal: literal; charset. +-literal: quoted; encoded. +-charset: inclusion; exclusion. + +quoted: tmark?, -string. +encoded: tmark?, @hex, S. +inclusion: tmark?, "[", S, element+([";|"], S), "]", S. +exclusion: tmark?, "~", S, "[", S, element+([";|"], S), "]", S. + +@tmark: ["^-"], S. +-element: range; + string; + hex; + class. +range: from, S, "-", S, to, S. +@from: character. +@to: character. +-character: -'"', dchar, -'"'; + -"'", schar, -"'"; + hex. +class: letter, letter, S. {One of the Unicode character classes} +-letter: ["a"-"z"; "A"-"Z"]. +@name: letgit, xletter*, S. +-letgit: ["a" - "z" {AAA}; "A"-"Z"; "0"-"9"]. +-xletter: letgit; "-". + +@mark: ["@^-"], S. + +string: -'"', dstring, -'"', S; + -"'", sstring, -"'", S. +@dstring: dchar+. +@sstring: schar+. +dchar: ~['"']; + '""'. {all characters, dquotes must be doubled} +schar: ~["'"]; + "''". {all characters, squotes must be doubled} +hex: "#", ["0"-"9"; "a"-"f"; "A"-"F"]+. + +-S: (" "; #9 {comment}; -#a; comment)*. +^comment: "{", cchar*, "}". +-cchar: ~["}"]. + +{the end} diff --git a/tests/tests/ixml/ixml3.req b/tests/tests/ixml/ixml3.req new file mode 100644 index 00000000..cc0e1277 --- /dev/null +++ b/tests/tests/ixml/ixml3.req @@ -0,0 +1,483 @@ +{A test for what happens with comments in nonterminal attributes} +ixml: S, rule+. +rule: mark?, name, ["=:"], S, -alts, ".", S. +alts: alt+([";|"], S). +alt: term*(",", S). +-term: factor; + repeat0; + repeat1; + option. +repeat0: factor, "*", S, sep?. +repeat1: factor, "+", S, sep?. +option: factor, "?", S. +sep: factor. + +-factor: nonterminal; + terminal; + "(", S, alts, ")", S. +nonterminal: mark?, name. +-terminal: literal; charset. +-literal: quoted; encoded. +-charset: inclusion; exclusion. + +quoted: tmark?, -string. +encoded: tmark?, @hex, S. +inclusion: tmark?, "[", S, element+([";|"], S), "]", S. +exclusion: tmark?, "~", S, "[", S, element+([";|"], S), "]", S. + +@tmark: ["^-"], S. +-element: range; + string; + hex; + class. +range: from, S, "-", S, to, S. +@from: character. +@to: character. +-character: -'"', dchar, -'"'; + -"'", schar, -"'"; + hex. +class: letter, letter, S. {One of the Unicode character classes} +-letter: ["a"-"z"; "A"-"Z"]. +@name: letgit, xletter*, S. +-letgit: ["a" - "z" {AAA}; "A"-"Z"; "0"-"9"]. +-xletter: letgit; "-". + +@mark: ["@^-"], S. + +string: -'"', dstring, -'"', S; + -"'", sstring, -"'", S. +@dstring: dchar+. +@sstring: schar+. +dchar: ~['"']; + '""'. {all characters, dquotes must be doubled} +schar: ~["'"]; + "''". {all characters, squotes must be doubled} +hex: "#", ["0"-"9"; "a"-"f"; "A"-"F"]+. + +-S: (" "; #9 {comment}; -#a; comment)*. +^comment: "{", cchar*, "}". +-cchar: ~["}"]. + +{the end} +# +{A test for what happens with comments in nonterminal attributes} +ixml: S, rule+. +rule: mark?, name, ["=:"], S, -alts, ".", S. +alts: alt+([";|"], S). +alt: term*(",", S). +-term: factor; + repeat0; + repeat1; + option. +repeat0: factor, "*", S, sep?. +repeat1: factor, "+", S, sep?. +option: factor, "?", S. +sep: factor. + +-factor: nonterminal; + terminal; + "(", S, alts, ")", S. +nonterminal: mark?, name. +-terminal: literal; charset. +-literal: quoted; encoded. +-charset: inclusion; exclusion. + +quoted: tmark?, -string. +encoded: tmark?, @hex. +inclusion: tmark?, "[", S, element+([";|"], S), "]", S. +exclusion: tmark?, "~", S, "[", S, element+([";|"], S), "]", S. + +@tmark: ["^-"], S. +-element: range; + string; + hex; + class. +range: from, S, "-", S, to, S. +@from: character. +@to: character. +-character: -'"', dchar, -'"'; + -"'", schar, -"'"; + hex. +class: letter, letter, S. {One of the Unicode character classes} +-letter: ["a"-"z"; "A"-"Z"]. +@name: letgit, xletter*, S. +-letgit: ["a" - "z" {AAA}; "A"-"Z"; "0"-"9"]. +-xletter: letgit; "-". + +@mark: ["@^-"], S. + +string: -'"', dstring, -'"', S; + -"'", sstring, -"'", S. +@dstring: dchar+. +@sstring: schar+. +dchar: ~['"']; + '""'. {all characters, dquotes must be doubled} +schar: ~["'"]; + "''". {all characters, squotes must be doubled} +hex: "#", ["0"-"9"; "a"-"f"; "A"-"F"]+. + +-S: (" "; #9 {comment}; comment)*. +^comment: "{", cchar*, "}". +-cchar: ~["}"]. + +{the end} +# + + + {A test for what happens with comments in nonterminal attributes} + : + + , + + + + . + : + + , + , + [ + ], + , + , + , + + . + : + + + + + ( + + + [ + ], + + + ) + + . + : + + + * + ( + + + , + + + ) + + . + : + + + ; + + + ; + + + ; + + + . + : + + , + , + , + + . + : + + , + , + , + + . + : + + , + , + + . + : + + + . + : + + + ; + + + ; + + , + , + , + , + + . + : + + , + + . + : + + + ; + + + . + : + + + ; + + + . + : + + + ; + + + . + : + + , + + . + : + + , + + . + : + + , + , + , + + + + ( + + + [ + ], + + + ) + , + , + + . + : + + , + , + , + , + , + + + + ( + + + [ + ], + + + ) + , + , + + . + : + + [ + ], + + . + : + + + ; + + + ; + + + ; + + + . + : + + , + , + , + , + , + + . + : + + + . + : + + + . + : + + , + , + + ; + + , + , + + ; + + + . + : + + , + , + + . + {One of the Unicode character classes} + + : + + [ + -; + -] + . + : + + , + + *, + + . + : + + [ + - + {AAA} + ; + -; + -] + . + : + + + ; + + + . + : + + [ + ], + + . + : + + , + , + , + + ; + + , + , + , + + . + : + + + + + . + : + + + + + . + : + + ~[ + ] + ; + + + . + {all characters, dquotes must be doubled} + + : + + ~[ + ] + ; + + + . + {all characters, squotes must be doubled} + + : + + , + + [ + -; + -; + -]+ + . + : + + ( + + + + ; + + + {comment} + + ; + + + + )* + . + : + + , + + *, + + . + : + + ~[ + ] + . + {the end} + + diff --git a/tests/tests/parse/elem1.inp b/tests/tests/parse/elem1.inp new file mode 100644 index 00000000..acbe86c7 --- /dev/null +++ b/tests/tests/parse/elem1.inp @@ -0,0 +1 @@ +abcd diff --git a/tests/tests/parse/elem1.ixml b/tests/tests/parse/elem1.ixml new file mode 100644 index 00000000..99231113 --- /dev/null +++ b/tests/tests/parse/elem1.ixml @@ -0,0 +1,4 @@ +a: "a", b, c. +b: "b", c, d. +c: "c", []. {it should block here, since nothing matches} +d: "d". diff --git a/tests/tests/parse/elem1.req b/tests/tests/parse/elem1.req new file mode 100644 index 00000000..dbff3b0a --- /dev/null +++ b/tests/tests/parse/elem1.req @@ -0,0 +1,20 @@ +a: "a", b, c. +b: "b", c, d. +c: "c", []. {it should block here, since nothing matches} +d: "d". +# +abcd +# + + + 1 + 4 + abcd + [] + diff --git a/tests/tests/parse/parse-error.inp b/tests/tests/parse/parse-error.inp new file mode 100644 index 00000000..b47f17e1 --- /dev/null +++ b/tests/tests/parse/parse-error.inp @@ -0,0 +1 @@ +a b<&>. diff --git a/tests/tests/parse/parse-error.ixml b/tests/tests/parse/parse-error.ixml new file mode 100644 index 00000000..cbc2ebf5 --- /dev/null +++ b/tests/tests/parse/parse-error.ixml @@ -0,0 +1,2 @@ +a: "a", punctuation, "b". +punctuation: [",.;:'?!"]. diff --git a/tests/tests/parse/parse-error.req b/tests/tests/parse/parse-error.req new file mode 100644 index 00000000..fc7012da --- /dev/null +++ b/tests/tests/parse/parse-error.req @@ -0,0 +1,18 @@ +a: "a", punctuation, "b". +punctuation: [",.;:'?!"]. +# +a b<&>. +# + + + 1 + 2 + a b<&>. + [",.;:'?!</&>"] + diff --git a/tests/tests/parse/url.inp b/tests/tests/parse/url.inp new file mode 100644 index 00000000..827f31e6 --- /dev/null +++ b/tests/tests/parse/url.inp @@ -0,0 +1 @@ +http://http://@http://http:// diff --git a/tests/tests/parse/url.ixml b/tests/tests/parse/url.ixml new file mode 100644 index 00000000..caab158c --- /dev/null +++ b/tests/tests/parse/url.ixml @@ -0,0 +1,12 @@ +url: scheme, ":", authority, path. +scheme: name. +@name: letter+. +authority: "//", host. +host: sub+".". +sub: name. +path: ("/", seg)+. +seg: sname. +@sname: fletter*. +-letter: ["a"-"z"]; ["A"-"Z"]; ["0"-"9"]. +-fletter: letter; ".". + diff --git a/tests/tests/parse/url.req b/tests/tests/parse/url.req new file mode 100644 index 00000000..ca24aa5d --- /dev/null +++ b/tests/tests/parse/url.req @@ -0,0 +1,28 @@ +url: scheme, ":", authority, path. +scheme: name. +@name: letter+. +authority: "//", host. +host: sub+".". +sub: name. +path: ("/", seg)+. +seg: sname. +@sname: fletter*. +-letter: ["a"-"z"]; ["A"-"Z"]; ["0"-"9"]. +-fletter: letter; ".". + +# +http://http://@http://http:// +# + + + 1 + 12 + http://http://@http://http:// + "."; "/"; ["0"-"9"]; ["A"-"Z"]; ["a"-"z"] + diff --git a/tests/tests/parse/url1.inp b/tests/tests/parse/url1.inp new file mode 100644 index 00000000..c102c073 --- /dev/null +++ b/tests/tests/parse/url1.inp @@ -0,0 +1 @@ +http://www.w3.org/TR/1999/xhtml.html#date?name=fred \ No newline at end of file diff --git a/tests/tests/parse/url1.ixml b/tests/tests/parse/url1.ixml new file mode 100644 index 00000000..eceb38df --- /dev/null +++ b/tests/tests/parse/url1.ixml @@ -0,0 +1,11 @@ +url: scheme, ":", authority, path. +@scheme: name. +-name: letter+. +-authority: "//", host. +host: sub+".". +-sub: name. +path: ("/", seg)+. +-seg: sname. +-sname: fletter*. +-letter: ["a"-"z"]; ["A"-"Z"]; ["0"-"9"]. +-fletter: letter; ".". \ No newline at end of file diff --git a/tests/tests/parse/url1.req b/tests/tests/parse/url1.req new file mode 100644 index 00000000..5d159ba8 --- /dev/null +++ b/tests/tests/parse/url1.req @@ -0,0 +1,25 @@ +url: scheme, ":", authority, path. +@scheme: name. +-name: letter+. +-authority: "//", host. +host: sub+".". +-sub: name. +path: ("/", seg)+. +-seg: sname. +-sname: fletter*. +-letter: ["a"-"z"]; ["A"-"Z"]; ["0"-"9"]. +-fletter: letter; ".".# +http://www.w3.org/TR/1999/xhtml.html#date?name=fred# + + + 1 + 37 + http://www.w3.org/TR/1999/xhtml.html#date?name=fred + "."; "/"; ["0"-"9"]; ["A"-"Z"]; ["a"-"z"] + diff --git a/tests/tests/semantic/unused-rule.inp b/tests/tests/semantic/unused-rule.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/semantic/unused-rule.ixml b/tests/tests/semantic/unused-rule.ixml new file mode 100644 index 00000000..00a49efb --- /dev/null +++ b/tests/tests/semantic/unused-rule.ixml @@ -0,0 +1,6 @@ +a: b, undefined. +b: c. +c: . +unused: e. +e: f. +f: . diff --git a/tests/tests/semantic/unused-rule.req b/tests/tests/semantic/unused-rule.req new file mode 100644 index 00000000..b954a1da --- /dev/null +++ b/tests/tests/semantic/unused-rule.req @@ -0,0 +1,17 @@ +a: b, undefined. +b: c. +c: . +unused: e. +e: f. +f: . +# +# + +**** Undefined symbol: {"undefined"} + 6 f: . + ^ + +**** Unused rule: {"unused"} + 6 f: . + ^ +Failed diff --git a/tests/tests/semantic/unused-rules.inp b/tests/tests/semantic/unused-rules.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/semantic/unused-rules.ixml b/tests/tests/semantic/unused-rules.ixml new file mode 100644 index 00000000..c44422ba --- /dev/null +++ b/tests/tests/semantic/unused-rules.ixml @@ -0,0 +1,7 @@ +a: b, undefined1. +b: c. +c: undefined2. +unused1: e. +e: f. +unused2: . +f: . diff --git a/tests/tests/semantic/unused-rules.req b/tests/tests/semantic/unused-rules.req new file mode 100644 index 00000000..a817d455 --- /dev/null +++ b/tests/tests/semantic/unused-rules.req @@ -0,0 +1,18 @@ +a: b, undefined1. +b: c. +c: undefined2. +unused1: e. +e: f. +unused2: . +f: . +# +# + +**** Undefined symbols: {"undefined1"; "undefined2"} + 7 f: . + ^ + +**** Unused rules: {"unused1"; "unused2"} + 7 f: . + ^ +Failed diff --git a/tests/tests/syntax/MISSING.inp b/tests/tests/syntax/MISSING.inp new file mode 100644 index 00000000..b8e145d2 --- /dev/null +++ b/tests/tests/syntax/MISSING.inp @@ -0,0 +1 @@ +Tou shouldn't see this, or you forgot to supply an *.inp file diff --git a/tests/tests/syntax/class-range.inp b/tests/tests/syntax/class-range.inp new file mode 100644 index 00000000..f83d884f --- /dev/null +++ b/tests/tests/syntax/class-range.inp @@ -0,0 +1 @@ +Syntax error diff --git a/tests/tests/syntax/class-range.ixml b/tests/tests/syntax/class-range.ixml new file mode 100644 index 00000000..56135313 --- /dev/null +++ b/tests/tests/syntax/class-range.ixml @@ -0,0 +1,2 @@ +a: class-range. +class-range: [L-N]. diff --git a/tests/tests/syntax/class-range.req b/tests/tests/syntax/class-range.req new file mode 100644 index 00000000..b929f830 --- /dev/null +++ b/tests/tests/syntax/class-range.req @@ -0,0 +1,15 @@ +a: class-range. +class-range: [L-N]. +# +Syntax error +# + +**** Bound of range must be a single character + 2 class-range: [L-N]. + ^ + +**** Bound of range must be a single character + 2 class-range: [L-N]. + ^ +**** Parsing failed at line 2: Bound of range must be a single character +Failed diff --git a/tests/tests/syntax/defn1.inp b/tests/tests/syntax/defn1.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/defn1.ixml b/tests/tests/syntax/defn1.ixml new file mode 100644 index 00000000..da9e19cf --- /dev/null +++ b/tests/tests/syntax/defn1.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: @".". {Not allowed for terminals} +d: . diff --git a/tests/tests/syntax/defn1.req b/tests/tests/syntax/defn1.req new file mode 100644 index 00000000..e8c784a8 --- /dev/null +++ b/tests/tests/syntax/defn1.req @@ -0,0 +1,12 @@ +a: b, c. +b: c, d. +c: @".". {Not allowed for terminals} +d: . +# +# + +**** Marker '@' only allowed for rule names + 3 c: @".". {Not allowed for terminals} + ^ +**** Parsing failed at line 3: Marker '@' only allowed for rule names +Failed diff --git a/tests/tests/syntax/defn10.inp b/tests/tests/syntax/defn10.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/defn10.ixml b/tests/tests/syntax/defn10.ixml new file mode 100644 index 00000000..6d359f27 --- /dev/null +++ b/tests/tests/syntax/defn10.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: -(a, b, c). {No marker allowed} +d: . diff --git a/tests/tests/syntax/defn10.req b/tests/tests/syntax/defn10.req new file mode 100644 index 00000000..7057b246 --- /dev/null +++ b/tests/tests/syntax/defn10.req @@ -0,0 +1,12 @@ +a: b, c. +b: c, d. +c: -(a, b, c). {No marker allowed} +d: . +# +# + +**** Markers not possible for bracketed rules + 3 c: -(a, b, c). {No marker allowed} + ^ +**** Parsing failed at line 3: Markers not possible for bracketed rules +Failed diff --git a/tests/tests/syntax/defn11.inp b/tests/tests/syntax/defn11.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/defn11.ixml b/tests/tests/syntax/defn11.ixml new file mode 100644 index 00000000..07976d46 --- /dev/null +++ b/tests/tests/syntax/defn11.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: ^(a, b, c). {No marker allowed} +d: . diff --git a/tests/tests/syntax/defn11.req b/tests/tests/syntax/defn11.req new file mode 100644 index 00000000..96e5ee22 --- /dev/null +++ b/tests/tests/syntax/defn11.req @@ -0,0 +1,12 @@ +a: b, c. +b: c, d. +c: ^(a, b, c). {No marker allowed} +d: . +# +# + +**** Markers not possible for bracketed rules + 3 c: ^(a, b, c). {No marker allowed} + ^ +**** Parsing failed at line 3: Markers not possible for bracketed rules +Failed diff --git a/tests/tests/syntax/defn2.inp b/tests/tests/syntax/defn2.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/defn2.ixml b/tests/tests/syntax/defn2.ixml new file mode 100644 index 00000000..c5eae6b5 --- /dev/null +++ b/tests/tests/syntax/defn2.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: @'.'. {Not allowed for terminals} +d: . diff --git a/tests/tests/syntax/defn2.req b/tests/tests/syntax/defn2.req new file mode 100644 index 00000000..a4623f25 --- /dev/null +++ b/tests/tests/syntax/defn2.req @@ -0,0 +1,12 @@ +a: b, c. +b: c, d. +c: @'.'. {Not allowed for terminals} +d: . +# +# + +**** Marker '@' only allowed for rule names + 3 c: @'.'. {Not allowed for terminals} + ^ +**** Parsing failed at line 3: Marker '@' only allowed for rule names +Failed diff --git a/tests/tests/syntax/defn3.inp b/tests/tests/syntax/defn3.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/defn3.ixml b/tests/tests/syntax/defn3.ixml new file mode 100644 index 00000000..224dc618 --- /dev/null +++ b/tests/tests/syntax/defn3.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: 'unterminated. {unterminated string} +d: . diff --git a/tests/tests/syntax/defn3.req b/tests/tests/syntax/defn3.req new file mode 100644 index 00000000..3420a03a --- /dev/null +++ b/tests/tests/syntax/defn3.req @@ -0,0 +1,16 @@ +a: b, c. +b: c, d. +c: 'unterminated. {unterminated string} +d: . +# +# + +**** Unterminated string + 3 c: 'unterminated. {unterminated string} + ^ + +**** Character "," expected + 3 c: 'unterminated. {unterminated string} + ^ +**** Parsing failed at line 3: Character "," expected +Failed diff --git a/tests/tests/syntax/defn3.rq b/tests/tests/syntax/defn3.rq new file mode 100644 index 00000000..3fe90b26 --- /dev/null +++ b/tests/tests/syntax/defn3.rq @@ -0,0 +1,14 @@ +a: b, c. +b: c, d. +c: ' +**** Unterminated string + 3 c: 'unterminated. {unterminated string} + ^ +u +**** Character "," expected + 3 c: 'unterminated. {unterminated string} + ^ +nterminated. {unterminated string} +d: . +**** Parsing failed at line 3 : Character "," expected +Failed diff --git a/tests/tests/syntax/defn4.inp b/tests/tests/syntax/defn4.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/defn4.ixml b/tests/tests/syntax/defn4.ixml new file mode 100644 index 00000000..18b4a351 --- /dev/null +++ b/tests/tests/syntax/defn4.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: "unterminated. {unterminated string} +d: . diff --git a/tests/tests/syntax/defn4.req b/tests/tests/syntax/defn4.req new file mode 100644 index 00000000..8c757f41 --- /dev/null +++ b/tests/tests/syntax/defn4.req @@ -0,0 +1,16 @@ +a: b, c. +b: c, d. +c: "unterminated. {unterminated string} +d: . +# +# + +**** Unterminated string + 3 c: "unterminated. {unterminated string} + ^ + +**** Character "," expected + 3 c: "unterminated. {unterminated string} + ^ +**** Parsing failed at line 3: Character "," expected +Failed diff --git a/tests/tests/syntax/defn5.inp b/tests/tests/syntax/defn5.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/defn5.ixml b/tests/tests/syntax/defn5.ixml new file mode 100644 index 00000000..dda32739 --- /dev/null +++ b/tests/tests/syntax/defn5.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: @#9. {no @ for terminals} +d: . diff --git a/tests/tests/syntax/defn5.req b/tests/tests/syntax/defn5.req new file mode 100644 index 00000000..5fef29fd --- /dev/null +++ b/tests/tests/syntax/defn5.req @@ -0,0 +1,12 @@ +a: b, c. +b: c, d. +c: @#9. {no @ for terminals} +d: . +# +# + +**** Marker '@' only allowed for rule names + 3 c: @#9. {no @ for terminals} + ^ +**** Parsing failed at line 3: Marker '@' only allowed for rule names +Failed diff --git a/tests/tests/syntax/defn6.inp b/tests/tests/syntax/defn6.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/defn6.ixml b/tests/tests/syntax/defn6.ixml new file mode 100644 index 00000000..b5c04364 --- /dev/null +++ b/tests/tests/syntax/defn6.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: @~["abc"]. {No @ allowed} +d: . diff --git a/tests/tests/syntax/defn6.req b/tests/tests/syntax/defn6.req new file mode 100644 index 00000000..112b6b3d --- /dev/null +++ b/tests/tests/syntax/defn6.req @@ -0,0 +1,12 @@ +a: b, c. +b: c, d. +c: @~["abc"]. {No @ allowed} +d: . +# +# + +**** Marker '@' only allowed for rule names + 3 c: @~["abc"]. {No @ allowed} + ^ +**** Parsing failed at line 3: Marker '@' only allowed for rule names +Failed diff --git a/tests/tests/syntax/defn8.inp b/tests/tests/syntax/defn8.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/defn8.ixml b/tests/tests/syntax/defn8.ixml new file mode 100644 index 00000000..bb08e921 --- /dev/null +++ b/tests/tests/syntax/defn8.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: @["abc"]. {No @ allowed} +d: . diff --git a/tests/tests/syntax/defn8.req b/tests/tests/syntax/defn8.req new file mode 100644 index 00000000..f26610ab --- /dev/null +++ b/tests/tests/syntax/defn8.req @@ -0,0 +1,12 @@ +a: b, c. +b: c, d. +c: @["abc"]. {No @ allowed} +d: . +# +# + +**** Marker '@' only allowed for rule names + 3 c: @["abc"]. {No @ allowed} + ^ +**** Parsing failed at line 3: Marker '@' only allowed for rule names +Failed diff --git a/tests/tests/syntax/defn9.inp b/tests/tests/syntax/defn9.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/defn9.ixml b/tests/tests/syntax/defn9.ixml new file mode 100644 index 00000000..2ece1130 --- /dev/null +++ b/tests/tests/syntax/defn9.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: @(a, b, c). {No @ allowed} +d: . diff --git a/tests/tests/syntax/defn9.req b/tests/tests/syntax/defn9.req new file mode 100644 index 00000000..1e6ed47d --- /dev/null +++ b/tests/tests/syntax/defn9.req @@ -0,0 +1,16 @@ +a: b, c. +b: c, d. +c: @(a, b, c). {No @ allowed} +d: . +# +# + +**** Marker '@' only allowed for rule names + 3 c: @(a, b, c). {No @ allowed} + ^ + +**** Markers not possible for bracketed rules + 3 c: @(a, b, c). {No @ allowed} + ^ +**** Parsing failed at line 3: Markers not possible for bracketed rules +Failed diff --git a/tests/tests/syntax/elem2.inp b/tests/tests/syntax/elem2.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/elem2.ixml b/tests/tests/syntax/elem2.ixml new file mode 100644 index 00000000..b9449a92 --- /dev/null +++ b/tests/tests/syntax/elem2.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: [1]. {illegal} +d: . diff --git a/tests/tests/syntax/elem2.req b/tests/tests/syntax/elem2.req new file mode 100644 index 00000000..d28fb4fa --- /dev/null +++ b/tests/tests/syntax/elem2.req @@ -0,0 +1,12 @@ +a: b, c. +b: c, d. +c: [1]. {illegal} +d: . +# +# + +**** ", ', #, or letter expected + 3 c: [1]. {illegal} + ^ +**** Parsing failed at line 3: ", ', #, or letter expected +Failed diff --git a/tests/tests/syntax/elem3.inp b/tests/tests/syntax/elem3.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/elem3.ixml b/tests/tests/syntax/elem3.ixml new file mode 100644 index 00000000..1e2c0fa7 --- /dev/null +++ b/tests/tests/syntax/elem3.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: ["a"-""]. {Must be length 1} +d: . diff --git a/tests/tests/syntax/elem3.req b/tests/tests/syntax/elem3.req new file mode 100644 index 00000000..8d53802a --- /dev/null +++ b/tests/tests/syntax/elem3.req @@ -0,0 +1,16 @@ +a: b, c. +b: c, d. +c: ["a"-""]. {Must be length 1} +d: . +# +# + +**** A string must contain at least one character + 3 c: ["a"-""]. {Must be length 1} + ^ + +**** Bound of range must be a single character + 3 c: ["a"-""]. {Must be length 1} + ^ +**** Parsing failed at line 3: Bound of range must be a single character +Failed diff --git a/tests/tests/syntax/elem4.inp b/tests/tests/syntax/elem4.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/elem4.ixml b/tests/tests/syntax/elem4.ixml new file mode 100644 index 00000000..c2b2db09 --- /dev/null +++ b/tests/tests/syntax/elem4.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: ["a"-"dd"]. {Must be length 1} +d: . diff --git a/tests/tests/syntax/elem4.req b/tests/tests/syntax/elem4.req new file mode 100644 index 00000000..4ea3bdf7 --- /dev/null +++ b/tests/tests/syntax/elem4.req @@ -0,0 +1,12 @@ +a: b, c. +b: c, d. +c: ["a"-"dd"]. {Must be length 1} +d: . +# +# + +**** Bound of range must be a single character + 3 c: ["a"-"dd"]. {Must be length 1} + ^ +**** Parsing failed at line 3: Bound of range must be a single character +Failed diff --git a/tests/tests/syntax/elem5.inp b/tests/tests/syntax/elem5.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/elem5.ixml b/tests/tests/syntax/elem5.ixml new file mode 100644 index 00000000..2bbcd111 --- /dev/null +++ b/tests/tests/syntax/elem5.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: [""-"d"]. {Must be length 1} +d: . diff --git a/tests/tests/syntax/elem5.req b/tests/tests/syntax/elem5.req new file mode 100644 index 00000000..e995dd6d --- /dev/null +++ b/tests/tests/syntax/elem5.req @@ -0,0 +1,16 @@ +a: b, c. +b: c, d. +c: [""-"d"]. {Must be length 1} +d: . +# +# + +**** A string must contain at least one character + 3 c: [""-"d"]. {Must be length 1} + ^ + +**** Bound of range must be a single character + 3 c: [""-"d"]. {Must be length 1} + ^ +**** Parsing failed at line 3: Bound of range must be a single character +Failed diff --git a/tests/tests/syntax/elem6.inp b/tests/tests/syntax/elem6.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/elem6.ixml b/tests/tests/syntax/elem6.ixml new file mode 100644 index 00000000..875fc398 --- /dev/null +++ b/tests/tests/syntax/elem6.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: ["aa"-"d"]. {Must be length 1} +d: . diff --git a/tests/tests/syntax/elem6.req b/tests/tests/syntax/elem6.req new file mode 100644 index 00000000..79189e4e --- /dev/null +++ b/tests/tests/syntax/elem6.req @@ -0,0 +1,12 @@ +a: b, c. +b: c, d. +c: ["aa"-"d"]. {Must be length 1} +d: . +# +# + +**** Bound of range must be a single character + 3 c: ["aa"-"d"]. {Must be length 1} + ^ +**** Parsing failed at line 3: Bound of range must be a single character +Failed diff --git a/tests/tests/syntax/elem7.inp b/tests/tests/syntax/elem7.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/elem7.ixml b/tests/tests/syntax/elem7.ixml new file mode 100644 index 00000000..8e04f9b4 --- /dev/null +++ b/tests/tests/syntax/elem7.ixml @@ -0,0 +1,4 @@ +a: b, c. +b: c, d. +c: ["a".."d"]. {Not ..} +d: . diff --git a/tests/tests/syntax/elem7.req b/tests/tests/syntax/elem7.req new file mode 100644 index 00000000..12c22f85 --- /dev/null +++ b/tests/tests/syntax/elem7.req @@ -0,0 +1,24 @@ +a: b, c. +b: c, d. +c: ["a".."d"]. {Not ..} +d: . +# +# + +**** ;|- or ] expected. + 3 c: ["a".."d"]. {Not ..} + ^ + +**** Character "]" expected + 3 c: ["a".."d"]. {Not ..} + ^ + +**** Character "," expected + 3 c: ["a".."d"]. {Not ..} + ^ + +**** name, "string", # encoded character, [character set], or (group) expected here + 3 c: ["a".."d"]. {Not ..} + ^ +**** Parsing failed at line 3: name, "string", # encoded character, [character set], or (group) expected here +Failed diff --git a/tests/tests/syntax/empty-string.inp b/tests/tests/syntax/empty-string.inp new file mode 100644 index 00000000..1683c0f6 --- /dev/null +++ b/tests/tests/syntax/empty-string.inp @@ -0,0 +1 @@ +bd diff --git a/tests/tests/syntax/empty-string.ixml b/tests/tests/syntax/empty-string.ixml new file mode 100644 index 00000000..0f71b7b4 --- /dev/null +++ b/tests/tests/syntax/empty-string.ixml @@ -0,0 +1,4 @@ +a: b, c, d. +b: "b". +c: "" {not allowed}. +d: "d". diff --git a/tests/tests/syntax/empty-string.req b/tests/tests/syntax/empty-string.req new file mode 100644 index 00000000..dc79b1ee --- /dev/null +++ b/tests/tests/syntax/empty-string.req @@ -0,0 +1,13 @@ +a: b, c, d. +b: "b". +c: "" {not allowed}. +d: "d". +# +bd +# + +**** A string must contain at least one character + 3 c: "" {not allowed}. + ^ +**** Parsing failed at line 3: A string must contain at least one character +Failed diff --git a/tests/tests/syntax/expr10.inp b/tests/tests/syntax/expr10.inp new file mode 100644 index 00000000..b505a739 --- /dev/null +++ b/tests/tests/syntax/expr10.inp @@ -0,0 +1 @@ +You shouldn't see this, or you forgot to supply an *.inp file diff --git a/tests/tests/syntax/expr10.ixml b/tests/tests/syntax/expr10.ixml new file mode 100644 index 00000000..f8565ced --- /dev/null +++ b/tests/tests/syntax/expr10.ixml @@ -0,0 +1,2 @@ +expr: factor+("*"; "/"). +term: \ No newline at end of file diff --git a/tests/tests/syntax/expr10.req b/tests/tests/syntax/expr10.req new file mode 100644 index 00000000..e9cc5cda --- /dev/null +++ b/tests/tests/syntax/expr10.req @@ -0,0 +1,14 @@ +expr: factor+("*"; "/"). +term: # +You shouldn't see this, or you forgot to supply an *.inp file +# + +**** name, "string", # encoded character, [character set], or (group) expected here + 2 term: + ^ + +**** Character "." expected + 2 term: + ^ +**** Parsing failed at line 2: Character "." expected +Failed diff --git a/tests/tests/syntax/hex2.inp b/tests/tests/syntax/hex2.inp new file mode 100644 index 00000000..df43d89b --- /dev/null +++ b/tests/tests/syntax/hex2.inp @@ -0,0 +1 @@ +a#b diff --git a/tests/tests/syntax/hex2.ixml b/tests/tests/syntax/hex2.ixml new file mode 100644 index 00000000..659ed19c --- /dev/null +++ b/tests/tests/syntax/hex2.ixml @@ -0,0 +1 @@ +hex: "a", #, "b". diff --git a/tests/tests/syntax/hex2.req b/tests/tests/syntax/hex2.req new file mode 100644 index 00000000..4172f164 --- /dev/null +++ b/tests/tests/syntax/hex2.req @@ -0,0 +1,18 @@ +hex: "a", #, "b". +# +a#b +# + +**** Missing hex digits + 1 hex: "a", #, "b". + ^ + +**** Character "," expected + 1 hex: "a", #, "b". + ^ + +**** Unterminated string + 1 hex: "a", #, "b". + ^ +**** Parsing failed at line 1: Unterminated string +Failed diff --git a/tests/tests/syntax/illegal-class.inp b/tests/tests/syntax/illegal-class.inp new file mode 100644 index 00000000..68960264 --- /dev/null +++ b/tests/tests/syntax/illegal-class.inp @@ -0,0 +1 @@ +Dummy input diff --git a/tests/tests/syntax/illegal-class.ixml b/tests/tests/syntax/illegal-class.ixml new file mode 100644 index 00000000..531844d8 --- /dev/null +++ b/tests/tests/syntax/illegal-class.ixml @@ -0,0 +1,2 @@ +a: class. +class: [Xx]. {Non-existent class} diff --git a/tests/tests/syntax/illegal-class.req b/tests/tests/syntax/illegal-class.req new file mode 100644 index 00000000..80540004 --- /dev/null +++ b/tests/tests/syntax/illegal-class.req @@ -0,0 +1,11 @@ +a: class. +class: [Xx]. {Non-existent class} +# +Dummy input +# + +**** "Xx" is not a valid class name + 2 class: [Xx]. {Non-existent class} + ^ +**** Parsing failed at line 2: "Xx" is not a valid class name +Failed diff --git a/tests/tests/syntax/name-with-spaces.inp b/tests/tests/syntax/name-with-spaces.inp new file mode 100644 index 00000000..b505a739 --- /dev/null +++ b/tests/tests/syntax/name-with-spaces.inp @@ -0,0 +1 @@ +You shouldn't see this, or you forgot to supply an *.inp file diff --git a/tests/tests/syntax/name-with-spaces.ixml b/tests/tests/syntax/name-with-spaces.ixml new file mode 100644 index 00000000..1d13f166 --- /dev/null +++ b/tests/tests/syntax/name-with-spaces.ixml @@ -0,0 +1,3 @@ +a b: b c. {No spaces in names} +b: . +c: . diff --git a/tests/tests/syntax/name-with-spaces.req b/tests/tests/syntax/name-with-spaces.req new file mode 100644 index 00000000..60ea5c4f --- /dev/null +++ b/tests/tests/syntax/name-with-spaces.req @@ -0,0 +1,32 @@ +a b: b c. {No spaces in names} +b: . +c: . +# +You shouldn't see this, or you forgot to supply an *.inp file +# + +**** One of [:=] expected + 1 a b: b c. {No spaces in names} + ^ + +**** Character "," expected + 1 a b: b c. {No spaces in names} + ^ + +**** Character "," expected + 2 b: . + ^ + +**** Character "," expected + 3 c: . + ^ + +**** name, "string", # encoded character, [character set], or (group) expected here + 3 c: . + ^ + +**** Character "." expected + 3 c: . + ^ +**** Parsing failed at line 3: Character "." expected +Failed diff --git a/tests/tests/syntax/rule.inp b/tests/tests/syntax/rule.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/rule.ixml b/tests/tests/syntax/rule.ixml new file mode 100644 index 00000000..07dd6a10 --- /dev/null +++ b/tests/tests/syntax/rule.ixml @@ -0,0 +1,3 @@ +a: b, c. +b . {missing colon} +c: . diff --git a/tests/tests/syntax/rule.req b/tests/tests/syntax/rule.req new file mode 100644 index 00000000..b6e8b0fb --- /dev/null +++ b/tests/tests/syntax/rule.req @@ -0,0 +1,15 @@ +a: b, c. +b . {missing colon} +c: . +# +# + +**** One of [:=] expected + 2 b . {missing colon} + ^ + +**** name, "string", # encoded character, [character set], or (group) expected here + 3 c: . + ^ +**** Parsing failed at line 3: name, "string", # encoded character, [character set], or (group) expected here +Failed diff --git a/tests/tests/syntax/rule1.inp b/tests/tests/syntax/rule1.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/rule1.ixml b/tests/tests/syntax/rule1.ixml new file mode 100644 index 00000000..167e8a1f --- /dev/null +++ b/tests/tests/syntax/rule1.ixml @@ -0,0 +1,3 @@ +a: b, c. +b: b. c. {extra .} +c: . diff --git a/tests/tests/syntax/rule1.req b/tests/tests/syntax/rule1.req new file mode 100644 index 00000000..61e21491 --- /dev/null +++ b/tests/tests/syntax/rule1.req @@ -0,0 +1,15 @@ +a: b, c. +b: b. c. {extra .} +c: . +# +# + +**** One of [:=] expected + 2 b: b. c. {extra .} + ^ + +**** name, "string", # encoded character, [character set], or (group) expected here + 3 c: . + ^ +**** Parsing failed at line 3: name, "string", # encoded character, [character set], or (group) expected here +Failed diff --git a/tests/tests/syntax/rule10.inp b/tests/tests/syntax/rule10.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/rule10.ixml b/tests/tests/syntax/rule10.ixml new file mode 100644 index 00000000..e2f5c847 --- /dev/null +++ b/tests/tests/syntax/rule10.ixml @@ -0,0 +1,2 @@ +a: "(" num ")". {missing commas} +num: "1". diff --git a/tests/tests/syntax/rule10.req b/tests/tests/syntax/rule10.req new file mode 100644 index 00000000..1f05937f --- /dev/null +++ b/tests/tests/syntax/rule10.req @@ -0,0 +1,18 @@ +a: "(" num ")". {missing commas} +num: "1". +# +# + +**** Character "," expected + 1 a: "(" num ")". {missing commas} + ^ + +**** Character "," expected + 1 a: "(" num ")". {missing commas} + ^ + +**** Unterminated string + 1 a: "(" num ")". {missing commas} + ^ +**** Parsing failed at line 1: Unterminated string +Failed diff --git a/tests/tests/syntax/rule2.inp b/tests/tests/syntax/rule2.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/rule2.ixml b/tests/tests/syntax/rule2.ixml new file mode 100644 index 00000000..584c135f --- /dev/null +++ b/tests/tests/syntax/rule2.ixml @@ -0,0 +1,4 @@ +a: b, c. +a: b, c. {double defined} +b: . +c: . diff --git a/tests/tests/syntax/rule2.req b/tests/tests/syntax/rule2.req new file mode 100644 index 00000000..ba561c1a --- /dev/null +++ b/tests/tests/syntax/rule2.req @@ -0,0 +1,12 @@ +a: b, c. +a: b, c. {double defined} +b: . +c: . +# +# + +**** a has already been defined + 2 a: b, c. {double defined} + ^ +**** Parsing failed at line 2: a has already been defined +Failed diff --git a/tests/tests/syntax/rule3.inp b/tests/tests/syntax/rule3.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/rule3.ixml b/tests/tests/syntax/rule3.ixml new file mode 100644 index 00000000..a7d62838 --- /dev/null +++ b/tests/tests/syntax/rule3.ixml @@ -0,0 +1,3 @@ +a: b, c. +b: b, c, . {spurious comma} +c: ".". diff --git a/tests/tests/syntax/rule3.req b/tests/tests/syntax/rule3.req new file mode 100644 index 00000000..ed98a686 --- /dev/null +++ b/tests/tests/syntax/rule3.req @@ -0,0 +1,15 @@ +a: b, c. +b: b, c, . {spurious comma} +c: ".". +# +# + +**** name, "string", # encoded character, [character set], or (group) expected here + 2 b: b, c, . {spurious comma} + ^ + +**** Character "," expected + 3 c: ".". + ^ +**** Parsing failed at line 3: Character "," expected +Failed diff --git a/tests/tests/syntax/rule4.inp b/tests/tests/syntax/rule4.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/rule4.ixml b/tests/tests/syntax/rule4.ixml new file mode 100644 index 00000000..6fc7a45b --- /dev/null +++ b/tests/tests/syntax/rule4.ixml @@ -0,0 +1,3 @@ +a: b, c. +b: b, c . +c: ".") {Rule ends wrong} diff --git a/tests/tests/syntax/rule4.req b/tests/tests/syntax/rule4.req new file mode 100644 index 00000000..4a742799 --- /dev/null +++ b/tests/tests/syntax/rule4.req @@ -0,0 +1,11 @@ +a: b, c. +b: b, c . +c: ".") {Rule ends wrong} +# +# + +**** Character "." expected + 3 c: ".") {Rule ends wrong} + ^ +**** Parsing failed at line 3: Character "." expected +Failed diff --git a/tests/tests/syntax/rule5.inp b/tests/tests/syntax/rule5.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/rule5.ixml b/tests/tests/syntax/rule5.ixml new file mode 100644 index 00000000..f5e0f315 --- /dev/null +++ b/tests/tests/syntax/rule5.ixml @@ -0,0 +1,3 @@ +a: b, c. +$b: b, c. {illegal name} +c: ".". diff --git a/tests/tests/syntax/rule5.req b/tests/tests/syntax/rule5.req new file mode 100644 index 00000000..ef557746 --- /dev/null +++ b/tests/tests/syntax/rule5.req @@ -0,0 +1,15 @@ +a: b, c. +$b: b, c. {illegal name} +c: ".". +# +# + +**** Rule name expected + 2 $b: b, c. {illegal name} + ^ + +**** One of [:=] expected + 2 $b: b, c. {illegal name} + ^ +**** Parsing failed at line 2: One of [:=] expected +Failed diff --git a/tests/tests/syntax/rule6.inp b/tests/tests/syntax/rule6.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/rule6.ixml b/tests/tests/syntax/rule6.ixml new file mode 100644 index 00000000..2125a456 --- /dev/null +++ b/tests/tests/syntax/rule6.ixml @@ -0,0 +1,3 @@ +a: b, c. +b:: b, c. {double colon} +c: ".". diff --git a/tests/tests/syntax/rule6.req b/tests/tests/syntax/rule6.req new file mode 100644 index 00000000..42e90879 --- /dev/null +++ b/tests/tests/syntax/rule6.req @@ -0,0 +1,15 @@ +a: b, c. +b:: b, c. {double colon} +c: ".". +# +# + +**** name, "string", # encoded character, [character set], or (group) expected here + 2 b:: b, c. {double colon} + ^ + +**** Character "," expected + 2 b:: b, c. {double colon} + ^ +**** Parsing failed at line 2: Character "," expected +Failed diff --git a/tests/tests/syntax/rule7.inp b/tests/tests/syntax/rule7.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/rule7.ixml b/tests/tests/syntax/rule7.ixml new file mode 100644 index 00000000..818e291f --- /dev/null +++ b/tests/tests/syntax/rule7.ixml @@ -0,0 +1,3 @@ +a: b, c. +^^b: b, c. {double marker} +c: ".". diff --git a/tests/tests/syntax/rule7.req b/tests/tests/syntax/rule7.req new file mode 100644 index 00000000..97d08add --- /dev/null +++ b/tests/tests/syntax/rule7.req @@ -0,0 +1,15 @@ +a: b, c. +^^b: b, c. {double marker} +c: ".". +# +# + +**** Rule name expected + 2 ^^b: b, c. {double marker} + ^ + +**** One of [:=] expected + 2 ^^b: b, c. {double marker} + ^ +**** Parsing failed at line 2: One of [:=] expected +Failed diff --git a/tests/tests/syntax/rule8.inp b/tests/tests/syntax/rule8.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/rule8.ixml b/tests/tests/syntax/rule8.ixml new file mode 100644 index 00000000..2a71ac67 --- /dev/null +++ b/tests/tests/syntax/rule8.ixml @@ -0,0 +1 @@ +a: "", "" diff --git a/tests/tests/syntax/rule8.req b/tests/tests/syntax/rule8.req new file mode 100644 index 00000000..4a21f011 --- /dev/null +++ b/tests/tests/syntax/rule8.req @@ -0,0 +1,17 @@ +a: "", "" +# +# + +**** A string must contain at least one character + 1 a: "", "" + ^ + +**** A string must contain at least one character + 1 a: "", "" + ^ + +**** Character "." expected + 1 a: "", "" + ^ +**** Parsing failed at line 1: Character "." expected +Failed diff --git a/tests/tests/syntax/rule9.inp b/tests/tests/syntax/rule9.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/rule9.ixml b/tests/tests/syntax/rule9.ixml new file mode 100644 index 00000000..2592128b --- /dev/null +++ b/tests/tests/syntax/rule9.ixml @@ -0,0 +1,4 @@ +a: 1, b, c. {illegal terminal} +b: . +c: . + diff --git a/tests/tests/syntax/rule9.req b/tests/tests/syntax/rule9.req new file mode 100644 index 00000000..c805b9bb --- /dev/null +++ b/tests/tests/syntax/rule9.req @@ -0,0 +1,12 @@ +a: 1, b, c. {illegal terminal} +b: . +c: . + +# +# + +**** name, "string", # encoded character, [character set], or (group) expected here + 1 a: 1, b, c. {illegal terminal} + ^ +**** Parsing failed at line 1: name, "string", # encoded character, [character set], or (group) expected here +Failed diff --git a/tests/tests/syntax/unterminated-comment.inp b/tests/tests/syntax/unterminated-comment.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/unterminated-comment.ixml b/tests/tests/syntax/unterminated-comment.ixml new file mode 100644 index 00000000..1c434245 --- /dev/null +++ b/tests/tests/syntax/unterminated-comment.ixml @@ -0,0 +1,3 @@ +a: b. {This is an unterminated comment +b: c. +c: . diff --git a/tests/tests/syntax/unterminated-comment.req b/tests/tests/syntax/unterminated-comment.req new file mode 100644 index 00000000..473fea16 --- /dev/null +++ b/tests/tests/syntax/unterminated-comment.req @@ -0,0 +1,11 @@ +a: b. {This is an unterminated comment +b: c. +c: . +# +# + +**** Unterminated comment at line 1 + 3 c: . + ^ +**** Parsing failed at line 3: Unterminated comment at line 1 +Failed diff --git a/tests/tests/syntax/unterminated-comment1.inp b/tests/tests/syntax/unterminated-comment1.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/unterminated-comment1.ixml b/tests/tests/syntax/unterminated-comment1.ixml new file mode 100644 index 00000000..e2f881c0 --- /dev/null +++ b/tests/tests/syntax/unterminated-comment1.ixml @@ -0,0 +1,4 @@ +a: b. {This is an unterminated comment +{with a nested comment} +b: c. +c: . diff --git a/tests/tests/syntax/unterminated-comment1.req b/tests/tests/syntax/unterminated-comment1.req new file mode 100644 index 00000000..13d536c6 --- /dev/null +++ b/tests/tests/syntax/unterminated-comment1.req @@ -0,0 +1,12 @@ +a: b. {This is an unterminated comment +{with a nested comment} +b: c. +c: . +# +# + +**** Unterminated comment at line 1 + 4 c: . + ^ +**** Parsing failed at line 4: Unterminated comment at line 1 +Failed diff --git a/tests/tests/syntax/unterminated-comment2.inp b/tests/tests/syntax/unterminated-comment2.inp new file mode 100644 index 00000000..e69de29b diff --git a/tests/tests/syntax/unterminated-comment2.ixml b/tests/tests/syntax/unterminated-comment2.ixml new file mode 100644 index 00000000..9e3db3b1 --- /dev/null +++ b/tests/tests/syntax/unterminated-comment2.ixml @@ -0,0 +1,5 @@ +a: b. {This is an unterminated comment + +b: c. +{with a nested unterminated comment +c: . diff --git a/tests/tests/syntax/unterminated-comment2.req b/tests/tests/syntax/unterminated-comment2.req new file mode 100644 index 00000000..75d3ae19 --- /dev/null +++ b/tests/tests/syntax/unterminated-comment2.req @@ -0,0 +1,17 @@ +a: b. {This is an unterminated comment + +b: c. +{with a nested unterminated comment +c: . +# +# + +**** Unterminated comment at line 4 + 5 c: . + ^ + +**** Unterminated comment at line 1 + 5 c: . + ^ +**** Parsing failed at line 5: Unterminated comment at line 1 +Failed diff --git a/tests/tools/href-check.xsl b/tests/tools/href-check.xsl new file mode 100644 index 00000000..fe9be99b --- /dev/null +++ b/tests/tools/href-check.xsl @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + {@href}{$NL} + + + + + + + Missing test-set-ref: {resolve-uri(@href, base-uri(.))}{$NL} + + + + + + + {@href}{$NL} + + + Missing {local-name(.)}: {resolve-uri(@href, base-uri(.))}{$NL} + + + + + + {@href}{$NL} + + + Missing {local-name(.)}: {resolve-uri(@href, base-uri(.))}{$NL} + + + + + + + + + + From b98c1b8401b9e0dc606ad3bf81bf27d8c630c1d2 Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Sat, 5 Feb 2022 10:05:05 +0000 Subject: [PATCH 085/152] Fix typo in correct output --- tests/correct/json.output.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/correct/json.output.xml b/tests/correct/json.output.xml index 1fc79774..923b9fe8 100644 --- a/tests/correct/json.output.xml +++ b/tests/correct/json.output.xml @@ -87,8 +87,7 @@ >,:\u - f\uffff Date: Sat, 5 Feb 2022 10:05:21 +0000 Subject: [PATCH 086/152] Add the other alternative as a successful parse --- tests/ambiguous/date.alt.output.xml | 14 ++++++++++++++ tests/ambiguous/test-catalog.xml | 5 +++++ 2 files changed, 19 insertions(+) create mode 100644 tests/ambiguous/date.alt.output.xml diff --git a/tests/ambiguous/date.alt.output.xml b/tests/ambiguous/date.alt.output.xml new file mode 100644 index 00000000..bb8df532 --- /dev/null +++ b/tests/ambiguous/date.alt.output.xml @@ -0,0 +1,14 @@ + + +The conference starts Thursday, 9th Feb 2017 at 10:00. diff --git a/tests/ambiguous/test-catalog.xml b/tests/ambiguous/test-catalog.xml index c74edcad..3a895b06 100644 --- a/tests/ambiguous/test-catalog.xml +++ b/tests/ambiguous/test-catalog.xml @@ -204,9 +204,14 @@ by="MSM" on="2022-01-01" change="stripped non-significant whitespace from result"/> + + From c2f77fa24309cbda5cb3048ffb0f4526700f0b2f Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Sat, 5 Feb 2022 10:49:30 +0000 Subject: [PATCH 087/152] Remove duplication across catalogs --- .../syntax/catalog-as-instance-tests-ixml.xml | 452 +----------------- .../syntax/catalog-as-instance-tests-xml.xml | 278 +---------- 2 files changed, 2 insertions(+), 728 deletions(-) diff --git a/tests/syntax/catalog-as-instance-tests-ixml.xml b/tests/syntax/catalog-as-instance-tests-ixml.xml index 50424a3d..876c7d15 100644 --- a/tests/syntax/catalog-as-instance-tests-ixml.xml +++ b/tests/syntax/catalog-as-instance-tests-ixml.xml @@ -16,7 +16,7 @@ tests as instance tests.

- + @@ -186,455 +186,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/syntax/catalog-as-instance-tests-xml.xml b/tests/syntax/catalog-as-instance-tests-xml.xml index b1d20f70..f5854d41 100644 --- a/tests/syntax/catalog-as-instance-tests-xml.xml +++ b/tests/syntax/catalog-as-instance-tests-xml.xml @@ -16,7 +16,7 @@ tests as instance tests.

- + @@ -189,280 +189,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From b64497edc52fbc59d8720ceca40b214f7711455b Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Sat, 5 Feb 2022 10:54:58 +0000 Subject: [PATCH 088/152] Removed syntactically valid tests from the 'invalid syntactically' test suites --- .../syntax/catalog-as-instance-tests-ixml.xml | 22 ------------------- .../syntax/catalog-as-instance-tests-xml.xml | 22 ------------------- 2 files changed, 44 deletions(-) diff --git a/tests/syntax/catalog-as-instance-tests-ixml.xml b/tests/syntax/catalog-as-instance-tests-ixml.xml index 876c7d15..e72a3a45 100644 --- a/tests/syntax/catalog-as-instance-tests-ixml.xml +++ b/tests/syntax/catalog-as-instance-tests-ixml.xml @@ -66,10 +66,6 @@ - - - - @@ -110,11 +106,6 @@ - - - - - @@ -128,10 +119,6 @@ - - - - @@ -177,14 +164,5 @@ - - - - - - - - - diff --git a/tests/syntax/catalog-as-instance-tests-xml.xml b/tests/syntax/catalog-as-instance-tests-xml.xml index f5854d41..43e94b03 100644 --- a/tests/syntax/catalog-as-instance-tests-xml.xml +++ b/tests/syntax/catalog-as-instance-tests-xml.xml @@ -67,10 +67,6 @@ - - - - @@ -111,11 +107,6 @@ - - - - - @@ -129,10 +120,6 @@ - - - - @@ -179,14 +166,5 @@ - - - - - - - - -
From f7d4d9c3ec86a17f0704a6c327a50eeb27ab1536 Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Sat, 5 Feb 2022 12:30:01 +0000 Subject: [PATCH 089/152] Fixed expected output; added alternate output --- tests/ambiguous/lf2.alt.output.xml | 10 ++++++++++ tests/ambiguous/lf2.output.xml | 13 +++++-------- tests/ambiguous/test-catalog.xml | 4 +++- 3 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 tests/ambiguous/lf2.alt.output.xml diff --git a/tests/ambiguous/lf2.alt.output.xml b/tests/ambiguous/lf2.alt.output.xml new file mode 100644 index 00000000..404521ac --- /dev/null +++ b/tests/ambiguous/lf2.alt.output.xml @@ -0,0 +1,10 @@ + +Now is the timeFor all good peopleTo have fun. diff --git a/tests/ambiguous/lf2.output.xml b/tests/ambiguous/lf2.output.xml index 2859893d..ab42c864 100644 --- a/tests/ambiguous/lf2.output.xml +++ b/tests/ambiguous/lf2.output.xml @@ -3,11 +3,8 @@ 1: input[1.1:]: line+lf[:3.13] lf?[:4.1] 2: input[1.1:]: line+lf[:4.1] lf?[:4.1] --> - - Now is the time - - For all good people - - To have fun. - - +Now is the timeFor all good peopleTo have fun. diff --git a/tests/ambiguous/test-catalog.xml b/tests/ambiguous/test-catalog.xml index 3a895b06..48f3bb62 100644 --- a/tests/ambiguous/test-catalog.xml +++ b/tests/ambiguous/test-catalog.xml @@ -258,10 +258,12 @@ change="Converted it into the catalog format"/> + + change="Added alternate output"/> - + From 9aab908e00e3b5419129cf4689fe9deb8c8a608c Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Sat, 5 Feb 2022 12:30:17 +0000 Subject: [PATCH 090/152] Corrected catalog markup --- tests/syntax/catalog-as-grammar-tests.xml | 312 +++++++++++----------- 1 file changed, 156 insertions(+), 156 deletions(-) diff --git a/tests/syntax/catalog-as-grammar-tests.xml b/tests/syntax/catalog-as-grammar-tests.xml index b50c39a9..39bc4421 100644 --- a/tests/syntax/catalog-as-grammar-tests.xml +++ b/tests/syntax/catalog-as-grammar-tests.xml @@ -16,318 +16,318 @@ the ixml grammar built into the processor.

- + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - + From 5591df8d31ca90f79ac1eceeef9e6b876679f27d Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Sat, 5 Feb 2022 12:43:10 +0000 Subject: [PATCH 091/152] Remove duplicated tests --- tests/tests/ambiguous/ambig.inp | 2 - tests/tests/ambiguous/ambig.ixml | 3 - tests/tests/ambiguous/ambig.req | 22 - tests/tests/ambiguous/ambig2.inp | 0 tests/tests/ambiguous/ambig2.ixml | 1 - tests/tests/ambiguous/ambig2.req | 10 - tests/tests/ambiguous/ambig2a.inp | 0 tests/tests/ambiguous/ambig2a.ixml | 3 - tests/tests/ambiguous/ambig2a.req | 12 - tests/tests/ambiguous/ambig3.inp | 1 - tests/tests/ambiguous/ambig3.ixml | 3 - tests/tests/ambiguous/ambig3.req | 19 - tests/tests/ambiguous/ambig4.inp | 2 - tests/tests/ambiguous/ambig4.ixml | 5 - tests/tests/ambiguous/ambig4.req | 27 - tests/tests/ambiguous/ambig5.inp | 1 - tests/tests/ambiguous/ambig5.ixml | 3 - tests/tests/ambiguous/ambig5.req | 20 - tests/tests/ambiguous/ambig6.inp | 1 - tests/tests/ambiguous/ambig6.ixml | 4 - tests/tests/ambiguous/ambig6.req | 14 - tests/tests/ambiguous/ambig7.inp | 1 - tests/tests/ambiguous/ambig7.ixml | 3 - tests/tests/ambiguous/ambig7.req | 16 - tests/tests/ambiguous/css.inp | 2 - tests/tests/ambiguous/css.ixml | 12 - tests/tests/ambiguous/css.req | 47 - tests/tests/ambiguous/date.inp | 1 - tests/tests/ambiguous/date.ixml | 38 - tests/tests/ambiguous/date.req | 58 - tests/tests/ambiguous/empty-parens.inp | 0 tests/tests/ambiguous/empty-parens.ixml | 1 - tests/tests/ambiguous/empty-parens.req | 10 - tests/tests/ambiguous/expr0.inp | 1 - tests/tests/ambiguous/expr0.ixml | 14 - tests/tests/ambiguous/expr0.req | 38 - tests/tests/ambiguous/lf2.inp | 3 - tests/tests/ambiguous/lf2.ixml | 3 - tests/tests/ambiguous/lf2.req | 22 - tests/tests/correct/a.ixml-fail | 1 - tests/tests/correct/address.inp | 4 - tests/tests/correct/address.ixml | 22 - tests/tests/correct/address.req | 42 - tests/tests/correct/arith.inp | 1 - tests/tests/correct/arith.ixml | 8 - tests/tests/correct/arith.req | 18 - tests/tests/correct/attribute-value.inp | 1 - tests/tests/correct/attribute-value.ixml | 2 - tests/tests/correct/attribute-value.req | 7 - tests/tests/correct/diary.inp | 9 - tests/tests/correct/diary.ixml | 15 - tests/tests/correct/diary.req | 53 - tests/tests/correct/diary2.inp | 9 - tests/tests/correct/diary2.ixml | 15 - tests/tests/correct/diary2.req | 53 - tests/tests/correct/diary3.inp | 9 - tests/tests/correct/diary3.ixml | 13 - tests/tests/correct/diary3.req | 51 - tests/tests/correct/element-content.inp | 1 - tests/tests/correct/element-content.ixml | 2 - tests/tests/correct/element-content.req | 7 - tests/tests/correct/email.inp | 1 - tests/tests/correct/email.ixml | 8 - tests/tests/correct/email.req | 13 - tests/tests/correct/empty-group.inp | 1 - tests/tests/correct/empty-group.ixml | 3 - tests/tests/correct/empty-group.req | 10 - tests/tests/correct/expr.inp | 1 - tests/tests/correct/expr.ixml | 15 - tests/tests/correct/expr.req | 30 - tests/tests/correct/expr1.inp | 2 - tests/tests/correct/expr1.ixml | 13 - tests/tests/correct/expr1.req | 37 - tests/tests/correct/expr2.inp | 1 - tests/tests/correct/expr2.ixml | 10 - tests/tests/correct/expr2.req | 26 - tests/tests/correct/expr3.inp | 2 - tests/tests/correct/expr3.ixml | 11 - tests/tests/correct/expr3.req | 28 - tests/tests/correct/expr4.inp | 1 - tests/tests/correct/expr4.ixml | 8 - tests/tests/correct/expr4.req | 23 - tests/tests/correct/expr5.inp | 1 - tests/tests/correct/expr5.ixml | 14 - tests/tests/correct/expr5.req | 23 - tests/tests/correct/expr6.inp | 1 - tests/tests/correct/expr6.ixml | 15 - tests/tests/correct/expr6.req | 35 - tests/tests/correct/hash.inp | 2 - tests/tests/correct/hash.ixml | 5 - tests/tests/correct/hash.req | 18 - tests/tests/correct/hex.inp | 1 - tests/tests/correct/hex.ixml | 1 - tests/tests/correct/hex.req | 6 - tests/tests/correct/hex1.inp | 1 - tests/tests/correct/hex1.ixml | 1 - tests/tests/correct/hex1.req | 6 - tests/tests/correct/hex3.inp | 1 - tests/tests/correct/hex3.ixml | 1 - tests/tests/correct/hex3.req | 6 - tests/tests/correct/json.inp | 18 - tests/tests/correct/json.ixml | 29 - tests/tests/correct/json.req | 159 -- tests/tests/correct/json1.inp | 1 - tests/tests/correct/json1.ixml | 19 - tests/tests/correct/json1.req | 32 - tests/tests/correct/lf.inp | 3 - tests/tests/correct/lf.ixml | 3 - tests/tests/correct/lf.req | 15 - tests/tests/correct/lf.res | 17 - tests/tests/correct/lf1.inp | 3 - tests/tests/correct/lf1.ixml | 3 - tests/tests/correct/lf1.req | 18 - tests/tests/correct/marked.inp | 1 - tests/tests/correct/marked.ixml | 3 - tests/tests/correct/marked.req | 8 - tests/tests/correct/nested-comment.inp | 1 - tests/tests/correct/nested-comment.ixml | 6 - tests/tests/correct/nested-comment.req | 14 - tests/tests/correct/para-test.inp | 9 - tests/tests/correct/para-test.ixml | 4 - tests/tests/correct/para-test.req | 31 - tests/tests/correct/para-test.res | 31 - tests/tests/correct/poly.inp | 2 - tests/tests/correct/poly.ixml | 9 - tests/tests/correct/poly.req | 19 - tests/tests/correct/program.inp | 1 - tests/tests/correct/program.ixml | 17 - tests/tests/correct/program.req | 45 - tests/tests/correct/range-comments.inp | 1 - tests/tests/correct/range-comments.ixml | 2 - tests/tests/correct/range-comments.req | 12 - tests/tests/correct/range.inp | 1 - tests/tests/correct/range.ixml | 3 - tests/tests/correct/range.req | 11 - tests/tests/correct/ranges.inp | 1 - tests/tests/correct/ranges.ixml | 15 - tests/tests/correct/ranges.req | 27 - tests/tests/correct/ranges1.inp | 1 - tests/tests/correct/ranges1.ixml | 20 - tests/tests/correct/ranges1.req | 32 - tests/tests/correct/string.inp | 1 - tests/tests/correct/string.ixml | 5 - tests/tests/correct/string.req | 14 - tests/tests/correct/tab.inp | 1 - tests/tests/correct/tab.ixml | 3 - tests/tests/correct/tab.req | 10 - tests/tests/correct/test.inp | 2 - tests/tests/correct/test.ixml | 4 - tests/tests/correct/test.req | 13 - tests/tests/correct/unicode-range.inp | 1 - tests/tests/correct/unicode-range.ixml | 1 - tests/tests/correct/unicode-range.req | 5 - tests/tests/correct/unicode-range.res | 14 - tests/tests/correct/unicode-range1.inp | 1 - tests/tests/correct/unicode-range1.ixml | 1 - tests/tests/correct/unicode-range1.req | 5 - tests/tests/correct/unicode-range1.res | 10 - tests/tests/correct/unicode-range2.inp | 1 - tests/tests/correct/unicode-range2.ixml | 1 - tests/tests/correct/unicode-range2.req | 6 - tests/tests/correct/vcard.inp | 10 - tests/tests/correct/vcard.ixml | 11 - tests/tests/correct/vcard.req | 69 - tests/tests/correct/xml.inp | 4 - tests/tests/correct/xml.ixml | 11 - tests/tests/correct/xml.req | 30 - tests/tests/correct/xml1.inp | 4 - tests/tests/correct/xml1.ixml | 10 - tests/tests/correct/xml1.req | 29 - tests/tests/correct/xpath.inp | 2 - tests/tests/correct/xpath.ixml | 260 ---- tests/tests/correct/xpath.req | 314 ---- tests/tests/ixml/bnf.inp | 24 - tests/tests/ixml/bnf.ixml | 26 - tests/tests/ixml/bnf.req | 345 ----- tests/tests/ixml/ixml-comments.inp | 60 - tests/tests/ixml/ixml-comments.ixml | 60 - tests/tests/ixml/ixml-comments.out | 1342 ----------------- tests/tests/ixml/ixml-comments.req | 1342 ----------------- tests/tests/ixml/ixml-comments.res | 1342 ----------------- tests/tests/ixml/ixml-no-spaces.inp | 60 - tests/tests/ixml/ixml-no-spaces.ixml | 60 - tests/tests/ixml/ixml-no-spaces.req | 530 ------- tests/tests/ixml/ixml-one-line.inp | 1 - tests/tests/ixml/ixml-one-line.ixml | 1 - tests/tests/ixml/ixml-one-line.req | 499 ------ tests/tests/ixml/ixml-one-line.res | 15 - tests/tests/ixml/ixml-spaces.inp | 60 - tests/tests/ixml/ixml-spaces.ixml | 60 - tests/tests/ixml/ixml-spaces.req | 530 ------- tests/tests/ixml/ixml.inp | 67 - tests/tests/ixml/ixml.ixml | 67 - tests/tests/ixml/ixml.req | 632 -------- tests/tests/ixml/ixml1.inp | 45 - tests/tests/ixml/ixml1.ixml | 45 - tests/tests/ixml/ixml1.req | 572 ------- tests/tests/ixml/ixml2.inp | 60 - tests/tests/ixml/ixml2.ixml | 60 - tests/tests/ixml/ixml2.req | 477 ------ tests/tests/ixml/ixml3.inp | 61 - tests/tests/ixml/ixml3.ixml | 61 - tests/tests/ixml/ixml3.req | 483 ------ tests/tests/parse/elem1.inp | 1 - tests/tests/parse/elem1.ixml | 4 - tests/tests/parse/elem1.req | 20 - tests/tests/parse/parse-error.inp | 1 - tests/tests/parse/parse-error.ixml | 2 - tests/tests/parse/parse-error.req | 18 - tests/tests/parse/url.inp | 1 - tests/tests/parse/url.ixml | 12 - tests/tests/parse/url.req | 28 - tests/tests/parse/url1.inp | 1 - tests/tests/parse/url1.ixml | 11 - tests/tests/parse/url1.req | 25 - tests/tests/semantic/unused-rule.inp | 0 tests/tests/semantic/unused-rule.ixml | 6 - tests/tests/semantic/unused-rule.req | 17 - tests/tests/semantic/unused-rules.inp | 0 tests/tests/semantic/unused-rules.ixml | 7 - tests/tests/semantic/unused-rules.req | 18 - tests/tests/syntax/MISSING.inp | 1 - tests/tests/syntax/class-range.inp | 1 - tests/tests/syntax/class-range.ixml | 2 - tests/tests/syntax/class-range.req | 15 - tests/tests/syntax/defn1.inp | 0 tests/tests/syntax/defn1.ixml | 4 - tests/tests/syntax/defn1.req | 12 - tests/tests/syntax/defn10.inp | 0 tests/tests/syntax/defn10.ixml | 4 - tests/tests/syntax/defn10.req | 12 - tests/tests/syntax/defn11.inp | 0 tests/tests/syntax/defn11.ixml | 4 - tests/tests/syntax/defn11.req | 12 - tests/tests/syntax/defn2.inp | 0 tests/tests/syntax/defn2.ixml | 4 - tests/tests/syntax/defn2.req | 12 - tests/tests/syntax/defn3.inp | 0 tests/tests/syntax/defn3.ixml | 4 - tests/tests/syntax/defn3.req | 16 - tests/tests/syntax/defn3.rq | 14 - tests/tests/syntax/defn4.inp | 0 tests/tests/syntax/defn4.ixml | 4 - tests/tests/syntax/defn4.req | 16 - tests/tests/syntax/defn5.inp | 0 tests/tests/syntax/defn5.ixml | 4 - tests/tests/syntax/defn5.req | 12 - tests/tests/syntax/defn6.inp | 0 tests/tests/syntax/defn6.ixml | 4 - tests/tests/syntax/defn6.req | 12 - tests/tests/syntax/defn8.inp | 0 tests/tests/syntax/defn8.ixml | 4 - tests/tests/syntax/defn8.req | 12 - tests/tests/syntax/defn9.inp | 0 tests/tests/syntax/defn9.ixml | 4 - tests/tests/syntax/defn9.req | 16 - tests/tests/syntax/elem2.inp | 0 tests/tests/syntax/elem2.ixml | 4 - tests/tests/syntax/elem2.req | 12 - tests/tests/syntax/elem3.inp | 0 tests/tests/syntax/elem3.ixml | 4 - tests/tests/syntax/elem3.req | 16 - tests/tests/syntax/elem4.inp | 0 tests/tests/syntax/elem4.ixml | 4 - tests/tests/syntax/elem4.req | 12 - tests/tests/syntax/elem5.inp | 0 tests/tests/syntax/elem5.ixml | 4 - tests/tests/syntax/elem5.req | 16 - tests/tests/syntax/elem6.inp | 0 tests/tests/syntax/elem6.ixml | 4 - tests/tests/syntax/elem6.req | 12 - tests/tests/syntax/elem7.inp | 0 tests/tests/syntax/elem7.ixml | 4 - tests/tests/syntax/elem7.req | 24 - tests/tests/syntax/empty-string.inp | 1 - tests/tests/syntax/empty-string.ixml | 4 - tests/tests/syntax/empty-string.req | 13 - tests/tests/syntax/expr10.inp | 1 - tests/tests/syntax/expr10.ixml | 2 - tests/tests/syntax/expr10.req | 14 - tests/tests/syntax/hex2.inp | 1 - tests/tests/syntax/hex2.ixml | 1 - tests/tests/syntax/hex2.req | 18 - tests/tests/syntax/illegal-class.inp | 1 - tests/tests/syntax/illegal-class.ixml | 2 - tests/tests/syntax/illegal-class.req | 11 - tests/tests/syntax/name-with-spaces.inp | 1 - tests/tests/syntax/name-with-spaces.ixml | 3 - tests/tests/syntax/name-with-spaces.req | 32 - tests/tests/syntax/rule.inp | 0 tests/tests/syntax/rule.ixml | 3 - tests/tests/syntax/rule.req | 15 - tests/tests/syntax/rule1.inp | 0 tests/tests/syntax/rule1.ixml | 3 - tests/tests/syntax/rule1.req | 15 - tests/tests/syntax/rule10.inp | 0 tests/tests/syntax/rule10.ixml | 2 - tests/tests/syntax/rule10.req | 18 - tests/tests/syntax/rule2.inp | 0 tests/tests/syntax/rule2.ixml | 4 - tests/tests/syntax/rule2.req | 12 - tests/tests/syntax/rule3.inp | 0 tests/tests/syntax/rule3.ixml | 3 - tests/tests/syntax/rule3.req | 15 - tests/tests/syntax/rule4.inp | 0 tests/tests/syntax/rule4.ixml | 3 - tests/tests/syntax/rule4.req | 11 - tests/tests/syntax/rule5.inp | 0 tests/tests/syntax/rule5.ixml | 3 - tests/tests/syntax/rule5.req | 15 - tests/tests/syntax/rule6.inp | 0 tests/tests/syntax/rule6.ixml | 3 - tests/tests/syntax/rule6.req | 15 - tests/tests/syntax/rule7.inp | 0 tests/tests/syntax/rule7.ixml | 3 - tests/tests/syntax/rule7.req | 15 - tests/tests/syntax/rule8.inp | 0 tests/tests/syntax/rule8.ixml | 1 - tests/tests/syntax/rule8.req | 17 - tests/tests/syntax/rule9.inp | 0 tests/tests/syntax/rule9.ixml | 4 - tests/tests/syntax/rule9.req | 12 - tests/tests/syntax/unterminated-comment.inp | 0 tests/tests/syntax/unterminated-comment.ixml | 3 - tests/tests/syntax/unterminated-comment.req | 11 - tests/tests/syntax/unterminated-comment1.inp | 0 tests/tests/syntax/unterminated-comment1.ixml | 4 - tests/tests/syntax/unterminated-comment1.req | 12 - tests/tests/syntax/unterminated-comment2.inp | 0 tests/tests/syntax/unterminated-comment2.ixml | 5 - tests/tests/syntax/unterminated-comment2.req | 17 - 331 files changed, 12477 deletions(-) delete mode 100644 tests/tests/ambiguous/ambig.inp delete mode 100644 tests/tests/ambiguous/ambig.ixml delete mode 100644 tests/tests/ambiguous/ambig.req delete mode 100644 tests/tests/ambiguous/ambig2.inp delete mode 100644 tests/tests/ambiguous/ambig2.ixml delete mode 100644 tests/tests/ambiguous/ambig2.req delete mode 100644 tests/tests/ambiguous/ambig2a.inp delete mode 100644 tests/tests/ambiguous/ambig2a.ixml delete mode 100644 tests/tests/ambiguous/ambig2a.req delete mode 100644 tests/tests/ambiguous/ambig3.inp delete mode 100644 tests/tests/ambiguous/ambig3.ixml delete mode 100644 tests/tests/ambiguous/ambig3.req delete mode 100644 tests/tests/ambiguous/ambig4.inp delete mode 100644 tests/tests/ambiguous/ambig4.ixml delete mode 100644 tests/tests/ambiguous/ambig4.req delete mode 100644 tests/tests/ambiguous/ambig5.inp delete mode 100644 tests/tests/ambiguous/ambig5.ixml delete mode 100644 tests/tests/ambiguous/ambig5.req delete mode 100644 tests/tests/ambiguous/ambig6.inp delete mode 100644 tests/tests/ambiguous/ambig6.ixml delete mode 100644 tests/tests/ambiguous/ambig6.req delete mode 100644 tests/tests/ambiguous/ambig7.inp delete mode 100644 tests/tests/ambiguous/ambig7.ixml delete mode 100644 tests/tests/ambiguous/ambig7.req delete mode 100644 tests/tests/ambiguous/css.inp delete mode 100644 tests/tests/ambiguous/css.ixml delete mode 100644 tests/tests/ambiguous/css.req delete mode 100644 tests/tests/ambiguous/date.inp delete mode 100644 tests/tests/ambiguous/date.ixml delete mode 100644 tests/tests/ambiguous/date.req delete mode 100644 tests/tests/ambiguous/empty-parens.inp delete mode 100644 tests/tests/ambiguous/empty-parens.ixml delete mode 100644 tests/tests/ambiguous/empty-parens.req delete mode 100644 tests/tests/ambiguous/expr0.inp delete mode 100644 tests/tests/ambiguous/expr0.ixml delete mode 100644 tests/tests/ambiguous/expr0.req delete mode 100644 tests/tests/ambiguous/lf2.inp delete mode 100644 tests/tests/ambiguous/lf2.ixml delete mode 100644 tests/tests/ambiguous/lf2.req delete mode 100644 tests/tests/correct/a.ixml-fail delete mode 100644 tests/tests/correct/address.inp delete mode 100644 tests/tests/correct/address.ixml delete mode 100644 tests/tests/correct/address.req delete mode 100644 tests/tests/correct/arith.inp delete mode 100644 tests/tests/correct/arith.ixml delete mode 100644 tests/tests/correct/arith.req delete mode 100644 tests/tests/correct/attribute-value.inp delete mode 100644 tests/tests/correct/attribute-value.ixml delete mode 100644 tests/tests/correct/attribute-value.req delete mode 100644 tests/tests/correct/diary.inp delete mode 100644 tests/tests/correct/diary.ixml delete mode 100644 tests/tests/correct/diary.req delete mode 100644 tests/tests/correct/diary2.inp delete mode 100644 tests/tests/correct/diary2.ixml delete mode 100644 tests/tests/correct/diary2.req delete mode 100644 tests/tests/correct/diary3.inp delete mode 100644 tests/tests/correct/diary3.ixml delete mode 100644 tests/tests/correct/diary3.req delete mode 100644 tests/tests/correct/element-content.inp delete mode 100644 tests/tests/correct/element-content.ixml delete mode 100644 tests/tests/correct/element-content.req delete mode 100644 tests/tests/correct/email.inp delete mode 100644 tests/tests/correct/email.ixml delete mode 100644 tests/tests/correct/email.req delete mode 100644 tests/tests/correct/empty-group.inp delete mode 100644 tests/tests/correct/empty-group.ixml delete mode 100644 tests/tests/correct/empty-group.req delete mode 100644 tests/tests/correct/expr.inp delete mode 100644 tests/tests/correct/expr.ixml delete mode 100644 tests/tests/correct/expr.req delete mode 100644 tests/tests/correct/expr1.inp delete mode 100644 tests/tests/correct/expr1.ixml delete mode 100644 tests/tests/correct/expr1.req delete mode 100644 tests/tests/correct/expr2.inp delete mode 100644 tests/tests/correct/expr2.ixml delete mode 100644 tests/tests/correct/expr2.req delete mode 100644 tests/tests/correct/expr3.inp delete mode 100644 tests/tests/correct/expr3.ixml delete mode 100644 tests/tests/correct/expr3.req delete mode 100644 tests/tests/correct/expr4.inp delete mode 100644 tests/tests/correct/expr4.ixml delete mode 100644 tests/tests/correct/expr4.req delete mode 100644 tests/tests/correct/expr5.inp delete mode 100644 tests/tests/correct/expr5.ixml delete mode 100644 tests/tests/correct/expr5.req delete mode 100644 tests/tests/correct/expr6.inp delete mode 100644 tests/tests/correct/expr6.ixml delete mode 100644 tests/tests/correct/expr6.req delete mode 100644 tests/tests/correct/hash.inp delete mode 100644 tests/tests/correct/hash.ixml delete mode 100644 tests/tests/correct/hash.req delete mode 100644 tests/tests/correct/hex.inp delete mode 100644 tests/tests/correct/hex.ixml delete mode 100644 tests/tests/correct/hex.req delete mode 100644 tests/tests/correct/hex1.inp delete mode 100644 tests/tests/correct/hex1.ixml delete mode 100644 tests/tests/correct/hex1.req delete mode 100644 tests/tests/correct/hex3.inp delete mode 100644 tests/tests/correct/hex3.ixml delete mode 100644 tests/tests/correct/hex3.req delete mode 100644 tests/tests/correct/json.inp delete mode 100644 tests/tests/correct/json.ixml delete mode 100644 tests/tests/correct/json.req delete mode 100644 tests/tests/correct/json1.inp delete mode 100644 tests/tests/correct/json1.ixml delete mode 100644 tests/tests/correct/json1.req delete mode 100644 tests/tests/correct/lf.inp delete mode 100644 tests/tests/correct/lf.ixml delete mode 100644 tests/tests/correct/lf.req delete mode 100644 tests/tests/correct/lf.res delete mode 100644 tests/tests/correct/lf1.inp delete mode 100644 tests/tests/correct/lf1.ixml delete mode 100644 tests/tests/correct/lf1.req delete mode 100644 tests/tests/correct/marked.inp delete mode 100644 tests/tests/correct/marked.ixml delete mode 100644 tests/tests/correct/marked.req delete mode 100644 tests/tests/correct/nested-comment.inp delete mode 100644 tests/tests/correct/nested-comment.ixml delete mode 100644 tests/tests/correct/nested-comment.req delete mode 100644 tests/tests/correct/para-test.inp delete mode 100644 tests/tests/correct/para-test.ixml delete mode 100644 tests/tests/correct/para-test.req delete mode 100644 tests/tests/correct/para-test.res delete mode 100644 tests/tests/correct/poly.inp delete mode 100644 tests/tests/correct/poly.ixml delete mode 100644 tests/tests/correct/poly.req delete mode 100644 tests/tests/correct/program.inp delete mode 100644 tests/tests/correct/program.ixml delete mode 100644 tests/tests/correct/program.req delete mode 100644 tests/tests/correct/range-comments.inp delete mode 100644 tests/tests/correct/range-comments.ixml delete mode 100644 tests/tests/correct/range-comments.req delete mode 100644 tests/tests/correct/range.inp delete mode 100644 tests/tests/correct/range.ixml delete mode 100644 tests/tests/correct/range.req delete mode 100644 tests/tests/correct/ranges.inp delete mode 100644 tests/tests/correct/ranges.ixml delete mode 100644 tests/tests/correct/ranges.req delete mode 100644 tests/tests/correct/ranges1.inp delete mode 100644 tests/tests/correct/ranges1.ixml delete mode 100644 tests/tests/correct/ranges1.req delete mode 100644 tests/tests/correct/string.inp delete mode 100644 tests/tests/correct/string.ixml delete mode 100644 tests/tests/correct/string.req delete mode 100644 tests/tests/correct/tab.inp delete mode 100644 tests/tests/correct/tab.ixml delete mode 100644 tests/tests/correct/tab.req delete mode 100644 tests/tests/correct/test.inp delete mode 100644 tests/tests/correct/test.ixml delete mode 100644 tests/tests/correct/test.req delete mode 100644 tests/tests/correct/unicode-range.inp delete mode 100644 tests/tests/correct/unicode-range.ixml delete mode 100644 tests/tests/correct/unicode-range.req delete mode 100644 tests/tests/correct/unicode-range.res delete mode 100644 tests/tests/correct/unicode-range1.inp delete mode 100644 tests/tests/correct/unicode-range1.ixml delete mode 100644 tests/tests/correct/unicode-range1.req delete mode 100644 tests/tests/correct/unicode-range1.res delete mode 100644 tests/tests/correct/unicode-range2.inp delete mode 100644 tests/tests/correct/unicode-range2.ixml delete mode 100644 tests/tests/correct/unicode-range2.req delete mode 100644 tests/tests/correct/vcard.inp delete mode 100644 tests/tests/correct/vcard.ixml delete mode 100644 tests/tests/correct/vcard.req delete mode 100644 tests/tests/correct/xml.inp delete mode 100644 tests/tests/correct/xml.ixml delete mode 100644 tests/tests/correct/xml.req delete mode 100644 tests/tests/correct/xml1.inp delete mode 100644 tests/tests/correct/xml1.ixml delete mode 100644 tests/tests/correct/xml1.req delete mode 100644 tests/tests/correct/xpath.inp delete mode 100644 tests/tests/correct/xpath.ixml delete mode 100644 tests/tests/correct/xpath.req delete mode 100644 tests/tests/ixml/bnf.inp delete mode 100644 tests/tests/ixml/bnf.ixml delete mode 100644 tests/tests/ixml/bnf.req delete mode 100644 tests/tests/ixml/ixml-comments.inp delete mode 100644 tests/tests/ixml/ixml-comments.ixml delete mode 100644 tests/tests/ixml/ixml-comments.out delete mode 100644 tests/tests/ixml/ixml-comments.req delete mode 100644 tests/tests/ixml/ixml-comments.res delete mode 100644 tests/tests/ixml/ixml-no-spaces.inp delete mode 100644 tests/tests/ixml/ixml-no-spaces.ixml delete mode 100644 tests/tests/ixml/ixml-no-spaces.req delete mode 100644 tests/tests/ixml/ixml-one-line.inp delete mode 100644 tests/tests/ixml/ixml-one-line.ixml delete mode 100644 tests/tests/ixml/ixml-one-line.req delete mode 100644 tests/tests/ixml/ixml-one-line.res delete mode 100644 tests/tests/ixml/ixml-spaces.inp delete mode 100644 tests/tests/ixml/ixml-spaces.ixml delete mode 100644 tests/tests/ixml/ixml-spaces.req delete mode 100644 tests/tests/ixml/ixml.inp delete mode 100644 tests/tests/ixml/ixml.ixml delete mode 100644 tests/tests/ixml/ixml.req delete mode 100644 tests/tests/ixml/ixml1.inp delete mode 100644 tests/tests/ixml/ixml1.ixml delete mode 100644 tests/tests/ixml/ixml1.req delete mode 100644 tests/tests/ixml/ixml2.inp delete mode 100644 tests/tests/ixml/ixml2.ixml delete mode 100644 tests/tests/ixml/ixml2.req delete mode 100644 tests/tests/ixml/ixml3.inp delete mode 100644 tests/tests/ixml/ixml3.ixml delete mode 100644 tests/tests/ixml/ixml3.req delete mode 100644 tests/tests/parse/elem1.inp delete mode 100644 tests/tests/parse/elem1.ixml delete mode 100644 tests/tests/parse/elem1.req delete mode 100644 tests/tests/parse/parse-error.inp delete mode 100644 tests/tests/parse/parse-error.ixml delete mode 100644 tests/tests/parse/parse-error.req delete mode 100644 tests/tests/parse/url.inp delete mode 100644 tests/tests/parse/url.ixml delete mode 100644 tests/tests/parse/url.req delete mode 100644 tests/tests/parse/url1.inp delete mode 100644 tests/tests/parse/url1.ixml delete mode 100644 tests/tests/parse/url1.req delete mode 100644 tests/tests/semantic/unused-rule.inp delete mode 100644 tests/tests/semantic/unused-rule.ixml delete mode 100644 tests/tests/semantic/unused-rule.req delete mode 100644 tests/tests/semantic/unused-rules.inp delete mode 100644 tests/tests/semantic/unused-rules.ixml delete mode 100644 tests/tests/semantic/unused-rules.req delete mode 100644 tests/tests/syntax/MISSING.inp delete mode 100644 tests/tests/syntax/class-range.inp delete mode 100644 tests/tests/syntax/class-range.ixml delete mode 100644 tests/tests/syntax/class-range.req delete mode 100644 tests/tests/syntax/defn1.inp delete mode 100644 tests/tests/syntax/defn1.ixml delete mode 100644 tests/tests/syntax/defn1.req delete mode 100644 tests/tests/syntax/defn10.inp delete mode 100644 tests/tests/syntax/defn10.ixml delete mode 100644 tests/tests/syntax/defn10.req delete mode 100644 tests/tests/syntax/defn11.inp delete mode 100644 tests/tests/syntax/defn11.ixml delete mode 100644 tests/tests/syntax/defn11.req delete mode 100644 tests/tests/syntax/defn2.inp delete mode 100644 tests/tests/syntax/defn2.ixml delete mode 100644 tests/tests/syntax/defn2.req delete mode 100644 tests/tests/syntax/defn3.inp delete mode 100644 tests/tests/syntax/defn3.ixml delete mode 100644 tests/tests/syntax/defn3.req delete mode 100644 tests/tests/syntax/defn3.rq delete mode 100644 tests/tests/syntax/defn4.inp delete mode 100644 tests/tests/syntax/defn4.ixml delete mode 100644 tests/tests/syntax/defn4.req delete mode 100644 tests/tests/syntax/defn5.inp delete mode 100644 tests/tests/syntax/defn5.ixml delete mode 100644 tests/tests/syntax/defn5.req delete mode 100644 tests/tests/syntax/defn6.inp delete mode 100644 tests/tests/syntax/defn6.ixml delete mode 100644 tests/tests/syntax/defn6.req delete mode 100644 tests/tests/syntax/defn8.inp delete mode 100644 tests/tests/syntax/defn8.ixml delete mode 100644 tests/tests/syntax/defn8.req delete mode 100644 tests/tests/syntax/defn9.inp delete mode 100644 tests/tests/syntax/defn9.ixml delete mode 100644 tests/tests/syntax/defn9.req delete mode 100644 tests/tests/syntax/elem2.inp delete mode 100644 tests/tests/syntax/elem2.ixml delete mode 100644 tests/tests/syntax/elem2.req delete mode 100644 tests/tests/syntax/elem3.inp delete mode 100644 tests/tests/syntax/elem3.ixml delete mode 100644 tests/tests/syntax/elem3.req delete mode 100644 tests/tests/syntax/elem4.inp delete mode 100644 tests/tests/syntax/elem4.ixml delete mode 100644 tests/tests/syntax/elem4.req delete mode 100644 tests/tests/syntax/elem5.inp delete mode 100644 tests/tests/syntax/elem5.ixml delete mode 100644 tests/tests/syntax/elem5.req delete mode 100644 tests/tests/syntax/elem6.inp delete mode 100644 tests/tests/syntax/elem6.ixml delete mode 100644 tests/tests/syntax/elem6.req delete mode 100644 tests/tests/syntax/elem7.inp delete mode 100644 tests/tests/syntax/elem7.ixml delete mode 100644 tests/tests/syntax/elem7.req delete mode 100644 tests/tests/syntax/empty-string.inp delete mode 100644 tests/tests/syntax/empty-string.ixml delete mode 100644 tests/tests/syntax/empty-string.req delete mode 100644 tests/tests/syntax/expr10.inp delete mode 100644 tests/tests/syntax/expr10.ixml delete mode 100644 tests/tests/syntax/expr10.req delete mode 100644 tests/tests/syntax/hex2.inp delete mode 100644 tests/tests/syntax/hex2.ixml delete mode 100644 tests/tests/syntax/hex2.req delete mode 100644 tests/tests/syntax/illegal-class.inp delete mode 100644 tests/tests/syntax/illegal-class.ixml delete mode 100644 tests/tests/syntax/illegal-class.req delete mode 100644 tests/tests/syntax/name-with-spaces.inp delete mode 100644 tests/tests/syntax/name-with-spaces.ixml delete mode 100644 tests/tests/syntax/name-with-spaces.req delete mode 100644 tests/tests/syntax/rule.inp delete mode 100644 tests/tests/syntax/rule.ixml delete mode 100644 tests/tests/syntax/rule.req delete mode 100644 tests/tests/syntax/rule1.inp delete mode 100644 tests/tests/syntax/rule1.ixml delete mode 100644 tests/tests/syntax/rule1.req delete mode 100644 tests/tests/syntax/rule10.inp delete mode 100644 tests/tests/syntax/rule10.ixml delete mode 100644 tests/tests/syntax/rule10.req delete mode 100644 tests/tests/syntax/rule2.inp delete mode 100644 tests/tests/syntax/rule2.ixml delete mode 100644 tests/tests/syntax/rule2.req delete mode 100644 tests/tests/syntax/rule3.inp delete mode 100644 tests/tests/syntax/rule3.ixml delete mode 100644 tests/tests/syntax/rule3.req delete mode 100644 tests/tests/syntax/rule4.inp delete mode 100644 tests/tests/syntax/rule4.ixml delete mode 100644 tests/tests/syntax/rule4.req delete mode 100644 tests/tests/syntax/rule5.inp delete mode 100644 tests/tests/syntax/rule5.ixml delete mode 100644 tests/tests/syntax/rule5.req delete mode 100644 tests/tests/syntax/rule6.inp delete mode 100644 tests/tests/syntax/rule6.ixml delete mode 100644 tests/tests/syntax/rule6.req delete mode 100644 tests/tests/syntax/rule7.inp delete mode 100644 tests/tests/syntax/rule7.ixml delete mode 100644 tests/tests/syntax/rule7.req delete mode 100644 tests/tests/syntax/rule8.inp delete mode 100644 tests/tests/syntax/rule8.ixml delete mode 100644 tests/tests/syntax/rule8.req delete mode 100644 tests/tests/syntax/rule9.inp delete mode 100644 tests/tests/syntax/rule9.ixml delete mode 100644 tests/tests/syntax/rule9.req delete mode 100644 tests/tests/syntax/unterminated-comment.inp delete mode 100644 tests/tests/syntax/unterminated-comment.ixml delete mode 100644 tests/tests/syntax/unterminated-comment.req delete mode 100644 tests/tests/syntax/unterminated-comment1.inp delete mode 100644 tests/tests/syntax/unterminated-comment1.ixml delete mode 100644 tests/tests/syntax/unterminated-comment1.req delete mode 100644 tests/tests/syntax/unterminated-comment2.inp delete mode 100644 tests/tests/syntax/unterminated-comment2.ixml delete mode 100644 tests/tests/syntax/unterminated-comment2.req diff --git a/tests/tests/ambiguous/ambig.inp b/tests/tests/ambiguous/ambig.inp deleted file mode 100644 index 689fe269..00000000 --- a/tests/tests/ambiguous/ambig.inp +++ /dev/null @@ -1,2 +0,0 @@ -i+i+i - diff --git a/tests/tests/ambiguous/ambig.ixml b/tests/tests/ambiguous/ambig.ixml deleted file mode 100644 index 71085799..00000000 --- a/tests/tests/ambiguous/ambig.ixml +++ /dev/null @@ -1,3 +0,0 @@ -expr: e. -e: e, "+", e; e, "-", e; "i". - diff --git a/tests/tests/ambiguous/ambig.req b/tests/tests/ambiguous/ambig.req deleted file mode 100644 index 158573af..00000000 --- a/tests/tests/ambiguous/ambig.req +++ /dev/null @@ -1,22 +0,0 @@ -expr: e. -e: e, "+", e; e, "-", e; "i". - -# -i+i+i - -# - - - - - i+ - - i+ - i - - - diff --git a/tests/tests/ambiguous/ambig2.inp b/tests/tests/ambiguous/ambig2.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/ambiguous/ambig2.ixml b/tests/tests/ambiguous/ambig2.ixml deleted file mode 100644 index 07a22f2a..00000000 --- a/tests/tests/ambiguous/ambig2.ixml +++ /dev/null @@ -1 +0,0 @@ -a: "a"* ; "b"*. diff --git a/tests/tests/ambiguous/ambig2.req b/tests/tests/ambiguous/ambig2.req deleted file mode 100644 index 3ee583b4..00000000 --- a/tests/tests/ambiguous/ambig2.req +++ /dev/null @@ -1,10 +0,0 @@ -a: "a"* ; "b"*. -# -# - - - diff --git a/tests/tests/ambiguous/ambig2a.inp b/tests/tests/ambiguous/ambig2a.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/ambiguous/ambig2a.ixml b/tests/tests/ambiguous/ambig2a.ixml deleted file mode 100644 index 141d6dc2..00000000 --- a/tests/tests/ambiguous/ambig2a.ixml +++ /dev/null @@ -1,3 +0,0 @@ -a: b; c. --b: "b"*. --c: "c"*. diff --git a/tests/tests/ambiguous/ambig2a.req b/tests/tests/ambiguous/ambig2a.req deleted file mode 100644 index 6c2a25f8..00000000 --- a/tests/tests/ambiguous/ambig2a.req +++ /dev/null @@ -1,12 +0,0 @@ -a: b; c. --b: "b"*. --c: "c"*. -# -# - - - diff --git a/tests/tests/ambiguous/ambig3.inp b/tests/tests/ambiguous/ambig3.inp deleted file mode 100644 index 6e4f387c..00000000 --- a/tests/tests/ambiguous/ambig3.inp +++ /dev/null @@ -1 +0,0 @@ -a b diff --git a/tests/tests/ambiguous/ambig3.ixml b/tests/tests/ambiguous/ambig3.ixml deleted file mode 100644 index 2318c34c..00000000 --- a/tests/tests/ambiguous/ambig3.ixml +++ /dev/null @@ -1,3 +0,0 @@ -a: "a", spaces, b. -b: spaces, "b". -spaces: " "*. diff --git a/tests/tests/ambiguous/ambig3.req b/tests/tests/ambiguous/ambig3.req deleted file mode 100644 index 2e0f3bf6..00000000 --- a/tests/tests/ambiguous/ambig3.req +++ /dev/null @@ -1,19 +0,0 @@ -a: "a", spaces, b. -b: spaces, "b". -spaces: " "*. -# -a b -# - - -a - - - b - diff --git a/tests/tests/ambiguous/ambig4.inp b/tests/tests/ambiguous/ambig4.inp deleted file mode 100644 index 2f715528..00000000 --- a/tests/tests/ambiguous/ambig4.inp +++ /dev/null @@ -1,2 +0,0 @@ -red=#f00 -green=#0f0 diff --git a/tests/tests/ambiguous/ambig4.ixml b/tests/tests/ambiguous/ambig4.ixml deleted file mode 100644 index 0d7a38f3..00000000 --- a/tests/tests/ambiguous/ambig4.ixml +++ /dev/null @@ -1,5 +0,0 @@ -properties: property+. -property: name, "=", value+",", eol. -name: [L]+. -value: ~[","]+. -eol: -#a. diff --git a/tests/tests/ambiguous/ambig4.req b/tests/tests/ambiguous/ambig4.req deleted file mode 100644 index 70a434c2..00000000 --- a/tests/tests/ambiguous/ambig4.req +++ /dev/null @@ -1,27 +0,0 @@ -properties: property+. -property: name, "=", value+",", eol. -name: [L]+. -value: ~[","]+. -eol: -#a. -# -red=#f00 -green=#0f0 -# - - - - - red= - #f00 - - - - green= - #0f0 - - - diff --git a/tests/tests/ambiguous/ambig5.inp b/tests/tests/ambiguous/ambig5.inp deleted file mode 100644 index 48082f72..00000000 --- a/tests/tests/ambiguous/ambig5.inp +++ /dev/null @@ -1 +0,0 @@ -12 diff --git a/tests/tests/ambiguous/ambig5.ixml b/tests/tests/ambiguous/ambig5.ixml deleted file mode 100644 index fd589d5d..00000000 --- a/tests/tests/ambiguous/ambig5.ixml +++ /dev/null @@ -1,3 +0,0 @@ -data: number+. -number: digit+. -digit: ["0"-"9"]. diff --git a/tests/tests/ambiguous/ambig5.req b/tests/tests/ambiguous/ambig5.req deleted file mode 100644 index b274dbb0..00000000 --- a/tests/tests/ambiguous/ambig5.req +++ /dev/null @@ -1,20 +0,0 @@ -data: number+. -number: digit+. -digit: ["0"-"9"]. -# -12 -# - - - - - 1 - - - 2 - - diff --git a/tests/tests/ambiguous/ambig6.inp b/tests/tests/ambiguous/ambig6.inp deleted file mode 100644 index 0967ef42..00000000 --- a/tests/tests/ambiguous/ambig6.inp +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/tests/tests/ambiguous/ambig6.ixml b/tests/tests/ambiguous/ambig6.ixml deleted file mode 100644 index f0731182..00000000 --- a/tests/tests/ambiguous/ambig6.ixml +++ /dev/null @@ -1,4 +0,0 @@ -block: "{", rule*";", "}". -rule: name, "=", value; . -name: [L]+. -value: [Nd]+. diff --git a/tests/tests/ambiguous/ambig6.req b/tests/tests/ambiguous/ambig6.req deleted file mode 100644 index 280c9fae..00000000 --- a/tests/tests/ambiguous/ambig6.req +++ /dev/null @@ -1,14 +0,0 @@ -block: "{", rule*";", "}". -rule: name, "=", value; . -name: [L]+. -value: [Nd]+. -# -{} -# - - -{} diff --git a/tests/tests/ambiguous/ambig7.inp b/tests/tests/ambiguous/ambig7.inp deleted file mode 100644 index c53e6295..00000000 --- a/tests/tests/ambiguous/ambig7.inp +++ /dev/null @@ -1 +0,0 @@ -bc diff --git a/tests/tests/ambiguous/ambig7.ixml b/tests/tests/ambiguous/ambig7.ixml deleted file mode 100644 index 9e8392ba..00000000 --- a/tests/tests/ambiguous/ambig7.ixml +++ /dev/null @@ -1,3 +0,0 @@ -a: b, ()?, c. -b: "b". -c: "c". diff --git a/tests/tests/ambiguous/ambig7.req b/tests/tests/ambiguous/ambig7.req deleted file mode 100644 index ecd076c2..00000000 --- a/tests/tests/ambiguous/ambig7.req +++ /dev/null @@ -1,16 +0,0 @@ -a: b, ()?, c. -b: "b". -c: "c". -# -bc -# - - - - b - c - diff --git a/tests/tests/ambiguous/css.inp b/tests/tests/ambiguous/css.inp deleted file mode 100644 index 1f2c561f..00000000 --- a/tests/tests/ambiguous/css.inp +++ /dev/null @@ -1,2 +0,0 @@ -body { color: blue; font-weight: bold; margin: 0; } -head {} diff --git a/tests/tests/ambiguous/css.ixml b/tests/tests/ambiguous/css.ixml deleted file mode 100644 index 987b8c26..00000000 --- a/tests/tests/ambiguous/css.ixml +++ /dev/null @@ -1,12 +0,0 @@ -css: S, rule+. -rule: selector, block. -block: -"{", S, property*(-";", S), -"}", S. -property: @name, S, -":", S, value; empty. -selector: name, S. -name: letter+. --letter: ["a"-"z"; "-"]. -digit: ["0"-"9"]. -value: (@name; @number), S. -number: digit+. --empty: . --S: -[" "; #a]*. diff --git a/tests/tests/ambiguous/css.req b/tests/tests/ambiguous/css.req deleted file mode 100644 index 74111a2a..00000000 --- a/tests/tests/ambiguous/css.req +++ /dev/null @@ -1,47 +0,0 @@ -css: S, rule+. -rule: selector, block. -block: -"{", S, property*(-";", S), -"}", S. -property: @name, S, -":", S, value; empty. -selector: name, S. -name: letter+. --letter: ["a"-"z"; "-"]. -digit: ["0"-"9"]. -value: (@name; @number), S. -number: digit+. --empty: . --S: -[" "; #a]*. -# -body { color: blue; font-weight: bold; margin: 0; } -head {} -# - - - - - - body - - - - - - - - - - - - - - - - - head - - - - diff --git a/tests/tests/ambiguous/date.inp b/tests/tests/ambiguous/date.inp deleted file mode 100644 index 1cbea1a5..00000000 --- a/tests/tests/ambiguous/date.inp +++ /dev/null @@ -1 +0,0 @@ -The conference starts Thursday, 9th Feb 2017 at 10:00. diff --git a/tests/tests/ambiguous/date.ixml b/tests/tests/ambiguous/date.ixml deleted file mode 100644 index 15da79c0..00000000 --- a/tests/tests/ambiguous/date.ixml +++ /dev/null @@ -1,38 +0,0 @@ -date: bla, day, S, number, S, month, S, year, bla; - bla, number, S, month, S, year, bla; - bla, day, ",", S, number, S, month, S, year, bla. -day: Monday; Tuesday; Wednesday; Thursday; Friday; Saturday; Sunday. -Monday: "Mon"; "Monday". -Tuesday: "Tue"; "Tuesday". -Wednesday: "Wed"; "Weds"; "Wednesday". -Thursday: "Thu"; "Thur"; "Thurs"; "Thursday". -Friday: "Fri"; "Friday". -Saturday: "Sat"; "Saturday". -Sunday: "Sun"; "Sunday". -number: cardinal; ordinal. -cardinal: digits1, "st"; digits2, "nd"; digits3, "rd"; digits4,"th". -ordinal: digits. --digits: digit+. --digit: ["0"-"9"]. --digits1: "1"; digits, "1". --digits2: "2"; digits, "2". --digits3: "3"; digits, "3". --digits4: digit4; digits, digit4. --digit4: ["4"-"9"]; "0". --bla: ; char, bla. --char: [" "-"~"]. -month: January; February; March; April; May; June; July; August; September; October; November; December. -year: digit, digit, digit, digit. -January: "January"; "Jan". -February: "February"; "Feb". -March: "March"; "Mar". -April: "April"; "Apr". -May: "May". -June: "June"; "Jun". -July: "July"; "Jul". -August: "August"; "Aug". -September: "September"; "Sept"; "Sep". -October: "October"; "Oct". -November: "November"; "Nov". -December: "December"; "Dec". --S: " "*. diff --git a/tests/tests/ambiguous/date.req b/tests/tests/ambiguous/date.req deleted file mode 100644 index d2718514..00000000 --- a/tests/tests/ambiguous/date.req +++ /dev/null @@ -1,58 +0,0 @@ -date: bla, day, S, number, S, month, S, year, bla; - bla, number, S, month, S, year, bla; - bla, day, ",", S, number, S, month, S, year, bla. -day: Monday; Tuesday; Wednesday; Thursday; Friday; Saturday; Sunday. -Monday: "Mon"; "Monday". -Tuesday: "Tue"; "Tuesday". -Wednesday: "Wed"; "Weds"; "Wednesday". -Thursday: "Thu"; "Thur"; "Thurs"; "Thursday". -Friday: "Fri"; "Friday". -Saturday: "Sat"; "Saturday". -Sunday: "Sun"; "Sunday". -number: cardinal; ordinal. -cardinal: digits1, "st"; digits2, "nd"; digits3, "rd"; digits4,"th". -ordinal: digits. --digits: digit+. --digit: ["0"-"9"]. --digits1: "1"; digits, "1". --digits2: "2"; digits, "2". --digits3: "3"; digits, "3". --digits4: digit4; digits, digit4. --digit4: ["4"-"9"]; "0". --bla: ; char, bla. --char: [" "-"~"]. -month: January; February; March; April; May; June; July; August; September; October; November; December. -year: digit, digit, digit, digit. -January: "January"; "Jan". -February: "February"; "Feb". -March: "March"; "Mar". -April: "April"; "Apr". -May: "May". -June: "June"; "Jun". -July: "July"; "Jul". -August: "August"; "Aug". -September: "September"; "Sept"; "Sep". -October: "October"; "Oct". -November: "November"; "Nov". -December: "December"; "Dec". --S: " "*. -# -The conference starts Thursday, 9th Feb 2017 at 10:00. -# - - -The conference starts - - Thursday - , - - 9th - - - Feb - - 2017 at 10:00. diff --git a/tests/tests/ambiguous/empty-parens.inp b/tests/tests/ambiguous/empty-parens.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/ambiguous/empty-parens.ixml b/tests/tests/ambiguous/empty-parens.ixml deleted file mode 100644 index 295f1c8f..00000000 --- a/tests/tests/ambiguous/empty-parens.ixml +++ /dev/null @@ -1 +0,0 @@ -a: "a"; ()?. diff --git a/tests/tests/ambiguous/empty-parens.req b/tests/tests/ambiguous/empty-parens.req deleted file mode 100644 index 8a456ffd..00000000 --- a/tests/tests/ambiguous/empty-parens.req +++ /dev/null @@ -1,10 +0,0 @@ -a: "a"; ()?. -# -# - - - diff --git a/tests/tests/ambiguous/expr0.inp b/tests/tests/ambiguous/expr0.inp deleted file mode 100644 index 77086402..00000000 --- a/tests/tests/ambiguous/expr0.inp +++ /dev/null @@ -1 +0,0 @@ -a÷b÷c diff --git a/tests/tests/ambiguous/expr0.ixml b/tests/tests/ambiguous/expr0.ixml deleted file mode 100644 index a6a1d7ce..00000000 --- a/tests/tests/ambiguous/expr0.ixml +++ /dev/null @@ -1,14 +0,0 @@ -{expr: operand+operator. -operand: id; number. --id: @name. -name: letter+. --number: @value. -value: digit+. -letter: ["a"-"z"]. -digit: ["0"-"9"]. -operator: "+"; "-"; "×"; "÷". - } -expr: id; number; expr, operator, expr. -id: ["a"-"z"]+. -number: ["0"-"9"]+. -operator: "+"; "-"; "×"; "÷". diff --git a/tests/tests/ambiguous/expr0.req b/tests/tests/ambiguous/expr0.req deleted file mode 100644 index 11543fd7..00000000 --- a/tests/tests/ambiguous/expr0.req +++ /dev/null @@ -1,38 +0,0 @@ -{expr: operand+operator. -operand: id; number. --id: @name. -name: letter+. --number: @value. -value: digit+. -letter: ["a"-"z"]. -digit: ["0"-"9"]. -operator: "+"; "-"; "×"; "÷". - } -expr: id; number; expr, operator, expr. -id: ["a"-"z"]+. -number: ["0"-"9"]+. -operator: "+"; "-"; "×"; "÷". -# -a÷b÷c -# - - - - - a - - ÷ - - - b - - ÷ - - c - - - diff --git a/tests/tests/ambiguous/lf2.inp b/tests/tests/ambiguous/lf2.inp deleted file mode 100644 index 984acbd1..00000000 --- a/tests/tests/ambiguous/lf2.inp +++ /dev/null @@ -1,3 +0,0 @@ -Now is the time -For all good people -To have fun. diff --git a/tests/tests/ambiguous/lf2.ixml b/tests/tests/ambiguous/lf2.ixml deleted file mode 100644 index ed08b3ae..00000000 --- a/tests/tests/ambiguous/lf2.ixml +++ /dev/null @@ -1,3 +0,0 @@ -input: line+lf, lf?. -line: ~[#a]*. -lf: -#a. diff --git a/tests/tests/ambiguous/lf2.req b/tests/tests/ambiguous/lf2.req deleted file mode 100644 index a2e5a0f5..00000000 --- a/tests/tests/ambiguous/lf2.req +++ /dev/null @@ -1,22 +0,0 @@ -input: line+lf, lf?. -line: ~[#a]*. -lf: -#a. -# -Now is the time -For all good people -To have fun. -# - - - - Now is the time - - For all good people - - To have fun. - - diff --git a/tests/tests/correct/a.ixml-fail b/tests/tests/correct/a.ixml-fail deleted file mode 100644 index 309d7c2a..00000000 --- a/tests/tests/correct/a.ixml-fail +++ /dev/null @@ -1 +0,0 @@ -S: 'a'; S. diff --git a/tests/tests/correct/address.inp b/tests/tests/correct/address.inp deleted file mode 100644 index 11a9245a..00000000 --- a/tests/tests/correct/address.inp +++ /dev/null @@ -1,4 +0,0 @@ -Steven Pemberton -21 Sandridge Road -St Albans AL1 4BY -United Kingdom diff --git a/tests/tests/correct/address.ixml b/tests/tests/correct/address.ixml deleted file mode 100644 index 629c4a5c..00000000 --- a/tests/tests/correct/address.ixml +++ /dev/null @@ -1,22 +0,0 @@ -address: person, lf, street, lf, postcode, city, lf, country, lf; - person, lf, street, lf, city, postcode, lf, country, lf. -person: (title, S?)?, (initials; given, S), surname, S?. -title: "Mr."; "Mrs."; "Dr."; "Ms.". -initials: initial+. -initial: LETTER, ".", S?. -surname: name. -given: name. --name: LETTER, letters. -street: no, S?, streetname; streetname, S?, no, S?. -streetname: name, S; name, S, name. -city: name, S; name, S, name, S. -country: name, S?; name, S, name, S?. -postcode: digits, S, LETTER, LETTER, S?; - LETTER, LETTER, digits, S, digit, LETTER, LETTER, S?. -no: digits. --LETTER: ["A"-"Z"]. --letters: ["a"-"z"]*. --digit: ["0"-"9"]. --digits: ["0"-"9"]+. --S: " "+. --lf: -#a. diff --git a/tests/tests/correct/address.req b/tests/tests/correct/address.req deleted file mode 100644 index e3667c4f..00000000 --- a/tests/tests/correct/address.req +++ /dev/null @@ -1,42 +0,0 @@ -address: person, lf, street, lf, postcode, city, lf, country, lf; - person, lf, street, lf, city, postcode, lf, country, lf. -person: (title, S?)?, (initials; given, S), surname, S?. -title: "Mr."; "Mrs."; "Dr."; "Ms.". -initials: initial+. -initial: LETTER, ".", S?. -surname: name. -given: name. --name: LETTER, letters. -street: no, S?, streetname; streetname, S?, no, S?. -streetname: name, S; name, S, name. -city: name, S; name, S, name, S. -country: name, S?; name, S, name, S?. -postcode: digits, S, LETTER, LETTER, S?; - LETTER, LETTER, digits, S, digit, LETTER, LETTER, S?. -no: digits. --LETTER: ["A"-"Z"]. --letters: ["a"-"z"]*. --digit: ["0"-"9"]. --digits: ["0"-"9"]+. --S: " "+. --lf: -#a. -# -Steven Pemberton -21 Sandridge Road -St Albans AL1 4BY -United Kingdom -# - -
- - Steven - Pemberton - - - 21 - Sandridge Road - - St Albans - AL1 4BY - United Kingdom -
diff --git a/tests/tests/correct/arith.inp b/tests/tests/correct/arith.inp deleted file mode 100644 index 5853e7f5..00000000 --- a/tests/tests/correct/arith.inp +++ /dev/null @@ -1 +0,0 @@ -(a+b) diff --git a/tests/tests/correct/arith.ixml b/tests/tests/correct/arith.ixml deleted file mode 100644 index 446c4696..00000000 --- a/tests/tests/correct/arith.ixml +++ /dev/null @@ -1,8 +0,0 @@ -expr: open, -arith, close. -open: "(". -close: ")". -arith: left, -op, right. -op: @plus. -plus: "+". -left: "a". -right:"b". diff --git a/tests/tests/correct/arith.req b/tests/tests/correct/arith.req deleted file mode 100644 index 60d39fde..00000000 --- a/tests/tests/correct/arith.req +++ /dev/null @@ -1,18 +0,0 @@ -expr: open, -arith, close. -open: "(". -close: ")". -arith: left, -op, right. -op: @plus. -plus: "+". -left: "a". -right:"b". -# -(a+b) -# - - - ( - a - b - ) - diff --git a/tests/tests/correct/attribute-value.inp b/tests/tests/correct/attribute-value.inp deleted file mode 100644 index fda91d52..00000000 --- a/tests/tests/correct/attribute-value.inp +++ /dev/null @@ -1 +0,0 @@ -"'<>/&. diff --git a/tests/tests/correct/attribute-value.ixml b/tests/tests/correct/attribute-value.ixml deleted file mode 100644 index 17421be1..00000000 --- a/tests/tests/correct/attribute-value.ixml +++ /dev/null @@ -1,2 +0,0 @@ -content: @a, -".". -a: ~["."]*. diff --git a/tests/tests/correct/attribute-value.req b/tests/tests/correct/attribute-value.req deleted file mode 100644 index 9537dfe6..00000000 --- a/tests/tests/correct/attribute-value.req +++ /dev/null @@ -1,7 +0,0 @@ -content: @a, -".". -a: ~["."]*. -# -"'<>/&. -# - - diff --git a/tests/tests/correct/diary.inp b/tests/tests/correct/diary.inp deleted file mode 100644 index 216fcfe1..00000000 --- a/tests/tests/correct/diary.inp +++ /dev/null @@ -1,9 +0,0 @@ -24 December 2021 -Panic shopping! Panic packing! Will we make it before midnight? - -25 December 2021 -Food! Presents! - -26 December 2021 -Groan. - diff --git a/tests/tests/correct/diary.ixml b/tests/tests/correct/diary.ixml deleted file mode 100644 index 49c02709..00000000 --- a/tests/tests/correct/diary.ixml +++ /dev/null @@ -1,15 +0,0 @@ -diary: entry+. -entry: date, para. -date: day, s, month, s, year, -#a. -day: digit, digit?. --digit:["0"-"9"]. -month: "January"; "February"; "March"; "April"; "May"; "June"; - "July"; "August"; "September"; "October"; "November"; "December". -year: digit, digit, digit, digit. - -para: word+s, s?, blank. --blank: -#a, -#a. --word: (letter; punctuation)+. --letter: [L]. --punctuation: [".;:,'?!"]. --s: " "+. diff --git a/tests/tests/correct/diary.req b/tests/tests/correct/diary.req deleted file mode 100644 index 422135c2..00000000 --- a/tests/tests/correct/diary.req +++ /dev/null @@ -1,53 +0,0 @@ -diary: entry+. -entry: date, para. -date: day, s, month, s, year, -#a. -day: digit, digit?. --digit:["0"-"9"]. -month: "January"; "February"; "March"; "April"; "May"; "June"; - "July"; "August"; "September"; "October"; "November"; "December". -year: digit, digit, digit, digit. - -para: word+s, s?, blank. --blank: -#a, -#a. --word: (letter; punctuation)+. --letter: [L]. --punctuation: [".;:,'?!"]. --s: " "+. -# -24 December 2021 -Panic shopping! Panic packing! Will we make it before midnight? - -25 December 2021 -Food! Presents! - -26 December 2021 -Groan. - -# - - - - - 24 - December - 2021 - - Panic shopping! Panic packing! Will we make it before midnight? - - - - 25 - December - 2021 - - Food! Presents! - - - - 26 - December - 2021 - - Groan. - - diff --git a/tests/tests/correct/diary2.inp b/tests/tests/correct/diary2.inp deleted file mode 100644 index 216fcfe1..00000000 --- a/tests/tests/correct/diary2.inp +++ /dev/null @@ -1,9 +0,0 @@ -24 December 2021 -Panic shopping! Panic packing! Will we make it before midnight? - -25 December 2021 -Food! Presents! - -26 December 2021 -Groan. - diff --git a/tests/tests/correct/diary2.ixml b/tests/tests/correct/diary2.ixml deleted file mode 100644 index f1900a03..00000000 --- a/tests/tests/correct/diary2.ixml +++ /dev/null @@ -1,15 +0,0 @@ -diary: entry+. -entry: date, para. -date: day, s, month, s, year, -#a. -day: digit, digit?. --digit:["0"-"9"]. -month: "January"; "February"; "March"; "April"; "May"; "June"; - "July"; "August"; "September"; "October"; "November"; "December". -year: digit, digit, digit, digit. - -para: char*, blank. --blank: -#a, -#a. --char: letter; punctuation; s. --letter: [L]. --punctuation: [".;:,'?!"]. --s: " ". diff --git a/tests/tests/correct/diary2.req b/tests/tests/correct/diary2.req deleted file mode 100644 index f4570a4f..00000000 --- a/tests/tests/correct/diary2.req +++ /dev/null @@ -1,53 +0,0 @@ -diary: entry+. -entry: date, para. -date: day, s, month, s, year, -#a. -day: digit, digit?. --digit:["0"-"9"]. -month: "January"; "February"; "March"; "April"; "May"; "June"; - "July"; "August"; "September"; "October"; "November"; "December". -year: digit, digit, digit, digit. - -para: char*, blank. --blank: -#a, -#a. --char: letter; punctuation; s. --letter: [L]. --punctuation: [".;:,'?!"]. --s: " ". -# -24 December 2021 -Panic shopping! Panic packing! Will we make it before midnight? - -25 December 2021 -Food! Presents! - -26 December 2021 -Groan. - -# - - - - - 24 - December - 2021 - - Panic shopping! Panic packing! Will we make it before midnight? - - - - 25 - December - 2021 - - Food! Presents! - - - - 26 - December - 2021 - - Groan. - - diff --git a/tests/tests/correct/diary3.inp b/tests/tests/correct/diary3.inp deleted file mode 100644 index 216fcfe1..00000000 --- a/tests/tests/correct/diary3.inp +++ /dev/null @@ -1,9 +0,0 @@ -24 December 2021 -Panic shopping! Panic packing! Will we make it before midnight? - -25 December 2021 -Food! Presents! - -26 December 2021 -Groan. - diff --git a/tests/tests/correct/diary3.ixml b/tests/tests/correct/diary3.ixml deleted file mode 100644 index cc1f24f6..00000000 --- a/tests/tests/correct/diary3.ixml +++ /dev/null @@ -1,13 +0,0 @@ -diary: entry+. -entry: date, para. -date: day, s, month, s, year, -#a. --s: -" "+. -day: digit, digit?. --digit:["0"-"9"]. -month: "January"; "February"; "March"; "April"; "May"; "June"; - "July"; "August"; "September"; "October"; "November"; "December". -year: digit, digit, digit, digit. - -para: char*, blank. --blank: -#a, -#a. --char: ~[#a]. diff --git a/tests/tests/correct/diary3.req b/tests/tests/correct/diary3.req deleted file mode 100644 index 83e762cb..00000000 --- a/tests/tests/correct/diary3.req +++ /dev/null @@ -1,51 +0,0 @@ -diary: entry+. -entry: date, para. -date: day, s, month, s, year, -#a. --s: -" "+. -day: digit, digit?. --digit:["0"-"9"]. -month: "January"; "February"; "March"; "April"; "May"; "June"; - "July"; "August"; "September"; "October"; "November"; "December". -year: digit, digit, digit, digit. - -para: char*, blank. --blank: -#a, -#a. --char: ~[#a]. -# -24 December 2021 -Panic shopping! Panic packing! Will we make it before midnight? - -25 December 2021 -Food! Presents! - -26 December 2021 -Groan. - -# - - - - - 24 - December - 2021 - - Panic shopping! Panic packing! Will we make it before midnight? - - - - 25 - December - 2021 - - Food! Presents! - - - - 26 - December - 2021 - - Groan. - - diff --git a/tests/tests/correct/element-content.inp b/tests/tests/correct/element-content.inp deleted file mode 100644 index fda91d52..00000000 --- a/tests/tests/correct/element-content.inp +++ /dev/null @@ -1 +0,0 @@ -"'<>/&. diff --git a/tests/tests/correct/element-content.ixml b/tests/tests/correct/element-content.ixml deleted file mode 100644 index 5b0fa6c1..00000000 --- a/tests/tests/correct/element-content.ixml +++ /dev/null @@ -1,2 +0,0 @@ -content: -a, -".". -a: ~["."]*. diff --git a/tests/tests/correct/element-content.req b/tests/tests/correct/element-content.req deleted file mode 100644 index 493058a8..00000000 --- a/tests/tests/correct/element-content.req +++ /dev/null @@ -1,7 +0,0 @@ -content: -a, -".". -a: ~["."]*. -# -"'<>/&. -# - -"'<>/& diff --git a/tests/tests/correct/email.inp b/tests/tests/correct/email.inp deleted file mode 100644 index 023051f7..00000000 --- a/tests/tests/correct/email.inp +++ /dev/null @@ -1 +0,0 @@ -~my_mail+{nospam}$?@sub-domain.example.info diff --git a/tests/tests/correct/email.ixml b/tests/tests/correct/email.ixml deleted file mode 100644 index 9d48c04a..00000000 --- a/tests/tests/correct/email.ixml +++ /dev/null @@ -1,8 +0,0 @@ -email: user, -"@", host. -@user: atom+".". --atom: char+. -@host: domain+".". --domain: word+"-". --word: letgit+. --letgit: ["A"-"Z"; "a"-"z"; "0"-"9"]. --char: letgit; ["!#$%&'*+-/=?^_`{|}~"]. diff --git a/tests/tests/correct/email.req b/tests/tests/correct/email.req deleted file mode 100644 index 7ca05810..00000000 --- a/tests/tests/correct/email.req +++ /dev/null @@ -1,13 +0,0 @@ -email: user, -"@", host. -@user: atom+".". --atom: char+. -@host: domain+".". --domain: word+"-". --word: letgit+. --letgit: ["A"-"Z"; "a"-"z"; "0"-"9"]. --char: letgit; ["!#$%&'*+-/=?^_`{|}~"]. -# -~my_mail+{nospam}$?@sub-domain.example.info -# - - diff --git a/tests/tests/correct/empty-group.inp b/tests/tests/correct/empty-group.inp deleted file mode 100644 index e5d8f44b..00000000 --- a/tests/tests/correct/empty-group.inp +++ /dev/null @@ -1 +0,0 @@ -bc \ No newline at end of file diff --git a/tests/tests/correct/empty-group.ixml b/tests/tests/correct/empty-group.ixml deleted file mode 100644 index 76f9bd31..00000000 --- a/tests/tests/correct/empty-group.ixml +++ /dev/null @@ -1,3 +0,0 @@ -a: b, (), c. -b: "b". -c: "c". diff --git a/tests/tests/correct/empty-group.req b/tests/tests/correct/empty-group.req deleted file mode 100644 index 4cea1194..00000000 --- a/tests/tests/correct/empty-group.req +++ /dev/null @@ -1,10 +0,0 @@ -a: b, (), c. -b: "b". -c: "c". -# -bc# - -
- b - c - diff --git a/tests/tests/correct/expr.inp b/tests/tests/correct/expr.inp deleted file mode 100644 index 878bc02d..00000000 --- a/tests/tests/correct/expr.inp +++ /dev/null @@ -1 +0,0 @@ -pi+(10×b) diff --git a/tests/tests/correct/expr.ixml b/tests/tests/correct/expr.ixml deleted file mode 100644 index 02d952b0..00000000 --- a/tests/tests/correct/expr.ixml +++ /dev/null @@ -1,15 +0,0 @@ -expression: expr. --expr: term; sum; diff. -sum: expr, -"+", term. -diff: expr, "-", term. --term: factor; prod; div. -prod: term, -"×", factor. -div: term, "÷", factor. --factor: id; number; bracketed. -bracketed: -"(", expr, -")". -id: @name. -name: letter+. -number: @value. -value: digit+. --letter: ["a"-"z"]. --digit: ["0"-"9"]. diff --git a/tests/tests/correct/expr.req b/tests/tests/correct/expr.req deleted file mode 100644 index 312afb78..00000000 --- a/tests/tests/correct/expr.req +++ /dev/null @@ -1,30 +0,0 @@ -expression: expr. --expr: term; sum; diff. -sum: expr, -"+", term. -diff: expr, "-", term. --term: factor; prod; div. -prod: term, -"×", factor. -div: term, "÷", factor. --factor: id; number; bracketed. -bracketed: -"(", expr, -")". -id: @name. -name: letter+. -number: @value. -value: digit+. --letter: ["a"-"z"]. --digit: ["0"-"9"]. -# -pi+(10×b) -# - - - - - - - - - - - - diff --git a/tests/tests/correct/expr1.inp b/tests/tests/correct/expr1.inp deleted file mode 100644 index b762436c..00000000 --- a/tests/tests/correct/expr1.inp +++ /dev/null @@ -1,2 +0,0 @@ -1+2+3*4+5 - diff --git a/tests/tests/correct/expr1.ixml b/tests/tests/correct/expr1.ixml deleted file mode 100644 index a9a6393b..00000000 --- a/tests/tests/correct/expr1.ixml +++ /dev/null @@ -1,13 +0,0 @@ -expression: expr. --expr: term+plusop. -@plusop: "+"; "-". -term: -factor; factor, mulop, factor+mulop. -@mulop: "*"; "/". -factor: id; number; bracketed. -bracketed: -"(", expr, -")". -id: @name. -name: letter+. -number: @value. -value: digit+. --letter: ["a"-"z"]. --digit: ["0"-"9"]. diff --git a/tests/tests/correct/expr1.req b/tests/tests/correct/expr1.req deleted file mode 100644 index bd0b0c8a..00000000 --- a/tests/tests/correct/expr1.req +++ /dev/null @@ -1,37 +0,0 @@ -expression: expr. --expr: term+plusop. -@plusop: "+"; "-". -term: -factor; factor, mulop, factor+mulop. -@mulop: "*"; "/". -factor: id; number; bracketed. -bracketed: -"(", expr, -")". -id: @name. -name: letter+. -number: @value. -value: digit+. --letter: ["a"-"z"]. --digit: ["0"-"9"]. -# -1+2+3*4+5 - -# - - - - - - - - - - - - - - - - - - - - diff --git a/tests/tests/correct/expr2.inp b/tests/tests/correct/expr2.inp deleted file mode 100644 index 0cae92a7..00000000 --- a/tests/tests/correct/expr2.inp +++ /dev/null @@ -1 +0,0 @@ -234×(bbbb+cccc+dddd)×12 \ No newline at end of file diff --git a/tests/tests/correct/expr2.ixml b/tests/tests/correct/expr2.ixml deleted file mode 100644 index 6c55b2a6..00000000 --- a/tests/tests/correct/expr2.ixml +++ /dev/null @@ -1,10 +0,0 @@ -expression: expr. --expr: term; sum; diff. -sum: term, -"+", term+-"+". -diff: term, -"-", term+-"-". --term: factor; prod; div. -prod: factor, -"×", factor+-"×". -div: factor, -"÷", factor+-"÷". --factor: name; number; -"(", ^expr, -")". -name: ["a"-"z"]+. -number: ["0"-"9"]+. diff --git a/tests/tests/correct/expr2.req b/tests/tests/correct/expr2.req deleted file mode 100644 index 00313033..00000000 --- a/tests/tests/correct/expr2.req +++ /dev/null @@ -1,26 +0,0 @@ -expression: expr. --expr: term; sum; diff. -sum: term, -"+", term+-"+". -diff: term, -"-", term+-"-". --term: factor; prod; div. -prod: factor, -"×", factor+-"×". -div: factor, -"÷", factor+-"÷". --factor: name; number; -"(", ^expr, -")". -name: ["a"-"z"]+. -number: ["0"-"9"]+. -# -234×(bbbb+cccc+dddd)×12# - - - - 234 - - - bbbb - cccc - dddd - - - 12 - - diff --git a/tests/tests/correct/expr3.inp b/tests/tests/correct/expr3.inp deleted file mode 100644 index fbd27c0a..00000000 --- a/tests/tests/correct/expr3.inp +++ /dev/null @@ -1,2 +0,0 @@ -234×(bbbb+cccc+dddd)×12 - diff --git a/tests/tests/correct/expr3.ixml b/tests/tests/correct/expr3.ixml deleted file mode 100644 index 4df1d6a7..00000000 --- a/tests/tests/correct/expr3.ixml +++ /dev/null @@ -1,11 +0,0 @@ -expression: expr. --expr: term; sum; diff. -sum: term, "+", term+"+". -diff: term, "-", term+"-". --term: factor; prod; div. -prod: factor, "×", factor+"×". -div: factor, "÷", factor+"÷". --factor: name; number; bracketed. -bracketed: "(", expr, ")". -name: ["a"-"z"]+. -number: ["0"-"9"]+. diff --git a/tests/tests/correct/expr3.req b/tests/tests/correct/expr3.req deleted file mode 100644 index 0d42a022..00000000 --- a/tests/tests/correct/expr3.req +++ /dev/null @@ -1,28 +0,0 @@ -expression: expr. --expr: term; sum; diff. -sum: term, "+", term+"+". -diff: term, "-", term+"-". --term: factor; prod; div. -prod: factor, "×", factor+"×". -div: factor, "÷", factor+"÷". --factor: name; number; bracketed. -bracketed: "(", expr, ")". -name: ["a"-"z"]+. -number: ["0"-"9"]+. -# -234×(bbbb+cccc+dddd)×12 - -# - - - - 234× - ( - - bbbb+ - cccc+ - dddd - )× - 12 - - diff --git a/tests/tests/correct/expr4.inp b/tests/tests/correct/expr4.inp deleted file mode 100644 index 7d7b8281..00000000 --- a/tests/tests/correct/expr4.inp +++ /dev/null @@ -1 +0,0 @@ -pi+(10×a×b)+3.14 diff --git a/tests/tests/correct/expr4.ixml b/tests/tests/correct/expr4.ixml deleted file mode 100644 index 932eeb9b..00000000 --- a/tests/tests/correct/expr4.ixml +++ /dev/null @@ -1,8 +0,0 @@ -expression: expr. --expr: term; sum. -sum: term, "+", term+"+". --term: factor; prod. -prod: factor, "×", factor+"×". --factor: id; number; "(", expr, ")". -id: ["a"-"z"]+. -number: ["0"-"9"]+, (".", ["0"-"9"]+)?. diff --git a/tests/tests/correct/expr4.req b/tests/tests/correct/expr4.req deleted file mode 100644 index 29e4a942..00000000 --- a/tests/tests/correct/expr4.req +++ /dev/null @@ -1,23 +0,0 @@ -expression: expr. --expr: term; sum. -sum: term, "+", term+"+". --term: factor; prod. -prod: factor, "×", factor+"×". --factor: id; number; "(", expr, ")". -id: ["a"-"z"]+. -number: ["0"-"9"]+, (".", ["0"-"9"]+)?. -# -pi+(10×a×b)+3.14 -# - - - - pi+( - - 10× - a× - b - )+ - 3.14 - - diff --git a/tests/tests/correct/expr5.inp b/tests/tests/correct/expr5.inp deleted file mode 100644 index ba65a938..00000000 --- a/tests/tests/correct/expr5.inp +++ /dev/null @@ -1 +0,0 @@ -(3) diff --git a/tests/tests/correct/expr5.ixml b/tests/tests/correct/expr5.ixml deleted file mode 100644 index b1533f7a..00000000 --- a/tests/tests/correct/expr5.ixml +++ /dev/null @@ -1,14 +0,0 @@ -expression: expr. --expr: term; sum; diff. -sum: expr, -"+", term. -diff: expr, "-", term. --term: factor; prod; div. -prod: term, -"×", factor. -div: term, "÷", factor. --factor: id; number; bracketed. -bracketed: -"(", expr, -")". -id: @name. -name: letter+. -number: digit+. --letter: ["a"-"z"]. --digit: ["0"-"9"]. diff --git a/tests/tests/correct/expr5.req b/tests/tests/correct/expr5.req deleted file mode 100644 index 68a80b61..00000000 --- a/tests/tests/correct/expr5.req +++ /dev/null @@ -1,23 +0,0 @@ -expression: expr. --expr: term; sum; diff. -sum: expr, -"+", term. -diff: expr, "-", term. --term: factor; prod; div. -prod: term, -"×", factor. -div: term, "÷", factor. --factor: id; number; bracketed. -bracketed: -"(", expr, -")". -id: @name. -name: letter+. -number: digit+. --letter: ["a"-"z"]. --digit: ["0"-"9"]. -# -(3) -# - - - - 3 - - diff --git a/tests/tests/correct/expr6.inp b/tests/tests/correct/expr6.inp deleted file mode 100644 index ea242b87..00000000 --- a/tests/tests/correct/expr6.inp +++ /dev/null @@ -1 +0,0 @@ -a^2+b×3+c^2 diff --git a/tests/tests/correct/expr6.ixml b/tests/tests/correct/expr6.ixml deleted file mode 100644 index 3bc9fcb2..00000000 --- a/tests/tests/correct/expr6.ixml +++ /dev/null @@ -1,15 +0,0 @@ -expression: expr. --expr: term; sum; diff. -sum: term, "+", term+"+". -diff: term, "-", term+"-". --term: power; prod; div. -prod: power, "×", power+"×". -div: power, "÷", power+"÷". --power: fact; exp. -exp: fact, "^", fact+"^". --fact: id; number; bracketed. -bracketed: "(", exp, ")". -id: letter+. -number: digit+. --letter: ["a"-"z"]. --digit: ['0'-'9']. diff --git a/tests/tests/correct/expr6.req b/tests/tests/correct/expr6.req deleted file mode 100644 index 25606c21..00000000 --- a/tests/tests/correct/expr6.req +++ /dev/null @@ -1,35 +0,0 @@ -expression: expr. --expr: term; sum; diff. -sum: term, "+", term+"+". -diff: term, "-", term+"-". --term: power; prod; div. -prod: power, "×", power+"×". -div: power, "÷", power+"÷". --power: fact; exp. -exp: fact, "^", fact+"^". --fact: id; number; bracketed. -bracketed: "(", exp, ")". -id: letter+. -number: digit+. --letter: ["a"-"z"]. --digit: ['0'-'9']. -# -a^2+b×3+c^2 -# - - - - - a^ - 2 - + - - b× - 3 - + - - c^ - 2 - - - diff --git a/tests/tests/correct/hash.inp b/tests/tests/correct/hash.inp deleted file mode 100644 index 00e7e018..00000000 --- a/tests/tests/correct/hash.inp +++ /dev/null @@ -1,2 +0,0 @@ -#1 #12 #123 #1234 #12345 #123456 #1. - diff --git a/tests/tests/correct/hash.ixml b/tests/tests/correct/hash.ixml deleted file mode 100644 index 3a057ae0..00000000 --- a/tests/tests/correct/hash.ixml +++ /dev/null @@ -1,5 +0,0 @@ -hashes: hash*S, ".". -hash: "#", d6. -@d6: d, (d, (d, (d, (d, d?)?)?)?)?. --d: ["0"-"9"]. --S: " "+. diff --git a/tests/tests/correct/hash.req b/tests/tests/correct/hash.req deleted file mode 100644 index 3b617fdf..00000000 --- a/tests/tests/correct/hash.req +++ /dev/null @@ -1,18 +0,0 @@ -hashes: hash*S, ".". -hash: "#", d6. -@d6: d, (d, (d, (d, (d, d?)?)?)?)?. --d: ["0"-"9"]. --S: " "+. -# -#1 #12 #123 #1234 #12345 #123456 #1. - -# - - - # - # - # - # - # - # - #. diff --git a/tests/tests/correct/hex.inp b/tests/tests/correct/hex.inp deleted file mode 100644 index b2901ea9..00000000 --- a/tests/tests/correct/hex.inp +++ /dev/null @@ -1 +0,0 @@ -a b diff --git a/tests/tests/correct/hex.ixml b/tests/tests/correct/hex.ixml deleted file mode 100644 index a89f2e15..00000000 --- a/tests/tests/correct/hex.ixml +++ /dev/null @@ -1 +0,0 @@ -hex: "a", [#20], "b". diff --git a/tests/tests/correct/hex.req b/tests/tests/correct/hex.req deleted file mode 100644 index c2885a97..00000000 --- a/tests/tests/correct/hex.req +++ /dev/null @@ -1,6 +0,0 @@ -hex: "a", [#20], "b". -# -a b -# - -a b diff --git a/tests/tests/correct/hex1.inp b/tests/tests/correct/hex1.inp deleted file mode 100644 index b2901ea9..00000000 --- a/tests/tests/correct/hex1.inp +++ /dev/null @@ -1 +0,0 @@ -a b diff --git a/tests/tests/correct/hex1.ixml b/tests/tests/correct/hex1.ixml deleted file mode 100644 index dc0ea049..00000000 --- a/tests/tests/correct/hex1.ixml +++ /dev/null @@ -1 +0,0 @@ -hex: "a", #20, "b". diff --git a/tests/tests/correct/hex1.req b/tests/tests/correct/hex1.req deleted file mode 100644 index f052320e..00000000 --- a/tests/tests/correct/hex1.req +++ /dev/null @@ -1,6 +0,0 @@ -hex: "a", #20, "b". -# -a b -# - -a b diff --git a/tests/tests/correct/hex3.inp b/tests/tests/correct/hex3.inp deleted file mode 100644 index f32982dd..00000000 --- a/tests/tests/correct/hex3.inp +++ /dev/null @@ -1 +0,0 @@ -a!b diff --git a/tests/tests/correct/hex3.ixml b/tests/tests/correct/hex3.ixml deleted file mode 100644 index 847fbd36..00000000 --- a/tests/tests/correct/hex3.ixml +++ /dev/null @@ -1 +0,0 @@ -hex: "a", [#1-#7e], "b". diff --git a/tests/tests/correct/hex3.req b/tests/tests/correct/hex3.req deleted file mode 100644 index 9eaaeaf1..00000000 --- a/tests/tests/correct/hex3.req +++ /dev/null @@ -1,6 +0,0 @@ -hex: "a", [#1-#7e], "b". -# -a!b -# - -a!b diff --git a/tests/tests/correct/json.inp b/tests/tests/correct/json.inp deleted file mode 100644 index 696a9676..00000000 --- a/tests/tests/correct/json.inp +++ /dev/null @@ -1,18 +0,0 @@ -{"menu": { - "id": "file", - "value": "File", - "popup": { - "menuitem": [ - {"value": "New", "onclick": "CreateNewDoc()"}, - {"value": "Open", "onclick": "OpenDoc()"}, - {"value": "Close", "onclick": "CloseDoc()"} - ] - } - }, - "number": -0.0e+00, - "string": "\uffff", - "bool": true, - "also": false, - "no": null -} - diff --git a/tests/tests/correct/json.ixml b/tests/tests/correct/json.ixml deleted file mode 100644 index a30ab870..00000000 --- a/tests/tests/correct/json.ixml +++ /dev/null @@ -1,29 +0,0 @@ -json: element. -element: value. --value: string; - number; - object; - array; - "true", S; - "false", S; - "null", S. -object: "{", S, members, "}", S. --members: member*(",", S). -member: @string, S, ":", S, element. -array: "[", S, elements, "]", S. -elements: element*(",", S). -string: -'"', character*, -'"'. --character: ~['"\'; #0-#19]; - "\", escape. -escape: ['"\/bfnrt']; - "u", hex, hex, hex, hex. -hex: digit; ["A"-"F"; "a"-"f"]. -number: int, frac, exp. -int: "-"?, digit; - "-"?, onenine, digit*. -digit: ["0"-"9"]. -onenine: ["1"-"9"]. -frac: (".", digit+)?. -exp: (["eE"], sign, digit+)?. -sign: ["+-"]?. --S: -[#9; #a; #d; " "]*. diff --git a/tests/tests/correct/json.req b/tests/tests/correct/json.req deleted file mode 100644 index b1c3fa84..00000000 --- a/tests/tests/correct/json.req +++ /dev/null @@ -1,159 +0,0 @@ -json: element. -element: value. --value: string; - number; - object; - array; - "true", S; - "false", S; - "null", S. -object: "{", S, members, "}", S. --members: member*(",", S). -member: @string, S, ":", S, element. -array: "[", S, elements, "]", S. -elements: element*(",", S). -string: -'"', character*, -'"'. --character: ~['"\'; #0-#19]; - "\", escape. -escape: ['"\/bfnrt']; - "u", hex, hex, hex, hex. -hex: digit; ["A"-"F"; "a"-"f"]. -number: int, frac, exp. -int: "-"?, digit; - "-"?, onenine, digit*. -digit: ["0"-"9"]. -onenine: ["1"-"9"]. -frac: (".", digit+)?. -exp: (["eE"], sign, digit+)?. -sign: ["+-"]?. --S: -[#9; #a; #d; " "]*. -# -{"menu": { - "id": "file", - "value": "File", - "popup": { - "menuitem": [ - {"value": "New", "onclick": "CreateNewDoc()"}, - {"value": "Open", "onclick": "OpenDoc()"}, - {"value": "Close", "onclick": "CloseDoc()"} - ] - } - }, - "number": -0.0e+00, - "string": "\uffff", - "bool": true, - "also": false, - "no": null -} - -# - - - - { - : - - { - : - - file - - , - : - - File - - , - : - - { - : - - [ - - - { - : - - New - - , - : - - CreateNewDoc() - - } - , - - { - : - - Open - - , - : - - OpenDoc() - - } - , - - { - : - - Close - - , - : - - CloseDoc() - - } - - ] - - } - - } - - , - : - - - - - 0 - - . - 0 - - e - + - 0 - 0 - - - - , - : - - \ - u - f - f - f - f - - - - , - : - true - , - : - false - , - : - null - } - - diff --git a/tests/tests/correct/json1.inp b/tests/tests/correct/json1.inp deleted file mode 100644 index d8da20d3..00000000 --- a/tests/tests/correct/json1.inp +++ /dev/null @@ -1 +0,0 @@ -{"name": "pi", "value": 3.145926} diff --git a/tests/tests/correct/json1.ixml b/tests/tests/correct/json1.ixml deleted file mode 100644 index 190e3e97..00000000 --- a/tests/tests/correct/json1.ixml +++ /dev/null @@ -1,19 +0,0 @@ -json: S, object. -object: "{", S, members, "}", S. --members: pair*(",", S). -pair: @string, S, ":", S, value. -array: "[", S, value*(",", S), "]", S. --value: string, S; number, S; object; array; "true", S; "false", S; "null", S. -string: -"""", char*, -"""". --char: ~['"'; "\" {;[#0-#1F];}]; '\', ('"'; "\"; "/"; "b"; "f"; "n"; "r"; "t"; "u", hexdigits). -number: "-"?, int, frac?, exp?. --int: "0"; digit19, digit*. --frac: ".", digit+. --exp: ("e"; "E"), sign?, digit+. --sign: "+"; "-". --S: " "*. --digit: ["0"-"9"]. --digit19: ["1"-"9"]. --hexdigits: hexdigit, hexdigit, hexdigit, hexdigit. --hexdigit: digit; ["a"-"f"]; ["A"-"F"]. - diff --git a/tests/tests/correct/json1.req b/tests/tests/correct/json1.req deleted file mode 100644 index 37bf7cac..00000000 --- a/tests/tests/correct/json1.req +++ /dev/null @@ -1,32 +0,0 @@ -json: S, object. -object: "{", S, members, "}", S. --members: pair*(",", S). -pair: @string, S, ":", S, value. -array: "[", S, value*(",", S), "]", S. --value: string, S; number, S; object; array; "true", S; "false", S; "null", S. -string: -"""", char*, -"""". --char: ~['"'; "\" {;[#0-#1F];}]; '\', ('"'; "\"; "/"; "b"; "f"; "n"; "r"; "t"; "u", hexdigits). -number: "-"?, int, frac?, exp?. --int: "0"; digit19, digit*. --frac: ".", digit+. --exp: ("e"; "E"), sign?, digit+. --sign: "+"; "-". --S: " "*. --digit: ["0"-"9"]. --digit19: ["1"-"9"]. --hexdigits: hexdigit, hexdigit, hexdigit, hexdigit. --hexdigit: digit; ["a"-"f"]; ["A"-"F"]. - -# -{"name": "pi", "value": 3.145926} -# - - - { - : - pi - , - : - 3.145926 - } - diff --git a/tests/tests/correct/lf.inp b/tests/tests/correct/lf.inp deleted file mode 100644 index f4f31b7e..00000000 --- a/tests/tests/correct/lf.inp +++ /dev/null @@ -1,3 +0,0 @@ -Now is the time -For all good people -To have fun. \ No newline at end of file diff --git a/tests/tests/correct/lf.ixml b/tests/tests/correct/lf.ixml deleted file mode 100644 index 0512a073..00000000 --- a/tests/tests/correct/lf.ixml +++ /dev/null @@ -1,3 +0,0 @@ -input: line+lf. -line: ~[#a]*. -lf: -#a. diff --git a/tests/tests/correct/lf.req b/tests/tests/correct/lf.req deleted file mode 100644 index bd861117..00000000 --- a/tests/tests/correct/lf.req +++ /dev/null @@ -1,15 +0,0 @@ -input: line+lf. -line: ~[#a]*. -lf: -#a. -# -Now is the time -For all good people -To have fun.# - - - Now is the time - - For all good people - - To have fun. - diff --git a/tests/tests/correct/lf.res b/tests/tests/correct/lf.res deleted file mode 100644 index 1ef119db..00000000 --- a/tests/tests/correct/lf.res +++ /dev/null @@ -1,17 +0,0 @@ -input: line+lf. -line: ~[#a]*. -lf: -#a. -# -Now is the time -For all good people -To have fun.# - - - Now is the time - - For all good people - - To have fun. - - - diff --git a/tests/tests/correct/lf1.inp b/tests/tests/correct/lf1.inp deleted file mode 100644 index 984acbd1..00000000 --- a/tests/tests/correct/lf1.inp +++ /dev/null @@ -1,3 +0,0 @@ -Now is the time -For all good people -To have fun. diff --git a/tests/tests/correct/lf1.ixml b/tests/tests/correct/lf1.ixml deleted file mode 100644 index 0512a073..00000000 --- a/tests/tests/correct/lf1.ixml +++ /dev/null @@ -1,3 +0,0 @@ -input: line+lf. -line: ~[#a]*. -lf: -#a. diff --git a/tests/tests/correct/lf1.req b/tests/tests/correct/lf1.req deleted file mode 100644 index a2644245..00000000 --- a/tests/tests/correct/lf1.req +++ /dev/null @@ -1,18 +0,0 @@ -input: line+lf. -line: ~[#a]*. -lf: -#a. -# -Now is the time -For all good people -To have fun. -# - - - Now is the time - - For all good people - - To have fun. - - - diff --git a/tests/tests/correct/marked.inp b/tests/tests/correct/marked.inp deleted file mode 100644 index 5931a55d..00000000 --- a/tests/tests/correct/marked.inp +++ /dev/null @@ -1 +0,0 @@ -!d \ No newline at end of file diff --git a/tests/tests/correct/marked.ixml b/tests/tests/correct/marked.ixml deleted file mode 100644 index e97cd097..00000000 --- a/tests/tests/correct/marked.ixml +++ /dev/null @@ -1,3 +0,0 @@ -a: @b; "!", c. -b: c. -c: "d". \ No newline at end of file diff --git a/tests/tests/correct/marked.req b/tests/tests/correct/marked.req deleted file mode 100644 index 872d5531..00000000 --- a/tests/tests/correct/marked.req +++ /dev/null @@ -1,8 +0,0 @@ -a: @b; "!", c. -b: c. -c: "d".# -!d# - -! - d - diff --git a/tests/tests/correct/nested-comment.inp b/tests/tests/correct/nested-comment.inp deleted file mode 100644 index 61780798..00000000 --- a/tests/tests/correct/nested-comment.inp +++ /dev/null @@ -1 +0,0 @@ -b diff --git a/tests/tests/correct/nested-comment.ixml b/tests/tests/correct/nested-comment.ixml deleted file mode 100644 index aab5c763..00000000 --- a/tests/tests/correct/nested-comment.ixml +++ /dev/null @@ -1,6 +0,0 @@ -a: b, c. -b: "b". {here is a comment -{with a nested comment -b: "c". -}} -c: . diff --git a/tests/tests/correct/nested-comment.req b/tests/tests/correct/nested-comment.req deleted file mode 100644 index 9cc3f237..00000000 --- a/tests/tests/correct/nested-comment.req +++ /dev/null @@ -1,14 +0,0 @@ -a: b, c. -b: "b". {here is a comment -{with a nested comment -b: "c". -}} -c: . -# -b -# - - - b - - diff --git a/tests/tests/correct/para-test.inp b/tests/tests/correct/para-test.inp deleted file mode 100644 index 74573674..00000000 --- a/tests/tests/correct/para-test.inp +++ /dev/null @@ -1,9 +0,0 @@ -31 December 2021 -Para entry. - -Here is another paragraph. -See? -It consists of several lines. - -And another. -The end. diff --git a/tests/tests/correct/para-test.ixml b/tests/tests/correct/para-test.ixml deleted file mode 100644 index 629d100d..00000000 --- a/tests/tests/correct/para-test.ixml +++ /dev/null @@ -1,4 +0,0 @@ -document: para+lf. -para: line+. -line: ~[#a]+, lf. --lf: -#a. diff --git a/tests/tests/correct/para-test.req b/tests/tests/correct/para-test.req deleted file mode 100644 index 0c6021ac..00000000 --- a/tests/tests/correct/para-test.req +++ /dev/null @@ -1,31 +0,0 @@ -document: para+lf. -para: line+. -line: ~[#a]+, lf. --lf: -#a. -# -31 December 2021 -Para entry. - -Here is another paragraph. -See? -It consists of several lines. - -And another. -The end. -# - - - - 31 December 2021 - Para entry. - - - Here is another paragraph. - See? - It consists of several lines. - - - And another. - The end. - - diff --git a/tests/tests/correct/para-test.res b/tests/tests/correct/para-test.res deleted file mode 100644 index 0c6021ac..00000000 --- a/tests/tests/correct/para-test.res +++ /dev/null @@ -1,31 +0,0 @@ -document: para+lf. -para: line+. -line: ~[#a]+, lf. --lf: -#a. -# -31 December 2021 -Para entry. - -Here is another paragraph. -See? -It consists of several lines. - -And another. -The end. -# - - - - 31 December 2021 - Para entry. - - - Here is another paragraph. - See? - It consists of several lines. - - - And another. - The end. - - diff --git a/tests/tests/correct/poly.inp b/tests/tests/correct/poly.inp deleted file mode 100644 index 7d48ce23..00000000 --- a/tests/tests/correct/poly.inp +++ /dev/null @@ -1,2 +0,0 @@ -44x⁷⁸⁹+13x²-20x+1 - diff --git a/tests/tests/correct/poly.ixml b/tests/tests/correct/poly.ixml deleted file mode 100644 index fb57f6ce..00000000 --- a/tests/tests/correct/poly.ixml +++ /dev/null @@ -1,9 +0,0 @@ -polynomial: f, (plus; minus)*. {4x2+3x-2} -plus: -"+", -f. -minus: -"-", -f. -@power: exp. -@constant: @n. --f: @n, -"x", @power?; constant. -n: ["0"-"9"]+. -exp: ("⁰"; "¹"; "²";"³"; "⁴"; "⁵"; "⁶"; "⁷"; "⁸"; "⁹")+. - diff --git a/tests/tests/correct/poly.req b/tests/tests/correct/poly.req deleted file mode 100644 index 96285536..00000000 --- a/tests/tests/correct/poly.req +++ /dev/null @@ -1,19 +0,0 @@ -polynomial: f, (plus; minus)*. {4x2+3x-2} -plus: -"+", -f. -minus: -"-", -f. -@power: exp. -@constant: @n. --f: @n, -"x", @power?; constant. -n: ["0"-"9"]+. -exp: ("⁰"; "¹"; "²";"³"; "⁴"; "⁵"; "⁶"; "⁷"; "⁸"; "⁹")+. - -# -44x⁷⁸⁹+13x²-20x+1 - -# - - - - - - diff --git a/tests/tests/correct/program.inp b/tests/tests/correct/program.inp deleted file mode 100644 index 3c861058..00000000 --- a/tests/tests/correct/program.inp +++ /dev/null @@ -1 +0,0 @@ -{a=0;f(a, 0);} diff --git a/tests/tests/correct/program.ixml b/tests/tests/correct/program.ixml deleted file mode 100644 index 5c9f47f6..00000000 --- a/tests/tests/correct/program.ixml +++ /dev/null @@ -1,17 +0,0 @@ -program: block. -block: "{", S, statement*(";", S), "}", S. -statement: if-statement; while-statement; assignment; call; block; . -if-statement: "if", S, condition, "then", S, statement, else-part?. -else-part: "else", S, statement. -while-statement: "while", S, condition, "do", S, statement. -assignment: variable, "=", S, expression. -variable: identifier. -call: identifier, "(", S, parameter*(",", S), ")", S. -parameter: -expression. -identifier: letter+, S. -expression: identifier; number. -number: digit+, S. --letter: ["a"-"z"]; ["A"-"Z"]. --digit: ["0"-"9"]. -condition: identifier. --S: " "*. diff --git a/tests/tests/correct/program.req b/tests/tests/correct/program.req deleted file mode 100644 index 6c11a8a2..00000000 --- a/tests/tests/correct/program.req +++ /dev/null @@ -1,45 +0,0 @@ -program: block. -block: "{", S, statement*(";", S), "}", S. -statement: if-statement; while-statement; assignment; call; block; . -if-statement: "if", S, condition, "then", S, statement, else-part?. -else-part: "else", S, statement. -while-statement: "while", S, condition, "do", S, statement. -assignment: variable, "=", S, expression. -variable: identifier. -call: identifier, "(", S, parameter*(",", S), ")", S. -parameter: -expression. -identifier: letter+, S. -expression: identifier; number. -number: digit+, S. --letter: ["a"-"z"]; ["A"-"Z"]. --digit: ["0"-"9"]. -condition: identifier. --S: " "*. -# -{a=0;f(a, 0);} -# - - - { - - - - a - = - - 0 - - - ; - - - f( - - a - , - - 0 - ) - ; - } - diff --git a/tests/tests/correct/range-comments.inp b/tests/tests/correct/range-comments.inp deleted file mode 100644 index f121bdbf..00000000 --- a/tests/tests/correct/range-comments.inp +++ /dev/null @@ -1 +0,0 @@ -name diff --git a/tests/tests/correct/range-comments.ixml b/tests/tests/correct/range-comments.ixml deleted file mode 100644 index 3ccff1e1..00000000 --- a/tests/tests/correct/range-comments.ixml +++ /dev/null @@ -1,2 +0,0 @@ -name: letter*. -letter: [{comment}"a"{comment}-{comment}"z"{comment}]. diff --git a/tests/tests/correct/range-comments.req b/tests/tests/correct/range-comments.req deleted file mode 100644 index 57ca2c9b..00000000 --- a/tests/tests/correct/range-comments.req +++ /dev/null @@ -1,12 +0,0 @@ -name: letter*. -letter: [{comment}"a"{comment}-{comment}"z"{comment}]. -# -name -# - - - n - a - m - e - diff --git a/tests/tests/correct/range.inp b/tests/tests/correct/range.inp deleted file mode 100644 index 1d470f6d..00000000 --- a/tests/tests/correct/range.inp +++ /dev/null @@ -1 +0,0 @@ -5 . diff --git a/tests/tests/correct/range.ixml b/tests/tests/correct/range.ixml deleted file mode 100644 index aafbb68e..00000000 --- a/tests/tests/correct/range.ixml +++ /dev/null @@ -1,3 +0,0 @@ -data: range1, range2, -".". -range1: ["0"-"9"]. -range2: [#0-#9]. diff --git a/tests/tests/correct/range.req b/tests/tests/correct/range.req deleted file mode 100644 index d8c50394..00000000 --- a/tests/tests/correct/range.req +++ /dev/null @@ -1,11 +0,0 @@ -data: range1, range2, -".". -range1: ["0"-"9"]. -range2: [#0-#9]. -# -5 . -# - - - 5 - - diff --git a/tests/tests/correct/ranges.inp b/tests/tests/correct/ranges.inp deleted file mode 100644 index 0ace0494..00000000 --- a/tests/tests/correct/ranges.inp +++ /dev/null @@ -1 +0,0 @@ - !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ diff --git a/tests/tests/correct/ranges.ixml b/tests/tests/correct/ranges.ixml deleted file mode 100644 index 9d61f0ce..00000000 --- a/tests/tests/correct/ranges.ixml +++ /dev/null @@ -1,15 +0,0 @@ -test: other, digit, other, cap, other, lc, other, lf?. -other: ~[#a; #30-#39; #41-#5A; #61-#7A]+. -cap: [#41-#5A]+. -lc: [#61-#7A]+. -digit: [#30-#39]+. --lf: -#a. -{ -0123456789abcdef - !"#$%&'()*+,-./ -0123456789:;<=>? -@ABCDEFGHIJKLMNO -PQRSTUVWXYZ[\]^_ -`abcdefghijklmno -pqrstuvwxyz{|}~ -} \ No newline at end of file diff --git a/tests/tests/correct/ranges.req b/tests/tests/correct/ranges.req deleted file mode 100644 index faaa217e..00000000 --- a/tests/tests/correct/ranges.req +++ /dev/null @@ -1,27 +0,0 @@ -test: other, digit, other, cap, other, lc, other, lf?. -other: ~[#a; #30-#39; #41-#5A; #61-#7A]+. -cap: [#41-#5A]+. -lc: [#61-#7A]+. -digit: [#30-#39]+. --lf: -#a. -{ -0123456789abcdef - !"#$%&'()*+,-./ -0123456789:;<=>? -@ABCDEFGHIJKLMNO -PQRSTUVWXYZ[\]^_ -`abcdefghijklmno -pqrstuvwxyz{|}~ -}# - !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ -# - - - !"#$%&'()*+,-./ - 0123456789 - :;<=>?@ - ABCDEFGHIJKLMNOPQRSTUVWXYZ - [\]^_` - abcdefghijklmnopqrstuvwxyz - {|}~ - diff --git a/tests/tests/correct/ranges1.inp b/tests/tests/correct/ranges1.inp deleted file mode 100644 index 8d188c4c..00000000 --- a/tests/tests/correct/ranges1.inp +++ /dev/null @@ -1 +0,0 @@ -!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ diff --git a/tests/tests/correct/ranges1.ixml b/tests/tests/correct/ranges1.ixml deleted file mode 100644 index 5fc72892..00000000 --- a/tests/tests/correct/ranges1.ixml +++ /dev/null @@ -1,20 +0,0 @@ -chars: punctuation, nonpunct?; upper, nonupper?; lower, nonlower?; digit, nondigit?. --nonpunct: upper, nonupper?; lower, nonlower?; digit, nondigit?. --nonupper: punctuation, nonpunct?; lower, nonlower?; digit, nondigit?. --nonlower: punctuation, nonpunct?; upper, nonupper?; digit, nondigit?. --nondigit: punctuation, nonpunct?; upper, nonupper?; lower, nonlower?. - -upper: [#41-#5A]+. -lower: [#61-#7A]+. -digit: [#30-#39]+. -punctuation: ~[#a; #30-#39; #41-#5A; #61-#7A]+. -{-lf: -#a.} -{ -0123456789abcdef - !"#$%&'()*+,-./ -0123456789:;<=>? -@ABCDEFGHIJKLMNO -PQRSTUVWXYZ[\]^_ -`abcdefghijklmno -pqrstuvwxyz{|}~ -} \ No newline at end of file diff --git a/tests/tests/correct/ranges1.req b/tests/tests/correct/ranges1.req deleted file mode 100644 index 51a7351b..00000000 --- a/tests/tests/correct/ranges1.req +++ /dev/null @@ -1,32 +0,0 @@ -chars: punctuation, nonpunct?; upper, nonupper?; lower, nonlower?; digit, nondigit?. --nonpunct: upper, nonupper?; lower, nonlower?; digit, nondigit?. --nonupper: punctuation, nonpunct?; lower, nonlower?; digit, nondigit?. --nonlower: punctuation, nonpunct?; upper, nonupper?; digit, nondigit?. --nondigit: punctuation, nonpunct?; upper, nonupper?; lower, nonlower?. - -upper: [#41-#5A]+. -lower: [#61-#7A]+. -digit: [#30-#39]+. -punctuation: ~[#a; #30-#39; #41-#5A; #61-#7A]+. -{-lf: -#a.} -{ -0123456789abcdef - !"#$%&'()*+,-./ -0123456789:;<=>? -@ABCDEFGHIJKLMNO -PQRSTUVWXYZ[\]^_ -`abcdefghijklmno -pqrstuvwxyz{|}~ -}# -!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ -# - - - !"#$%&'()*+,-./ - 0123456789 - :;<=>?@ - ABCDEFGHIJKLMNOPQRSTUVWXYZ - [\]^_` - abcdefghijklmnopqrstuvwxyz - {|}~ - diff --git a/tests/tests/correct/string.inp b/tests/tests/correct/string.inp deleted file mode 100644 index 8717d841..00000000 --- a/tests/tests/correct/string.inp +++ /dev/null @@ -1 +0,0 @@ -aaa.bbb.ccc. diff --git a/tests/tests/correct/string.ixml b/tests/tests/correct/string.ixml deleted file mode 100644 index 8dc014e5..00000000 --- a/tests/tests/correct/string.ixml +++ /dev/null @@ -1,5 +0,0 @@ -S : @able, baker, @charlie. -able: string. -baker: string. -charlie: string. -string: ["abc"]*, ".". diff --git a/tests/tests/correct/string.req b/tests/tests/correct/string.req deleted file mode 100644 index d1e4cc03..00000000 --- a/tests/tests/correct/string.req +++ /dev/null @@ -1,14 +0,0 @@ -S : @able, baker, @charlie. -able: string. -baker: string. -charlie: string. -string: ["abc"]*, ".". -# -aaa.bbb.ccc. -# - - - - bbb. - - diff --git a/tests/tests/correct/tab.inp b/tests/tests/correct/tab.inp deleted file mode 100644 index 2c0bcdaf..00000000 --- a/tests/tests/correct/tab.inp +++ /dev/null @@ -1 +0,0 @@ - abc diff --git a/tests/tests/correct/tab.ixml b/tests/tests/correct/tab.ixml deleted file mode 100644 index 48149f1f..00000000 --- a/tests/tests/correct/tab.ixml +++ /dev/null @@ -1,3 +0,0 @@ -data: s?, word. --s: [#20; #9]+. -word: [L]+. diff --git a/tests/tests/correct/tab.req b/tests/tests/correct/tab.req deleted file mode 100644 index 73709bb3..00000000 --- a/tests/tests/correct/tab.req +++ /dev/null @@ -1,10 +0,0 @@ -data: s?, word. --s: [#20; #9]+. -word: [L]+. -# - abc -# - - - abc - diff --git a/tests/tests/correct/test.inp b/tests/tests/correct/test.inp deleted file mode 100644 index 0898d286..00000000 --- a/tests/tests/correct/test.inp +++ /dev/null @@ -1,2 +0,0 @@ -.. - diff --git a/tests/tests/correct/test.ixml b/tests/tests/correct/test.ixml deleted file mode 100644 index f05624d9..00000000 --- a/tests/tests/correct/test.ixml +++ /dev/null @@ -1,4 +0,0 @@ -test: foo, bar. -foo: -".". -bar: ".". - diff --git a/tests/tests/correct/test.req b/tests/tests/correct/test.req deleted file mode 100644 index eec6245c..00000000 --- a/tests/tests/correct/test.req +++ /dev/null @@ -1,13 +0,0 @@ -test: foo, bar. -foo: -".". -bar: ".". - -# -.. - -# - - - - . - diff --git a/tests/tests/correct/unicode-range.inp b/tests/tests/correct/unicode-range.inp deleted file mode 100644 index fe348db9..00000000 --- a/tests/tests/correct/unicode-range.inp +++ /dev/null @@ -1 +0,0 @@ -ŤĤıŞıŞÀŤėšť diff --git a/tests/tests/correct/unicode-range.ixml b/tests/tests/correct/unicode-range.ixml deleted file mode 100644 index c5546dd9..00000000 --- a/tests/tests/correct/unicode-range.ixml +++ /dev/null @@ -1 +0,0 @@ -latin: ["À"-"ž"]+. diff --git a/tests/tests/correct/unicode-range.req b/tests/tests/correct/unicode-range.req deleted file mode 100644 index c0305073..00000000 --- a/tests/tests/correct/unicode-range.req +++ /dev/null @@ -1,5 +0,0 @@ -latin: ["À"-"ž"]+. -# -ŤĤıŞıŞÀŤėšť -# -ŤĤıŞıŞŤėšť diff --git a/tests/tests/correct/unicode-range.res b/tests/tests/correct/unicode-range.res deleted file mode 100644 index 22a9df13..00000000 --- a/tests/tests/correct/unicode-range.res +++ /dev/null @@ -1,14 +0,0 @@ -latin: ["À"-"ž"]+. -# -ŤĤıŞıŞÀŤėšť -# - -**** Bound of range must be a single character - 1 latin: ["À"-"ž"]+. - ^ - -**** Bound of range must be a single character - 1 latin: ["À"-"ž"]+. - ^ -**** Parsing failed at line 1: Bound of range must be a single character -Failed diff --git a/tests/tests/correct/unicode-range1.inp b/tests/tests/correct/unicode-range1.inp deleted file mode 100644 index cd75137e..00000000 --- a/tests/tests/correct/unicode-range1.inp +++ /dev/null @@ -1 +0,0 @@ -¡¢£¤¥¦§¨©«¬®¯°±²³´µ¶·¸¹»¼½¾¿×÷ diff --git a/tests/tests/correct/unicode-range1.ixml b/tests/tests/correct/unicode-range1.ixml deleted file mode 100644 index fc7f47c2..00000000 --- a/tests/tests/correct/unicode-range1.ixml +++ /dev/null @@ -1 +0,0 @@ -chars: [#1-"÷"]+. diff --git a/tests/tests/correct/unicode-range1.req b/tests/tests/correct/unicode-range1.req deleted file mode 100644 index f907e9fc..00000000 --- a/tests/tests/correct/unicode-range1.req +++ /dev/null @@ -1,5 +0,0 @@ -chars: [#1-"÷"]+. -# -¡¢£¤¥¦§¨©«¬®¯°±²³´µ¶·¸¹»¼½¾¿×÷ -# -¡¢£¤¥¦§¨©«¬®¯°±²³´µ¶·¸¹»¼½¾¿×÷ diff --git a/tests/tests/correct/unicode-range1.res b/tests/tests/correct/unicode-range1.res deleted file mode 100644 index 9a610692..00000000 --- a/tests/tests/correct/unicode-range1.res +++ /dev/null @@ -1,10 +0,0 @@ -chars: [#1-"÷"]+. -# -¡¢£¤¥¦§¨©«¬®¯°±²³´µ¶·¸¹»¼½¾¿×÷ -# - -**** Bound of range must be a single character - 1 chars: [#1-"÷"]+. - ^ -**** Parsing failed at line 1: Bound of range must be a single character -Failed diff --git a/tests/tests/correct/unicode-range2.inp b/tests/tests/correct/unicode-range2.inp deleted file mode 100644 index 8baef1b4..00000000 --- a/tests/tests/correct/unicode-range2.inp +++ /dev/null @@ -1 +0,0 @@ -abc diff --git a/tests/tests/correct/unicode-range2.ixml b/tests/tests/correct/unicode-range2.ixml deleted file mode 100644 index a5a5b9d3..00000000 --- a/tests/tests/correct/unicode-range2.ixml +++ /dev/null @@ -1 +0,0 @@ -chars: [#60-#70]+. diff --git a/tests/tests/correct/unicode-range2.req b/tests/tests/correct/unicode-range2.req deleted file mode 100644 index 2e9addcf..00000000 --- a/tests/tests/correct/unicode-range2.req +++ /dev/null @@ -1,6 +0,0 @@ -chars: [#60-#70]+. -# -abc -# - -abc diff --git a/tests/tests/correct/vcard.inp b/tests/tests/correct/vcard.inp deleted file mode 100644 index 746ca436..00000000 --- a/tests/tests/correct/vcard.inp +++ /dev/null @@ -1,10 +0,0 @@ -BEGIN:VCARD -VERSION:3.0 -N:Lastname;Surname -FN:Displayname -ORG:EVenX -URL:http://www.evenx.com/ -EMAIL:info@evenx.com -TEL;TYPE=voice,work,pref:+49 1234 56788 -ADR;TYPE=intl,work,postal,parcel:;;Wallstr. 1;Berlin;;12345;Germany -END:VCARD diff --git a/tests/tests/correct/vcard.ixml b/tests/tests/correct/vcard.ixml deleted file mode 100644 index 3e7f10fe..00000000 --- a/tests/tests/correct/vcard.ixml +++ /dev/null @@ -1,11 +0,0 @@ -card: -"BEGIN:", name, eoln, property+, -"END:", endname, eoln. -property: name, parameters, -":", attribute+-";", -eoln. -parameters: (-";", parameter)*. -parameter: name, -"=", pvalue. -@pvalue: ~[";:"; #a]+. -attribute: value. -@value: achar*. --achar: ~["#;"; #a]. -@name: ["a"-"z"; "A"-"Z"]+. -@endname: name. --eoln: -#a. diff --git a/tests/tests/correct/vcard.req b/tests/tests/correct/vcard.req deleted file mode 100644 index 1af0452f..00000000 --- a/tests/tests/correct/vcard.req +++ /dev/null @@ -1,69 +0,0 @@ -card: -"BEGIN:", name, eoln, property+, -"END:", endname, eoln. -property: name, parameters, -":", attribute+-";", -eoln. -parameters: (-";", parameter)*. -parameter: name, -"=", pvalue. -@pvalue: ~[";:"; #a]+. -attribute: value. -@value: achar*. --achar: ~["#;"; #a]. -@name: ["a"-"z"; "A"-"Z"]+. -@endname: name. --eoln: -#a. -# -BEGIN:VCARD -VERSION:3.0 -N:Lastname;Surname -FN:Displayname -ORG:EVenX -URL:http://www.evenx.com/ -EMAIL:info@evenx.com -TEL;TYPE=voice,work,pref:+49 1234 56788 -ADR;TYPE=intl,work,postal,parcel:;;Wallstr. 1;Berlin;;12345;Germany -END:VCARD -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/tests/correct/xml.inp b/tests/tests/correct/xml.inp deleted file mode 100644 index 25d43926..00000000 --- a/tests/tests/correct/xml.inp +++ /dev/null @@ -1,4 +0,0 @@ - - Now is the time for stuff. - - diff --git a/tests/tests/correct/xml.ixml b/tests/tests/correct/xml.ixml deleted file mode 100644 index 8a33aa9c..00000000 --- a/tests/tests/correct/xml.ixml +++ /dev/null @@ -1,11 +0,0 @@ -xml: element. -element: -"<", name, (" "+, attribute)*, (-">", content, -""; -"/>"). -@name: ["a"-"z"; "A"-"Z"]+. -@close: name. -attribute: name, -"=", value. -@value: -'"', dchar*, -'"'; -"'", schar*, -"'". -content: (cchar; element)*. --dchar: ~['"']. --schar: ~["'"]. --cchar: ~["<"]. - diff --git a/tests/tests/correct/xml.req b/tests/tests/correct/xml.req deleted file mode 100644 index b559127f..00000000 --- a/tests/tests/correct/xml.req +++ /dev/null @@ -1,30 +0,0 @@ -xml: element. -element: -"<", name, (" "+, attribute)*, (-">", content, -""; -"/>"). -@name: ["a"-"z"; "A"-"Z"]+. -@close: name. -attribute: name, -"=", value. -@value: -'"', dchar*, -'"'; -"'", schar*, -"'". -content: (cchar; element)*. --dchar: ~['"']. --schar: ~["'"]. --cchar: ~["<"]. - -# - - Now is the time for stuff. - - -# - - - - - - - Now is the - - time - for stuff. - - - diff --git a/tests/tests/correct/xml1.inp b/tests/tests/correct/xml1.inp deleted file mode 100644 index 6dfb50b4..00000000 --- a/tests/tests/correct/xml1.inp +++ /dev/null @@ -1,4 +0,0 @@ - - This is a test. - - diff --git a/tests/tests/correct/xml1.ixml b/tests/tests/correct/xml1.ixml deleted file mode 100644 index 5fae05e3..00000000 --- a/tests/tests/correct/xml1.ixml +++ /dev/null @@ -1,10 +0,0 @@ -xml: element. -element: -"<", name, (-" "+, attribute)*, (-">", content, -""; -"/>"). -@name: ["a"-"z"; "A"-"Z"]+. -@close: name. -attribute: name, -"=", value. -@value: -'"', dchar*, -'"'; -"'", schar*, -"'". -content: (cchar; element)*. --dchar: ~['"'; "<"]. --schar: ~["'"; "<"]. --cchar: ~["<"]. diff --git a/tests/tests/correct/xml1.req b/tests/tests/correct/xml1.req deleted file mode 100644 index 153b9a0b..00000000 --- a/tests/tests/correct/xml1.req +++ /dev/null @@ -1,29 +0,0 @@ -xml: element. -element: -"<", name, (-" "+, attribute)*, (-">", content, -""; -"/>"). -@name: ["a"-"z"; "A"-"Z"]+. -@close: name. -attribute: name, -"=", value. -@value: -'"', dchar*, -'"'; -"'", schar*, -"'". -content: (cchar; element)*. --dchar: ~['"'; "<"]. --schar: ~["'"; "<"]. --cchar: ~["<"]. -# - - This is a test. - - -# - - - - - - - This - - is - a test. - - - diff --git a/tests/tests/correct/xpath.inp b/tests/tests/correct/xpath.inp deleted file mode 100644 index 442406aa..00000000 --- a/tests/tests/correct/xpath.inp +++ /dev/null @@ -1,2 +0,0 @@ -a - diff --git a/tests/tests/correct/xpath.ixml b/tests/tests/correct/xpath.ixml deleted file mode 100644 index c68e21e7..00000000 --- a/tests/tests/correct/xpath.ixml +++ /dev/null @@ -1,260 +0,0 @@ -XPath: Expr. - -ParamList: Param, ( ',', Param )*. -Param: '$', EQName, TypeDeclaration?. -FunctionBody: EnclosedExpr. -EnclosedExpr: '{', Expr?, '}'. - -Expr: ExprSingle, ( s?,',',s?, ExprSingle )*. - --ExprSingle: OrExpr; OrExprSingle. - - --OrExprSingle: AndExpr. -OrExpr: AndExpr, (s?, 'or', s?, AndExpr )+. -AndExpr: ComparisonExpr, (s?, 'and', s?, ComparisonExpr )*. -ComparisonExpr: StringConcatExpr, (s, ( @ValueComp ; @GeneralComp ;@ NodeComp ), s, StringConcatExpr )?. -StringConcatExpr: RangeExpr, (s?, '||', s?, RangeExpr )*. -RangeExpr: AdditiveExpr, ( s, 'to', s, AdditiveExpr )?. -AdditiveExpr: MultiplicativeExpr; - MultiplicativeExpr, s?, @AddOp, s?, AdditiveExpr. -@AddOp: ( '+' ; '-' ). -MultiplicativeExpr: UnionExpr; - UnionExpr, s?, @MultOp, s?, MultiplicativeExpr. -@MultOp: '*' ; 'div' ; 'idiv' ; 'mod'. -UnionExpr: IntersectExceptExpr, ( ( 'union' ; '|' ), IntersectExceptExpr )*. -IntersectExceptExpr: InstanceofExpr, ( s, ( 'intersect' ;'except' ), s, InstanceofExpr )*. -InstanceofExpr: TreatExpr, ( s, 'instance', s, 'of', s, @SequenceType )?. -TreatExpr: CastExpr, ( s, -'treat', s, -'as', s, @SequenceType )?. -CastExpr: ArrowExpr, ( s, -'cast', s,-'as', s, @SingleType )?. -ArrowExpr: UnaryExpr, ( '=>', ArrowFunctionSpecifier, ArgumentList )*. - - -UnaryExpr: ( '-' ; '+' )*, ValueExpr. --ValueExpr: SimpleMapExpr. -GeneralComp: '='; '!='; '<'; '<='; '>'; '>='. -ValueComp: 'eq'; 'ne'; 'lt'; 'le'; 'gt'; 'ge'. -NodeComp: 'is'; '<<'; '>>'. -SimpleMapExpr: PathExpr, ( '!', PathExpr )*. -PathExpr: '/', ( RelativePathExpr ); - '//', RelativePathExpr; - RelativePathExpr. -RelativePathExpr: StepExpr, ( ( '/'; '//' ), StepExpr )*. - --StepExpr: PostfixExpr; AxisStep. --AxisStep: ( ReverseStep;ForwardStep ). -ForwardStep: @ForwardAxis, NodeTest; - AbbrevForwardStep. -ForwardAxis: 'child::'; - 'descendant::'; - 'attribute::'; - 'self::'; - 'descendant-or-self::'; - 'following-sibling::'; - 'following::'; - 'namespace::'. -AbbrevForwardStep: '@'?, QName. -ReverseStep: @ReverseAxis, NodeTest; - @AbbrevReverseStep. -ReverseAxis: 'parent::'; - 'ancestor::'; - 'preceding-sibling::'; - 'preceding::'; - 'ancestor-or-self::'. -AbbrevReverseStep: '..'. - - --NodeTest: KindTest; NameTest. --NameTest: EQName; Wildcard. - -PostfixExpr: PrimaryExpr. -ArgumentList: -'(',s?, ( -Argument,(s?, -',', s?, -Argument )* )?, s?, -')'. - -KeySpecifier: NCName;| IntegerLiteral; ParenthesizedExpr; '*'. --ArrowFunctionSpecifier: EQName; VarRef; ParenthesizedExpr. - --PrimaryExpr: Literal; - VarRef; - ParenthesizedExpr; - ContextItemExpr; - FunctionCall; - FunctionItemExpr; - MapConstructor; - ArrayConstructor; - UnaryLookup. --Literal: NumericLiteral; StringLiteral. --NumericLiteral: IntegerLiteral; DecimalLiteral;| DoubleLiteral. -VarRef: -'$', @VarName. -VarName: EQName. -ParenthesizedExpr: -'(', Expr?, -')'. -ContextItemExpr: -'.'. -FunctionCall: @FunctionEQName, -ArgumentList. --Argument: ExprSingle; ArgumentPlaceholder. -ArgumentPlaceholder: -'?'. -FunctionItemExpr: NamedFunctionRef; InlineFunctionExpr. -NamedFunctionRef: FunctionEQName, '#', IntegerLiteral. -InlineFunctionExpr: -'function', -'(', ParamList?, ')', ( s, 'as', s, SequenceType )?, FunctionBody. -MapConstructor: -'map', -'{', ( MapConstructorEntry, ( ',', MapConstructorEntry )* )?, -'}'. -MapConstructorEntry: MapKeyExpr, -':', MapValueExpr. -MapKeyExpr: ExprSingle. -MapValueExpr: ExprSingle. -ArrayConstructor: SquareArrayConstructor; CurlyArrayConstructor. -SquareArrayConstructor: -'[', ( ExprSingle, ( -',', ExprSingle )* )?, -']'. -CurlyArrayConstructor: -'array', '{', Expr?, -'}'. -UnaryLookup: -'?', KeySpecifier. - -SingleType: SimpleTypeName, '?'?. -TypeDeclaration: 'as', SequenceType. -SequenceType: 'empty-sequence()'; - ItemType, OccurrenceIndicator?. -@OccurrenceIndicator: '?'; '*'; '+'. -ItemType: KindTest; - 'item()'; - FunctionTest; - MapTest; - ArrayTest; - AtomicOrUnionType; - ParenthesizedItemType. -AtomicOrUnionType: EQName. - - --KindTest: DocumentTest; - ElementTest; - AttributeTest; - SchemaElementTest; - SchemaAttributeTest; - PITest; - CommentTest; - TextTest; - NamespaceNodeTest; - AnyKindTest. -AnyKindTest: 'node()'. -DocumentTest: -'document-node(' , ( ElementTest ; SchemaElementTest )?, -')'. -TextTest: -'text()'. -CommentTest: -'comment()'. -NamespaceNodeTest: -'namespace-node()'. -PITest: -'processing-instruction(' , ( NCName ; StringLiteral )?, -')'. -AttributeTest: -'attribute(' ,( AttribNameOrWildcard, ( ',', TypeName )? )?, -')'. -AttribNameOrWildcard: AttributeName; '*'. -SchemaAttributeTest: -'schema-attribute(', AttributeDeclaration, -')'. -AttributeDeclaration: AttributeName. -ElementTest: -'element(' , ( ElementNameOrWildcard, ( ',', TypeName, '?'? )? )?, -')'. -ElementNameOrWildcard: ElementName;'*'. -SchemaElementTest: -'schema-element(', ElementDeclaration, -')'. -ElementDeclaration: ElementName. - -AttributeName: EQName. -ElementName: EQName. -SimpleTypeName: EQName. -TypeName: EQName. - -FunctionTest: AnyFunctionTest; TypedFunctionTest. -AnyFunctionTest: -'function(*)'. -TypedFunctionTest: -'function(', ( SequenceType, ( -',', SequenceType )* )?, -')', s, 'as', s, SequenceType. -MapTest: AnyMapTest; TypedMapTest. -AnyMapTest: -'map(*)'. -TypedMapTest: -'map(', s, AtomicOrUnionType,s, -',', s, SequenceType, s, -')'. -ArrayTest: AnyArrayTest; TypedArrayTest. -AnyArrayTest: -'array(*)'. -TypedArrayTest: -'array(', s, SequenceType, s, -')'. -ParenthesizedItemType: -'(',s, ItemType,s, -')'. - -FunctionEQName: FunctionName; URIQualifiedName. -EQName: QName; URIQualifiedName. - -QName: FunctionName; - 'array'; - 'attribute'; - 'comment'; - 'document-node'; - 'element'; - 'empty-sequence'; - 'function'; - 'if'; - 'item'; - 'map'; - 'namespace-node'; - 'node'; - 'processing-instruction'; - 'schema-attribute'; - 'schema-element'; - 'switch'; - 'text'; - 'typeswitch'. - - -FunctionName: QNameToken; - 'ancestor'; - 'ancestor-or-self'; - 'and'; - 'cast'; - 'castable'; - 'child'; - 'descendant'; - 'descendant-or-self'; - 'div'; - 'else'; - 'eq'; - 'every'; - 'except'; - 'following'; - 'following-sibling'; - 'for'; - 'ge'; - 'gt'; - 'idiv'; - 'instance'; - 'intersect'; - 'is'; - 'le'; - 'let'; - 'lt'; - 'mod'; - 'namespace'; - 'ne'; - 'or'; - 'parent'; - 'preceding'; - 'preceding-sibling'; - 'return'; - 'satisfies'; - 'self'; - 'some'; - 'to'; - 'treat'; - 'union'. - -StringLiteral: -'"', ( EscapeQuot; ~['"'] )*, -'"'; - -"'", ( EscapeApos ; ~["'"] )*, -"'". -IntegerLiteral: -Digits. -DecimalLiteral: '.', -Digits; - -Digits, '.', ['0'-'9']*. -DoubleLiteral: ( '.', -Digits ; -Digits, ( '.', ['0'-'9']* )? ), ['e'; 'E'], -Digits. - --URIQualifiedName: BracedURILiteral, NCName. -BracedURILiteral: 'Q', '{', ~['{';'}']*, '}'. -EscapeQuot: '""'. -EscapeApos: "''". - -QNameToken: PrefixedName; UnprefixedName. -PrefixedName: @Prefix, -':', @LocalPart. -UnprefixedName: LocalPart. -Prefix: NCName. -LocalPart: NCName. -NCName: @Name. - --NameStartChar: ['A'-'Z']; - '_'; - ['a'-'z']. --NameChar: NameStartChar; - '-'; - '.'; - ['0'-'9']. -Name: NameStartChar, NameChar*. --s: -' '+. -Wildcard: '*'; - NCName, ':', '*'; - '*', ':', NCName; - BracedURILiteral, '*'. -Digits: ['0'-'9']+. - - diff --git a/tests/tests/correct/xpath.req b/tests/tests/correct/xpath.req deleted file mode 100644 index c8966fa9..00000000 --- a/tests/tests/correct/xpath.req +++ /dev/null @@ -1,314 +0,0 @@ -XPath: Expr. - -ParamList: Param, ( ',', Param )*. -Param: '$', EQName, TypeDeclaration?. -FunctionBody: EnclosedExpr. -EnclosedExpr: '{', Expr?, '}'. - -Expr: ExprSingle, ( s?,',',s?, ExprSingle )*. - --ExprSingle: OrExpr; OrExprSingle. - - --OrExprSingle: AndExpr. -OrExpr: AndExpr, (s?, 'or', s?, AndExpr )+. -AndExpr: ComparisonExpr, (s?, 'and', s?, ComparisonExpr )*. -ComparisonExpr: StringConcatExpr, (s, ( @ValueComp ; @GeneralComp ;@ NodeComp ), s, StringConcatExpr )?. -StringConcatExpr: RangeExpr, (s?, '||', s?, RangeExpr )*. -RangeExpr: AdditiveExpr, ( s, 'to', s, AdditiveExpr )?. -AdditiveExpr: MultiplicativeExpr; - MultiplicativeExpr, s?, @AddOp, s?, AdditiveExpr. -@AddOp: ( '+' ; '-' ). -MultiplicativeExpr: UnionExpr; - UnionExpr, s?, @MultOp, s?, MultiplicativeExpr. -@MultOp: '*' ; 'div' ; 'idiv' ; 'mod'. -UnionExpr: IntersectExceptExpr, ( ( 'union' ; '|' ), IntersectExceptExpr )*. -IntersectExceptExpr: InstanceofExpr, ( s, ( 'intersect' ;'except' ), s, InstanceofExpr )*. -InstanceofExpr: TreatExpr, ( s, 'instance', s, 'of', s, @SequenceType )?. -TreatExpr: CastExpr, ( s, -'treat', s, -'as', s, @SequenceType )?. -CastExpr: ArrowExpr, ( s, -'cast', s,-'as', s, @SingleType )?. -ArrowExpr: UnaryExpr, ( '=>', ArrowFunctionSpecifier, ArgumentList )*. - - -UnaryExpr: ( '-' ; '+' )*, ValueExpr. --ValueExpr: SimpleMapExpr. -GeneralComp: '='; '!='; '<'; '<='; '>'; '>='. -ValueComp: 'eq'; 'ne'; 'lt'; 'le'; 'gt'; 'ge'. -NodeComp: 'is'; '<<'; '>>'. -SimpleMapExpr: PathExpr, ( '!', PathExpr )*. -PathExpr: '/', ( RelativePathExpr ); - '//', RelativePathExpr; - RelativePathExpr. -RelativePathExpr: StepExpr, ( ( '/'; '//' ), StepExpr )*. - --StepExpr: PostfixExpr; AxisStep. --AxisStep: ( ReverseStep;ForwardStep ). -ForwardStep: @ForwardAxis, NodeTest; - AbbrevForwardStep. -ForwardAxis: 'child::'; - 'descendant::'; - 'attribute::'; - 'self::'; - 'descendant-or-self::'; - 'following-sibling::'; - 'following::'; - 'namespace::'. -AbbrevForwardStep: '@'?, QName. -ReverseStep: @ReverseAxis, NodeTest; - @AbbrevReverseStep. -ReverseAxis: 'parent::'; - 'ancestor::'; - 'preceding-sibling::'; - 'preceding::'; - 'ancestor-or-self::'. -AbbrevReverseStep: '..'. - - --NodeTest: KindTest; NameTest. --NameTest: EQName; Wildcard. - -PostfixExpr: PrimaryExpr. -ArgumentList: -'(',s?, ( -Argument,(s?, -',', s?, -Argument )* )?, s?, -')'. - -KeySpecifier: NCName;| IntegerLiteral; ParenthesizedExpr; '*'. --ArrowFunctionSpecifier: EQName; VarRef; ParenthesizedExpr. - --PrimaryExpr: Literal; - VarRef; - ParenthesizedExpr; - ContextItemExpr; - FunctionCall; - FunctionItemExpr; - MapConstructor; - ArrayConstructor; - UnaryLookup. --Literal: NumericLiteral; StringLiteral. --NumericLiteral: IntegerLiteral; DecimalLiteral;| DoubleLiteral. -VarRef: -'$', @VarName. -VarName: EQName. -ParenthesizedExpr: -'(', Expr?, -')'. -ContextItemExpr: -'.'. -FunctionCall: @FunctionEQName, -ArgumentList. --Argument: ExprSingle; ArgumentPlaceholder. -ArgumentPlaceholder: -'?'. -FunctionItemExpr: NamedFunctionRef; InlineFunctionExpr. -NamedFunctionRef: FunctionEQName, '#', IntegerLiteral. -InlineFunctionExpr: -'function', -'(', ParamList?, ')', ( s, 'as', s, SequenceType )?, FunctionBody. -MapConstructor: -'map', -'{', ( MapConstructorEntry, ( ',', MapConstructorEntry )* )?, -'}'. -MapConstructorEntry: MapKeyExpr, -':', MapValueExpr. -MapKeyExpr: ExprSingle. -MapValueExpr: ExprSingle. -ArrayConstructor: SquareArrayConstructor; CurlyArrayConstructor. -SquareArrayConstructor: -'[', ( ExprSingle, ( -',', ExprSingle )* )?, -']'. -CurlyArrayConstructor: -'array', '{', Expr?, -'}'. -UnaryLookup: -'?', KeySpecifier. - -SingleType: SimpleTypeName, '?'?. -TypeDeclaration: 'as', SequenceType. -SequenceType: 'empty-sequence()'; - ItemType, OccurrenceIndicator?. -@OccurrenceIndicator: '?'; '*'; '+'. -ItemType: KindTest; - 'item()'; - FunctionTest; - MapTest; - ArrayTest; - AtomicOrUnionType; - ParenthesizedItemType. -AtomicOrUnionType: EQName. - - --KindTest: DocumentTest; - ElementTest; - AttributeTest; - SchemaElementTest; - SchemaAttributeTest; - PITest; - CommentTest; - TextTest; - NamespaceNodeTest; - AnyKindTest. -AnyKindTest: 'node()'. -DocumentTest: -'document-node(' , ( ElementTest ; SchemaElementTest )?, -')'. -TextTest: -'text()'. -CommentTest: -'comment()'. -NamespaceNodeTest: -'namespace-node()'. -PITest: -'processing-instruction(' , ( NCName ; StringLiteral )?, -')'. -AttributeTest: -'attribute(' ,( AttribNameOrWildcard, ( ',', TypeName )? )?, -')'. -AttribNameOrWildcard: AttributeName; '*'. -SchemaAttributeTest: -'schema-attribute(', AttributeDeclaration, -')'. -AttributeDeclaration: AttributeName. -ElementTest: -'element(' , ( ElementNameOrWildcard, ( ',', TypeName, '?'? )? )?, -')'. -ElementNameOrWildcard: ElementName;'*'. -SchemaElementTest: -'schema-element(', ElementDeclaration, -')'. -ElementDeclaration: ElementName. - -AttributeName: EQName. -ElementName: EQName. -SimpleTypeName: EQName. -TypeName: EQName. - -FunctionTest: AnyFunctionTest; TypedFunctionTest. -AnyFunctionTest: -'function(*)'. -TypedFunctionTest: -'function(', ( SequenceType, ( -',', SequenceType )* )?, -')', s, 'as', s, SequenceType. -MapTest: AnyMapTest; TypedMapTest. -AnyMapTest: -'map(*)'. -TypedMapTest: -'map(', s, AtomicOrUnionType,s, -',', s, SequenceType, s, -')'. -ArrayTest: AnyArrayTest; TypedArrayTest. -AnyArrayTest: -'array(*)'. -TypedArrayTest: -'array(', s, SequenceType, s, -')'. -ParenthesizedItemType: -'(',s, ItemType,s, -')'. - -FunctionEQName: FunctionName; URIQualifiedName. -EQName: QName; URIQualifiedName. - -QName: FunctionName; - 'array'; - 'attribute'; - 'comment'; - 'document-node'; - 'element'; - 'empty-sequence'; - 'function'; - 'if'; - 'item'; - 'map'; - 'namespace-node'; - 'node'; - 'processing-instruction'; - 'schema-attribute'; - 'schema-element'; - 'switch'; - 'text'; - 'typeswitch'. - - -FunctionName: QNameToken; - 'ancestor'; - 'ancestor-or-self'; - 'and'; - 'cast'; - 'castable'; - 'child'; - 'descendant'; - 'descendant-or-self'; - 'div'; - 'else'; - 'eq'; - 'every'; - 'except'; - 'following'; - 'following-sibling'; - 'for'; - 'ge'; - 'gt'; - 'idiv'; - 'instance'; - 'intersect'; - 'is'; - 'le'; - 'let'; - 'lt'; - 'mod'; - 'namespace'; - 'ne'; - 'or'; - 'parent'; - 'preceding'; - 'preceding-sibling'; - 'return'; - 'satisfies'; - 'self'; - 'some'; - 'to'; - 'treat'; - 'union'. - -StringLiteral: -'"', ( EscapeQuot; ~['"'] )*, -'"'; - -"'", ( EscapeApos ; ~["'"] )*, -"'". -IntegerLiteral: -Digits. -DecimalLiteral: '.', -Digits; - -Digits, '.', ['0'-'9']*. -DoubleLiteral: ( '.', -Digits ; -Digits, ( '.', ['0'-'9']* )? ), ['e'; 'E'], -Digits. - --URIQualifiedName: BracedURILiteral, NCName. -BracedURILiteral: 'Q', '{', ~['{';'}']*, '}'. -EscapeQuot: '""'. -EscapeApos: "''". - -QNameToken: PrefixedName; UnprefixedName. -PrefixedName: @Prefix, -':', @LocalPart. -UnprefixedName: LocalPart. -Prefix: NCName. -LocalPart: NCName. -NCName: @Name. - --NameStartChar: ['A'-'Z']; - '_'; - ['a'-'z']. --NameChar: NameStartChar; - '-'; - '.'; - ['0'-'9']. -Name: NameStartChar, NameChar*. --s: -' '+. -Wildcard: '*'; - NCName, ':', '*'; - '*', ':', NCName; - BracedURILiteral, '*'. -Digits: ['0'-'9']+. - - -# -a - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/tests/ixml/bnf.inp b/tests/tests/ixml/bnf.inp deleted file mode 100644 index 8a968d5d..00000000 --- a/tests/tests/ixml/bnf.inp +++ /dev/null @@ -1,24 +0,0 @@ -::= --::= | -::= "::=" | - "::=" -::= --::= | "|" -::= | --::= | -::= -::= | | | -@::= "<" ">" -@::= "@" | "^" | "-" -::= -::= ["a"-"z"] | ["A"-"Z"] | ["0"-"9"] -::= | "-" | -@::= """" """" -::= | -::= [" "-"!"] | ["#"-"~"] | """""" {all characters, quotes must be doubled} -::= "[" "-" "]" --::= """" """" | """" """" """" """" --::= " " | | -::= "{" "}" --::= | --::= [" "-"|"] | "~" {Everything except: } diff --git a/tests/tests/ixml/bnf.ixml b/tests/tests/ixml/bnf.ixml deleted file mode 100644 index effb2bf0..00000000 --- a/tests/tests/ixml/bnf.ixml +++ /dev/null @@ -1,26 +0,0 @@ -ixml: S, rules. --rules: rule; rule, rules. -rule: mark, name, S, -"::=", S, def; - name, S, -"::=", S, def. -def: alts. --alts: alt; alt, -"|", S, alts. -alt: terms; empty. --terms: term; term, terms. -empty: . -term: mark, name, S; name, S; string, S; range. -@name: -"<", letters, -">". -@mark: "@", S; "^", S; "-", S. -letters: letter, more-letters. -letter: ["a"-"z"]; ["A"-"Z"]; ["0"-"9"]. -more-letters: letter, more-letters; "-", more-letters; . -@string: -"""", chars, -"""". -chars: char, chars; char. -char: [" "-"!"]; ["#"-"~"]; -'"', '"'. {all characters, quotes must be doubled} -range: -"[", S, from, S, -"-", S, to, S, -"]", S. -@from: character. -@to: character. --character: -"""", char, -""""; -"""", """", -"""", -"""". --S: -[" "; #a], S; comment, S; . -comment: "{", schars, "}". --schars: schar, schars; . --schar: [" "-"|"]; "~". {Everything except: } diff --git a/tests/tests/ixml/bnf.req b/tests/tests/ixml/bnf.req deleted file mode 100644 index d0d24a48..00000000 --- a/tests/tests/ixml/bnf.req +++ /dev/null @@ -1,345 +0,0 @@ -ixml: S, rules. --rules: rule; rule, rules. -rule: mark, name, S, -"::=", S, def; - name, S, -"::=", S, def. -def: alts. --alts: alt; alt, -"|", S, alts. -alt: terms; empty. --terms: term; term, terms. -empty: . -term: mark, name, S; name, S; string, S; range. -@name: -"<", letters, -">". -@mark: "@", S; "^", S; "-", S. -letters: letter, more-letters. -letter: ["a"-"z"]; ["A"-"Z"]; ["0"-"9"]. -more-letters: letter, more-letters; "-", more-letters; . -@string: -"""", chars, -"""". -chars: char, chars; char. -char: [" "-"!"]; ["#"-"~"]; -'"', '"'. {all characters, quotes must be doubled} -range: -"[", S, from, S, -"-", S, to, S, -"]", S. -@from: character. -@to: character. --character: -"""", char, -""""; -"""", """", -"""", -"""". --S: -[" "; #a], S; comment, S; . -comment: "{", schars, "}". --schars: schar, schars; . --schar: [" "-"|"]; "~". {Everything except: } -# -::= --::= | -::= "::=" | - "::=" -::= --::= | "|" -::= | --::= | -::= -::= | | | -@::= "<" ">" -@::= "@" | "^" | "-" -::= -::= ["a"-"z"] | ["A"-"Z"] | ["0"-"9"] -::= | "-" | -@::= """" """" -::= | -::= [" "-"!"] | ["#"-"~"] | """""" {all characters, quotes must be doubled} -::= "[" "-" "]" --::= """" """" | """" """" """" """" --::= " " | | -::= "{" "}" --::= | --::= [" "-"|"] | "~" {Everything except: } -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {all characters, quotes must be doubled} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {Everything except: } - - - - - diff --git a/tests/tests/ixml/ixml-comments.inp b/tests/tests/ixml/ixml-comments.inp deleted file mode 100644 index 1798d55f..00000000 --- a/tests/tests/ixml/ixml-comments.inp +++ /dev/null @@ -1,60 +0,0 @@ -{❌}ixml{❌}:{❌}S{❌},{❌}rule{❌}+{❌}S{❌},{❌}S{❌}.{❌} -{❌}-{❌}S{❌}:{❌}({❌}whitespace{❌};{❌}comment{❌}){❌}*{❌}.{❌} -{❌}-{❌}whitespace{❌}:{❌}-{❌}[{❌}Zs{❌}]{❌};{❌}tab{❌};{❌}lf{❌};{❌}cr{❌}.{❌} -{❌}-{❌}tab{❌}:{❌}-{❌}#9{❌}.{❌} -{❌}-{❌}lf{❌}:{❌}-{❌}#a{❌}.{❌} -{❌}-{❌}cr{❌}:{❌}-{❌}#d{❌}.{❌} -{❌}comment{❌}:{❌}-{❌}"{"{❌},{❌}({❌}cchar{❌};{❌}comment{❌}){❌}*{❌},{❌}-{❌}"}"{❌}.{❌} -{❌}-{❌}cchar{❌}:{❌}~{❌}[{❌}"{}"{❌}]{❌}.{❌} -{❌}rule{❌}:{❌}({❌}mark{❌},{❌}S{❌}){❌}?{❌},{❌}name{❌},{❌}S{❌},{❌}[{❌}"=:"{❌}]{❌},{❌}S{❌},{❌}-{❌}alts{❌},{❌}"."{❌}.{❌} -{❌}@{❌}mark{❌}:{❌}[{❌}"@^-"{❌}]{❌}.{❌} -{❌}alts{❌}:{❌}alt{❌}+{❌}({❌}[{❌}";|"{❌}]{❌},{❌}S{❌}){❌}.{❌} -{❌}alt{❌}:{❌}term{❌}*{❌}({❌}","{❌},{❌}S{❌}){❌}.{❌} -{❌}-{❌}term{❌}:{❌}factor{❌};{❌} -{❌}{❌}{❌}{❌}{❌}option{❌};{❌} -{❌}{❌}{❌}{❌}{❌}repeat0{❌};{❌} -{❌}{❌}{❌}{❌}{❌}repeat1{❌}.{❌} -{❌}-{❌}factor{❌}:{❌}terminal{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}nonterminal{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}"("{❌},{❌}S{❌},{❌}alts{❌},{❌}")"{❌},{❌}S{❌}.{❌} -{❌}repeat0{❌}:{❌}factor{❌},{❌}"*"{❌},{❌}S{❌},{❌}sep{❌}?{❌}.{❌} -{❌}repeat1{❌}:{❌}factor{❌},{❌}"+"{❌},{❌}S{❌},{❌}sep{❌}?{❌}.{❌} -{❌}option{❌}:{❌}factor{❌},{❌}"?"{❌},{❌}S{❌}.{❌} -{❌}sep{❌}:{❌}factor{❌}.{❌} -{❌}nonterminal{❌}:{❌}({❌}mark{❌},{❌}S{❌}){❌}?{❌},{❌}name{❌},{❌}S{❌}.{❌} -{❌}-{❌}terminal{❌}:{❌}literal{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}{❌}charset{❌}.{❌} -{❌}literal{❌}:{❌}quoted{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}encoded{❌}.{❌} -{❌}-{❌}quoted{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}-{❌}string{❌}.{❌} -{❌}@{❌}name{❌}:{❌}namestart{❌},{❌}namefollower{❌}*{❌}.{❌} -{❌}-{❌}namestart{❌}:{❌}[{❌}"_"{❌};{❌}Ll{❌};{❌}Lu{❌};{❌}Lm{❌};{❌}Lt{❌};{❌}Lo{❌}]{❌}.{❌} -{❌}-{❌}namefollower{❌}:{❌}namestart{❌};{❌}[{❌}"-.·‿⁀"{❌};{❌}Nd{❌};{❌}Mn{❌}]{❌}.{❌} -{❌}@{❌}tmark{❌}:{❌}[{❌}"^-"{❌}]{❌}.{❌} -{❌}string{❌}:{❌}-{❌}'"'{❌},{❌}dstring{❌},{❌}-{❌}'"'{❌},{❌}S{❌};{❌} -{❌}-{❌}"'"{❌},{❌}sstring{❌},{❌}-{❌}"'"{❌},{❌}S{❌}.{❌} -{❌}@{❌}dstring{❌}:{❌}dchar{❌}+{❌}.{❌} -{❌}@{❌}sstring{❌}:{❌}schar{❌}+{❌}.{❌} -{❌}dchar{❌}:{❌}~{❌}[{❌}'"'{❌}]{❌};{❌} -{❌}{❌}{❌}{❌}{❌}'"'{❌},{❌}-{❌}'"'{❌}.{❌}{{❌}all{❌}characters{❌},{❌}quotes{❌}must{❌}be{❌}doubled{❌}} -{❌}schar{❌}:{❌}~{❌}[{❌}"'"{❌}]{❌};{❌} -{❌}{❌}{❌}{❌}{❌}"'"{❌},{❌}-{❌}"'"{❌}.{❌}{{❌}all{❌}characters{❌},{❌}quotes{❌}must{❌}be{❌}doubled{❌}} -{❌}-{❌}encoded{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}-{❌}"#"{❌},{❌}@{❌}hex{❌},{❌}S{❌}.{❌} -{❌}hex{❌}:{❌}[{❌}"0"{❌}-{❌}"9"{❌};{❌}"a"{❌}-{❌}"f"{❌};{❌}"A"{❌}-{❌}"F"{❌}]{❌}+{❌}.{❌} -{❌}-{❌}charset{❌}:{❌}inclusion{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}{❌}exclusion{❌}.{❌} -{❌}inclusion{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}set{❌}.{❌} -{❌}exclusion{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}"~"{❌},{❌}S{❌},{❌}set{❌}.{❌} -{❌}-{❌}set{❌}:{❌}"["{❌},{❌}S{❌},{❌}member{❌}*{❌}({❌}[{❌}";|"{❌}]{❌},{❌}S{❌}){❌},{❌}"]"{❌},{❌}S{❌}.{❌} -{❌}-{❌}member{❌}:{❌}literal{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}range{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}class{❌}.{❌} -{❌}range{❌}:{❌}from{❌},{❌}"-"{❌},{❌}S{❌},{❌}to{❌}.{❌} -{❌}@{❌}from{❌}:{❌}character{❌}.{❌} -{❌}@{❌}to{❌}:{❌}character{❌}.{❌} -{❌}-{❌}character{❌}:{❌}-{❌}'"'{❌},{❌}dchar{❌},{❌}-{❌}'"'{❌},{❌}S{❌};{❌} -{❌}-{❌}"'"{❌},{❌}schar{❌},{❌}-{❌}"'"{❌},{❌}S{❌};{❌} -{❌}"#"{❌},{❌}hex{❌},{❌}S{❌}.{❌} -{❌}class{❌}:{❌}@{❌}code{❌},{❌}S{❌}.{❌} -{❌}code{❌}:{❌}letter{❌},{❌}letter{❌}.{❌} -{❌}-{❌}letter{❌}:{❌}[{❌}"a"{❌}-{❌}"z"{❌};{❌}"A"{❌}-{❌}"Z"{❌}]{❌}.{❌} diff --git a/tests/tests/ixml/ixml-comments.ixml b/tests/tests/ixml/ixml-comments.ixml deleted file mode 100644 index 1798d55f..00000000 --- a/tests/tests/ixml/ixml-comments.ixml +++ /dev/null @@ -1,60 +0,0 @@ -{❌}ixml{❌}:{❌}S{❌},{❌}rule{❌}+{❌}S{❌},{❌}S{❌}.{❌} -{❌}-{❌}S{❌}:{❌}({❌}whitespace{❌};{❌}comment{❌}){❌}*{❌}.{❌} -{❌}-{❌}whitespace{❌}:{❌}-{❌}[{❌}Zs{❌}]{❌};{❌}tab{❌};{❌}lf{❌};{❌}cr{❌}.{❌} -{❌}-{❌}tab{❌}:{❌}-{❌}#9{❌}.{❌} -{❌}-{❌}lf{❌}:{❌}-{❌}#a{❌}.{❌} -{❌}-{❌}cr{❌}:{❌}-{❌}#d{❌}.{❌} -{❌}comment{❌}:{❌}-{❌}"{"{❌},{❌}({❌}cchar{❌};{❌}comment{❌}){❌}*{❌},{❌}-{❌}"}"{❌}.{❌} -{❌}-{❌}cchar{❌}:{❌}~{❌}[{❌}"{}"{❌}]{❌}.{❌} -{❌}rule{❌}:{❌}({❌}mark{❌},{❌}S{❌}){❌}?{❌},{❌}name{❌},{❌}S{❌},{❌}[{❌}"=:"{❌}]{❌},{❌}S{❌},{❌}-{❌}alts{❌},{❌}"."{❌}.{❌} -{❌}@{❌}mark{❌}:{❌}[{❌}"@^-"{❌}]{❌}.{❌} -{❌}alts{❌}:{❌}alt{❌}+{❌}({❌}[{❌}";|"{❌}]{❌},{❌}S{❌}){❌}.{❌} -{❌}alt{❌}:{❌}term{❌}*{❌}({❌}","{❌},{❌}S{❌}){❌}.{❌} -{❌}-{❌}term{❌}:{❌}factor{❌};{❌} -{❌}{❌}{❌}{❌}{❌}option{❌};{❌} -{❌}{❌}{❌}{❌}{❌}repeat0{❌};{❌} -{❌}{❌}{❌}{❌}{❌}repeat1{❌}.{❌} -{❌}-{❌}factor{❌}:{❌}terminal{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}nonterminal{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}"("{❌},{❌}S{❌},{❌}alts{❌},{❌}")"{❌},{❌}S{❌}.{❌} -{❌}repeat0{❌}:{❌}factor{❌},{❌}"*"{❌},{❌}S{❌},{❌}sep{❌}?{❌}.{❌} -{❌}repeat1{❌}:{❌}factor{❌},{❌}"+"{❌},{❌}S{❌},{❌}sep{❌}?{❌}.{❌} -{❌}option{❌}:{❌}factor{❌},{❌}"?"{❌},{❌}S{❌}.{❌} -{❌}sep{❌}:{❌}factor{❌}.{❌} -{❌}nonterminal{❌}:{❌}({❌}mark{❌},{❌}S{❌}){❌}?{❌},{❌}name{❌},{❌}S{❌}.{❌} -{❌}-{❌}terminal{❌}:{❌}literal{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}{❌}charset{❌}.{❌} -{❌}literal{❌}:{❌}quoted{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}encoded{❌}.{❌} -{❌}-{❌}quoted{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}-{❌}string{❌}.{❌} -{❌}@{❌}name{❌}:{❌}namestart{❌},{❌}namefollower{❌}*{❌}.{❌} -{❌}-{❌}namestart{❌}:{❌}[{❌}"_"{❌};{❌}Ll{❌};{❌}Lu{❌};{❌}Lm{❌};{❌}Lt{❌};{❌}Lo{❌}]{❌}.{❌} -{❌}-{❌}namefollower{❌}:{❌}namestart{❌};{❌}[{❌}"-.·‿⁀"{❌};{❌}Nd{❌};{❌}Mn{❌}]{❌}.{❌} -{❌}@{❌}tmark{❌}:{❌}[{❌}"^-"{❌}]{❌}.{❌} -{❌}string{❌}:{❌}-{❌}'"'{❌},{❌}dstring{❌},{❌}-{❌}'"'{❌},{❌}S{❌};{❌} -{❌}-{❌}"'"{❌},{❌}sstring{❌},{❌}-{❌}"'"{❌},{❌}S{❌}.{❌} -{❌}@{❌}dstring{❌}:{❌}dchar{❌}+{❌}.{❌} -{❌}@{❌}sstring{❌}:{❌}schar{❌}+{❌}.{❌} -{❌}dchar{❌}:{❌}~{❌}[{❌}'"'{❌}]{❌};{❌} -{❌}{❌}{❌}{❌}{❌}'"'{❌},{❌}-{❌}'"'{❌}.{❌}{{❌}all{❌}characters{❌},{❌}quotes{❌}must{❌}be{❌}doubled{❌}} -{❌}schar{❌}:{❌}~{❌}[{❌}"'"{❌}]{❌};{❌} -{❌}{❌}{❌}{❌}{❌}"'"{❌},{❌}-{❌}"'"{❌}.{❌}{{❌}all{❌}characters{❌},{❌}quotes{❌}must{❌}be{❌}doubled{❌}} -{❌}-{❌}encoded{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}-{❌}"#"{❌},{❌}@{❌}hex{❌},{❌}S{❌}.{❌} -{❌}hex{❌}:{❌}[{❌}"0"{❌}-{❌}"9"{❌};{❌}"a"{❌}-{❌}"f"{❌};{❌}"A"{❌}-{❌}"F"{❌}]{❌}+{❌}.{❌} -{❌}-{❌}charset{❌}:{❌}inclusion{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}{❌}exclusion{❌}.{❌} -{❌}inclusion{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}set{❌}.{❌} -{❌}exclusion{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}"~"{❌},{❌}S{❌},{❌}set{❌}.{❌} -{❌}-{❌}set{❌}:{❌}"["{❌},{❌}S{❌},{❌}member{❌}*{❌}({❌}[{❌}";|"{❌}]{❌},{❌}S{❌}){❌},{❌}"]"{❌},{❌}S{❌}.{❌} -{❌}-{❌}member{❌}:{❌}literal{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}range{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}class{❌}.{❌} -{❌}range{❌}:{❌}from{❌},{❌}"-"{❌},{❌}S{❌},{❌}to{❌}.{❌} -{❌}@{❌}from{❌}:{❌}character{❌}.{❌} -{❌}@{❌}to{❌}:{❌}character{❌}.{❌} -{❌}-{❌}character{❌}:{❌}-{❌}'"'{❌},{❌}dchar{❌},{❌}-{❌}'"'{❌},{❌}S{❌};{❌} -{❌}-{❌}"'"{❌},{❌}schar{❌},{❌}-{❌}"'"{❌},{❌}S{❌};{❌} -{❌}"#"{❌},{❌}hex{❌},{❌}S{❌}.{❌} -{❌}class{❌}:{❌}@{❌}code{❌},{❌}S{❌}.{❌} -{❌}code{❌}:{❌}letter{❌},{❌}letter{❌}.{❌} -{❌}-{❌}letter{❌}:{❌}[{❌}"a"{❌}-{❌}"z"{❌};{❌}"A"{❌}-{❌}"Z"{❌}]{❌}.{❌} diff --git a/tests/tests/ixml/ixml-comments.out b/tests/tests/ixml/ixml-comments.out deleted file mode 100644 index 2303b069..00000000 --- a/tests/tests/ixml/ixml-comments.out +++ /dev/null @@ -1,1342 +0,0 @@ -{ }ixml{ }:{ }S{ },{ }rule{ }+{ }S{ },{ }S{ }.{ } -{ }-{ }S{ }:{ }({ }whitespace{ };{ }comment{ }){ }*{ }.{ } -{ }-{ }whitespace{ }:{ }-{ }[{ }Zs{ }]{ };{ }tab{ };{ }lf{ };{ }cr{ }.{ } -{ }-{ }tab{ }:{ }-{ }#9{ }.{ } -{ }-{ }lf{ }:{ }-{ }#a{ }.{ } -{ }-{ }cr{ }:{ }-{ }#d{ }.{ } -{ }comment{ }:{ }-{ }"{"{ },{ }({ }cchar{ };{ }comment{ }){ }*{ },{ }-{ }"}"{ }.{ } -{ }-{ }cchar{ }:{ }~{ }[{ }"{}"{ }]{ }.{ } -{ }rule{ }:{ }({ }mark{ },{ }S{ }){ }?{ },{ }name{ },{ }S{ },{ }[{ }"=:"{ }]{ },{ }S{ },{ }-{ }alts{ },{ }"."{ }.{ } -{ }@{ }mark{ }:{ }[{ }"@^-"{ }]{ }.{ } -{ }alts{ }:{ }alt{ }+{ }({ }[{ }";|"{ }]{ },{ }S{ }){ }.{ } -{ }alt{ }:{ }term{ }*{ }({ }","{ },{ }S{ }){ }.{ } -{ }-{ }term{ }:{ }factor{ };{ } -{ }{ }{ }{ }{ }option{ };{ } -{ }{ }{ }{ }{ }repeat0{ };{ } -{ }{ }{ }{ }{ }repeat1{ }.{ } -{ }-{ }factor{ }:{ }terminal{ };{ } -{ }{ }{ }{ }{ }{ }nonterminal{ };{ } -{ }{ }{ }{ }{ }{ }"("{ },{ }S{ },{ }alts{ },{ }")"{ },{ }S{ }.{ } -{ }repeat0{ }:{ }factor{ },{ }"*"{ },{ }S{ },{ }sep{ }?{ }.{ } -{ }repeat1{ }:{ }factor{ },{ }"+"{ },{ }S{ },{ }sep{ }?{ }.{ } -{ }option{ }:{ }factor{ },{ }"?"{ },{ }S{ }.{ } -{ }sep{ }:{ }factor{ }.{ } -{ }nonterminal{ }:{ }({ }mark{ },{ }S{ }){ }?{ },{ }name{ },{ }S{ }.{ } -{ }-{ }terminal{ }:{ }literal{ };{ } -{ }{ }{ }{ }{ }{ }{ }charset{ }.{ } -{ }literal{ }:{ }quoted{ };{ } -{ }{ }{ }{ }{ }{ }encoded{ }.{ } -{ }-{ }quoted{ }:{ }({ }tmark{ },{ }S{ }){ }?{ },{ }-{ }string{ }.{ } -{ }@{ }name{ }:{ }namestart{ },{ }namefollower{ }*{ }.{ } -{ }-{ }namestart{ }:{ }[{ }"_"{ };{ }Ll{ };{ }Lu{ };{ }Lm{ };{ }Lt{ };{ }Lo{ }]{ }.{ } -{ }-{ }namefollower{ }:{ }namestart{ };{ }[{ }"-.·‿⁀"{ };{ }Nd{ };{ }Mn{ }]{ }.{ } -{ }@{ }tmark{ }:{ }[{ }"^-"{ }]{ }.{ } -{ }string{ }:{ }-{ }'"'{ },{ }dstring{ },{ }-{ }'"'{ },{ }S{ };{ } -{ }-{ }"'"{ },{ }sstring{ },{ }-{ }"'"{ },{ }S{ }.{ } -{ }@{ }dstring{ }:{ }dchar{ }+{ }.{ } -{ }@{ }sstring{ }:{ }schar{ }+{ }.{ } -{ }dchar{ }:{ }~{ }[{ }'"'{ }]{ };{ } -{ }{ }{ }{ }{ }'"'{ },{ }-{ }'"'{ }.{ }{{ }all{ }characters{ },{ }quotes{ }must{ }be{ }doubled{ }} -{ }schar{ }:{ }~{ }[{ }"'"{ }]{ };{ } -{ }{ }{ }{ }{ }"'"{ },{ }-{ }"'"{ }.{ }{{ }all{ }characters{ },{ }quotes{ }must{ }be{ }doubled{ }} -{ }-{ }encoded{ }:{ }({ }tmark{ },{ }S{ }){ }?{ },{ }-{ }"#"{ },{ }@{ }hex{ },{ }S{ }.{ } -{ }hex{ }:{ }[{ }"0"{ }-{ }"9"{ };{ }"a"{ }-{ }"f"{ };{ }"A"{ }-{ }"F"{ }]{ }+{ }.{ } -{ }-{ }charset{ }:{ }inclusion{ };{ } -{ }{ }{ }{ }{ }{ }{ }exclusion{ }.{ } -{ }inclusion{ }:{ }({ }tmark{ },{ }S{ }){ }?{ },{ }set{ }.{ } -{ }exclusion{ }:{ }({ }tmark{ },{ }S{ }){ }?{ },{ }"~"{ },{ }S{ },{ }set{ }.{ } -{ }-{ }set{ }:{ }"["{ },{ }S{ },{ }member{ }*{ }({ }[{ }";|"{ }]{ },{ }S{ }){ },{ }"]"{ },{ }S{ }.{ } -{ }-{ }member{ }:{ }literal{ };{ } -{ }{ }{ }{ }{ }{ }range{ };{ } -{ }{ }{ }{ }{ }{ }class{ }.{ } -{ }range{ }:{ }from{ },{ }"-"{ },{ }S{ },{ }to{ }.{ } -{ }@{ }from{ }:{ }character{ }.{ } -{ }@{ }to{ }:{ }character{ }.{ } -{ }-{ }character{ }:{ }-{ }'"'{ },{ }dchar{ },{ }-{ }'"'{ },{ }S{ };{ } -{ }-{ }"'"{ },{ }schar{ },{ }-{ }"'"{ },{ }S{ };{ } -{ }"#"{ },{ }hex{ },{ }S{ }.{ } -{ }class{ }:{ }@{ }code{ },{ }S{ }.{ } -{ }code{ }:{ }letter{ },{ }letter{ }.{ } -{ }-{ }letter{ }:{ }[{ }"a"{ }-{ }"z"{ };{ }"A"{ }-{ }"Z"{ }]{ }.{ } -# -{ }ixml{ }:{ }S{ },{ }rule{ }+{ }S{ },{ }S{ }.{ } -{ }-{ }S{ }:{ }({ }whitespace{ };{ }comment{ }){ }*{ }.{ } -{ }-{ }whitespace{ }:{ }-{ }[{ }Zs{ }]{ };{ }tab{ };{ }lf{ };{ }cr{ }.{ } -{ }-{ }tab{ }:{ }-{ }#9{ }.{ } -{ }-{ }lf{ }:{ }-{ }#a{ }.{ } -{ }-{ }cr{ }:{ }-{ }#d{ }.{ } -{ }comment{ }:{ }-{ }"{"{ },{ }({ }cchar{ };{ }comment{ }){ }*{ },{ }-{ }"}"{ }.{ } -{ }-{ }cchar{ }:{ }~{ }[{ }"{}"{ }]{ }.{ } -{ }rule{ }:{ }({ }mark{ },{ }S{ }){ }?{ },{ }name{ },{ }S{ },{ }[{ }"=:"{ }]{ },{ }S{ },{ }-{ }alts{ },{ }"."{ }.{ } -{ }@{ }mark{ }:{ }[{ }"@^-"{ }]{ }.{ } -{ }alts{ }:{ }alt{ }+{ }({ }[{ }";|"{ }]{ },{ }S{ }){ }.{ } -{ }alt{ }:{ }term{ }*{ }({ }","{ },{ }S{ }){ }.{ } -{ }-{ }term{ }:{ }factor{ };{ } -{ }{ }{ }{ }{ }option{ };{ } -{ }{ }{ }{ }{ }repeat0{ };{ } -{ }{ }{ }{ }{ }repeat1{ }.{ } -{ }-{ }factor{ }:{ }terminal{ };{ } -{ }{ }{ }{ }{ }{ }nonterminal{ };{ } -{ }{ }{ }{ }{ }{ }"("{ },{ }S{ },{ }alts{ },{ }")"{ },{ }S{ }.{ } -{ }repeat0{ }:{ }factor{ },{ }"*"{ },{ }S{ },{ }sep{ }?{ }.{ } -{ }repeat1{ }:{ }factor{ },{ }"+"{ },{ }S{ },{ }sep{ }?{ }.{ } -{ }option{ }:{ }factor{ },{ }"?"{ },{ }S{ }.{ } -{ }sep{ }:{ }factor{ }.{ } -{ }nonterminal{ }:{ }({ }mark{ },{ }S{ }){ }?{ },{ }name{ },{ }S{ }.{ } -{ }-{ }terminal{ }:{ }literal{ };{ } -{ }{ }{ }{ }{ }{ }{ }charset{ }.{ } -{ }literal{ }:{ }quoted{ };{ } -{ }{ }{ }{ }{ }{ }encoded{ }.{ } -{ }-{ }quoted{ }:{ }({ }tmark{ },{ }S{ }){ }?{ },{ }-{ }string{ }.{ } -{ }@{ }name{ }:{ }namestart{ },{ }namefollower{ }*{ }.{ } -{ }-{ }namestart{ }:{ }[{ }"_"{ };{ }Ll{ };{ }Lu{ };{ }Lm{ };{ }Lt{ };{ }Lo{ }]{ }.{ } -{ }-{ }namefollower{ }:{ }namestart{ };{ }[{ }"-.·‿⁀"{ };{ }Nd{ };{ }Mn{ }]{ }.{ } -{ }@{ }tmark{ }:{ }[{ }"^-"{ }]{ }.{ } -{ }string{ }:{ }-{ }'"'{ },{ }dstring{ },{ }-{ }'"'{ },{ }S{ };{ } -{ }-{ }"'"{ },{ }sstring{ },{ }-{ }"'"{ },{ }S{ }.{ } -{ }@{ }dstring{ }:{ }dchar{ }+{ }.{ } -{ }@{ }sstring{ }:{ }schar{ }+{ }.{ } -{ }dchar{ }:{ }~{ }[{ }'"'{ }]{ };{ } -{ }{ }{ }{ }{ }'"'{ },{ }-{ }'"'{ }.{ }{{ }all{ }characters{ },{ }quotes{ }must{ }be{ }doubled{ }} -{ }schar{ }:{ }~{ }[{ }"'"{ }]{ };{ } -{ }{ }{ }{ }{ }"'"{ },{ }-{ }"'"{ }.{ }{{ }all{ }characters{ },{ }quotes{ }must{ }be{ }doubled{ }} -{ }-{ }encoded{ }:{ }({ }tmark{ },{ }S{ }){ }?{ },{ }-{ }"#"{ },{ }@{ }hex{ },{ }S{ }.{ } -{ }hex{ }:{ }[{ }"0"{ }-{ }"9"{ };{ }"a"{ }-{ }"f"{ };{ }"A"{ }-{ }"F"{ }]{ }+{ }.{ } -{ }-{ }charset{ }:{ }inclusion{ };{ } -{ }{ }{ }{ }{ }{ }{ }exclusion{ }.{ } -{ }inclusion{ }:{ }({ }tmark{ },{ }S{ }){ }?{ },{ }set{ }.{ } -{ }exclusion{ }:{ }({ }tmark{ },{ }S{ }){ }?{ },{ }"~"{ },{ }S{ },{ }set{ }.{ } -{ }-{ }set{ }:{ }"["{ },{ }S{ },{ }member{ }*{ }({ }[{ }";|"{ }]{ },{ }S{ }){ },{ }"]"{ },{ }S{ }.{ } -{ }-{ }member{ }:{ }literal{ };{ } -{ }{ }{ }{ }{ }{ }range{ };{ } -{ }{ }{ }{ }{ }{ }class{ }.{ } -{ }range{ }:{ }from{ },{ }"-"{ },{ }S{ },{ }to{ }.{ } -{ }@{ }from{ }:{ }character{ }.{ } -{ }@{ }to{ }:{ }character{ }.{ } -{ }-{ }character{ }:{ }-{ }'"'{ },{ }dchar{ },{ }-{ }'"'{ },{ }S{ };{ } -{ }-{ }"'"{ },{ }schar{ },{ }-{ }"'"{ },{ }S{ };{ } -{ }"#"{ },{ }hex{ },{ }S{ }.{ } -{ }class{ }:{ }@{ }code{ },{ }S{ }.{ } -{ }code{ }:{ }letter{ },{ }letter{ }.{ } -{ }-{ }letter{ }:{ }[{ }"a"{ }-{ }"z"{ };{ }"A"{ }-{ }"Z"{ }]{ }.{ } -# - - - - - : - - - - - , - - - - - + - - - - - - - , - - - - - . - - - - - : - - - ( - - - - - - - ; - - - - - - - ) - * - - - . - - - - - : - - - - [ - - - - ] - - - ; - - - - - - ; - - - - - - ; - - - - - - . - - - - - : - - - - - - - . - - - - - : - - - - - - - . - - - - - : - - - - - - - . - - - - : - - - - - - , - - ( - - - - - - - ; - - - - - - - ) - * - - , - - - - - - . - - - - - : - - - ~ - [ - - - - ] - - - . - - - - : - - - , - - - - , - - - - , - - [ - - - - ] - - , - - - - , - - - - - , - - - - - . - - - - - : - - - [ - - - - ] - - - . - - - - : - - - - - - + - - ( - - - - [ - - - - ] - - , - - - - - - ) - - - - . - - - - : - - - - - - * - - ( - - - - - - , - - - - - - ) - - - - . - - - - - : - - - - - - ; - - - - - - - - - - - ; - - - - - - - - - - - ; - - - - - - - - - - - . - - - - - : - - - - - - ; - - - - - - - - - - - - ; - - - - - - - - - - - , - - - - , - - - - , - - - - , - - - - - . - - - - : - - - - - , - - - - , - - - - , - - - . - - - - : - - - - - , - - - - , - - - - , - - - . - - - - : - - - - - , - - - - , - - - - - . - - - - : - - - - - - . - - - - : - - - , - - - - , - - - - - . - - - - - : - - - - - - ; - - - - - - - - - - - - - . - - - - : - - - - - - ; - - - - - - - - - - - - . - - - - - : - - - , - - - - - - . - - - - - : - - - - - , - - - - - * - - - . - - - - - : - - - [ - - - - ; - - - - ; - - - - ; - - - - ; - - - - ; - - - - ] - - - . - - - - - : - - - - - - ; - - - [ - - - - ; - - - - ; - - - - ] - - - . - - - - - : - - - [ - - - - ] - - - . - - - - : - - - - - - , - - - - , - - - - - , - - - - - ; - - - - - - - , - - - - , - - - - - , - - - - - . - - - - - : - - - - - - + - - - . - - - - - : - - - - - - + - - - . - - - - : - - - ~ - [ - - - - ] - - - ; - - - - - - - - - - , - - - - - - . - - - all - characters - , - quotes - must - be - doubled - - - - - : - - - ~ - [ - - - - ] - - - ; - - - - - - - - - - , - - - - - - . - - - all - characters - , - quotes - must - be - doubled - - - - - - : - - - , - - - - - , - - - - - , - - - - - . - - - - : - - - - [ - - - - - ; - - - - - ; - - - - - ] - - + - - - . - - - - - : - - - - - - ; - - - - - - - - - - - - - . - - - - : - - - , - - - - - . - - - - : - - - , - - - - , - - - - , - - - - - . - - - - - : - - - - - , - - - - , - - - - - * - - ( - - - - [ - - - - ] - - , - - - - - - ) - - - , - - - - , - - - - - . - - - - - : - - - - - - ; - - - - - - - - - - - - ; - - - - - - - - - - - - . - - - - : - - - - - , - - - - , - - - - , - - - - - . - - - - - : - - - - - - . - - - - - : - - - - - - . - - - - - : - - - - - - , - - - - , - - - - - , - - - - - ; - - - - - - - , - - - - , - - - - - , - - - - - ; - - - - - - , - - - - , - - - - - . - - - - : - - - - - - , - - - - - . - - - - : - - - - - , - - - - - . - - - - - : - - - [ - - - - - ; - - - - - ] - - - . - - diff --git a/tests/tests/ixml/ixml-comments.req b/tests/tests/ixml/ixml-comments.req deleted file mode 100644 index a063ad62..00000000 --- a/tests/tests/ixml/ixml-comments.req +++ /dev/null @@ -1,1342 +0,0 @@ -{❌}ixml{❌}:{❌}S{❌},{❌}rule{❌}+{❌}S{❌},{❌}S{❌}.{❌} -{❌}-{❌}S{❌}:{❌}({❌}whitespace{❌};{❌}comment{❌}){❌}*{❌}.{❌} -{❌}-{❌}whitespace{❌}:{❌}-{❌}[{❌}Zs{❌}]{❌};{❌}tab{❌};{❌}lf{❌};{❌}cr{❌}.{❌} -{❌}-{❌}tab{❌}:{❌}-{❌}#9{❌}.{❌} -{❌}-{❌}lf{❌}:{❌}-{❌}#a{❌}.{❌} -{❌}-{❌}cr{❌}:{❌}-{❌}#d{❌}.{❌} -{❌}comment{❌}:{❌}-{❌}"{"{❌},{❌}({❌}cchar{❌};{❌}comment{❌}){❌}*{❌},{❌}-{❌}"}"{❌}.{❌} -{❌}-{❌}cchar{❌}:{❌}~{❌}[{❌}"{}"{❌}]{❌}.{❌} -{❌}rule{❌}:{❌}({❌}mark{❌},{❌}S{❌}){❌}?{❌},{❌}name{❌},{❌}S{❌},{❌}[{❌}"=:"{❌}]{❌},{❌}S{❌},{❌}-{❌}alts{❌},{❌}"."{❌}.{❌} -{❌}@{❌}mark{❌}:{❌}[{❌}"@^-"{❌}]{❌}.{❌} -{❌}alts{❌}:{❌}alt{❌}+{❌}({❌}[{❌}";|"{❌}]{❌},{❌}S{❌}){❌}.{❌} -{❌}alt{❌}:{❌}term{❌}*{❌}({❌}","{❌},{❌}S{❌}){❌}.{❌} -{❌}-{❌}term{❌}:{❌}factor{❌};{❌} -{❌}{❌}{❌}{❌}{❌}option{❌};{❌} -{❌}{❌}{❌}{❌}{❌}repeat0{❌};{❌} -{❌}{❌}{❌}{❌}{❌}repeat1{❌}.{❌} -{❌}-{❌}factor{❌}:{❌}terminal{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}nonterminal{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}"("{❌},{❌}S{❌},{❌}alts{❌},{❌}")"{❌},{❌}S{❌}.{❌} -{❌}repeat0{❌}:{❌}factor{❌},{❌}"*"{❌},{❌}S{❌},{❌}sep{❌}?{❌}.{❌} -{❌}repeat1{❌}:{❌}factor{❌},{❌}"+"{❌},{❌}S{❌},{❌}sep{❌}?{❌}.{❌} -{❌}option{❌}:{❌}factor{❌},{❌}"?"{❌},{❌}S{❌}.{❌} -{❌}sep{❌}:{❌}factor{❌}.{❌} -{❌}nonterminal{❌}:{❌}({❌}mark{❌},{❌}S{❌}){❌}?{❌},{❌}name{❌},{❌}S{❌}.{❌} -{❌}-{❌}terminal{❌}:{❌}literal{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}{❌}charset{❌}.{❌} -{❌}literal{❌}:{❌}quoted{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}encoded{❌}.{❌} -{❌}-{❌}quoted{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}-{❌}string{❌}.{❌} -{❌}@{❌}name{❌}:{❌}namestart{❌},{❌}namefollower{❌}*{❌}.{❌} -{❌}-{❌}namestart{❌}:{❌}[{❌}"_"{❌};{❌}Ll{❌};{❌}Lu{❌};{❌}Lm{❌};{❌}Lt{❌};{❌}Lo{❌}]{❌}.{❌} -{❌}-{❌}namefollower{❌}:{❌}namestart{❌};{❌}[{❌}"-.·‿⁀"{❌};{❌}Nd{❌};{❌}Mn{❌}]{❌}.{❌} -{❌}@{❌}tmark{❌}:{❌}[{❌}"^-"{❌}]{❌}.{❌} -{❌}string{❌}:{❌}-{❌}'"'{❌},{❌}dstring{❌},{❌}-{❌}'"'{❌},{❌}S{❌};{❌} -{❌}-{❌}"'"{❌},{❌}sstring{❌},{❌}-{❌}"'"{❌},{❌}S{❌}.{❌} -{❌}@{❌}dstring{❌}:{❌}dchar{❌}+{❌}.{❌} -{❌}@{❌}sstring{❌}:{❌}schar{❌}+{❌}.{❌} -{❌}dchar{❌}:{❌}~{❌}[{❌}'"'{❌}]{❌};{❌} -{❌}{❌}{❌}{❌}{❌}'"'{❌},{❌}-{❌}'"'{❌}.{❌}{{❌}all{❌}characters{❌},{❌}quotes{❌}must{❌}be{❌}doubled{❌}} -{❌}schar{❌}:{❌}~{❌}[{❌}"'"{❌}]{❌};{❌} -{❌}{❌}{❌}{❌}{❌}"'"{❌},{❌}-{❌}"'"{❌}.{❌}{{❌}all{❌}characters{❌},{❌}quotes{❌}must{❌}be{❌}doubled{❌}} -{❌}-{❌}encoded{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}-{❌}"#"{❌},{❌}@{❌}hex{❌},{❌}S{❌}.{❌} -{❌}hex{❌}:{❌}[{❌}"0"{❌}-{❌}"9"{❌};{❌}"a"{❌}-{❌}"f"{❌};{❌}"A"{❌}-{❌}"F"{❌}]{❌}+{❌}.{❌} -{❌}-{❌}charset{❌}:{❌}inclusion{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}{❌}exclusion{❌}.{❌} -{❌}inclusion{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}set{❌}.{❌} -{❌}exclusion{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}"~"{❌},{❌}S{❌},{❌}set{❌}.{❌} -{❌}-{❌}set{❌}:{❌}"["{❌},{❌}S{❌},{❌}member{❌}*{❌}({❌}[{❌}";|"{❌}]{❌},{❌}S{❌}){❌},{❌}"]"{❌},{❌}S{❌}.{❌} -{❌}-{❌}member{❌}:{❌}literal{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}range{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}class{❌}.{❌} -{❌}range{❌}:{❌}from{❌},{❌}"-"{❌},{❌}S{❌},{❌}to{❌}.{❌} -{❌}@{❌}from{❌}:{❌}character{❌}.{❌} -{❌}@{❌}to{❌}:{❌}character{❌}.{❌} -{❌}-{❌}character{❌}:{❌}-{❌}'"'{❌},{❌}dchar{❌},{❌}-{❌}'"'{❌},{❌}S{❌};{❌} -{❌}-{❌}"'"{❌},{❌}schar{❌},{❌}-{❌}"'"{❌},{❌}S{❌};{❌} -{❌}"#"{❌},{❌}hex{❌},{❌}S{❌}.{❌} -{❌}class{❌}:{❌}@{❌}code{❌},{❌}S{❌}.{❌} -{❌}code{❌}:{❌}letter{❌},{❌}letter{❌}.{❌} -{❌}-{❌}letter{❌}:{❌}[{❌}"a"{❌}-{❌}"z"{❌};{❌}"A"{❌}-{❌}"Z"{❌}]{❌}.{❌} -# -{❌}ixml{❌}:{❌}S{❌},{❌}rule{❌}+{❌}S{❌},{❌}S{❌}.{❌} -{❌}-{❌}S{❌}:{❌}({❌}whitespace{❌};{❌}comment{❌}){❌}*{❌}.{❌} -{❌}-{❌}whitespace{❌}:{❌}-{❌}[{❌}Zs{❌}]{❌};{❌}tab{❌};{❌}lf{❌};{❌}cr{❌}.{❌} -{❌}-{❌}tab{❌}:{❌}-{❌}#9{❌}.{❌} -{❌}-{❌}lf{❌}:{❌}-{❌}#a{❌}.{❌} -{❌}-{❌}cr{❌}:{❌}-{❌}#d{❌}.{❌} -{❌}comment{❌}:{❌}-{❌}"{"{❌},{❌}({❌}cchar{❌};{❌}comment{❌}){❌}*{❌},{❌}-{❌}"}"{❌}.{❌} -{❌}-{❌}cchar{❌}:{❌}~{❌}[{❌}"{}"{❌}]{❌}.{❌} -{❌}rule{❌}:{❌}({❌}mark{❌},{❌}S{❌}){❌}?{❌},{❌}name{❌},{❌}S{❌},{❌}[{❌}"=:"{❌}]{❌},{❌}S{❌},{❌}-{❌}alts{❌},{❌}"."{❌}.{❌} -{❌}@{❌}mark{❌}:{❌}[{❌}"@^-"{❌}]{❌}.{❌} -{❌}alts{❌}:{❌}alt{❌}+{❌}({❌}[{❌}";|"{❌}]{❌},{❌}S{❌}){❌}.{❌} -{❌}alt{❌}:{❌}term{❌}*{❌}({❌}","{❌},{❌}S{❌}){❌}.{❌} -{❌}-{❌}term{❌}:{❌}factor{❌};{❌} -{❌}{❌}{❌}{❌}{❌}option{❌};{❌} -{❌}{❌}{❌}{❌}{❌}repeat0{❌};{❌} -{❌}{❌}{❌}{❌}{❌}repeat1{❌}.{❌} -{❌}-{❌}factor{❌}:{❌}terminal{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}nonterminal{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}"("{❌},{❌}S{❌},{❌}alts{❌},{❌}")"{❌},{❌}S{❌}.{❌} -{❌}repeat0{❌}:{❌}factor{❌},{❌}"*"{❌},{❌}S{❌},{❌}sep{❌}?{❌}.{❌} -{❌}repeat1{❌}:{❌}factor{❌},{❌}"+"{❌},{❌}S{❌},{❌}sep{❌}?{❌}.{❌} -{❌}option{❌}:{❌}factor{❌},{❌}"?"{❌},{❌}S{❌}.{❌} -{❌}sep{❌}:{❌}factor{❌}.{❌} -{❌}nonterminal{❌}:{❌}({❌}mark{❌},{❌}S{❌}){❌}?{❌},{❌}name{❌},{❌}S{❌}.{❌} -{❌}-{❌}terminal{❌}:{❌}literal{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}{❌}charset{❌}.{❌} -{❌}literal{❌}:{❌}quoted{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}encoded{❌}.{❌} -{❌}-{❌}quoted{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}-{❌}string{❌}.{❌} -{❌}@{❌}name{❌}:{❌}namestart{❌},{❌}namefollower{❌}*{❌}.{❌} -{❌}-{❌}namestart{❌}:{❌}[{❌}"_"{❌};{❌}Ll{❌};{❌}Lu{❌};{❌}Lm{❌};{❌}Lt{❌};{❌}Lo{❌}]{❌}.{❌} -{❌}-{❌}namefollower{❌}:{❌}namestart{❌};{❌}[{❌}"-.·‿⁀"{❌};{❌}Nd{❌};{❌}Mn{❌}]{❌}.{❌} -{❌}@{❌}tmark{❌}:{❌}[{❌}"^-"{❌}]{❌}.{❌} -{❌}string{❌}:{❌}-{❌}'"'{❌},{❌}dstring{❌},{❌}-{❌}'"'{❌},{❌}S{❌};{❌} -{❌}-{❌}"'"{❌},{❌}sstring{❌},{❌}-{❌}"'"{❌},{❌}S{❌}.{❌} -{❌}@{❌}dstring{❌}:{❌}dchar{❌}+{❌}.{❌} -{❌}@{❌}sstring{❌}:{❌}schar{❌}+{❌}.{❌} -{❌}dchar{❌}:{❌}~{❌}[{❌}'"'{❌}]{❌};{❌} -{❌}{❌}{❌}{❌}{❌}'"'{❌},{❌}-{❌}'"'{❌}.{❌}{{❌}all{❌}characters{❌},{❌}quotes{❌}must{❌}be{❌}doubled{❌}} -{❌}schar{❌}:{❌}~{❌}[{❌}"'"{❌}]{❌};{❌} -{❌}{❌}{❌}{❌}{❌}"'"{❌},{❌}-{❌}"'"{❌}.{❌}{{❌}all{❌}characters{❌},{❌}quotes{❌}must{❌}be{❌}doubled{❌}} -{❌}-{❌}encoded{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}-{❌}"#"{❌},{❌}@{❌}hex{❌},{❌}S{❌}.{❌} -{❌}hex{❌}:{❌}[{❌}"0"{❌}-{❌}"9"{❌};{❌}"a"{❌}-{❌}"f"{❌};{❌}"A"{❌}-{❌}"F"{❌}]{❌}+{❌}.{❌} -{❌}-{❌}charset{❌}:{❌}inclusion{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}{❌}exclusion{❌}.{❌} -{❌}inclusion{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}set{❌}.{❌} -{❌}exclusion{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}"~"{❌},{❌}S{❌},{❌}set{❌}.{❌} -{❌}-{❌}set{❌}:{❌}"["{❌},{❌}S{❌},{❌}member{❌}*{❌}({❌}[{❌}";|"{❌}]{❌},{❌}S{❌}){❌},{❌}"]"{❌},{❌}S{❌}.{❌} -{❌}-{❌}member{❌}:{❌}literal{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}range{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}class{❌}.{❌} -{❌}range{❌}:{❌}from{❌},{❌}"-"{❌},{❌}S{❌},{❌}to{❌}.{❌} -{❌}@{❌}from{❌}:{❌}character{❌}.{❌} -{❌}@{❌}to{❌}:{❌}character{❌}.{❌} -{❌}-{❌}character{❌}:{❌}-{❌}'"'{❌},{❌}dchar{❌},{❌}-{❌}'"'{❌},{❌}S{❌};{❌} -{❌}-{❌}"'"{❌},{❌}schar{❌},{❌}-{❌}"'"{❌},{❌}S{❌};{❌} -{❌}"#"{❌},{❌}hex{❌},{❌}S{❌}.{❌} -{❌}class{❌}:{❌}@{❌}code{❌},{❌}S{❌}.{❌} -{❌}code{❌}:{❌}letter{❌},{❌}letter{❌}.{❌} -{❌}-{❌}letter{❌}:{❌}[{❌}"a"{❌}-{❌}"z"{❌};{❌}"A"{❌}-{❌}"Z"{❌}]{❌}.{❌} -# - - - - - : - - - - - , - - - - - + - - - - - - - , - - - - - . - - - - - : - - - ( - - - - - - - ; - - - - - - - ) - * - - - . - - - - - : - - - - [ - - - - ] - - - ; - - - - - - ; - - - - - - ; - - - - - - . - - - - - : - - - - - - - . - - - - - : - - - - - - - . - - - - - : - - - - - - - . - - - - : - - - - - - , - - ( - - - - - - - ; - - - - - - - ) - * - - , - - - - - - . - - - - - : - - - ~ - [ - - - - ] - - - . - - - - : - - - , - - - - , - - - - , - - [ - - - - ] - - , - - - - , - - - - - , - - - - - . - - - - - : - - - [ - - - - ] - - - . - - - - : - - - - - - + - - ( - - - - [ - - - - ] - - , - - - - - - ) - - - - . - - - - : - - - - - - * - - ( - - - - - - , - - - - - - ) - - - - . - - - - - : - - - - - - ; - - - - - - - - - - - ; - - - - - - - - - - - ; - - - - - - - - - - - . - - - - - : - - - - - - ; - - - - - - - - - - - - ; - - - - - - - - - - - , - - - - , - - - - , - - - - , - - - - - . - - - - : - - - - - , - - - - , - - - - , - - - . - - - - : - - - - - , - - - - , - - - - , - - - . - - - - : - - - - - , - - - - , - - - - - . - - - - : - - - - - - . - - - - : - - - , - - - - , - - - - - . - - - - - : - - - - - - ; - - - - - - - - - - - - - . - - - - : - - - - - - ; - - - - - - - - - - - - . - - - - - : - - - , - - - - - - . - - - - - : - - - - - , - - - - - * - - - . - - - - - : - - - [ - - - - ; - - - - ; - - - - ; - - - - ; - - - - ; - - - - ] - - - . - - - - - : - - - - - - ; - - - [ - - - - ; - - - - ; - - - - ] - - - . - - - - - : - - - [ - - - - ] - - - . - - - - : - - - - - - , - - - - , - - - - - , - - - - - ; - - - - - - - , - - - - , - - - - - , - - - - - . - - - - - : - - - - - - + - - - . - - - - - : - - - - - - + - - - . - - - - : - - - ~ - [ - - - - ] - - - ; - - - - - - - - - - , - - - - - - . - - - all - characters - , - quotes - must - be - doubled - - - - - : - - - ~ - [ - - - - ] - - - ; - - - - - - - - - - , - - - - - - . - - - all - characters - , - quotes - must - be - doubled - - - - - - : - - - , - - - - - , - - - - - , - - - - - . - - - - : - - - - [ - - - - - ; - - - - - ; - - - - - ] - - + - - - . - - - - - : - - - - - - ; - - - - - - - - - - - - - . - - - - : - - - , - - - - - . - - - - : - - - , - - - - , - - - - , - - - - - . - - - - - : - - - - - , - - - - , - - - - - * - - ( - - - - [ - - - - ] - - , - - - - - - ) - - - , - - - - , - - - - - . - - - - - : - - - - - - ; - - - - - - - - - - - - ; - - - - - - - - - - - - . - - - - : - - - - - , - - - - , - - - - , - - - - - . - - - - - : - - - - - - . - - - - - : - - - - - - . - - - - - : - - - - - - , - - - - , - - - - - , - - - - - ; - - - - - - - , - - - - , - - - - - , - - - - - ; - - - - - - , - - - - , - - - - - . - - - - : - - - - - - , - - - - - . - - - - : - - - - - , - - - - - . - - - - - : - - - [ - - - - - ; - - - - - ] - - - . - - diff --git a/tests/tests/ixml/ixml-comments.res b/tests/tests/ixml/ixml-comments.res deleted file mode 100644 index ce994f7f..00000000 --- a/tests/tests/ixml/ixml-comments.res +++ /dev/null @@ -1,1342 +0,0 @@ -{❌}ixml{❌}:{❌}S{❌},{❌}rule{❌}+{❌}S{❌},{❌}S{❌}.{❌} -{❌}-{❌}S{❌}:{❌}({❌}whitespace{❌};{❌}comment{❌}){❌}*{❌}.{❌} -{❌}-{❌}whitespace{❌}:{❌}-{❌}[{❌}Zs{❌}]{❌};{❌}tab{❌};{❌}lf{❌};{❌}cr{❌}.{❌} -{❌}-{❌}tab{❌}:{❌}-{❌}#9{❌}.{❌} -{❌}-{❌}lf{❌}:{❌}-{❌}#a{❌}.{❌} -{❌}-{❌}cr{❌}:{❌}-{❌}#d{❌}.{❌} -{❌}comment{❌}:{❌}-{❌}"{"{❌},{❌}({❌}cchar{❌};{❌}comment{❌}){❌}*{❌},{❌}-{❌}"}"{❌}.{❌} -{❌}-{❌}cchar{❌}:{❌}~{❌}[{❌}"{}"{❌}]{❌}.{❌} -{❌}rule{❌}:{❌}({❌}mark{❌},{❌}S{❌}){❌}?{❌},{❌}name{❌},{❌}S{❌},{❌}[{❌}"=:"{❌}]{❌},{❌}S{❌},{❌}-{❌}alts{❌},{❌}"."{❌}.{❌} -{❌}@{❌}mark{❌}:{❌}[{❌}"@^-"{❌}]{❌}.{❌} -{❌}alts{❌}:{❌}alt{❌}+{❌}({❌}[{❌}";|"{❌}]{❌},{❌}S{❌}){❌}.{❌} -{❌}alt{❌}:{❌}term{❌}*{❌}({❌}","{❌},{❌}S{❌}){❌}.{❌} -{❌}-{❌}term{❌}:{❌}factor{❌};{❌} -{❌}{❌}{❌}{❌}{❌}option{❌};{❌} -{❌}{❌}{❌}{❌}{❌}repeat0{❌};{❌} -{❌}{❌}{❌}{❌}{❌}repeat1{❌}.{❌} -{❌}-{❌}factor{❌}:{❌}terminal{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}nonterminal{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}"("{❌},{❌}S{❌},{❌}alts{❌},{❌}")"{❌},{❌}S{❌}.{❌} -{❌}repeat0{❌}:{❌}factor{❌},{❌}"*"{❌},{❌}S{❌},{❌}sep{❌}?{❌}.{❌} -{❌}repeat1{❌}:{❌}factor{❌},{❌}"+"{❌},{❌}S{❌},{❌}sep{❌}?{❌}.{❌} -{❌}option{❌}:{❌}factor{❌},{❌}"?"{❌},{❌}S{❌}.{❌} -{❌}sep{❌}:{❌}factor{❌}.{❌} -{❌}nonterminal{❌}:{❌}({❌}mark{❌},{❌}S{❌}){❌}?{❌},{❌}name{❌},{❌}S{❌}.{❌} -{❌}-{❌}terminal{❌}:{❌}literal{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}{❌}charset{❌}.{❌} -{❌}literal{❌}:{❌}quoted{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}encoded{❌}.{❌} -{❌}-{❌}quoted{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}-{❌}string{❌}.{❌} -{❌}@{❌}name{❌}:{❌}namestart{❌},{❌}namefollower{❌}*{❌}.{❌} -{❌}-{❌}namestart{❌}:{❌}[{❌}"_"{❌};{❌}Ll{❌};{❌}Lu{❌};{❌}Lm{❌};{❌}Lt{❌};{❌}Lo{❌}]{❌}.{❌} -{❌}-{❌}namefollower{❌}:{❌}namestart{❌};{❌}[{❌}"-.·‿⁀"{❌};{❌}Nd{❌};{❌}Mn{❌}]{❌}.{❌} -{❌}@{❌}tmark{❌}:{❌}[{❌}"^-"{❌}]{❌}.{❌} -{❌}string{❌}:{❌}-{❌}'"'{❌},{❌}dstring{❌},{❌}-{❌}'"'{❌},{❌}S{❌};{❌} -{❌}-{❌}"'"{❌},{❌}sstring{❌},{❌}-{❌}"'"{❌},{❌}S{❌}.{❌} -{❌}@{❌}dstring{❌}:{❌}dchar{❌}+{❌}.{❌} -{❌}@{❌}sstring{❌}:{❌}schar{❌}+{❌}.{❌} -{❌}dchar{❌}:{❌}~{❌}[{❌}'"'{❌}]{❌};{❌} -{❌}{❌}{❌}{❌}{❌}'"'{❌},{❌}-{❌}'"'{❌}.{❌}{{❌}all{❌}characters{❌},{❌}quotes{❌}must{❌}be{❌}doubled{❌}} -{❌}schar{❌}:{❌}~{❌}[{❌}"'"{❌}]{❌};{❌} -{❌}{❌}{❌}{❌}{❌}"'"{❌},{❌}-{❌}"'"{❌}.{❌}{{❌}all{❌}characters{❌},{❌}quotes{❌}must{❌}be{❌}doubled{❌}} -{❌}-{❌}encoded{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}-{❌}"#"{❌},{❌}@{❌}hex{❌},{❌}S{❌}.{❌} -{❌}hex{❌}:{❌}[{❌}"0"{❌}-{❌}"9"{❌};{❌}"a"{❌}-{❌}"f"{❌};{❌}"A"{❌}-{❌}"F"{❌}]{❌}+{❌}.{❌} -{❌}-{❌}charset{❌}:{❌}inclusion{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}{❌}exclusion{❌}.{❌} -{❌}inclusion{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}set{❌}.{❌} -{❌}exclusion{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}"~"{❌},{❌}S{❌},{❌}set{❌}.{❌} -{❌}-{❌}set{❌}:{❌}"["{❌},{❌}S{❌},{❌}member{❌}*{❌}({❌}[{❌}";|"{❌}]{❌},{❌}S{❌}){❌},{❌}"]"{❌},{❌}S{❌}.{❌} -{❌}-{❌}member{❌}:{❌}literal{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}range{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}class{❌}.{❌} -{❌}range{❌}:{❌}from{❌},{❌}"-"{❌},{❌}S{❌},{❌}to{❌}.{❌} -{❌}@{❌}from{❌}:{❌}character{❌}.{❌} -{❌}@{❌}to{❌}:{❌}character{❌}.{❌} -{❌}-{❌}character{❌}:{❌}-{❌}'"'{❌},{❌}dchar{❌},{❌}-{❌}'"'{❌},{❌}S{❌};{❌} -{❌}-{❌}"'"{❌},{❌}schar{❌},{❌}-{❌}"'"{❌},{❌}S{❌};{❌} -{❌}"#"{❌},{❌}hex{❌},{❌}S{❌}.{❌} -{❌}class{❌}:{❌}@{❌}code{❌},{❌}S{❌}.{❌} -{❌}code{❌}:{❌}letter{❌},{❌}letter{❌}.{❌} -{❌}-{❌}letter{❌}:{❌}[{❌}"a"{❌}-{❌}"z"{❌};{❌}"A"{❌}-{❌}"Z"{❌}]{❌}.{❌} -# -{❌}ixml{❌}:{❌}S{❌},{❌}rule{❌}+{❌}S{❌},{❌}S{❌}.{❌} -{❌}-{❌}S{❌}:{❌}({❌}whitespace{❌};{❌}comment{❌}){❌}*{❌}.{❌} -{❌}-{❌}whitespace{❌}:{❌}-{❌}[{❌}Zs{❌}]{❌};{❌}tab{❌};{❌}lf{❌};{❌}cr{❌}.{❌} -{❌}-{❌}tab{❌}:{❌}-{❌}#9{❌}.{❌} -{❌}-{❌}lf{❌}:{❌}-{❌}#a{❌}.{❌} -{❌}-{❌}cr{❌}:{❌}-{❌}#d{❌}.{❌} -{❌}comment{❌}:{❌}-{❌}"{"{❌},{❌}({❌}cchar{❌};{❌}comment{❌}){❌}*{❌},{❌}-{❌}"}"{❌}.{❌} -{❌}-{❌}cchar{❌}:{❌}~{❌}[{❌}"{}"{❌}]{❌}.{❌} -{❌}rule{❌}:{❌}({❌}mark{❌},{❌}S{❌}){❌}?{❌},{❌}name{❌},{❌}S{❌},{❌}[{❌}"=:"{❌}]{❌},{❌}S{❌},{❌}-{❌}alts{❌},{❌}"."{❌}.{❌} -{❌}@{❌}mark{❌}:{❌}[{❌}"@^-"{❌}]{❌}.{❌} -{❌}alts{❌}:{❌}alt{❌}+{❌}({❌}[{❌}";|"{❌}]{❌},{❌}S{❌}){❌}.{❌} -{❌}alt{❌}:{❌}term{❌}*{❌}({❌}","{❌},{❌}S{❌}){❌}.{❌} -{❌}-{❌}term{❌}:{❌}factor{❌};{❌} -{❌}{❌}{❌}{❌}{❌}option{❌};{❌} -{❌}{❌}{❌}{❌}{❌}repeat0{❌};{❌} -{❌}{❌}{❌}{❌}{❌}repeat1{❌}.{❌} -{❌}-{❌}factor{❌}:{❌}terminal{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}nonterminal{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}"("{❌},{❌}S{❌},{❌}alts{❌},{❌}")"{❌},{❌}S{❌}.{❌} -{❌}repeat0{❌}:{❌}factor{❌},{❌}"*"{❌},{❌}S{❌},{❌}sep{❌}?{❌}.{❌} -{❌}repeat1{❌}:{❌}factor{❌},{❌}"+"{❌},{❌}S{❌},{❌}sep{❌}?{❌}.{❌} -{❌}option{❌}:{❌}factor{❌},{❌}"?"{❌},{❌}S{❌}.{❌} -{❌}sep{❌}:{❌}factor{❌}.{❌} -{❌}nonterminal{❌}:{❌}({❌}mark{❌},{❌}S{❌}){❌}?{❌},{❌}name{❌},{❌}S{❌}.{❌} -{❌}-{❌}terminal{❌}:{❌}literal{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}{❌}charset{❌}.{❌} -{❌}literal{❌}:{❌}quoted{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}encoded{❌}.{❌} -{❌}-{❌}quoted{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}-{❌}string{❌}.{❌} -{❌}@{❌}name{❌}:{❌}namestart{❌},{❌}namefollower{❌}*{❌}.{❌} -{❌}-{❌}namestart{❌}:{❌}[{❌}"_"{❌};{❌}Ll{❌};{❌}Lu{❌};{❌}Lm{❌};{❌}Lt{❌};{❌}Lo{❌}]{❌}.{❌} -{❌}-{❌}namefollower{❌}:{❌}namestart{❌};{❌}[{❌}"-.·‿⁀"{❌};{❌}Nd{❌};{❌}Mn{❌}]{❌}.{❌} -{❌}@{❌}tmark{❌}:{❌}[{❌}"^-"{❌}]{❌}.{❌} -{❌}string{❌}:{❌}-{❌}'"'{❌},{❌}dstring{❌},{❌}-{❌}'"'{❌},{❌}S{❌};{❌} -{❌}-{❌}"'"{❌},{❌}sstring{❌},{❌}-{❌}"'"{❌},{❌}S{❌}.{❌} -{❌}@{❌}dstring{❌}:{❌}dchar{❌}+{❌}.{❌} -{❌}@{❌}sstring{❌}:{❌}schar{❌}+{❌}.{❌} -{❌}dchar{❌}:{❌}~{❌}[{❌}'"'{❌}]{❌};{❌} -{❌}{❌}{❌}{❌}{❌}'"'{❌},{❌}-{❌}'"'{❌}.{❌}{{❌}all{❌}characters{❌},{❌}quotes{❌}must{❌}be{❌}doubled{❌}} -{❌}schar{❌}:{❌}~{❌}[{❌}"'"{❌}]{❌};{❌} -{❌}{❌}{❌}{❌}{❌}"'"{❌},{❌}-{❌}"'"{❌}.{❌}{{❌}all{❌}characters{❌},{❌}quotes{❌}must{❌}be{❌}doubled{❌}} -{❌}-{❌}encoded{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}-{❌}"#"{❌},{❌}@{❌}hex{❌},{❌}S{❌}.{❌} -{❌}hex{❌}:{❌}[{❌}"0"{❌}-{❌}"9"{❌};{❌}"a"{❌}-{❌}"f"{❌};{❌}"A"{❌}-{❌}"F"{❌}]{❌}+{❌}.{❌} -{❌}-{❌}charset{❌}:{❌}inclusion{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}{❌}exclusion{❌}.{❌} -{❌}inclusion{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}set{❌}.{❌} -{❌}exclusion{❌}:{❌}({❌}tmark{❌},{❌}S{❌}){❌}?{❌},{❌}"~"{❌},{❌}S{❌},{❌}set{❌}.{❌} -{❌}-{❌}set{❌}:{❌}"["{❌},{❌}S{❌},{❌}member{❌}*{❌}({❌}[{❌}";|"{❌}]{❌},{❌}S{❌}){❌},{❌}"]"{❌},{❌}S{❌}.{❌} -{❌}-{❌}member{❌}:{❌}literal{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}range{❌};{❌} -{❌}{❌}{❌}{❌}{❌}{❌}class{❌}.{❌} -{❌}range{❌}:{❌}from{❌},{❌}"-"{❌},{❌}S{❌},{❌}to{❌}.{❌} -{❌}@{❌}from{❌}:{❌}character{❌}.{❌} -{❌}@{❌}to{❌}:{❌}character{❌}.{❌} -{❌}-{❌}character{❌}:{❌}-{❌}'"'{❌},{❌}dchar{❌},{❌}-{❌}'"'{❌},{❌}S{❌};{❌} -{❌}-{❌}"'"{❌},{❌}schar{❌},{❌}-{❌}"'"{❌},{❌}S{❌};{❌} -{❌}"#"{❌},{❌}hex{❌},{❌}S{❌}.{❌} -{❌}class{❌}:{❌}@{❌}code{❌},{❌}S{❌}.{❌} -{❌}code{❌}:{❌}letter{❌},{❌}letter{❌}.{❌} -{❌}-{❌}letter{❌}:{❌}[{❌}"a"{❌}-{❌}"z"{❌};{❌}"A"{❌}-{❌}"Z"{❌}]{❌}.{❌} -# - - - - - : - - - - - , - - - - - + - - - - - - - , - - - - - . - - - - - : - - - ( - - - - - - - ; - - - - - - - ) - * - - - . - - - - - : - - - - [ - - - - ] - - - ; - - - - - - ; - - - - - - ; - - - - - - . - - - - - : - - - - - - - . - - - - - : - - - - - - - . - - - - - : - - - - - - - . - - - - : - - - - - - , - - ( - - - - - - - ; - - - - - - - ) - * - - , - - - - - - . - - - - - : - - - ~ - [ - - - - ] - - - . - - - - : - - - , - - - - , - - - - , - - [ - - - - ] - - , - - - - , - - - - - , - - - - - . - - - - - : - - - [ - - - - ] - - - . - - - - : - - - - - - + - - ( - - - - [ - - - - ] - - , - - - - - - ) - - - - . - - - - : - - - - - - * - - ( - - - - - - , - - - - - - ) - - - - . - - - - - : - - - - - - ; - - - - - - - - - - - ; - - - - - - - - - - - ; - - - - - - - - - - - . - - - - - : - - - - - - ; - - - - - - - - - - - - ; - - - - - - - - - - - , - - - - , - - - - , - - - - , - - - - - . - - - - : - - - - - , - - - - , - - - - , - - - . - - - - : - - - - - , - - - - , - - - - , - - - . - - - - : - - - - - , - - - - , - - - - - . - - - - : - - - - - - . - - - - : - - - , - - - - , - - - - - . - - - - - : - - - - - - ; - - - - - - - - - - - - - . - - - - : - - - - - - ; - - - - - - - - - - - - . - - - - - : - - - , - - - - - - . - - - - - : - - - - - , - - - - - * - - - . - - - - - : - - - [ - - - - ; - - - - ; - - - - ; - - - - ; - - - - ; - - - - ] - - - . - - - - - : - - - - - - ; - - - [ - - - - ; - - - - ; - - - - ] - - - . - - - - - : - - - [ - - - - ] - - - . - - - - : - - - - - - , - - - - , - - - - - , - - - - - ; - - - - - - - , - - - - , - - - - - , - - - - - . - - - - - : - - - - - - + - - - . - - - - - : - - - - - - + - - - . - - - - : - - - ~ - [ - - - - ] - - - ; - - - - - - - - - - , - - - - - - . - - - all - characters - , - quotes - must - be - doubled - - - - - : - - - ~ - [ - - - - ] - - - ; - - - - - - - - - - , - - - - - - . - - - all - characters - , - quotes - must - be - doubled - - - - - - : - - - , - - - - - , - - - - - , - - - - - . - - - - : - - - - [ - - - - - ; - - - - - ; - - - - - ] - - + - - - . - - - - - : - - - - - - ; - - - - - - - - - - - - - . - - - - : - - - , - - - - - . - - - - : - - - , - - - - , - - - - , - - - - - . - - - - - : - - - - - , - - - - , - - - - - * - - ( - - - - [ - - - - ] - - , - - - - - - ) - - - , - - - - , - - - - - . - - - - - : - - - - - - ; - - - - - - - - - - - - ; - - - - - - - - - - - - . - - - - : - - - - - , - - - - , - - - - , - - - - - . - - - - - : - - - - - - . - - - - - : - - - - - - . - - - - - : - - - - - - , - - - - , - - - - - , - - - - - ; - - - - - - - , - - - - , - - - - - , - - - - - ; - - - - - - , - - - - , - - - - - . - - - - : - - - - - - , - - - - - . - - - - : - - - - - , - - - - - . - - - - - : - - - [ - - - - - ; - - - - - ] - - - . - - diff --git a/tests/tests/ixml/ixml-no-spaces.inp b/tests/tests/ixml/ixml-no-spaces.inp deleted file mode 100644 index 9d94beee..00000000 --- a/tests/tests/ixml/ixml-no-spaces.inp +++ /dev/null @@ -1,60 +0,0 @@ -ixml:S,rule+S,S. --S:(whitespace;comment)*. --whitespace:-[Zs];tab;{lf;}cr. --tab:-#9. -{-lf:-#a.} --cr:-#d. -comment:-"{",(cchar;comment)*,-"}". --cchar:~["{}"]. -rule:(mark,S)?,name,S,["=:"],S,-alts,".". -@mark:["@^-"]. -alts:alt+([";|"],S). -alt:term*(",",S). --term:factor; -option; -repeat0; -repeat1. --factor:terminal; -nonterminal; -"(",S,alts,")",S. -repeat0:factor,"*",S,sep?. -repeat1:factor,"+",S,sep?. -option:factor,"?",S. -sep:factor. -nonterminal:(mark,S)?,name,S. --terminal:literal; -charset. -literal:quoted; -encoded. --quoted:(tmark,S)?,-string. -@name:namestart,namefollower*. --namestart:["_";Ll;Lu;Lm;Lt;Lo]. --namefollower:namestart;["-.·‿⁀";Nd;Mn]. -@tmark:["^-"]. -string:-'"',dstring,-'"',S; --"'",sstring,-"'",S. -@dstring:dchar+. -@sstring:schar+. -dchar:~['"']; -'"',-'"'.{allcharacters,quotesmustbedoubled} -schar:~["'"]; -"'",-"'".{allcharacters,quotesmustbedoubled} --encoded:(tmark,S)?,-"#",@hex,S. -hex:["0"-"9";"a"-"f";"A"-"F"]+. --charset:inclusion; -exclusion. -inclusion:(tmark,S)?,set. -exclusion:(tmark,S)?,"~",S,set. --set:"[",S,member*([";|"],S),"]",S. --member:literal; -range; -class. -range:from,"-",S,to. -@from:character. -@to:character. --character:-'"',dchar,-'"',S; --"'",schar,-"'",S; -"#",hex,S. -class:@code,S. -code:letter,letter. --letter:["a"-"z";"A"-"Z"]. diff --git a/tests/tests/ixml/ixml-no-spaces.ixml b/tests/tests/ixml/ixml-no-spaces.ixml deleted file mode 100644 index a8722e00..00000000 --- a/tests/tests/ixml/ixml-no-spaces.ixml +++ /dev/null @@ -1,60 +0,0 @@ -ixml:S,rule+S,S. --S:(whitespace;comment)*. --whitespace:-[Zs];tab;lf;cr. --tab:-#9. --lf:-#a. --cr:-#d. -comment:-"{",(cchar;comment)*,-"}". --cchar:~["{}"]. -rule:(mark,S)?,name,S,["=:"],S,-alts,".". -@mark:["@^-"]. -alts:alt+([";|"],S). -alt:term*(",",S). --term:factor; -option; -repeat0; -repeat1. --factor:terminal; -nonterminal; -"(",S,alts,")",S. -repeat0:factor,"*",S,sep?. -repeat1:factor,"+",S,sep?. -option:factor,"?",S. -sep:factor. -nonterminal:(mark,S)?,name,S. --terminal:literal; -charset. -literal:quoted; -encoded. --quoted:(tmark,S)?,-string. -@name:namestart,namefollower*. --namestart:["_";Ll;Lu;Lm;Lt;Lo]. --namefollower:namestart;["-.·‿⁀";Nd;Mn]. -@tmark:["^-"]. -string:-'"',dstring,-'"',S; --"'",sstring,-"'",S. -@dstring:dchar+. -@sstring:schar+. -dchar:~['"']; -'"',-'"'.{allcharacters,quotesmustbedoubled} -schar:~["'"]; -"'",-"'".{allcharacters,quotesmustbedoubled} --encoded:(tmark,S)?,-"#",@hex,S. -hex:["0"-"9";"a"-"f";"A"-"F"]+. --charset:inclusion; -exclusion. -inclusion:(tmark,S)?,set. -exclusion:(tmark,S)?,"~",S,set. --set:"[",S,member*([";|"],S),"]",S. --member:literal; -range; -class. -range:from,"-",S,to. -@from:character. -@to:character. --character:-'"',dchar,-'"',S; --"'",schar,-"'",S; -"#",hex,S. -class:@code,S. -code:letter,letter. --letter:["a"-"z";"A"-"Z"]. diff --git a/tests/tests/ixml/ixml-no-spaces.req b/tests/tests/ixml/ixml-no-spaces.req deleted file mode 100644 index 611a3542..00000000 --- a/tests/tests/ixml/ixml-no-spaces.req +++ /dev/null @@ -1,530 +0,0 @@ -ixml:S,rule+S,S. --S:(whitespace;comment)*. --whitespace:-[Zs];tab;lf;cr. --tab:-#9. --lf:-#a. --cr:-#d. -comment:-"{",(cchar;comment)*,-"}". --cchar:~["{}"]. -rule:(mark,S)?,name,S,["=:"],S,-alts,".". -@mark:["@^-"]. -alts:alt+([";|"],S). -alt:term*(",",S). --term:factor; -option; -repeat0; -repeat1. --factor:terminal; -nonterminal; -"(",S,alts,")",S. -repeat0:factor,"*",S,sep?. -repeat1:factor,"+",S,sep?. -option:factor,"?",S. -sep:factor. -nonterminal:(mark,S)?,name,S. --terminal:literal; -charset. -literal:quoted; -encoded. --quoted:(tmark,S)?,-string. -@name:namestart,namefollower*. --namestart:["_";Ll;Lu;Lm;Lt;Lo]. --namefollower:namestart;["-.·‿⁀";Nd;Mn]. -@tmark:["^-"]. -string:-'"',dstring,-'"',S; --"'",sstring,-"'",S. -@dstring:dchar+. -@sstring:schar+. -dchar:~['"']; -'"',-'"'.{allcharacters,quotesmustbedoubled} -schar:~["'"]; -"'",-"'".{allcharacters,quotesmustbedoubled} --encoded:(tmark,S)?,-"#",@hex,S. -hex:["0"-"9";"a"-"f";"A"-"F"]+. --charset:inclusion; -exclusion. -inclusion:(tmark,S)?,set. -exclusion:(tmark,S)?,"~",S,set. --set:"[",S,member*([";|"],S),"]",S. --member:literal; -range; -class. -range:from,"-",S,to. -@from:character. -@to:character. --character:-'"',dchar,-'"',S; --"'",schar,-"'",S; -"#",hex,S. -class:@code,S. -code:letter,letter. --letter:["a"-"z";"A"-"Z"]. -# -ixml:S,rule+S,S. --S:(whitespace;comment)*. --whitespace:-[Zs];tab;{lf;}cr. --tab:-#9. -{-lf:-#a.} --cr:-#d. -comment:-"{",(cchar;comment)*,-"}". --cchar:~["{}"]. -rule:(mark,S)?,name,S,["=:"],S,-alts,".". -@mark:["@^-"]. -alts:alt+([";|"],S). -alt:term*(",",S). --term:factor; -option; -repeat0; -repeat1. --factor:terminal; -nonterminal; -"(",S,alts,")",S. -repeat0:factor,"*",S,sep?. -repeat1:factor,"+",S,sep?. -option:factor,"?",S. -sep:factor. -nonterminal:(mark,S)?,name,S. --terminal:literal; -charset. -literal:quoted; -encoded. --quoted:(tmark,S)?,-string. -@name:namestart,namefollower*. --namestart:["_";Ll;Lu;Lm;Lt;Lo]. --namefollower:namestart;["-.·‿⁀";Nd;Mn]. -@tmark:["^-"]. -string:-'"',dstring,-'"',S; --"'",sstring,-"'",S. -@dstring:dchar+. -@sstring:schar+. -dchar:~['"']; -'"',-'"'.{allcharacters,quotesmustbedoubled} -schar:~["'"]; -"'",-"'".{allcharacters,quotesmustbedoubled} --encoded:(tmark,S)?,-"#",@hex,S. -hex:["0"-"9";"a"-"f";"A"-"F"]+. --charset:inclusion; -exclusion. -inclusion:(tmark,S)?,set. -exclusion:(tmark,S)?,"~",S,set. --set:"[",S,member*([";|"],S),"]",S. --member:literal; -range; -class. -range:from,"-",S,to. -@from:character. -@to:character. --character:-'"',dchar,-'"',S; --"'",schar,-"'",S; -"#",hex,S. -class:@code,S. -code:letter,letter. --letter:["a"-"z";"A"-"Z"]. -# - - - : - - , - - + - - - - , - - . - : - - ( - - - - ; - - - - )* - . - : - - [ - ] - ; - - - ; - lf; - - - . - : - - - . - -lf:-#a. - : - - - . - : - - , - ( - - - - ; - - - - )*, - - . - : - - ~[ - ] - . - : - - , - , - , - [ - ], - , - , - - . - : - - [ - ] - . - : - - - + - ( - - - [ - ], - - - ) - - . - : - - - * - ( - - - , - - - ) - - . - : - - - ; - - - ; - - - ; - - - . - : - - - ; - - - ; - - , - , - , - , - - . - : - - , - , - , - - . - : - - , - , - , - - . - : - - , - , - - . - : - - - . - : - - , - , - - . - : - - - ; - - - . - : - - - ; - - - . - : - - , - - . - : - - , - - * - . - : - - [ - ; - ; - ; - ; - ; - ] - . - : - - - ; - - [ - ; - ; - ] - . - : - - [ - ] - . - : - - , - , - , - - ; - - , - , - , - - . - : - - - + - . - : - - - + - . - : - - ~[ - ] - ; - - , - - . - allcharacters,quotesmustbedoubled - : - - ~[ - ] - ; - - , - - . - allcharacters,quotesmustbedoubled - : - - , - , - , - - . - : - - - [ - -; - -; - -]+ - . - : - - - ; - - - . - : - - , - - . - : - - , - , - , - - . - : - - , - , - - * - ( - - - [ - ], - - - ) - , - , - - . - : - - - ; - - - ; - - - . - : - - , - , - , - - . - : - - - . - : - - - . - : - - , - , - , - - ; - - , - , - , - - ; - - , - , - - . - : - - , - - . - : - - , - - . - : - - [ - -; - -] - . - diff --git a/tests/tests/ixml/ixml-one-line.inp b/tests/tests/ixml/ixml-one-line.inp deleted file mode 100644 index 093fda44..00000000 --- a/tests/tests/ixml/ixml-one-line.inp +++ /dev/null @@ -1 +0,0 @@ -ixml:S,rule+S,S.-S:(whitespace;comment)*.-whitespace:-[Zs];tab;lf;cr.-tab:-#9.-lf:-#a.-cr:-#d.comment:-"{",(cchar;comment)*,-"}".-cchar:~["{}"].rule:(mark,S)?,name,S,["=:"],S,-alts,".".@mark:["@^-"].alts:alt+([";|"],S).alt:term*(",",S).-term:factor;option;repeat0;repeat1.-factor:terminal;nonterminal;"(",S,alts,")",S.repeat0:factor,"*",S,sep?.repeat1:factor,"+",S,sep?.option:factor,"?",S.sep:factor.nonterminal:(mark,S)?,name,S.-terminal:literal;charset.literal:quoted;encoded.-quoted:(tmark,S)?,-string.@name:namestart,namefollower*.-namestart:["_";Ll;Lu;Lm;Lt;Lo].-namefollower:namestart;["-.·‿⁀";Nd;Mn].@tmark:["^-"].string:-'"',dstring,-'"',S;-"'",sstring,-"'",S.@dstring:dchar+.@sstring:schar+.dchar:~['"'];'"',-'"'.{allcharacters,quotesmustbedoubled}schar:~["'"];"'",-"'".{allcharacters,quotesmustbedoubled}-encoded:(tmark,S)?,-"#",@hex,S.hex:["0"-"9";"a"-"f";"A"-"F"]+.-charset:inclusion;exclusion.inclusion:(tmark,S)?,set.exclusion:(tmark,S)?,"~",S,set.-set:"[",S,member*([";|"],S),"]",S.-member:literal;range;class.range:from,"-",S,to.@from:character.@to:character.-character:-'"',dchar,-'"',S;-"'",schar,-"'",S;"#",hex,S.class:@code,S.code:letter,letter.-letter:["a"-"z";"A"-"Z"]. \ No newline at end of file diff --git a/tests/tests/ixml/ixml-one-line.ixml b/tests/tests/ixml/ixml-one-line.ixml deleted file mode 100644 index 093fda44..00000000 --- a/tests/tests/ixml/ixml-one-line.ixml +++ /dev/null @@ -1 +0,0 @@ -ixml:S,rule+S,S.-S:(whitespace;comment)*.-whitespace:-[Zs];tab;lf;cr.-tab:-#9.-lf:-#a.-cr:-#d.comment:-"{",(cchar;comment)*,-"}".-cchar:~["{}"].rule:(mark,S)?,name,S,["=:"],S,-alts,".".@mark:["@^-"].alts:alt+([";|"],S).alt:term*(",",S).-term:factor;option;repeat0;repeat1.-factor:terminal;nonterminal;"(",S,alts,")",S.repeat0:factor,"*",S,sep?.repeat1:factor,"+",S,sep?.option:factor,"?",S.sep:factor.nonterminal:(mark,S)?,name,S.-terminal:literal;charset.literal:quoted;encoded.-quoted:(tmark,S)?,-string.@name:namestart,namefollower*.-namestart:["_";Ll;Lu;Lm;Lt;Lo].-namefollower:namestart;["-.·‿⁀";Nd;Mn].@tmark:["^-"].string:-'"',dstring,-'"',S;-"'",sstring,-"'",S.@dstring:dchar+.@sstring:schar+.dchar:~['"'];'"',-'"'.{allcharacters,quotesmustbedoubled}schar:~["'"];"'",-"'".{allcharacters,quotesmustbedoubled}-encoded:(tmark,S)?,-"#",@hex,S.hex:["0"-"9";"a"-"f";"A"-"F"]+.-charset:inclusion;exclusion.inclusion:(tmark,S)?,set.exclusion:(tmark,S)?,"~",S,set.-set:"[",S,member*([";|"],S),"]",S.-member:literal;range;class.range:from,"-",S,to.@from:character.@to:character.-character:-'"',dchar,-'"',S;-"'",schar,-"'",S;"#",hex,S.class:@code,S.code:letter,letter.-letter:["a"-"z";"A"-"Z"]. \ No newline at end of file diff --git a/tests/tests/ixml/ixml-one-line.req b/tests/tests/ixml/ixml-one-line.req deleted file mode 100644 index dfe5b72a..00000000 --- a/tests/tests/ixml/ixml-one-line.req +++ /dev/null @@ -1,499 +0,0 @@ -ixml:S,rule+S,S.-S:(whitespace;comment)*.-whitespace:-[Zs];tab;lf;cr.-tab:-#9.-lf:-#a.-cr:-#d.comment:-"{",(cchar;comment)*,-"}".-cchar:~["{}"].rule:(mark,S)?,name,S,["=:"],S,-alts,".".@mark:["@^-"].alts:alt+([";|"],S).alt:term*(",",S).-term:factor;option;repeat0;repeat1.-factor:terminal;nonterminal;"(",S,alts,")",S.repeat0:factor,"*",S,sep?.repeat1:factor,"+",S,sep?.option:factor,"?",S.sep:factor.nonterminal:(mark,S)?,name,S.-terminal:literal;charset.literal:quoted;encoded.-quoted:(tmark,S)?,-string.@name:namestart,namefollower*.-namestart:["_";Ll;Lu;Lm;Lt;Lo].-namefollower:namestart;["-.·‿⁀";Nd;Mn].@tmark:["^-"].string:-'"',dstring,-'"',S;-"'",sstring,-"'",S.@dstring:dchar+.@sstring:schar+.dchar:~['"'];'"',-'"'.{allcharacters,quotesmustbedoubled}schar:~["'"];"'",-"'".{allcharacters,quotesmustbedoubled}-encoded:(tmark,S)?,-"#",@hex,S.hex:["0"-"9";"a"-"f";"A"-"F"]+.-charset:inclusion;exclusion.inclusion:(tmark,S)?,set.exclusion:(tmark,S)?,"~",S,set.-set:"[",S,member*([";|"],S),"]",S.-member:literal;range;class.range:from,"-",S,to.@from:character.@to:character.-character:-'"',dchar,-'"',S;-"'",schar,-"'",S;"#",hex,S.class:@code,S.code:letter,letter.-letter:["a"-"z";"A"-"Z"]. -# -ixml:S,rule+S,S.-S:(whitespace;comment)*.-whitespace:-[Zs];tab;lf;cr.-tab:-#9.-lf:-#a.-cr:-#d.comment:-"{",(cchar;comment)*,-"}".-cchar:~["{}"].rule:(mark,S)?,name,S,["=:"],S,-alts,".".@mark:["@^-"].alts:alt+([";|"],S).alt:term*(",",S).-term:factor;option;repeat0;repeat1.-factor:terminal;nonterminal;"(",S,alts,")",S.repeat0:factor,"*",S,sep?.repeat1:factor,"+",S,sep?.option:factor,"?",S.sep:factor.nonterminal:(mark,S)?,name,S.-terminal:literal;charset.literal:quoted;encoded.-quoted:(tmark,S)?,-string.@name:namestart,namefollower*.-namestart:["_";Ll;Lu;Lm;Lt;Lo].-namefollower:namestart;["-.·‿⁀";Nd;Mn].@tmark:["^-"].string:-'"',dstring,-'"',S;-"'",sstring,-"'",S.@dstring:dchar+.@sstring:schar+.dchar:~['"'];'"',-'"'.{allcharacters,quotesmustbedoubled}schar:~["'"];"'",-"'".{allcharacters,quotesmustbedoubled}-encoded:(tmark,S)?,-"#",@hex,S.hex:["0"-"9";"a"-"f";"A"-"F"]+.-charset:inclusion;exclusion.inclusion:(tmark,S)?,set.exclusion:(tmark,S)?,"~",S,set.-set:"[",S,member*([";|"],S),"]",S.-member:literal;range;class.range:from,"-",S,to.@from:character.@to:character.-character:-'"',dchar,-'"',S;-"'",schar,-"'",S;"#",hex,S.class:@code,S.code:letter,letter.-letter:["a"-"z";"A"-"Z"]. -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - all characters except line breaks; quotes must be doubled - - - - - - - - - - - - - - all characters except line breaks; quotes must be doubled - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/tests/ixml/ixml-one-line.res b/tests/tests/ixml/ixml-one-line.res deleted file mode 100644 index b822f3ed..00000000 --- a/tests/tests/ixml/ixml-one-line.res +++ /dev/null @@ -1,15 +0,0 @@ -ixml:S,rule+S,S.-S:(whitespace;comment)*.-whitespace:-[Zs];tab;lf;cr.-tab:-#9.-lf:-#a.-cr:-#d.comment:-"{",(cchar;comment)*,-"}".-cchar:~["{}"].rule:(mark,S)?,name,S,["=:"],S,-alts,".".@mark:["@^-"].alts:alt+([";|"],S).alt:term*(",",S).-term:factor;option;repeat0;repeat1.-factor:terminal;nonterminal;"(",S,alts,")",S.repeat0:factor,"*",S,sep?.repeat1:factor,"+",S,sep?.option:factor,"?",S.sep:factor.nonterminal:(mark,S)?,name,S.-terminal:literal;charset.literal:quoted;encoded.-quoted:(tmark,S)?,-string.@name:namestart,namefollower*.-namestart:["_";Ll;Lu;Lm;Lt;Lo].-namefollower:namestart;["-.·‿⁀";Nd;Mn].@tmark:["^-"].string:-'"',dstring,-'"',S;-"'",sstring,-"'",S.@dstring:dchar+.@sstring:schar+.dchar:~['"'];'"',-'"'.{allcharacters,quotesmustbedoubled}schar:~["'"];"'",-"'".{allcharacters,quotesmustbedoubled}-encoded:(tmark,S)?,-"#",@hex,S.hex:["0"-"9";"a"-"f";"A"-"F"]+.-charset:inclusion;exclusion.inclusion:(tmark,S)?,set.exclusion:(tmark,S)?,"~",S,set.-set:"[",S,member*([";|"],S),"]",S.-member:literal;range;class.range:from,"-",S,to.@from:character.@to:character.-character:-'"',dchar,-'"',S;-"'",schar,-"'",S;"#",hex,S.class:@code,S.code:letter,letter.-letter:["a"-"z";"A"-"Z"].# -ixml:S,rule+S,S.-S:(whitespace;comment)*.-whitespace:-[Zs];tab;lf;cr.-tab:-#9.-lf:-#a.-cr:-#d.comment:-"{",(cchar;comment)*,-"}".-cchar:~["{}"].rule:(mark,S)?,name,S,["=:"],S,-alts,".".@mark:["@^-"].alts:alt+([";|"],S).alt:term*(",",S).-term:factor;option;repeat0;repeat1.-factor:terminal;nonterminal;"(",S,alts,")",S.repeat0:factor,"*",S,sep?.repeat1:factor,"+",S,sep?.option:factor,"?",S.sep:factor.nonterminal:(mark,S)?,name,S.-terminal:literal;charset.literal:quoted;encoded.-quoted:(tmark,S)?,-string.@name:namestart,namefollower*.-namestart:["_";Ll;Lu;Lm;Lt;Lo].-namefollower:namestart;["-.·‿⁀";Nd;Mn].@tmark:["^-"].string:-'"',dstring,-'"',S;-"'",sstring,-"'",S.@dstring:dchar+.@sstring:schar+.dchar:~['"'];'"',-'"'.{allcharacters,quotesmustbedoubled}schar:~["'"];"'",-"'".{allcharacters,quotesmustbedoubled}-encoded:(tmark,S)?,-"#",@hex,S.hex:["0"-"9";"a"-"f";"A"-"F"]+.-charset:inclusion;exclusion.inclusion:(tmark,S)?,set.exclusion:(tmark,S)?,"~",S,set.-set:"[",S,member*([";|"],S),"]",S.-member:literal;range;class.range:from,"-",S,to.@from:character.@to:character.-character:-'"',dchar,-'"',S;-"'",schar,-"'",S;"#",hex,S.class:@code,S.code:letter,letter.-letter:["a"-"z";"A"-"Z"].# - - - 1 - 561 - ixml:S,rule+S,S.-S:(whitespace;comment)*.-whitespace:-[Zs];tab;lf;cr.-tab:-#9.-lf:-#a.-cr:-#d.comment:-"{",(cchar;comment)*,-"}".-cchar:~["{}"].rule:(mark,S)?,name,S,["=:"],S,-alts,".".@mark:["@^-"].alts:alt+([";|"],S).alt:term*(",",S).-term:factor;option;repeat0;repeat1.-factor:terminal;nonterminal;"(",S,alts,")",S.repeat0:factor,"*",S,sep?.repeat1:factor,"+",S,sep?.option:factor,"?",S.sep:factor.nonterminal:(mark,S)?,name,S.-terminal:literal;charset.literal:quoted;encoded.-quoted:(tmark,S)?,-string.@name:namestart,namefollower*.-namestart:["_";Ll;Lu;Lm;Lt;Lo].-namefollower:namestart;["-.·‿⁀";Nd;Mn].@tmark:["^-"].string:-'"',dstring,-'"',S;-"'",sstring,-"'",S.@dstring:dchar+.@sstring:schar+.dchar:~['"'];'"',-'"'.{allcharacters,quotesmustbedoubled}schar:~["'"];"'",-"'".{allcharacters,quotesmustbedoubled}-encoded:(tmark,S)?,-"#",@hex,S.hex:["0"-"9";"a"-"f";"A"-"F"]+.-charset:inclusion;exclusion.inclusion:(tmark,S)?,set.exclusion:(tmark,S)?,"~",S,set.-set:"[",S,member*([";|"],S),"]",S.-member:literal;range;class.range:from,"-",S,to.@from:character.@to:character.-character:-'"',dchar,-'"',S;-"'",schar,-"'",S;"#",hex,S.class:@code,S.code:letter,letter.-letter:["a"-"z";"A"-"Z"]. - "]"; "{"; #9; #a; #d; [";|"]; [Zs] - diff --git a/tests/tests/ixml/ixml-spaces.inp b/tests/tests/ixml/ixml-spaces.inp deleted file mode 100644 index 7c0ead13..00000000 --- a/tests/tests/ixml/ixml-spaces.inp +++ /dev/null @@ -1,60 +0,0 @@ - ixml : S , rule + S , S . - - S : ( whitespace ; comment ) * . - - whitespace : - [ Zs ] ; tab ; { lf ; } cr . - - tab : - #9 . -{ - lf : - #a . } - - cr : - #d . - comment : - "{" , ( cchar ; comment ) * , - "}" . - - cchar : ~ [ "{}" ] . - rule : ( mark , S ) ? , name , S , [ "=:" ] , S , - alts , "." . - @ mark : [ "@^-" ] . - alts : alt + ( [ ";|" ] , S ) . - alt : term * ( "," , S ) . - - term : factor ; - option ; - repeat0 ; - repeat1 . - - factor : terminal ; - nonterminal ; - "(" , S , alts , ")" , S . - repeat0 : factor , "*" , S , sep ? . - repeat1 : factor , "+" , S , sep ? . - option : factor , "?" , S . - sep : factor . - nonterminal : ( mark , S ) ? , name , S . - - terminal : literal ; - charset . - literal : quoted ; - encoded . - - quoted : ( tmark , S ) ? , - string . - @ name : namestart , namefollower * . - - namestart : [ "_" ; Ll ; Lu ; Lm ; Lt ; Lo ] . - - namefollower : namestart ; [ "-.·‿⁀" ; Nd ; Mn ] . - @ tmark : [ "^-" ] . - string : - '"' , dstring , - '"' , S ; - - "'" , sstring , - "'" , S . - @ dstring : dchar + . - @ sstring : schar + . - dchar : ~ [ '"' ] ; - '"' , - '"' . { all characters , quotes must be doubled } - schar : ~ [ "'" ] ; - "'" , - "'" . { all characters , quotes must be doubled } - - encoded : ( tmark , S ) ? , - "#" , @ hex , S . - hex : [ "0" - "9" ; "a" - "f" ; "A" - "F" ] + . - - charset : inclusion ; - exclusion . - inclusion : ( tmark , S ) ? , set . - exclusion : ( tmark , S ) ? , "~" , S , set . - - set : "[" , S , member * ( [ ";|" ] , S ) , "]" , S . - - member : literal ; - range ; - class . - range : from , "-" , S , to . - @ from : character . - @ to : character . - - character : - '"' , dchar , - '"' , S ; - - "'" , schar , - "'" , S ; - "#" , hex , S . - class : @ code , S . - code : letter , letter . - - letter : [ "a" - "z" ; "A" - "Z" ] . diff --git a/tests/tests/ixml/ixml-spaces.ixml b/tests/tests/ixml/ixml-spaces.ixml deleted file mode 100644 index 9ee14e37..00000000 --- a/tests/tests/ixml/ixml-spaces.ixml +++ /dev/null @@ -1,60 +0,0 @@ - ixml : S , rule + S , S . - - S : ( whitespace ; comment ) * . - - whitespace : - [ Zs ] ; tab ; lf ; cr . - - tab : - #9 . - - lf : - #a . - - cr : - #d . - comment : - "{" , ( cchar ; comment ) * , - "}" . - - cchar : ~ [ "{}" ] . - rule : ( mark , S ) ? , name , S , [ "=:" ] , S , - alts , "." . - @ mark : [ "@^-" ] . - alts : alt + ( [ ";|" ] , S ) . - alt : term * ( "," , S ) . - - term : factor ; - option ; - repeat0 ; - repeat1 . - - factor : terminal ; - nonterminal ; - "(" , S , alts , ")" , S . - repeat0 : factor , "*" , S , sep ? . - repeat1 : factor , "+" , S , sep ? . - option : factor , "?" , S . - sep : factor . - nonterminal : ( mark , S ) ? , name , S . - - terminal : literal ; - charset . - literal : quoted ; - encoded . - - quoted : ( tmark , S ) ? , - string . - @ name : namestart , namefollower * . - - namestart : [ "_" ; Ll ; Lu ; Lm ; Lt ; Lo ] . - - namefollower : namestart ; [ "-.·‿⁀" ; Nd ; Mn ] . - @ tmark : [ "^-" ] . - string : - '"' , dstring , - '"' , S ; - - "'" , sstring , - "'" , S . - @ dstring : dchar + . - @ sstring : schar + . - dchar : ~ [ '"' ] ; - '"' , - '"' . { all characters , quotes must be doubled } - schar : ~ [ "'" ] ; - "'" , - "'" . { all characters , quotes must be doubled } - - encoded : ( tmark , S ) ? , - "#" , @ hex , S . - hex : [ "0" - "9" ; "a" - "f" ; "A" - "F" ] + . - - charset : inclusion ; - exclusion . - inclusion : ( tmark , S ) ? , set . - exclusion : ( tmark , S ) ? , "~" , S , set . - - set : "[" , S , member * ( [ ";|" ] , S ) , "]" , S . - - member : literal ; - range ; - class . - range : from , "-" , S , to . - @ from : character . - @ to : character . - - character : - '"' , dchar , - '"' , S ; - - "'" , schar , - "'" , S ; - "#" , hex , S . - class : @ code , S . - code : letter , letter . - - letter : [ "a" - "z" ; "A" - "Z" ] . diff --git a/tests/tests/ixml/ixml-spaces.req b/tests/tests/ixml/ixml-spaces.req deleted file mode 100644 index 0fdc1007..00000000 --- a/tests/tests/ixml/ixml-spaces.req +++ /dev/null @@ -1,530 +0,0 @@ - ixml : S , rule + S , S . - - S : ( whitespace ; comment ) * . - - whitespace : - [ Zs ] ; tab ; lf ; cr . - - tab : - #9 . - - lf : - #a . - - cr : - #d . - comment : - "{" , ( cchar ; comment ) * , - "}" . - - cchar : ~ [ "{}" ] . - rule : ( mark , S ) ? , name , S , [ "=:" ] , S , - alts , "." . - @ mark : [ "@^-" ] . - alts : alt + ( [ ";|" ] , S ) . - alt : term * ( "," , S ) . - - term : factor ; - option ; - repeat0 ; - repeat1 . - - factor : terminal ; - nonterminal ; - "(" , S , alts , ")" , S . - repeat0 : factor , "*" , S , sep ? . - repeat1 : factor , "+" , S , sep ? . - option : factor , "?" , S . - sep : factor . - nonterminal : ( mark , S ) ? , name , S . - - terminal : literal ; - charset . - literal : quoted ; - encoded . - - quoted : ( tmark , S ) ? , - string . - @ name : namestart , namefollower * . - - namestart : [ "_" ; Ll ; Lu ; Lm ; Lt ; Lo ] . - - namefollower : namestart ; [ "-.·‿⁀" ; Nd ; Mn ] . - @ tmark : [ "^-" ] . - string : - '"' , dstring , - '"' , S ; - - "'" , sstring , - "'" , S . - @ dstring : dchar + . - @ sstring : schar + . - dchar : ~ [ '"' ] ; - '"' , - '"' . { all characters , quotes must be doubled } - schar : ~ [ "'" ] ; - "'" , - "'" . { all characters , quotes must be doubled } - - encoded : ( tmark , S ) ? , - "#" , @ hex , S . - hex : [ "0" - "9" ; "a" - "f" ; "A" - "F" ] + . - - charset : inclusion ; - exclusion . - inclusion : ( tmark , S ) ? , set . - exclusion : ( tmark , S ) ? , "~" , S , set . - - set : "[" , S , member * ( [ ";|" ] , S ) , "]" , S . - - member : literal ; - range ; - class . - range : from , "-" , S , to . - @ from : character . - @ to : character . - - character : - '"' , dchar , - '"' , S ; - - "'" , schar , - "'" , S ; - "#" , hex , S . - class : @ code , S . - code : letter , letter . - - letter : [ "a" - "z" ; "A" - "Z" ] . -# - ixml : S , rule + S , S . - - S : ( whitespace ; comment ) * . - - whitespace : - [ Zs ] ; tab ; { lf ; } cr . - - tab : - #9 . -{ - lf : - #a . } - - cr : - #d . - comment : - "{" , ( cchar ; comment ) * , - "}" . - - cchar : ~ [ "{}" ] . - rule : ( mark , S ) ? , name , S , [ "=:" ] , S , - alts , "." . - @ mark : [ "@^-" ] . - alts : alt + ( [ ";|" ] , S ) . - alt : term * ( "," , S ) . - - term : factor ; - option ; - repeat0 ; - repeat1 . - - factor : terminal ; - nonterminal ; - "(" , S , alts , ")" , S . - repeat0 : factor , "*" , S , sep ? . - repeat1 : factor , "+" , S , sep ? . - option : factor , "?" , S . - sep : factor . - nonterminal : ( mark , S ) ? , name , S . - - terminal : literal ; - charset . - literal : quoted ; - encoded . - - quoted : ( tmark , S ) ? , - string . - @ name : namestart , namefollower * . - - namestart : [ "_" ; Ll ; Lu ; Lm ; Lt ; Lo ] . - - namefollower : namestart ; [ "-.·‿⁀" ; Nd ; Mn ] . - @ tmark : [ "^-" ] . - string : - '"' , dstring , - '"' , S ; - - "'" , sstring , - "'" , S . - @ dstring : dchar + . - @ sstring : schar + . - dchar : ~ [ '"' ] ; - '"' , - '"' . { all characters , quotes must be doubled } - schar : ~ [ "'" ] ; - "'" , - "'" . { all characters , quotes must be doubled } - - encoded : ( tmark , S ) ? , - "#" , @ hex , S . - hex : [ "0" - "9" ; "a" - "f" ; "A" - "F" ] + . - - charset : inclusion ; - exclusion . - inclusion : ( tmark , S ) ? , set . - exclusion : ( tmark , S ) ? , "~" , S , set . - - set : "[" , S , member * ( [ ";|" ] , S ) , "]" , S . - - member : literal ; - range ; - class . - range : from , "-" , S , to . - @ from : character . - @ to : character . - - character : - '"' , dchar , - '"' , S ; - - "'" , schar , - "'" , S ; - "#" , hex , S . - class : @ code , S . - code : letter , letter . - - letter : [ "a" - "z" ; "A" - "Z" ] . -# - - - : - - , - - + - - - - , - - . - : - - ( - - - - ; - - - - )* - . - : - - [ - ] - ; - - - ; - lf ; - - - . - : - - - . - - lf : - #a . - : - - - . - : - - , - ( - - - - ; - - - - )*, - - . - : - - ~[ - ] - . - : - - , - , - , - [ - ], - , - , - - . - : - - [ - ] - . - : - - - + - ( - - - [ - ], - - - ) - - . - : - - - * - ( - - - , - - - ) - - . - : - - - ; - - - ; - - - ; - - - . - : - - - ; - - - ; - - , - , - , - , - - . - : - - , - , - , - - . - : - - , - , - , - - . - : - - , - , - - . - : - - - . - : - - , - , - - . - : - - - ; - - - . - : - - - ; - - - . - : - - , - - . - : - - , - - * - . - : - - [ - ; - ; - ; - ; - ; - ] - . - : - - - ; - - [ - ; - ; - ] - . - : - - [ - ] - . - : - - , - , - , - - ; - - , - , - , - - . - : - - - + - . - : - - - + - . - : - - ~[ - ] - ; - - , - - . - all characters , quotes must be doubled - : - - ~[ - ] - ; - - , - - . - all characters , quotes must be doubled - : - - , - , - , - - . - : - - - [ - -; - -; - -]+ - . - : - - - ; - - - . - : - - , - - . - : - - , - , - , - - . - : - - , - , - - * - ( - - - [ - ], - - - ) - , - , - - . - : - - - ; - - - ; - - - . - : - - , - , - , - - . - : - - - . - : - - - . - : - - , - , - , - - ; - - , - , - , - - ; - - , - , - - . - : - - , - - . - : - - , - - . - : - - [ - -; - -] - . - diff --git a/tests/tests/ixml/ixml.inp b/tests/tests/ixml/ixml.inp deleted file mode 100644 index f2be592b..00000000 --- a/tests/tests/ixml/ixml.inp +++ /dev/null @@ -1,67 +0,0 @@ - ixml: s, rule+s, s. - - -s: (whitespace; comment)*. - -whitespace: -[Zs]; tab; lf; cr. - -tab: -#9. - -lf: -#a. - -cr: -#d. - comment: -"{", (cchar; comment)*, -"}". - -cchar: ~["{}"]. - - rule: (mark, s)?, name, s, -["=:"], s, -alts, -".". - @mark: ["@^-"]. - alts: alt+(-[";|"], s). - alt: term*(-",", s). - -term: factor; - option; - repeat0; - repeat1. - -factor: terminal; - nonterminal; - -"(", s, alts, -")", s. - repeat0: factor, -"*", s, sep?. - repeat1: factor, -"+", s, sep?. - option: factor, -"?", s. - sep: factor. - nonterminal: (mark, s)?, name, s. - - -terminal: literal; - charset. - literal: quoted; - encoded. - -quoted: (tmark, s)?, -string. - - @name: namestart, namefollower*. - -namestart: ["_"; L]. --namefollower: namestart; ["-.·‿⁀"; Nd; Mn]. - - @tmark: ["^-"]. - string: -'"', dstring, -'"', s; - -"'", sstring, -"'", s. - @dstring: dchar+. - @sstring: schar+. - dchar: ~['"'; #a; #d]; - '"', -'"'. {all characters except line breaks; quotes must be doubled} - schar: ~["'"; #a; #d]; - "'", -"'". {all characters except line breaks; quotes must be doubled} - -encoded: (tmark, s)?, -"#", @hex, s. - hex: ["0"-"9"; "a"-"f"; "A"-"F"]+. - - -charset: inclusion; - exclusion. - inclusion: (tmark, s)?, set. - exclusion: (tmark, s)?, -"~", s, set. - -set: -"[", s, member*(-[";|"], s), -"]", s. - -member: literal; - range; - class. - range: from, -"-", s, to. - @from: character. - @to: character. - -character: -'"', dchar, -'"', s; - -"'", schar, -"'", s; - "#", hex, s. - class: code, s. - @code: capital, letter?. - -capital: ["A"-"Z"]. - -letter: ["a"-"z"]. diff --git a/tests/tests/ixml/ixml.ixml b/tests/tests/ixml/ixml.ixml deleted file mode 100644 index f2be592b..00000000 --- a/tests/tests/ixml/ixml.ixml +++ /dev/null @@ -1,67 +0,0 @@ - ixml: s, rule+s, s. - - -s: (whitespace; comment)*. - -whitespace: -[Zs]; tab; lf; cr. - -tab: -#9. - -lf: -#a. - -cr: -#d. - comment: -"{", (cchar; comment)*, -"}". - -cchar: ~["{}"]. - - rule: (mark, s)?, name, s, -["=:"], s, -alts, -".". - @mark: ["@^-"]. - alts: alt+(-[";|"], s). - alt: term*(-",", s). - -term: factor; - option; - repeat0; - repeat1. - -factor: terminal; - nonterminal; - -"(", s, alts, -")", s. - repeat0: factor, -"*", s, sep?. - repeat1: factor, -"+", s, sep?. - option: factor, -"?", s. - sep: factor. - nonterminal: (mark, s)?, name, s. - - -terminal: literal; - charset. - literal: quoted; - encoded. - -quoted: (tmark, s)?, -string. - - @name: namestart, namefollower*. - -namestart: ["_"; L]. --namefollower: namestart; ["-.·‿⁀"; Nd; Mn]. - - @tmark: ["^-"]. - string: -'"', dstring, -'"', s; - -"'", sstring, -"'", s. - @dstring: dchar+. - @sstring: schar+. - dchar: ~['"'; #a; #d]; - '"', -'"'. {all characters except line breaks; quotes must be doubled} - schar: ~["'"; #a; #d]; - "'", -"'". {all characters except line breaks; quotes must be doubled} - -encoded: (tmark, s)?, -"#", @hex, s. - hex: ["0"-"9"; "a"-"f"; "A"-"F"]+. - - -charset: inclusion; - exclusion. - inclusion: (tmark, s)?, set. - exclusion: (tmark, s)?, -"~", s, set. - -set: -"[", s, member*(-[";|"], s), -"]", s. - -member: literal; - range; - class. - range: from, -"-", s, to. - @from: character. - @to: character. - -character: -'"', dchar, -'"', s; - -"'", schar, -"'", s; - "#", hex, s. - class: code, s. - @code: capital, letter?. - -capital: ["A"-"Z"]. - -letter: ["a"-"z"]. diff --git a/tests/tests/ixml/ixml.req b/tests/tests/ixml/ixml.req deleted file mode 100644 index c86bbaa2..00000000 --- a/tests/tests/ixml/ixml.req +++ /dev/null @@ -1,632 +0,0 @@ - ixml: s, rule+s, s. - - -s: (whitespace; comment)*. - -whitespace: -[Zs]; tab; lf; cr. - -tab: -#9. - -lf: -#a. - -cr: -#d. - comment: -"{", (cchar; comment)*, -"}". - -cchar: ~["{}"]. - - rule: (mark, s)?, name, s, -["=:"], s, -alts, -".". - @mark: ["@^-"]. - alts: alt+(-[";|"], s). - alt: term*(-",", s). - -term: factor; - option; - repeat0; - repeat1. - -factor: terminal; - nonterminal; - -"(", s, alts, -")", s. - repeat0: factor, -"*", s, sep?. - repeat1: factor, -"+", s, sep?. - option: factor, -"?", s. - sep: factor. - nonterminal: (mark, s)?, name, s. - - -terminal: literal; - charset. - literal: quoted; - encoded. - -quoted: (tmark, s)?, -string. - - @name: namestart, namefollower*. - -namestart: ["_"; L]. --namefollower: namestart; ["-.·‿⁀"; Nd; Mn]. - - @tmark: ["^-"]. - string: -'"', dstring, -'"', s; - -"'", sstring, -"'", s. - @dstring: dchar+. - @sstring: schar+. - dchar: ~['"'; #a; #d]; - '"', -'"'. {all characters except line breaks; quotes must be doubled} - schar: ~["'"; #a; #d]; - "'", -"'". {all characters except line breaks; quotes must be doubled} - -encoded: (tmark, s)?, -"#", @hex, s. - hex: ["0"-"9"; "a"-"f"; "A"-"F"]+. - - -charset: inclusion; - exclusion. - inclusion: (tmark, s)?, set. - exclusion: (tmark, s)?, -"~", s, set. - -set: -"[", s, member*(-[";|"], s), -"]", s. - -member: literal; - range; - class. - range: from, -"-", s, to. - @from: character. - @to: character. - -character: -'"', dchar, -'"', s; - -"'", schar, -"'", s; - "#", hex, s. - class: code, s. - @code: capital, letter?. - -capital: ["A"-"Z"]. - -letter: ["a"-"z"]. -# - ixml: s, rule+s, s. - - -s: (whitespace; comment)*. - -whitespace: -[Zs]; tab; lf; cr. - -tab: -#9. - -lf: -#a. - -cr: -#d. - comment: -"{", (cchar; comment)*, -"}". - -cchar: ~["{}"]. - - rule: (mark, s)?, name, s, -["=:"], s, -alts, -".". - @mark: ["@^-"]. - alts: alt+(-[";|"], s). - alt: term*(-",", s). - -term: factor; - option; - repeat0; - repeat1. - -factor: terminal; - nonterminal; - -"(", s, alts, -")", s. - repeat0: factor, -"*", s, sep?. - repeat1: factor, -"+", s, sep?. - option: factor, -"?", s. - sep: factor. - nonterminal: (mark, s)?, name, s. - - -terminal: literal; - charset. - literal: quoted; - encoded. - -quoted: (tmark, s)?, -string. - - @name: namestart, namefollower*. - -namestart: ["_"; L]. --namefollower: namestart; ["-.·‿⁀"; Nd; Mn]. - - @tmark: ["^-"]. - string: -'"', dstring, -'"', s; - -"'", sstring, -"'", s. - @dstring: dchar+. - @sstring: schar+. - dchar: ~['"'; #a; #d]; - '"', -'"'. {all characters except line breaks; quotes must be doubled} - schar: ~["'"; #a; #d]; - "'", -"'". {all characters except line breaks; quotes must be doubled} - -encoded: (tmark, s)?, -"#", @hex, s. - hex: ["0"-"9"; "a"-"f"; "A"-"F"]+. - - -charset: inclusion; - exclusion. - inclusion: (tmark, s)?, set. - exclusion: (tmark, s)?, -"~", s, set. - -set: -"[", s, member*(-[";|"], s), -"]", s. - -member: literal; - range; - class. - range: from, -"-", s, to. - @from: character. - @to: character. - -character: -'"', dchar, -'"', s; - -"'", schar, -"'", s; - "#", hex, s. - class: code, s. - @code: capital, letter?. - -capital: ["A"-"Z"]. - -letter: ["a"-"z"]. -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - all characters except line breaks; quotes must be doubled - - - - - - - - - - - - - - all characters except line breaks; quotes must be doubled - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/tests/ixml/ixml1.inp b/tests/tests/ixml/ixml1.inp deleted file mode 100644 index 88865983..00000000 --- a/tests/tests/ixml/ixml1.inp +++ /dev/null @@ -1,45 +0,0 @@ -ixml: S, rule+. -rule: mark?, name, S, ":", S, def, ".", S. -def: alt+(";", S). -alt: term*(",", S). --term: factor; repeat0; repeat1; option. -repeat0: factor, "*", S, sep?. -sep: factor. -repeat1: factor, "+", S, sep?. -option: factor, "?", S. --factor: nonterminal; terminal; "(", S, def, ")", S. -nonterminal: mark?, name, S. -terminal: mark?, (quoted; hex; charset; exclude). - -charset: "[", S, element+(";", S), "]", S. -exclude: "~", S, -charset. - --element: range; character, S; class, S. -range: from, S, "-", S, to, S. -@from: character. -@to: character. -class: letter, letter. {One of the Unicode character classes} - -@name: letgit, xletter*. --letgit: letter; digit. --letter: ["a"-"z"; "A"-"Z"]. --digit: ["0"-"9"]. --xletter: letgit; "-". - -@mark: "@", S; "^", S; "-", S. - -quoted: -'"', dstring, -'"', S; -"'", sstring, -"'", S. -@dstring: dchar+. -@sstring: schar+. -dchar: ~['"']; '""'. {all characters, dquotes must be doubled} -schar: ~["'"]; "''". {all characters, squotes must be doubled} --character: '"', dchar, '"'; "'", schar, "'"; hex. - -hex: "#", number. -number: hexit+. --hexit: digit; ["a"-"f"; "A"-"F"]. - --S: (" "; comment)*. -comment: "{", cchar*, "}". --cchar: ~["}"]. -{the end} diff --git a/tests/tests/ixml/ixml1.ixml b/tests/tests/ixml/ixml1.ixml deleted file mode 100644 index 158f6b62..00000000 --- a/tests/tests/ixml/ixml1.ixml +++ /dev/null @@ -1,45 +0,0 @@ -ixml: S, rule+. -rule: mark?, name, S, ":", S, def, ".", S. -def: alt+(";", S). -alt: term*(",", S). --term: factor; repeat0; repeat1; option. -repeat0: factor, "*", S, sep?. -sep: factor. -repeat1: factor, "+", S, sep?. -option: factor, "?", S. --factor: nonterminal; terminal; "(", S, def, ")", S. -nonterminal: mark?, name, S. -terminal: mark?, (quoted; hex; charset; exclude). - -charset: "[", S, element+(";", S), "]", S. -exclude: "~", S, -charset. - --element: range; character, S; class, S. -range: from, S, "-", S, to, S. -@from: character. -@to: character. -class: letter, letter. {One of the Unicode character classes} - -@name: letgit, xletter*. --letgit: letter; digit. --letter: ["a"-"z"; "A"-"Z"]. --digit: ["0"-"9"]. --xletter: letgit; "-". - -@mark: "@", S; "^", S; "-", S. - -quoted: -'"', dstring, -'"', S; -"'", sstring, -"'", S. -@dstring: dchar+. -@sstring: schar+. -dchar: ~['"']; '""'. {all characters, dquotes must be doubled} -schar: ~["'"]; "''". {all characters, squotes must be doubled} --character: '"', dchar, '"'; "'", schar, "'"; hex. - -hex: "#", number. -number: hexit+. --hexit: digit; ["a"-"f"; "A"-"F"]. - --S: (" "; -#a; comment)*. -comment: "{", cchar*, "}". --cchar: ~["}"]. -{the end} diff --git a/tests/tests/ixml/ixml1.req b/tests/tests/ixml/ixml1.req deleted file mode 100644 index 8f25cc00..00000000 --- a/tests/tests/ixml/ixml1.req +++ /dev/null @@ -1,572 +0,0 @@ -ixml: S, rule+. -rule: mark?, name, S, ":", S, def, ".", S. -def: alt+(";", S). -alt: term*(",", S). --term: factor; repeat0; repeat1; option. -repeat0: factor, "*", S, sep?. -sep: factor. -repeat1: factor, "+", S, sep?. -option: factor, "?", S. --factor: nonterminal; terminal; "(", S, def, ")", S. -nonterminal: mark?, name, S. -terminal: mark?, (quoted; hex; charset; exclude). - -charset: "[", S, element+(";", S), "]", S. -exclude: "~", S, -charset. - --element: range; character, S; class, S. -range: from, S, "-", S, to, S. -@from: character. -@to: character. -class: letter, letter. {One of the Unicode character classes} - -@name: letgit, xletter*. --letgit: letter; digit. --letter: ["a"-"z"; "A"-"Z"]. --digit: ["0"-"9"]. --xletter: letgit; "-". - -@mark: "@", S; "^", S; "-", S. - -quoted: -'"', dstring, -'"', S; -"'", sstring, -"'", S. -@dstring: dchar+. -@sstring: schar+. -dchar: ~['"']; '""'. {all characters, dquotes must be doubled} -schar: ~["'"]; "''". {all characters, squotes must be doubled} --character: '"', dchar, '"'; "'", schar, "'"; hex. - -hex: "#", number. -number: hexit+. --hexit: digit; ["a"-"f"; "A"-"F"]. - --S: (" "; -#a; comment)*. -comment: "{", cchar*, "}". --cchar: ~["}"]. -{the end} -# -ixml: S, rule+. -rule: mark?, name, S, ":", S, def, ".", S. -def: alt+(";", S). -alt: term*(",", S). --term: factor; repeat0; repeat1; option. -repeat0: factor, "*", S, sep?. -sep: factor. -repeat1: factor, "+", S, sep?. -option: factor, "?", S. --factor: nonterminal; terminal; "(", S, def, ")", S. -nonterminal: mark?, name, S. -terminal: mark?, (quoted; hex; charset; exclude). - -charset: "[", S, element+(";", S), "]", S. -exclude: "~", S, -charset. - --element: range; character, S; class, S. -range: from, S, "-", S, to, S. -@from: character. -@to: character. -class: letter, letter. {One of the Unicode character classes} - -@name: letgit, xletter*. --letgit: letter; digit. --letter: ["a"-"z"; "A"-"Z"]. --digit: ["0"-"9"]. --xletter: letgit; "-". - -@mark: "@", S; "^", S; "-", S. - -quoted: -'"', dstring, -'"', S; -"'", sstring, -"'", S. -@dstring: dchar+. -@sstring: schar+. -dchar: ~['"']; '""'. {all characters, dquotes must be doubled} -schar: ~["'"]; "''". {all characters, squotes must be doubled} --character: '"', dchar, '"'; "'", schar, "'"; hex. - -hex: "#", number. -number: hexit+. --hexit: digit; ["a"-"f"; "A"-"F"]. - --S: (" "; comment)*. -comment: "{", cchar*, "}". --cchar: ~["}"]. -{the end} -# - - - : - - - , - - + - - . - : - - - , - , - , - - - , - , - , - - - , - - - . - : - - - - + - ( - - - - - , - - - ) - - - . - : - - - - * - ( - - - - - , - - - ) - - - . - : - - - - ; - - - ; - - - ; - - - - . - : - - - , - - - , - , - - - . - : - - - - - . - : - - - , - - - , - , - - - . - : - - - , - - - , - - - . - : - - - - ; - - - ; - - - - , - , - , - - - , - - - . - : - - - , - , - - - . - : - - - , ( - - - - ; - - - ; - - - ; - - - - ) - . - : - - - - - , - , - - + - ( - - - - - , - - - ) - , - - - , - - - . - : - - - - - , - , - - - . - : - - - - ; - - , - - ; - - , - - - . - : - - - , - , - - - , - , - , - - - . - : - - - - - . - : - - - - - . - : - - - , - - - . - {One of the Unicode character classes} - - : - - - , - - * - - . - : - - - - ; - - - - . - : - - - - [ - -; - -] - - - . - : - - - - [ - -] - - - . - : - - - - ; - - - - - - . - : - - - - - , - - ; - - - - , - - ; - - - - , - - - . - : - - - - - , - , - - - , - - ; - - - - , - , - - - , - - - . - : - - - - + - - . - : - - - - + - - . - : - - - - ~[' - "'] - - ; - - - - - - . - {all characters, dquotes must be doubled} - - : - - - - ~[" - '"] - - ; - - - - - - . - {all characters, squotes must be doubled} - - : - - - - - , - , - - - - ; - - - - , - , - - - - ; - - - - . - : - - - - - , - - - . - : - - - - + - - . - : - - - - ; - - - [ - -; - -] - - - . - : - - - ( - - - - - - ; - - - - )* - - . - : - - - - - , - - *, - - - - - . - : - - - - ~[" - }"] - - - . - {the end} - - diff --git a/tests/tests/ixml/ixml2.inp b/tests/tests/ixml/ixml2.inp deleted file mode 100644 index fd94e434..00000000 --- a/tests/tests/ixml/ixml2.inp +++ /dev/null @@ -1,60 +0,0 @@ -ixml: S, rule+. -rule: mark?, name, ["=:"], S, -alts, ".", S. -alts: alt+([";|"], S). -alt: term*(",", S). --term: factor; - repeat0; - repeat1; - option. -repeat0: factor, "*", S, sep?. -repeat1: factor, "+", S, sep?. -option: factor, "?", S. -sep: factor. - --factor: nonterminal; - terminal; - "(", S, alts, ")", S. -nonterminal: mark?, name. --terminal: literal; charset. --literal: quoted; encoded. --charset: inclusion; exclusion. - -quoted: tmark?, -string. -encoded: tmark?, @hex. -inclusion: tmark?, "[", S, element+([";|"], S), "]", S. -exclusion: tmark?, "~", S, "[", S, element+([";|"], S), "]", S. - -@tmark: ["^-"], S. --element: range; - string; - hex; - class. -range: from, "-", S, to. -@from: character. -@to: character. --character: -'"', dchar, -'"', S; - -"'", schar, -"'", S; - hex. -class: letter, letter, S. {One of the Unicode character classes} --letter: ["a"-"z"; "A"-"Z"]. -@name: letgit, xletter*, S. --letgit: ["a"-"z"; "A"-"Z"; "0"-"9"]. --xletter: letgit; "-". - -@mark: ["@^-"], S. - -string: -'"', dstring, -'"', S; - -"'", sstring, -"'", S. -@dstring: dchar+. -@sstring: schar+. -dchar: ~['"']; - '""'. {all characters, dquotes must be doubled} -schar: ~["'"]; - "''". {all characters, squotes must be doubled} -hex: "#", ["0"-"9"; "a"-"f"; "A"-"F"]+, S. - --S: (" "; #9; comment)*. -comment: "{", cchar*, "}". --cchar: ~["}"]. - -{the end} diff --git a/tests/tests/ixml/ixml2.ixml b/tests/tests/ixml/ixml2.ixml deleted file mode 100644 index 547bbb17..00000000 --- a/tests/tests/ixml/ixml2.ixml +++ /dev/null @@ -1,60 +0,0 @@ -ixml: S, rule+. -rule: mark?, name, ["=:"], S, -alts, ".", S. -alts: alt+([";|"], S). -alt: term*(",", S). --term: factor; - repeat0; - repeat1; - option. -repeat0: factor, "*", S, sep?. -repeat1: factor, "+", S, sep?. -option: factor, "?", S. -sep: factor. - --factor: nonterminal; - terminal; - "(", S, alts, ")", S. -nonterminal: mark?, name. --terminal: literal; charset. --literal: quoted; encoded. --charset: inclusion; exclusion. - -quoted: tmark?, -string. -encoded: tmark?, @hex. -inclusion: tmark?, "[", S, element+([";|"], S), "]", S. -exclusion: tmark?, "~", S, "[", S, element+([";|"], S), "]", S. - -@tmark: ["^-"], S. --element: range; - string; - hex; - class. -range: from, "-", S, to. -@from: character. -@to: character. --character: -'"', dchar, -'"', S; - -"'", schar, -"'", S; - hex. -class: letter, letter, S. {One of the Unicode character classes} --letter: ["a"-"z"; "A"-"Z"]. -@name: letgit, xletter*, S. --letgit: ["a"{first}-"z"; "A"-"Z"; "0"-"9"]. --xletter: letgit; "-". - -@mark: ["@^-"], S. - -string: -'"', dstring, -'"', S; - -"'", sstring, -"'", S. -@dstring: dchar+. -@sstring: schar+. -dchar: ~['"']; - '""'. {all characters, dquotes must be doubled} -schar: ~["'"]; - "''". {all characters, squotes must be doubled} -hex: "#", ["0"-"9"; "a"-"f"; "A"-"F"]+, S. - --S: (" "; -#a; #9; comment)*. -comment: "{", cchar*, "}". --cchar: ~["}"]. - -{the end} diff --git a/tests/tests/ixml/ixml2.req b/tests/tests/ixml/ixml2.req deleted file mode 100644 index e9192bfe..00000000 --- a/tests/tests/ixml/ixml2.req +++ /dev/null @@ -1,477 +0,0 @@ -ixml: S, rule+. -rule: mark?, name, ["=:"], S, -alts, ".", S. -alts: alt+([";|"], S). -alt: term*(",", S). --term: factor; - repeat0; - repeat1; - option. -repeat0: factor, "*", S, sep?. -repeat1: factor, "+", S, sep?. -option: factor, "?", S. -sep: factor. - --factor: nonterminal; - terminal; - "(", S, alts, ")", S. -nonterminal: mark?, name. --terminal: literal; charset. --literal: quoted; encoded. --charset: inclusion; exclusion. - -quoted: tmark?, -string. -encoded: tmark?, @hex. -inclusion: tmark?, "[", S, element+([";|"], S), "]", S. -exclusion: tmark?, "~", S, "[", S, element+([";|"], S), "]", S. - -@tmark: ["^-"], S. --element: range; - string; - hex; - class. -range: from, "-", S, to. -@from: character. -@to: character. --character: -'"', dchar, -'"', S; - -"'", schar, -"'", S; - hex. -class: letter, letter, S. {One of the Unicode character classes} --letter: ["a"-"z"; "A"-"Z"]. -@name: letgit, xletter*, S. --letgit: ["a"{first}-"z"; "A"-"Z"; "0"-"9"]. --xletter: letgit; "-". - -@mark: ["@^-"], S. - -string: -'"', dstring, -'"', S; - -"'", sstring, -"'", S. -@dstring: dchar+. -@sstring: schar+. -dchar: ~['"']; - '""'. {all characters, dquotes must be doubled} -schar: ~["'"]; - "''". {all characters, squotes must be doubled} -hex: "#", ["0"-"9"; "a"-"f"; "A"-"F"]+, S. - --S: (" "; -#a; #9; comment)*. -comment: "{", cchar*, "}". --cchar: ~["}"]. - -{the end} -# -ixml: S, rule+. -rule: mark?, name, ["=:"], S, -alts, ".", S. -alts: alt+([";|"], S). -alt: term*(",", S). --term: factor; - repeat0; - repeat1; - option. -repeat0: factor, "*", S, sep?. -repeat1: factor, "+", S, sep?. -option: factor, "?", S. -sep: factor. - --factor: nonterminal; - terminal; - "(", S, alts, ")", S. -nonterminal: mark?, name. --terminal: literal; charset. --literal: quoted; encoded. --charset: inclusion; exclusion. - -quoted: tmark?, -string. -encoded: tmark?, @hex. -inclusion: tmark?, "[", S, element+([";|"], S), "]", S. -exclusion: tmark?, "~", S, "[", S, element+([";|"], S), "]", S. - -@tmark: ["^-"], S. --element: range; - string; - hex; - class. -range: from, "-", S, to. -@from: character. -@to: character. --character: -'"', dchar, -'"', S; - -"'", schar, -"'", S; - hex. -class: letter, letter, S. {One of the Unicode character classes} --letter: ["a"-"z"; "A"-"Z"]. -@name: letgit, xletter*, S. --letgit: ["a"-"z"; "A"-"Z"; "0"-"9"]. --xletter: letgit; "-". - -@mark: ["@^-"], S. - -string: -'"', dstring, -'"', S; - -"'", sstring, -"'", S. -@dstring: dchar+. -@sstring: schar+. -dchar: ~['"']; - '""'. {all characters, dquotes must be doubled} -schar: ~["'"]; - "''". {all characters, squotes must be doubled} -hex: "#", ["0"-"9"; "a"-"f"; "A"-"F"]+, S. - --S: (" "; #9; comment)*. -comment: "{", cchar*, "}". --cchar: ~["}"]. - -{the end} -# - - - : - - , - - + - . - : - - , - , - [ - ], - , - , - , - - . - : - - - + - ( - - - [ - ], - - - ) - - . - : - - - * - ( - - - , - - - ) - - . - : - - - ; - - - ; - - - ; - - - . - : - - , - , - , - - . - : - - , - , - , - - . - : - - , - , - - . - : - - - . - : - - - ; - - - ; - - , - , - , - , - - . - : - - , - - . - : - - - ; - - - . - : - - - ; - - - . - : - - - ; - - - . - : - - , - - . - : - - , - - . - : - - , - , - , - - + - ( - - - [ - ], - - - ) - , - , - - . - : - - , - , - , - , - , - - + - ( - - - [ - ], - - - ) - , - , - - . - : - - [ - ], - - . - : - - - ; - - - ; - - - ; - - - . - : - - , - , - , - - . - : - - - . - : - - - . - : - - , - , - , - - ; - - , - , - , - - ; - - - . - : - - , - , - - . - {One of the Unicode character classes} - - : - - [ - -; - -] - . - : - - , - - *, - - . - : - - [ - -; - -; - -] - . - : - - - ; - - - . - : - - [ - ], - - . - : - - , - , - , - - ; - - , - , - , - - . - : - - - + - . - : - - - + - . - : - - ~[ - ] - ; - - - . - {all characters, dquotes must be doubled} - - : - - ~[ - ] - ; - - - . - {all characters, squotes must be doubled} - - : - - , - - [ - -; - -; - -]+, - - . - : - - ( - - - - ; - - - ; - - - - )* - . - : - - , - - *, - - . - : - - ~[ - ] - . - {the end} - - diff --git a/tests/tests/ixml/ixml3.inp b/tests/tests/ixml/ixml3.inp deleted file mode 100644 index 98f81dbf..00000000 --- a/tests/tests/ixml/ixml3.inp +++ /dev/null @@ -1,61 +0,0 @@ -{A test for what happens with comments in nonterminal attributes} -ixml: S, rule+. -rule: mark?, name, ["=:"], S, -alts, ".", S. -alts: alt+([";|"], S). -alt: term*(",", S). --term: factor; - repeat0; - repeat1; - option. -repeat0: factor, "*", S, sep?. -repeat1: factor, "+", S, sep?. -option: factor, "?", S. -sep: factor. - --factor: nonterminal; - terminal; - "(", S, alts, ")", S. -nonterminal: mark?, name. --terminal: literal; charset. --literal: quoted; encoded. --charset: inclusion; exclusion. - -quoted: tmark?, -string. -encoded: tmark?, @hex. -inclusion: tmark?, "[", S, element+([";|"], S), "]", S. -exclusion: tmark?, "~", S, "[", S, element+([";|"], S), "]", S. - -@tmark: ["^-"], S. --element: range; - string; - hex; - class. -range: from, S, "-", S, to, S. -@from: character. -@to: character. --character: -'"', dchar, -'"'; - -"'", schar, -"'"; - hex. -class: letter, letter, S. {One of the Unicode character classes} --letter: ["a"-"z"; "A"-"Z"]. -@name: letgit, xletter*, S. --letgit: ["a" - "z" {AAA}; "A"-"Z"; "0"-"9"]. --xletter: letgit; "-". - -@mark: ["@^-"], S. - -string: -'"', dstring, -'"', S; - -"'", sstring, -"'", S. -@dstring: dchar+. -@sstring: schar+. -dchar: ~['"']; - '""'. {all characters, dquotes must be doubled} -schar: ~["'"]; - "''". {all characters, squotes must be doubled} -hex: "#", ["0"-"9"; "a"-"f"; "A"-"F"]+. - --S: (" "; #9 {comment}; comment)*. -^comment: "{", cchar*, "}". --cchar: ~["}"]. - -{the end} diff --git a/tests/tests/ixml/ixml3.ixml b/tests/tests/ixml/ixml3.ixml deleted file mode 100644 index 46db8852..00000000 --- a/tests/tests/ixml/ixml3.ixml +++ /dev/null @@ -1,61 +0,0 @@ -{A test for what happens with comments in nonterminal attributes} -ixml: S, rule+. -rule: mark?, name, ["=:"], S, -alts, ".", S. -alts: alt+([";|"], S). -alt: term*(",", S). --term: factor; - repeat0; - repeat1; - option. -repeat0: factor, "*", S, sep?. -repeat1: factor, "+", S, sep?. -option: factor, "?", S. -sep: factor. - --factor: nonterminal; - terminal; - "(", S, alts, ")", S. -nonterminal: mark?, name. --terminal: literal; charset. --literal: quoted; encoded. --charset: inclusion; exclusion. - -quoted: tmark?, -string. -encoded: tmark?, @hex, S. -inclusion: tmark?, "[", S, element+([";|"], S), "]", S. -exclusion: tmark?, "~", S, "[", S, element+([";|"], S), "]", S. - -@tmark: ["^-"], S. --element: range; - string; - hex; - class. -range: from, S, "-", S, to, S. -@from: character. -@to: character. --character: -'"', dchar, -'"'; - -"'", schar, -"'"; - hex. -class: letter, letter, S. {One of the Unicode character classes} --letter: ["a"-"z"; "A"-"Z"]. -@name: letgit, xletter*, S. --letgit: ["a" - "z" {AAA}; "A"-"Z"; "0"-"9"]. --xletter: letgit; "-". - -@mark: ["@^-"], S. - -string: -'"', dstring, -'"', S; - -"'", sstring, -"'", S. -@dstring: dchar+. -@sstring: schar+. -dchar: ~['"']; - '""'. {all characters, dquotes must be doubled} -schar: ~["'"]; - "''". {all characters, squotes must be doubled} -hex: "#", ["0"-"9"; "a"-"f"; "A"-"F"]+. - --S: (" "; #9 {comment}; -#a; comment)*. -^comment: "{", cchar*, "}". --cchar: ~["}"]. - -{the end} diff --git a/tests/tests/ixml/ixml3.req b/tests/tests/ixml/ixml3.req deleted file mode 100644 index cc0e1277..00000000 --- a/tests/tests/ixml/ixml3.req +++ /dev/null @@ -1,483 +0,0 @@ -{A test for what happens with comments in nonterminal attributes} -ixml: S, rule+. -rule: mark?, name, ["=:"], S, -alts, ".", S. -alts: alt+([";|"], S). -alt: term*(",", S). --term: factor; - repeat0; - repeat1; - option. -repeat0: factor, "*", S, sep?. -repeat1: factor, "+", S, sep?. -option: factor, "?", S. -sep: factor. - --factor: nonterminal; - terminal; - "(", S, alts, ")", S. -nonterminal: mark?, name. --terminal: literal; charset. --literal: quoted; encoded. --charset: inclusion; exclusion. - -quoted: tmark?, -string. -encoded: tmark?, @hex, S. -inclusion: tmark?, "[", S, element+([";|"], S), "]", S. -exclusion: tmark?, "~", S, "[", S, element+([";|"], S), "]", S. - -@tmark: ["^-"], S. --element: range; - string; - hex; - class. -range: from, S, "-", S, to, S. -@from: character. -@to: character. --character: -'"', dchar, -'"'; - -"'", schar, -"'"; - hex. -class: letter, letter, S. {One of the Unicode character classes} --letter: ["a"-"z"; "A"-"Z"]. -@name: letgit, xletter*, S. --letgit: ["a" - "z" {AAA}; "A"-"Z"; "0"-"9"]. --xletter: letgit; "-". - -@mark: ["@^-"], S. - -string: -'"', dstring, -'"', S; - -"'", sstring, -"'", S. -@dstring: dchar+. -@sstring: schar+. -dchar: ~['"']; - '""'. {all characters, dquotes must be doubled} -schar: ~["'"]; - "''". {all characters, squotes must be doubled} -hex: "#", ["0"-"9"; "a"-"f"; "A"-"F"]+. - --S: (" "; #9 {comment}; -#a; comment)*. -^comment: "{", cchar*, "}". --cchar: ~["}"]. - -{the end} -# -{A test for what happens with comments in nonterminal attributes} -ixml: S, rule+. -rule: mark?, name, ["=:"], S, -alts, ".", S. -alts: alt+([";|"], S). -alt: term*(",", S). --term: factor; - repeat0; - repeat1; - option. -repeat0: factor, "*", S, sep?. -repeat1: factor, "+", S, sep?. -option: factor, "?", S. -sep: factor. - --factor: nonterminal; - terminal; - "(", S, alts, ")", S. -nonterminal: mark?, name. --terminal: literal; charset. --literal: quoted; encoded. --charset: inclusion; exclusion. - -quoted: tmark?, -string. -encoded: tmark?, @hex. -inclusion: tmark?, "[", S, element+([";|"], S), "]", S. -exclusion: tmark?, "~", S, "[", S, element+([";|"], S), "]", S. - -@tmark: ["^-"], S. --element: range; - string; - hex; - class. -range: from, S, "-", S, to, S. -@from: character. -@to: character. --character: -'"', dchar, -'"'; - -"'", schar, -"'"; - hex. -class: letter, letter, S. {One of the Unicode character classes} --letter: ["a"-"z"; "A"-"Z"]. -@name: letgit, xletter*, S. --letgit: ["a" - "z" {AAA}; "A"-"Z"; "0"-"9"]. --xletter: letgit; "-". - -@mark: ["@^-"], S. - -string: -'"', dstring, -'"', S; - -"'", sstring, -"'", S. -@dstring: dchar+. -@sstring: schar+. -dchar: ~['"']; - '""'. {all characters, dquotes must be doubled} -schar: ~["'"]; - "''". {all characters, squotes must be doubled} -hex: "#", ["0"-"9"; "a"-"f"; "A"-"F"]+. - --S: (" "; #9 {comment}; comment)*. -^comment: "{", cchar*, "}". --cchar: ~["}"]. - -{the end} -# - - - {A test for what happens with comments in nonterminal attributes} - : - - , - - + - . - : - - , - , - [ - ], - , - , - , - - . - : - - - + - ( - - - [ - ], - - - ) - - . - : - - - * - ( - - - , - - - ) - - . - : - - - ; - - - ; - - - ; - - - . - : - - , - , - , - - . - : - - , - , - , - - . - : - - , - , - - . - : - - - . - : - - - ; - - - ; - - , - , - , - , - - . - : - - , - - . - : - - - ; - - - . - : - - - ; - - - . - : - - - ; - - - . - : - - , - - . - : - - , - - . - : - - , - , - , - - + - ( - - - [ - ], - - - ) - , - , - - . - : - - , - , - , - , - , - - + - ( - - - [ - ], - - - ) - , - , - - . - : - - [ - ], - - . - : - - - ; - - - ; - - - ; - - - . - : - - , - , - , - , - , - - . - : - - - . - : - - - . - : - - , - , - - ; - - , - , - - ; - - - . - : - - , - , - - . - {One of the Unicode character classes} - - : - - [ - -; - -] - . - : - - , - - *, - - . - : - - [ - - - {AAA} - ; - -; - -] - . - : - - - ; - - - . - : - - [ - ], - - . - : - - , - , - , - - ; - - , - , - , - - . - : - - - + - . - : - - - + - . - : - - ~[ - ] - ; - - - . - {all characters, dquotes must be doubled} - - : - - ~[ - ] - ; - - - . - {all characters, squotes must be doubled} - - : - - , - - [ - -; - -; - -]+ - . - : - - ( - - - - ; - - - {comment} - - ; - - - - )* - . - : - - , - - *, - - . - : - - ~[ - ] - . - {the end} - - diff --git a/tests/tests/parse/elem1.inp b/tests/tests/parse/elem1.inp deleted file mode 100644 index acbe86c7..00000000 --- a/tests/tests/parse/elem1.inp +++ /dev/null @@ -1 +0,0 @@ -abcd diff --git a/tests/tests/parse/elem1.ixml b/tests/tests/parse/elem1.ixml deleted file mode 100644 index 99231113..00000000 --- a/tests/tests/parse/elem1.ixml +++ /dev/null @@ -1,4 +0,0 @@ -a: "a", b, c. -b: "b", c, d. -c: "c", []. {it should block here, since nothing matches} -d: "d". diff --git a/tests/tests/parse/elem1.req b/tests/tests/parse/elem1.req deleted file mode 100644 index dbff3b0a..00000000 --- a/tests/tests/parse/elem1.req +++ /dev/null @@ -1,20 +0,0 @@ -a: "a", b, c. -b: "b", c, d. -c: "c", []. {it should block here, since nothing matches} -d: "d". -# -abcd -# - - - 1 - 4 - abcd - [] - diff --git a/tests/tests/parse/parse-error.inp b/tests/tests/parse/parse-error.inp deleted file mode 100644 index b47f17e1..00000000 --- a/tests/tests/parse/parse-error.inp +++ /dev/null @@ -1 +0,0 @@ -a b<&>. diff --git a/tests/tests/parse/parse-error.ixml b/tests/tests/parse/parse-error.ixml deleted file mode 100644 index cbc2ebf5..00000000 --- a/tests/tests/parse/parse-error.ixml +++ /dev/null @@ -1,2 +0,0 @@ -a: "a", punctuation, "b". -punctuation: [",.;:'?!"]. diff --git a/tests/tests/parse/parse-error.req b/tests/tests/parse/parse-error.req deleted file mode 100644 index fc7012da..00000000 --- a/tests/tests/parse/parse-error.req +++ /dev/null @@ -1,18 +0,0 @@ -a: "a", punctuation, "b". -punctuation: [",.;:'?!"]. -# -a b<&>. -# - - - 1 - 2 - a b<&>. - [",.;:'?!</&>"] - diff --git a/tests/tests/parse/url.inp b/tests/tests/parse/url.inp deleted file mode 100644 index 827f31e6..00000000 --- a/tests/tests/parse/url.inp +++ /dev/null @@ -1 +0,0 @@ -http://http://@http://http:// diff --git a/tests/tests/parse/url.ixml b/tests/tests/parse/url.ixml deleted file mode 100644 index caab158c..00000000 --- a/tests/tests/parse/url.ixml +++ /dev/null @@ -1,12 +0,0 @@ -url: scheme, ":", authority, path. -scheme: name. -@name: letter+. -authority: "//", host. -host: sub+".". -sub: name. -path: ("/", seg)+. -seg: sname. -@sname: fletter*. --letter: ["a"-"z"]; ["A"-"Z"]; ["0"-"9"]. --fletter: letter; ".". - diff --git a/tests/tests/parse/url.req b/tests/tests/parse/url.req deleted file mode 100644 index ca24aa5d..00000000 --- a/tests/tests/parse/url.req +++ /dev/null @@ -1,28 +0,0 @@ -url: scheme, ":", authority, path. -scheme: name. -@name: letter+. -authority: "//", host. -host: sub+".". -sub: name. -path: ("/", seg)+. -seg: sname. -@sname: fletter*. --letter: ["a"-"z"]; ["A"-"Z"]; ["0"-"9"]. --fletter: letter; ".". - -# -http://http://@http://http:// -# - - - 1 - 12 - http://http://@http://http:// - "."; "/"; ["0"-"9"]; ["A"-"Z"]; ["a"-"z"] - diff --git a/tests/tests/parse/url1.inp b/tests/tests/parse/url1.inp deleted file mode 100644 index c102c073..00000000 --- a/tests/tests/parse/url1.inp +++ /dev/null @@ -1 +0,0 @@ -http://www.w3.org/TR/1999/xhtml.html#date?name=fred \ No newline at end of file diff --git a/tests/tests/parse/url1.ixml b/tests/tests/parse/url1.ixml deleted file mode 100644 index eceb38df..00000000 --- a/tests/tests/parse/url1.ixml +++ /dev/null @@ -1,11 +0,0 @@ -url: scheme, ":", authority, path. -@scheme: name. --name: letter+. --authority: "//", host. -host: sub+".". --sub: name. -path: ("/", seg)+. --seg: sname. --sname: fletter*. --letter: ["a"-"z"]; ["A"-"Z"]; ["0"-"9"]. --fletter: letter; ".". \ No newline at end of file diff --git a/tests/tests/parse/url1.req b/tests/tests/parse/url1.req deleted file mode 100644 index 5d159ba8..00000000 --- a/tests/tests/parse/url1.req +++ /dev/null @@ -1,25 +0,0 @@ -url: scheme, ":", authority, path. -@scheme: name. --name: letter+. --authority: "//", host. -host: sub+".". --sub: name. -path: ("/", seg)+. --seg: sname. --sname: fletter*. --letter: ["a"-"z"]; ["A"-"Z"]; ["0"-"9"]. --fletter: letter; ".".# -http://www.w3.org/TR/1999/xhtml.html#date?name=fred# - - - 1 - 37 - http://www.w3.org/TR/1999/xhtml.html#date?name=fred - "."; "/"; ["0"-"9"]; ["A"-"Z"]; ["a"-"z"] - diff --git a/tests/tests/semantic/unused-rule.inp b/tests/tests/semantic/unused-rule.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/semantic/unused-rule.ixml b/tests/tests/semantic/unused-rule.ixml deleted file mode 100644 index 00a49efb..00000000 --- a/tests/tests/semantic/unused-rule.ixml +++ /dev/null @@ -1,6 +0,0 @@ -a: b, undefined. -b: c. -c: . -unused: e. -e: f. -f: . diff --git a/tests/tests/semantic/unused-rule.req b/tests/tests/semantic/unused-rule.req deleted file mode 100644 index b954a1da..00000000 --- a/tests/tests/semantic/unused-rule.req +++ /dev/null @@ -1,17 +0,0 @@ -a: b, undefined. -b: c. -c: . -unused: e. -e: f. -f: . -# -# - -**** Undefined symbol: {"undefined"} - 6 f: . - ^ - -**** Unused rule: {"unused"} - 6 f: . - ^ -Failed diff --git a/tests/tests/semantic/unused-rules.inp b/tests/tests/semantic/unused-rules.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/semantic/unused-rules.ixml b/tests/tests/semantic/unused-rules.ixml deleted file mode 100644 index c44422ba..00000000 --- a/tests/tests/semantic/unused-rules.ixml +++ /dev/null @@ -1,7 +0,0 @@ -a: b, undefined1. -b: c. -c: undefined2. -unused1: e. -e: f. -unused2: . -f: . diff --git a/tests/tests/semantic/unused-rules.req b/tests/tests/semantic/unused-rules.req deleted file mode 100644 index a817d455..00000000 --- a/tests/tests/semantic/unused-rules.req +++ /dev/null @@ -1,18 +0,0 @@ -a: b, undefined1. -b: c. -c: undefined2. -unused1: e. -e: f. -unused2: . -f: . -# -# - -**** Undefined symbols: {"undefined1"; "undefined2"} - 7 f: . - ^ - -**** Unused rules: {"unused1"; "unused2"} - 7 f: . - ^ -Failed diff --git a/tests/tests/syntax/MISSING.inp b/tests/tests/syntax/MISSING.inp deleted file mode 100644 index b8e145d2..00000000 --- a/tests/tests/syntax/MISSING.inp +++ /dev/null @@ -1 +0,0 @@ -Tou shouldn't see this, or you forgot to supply an *.inp file diff --git a/tests/tests/syntax/class-range.inp b/tests/tests/syntax/class-range.inp deleted file mode 100644 index f83d884f..00000000 --- a/tests/tests/syntax/class-range.inp +++ /dev/null @@ -1 +0,0 @@ -Syntax error diff --git a/tests/tests/syntax/class-range.ixml b/tests/tests/syntax/class-range.ixml deleted file mode 100644 index 56135313..00000000 --- a/tests/tests/syntax/class-range.ixml +++ /dev/null @@ -1,2 +0,0 @@ -a: class-range. -class-range: [L-N]. diff --git a/tests/tests/syntax/class-range.req b/tests/tests/syntax/class-range.req deleted file mode 100644 index b929f830..00000000 --- a/tests/tests/syntax/class-range.req +++ /dev/null @@ -1,15 +0,0 @@ -a: class-range. -class-range: [L-N]. -# -Syntax error -# - -**** Bound of range must be a single character - 2 class-range: [L-N]. - ^ - -**** Bound of range must be a single character - 2 class-range: [L-N]. - ^ -**** Parsing failed at line 2: Bound of range must be a single character -Failed diff --git a/tests/tests/syntax/defn1.inp b/tests/tests/syntax/defn1.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/defn1.ixml b/tests/tests/syntax/defn1.ixml deleted file mode 100644 index da9e19cf..00000000 --- a/tests/tests/syntax/defn1.ixml +++ /dev/null @@ -1,4 +0,0 @@ -a: b, c. -b: c, d. -c: @".". {Not allowed for terminals} -d: . diff --git a/tests/tests/syntax/defn1.req b/tests/tests/syntax/defn1.req deleted file mode 100644 index e8c784a8..00000000 --- a/tests/tests/syntax/defn1.req +++ /dev/null @@ -1,12 +0,0 @@ -a: b, c. -b: c, d. -c: @".". {Not allowed for terminals} -d: . -# -# - -**** Marker '@' only allowed for rule names - 3 c: @".". {Not allowed for terminals} - ^ -**** Parsing failed at line 3: Marker '@' only allowed for rule names -Failed diff --git a/tests/tests/syntax/defn10.inp b/tests/tests/syntax/defn10.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/defn10.ixml b/tests/tests/syntax/defn10.ixml deleted file mode 100644 index 6d359f27..00000000 --- a/tests/tests/syntax/defn10.ixml +++ /dev/null @@ -1,4 +0,0 @@ -a: b, c. -b: c, d. -c: -(a, b, c). {No marker allowed} -d: . diff --git a/tests/tests/syntax/defn10.req b/tests/tests/syntax/defn10.req deleted file mode 100644 index 7057b246..00000000 --- a/tests/tests/syntax/defn10.req +++ /dev/null @@ -1,12 +0,0 @@ -a: b, c. -b: c, d. -c: -(a, b, c). {No marker allowed} -d: . -# -# - -**** Markers not possible for bracketed rules - 3 c: -(a, b, c). {No marker allowed} - ^ -**** Parsing failed at line 3: Markers not possible for bracketed rules -Failed diff --git a/tests/tests/syntax/defn11.inp b/tests/tests/syntax/defn11.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/defn11.ixml b/tests/tests/syntax/defn11.ixml deleted file mode 100644 index 07976d46..00000000 --- a/tests/tests/syntax/defn11.ixml +++ /dev/null @@ -1,4 +0,0 @@ -a: b, c. -b: c, d. -c: ^(a, b, c). {No marker allowed} -d: . diff --git a/tests/tests/syntax/defn11.req b/tests/tests/syntax/defn11.req deleted file mode 100644 index 96e5ee22..00000000 --- a/tests/tests/syntax/defn11.req +++ /dev/null @@ -1,12 +0,0 @@ -a: b, c. -b: c, d. -c: ^(a, b, c). {No marker allowed} -d: . -# -# - -**** Markers not possible for bracketed rules - 3 c: ^(a, b, c). {No marker allowed} - ^ -**** Parsing failed at line 3: Markers not possible for bracketed rules -Failed diff --git a/tests/tests/syntax/defn2.inp b/tests/tests/syntax/defn2.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/defn2.ixml b/tests/tests/syntax/defn2.ixml deleted file mode 100644 index c5eae6b5..00000000 --- a/tests/tests/syntax/defn2.ixml +++ /dev/null @@ -1,4 +0,0 @@ -a: b, c. -b: c, d. -c: @'.'. {Not allowed for terminals} -d: . diff --git a/tests/tests/syntax/defn2.req b/tests/tests/syntax/defn2.req deleted file mode 100644 index a4623f25..00000000 --- a/tests/tests/syntax/defn2.req +++ /dev/null @@ -1,12 +0,0 @@ -a: b, c. -b: c, d. -c: @'.'. {Not allowed for terminals} -d: . -# -# - -**** Marker '@' only allowed for rule names - 3 c: @'.'. {Not allowed for terminals} - ^ -**** Parsing failed at line 3: Marker '@' only allowed for rule names -Failed diff --git a/tests/tests/syntax/defn3.inp b/tests/tests/syntax/defn3.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/defn3.ixml b/tests/tests/syntax/defn3.ixml deleted file mode 100644 index 224dc618..00000000 --- a/tests/tests/syntax/defn3.ixml +++ /dev/null @@ -1,4 +0,0 @@ -a: b, c. -b: c, d. -c: 'unterminated. {unterminated string} -d: . diff --git a/tests/tests/syntax/defn3.req b/tests/tests/syntax/defn3.req deleted file mode 100644 index 3420a03a..00000000 --- a/tests/tests/syntax/defn3.req +++ /dev/null @@ -1,16 +0,0 @@ -a: b, c. -b: c, d. -c: 'unterminated. {unterminated string} -d: . -# -# - -**** Unterminated string - 3 c: 'unterminated. {unterminated string} - ^ - -**** Character "," expected - 3 c: 'unterminated. {unterminated string} - ^ -**** Parsing failed at line 3: Character "," expected -Failed diff --git a/tests/tests/syntax/defn3.rq b/tests/tests/syntax/defn3.rq deleted file mode 100644 index 3fe90b26..00000000 --- a/tests/tests/syntax/defn3.rq +++ /dev/null @@ -1,14 +0,0 @@ -a: b, c. -b: c, d. -c: ' -**** Unterminated string - 3 c: 'unterminated. {unterminated string} - ^ -u -**** Character "," expected - 3 c: 'unterminated. {unterminated string} - ^ -nterminated. {unterminated string} -d: . -**** Parsing failed at line 3 : Character "," expected -Failed diff --git a/tests/tests/syntax/defn4.inp b/tests/tests/syntax/defn4.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/defn4.ixml b/tests/tests/syntax/defn4.ixml deleted file mode 100644 index 18b4a351..00000000 --- a/tests/tests/syntax/defn4.ixml +++ /dev/null @@ -1,4 +0,0 @@ -a: b, c. -b: c, d. -c: "unterminated. {unterminated string} -d: . diff --git a/tests/tests/syntax/defn4.req b/tests/tests/syntax/defn4.req deleted file mode 100644 index 8c757f41..00000000 --- a/tests/tests/syntax/defn4.req +++ /dev/null @@ -1,16 +0,0 @@ -a: b, c. -b: c, d. -c: "unterminated. {unterminated string} -d: . -# -# - -**** Unterminated string - 3 c: "unterminated. {unterminated string} - ^ - -**** Character "," expected - 3 c: "unterminated. {unterminated string} - ^ -**** Parsing failed at line 3: Character "," expected -Failed diff --git a/tests/tests/syntax/defn5.inp b/tests/tests/syntax/defn5.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/defn5.ixml b/tests/tests/syntax/defn5.ixml deleted file mode 100644 index dda32739..00000000 --- a/tests/tests/syntax/defn5.ixml +++ /dev/null @@ -1,4 +0,0 @@ -a: b, c. -b: c, d. -c: @#9. {no @ for terminals} -d: . diff --git a/tests/tests/syntax/defn5.req b/tests/tests/syntax/defn5.req deleted file mode 100644 index 5fef29fd..00000000 --- a/tests/tests/syntax/defn5.req +++ /dev/null @@ -1,12 +0,0 @@ -a: b, c. -b: c, d. -c: @#9. {no @ for terminals} -d: . -# -# - -**** Marker '@' only allowed for rule names - 3 c: @#9. {no @ for terminals} - ^ -**** Parsing failed at line 3: Marker '@' only allowed for rule names -Failed diff --git a/tests/tests/syntax/defn6.inp b/tests/tests/syntax/defn6.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/defn6.ixml b/tests/tests/syntax/defn6.ixml deleted file mode 100644 index b5c04364..00000000 --- a/tests/tests/syntax/defn6.ixml +++ /dev/null @@ -1,4 +0,0 @@ -a: b, c. -b: c, d. -c: @~["abc"]. {No @ allowed} -d: . diff --git a/tests/tests/syntax/defn6.req b/tests/tests/syntax/defn6.req deleted file mode 100644 index 112b6b3d..00000000 --- a/tests/tests/syntax/defn6.req +++ /dev/null @@ -1,12 +0,0 @@ -a: b, c. -b: c, d. -c: @~["abc"]. {No @ allowed} -d: . -# -# - -**** Marker '@' only allowed for rule names - 3 c: @~["abc"]. {No @ allowed} - ^ -**** Parsing failed at line 3: Marker '@' only allowed for rule names -Failed diff --git a/tests/tests/syntax/defn8.inp b/tests/tests/syntax/defn8.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/defn8.ixml b/tests/tests/syntax/defn8.ixml deleted file mode 100644 index bb08e921..00000000 --- a/tests/tests/syntax/defn8.ixml +++ /dev/null @@ -1,4 +0,0 @@ -a: b, c. -b: c, d. -c: @["abc"]. {No @ allowed} -d: . diff --git a/tests/tests/syntax/defn8.req b/tests/tests/syntax/defn8.req deleted file mode 100644 index f26610ab..00000000 --- a/tests/tests/syntax/defn8.req +++ /dev/null @@ -1,12 +0,0 @@ -a: b, c. -b: c, d. -c: @["abc"]. {No @ allowed} -d: . -# -# - -**** Marker '@' only allowed for rule names - 3 c: @["abc"]. {No @ allowed} - ^ -**** Parsing failed at line 3: Marker '@' only allowed for rule names -Failed diff --git a/tests/tests/syntax/defn9.inp b/tests/tests/syntax/defn9.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/defn9.ixml b/tests/tests/syntax/defn9.ixml deleted file mode 100644 index 2ece1130..00000000 --- a/tests/tests/syntax/defn9.ixml +++ /dev/null @@ -1,4 +0,0 @@ -a: b, c. -b: c, d. -c: @(a, b, c). {No @ allowed} -d: . diff --git a/tests/tests/syntax/defn9.req b/tests/tests/syntax/defn9.req deleted file mode 100644 index 1e6ed47d..00000000 --- a/tests/tests/syntax/defn9.req +++ /dev/null @@ -1,16 +0,0 @@ -a: b, c. -b: c, d. -c: @(a, b, c). {No @ allowed} -d: . -# -# - -**** Marker '@' only allowed for rule names - 3 c: @(a, b, c). {No @ allowed} - ^ - -**** Markers not possible for bracketed rules - 3 c: @(a, b, c). {No @ allowed} - ^ -**** Parsing failed at line 3: Markers not possible for bracketed rules -Failed diff --git a/tests/tests/syntax/elem2.inp b/tests/tests/syntax/elem2.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/elem2.ixml b/tests/tests/syntax/elem2.ixml deleted file mode 100644 index b9449a92..00000000 --- a/tests/tests/syntax/elem2.ixml +++ /dev/null @@ -1,4 +0,0 @@ -a: b, c. -b: c, d. -c: [1]. {illegal} -d: . diff --git a/tests/tests/syntax/elem2.req b/tests/tests/syntax/elem2.req deleted file mode 100644 index d28fb4fa..00000000 --- a/tests/tests/syntax/elem2.req +++ /dev/null @@ -1,12 +0,0 @@ -a: b, c. -b: c, d. -c: [1]. {illegal} -d: . -# -# - -**** ", ', #, or letter expected - 3 c: [1]. {illegal} - ^ -**** Parsing failed at line 3: ", ', #, or letter expected -Failed diff --git a/tests/tests/syntax/elem3.inp b/tests/tests/syntax/elem3.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/elem3.ixml b/tests/tests/syntax/elem3.ixml deleted file mode 100644 index 1e2c0fa7..00000000 --- a/tests/tests/syntax/elem3.ixml +++ /dev/null @@ -1,4 +0,0 @@ -a: b, c. -b: c, d. -c: ["a"-""]. {Must be length 1} -d: . diff --git a/tests/tests/syntax/elem3.req b/tests/tests/syntax/elem3.req deleted file mode 100644 index 8d53802a..00000000 --- a/tests/tests/syntax/elem3.req +++ /dev/null @@ -1,16 +0,0 @@ -a: b, c. -b: c, d. -c: ["a"-""]. {Must be length 1} -d: . -# -# - -**** A string must contain at least one character - 3 c: ["a"-""]. {Must be length 1} - ^ - -**** Bound of range must be a single character - 3 c: ["a"-""]. {Must be length 1} - ^ -**** Parsing failed at line 3: Bound of range must be a single character -Failed diff --git a/tests/tests/syntax/elem4.inp b/tests/tests/syntax/elem4.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/elem4.ixml b/tests/tests/syntax/elem4.ixml deleted file mode 100644 index c2b2db09..00000000 --- a/tests/tests/syntax/elem4.ixml +++ /dev/null @@ -1,4 +0,0 @@ -a: b, c. -b: c, d. -c: ["a"-"dd"]. {Must be length 1} -d: . diff --git a/tests/tests/syntax/elem4.req b/tests/tests/syntax/elem4.req deleted file mode 100644 index 4ea3bdf7..00000000 --- a/tests/tests/syntax/elem4.req +++ /dev/null @@ -1,12 +0,0 @@ -a: b, c. -b: c, d. -c: ["a"-"dd"]. {Must be length 1} -d: . -# -# - -**** Bound of range must be a single character - 3 c: ["a"-"dd"]. {Must be length 1} - ^ -**** Parsing failed at line 3: Bound of range must be a single character -Failed diff --git a/tests/tests/syntax/elem5.inp b/tests/tests/syntax/elem5.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/elem5.ixml b/tests/tests/syntax/elem5.ixml deleted file mode 100644 index 2bbcd111..00000000 --- a/tests/tests/syntax/elem5.ixml +++ /dev/null @@ -1,4 +0,0 @@ -a: b, c. -b: c, d. -c: [""-"d"]. {Must be length 1} -d: . diff --git a/tests/tests/syntax/elem5.req b/tests/tests/syntax/elem5.req deleted file mode 100644 index e995dd6d..00000000 --- a/tests/tests/syntax/elem5.req +++ /dev/null @@ -1,16 +0,0 @@ -a: b, c. -b: c, d. -c: [""-"d"]. {Must be length 1} -d: . -# -# - -**** A string must contain at least one character - 3 c: [""-"d"]. {Must be length 1} - ^ - -**** Bound of range must be a single character - 3 c: [""-"d"]. {Must be length 1} - ^ -**** Parsing failed at line 3: Bound of range must be a single character -Failed diff --git a/tests/tests/syntax/elem6.inp b/tests/tests/syntax/elem6.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/elem6.ixml b/tests/tests/syntax/elem6.ixml deleted file mode 100644 index 875fc398..00000000 --- a/tests/tests/syntax/elem6.ixml +++ /dev/null @@ -1,4 +0,0 @@ -a: b, c. -b: c, d. -c: ["aa"-"d"]. {Must be length 1} -d: . diff --git a/tests/tests/syntax/elem6.req b/tests/tests/syntax/elem6.req deleted file mode 100644 index 79189e4e..00000000 --- a/tests/tests/syntax/elem6.req +++ /dev/null @@ -1,12 +0,0 @@ -a: b, c. -b: c, d. -c: ["aa"-"d"]. {Must be length 1} -d: . -# -# - -**** Bound of range must be a single character - 3 c: ["aa"-"d"]. {Must be length 1} - ^ -**** Parsing failed at line 3: Bound of range must be a single character -Failed diff --git a/tests/tests/syntax/elem7.inp b/tests/tests/syntax/elem7.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/elem7.ixml b/tests/tests/syntax/elem7.ixml deleted file mode 100644 index 8e04f9b4..00000000 --- a/tests/tests/syntax/elem7.ixml +++ /dev/null @@ -1,4 +0,0 @@ -a: b, c. -b: c, d. -c: ["a".."d"]. {Not ..} -d: . diff --git a/tests/tests/syntax/elem7.req b/tests/tests/syntax/elem7.req deleted file mode 100644 index 12c22f85..00000000 --- a/tests/tests/syntax/elem7.req +++ /dev/null @@ -1,24 +0,0 @@ -a: b, c. -b: c, d. -c: ["a".."d"]. {Not ..} -d: . -# -# - -**** ;|- or ] expected. - 3 c: ["a".."d"]. {Not ..} - ^ - -**** Character "]" expected - 3 c: ["a".."d"]. {Not ..} - ^ - -**** Character "," expected - 3 c: ["a".."d"]. {Not ..} - ^ - -**** name, "string", # encoded character, [character set], or (group) expected here - 3 c: ["a".."d"]. {Not ..} - ^ -**** Parsing failed at line 3: name, "string", # encoded character, [character set], or (group) expected here -Failed diff --git a/tests/tests/syntax/empty-string.inp b/tests/tests/syntax/empty-string.inp deleted file mode 100644 index 1683c0f6..00000000 --- a/tests/tests/syntax/empty-string.inp +++ /dev/null @@ -1 +0,0 @@ -bd diff --git a/tests/tests/syntax/empty-string.ixml b/tests/tests/syntax/empty-string.ixml deleted file mode 100644 index 0f71b7b4..00000000 --- a/tests/tests/syntax/empty-string.ixml +++ /dev/null @@ -1,4 +0,0 @@ -a: b, c, d. -b: "b". -c: "" {not allowed}. -d: "d". diff --git a/tests/tests/syntax/empty-string.req b/tests/tests/syntax/empty-string.req deleted file mode 100644 index dc79b1ee..00000000 --- a/tests/tests/syntax/empty-string.req +++ /dev/null @@ -1,13 +0,0 @@ -a: b, c, d. -b: "b". -c: "" {not allowed}. -d: "d". -# -bd -# - -**** A string must contain at least one character - 3 c: "" {not allowed}. - ^ -**** Parsing failed at line 3: A string must contain at least one character -Failed diff --git a/tests/tests/syntax/expr10.inp b/tests/tests/syntax/expr10.inp deleted file mode 100644 index b505a739..00000000 --- a/tests/tests/syntax/expr10.inp +++ /dev/null @@ -1 +0,0 @@ -You shouldn't see this, or you forgot to supply an *.inp file diff --git a/tests/tests/syntax/expr10.ixml b/tests/tests/syntax/expr10.ixml deleted file mode 100644 index f8565ced..00000000 --- a/tests/tests/syntax/expr10.ixml +++ /dev/null @@ -1,2 +0,0 @@ -expr: factor+("*"; "/"). -term: \ No newline at end of file diff --git a/tests/tests/syntax/expr10.req b/tests/tests/syntax/expr10.req deleted file mode 100644 index e9cc5cda..00000000 --- a/tests/tests/syntax/expr10.req +++ /dev/null @@ -1,14 +0,0 @@ -expr: factor+("*"; "/"). -term: # -You shouldn't see this, or you forgot to supply an *.inp file -# - -**** name, "string", # encoded character, [character set], or (group) expected here - 2 term: - ^ - -**** Character "." expected - 2 term: - ^ -**** Parsing failed at line 2: Character "." expected -Failed diff --git a/tests/tests/syntax/hex2.inp b/tests/tests/syntax/hex2.inp deleted file mode 100644 index df43d89b..00000000 --- a/tests/tests/syntax/hex2.inp +++ /dev/null @@ -1 +0,0 @@ -a#b diff --git a/tests/tests/syntax/hex2.ixml b/tests/tests/syntax/hex2.ixml deleted file mode 100644 index 659ed19c..00000000 --- a/tests/tests/syntax/hex2.ixml +++ /dev/null @@ -1 +0,0 @@ -hex: "a", #, "b". diff --git a/tests/tests/syntax/hex2.req b/tests/tests/syntax/hex2.req deleted file mode 100644 index 4172f164..00000000 --- a/tests/tests/syntax/hex2.req +++ /dev/null @@ -1,18 +0,0 @@ -hex: "a", #, "b". -# -a#b -# - -**** Missing hex digits - 1 hex: "a", #, "b". - ^ - -**** Character "," expected - 1 hex: "a", #, "b". - ^ - -**** Unterminated string - 1 hex: "a", #, "b". - ^ -**** Parsing failed at line 1: Unterminated string -Failed diff --git a/tests/tests/syntax/illegal-class.inp b/tests/tests/syntax/illegal-class.inp deleted file mode 100644 index 68960264..00000000 --- a/tests/tests/syntax/illegal-class.inp +++ /dev/null @@ -1 +0,0 @@ -Dummy input diff --git a/tests/tests/syntax/illegal-class.ixml b/tests/tests/syntax/illegal-class.ixml deleted file mode 100644 index 531844d8..00000000 --- a/tests/tests/syntax/illegal-class.ixml +++ /dev/null @@ -1,2 +0,0 @@ -a: class. -class: [Xx]. {Non-existent class} diff --git a/tests/tests/syntax/illegal-class.req b/tests/tests/syntax/illegal-class.req deleted file mode 100644 index 80540004..00000000 --- a/tests/tests/syntax/illegal-class.req +++ /dev/null @@ -1,11 +0,0 @@ -a: class. -class: [Xx]. {Non-existent class} -# -Dummy input -# - -**** "Xx" is not a valid class name - 2 class: [Xx]. {Non-existent class} - ^ -**** Parsing failed at line 2: "Xx" is not a valid class name -Failed diff --git a/tests/tests/syntax/name-with-spaces.inp b/tests/tests/syntax/name-with-spaces.inp deleted file mode 100644 index b505a739..00000000 --- a/tests/tests/syntax/name-with-spaces.inp +++ /dev/null @@ -1 +0,0 @@ -You shouldn't see this, or you forgot to supply an *.inp file diff --git a/tests/tests/syntax/name-with-spaces.ixml b/tests/tests/syntax/name-with-spaces.ixml deleted file mode 100644 index 1d13f166..00000000 --- a/tests/tests/syntax/name-with-spaces.ixml +++ /dev/null @@ -1,3 +0,0 @@ -a b: b c. {No spaces in names} -b: . -c: . diff --git a/tests/tests/syntax/name-with-spaces.req b/tests/tests/syntax/name-with-spaces.req deleted file mode 100644 index 60ea5c4f..00000000 --- a/tests/tests/syntax/name-with-spaces.req +++ /dev/null @@ -1,32 +0,0 @@ -a b: b c. {No spaces in names} -b: . -c: . -# -You shouldn't see this, or you forgot to supply an *.inp file -# - -**** One of [:=] expected - 1 a b: b c. {No spaces in names} - ^ - -**** Character "," expected - 1 a b: b c. {No spaces in names} - ^ - -**** Character "," expected - 2 b: . - ^ - -**** Character "," expected - 3 c: . - ^ - -**** name, "string", # encoded character, [character set], or (group) expected here - 3 c: . - ^ - -**** Character "." expected - 3 c: . - ^ -**** Parsing failed at line 3: Character "." expected -Failed diff --git a/tests/tests/syntax/rule.inp b/tests/tests/syntax/rule.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/rule.ixml b/tests/tests/syntax/rule.ixml deleted file mode 100644 index 07dd6a10..00000000 --- a/tests/tests/syntax/rule.ixml +++ /dev/null @@ -1,3 +0,0 @@ -a: b, c. -b . {missing colon} -c: . diff --git a/tests/tests/syntax/rule.req b/tests/tests/syntax/rule.req deleted file mode 100644 index b6e8b0fb..00000000 --- a/tests/tests/syntax/rule.req +++ /dev/null @@ -1,15 +0,0 @@ -a: b, c. -b . {missing colon} -c: . -# -# - -**** One of [:=] expected - 2 b . {missing colon} - ^ - -**** name, "string", # encoded character, [character set], or (group) expected here - 3 c: . - ^ -**** Parsing failed at line 3: name, "string", # encoded character, [character set], or (group) expected here -Failed diff --git a/tests/tests/syntax/rule1.inp b/tests/tests/syntax/rule1.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/rule1.ixml b/tests/tests/syntax/rule1.ixml deleted file mode 100644 index 167e8a1f..00000000 --- a/tests/tests/syntax/rule1.ixml +++ /dev/null @@ -1,3 +0,0 @@ -a: b, c. -b: b. c. {extra .} -c: . diff --git a/tests/tests/syntax/rule1.req b/tests/tests/syntax/rule1.req deleted file mode 100644 index 61e21491..00000000 --- a/tests/tests/syntax/rule1.req +++ /dev/null @@ -1,15 +0,0 @@ -a: b, c. -b: b. c. {extra .} -c: . -# -# - -**** One of [:=] expected - 2 b: b. c. {extra .} - ^ - -**** name, "string", # encoded character, [character set], or (group) expected here - 3 c: . - ^ -**** Parsing failed at line 3: name, "string", # encoded character, [character set], or (group) expected here -Failed diff --git a/tests/tests/syntax/rule10.inp b/tests/tests/syntax/rule10.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/rule10.ixml b/tests/tests/syntax/rule10.ixml deleted file mode 100644 index e2f5c847..00000000 --- a/tests/tests/syntax/rule10.ixml +++ /dev/null @@ -1,2 +0,0 @@ -a: "(" num ")". {missing commas} -num: "1". diff --git a/tests/tests/syntax/rule10.req b/tests/tests/syntax/rule10.req deleted file mode 100644 index 1f05937f..00000000 --- a/tests/tests/syntax/rule10.req +++ /dev/null @@ -1,18 +0,0 @@ -a: "(" num ")". {missing commas} -num: "1". -# -# - -**** Character "," expected - 1 a: "(" num ")". {missing commas} - ^ - -**** Character "," expected - 1 a: "(" num ")". {missing commas} - ^ - -**** Unterminated string - 1 a: "(" num ")". {missing commas} - ^ -**** Parsing failed at line 1: Unterminated string -Failed diff --git a/tests/tests/syntax/rule2.inp b/tests/tests/syntax/rule2.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/rule2.ixml b/tests/tests/syntax/rule2.ixml deleted file mode 100644 index 584c135f..00000000 --- a/tests/tests/syntax/rule2.ixml +++ /dev/null @@ -1,4 +0,0 @@ -a: b, c. -a: b, c. {double defined} -b: . -c: . diff --git a/tests/tests/syntax/rule2.req b/tests/tests/syntax/rule2.req deleted file mode 100644 index ba561c1a..00000000 --- a/tests/tests/syntax/rule2.req +++ /dev/null @@ -1,12 +0,0 @@ -a: b, c. -a: b, c. {double defined} -b: . -c: . -# -# - -**** a has already been defined - 2 a: b, c. {double defined} - ^ -**** Parsing failed at line 2: a has already been defined -Failed diff --git a/tests/tests/syntax/rule3.inp b/tests/tests/syntax/rule3.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/rule3.ixml b/tests/tests/syntax/rule3.ixml deleted file mode 100644 index a7d62838..00000000 --- a/tests/tests/syntax/rule3.ixml +++ /dev/null @@ -1,3 +0,0 @@ -a: b, c. -b: b, c, . {spurious comma} -c: ".". diff --git a/tests/tests/syntax/rule3.req b/tests/tests/syntax/rule3.req deleted file mode 100644 index ed98a686..00000000 --- a/tests/tests/syntax/rule3.req +++ /dev/null @@ -1,15 +0,0 @@ -a: b, c. -b: b, c, . {spurious comma} -c: ".". -# -# - -**** name, "string", # encoded character, [character set], or (group) expected here - 2 b: b, c, . {spurious comma} - ^ - -**** Character "," expected - 3 c: ".". - ^ -**** Parsing failed at line 3: Character "," expected -Failed diff --git a/tests/tests/syntax/rule4.inp b/tests/tests/syntax/rule4.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/rule4.ixml b/tests/tests/syntax/rule4.ixml deleted file mode 100644 index 6fc7a45b..00000000 --- a/tests/tests/syntax/rule4.ixml +++ /dev/null @@ -1,3 +0,0 @@ -a: b, c. -b: b, c . -c: ".") {Rule ends wrong} diff --git a/tests/tests/syntax/rule4.req b/tests/tests/syntax/rule4.req deleted file mode 100644 index 4a742799..00000000 --- a/tests/tests/syntax/rule4.req +++ /dev/null @@ -1,11 +0,0 @@ -a: b, c. -b: b, c . -c: ".") {Rule ends wrong} -# -# - -**** Character "." expected - 3 c: ".") {Rule ends wrong} - ^ -**** Parsing failed at line 3: Character "." expected -Failed diff --git a/tests/tests/syntax/rule5.inp b/tests/tests/syntax/rule5.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/rule5.ixml b/tests/tests/syntax/rule5.ixml deleted file mode 100644 index f5e0f315..00000000 --- a/tests/tests/syntax/rule5.ixml +++ /dev/null @@ -1,3 +0,0 @@ -a: b, c. -$b: b, c. {illegal name} -c: ".". diff --git a/tests/tests/syntax/rule5.req b/tests/tests/syntax/rule5.req deleted file mode 100644 index ef557746..00000000 --- a/tests/tests/syntax/rule5.req +++ /dev/null @@ -1,15 +0,0 @@ -a: b, c. -$b: b, c. {illegal name} -c: ".". -# -# - -**** Rule name expected - 2 $b: b, c. {illegal name} - ^ - -**** One of [:=] expected - 2 $b: b, c. {illegal name} - ^ -**** Parsing failed at line 2: One of [:=] expected -Failed diff --git a/tests/tests/syntax/rule6.inp b/tests/tests/syntax/rule6.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/rule6.ixml b/tests/tests/syntax/rule6.ixml deleted file mode 100644 index 2125a456..00000000 --- a/tests/tests/syntax/rule6.ixml +++ /dev/null @@ -1,3 +0,0 @@ -a: b, c. -b:: b, c. {double colon} -c: ".". diff --git a/tests/tests/syntax/rule6.req b/tests/tests/syntax/rule6.req deleted file mode 100644 index 42e90879..00000000 --- a/tests/tests/syntax/rule6.req +++ /dev/null @@ -1,15 +0,0 @@ -a: b, c. -b:: b, c. {double colon} -c: ".". -# -# - -**** name, "string", # encoded character, [character set], or (group) expected here - 2 b:: b, c. {double colon} - ^ - -**** Character "," expected - 2 b:: b, c. {double colon} - ^ -**** Parsing failed at line 2: Character "," expected -Failed diff --git a/tests/tests/syntax/rule7.inp b/tests/tests/syntax/rule7.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/rule7.ixml b/tests/tests/syntax/rule7.ixml deleted file mode 100644 index 818e291f..00000000 --- a/tests/tests/syntax/rule7.ixml +++ /dev/null @@ -1,3 +0,0 @@ -a: b, c. -^^b: b, c. {double marker} -c: ".". diff --git a/tests/tests/syntax/rule7.req b/tests/tests/syntax/rule7.req deleted file mode 100644 index 97d08add..00000000 --- a/tests/tests/syntax/rule7.req +++ /dev/null @@ -1,15 +0,0 @@ -a: b, c. -^^b: b, c. {double marker} -c: ".". -# -# - -**** Rule name expected - 2 ^^b: b, c. {double marker} - ^ - -**** One of [:=] expected - 2 ^^b: b, c. {double marker} - ^ -**** Parsing failed at line 2: One of [:=] expected -Failed diff --git a/tests/tests/syntax/rule8.inp b/tests/tests/syntax/rule8.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/rule8.ixml b/tests/tests/syntax/rule8.ixml deleted file mode 100644 index 2a71ac67..00000000 --- a/tests/tests/syntax/rule8.ixml +++ /dev/null @@ -1 +0,0 @@ -a: "", "" diff --git a/tests/tests/syntax/rule8.req b/tests/tests/syntax/rule8.req deleted file mode 100644 index 4a21f011..00000000 --- a/tests/tests/syntax/rule8.req +++ /dev/null @@ -1,17 +0,0 @@ -a: "", "" -# -# - -**** A string must contain at least one character - 1 a: "", "" - ^ - -**** A string must contain at least one character - 1 a: "", "" - ^ - -**** Character "." expected - 1 a: "", "" - ^ -**** Parsing failed at line 1: Character "." expected -Failed diff --git a/tests/tests/syntax/rule9.inp b/tests/tests/syntax/rule9.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/rule9.ixml b/tests/tests/syntax/rule9.ixml deleted file mode 100644 index 2592128b..00000000 --- a/tests/tests/syntax/rule9.ixml +++ /dev/null @@ -1,4 +0,0 @@ -a: 1, b, c. {illegal terminal} -b: . -c: . - diff --git a/tests/tests/syntax/rule9.req b/tests/tests/syntax/rule9.req deleted file mode 100644 index c805b9bb..00000000 --- a/tests/tests/syntax/rule9.req +++ /dev/null @@ -1,12 +0,0 @@ -a: 1, b, c. {illegal terminal} -b: . -c: . - -# -# - -**** name, "string", # encoded character, [character set], or (group) expected here - 1 a: 1, b, c. {illegal terminal} - ^ -**** Parsing failed at line 1: name, "string", # encoded character, [character set], or (group) expected here -Failed diff --git a/tests/tests/syntax/unterminated-comment.inp b/tests/tests/syntax/unterminated-comment.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/unterminated-comment.ixml b/tests/tests/syntax/unterminated-comment.ixml deleted file mode 100644 index 1c434245..00000000 --- a/tests/tests/syntax/unterminated-comment.ixml +++ /dev/null @@ -1,3 +0,0 @@ -a: b. {This is an unterminated comment -b: c. -c: . diff --git a/tests/tests/syntax/unterminated-comment.req b/tests/tests/syntax/unterminated-comment.req deleted file mode 100644 index 473fea16..00000000 --- a/tests/tests/syntax/unterminated-comment.req +++ /dev/null @@ -1,11 +0,0 @@ -a: b. {This is an unterminated comment -b: c. -c: . -# -# - -**** Unterminated comment at line 1 - 3 c: . - ^ -**** Parsing failed at line 3: Unterminated comment at line 1 -Failed diff --git a/tests/tests/syntax/unterminated-comment1.inp b/tests/tests/syntax/unterminated-comment1.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/unterminated-comment1.ixml b/tests/tests/syntax/unterminated-comment1.ixml deleted file mode 100644 index e2f881c0..00000000 --- a/tests/tests/syntax/unterminated-comment1.ixml +++ /dev/null @@ -1,4 +0,0 @@ -a: b. {This is an unterminated comment -{with a nested comment} -b: c. -c: . diff --git a/tests/tests/syntax/unterminated-comment1.req b/tests/tests/syntax/unterminated-comment1.req deleted file mode 100644 index 13d536c6..00000000 --- a/tests/tests/syntax/unterminated-comment1.req +++ /dev/null @@ -1,12 +0,0 @@ -a: b. {This is an unterminated comment -{with a nested comment} -b: c. -c: . -# -# - -**** Unterminated comment at line 1 - 4 c: . - ^ -**** Parsing failed at line 4: Unterminated comment at line 1 -Failed diff --git a/tests/tests/syntax/unterminated-comment2.inp b/tests/tests/syntax/unterminated-comment2.inp deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tests/syntax/unterminated-comment2.ixml b/tests/tests/syntax/unterminated-comment2.ixml deleted file mode 100644 index 9e3db3b1..00000000 --- a/tests/tests/syntax/unterminated-comment2.ixml +++ /dev/null @@ -1,5 +0,0 @@ -a: b. {This is an unterminated comment - -b: c. -{with a nested unterminated comment -c: . diff --git a/tests/tests/syntax/unterminated-comment2.req b/tests/tests/syntax/unterminated-comment2.req deleted file mode 100644 index 75d3ae19..00000000 --- a/tests/tests/syntax/unterminated-comment2.req +++ /dev/null @@ -1,17 +0,0 @@ -a: b. {This is an unterminated comment - -b: c. -{with a nested unterminated comment -c: . -# -# - -**** Unterminated comment at line 4 - 5 c: . - ^ - -**** Unterminated comment at line 1 - 5 c: . - ^ -**** Parsing failed at line 5: Unterminated comment at line 1 -Failed From ee32be0a2ba840bd589d58fa9c9fa8f8ff1dee49 Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Sat, 5 Feb 2022 12:43:38 +0000 Subject: [PATCH 092/152] Can't reproduce MSMs assertion; added a result --- tests/correct/expr1.output.xml | 18 ++++++++++++++++++ tests/correct/test-catalog.xml | 6 ++++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 tests/correct/expr1.output.xml diff --git a/tests/correct/expr1.output.xml b/tests/correct/expr1.output.xml new file mode 100644 index 00000000..12bc02fd --- /dev/null +++ b/tests/correct/expr1.output.xml @@ -0,0 +1,18 @@ + diff --git a/tests/correct/test-catalog.xml b/tests/correct/test-catalog.xml index 1c544f70..941d20fa 100644 --- a/tests/correct/test-catalog.xml +++ b/tests/correct/test-catalog.xml @@ -159,6 +159,8 @@ change="remove trailing whitespace from input"/> +

We may need a new assertion: if taken literally this @@ -170,10 +172,10 @@

To be discussed, probably at length.

+ + -->
From 349ea04ddb000d20823bc987817fab39b986e591 Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Sat, 5 Feb 2022 12:45:44 +0000 Subject: [PATCH 093/152] Fix output; remove duplicate entry from catalog --- tests/correct/range.output.xml | 8 ++++---- tests/correct/test-catalog.xml | 14 -------------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/tests/correct/range.output.xml b/tests/correct/range.output.xml index 21e6ca46..6d4e4039 100644 --- a/tests/correct/range.output.xml +++ b/tests/correct/range.output.xml @@ -1,4 +1,4 @@ - - 5 - - +5 diff --git a/tests/correct/test-catalog.xml b/tests/correct/test-catalog.xml index 941d20fa..5697a54c 100644 --- a/tests/correct/test-catalog.xml +++ b/tests/correct/test-catalog.xml @@ -725,20 +725,6 @@
- - - - - - - change="Converted it into the catalog format"/> - - - - - - - From cbc4a0bbc2ad1a1af3d6a5f3c9a36374ae38b358 Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Sat, 5 Feb 2022 13:05:11 +0000 Subject: [PATCH 094/152] Grammar updates make this pass again --- tests/{extra => ixml}/ixml2.output.xml | 0 tests/ixml/test-catalog.xml | 26 +++----------------------- 2 files changed, 3 insertions(+), 23 deletions(-) rename tests/{extra => ixml}/ixml2.output.xml (100%) diff --git a/tests/extra/ixml2.output.xml b/tests/ixml/ixml2.output.xml similarity index 100% rename from tests/extra/ixml2.output.xml rename to tests/ixml/ixml2.output.xml diff --git a/tests/ixml/test-catalog.xml b/tests/ixml/test-catalog.xml index 7bb565a9..efbb31c2 100644 --- a/tests/ixml/test-catalog.xml +++ b/tests/ixml/test-catalog.xml @@ -150,33 +150,13 @@ by="MSM" on="2021-12-30" change="stripped non-significant whitespace from result"/> - - -

The test grammar includes the rule - -letgit: ["a"{first}-"z"; "A"-"Z"; "0"-"9"].

-

The ixml grammar of December 2021, like its - predecessors, translates the first range into - ]]>, - which does not provide a single-character start - for the range. The semantics of such a range are - not defined by the spec. (One naive translation - into conventional regular expressions produces a - range including the letters 'a', 'f', 'i', - and 'r' through 'z', which makes the name 'ixml' - fail on the 'm'.)

-

Until the ixml grammar is corrected to turn this into - comment>first]]> or - something else that keeps the comment out of the - 'from' attribute, this should be treated as a test - case with an error in the test case grammar.

-
+ - - +
From f3c1d16e5880cb8f5f0bfe4304d4bf0715ea10b3 Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Sat, 5 Feb 2022 13:05:25 +0000 Subject: [PATCH 095/152] Fixed formatting of test results --- tests/correct/empty-group.output.xml | 8 ++++---- tests/correct/range-comments.output.xml | 12 ++++++------ tests/correct/ranges.output.xml | 18 +++++++++--------- tests/correct/ranges1.output.xml | 18 +++++++++--------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/tests/correct/empty-group.output.xml b/tests/correct/empty-group.output.xml index b16a482b..a8f89c4a 100644 --- a/tests/correct/empty-group.output.xml +++ b/tests/correct/empty-group.output.xml @@ -1,4 +1,4 @@ - - b - c - +bc diff --git a/tests/correct/range-comments.output.xml b/tests/correct/range-comments.output.xml index 440f69c6..1974d0f3 100644 --- a/tests/correct/range-comments.output.xml +++ b/tests/correct/range-comments.output.xml @@ -1,6 +1,6 @@ - - n - a - m - e - +name diff --git a/tests/correct/ranges.output.xml b/tests/correct/ranges.output.xml index c9cb99ce..4d653246 100644 --- a/tests/correct/ranges.output.xml +++ b/tests/correct/ranges.output.xml @@ -1,9 +1,9 @@ - - !"#$%&'()*+,-./ - 0123456789 - :;<=>?@ - ABCDEFGHIJKLMNOPQRSTUVWXYZ - [\]^_` - abcdefghijklmnopqrstuvwxyz - {|}~ - + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ diff --git a/tests/correct/ranges1.output.xml b/tests/correct/ranges1.output.xml index c7356480..d6c8ee7e 100644 --- a/tests/correct/ranges1.output.xml +++ b/tests/correct/ranges1.output.xml @@ -1,9 +1,9 @@ - - !"#$%&'()*+,-./ - 0123456789 - :;<=>?@ - ABCDEFGHIJKLMNOPQRSTUVWXYZ - [\]^_` - abcdefghijklmnopqrstuvwxyz - {|}~ - +!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ From 96d42d52c73d07287ea168310836e00a9a1ab353 Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Sat, 5 Feb 2022 13:09:18 +0000 Subject: [PATCH 096/152] Oversight on my part, MSM is correct, expr1 is flawed --- tests/correct/expr1.output.xml | 17 +++++++++-------- tests/correct/test-catalog.xml | 6 ++---- tests/extra/expr1.output.xml | 20 -------------------- 3 files changed, 11 insertions(+), 32 deletions(-) delete mode 100644 tests/extra/expr1.output.xml diff --git a/tests/correct/expr1.output.xml b/tests/correct/expr1.output.xml index 12bc02fd..f7fe35b9 100644 --- a/tests/correct/expr1.output.xml +++ b/tests/correct/expr1.output.xml @@ -1,18 +1,19 @@ - + >
diff --git a/tests/correct/test-catalog.xml b/tests/correct/test-catalog.xml index 5697a54c..0a2bc1cf 100644 --- a/tests/correct/test-catalog.xml +++ b/tests/correct/test-catalog.xml @@ -159,8 +159,6 @@ change="remove trailing whitespace from input"/> -

We may need a new assertion: if taken literally this @@ -172,9 +170,9 @@

To be discussed, probably at length.

- - diff --git a/tests/extra/expr1.output.xml b/tests/extra/expr1.output.xml deleted file mode 100644 index 87cfa841..00000000 --- a/tests/extra/expr1.output.xml +++ /dev/null @@ -1,20 +0,0 @@ - - From 11272c10cffe85bd3024e0c17614e18f6df62062 Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Sat, 5 Feb 2022 17:19:12 +0000 Subject: [PATCH 097/152] Back out my erroneous changes to grammar test catalog --- tests/syntax/catalog-as-grammar-tests.xml | 312 +++++++++++----------- 1 file changed, 156 insertions(+), 156 deletions(-) diff --git a/tests/syntax/catalog-as-grammar-tests.xml b/tests/syntax/catalog-as-grammar-tests.xml index 39bc4421..b50c39a9 100644 --- a/tests/syntax/catalog-as-grammar-tests.xml +++ b/tests/syntax/catalog-as-grammar-tests.xml @@ -16,318 +16,318 @@ the ixml grammar built into the processor.

- + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - + From 04320152dc204f6ff2f130da6024a48b71f75541 Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Mon, 7 Feb 2022 08:10:41 +0000 Subject: [PATCH 098/152] Fix markup errors --- tests/ambiguous/test-catalog.xml | 4 ++-- tests/correct/test-catalog.xml | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/ambiguous/test-catalog.xml b/tests/ambiguous/test-catalog.xml index 48f3bb62..609253af 100644 --- a/tests/ambiguous/test-catalog.xml +++ b/tests/ambiguous/test-catalog.xml @@ -256,9 +256,9 @@ - + - + diff --git a/tests/correct/test-catalog.xml b/tests/correct/test-catalog.xml index 0a2bc1cf..ca0b864c 100644 --- a/tests/correct/test-catalog.xml +++ b/tests/correct/test-catalog.xml @@ -686,7 +686,7 @@ - + @@ -700,7 +700,7 @@ - + @@ -714,7 +714,7 @@ - + @@ -728,7 +728,7 @@ - + @@ -742,7 +742,7 @@ - + From 1c92ee49293ffe3e8dbd199595335c80caaa1e4b Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Tue, 8 Feb 2022 18:02:35 +0000 Subject: [PATCH 099/152] Fix catalog markup errors in test elem1 --- tests/syntax/catalog-as-grammar-tests.xml | 14 ++++++++++---- tests/syntax/elem1.inp | 1 + 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 tests/syntax/elem1.inp diff --git a/tests/syntax/catalog-as-grammar-tests.xml b/tests/syntax/catalog-as-grammar-tests.xml index b50c39a9..21274885 100644 --- a/tests/syntax/catalog-as-grammar-tests.xml +++ b/tests/syntax/catalog-as-grammar-tests.xml @@ -106,12 +106,18 @@ - + + - - - + + + + + + + diff --git a/tests/syntax/elem1.inp b/tests/syntax/elem1.inp new file mode 100644 index 00000000..acbe86c7 --- /dev/null +++ b/tests/syntax/elem1.inp @@ -0,0 +1 @@ +abcd From d6268bdd537823b94421683ea2a71f662f232195 Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Tue, 15 Feb 2022 15:41:20 +0000 Subject: [PATCH 100/152] Proposal to fix #38 --- tests/ambiguous/date.inp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ambiguous/date.inp b/tests/ambiguous/date.inp index 1cbea1a5..5df1d355 100644 --- a/tests/ambiguous/date.inp +++ b/tests/ambiguous/date.inp @@ -1 +1 @@ -The conference starts Thursday, 9th Feb 2017 at 10:00. +The conference starts Thursday, 9th Feb 2017 at 10:00. \ No newline at end of file From 72279d620e86c40b67b9bd32a1d3be6ce27edfd1 Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Tue, 15 Feb 2022 15:42:33 +0000 Subject: [PATCH 101/152] Proposal to fix #37 --- tests/correct/ranges1.inp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/correct/ranges1.inp b/tests/correct/ranges1.inp index 8d188c4c..effeefbc 100644 --- a/tests/correct/ranges1.inp +++ b/tests/correct/ranges1.inp @@ -1 +1 @@ -!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ +!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ \ No newline at end of file From 4fd216754526cfa0741c15398ae7ec38243a892f Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Tue, 15 Feb 2022 15:47:50 +0000 Subject: [PATCH 102/152] Proposal to fix #36 --- tests/correct/range-comments.inp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/correct/range-comments.inp b/tests/correct/range-comments.inp index f121bdbf..934edc81 100644 --- a/tests/correct/range-comments.inp +++ b/tests/correct/range-comments.inp @@ -1 +1 @@ -name +name \ No newline at end of file From 16517cc7de5e7abf362b0bf799c24e0791f20990 Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Tue, 15 Feb 2022 15:49:12 +0000 Subject: [PATCH 103/152] Proposal to fix #35 --- tests/correct/element-content.inp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/correct/element-content.inp b/tests/correct/element-content.inp index fda91d52..2202320c 100644 --- a/tests/correct/element-content.inp +++ b/tests/correct/element-content.inp @@ -1 +1 @@ -"'<>/&. +"'<>/&. \ No newline at end of file From 12ba3eae80c3fa4fb2398cd38e6ca3d11d2d22bd Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Tue, 15 Feb 2022 14:52:24 -0700 Subject: [PATCH 104/152] Add samples directory with README and one sample --- samples/ISBN.ixml | 266 ++++++++++++++++++++++++++++++++++++++++++++++ samples/README.md | 30 ++++++ 2 files changed, 296 insertions(+) create mode 100644 samples/ISBN.ixml create mode 100644 samples/README.md diff --git a/samples/ISBN.ixml b/samples/ISBN.ixml new file mode 100644 index 00000000..5c0b81ab --- /dev/null +++ b/samples/ISBN.ixml @@ -0,0 +1,266 @@ +{ A grammar for ISBN-13, ISBN-10, and ISSN book and serial numbers. + Effectively we use the nonterminals to keep track of the calculation + of the check digit. Each nonterminal of the form dX_Y handles + the digit in position X, in the case that the running total of + the check digit is Y. + + This grammar does not attempt to enforce correct use of hyphens, + which depends on the boundaries between the GS1 prefix (if any), the + registration group element, the registrant element, the publication + element, and the check digit, which in turn depend on their values. + This grammar simply allows hyphens anywhere except in the middle of + the GS1 prefix. + +} + +{ The current version is a place-holder; it only handles isbn-13. } + +{ isbn-13: A thirteen-digit ISBN } + +{ In a thirteen-digit ISBN, the check digit is the sum of the first, + third, and other odd-numbered digits (up to digit 11), plus three + times the sum of the even-numbered digits, modulo 10. Because of + the way modular arithmetic works, we only need to keep track of the + ones digit, which allows us to get by with ten nonterminals for each + position in the ISBN, starting with the fourth. The first three are + the GS1 prefixes '978' and '979', which can be handled specially. } + +isbn-13 = '978', d4_8; '979', d4_9. + +{ d4: fourth digit of the ISBN. } + +{ d4_8: fourth digit, current running sum is 8. Multiply the fourth + digit by 3, add running sum, take the modulus } + +-d4_8 = '-'?, + ( '0', d5_8 + | '1', d5_1 + | '2', d5_4 + | '3', d5_7 + | '4', d5_0 + | '5', d5_3 + | '6', d5_6 + | '7', d5_9 + | '8', d5_2 + | '9', d5_5 + ). + +{ d4_9: fourth digit, current running sum is 9. } + +-d4_9 = '-'?, + ( '0', d5_9 + | '1', d5_2 + | '2', d5_5 + | '3', d5_8 + | '4', d5_1 + | '5', d5_4 + | '6', d5_7 + | '7', d5_0 + | '8', d5_3 + | '9', d5_6 + ). + + +{ d5_x: fifth digit, x is running sum, add 1 * digit } + +-d5_0 = '-'?, ('0', d6_0 | '1', d6_1 | '2', d6_2 | '3', d6_3 | '4', d6_4 + | '5', d6_5 | '6', d6_6 | '7', d6_7 | '8', d6_8 | '9', d6_9). +-d5_1 = '-'?, ('0', d6_1 | '1', d6_2 | '2', d6_3 | '3', d6_4 | '4', d6_5 + | '5', d6_6 | '6', d6_7 | '7', d6_8 | '8', d6_9 | '9', d6_0). +-d5_2 = '-'?, ('0', d6_2 | '1', d6_3 | '2', d6_4 | '3', d6_5 | '4', d6_6 + | '5', d6_7 | '6', d6_8 | '7', d6_9 | '8', d6_0 | '9', d6_1). +-d5_3 = '-'?, ('0', d6_3 | '1', d6_4 | '2', d6_5 | '3', d6_6 | '4', d6_7 + | '5', d6_8 | '6', d6_9 | '7', d6_0 | '8', d6_1 | '9', d6_2). +-d5_4 = '-'?, ('0', d6_4 | '1', d6_5 | '2', d6_6 | '3', d6_7 | '4', d6_8 + | '5', d6_9 | '6', d6_0 | '7', d6_1 | '8', d6_2 | '9', d6_3). +-d5_5 = '-'?, ('0', d6_5 | '1', d6_6 | '2', d6_7 | '3', d6_8 | '4', d6_9 + | '5', d6_0 | '6', d6_1 | '7', d6_2 | '8', d6_3 | '9', d6_4). +-d5_6 = '-'?, ('0', d6_6 | '1', d6_7 | '2', d6_8 | '3', d6_9 | '4', d6_0 + | '5', d6_1 | '6', d6_2 | '7', d6_3 | '8', d6_4 | '9', d6_5). +-d5_7 = '-'?, ('0', d6_7 | '1', d6_8 | '2', d6_9 | '3', d6_0 | '4', d6_1 + | '5', d6_2 | '6', d6_3 | '7', d6_4 | '8', d6_5 | '9', d6_6). +-d5_8 = '-'?, ('0', d6_8 | '1', d6_9 | '2', d6_0 | '3', d6_1 | '4', d6_2 + | '5', d6_3 | '6', d6_4 | '7', d6_5 | '8', d6_6 | '9', d6_7). +-d5_9 = '-'?, ('0', d6_9 | '1', d6_0 | '2', d6_1 | '3', d6_2 | '4', d6_3 + | '5', d6_4 | '6', d6_5 | '7', d6_6 | '8', d6_7 | '9', d6_8). + + +{ d6_x: sixth digit, x is running sum, add 3 * digit } + +-d6_0 = '-'?, ('0', d7_0 | '1', d7_3 | '2', d7_6 | '3', d7_9 | '4', d7_2 + | '5', d7_5 | '6', d7_8 | '7', d7_1 | '8', d7_4 | '9', d7_7). +-d6_1 = '-'?, ('0', d7_1 | '1', d7_4 | '2', d7_7 | '3', d7_0 | '4', d7_3 + | '5', d7_6 | '6', d7_9 | '7', d7_2 | '8', d7_5 | '9', d7_8). +-d6_2 = '-'?, ('0', d7_2 | '1', d7_5 | '2', d7_8 | '3', d7_1 | '4', d7_4 + | '5', d7_7 | '6', d7_0 | '7', d7_3 | '8', d7_6 | '9', d7_9). +-d6_3 = '-'?, ('0', d7_3 | '1', d7_6 | '2', d7_9 | '3', d7_2 | '4', d7_5 + | '5', d7_8 | '6', d7_1 | '7', d7_4 | '8', d7_7 | '9', d7_0). +-d6_4 = '-'?, ('0', d7_4 | '1', d7_7 | '2', d7_0 | '3', d7_3 | '4', d7_6 + | '5', d7_9 | '6', d7_2 | '7', d7_5 | '8', d7_8 | '9', d7_1). +-d6_5 = '-'?, ('0', d7_5 | '1', d7_8 | '2', d7_1 | '3', d7_4 | '4', d7_7 + | '5', d7_0 | '6', d7_3 | '7', d7_6 | '8', d7_9 | '9', d7_2). +-d6_6 = '-'?, ('0', d7_6 | '1', d7_9 | '2', d7_2 | '3', d7_5 | '4', d7_8 + | '5', d7_1 | '6', d7_4 | '7', d7_7 | '8', d7_0 | '9', d7_3). +-d6_7 = '-'?, ('0', d7_7 | '1', d7_0 | '2', d7_3 | '3', d7_6 | '4', d7_9 + | '5', d7_2 | '6', d7_5 | '7', d7_8 | '8', d7_1 | '9', d7_4). +-d6_8 = '-'?, ('0', d7_8 | '1', d7_1 | '2', d7_4 | '3', d7_7 | '4', d7_0 + | '5', d7_3 | '6', d7_6 | '7', d7_9 | '8', d7_2 | '9', d7_5). +-d6_9 = '-'?, ('0', d7_9 | '1', d7_2 | '2', d7_5 | '3', d7_8 | '4', d7_1 + | '5', d7_4 | '6', d7_7 | '7', d7_0 | '8', d7_3 | '9', d7_6). + + +{ d7_x: seventh digit, x is running sum, add 1 * digit } + +-d7_0 = '-'?, ('0', d8_0 | '1', d8_1 | '2', d8_2 | '3', d8_3 | '4', d8_4 + | '5', d8_5 | '6', d8_6 | '7', d8_7 | '8', d8_8 | '9', d8_9). +-d7_1 = '-'?, ('0', d8_1 | '1', d8_2 | '2', d8_3 | '3', d8_4 | '4', d8_5 + | '5', d8_6 | '6', d8_7 | '7', d8_8 | '8', d8_9 | '9', d8_0). +-d7_2 = '-'?, ('0', d8_2 | '1', d8_3 | '2', d8_4 | '3', d8_5 | '4', d8_6 + | '5', d8_7 | '6', d8_8 | '7', d8_9 | '8', d8_0 | '9', d8_1). +-d7_3 = '-'?, ('0', d8_3 | '1', d8_4 | '2', d8_5 | '3', d8_6 | '4', d8_7 + | '5', d8_8 | '6', d8_9 | '7', d8_0 | '8', d8_1 | '9', d8_2). +-d7_4 = '-'?, ('0', d8_4 | '1', d8_5 | '2', d8_6 | '3', d8_7 | '4', d8_8 + | '5', d8_9 | '6', d8_0 | '7', d8_1 | '8', d8_2 | '9', d8_3). +-d7_5 = '-'?, ('0', d8_5 | '1', d8_6 | '2', d8_7 | '3', d8_8 | '4', d8_9 + | '5', d8_0 | '6', d8_1 | '7', d8_2 | '8', d8_3 | '9', d8_4). +-d7_6 = '-'?, ('0', d8_6 | '1', d8_7 | '2', d8_8 | '3', d8_9 | '4', d8_0 + | '5', d8_1 | '6', d8_2 | '7', d8_3 | '8', d8_4 | '9', d8_5). +-d7_7 = '-'?, ('0', d8_7 | '1', d8_8 | '2', d8_9 | '3', d8_0 | '4', d8_1 + | '5', d8_2 | '6', d8_3 | '7', d8_4 | '8', d8_5 | '9', d8_6). +-d7_8 = '-'?, ('0', d8_8 | '1', d8_9 | '2', d8_0 | '3', d8_1 | '4', d8_2 + | '5', d8_3 | '6', d8_4 | '7', d8_5 | '8', d8_6 | '9', d8_7). +-d7_9 = '-'?, ('0', d8_9 | '1', d8_0 | '2', d8_1 | '3', d8_2 | '4', d8_3 + | '5', d8_4 | '6', d8_5 | '7', d8_6 | '8', d8_7 | '9', d8_8). + + +{ d8_x: eigth digit, x is running sum, add 3 * digit } + +-d8_0 = '-'?, ('0', d9_0 | '1', d9_3 | '2', d9_6 | '3', d9_9 | '4', d9_2 + | '5', d9_5 | '6', d9_8 | '7', d9_1 | '8', d9_4 | '9', d9_7). +-d8_1 = '-'?, ('0', d9_1 | '1', d9_4 | '2', d9_7 | '3', d9_0 | '4', d9_3 + | '5', d9_6 | '6', d9_9 | '7', d9_2 | '8', d9_5 | '9', d9_8). +-d8_2 = '-'?, ('0', d9_2 | '1', d9_5 | '2', d9_8 | '3', d9_1 | '4', d9_4 + | '5', d9_7 | '6', d9_0 | '7', d9_3 | '8', d9_6 | '9', d9_9). +-d8_3 = '-'?, ('0', d9_3 | '1', d9_6 | '2', d9_9 | '3', d9_2 | '4', d9_5 + | '5', d9_8 | '6', d9_1 | '7', d9_4 | '8', d9_7 | '9', d9_0). +-d8_4 = '-'?, ('0', d9_4 | '1', d9_7 | '2', d9_0 | '3', d9_3 | '4', d9_6 + | '5', d9_9 | '6', d9_2 | '7', d9_5 | '8', d9_8 | '9', d9_1). +-d8_5 = '-'?, ('0', d9_5 | '1', d9_8 | '2', d9_1 | '3', d9_4 | '4', d9_7 + | '5', d9_0 | '6', d9_3 | '7', d9_6 | '8', d9_9 | '9', d9_2). +-d8_6 = '-'?, ('0', d9_6 | '1', d9_9 | '2', d9_2 | '3', d9_5 | '4', d9_8 + | '5', d9_1 | '6', d9_4 | '7', d9_7 | '8', d9_0 | '9', d9_3). +-d8_7 = '-'?, ('0', d9_7 | '1', d9_0 | '2', d9_3 | '3', d9_6 | '4', d9_9 + | '5', d9_2 | '6', d9_5 | '7', d9_8 | '8', d9_1 | '9', d9_4). +-d8_8 = '-'?, ('0', d9_8 | '1', d9_1 | '2', d9_4 | '3', d9_7 | '4', d9_0 + | '5', d9_3 | '6', d9_6 | '7', d9_9 | '8', d9_2 | '9', d9_5). +-d8_9 = '-'?, ('0', d9_9 | '1', d9_2 | '2', d9_5 | '3', d9_8 | '4', d9_1 + | '5', d9_4 | '6', d9_7 | '7', d9_0 | '8', d9_3 | '9', d9_6). + + +{ d9_x: ninth digit, x is running sum, add 1 * digit } + +-d9_0 = '-'?, ('0', dA_0 | '1', dA_1 | '2', dA_2 | '3', dA_3 | '4', dA_4 + | '5', dA_5 | '6', dA_6 | '7', dA_7 | '8', dA_8 | '9', dA_9). +-d9_1 = '-'?, ('0', dA_1 | '1', dA_2 | '2', dA_3 | '3', dA_4 | '4', dA_5 + | '5', dA_6 | '6', dA_7 | '7', dA_8 | '8', dA_9 | '9', dA_0). +-d9_2 = '-'?, ('0', dA_2 | '1', dA_3 | '2', dA_4 | '3', dA_5 | '4', dA_6 + | '5', dA_7 | '6', dA_8 | '7', dA_9 | '8', dA_0 | '9', dA_1). +-d9_3 = '-'?, ('0', dA_3 | '1', dA_4 | '2', dA_5 | '3', dA_6 | '4', dA_7 + | '5', dA_8 | '6', dA_9 | '7', dA_0 | '8', dA_1 | '9', dA_2). +-d9_4 = '-'?, ('0', dA_4 | '1', dA_5 | '2', dA_6 | '3', dA_7 | '4', dA_8 + | '5', dA_9 | '6', dA_0 | '7', dA_1 | '8', dA_2 | '9', dA_3). +-d9_5 = '-'?, ('0', dA_5 | '1', dA_6 | '2', dA_7 | '3', dA_8 | '4', dA_9 + | '5', dA_0 | '6', dA_1 | '7', dA_2 | '8', dA_3 | '9', dA_4). +-d9_6 = '-'?, ('0', dA_6 | '1', dA_7 | '2', dA_8 | '3', dA_9 | '4', dA_0 + | '5', dA_1 | '6', dA_2 | '7', dA_3 | '8', dA_4 | '9', dA_5). +-d9_7 = '-'?, ('0', dA_7 | '1', dA_8 | '2', dA_9 | '3', dA_0 | '4', dA_1 + | '5', dA_2 | '6', dA_3 | '7', dA_4 | '8', dA_5 | '9', dA_6). +-d9_8 = '-'?, ('0', dA_8 | '1', dA_9 | '2', dA_0 | '3', dA_1 | '4', dA_2 + | '5', dA_3 | '6', dA_4 | '7', dA_5 | '8', dA_6 | '9', dA_7). +-d9_9 = '-'?, ('0', dA_9 | '1', dA_0 | '2', dA_1 | '3', dA_2 | '4', dA_3 + | '5', dA_4 | '6', dA_5 | '7', dA_6 | '8', dA_7 | '9', dA_8). + + +{ dA_x: tenth digit, x is running sum, add 3 * digit } + +-dA_0 = '-'?, ('0', dB_0 | '1', dB_3 | '2', dB_6 | '3', dB_9 | '4', dB_2 + | '5', dB_5 | '6', dB_8 | '7', dB_1 | '8', dB_4 | '9', dB_7). +-dA_1 = '-'?, ('0', dB_1 | '1', dB_4 | '2', dB_7 | '3', dB_0 | '4', dB_3 + | '5', dB_6 | '6', dB_9 | '7', dB_2 | '8', dB_5 | '9', dB_8). +-dA_2 = '-'?, ('0', dB_2 | '1', dB_5 | '2', dB_8 | '3', dB_1 | '4', dB_4 + | '5', dB_7 | '6', dB_0 | '7', dB_3 | '8', dB_6 | '9', dB_9). +-dA_3 = '-'?, ('0', dB_3 | '1', dB_6 | '2', dB_9 | '3', dB_2 | '4', dB_5 + | '5', dB_8 | '6', dB_1 | '7', dB_4 | '8', dB_7 | '9', dB_0). +-dA_4 = '-'?, ('0', dB_4 | '1', dB_7 | '2', dB_0 | '3', dB_3 | '4', dB_6 + | '5', dB_9 | '6', dB_2 | '7', dB_5 | '8', dB_8 | '9', dB_1). +-dA_5 = '-'?, ('0', dB_5 | '1', dB_8 | '2', dB_1 | '3', dB_4 | '4', dB_7 + | '5', dB_0 | '6', dB_3 | '7', dB_6 | '8', dB_9 | '9', dB_2). +-dA_6 = '-'?, ('0', dB_6 | '1', dB_9 | '2', dB_2 | '3', dB_5 | '4', dB_8 + | '5', dB_1 | '6', dB_4 | '7', dB_7 | '8', dB_0 | '9', dB_3). +-dA_7 = '-'?, ('0', dB_7 | '1', dB_0 | '2', dB_3 | '3', dB_6 | '4', dB_9 + | '5', dB_2 | '6', dB_5 | '7', dB_8 | '8', dB_1 | '9', dB_4). +-dA_8 = '-'?, ('0', dB_8 | '1', dB_1 | '2', dB_4 | '3', dB_7 | '4', dB_0 + | '5', dB_3 | '6', dB_6 | '7', dB_9 | '8', dB_2 | '9', dB_5). +-dA_9 = '-'?, ('0', dB_9 | '1', dB_2 | '2', dB_5 | '3', dB_8 | '4', dB_1 + | '5', dB_4 | '6', dB_7 | '7', dB_0 | '8', dB_3 | '9', dB_6). + + +{ dB: eleventh digit, x is running sum, add 1 * digit } + +-dB_0 = '-'?, ('0', dC_0 | '1', dC_1 | '2', dC_2 | '3', dC_3 | '4', dC_4 + | '5', dC_5 | '6', dC_6 | '7', dC_7 | '8', dC_8 | '9', dC_9). +-dB_1 = '-'?, ('0', dC_1 | '1', dC_2 | '2', dC_3 | '3', dC_4 | '4', dC_5 + | '5', dC_6 | '6', dC_7 | '7', dC_8 | '8', dC_9 | '9', dC_0). +-dB_2 = '-'?, ('0', dC_2 | '1', dC_3 | '2', dC_4 | '3', dC_5 | '4', dC_6 + | '5', dC_7 | '6', dC_8 | '7', dC_9 | '8', dC_0 | '9', dC_1). +-dB_3 = '-'?, ('0', dC_3 | '1', dC_4 | '2', dC_5 | '3', dC_6 | '4', dC_7 + | '5', dC_8 | '6', dC_9 | '7', dC_0 | '8', dC_1 | '9', dC_2). +-dB_4 = '-'?, ('0', dC_4 | '1', dC_5 | '2', dC_6 | '3', dC_7 | '4', dC_8 + | '5', dC_9 | '6', dC_0 | '7', dC_1 | '8', dC_2 | '9', dC_3). +-dB_5 = '-'?, ('0', dC_5 | '1', dC_6 | '2', dC_7 | '3', dC_8 | '4', dC_9 + | '5', dC_0 | '6', dC_1 | '7', dC_2 | '8', dC_3 | '9', dC_4). +-dB_6 = '-'?, ('0', dC_6 | '1', dC_7 | '2', dC_8 | '3', dC_9 | '4', dC_0 + | '5', dC_1 | '6', dC_2 | '7', dC_3 | '8', dC_4 | '9', dC_5). +-dB_7 = '-'?, ('0', dC_7 | '1', dC_8 | '2', dC_9 | '3', dC_0 | '4', dC_1 + | '5', dC_2 | '6', dC_3 | '7', dC_4 | '8', dC_5 | '9', dC_6). +-dB_8 = '-'?, ('0', dC_8 | '1', dC_9 | '2', dC_0 | '3', dC_1 | '4', dC_2 + | '5', dC_3 | '6', dC_4 | '7', dC_5 | '8', dC_6 | '9', dC_7). +-dB_9 = '-'?, ('0', dC_9 | '1', dC_0 | '2', dC_1 | '3', dC_2 | '4', dC_3 + | '5', dC_4 | '6', dC_5 | '7', dC_6 | '8', dC_7 | '9', dC_8). + + +{ dC: 12th digit. Hand edit needed ... } + +-dC_0 = '-'?, ('0', dD_0 | '1', dD_3 | '2', dD_6 | '3', dD_9 | '4', dD_2 + | '5', dD_5 | '6', dD_8 | '7', dD_1 | '8', dD_4 | '9', dD_7). +-dC_1 = '-'?, ('0', dD_1 | '1', dD_4 | '2', dD_7 | '3', dD_0 | '4', dD_3 + | '5', dD_6 | '6', dD_9 | '7', dD_2 | '8', dD_5 | '9', dD_8). +-dC_2 = '-'?, ('0', dD_2 | '1', dD_5 | '2', dD_8 | '3', dD_1 | '4', dD_4 + | '5', dD_7 | '6', dD_0 | '7', dD_3 | '8', dD_6 | '9', dD_9). +-dC_3 = '-'?, ('0', dD_3 | '1', dD_6 | '2', dD_9 | '3', dD_2 | '4', dD_5 + | '5', dD_8 | '6', dD_1 | '7', dD_4 | '8', dD_7 | '9', dD_0). +-dC_4 = '-'?, ('0', dD_4 | '1', dD_7 | '2', dD_0 | '3', dD_3 | '4', dD_6 + | '5', dD_9 | '6', dD_2 | '7', dD_5 | '8', dD_8 | '9', dD_1). +-dC_5 = '-'?, ('0', dD_5 | '1', dD_8 | '2', dD_1 | '3', dD_4 | '4', dD_7 + | '5', dD_0 | '6', dD_3 | '7', dD_6 | '8', dD_9 | '9', dD_2). +-dC_6 = '-'?, ('0', dD_6 | '1', dD_9 | '2', dD_2 | '3', dD_5 | '4', dD_8 + | '5', dD_1 | '6', dD_4 | '7', dD_7 | '8', dD_0 | '9', dD_3). +-dC_7 = '-'?, ('0', dD_7 | '1', dD_0 | '2', dD_3 | '3', dD_6 | '4', dD_9 + | '5', dD_2 | '6', dD_5 | '7', dD_8 | '8', dD_1 | '9', dD_4). +-dC_8 = '-'?, ('0', dD_8 | '1', dD_1 | '2', dD_4 | '3', dD_7 | '4', dD_0 + | '5', dD_3 | '6', dD_6 | '7', dD_9 | '8', dD_2 | '9', dD_5). +-dC_9 = '-'?, ('0', dD_9 | '1', dD_2 | '2', dD_5 | '3', dD_8 | '4', dD_1 + | '5', dD_4 | '6', dD_7 | '7', dD_0 | '8', dD_3 | '9', dD_6). + +{ dD: 13th digit. This is the check digit. } + +-dD_0 = '-'?, '0'. +-dD_1 = '-'?, '9'. +-dD_2 = '-'?, '8'. +-dD_3 = '-'?, '7'. +-dD_4 = '-'?, '6'. +-dD_5 = '-'?, '5'. +-dD_6 = '-'?, '4'. +-dD_7 = '-'?, '3'. +-dD_8 = '-'?, '2'. +-dD_9 = '-'?, '1'. diff --git a/samples/README.md b/samples/README.md new file mode 100644 index 00000000..d9fe9cb0 --- /dev/null +++ b/samples/README.md @@ -0,0 +1,30 @@ +* Samples directory + +This directory contains a collection of ixml grammars for various +languages or notations for which some more or less authoritative +grammar or syntax description is available. + +These grammars are offered as illustrations of ixml which may be +useful in real applications, and due care has been exercised in +preparing them, but no guarantees of accuracy or fitness for purpose +are offered. + +Note that it is not always possible for an ixml grammar to match a +published language perfectly: many published language descriptions +assume a lexical scanner (which may for example distinguish +identifiers from reserved words), and some may require ad-hoc checks +that are not feasible in a pure context-free grammar. So do not +assume without checking that the language accepted by the ixml grammar +here matches exactly the language defined by the relevant source. + +Grammars in this directory include: + +* ISBN.ixml: a grammar for International Standard Book Numbers and + International Standard Serial numbers that checks to make sure the + check digit is correct. (Currently only ISBN-13; ISBN-10 and ISSN + coming soon.) + +* ABNF.ixml: an ixml version of the grammar notation used in IETF + Requests for Comment, as defined in RFC. (Coming real soon now.) + + From 86d1c6ce9e4043cff095a3701cd93ee194a9081c Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Tue, 15 Feb 2022 21:03:50 -0700 Subject: [PATCH 105/152] Add ABNF.ixml --- samples/ABNF.ixml | 127 ++++++++++++++++++++++++++++++++++++++++++++++ samples/README.md | 2 +- 2 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 samples/ABNF.ixml diff --git a/samples/ABNF.ixml b/samples/ABNF.ixml new file mode 100644 index 00000000..d8830819 --- /dev/null +++ b/samples/ABNF.ixml @@ -0,0 +1,127 @@ +{ The grammar notation defined by RFC 5234, "Augmented BNF for Syntax +Specifications: ABNF", ed. D. Crocker and P. Overell, January 2008. + +The nonterminals used here are those of RFC 5234, but some definitions +have been reformulated to use ixml idioms. The definition of ABNF has +no analogue to ixml marks for guiding XML serialization; the marks +used here have been supplied by the transcriber. + +Transcribed into ixml by C. M. Sperberg-McQueen, February 2022. } + +rulelist = (rule | (c-wsp*, c-nl))+. + +rule = rulename, defined-as, elements, c-nl. + { continues if next line starts + with white space } + +rulename = ALPHA, (ALPHA | DIGIT | "-")*. + +defined-as = c-wsp*, ("=" | "=/"), c-wsp*. + { basic rules definition and + incremental alternatives } + +elements = alternation, c-wsp*. + +c-wsp = WSP | (c-nl, WSP). + +c-nl = comment | CRLF. { comment or newline } + +comment = ";", (WSP | VCHAR)* CRLF. + +alternation = concatenation * (c-wsp*, "/", c-wsp). + +concatenation = repetition * (c-wsp+). + +repetition = repeat?, element. + +repeat = DIGIT+ | (DIGIT*, "*", DIGIT*). + +element = rulename | group | option + | char-val | num-val | prose-val. + +group = "(", c-wsp*, alternation, c-wsp*, ")". + +option = "[", c-wsp*, alternation, c-wsp*, "]". + +char-val = DQUOTE, [#20 - #21; #23 - #7E]*, DQUOTE. + { quoted string of SP and VCHAR + without DQUOTE } + +num-val = "%", (bin-val | dec-val | hex-val). + +bin-val = "b", BIT+, ((".", bit+)+ | ("-", BIT+))?. + { series of concatenated bit values + or single ONEOF range } + +dec-val = "d", DIGIT+, ((".", DIGIT+)+ | ("-", DIGIT+))?. + +hex-val = "x", HEXDIG+, ((".", HEXDIG+)+ | ("-", HEXDIG+))?. + +prose-val = "<", [#20 - #3D; #3F - #7E]*, ">". + { bracketed string of SP and VCHAR + without angles + prose description, to be used as + last resort } + +{ 'Core rules' from Appendix B, intended for re-use. } + +ALPHA = ["A"-"Z"; "a"-"z"]. { #41-#5A; #61-#7A } + +BIT = "0"; "1". + +CR = #0D. { carriage return } + +CRLF = CR, LF. { Internet standard newline } + +DIGIT = ["0"-"9"]. { #30 - #39 } + +DQUOTE = #22. { (Double Quote) } + +HEXDIG = DIGIT; ["A"-"F"]. + +HTAB = #09. { horizontal tab } + +LF = #0A. { linefeed } + +SP = #20. + +VCHAR = [#21 - #7E]. { visible (printing) characters } + +WSP = SP | HTAB. { white space } + +{ Included in Appendix B for reuse elsewhere, but not used +by ABNF itself: } + +{ + +CHAR = [#01 - #7F]. + { Any 7-bit US-ASCII chracter, + excluding NUL } + +CTL = [#00 - #1F; #7F]. { controls } + +LWSP = (WSP | CRLF, WSP)*. + { Use of this linear-white-space rule + permits lines containing only white + space that are no longer legal in + mail headers and have caused + interoperability problems in other + contexts. + Do not use when defining mail + headers and use with caution in + other contexts. } + +OCTET = [#00 - #FF]. { 8 bits of data } + +} + + +{ Notes: + +- As noted in the comments, this grammar has been reported ambiguous + in a couple of places. + +- ABNF nonterminals are case-insensitive unless specified using + numeric values for the characters. + +} diff --git a/samples/README.md b/samples/README.md index d9fe9cb0..11b69ee3 100644 --- a/samples/README.md +++ b/samples/README.md @@ -1,4 +1,4 @@ -* Samples directory +# Samples directory This directory contains a collection of ixml grammars for various languages or notations for which some more or less authoritative From 8140e3d8f83b7c2ecdc7d06db3e1517c27659787 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Wed, 16 Feb 2022 06:21:21 -0700 Subject: [PATCH 106/152] Move individual grammars into subdirectories --- samples/{ => ABNF}/ABNF.ixml | 0 samples/{ => ISBN}/ISBN.ixml | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename samples/{ => ABNF}/ABNF.ixml (100%) rename samples/{ => ISBN}/ISBN.ixml (100%) diff --git a/samples/ABNF.ixml b/samples/ABNF/ABNF.ixml similarity index 100% rename from samples/ABNF.ixml rename to samples/ABNF/ABNF.ixml diff --git a/samples/ISBN.ixml b/samples/ISBN/ISBN.ixml similarity index 100% rename from samples/ISBN.ixml rename to samples/ISBN/ISBN.ixml From 52d6e63e48f2b53da8868bb6d1763b9c0a43d36b Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Wed, 16 Feb 2022 08:16:02 -0700 Subject: [PATCH 107/152] Make a readme file describing the ISBN grammar. --- samples/ISBN/ISBN.ixml | 22 ++++---- samples/ISBN/README.md | 99 ++++++++++++++++++++++++++++++++++ samples/ISBN/fsa-3.dot | 16 ++++++ samples/ISBN/fsa-3.dot.png | Bin 0 -> 33856 bytes samples/ISBN/fsa-3.dot.svg | 106 +++++++++++++++++++++++++++++++++++++ samples/README.md | 6 +-- 6 files changed, 236 insertions(+), 13 deletions(-) create mode 100644 samples/ISBN/README.md create mode 100644 samples/ISBN/fsa-3.dot create mode 100644 samples/ISBN/fsa-3.dot.png create mode 100644 samples/ISBN/fsa-3.dot.svg diff --git a/samples/ISBN/ISBN.ixml b/samples/ISBN/ISBN.ixml index 5c0b81ab..6c24e948 100644 --- a/samples/ISBN/ISBN.ixml +++ b/samples/ISBN/ISBN.ixml @@ -254,13 +254,15 @@ isbn-13 = '978', d4_8; '979', d4_9. { dD: 13th digit. This is the check digit. } --dD_0 = '-'?, '0'. --dD_1 = '-'?, '9'. --dD_2 = '-'?, '8'. --dD_3 = '-'?, '7'. --dD_4 = '-'?, '6'. --dD_5 = '-'?, '5'. --dD_6 = '-'?, '4'. --dD_7 = '-'?, '3'. --dD_8 = '-'?, '2'. --dD_9 = '-'?, '1'. +-dD_0 = '-'?, '0', ok. +-dD_1 = '-'?, '9', ok. +-dD_2 = '-'?, '8', ok. +-dD_3 = '-'?, '7', ok. +-dD_4 = '-'?, '6', ok. +-dD_5 = '-'?, '5', ok. +-dD_6 = '-'?, '4', ok. +-dD_7 = '-'?, '3', ok. +-dD_8 = '-'?, '2', ok. +-dD_9 = '-'?, '1', ok. + +-ok = (). \ No newline at end of file diff --git a/samples/ISBN/README.md b/samples/ISBN/README.md new file mode 100644 index 00000000..92d4e280 --- /dev/null +++ b/samples/ISBN/README.md @@ -0,0 +1,99 @@ +# International Standard Book Numbers + +International Standard Book Numbers (ISBNs) are, at one level, quite +simple: in their current form they are strings of 13 digits, with +optional hyphens marking the boundaries between segments of the +number. The final digit is a check digit which helps make sure that +the rest of the number has been given correctly. + +Since the segments for the registration authority (usually a national +or regional body which manages a registry of publishers), the +registrant (usually a publisher), and publication (the book being +identified) are all variable in length, getting the hyphens in the +right positions is tricky and requires knowledge of what numbers have +been asssigned in different registries. Like most tools for checking +ISBNs, this grammar makes no pretense of checking that the hyphens are +in the right places, or even that there are the expected number (none, +or four, if I understand the rules right). + +The check digit is used to enable a simple form of validation for +ISBNs. Each digit in the number is assigned a weight: one for the +first, third, and other odd-nmbered digits, three for the +even-numbered digits. If each digit in the ISBN is multipled by its +weight (1 or 3, in alternation) and the results are added together, +the sum must be evenly divisible by ten, or else the ISBN is not +valid. + +For example, the ISBN 9781441919014 can be validated as follows: + + 9 * 1 + + 7 * 3 + + 8 * 1 + + 1 * 3 + + 4 * 1 + + 4 * 3 + + 1 * 1 + + 9 * 3 + + 1 * 1 + + 9 * 3 + + 0 * 1 + + 1 * 3 + + 4 + 1 + _______ + + = 120 + +Since 120 is evenly divisible by 10, the number is valid. + +Alternatively, given the first 12 digits of the ISBN, the check digit +for an ISBN-13 number can be calculated as follows: multiply the first +twelve digits of the number by their weights, sum the resulting +numbers, discard all but the last digit, subtract that last digit from +10, and take the last digit from the result (i.e. if the result is 10, +use zero). The resulting single-digit number is the correct check +digit. + +The obvious way to do this is with a simple program, so it may be +surprising that in fact the set of thirteen-digit numbers with a +correct check digit is a regular language and can be described either +with a (rather large) regular expression or with a finite state +automaton. + +The basic principle is perhaps most easily seen with a simpler +example: here is a finite state automaton which recognizes base-10 +numerals which are evenly divisible by three: + +![FSA recognizing numerals divisible by three](fsa-3.png) + +The FSA recognizes the numeral "12", for example, by starting in state +0, going to state 1 on the first digit by following the arc labeled +"1", then going back to state 0 on the second digit by following the +arc labeled "2". + +An FSA to keep track of divisibility by any given modulus (e.g. 10 for +ISBN-13 numbers, 11 for ISBN-10 numbers and ISSNs) will have more +states but is otherwise similar. If we must multiply the next digit +by a weight, the labels on the arcs will be different and we will need +more states to keep track of which weight to use next, but again the +principles are similar. For ISBN-13 numbers, which use a modulus of +10 and two alternating weights, an FSA of twenty states would suffice, +except that we also need to count the digits: the first and the fifth +digit of the ISBN may use the same weight, but our grammar needs to +keep them distinct. + +Any finite state automaton can be turned into a context-free grammar +in which each rule has a single nonterminal (a state name) on the left +hand side, and one or more right-hand sides each of which is either +empty or has the form *t, N*, where *t* is a terminal symbol and *N* +is the next state. Rules of the form *N1 = t N2* correspond to a +transition from state *N1* to state *N2* on symbol *t* in the finite +state automaton; an empty right-hand side signals that the state is a +final (or: accept) state. + +The grammar in ISBN.ixml can thus be read as a relatively +straightforward description of a finite state automaton to recognize +valid ISBN-13 numbers (with some complications to allow hyphens to +occur). In addition to any practical utility it may have, it +illustrates the use of ixml to describe finite state automata, and the +use of finite state automata to perform modular arithmetic +calculations. diff --git a/samples/ISBN/fsa-3.dot b/samples/ISBN/fsa-3.dot new file mode 100644 index 00000000..1b517ccb --- /dev/null +++ b/samples/ISBN/fsa-3.dot @@ -0,0 +1,16 @@ +digraph divisible_by_3 { + start [peripheries=0]; + 0 [peripheries=2]; 1; 2; + start -> 0; + 0 -> 0 [label="0, 3, 6, 9"]; + 0 -> 1 [label="1, 4, 7"]; + 0 -> 2 [label="2, 5, 8"]; + + 1 -> 1 [label="0, 3, 6, 9"]; + 1 -> 2 [label="1, 4, 7"]; + 1 -> 0 [label="2, 5, 8"]; + + 2 -> 2 [label="0, 3, 6, 9"]; + 2 -> 0 [label="1, 4, 7"]; + 2 -> 1 [label="2, 5, 8"]; +} \ No newline at end of file diff --git a/samples/ISBN/fsa-3.dot.png b/samples/ISBN/fsa-3.dot.png new file mode 100644 index 0000000000000000000000000000000000000000..84e4aee8c9dfa5ab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6Y{jPfXlN~SQ6>lgS`9D(j{EQGz z1#pOA$Ql|`^x(9X+;1wZ8x*lyvGxnCa|xVW?0&8=lh9!3h=Kb0llwK`nL6ZvPBw7BJfA7CadDFAEVjy$lZebDhg|=|M@$8D6LMXh zT8RUm0My&Ir&`Uw`U5oVzbwVTapPvCp^iU$;LAtDl>}8d-Q84u`Fy$~l(+gS957bE zEC-qR7)ty1**;zG+1n59KYae!s0KMH@&BCXm9R^-74dXu{OPW)t~dRsP^~%TjGhOU zQEW0uz;N;KxRTqwWRQV@E{Z&f<`is6hCtuDIjQFt`Mo$q!bl>454vmS-2#$MB3peL zZAbr%;i!f)(AzvdJuk!XkNC+(c5K8BB$DjrCM_OQNv^i_9!MDa$VfCI{YVty{K6jj zY0)UIniZX>WOjIY^%L^IlDo@^f5n~ZX?DC<#2~(ZJW?0 zQ-HRELFo<|qQ)^wgQ;Wu`sve@+@Erdt~gn4OjjtBFW64DbScy_u|LDAS3|DO*^Y&* zH(5Il_L*N%uF<@>B4@ixBtyVd?L0!gwOs%&N6(Aq>8jGz91`y#WJMA+RQ*9QrbSkI*scPy>9U%iYKP zmM{`l7?lm~wwvDj1ZgOfS90j_WG*HQiExp{-Hp>oJY`~Q<-3Ig{}v-+rnzyjUps_e z{~}W%BdnU-uq^@>Dv#Vek(PQay&YdEy*olTxy@NV4}t^pF=IsW2kSEJo=W`k$CNe{ zZ6PQzVF!SogL&q91_pLH&1xMYaou`n?_T z<(fO{^%t3T?PU!~b!EWVO_|31`NB%szIZbSULLB3DRVdBiE?!z5Wr{OQ7P!sKhx lTCKn<&5Hk)ZD##xg3rc0iytg%Dir*&wVFEl$VAUg{|}Qp$fN)O literal 0 HcmV?d00001 diff --git a/samples/ISBN/fsa-3.dot.svg b/samples/ISBN/fsa-3.dot.svg new file mode 100644 index 00000000..ab2931c1 --- /dev/null +++ b/samples/ISBN/fsa-3.dot.svg @@ -0,0 +1,106 @@ + + + + + + +divisible_by_3 + + + +start +start + + + +0 + + +0 + + + +start->0 + + + + + +0->0 + + +0, 3, 6, 9 + + + +1 + +1 + + + +0->1 + + +1, 4, 7 + + + +2 + +2 + + + +0->2 + + +2, 5, 8 + + + +1->0 + + +2, 5, 8 + + + +1->1 + + +0, 3, 6, 9 + + + +1->2 + + +1, 4, 7 + + + +2->0 + + +1, 4, 7 + + + +2->1 + + +2, 5, 8 + + + +2->2 + + +0, 3, 6, 9 + + + diff --git a/samples/README.md b/samples/README.md index 11b69ee3..6c917601 100644 --- a/samples/README.md +++ b/samples/README.md @@ -17,14 +17,14 @@ that are not feasible in a pure context-free grammar. So do not assume without checking that the language accepted by the ixml grammar here matches exactly the language defined by the relevant source. -Grammars in this directory include: +Samples in this directory include: -* ISBN.ixml: a grammar for International Standard Book Numbers and +* ISBN: a grammar for International Standard Book Numbers and International Standard Serial numbers that checks to make sure the check digit is correct. (Currently only ISBN-13; ISBN-10 and ISSN coming soon.) -* ABNF.ixml: an ixml version of the grammar notation used in IETF +* ABNF: an ixml version of the grammar notation used in IETF Requests for Comment, as defined in RFC. (Coming real soon now.) From c8c7290940ca710c82267371c6ff80ea19673410 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Wed, 16 Feb 2022 08:19:55 -0700 Subject: [PATCH 108/152] Fight a little with markdown --- samples/ISBN/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/ISBN/README.md b/samples/ISBN/README.md index 92d4e280..5d8325d9 100644 --- a/samples/ISBN/README.md +++ b/samples/ISBN/README.md @@ -25,7 +25,7 @@ the sum must be evenly divisible by ten, or else the ISBN is not valid. For example, the ISBN 9781441919014 can be validated as follows: - +```` 9 * 1 + 7 * 3 + 8 * 1 @@ -42,7 +42,7 @@ For example, the ISBN 9781441919014 can be validated as follows: _______ = 120 - +```` Since 120 is evenly divisible by 10, the number is valid. Alternatively, given the first 12 digits of the ISBN, the check digit @@ -63,7 +63,7 @@ The basic principle is perhaps most easily seen with a simpler example: here is a finite state automaton which recognizes base-10 numerals which are evenly divisible by three: -![FSA recognizing numerals divisible by three](fsa-3.png) +![FSA recognizing numerals divisible by three](fsa-3.dot.png) The FSA recognizes the numeral "12", for example, by starting in state 0, going to state 1 on the first digit by following the arc labeled From 314fb45ce72a82812d8785727cd86d0567a3fac7 Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Sat, 19 Feb 2022 13:04:10 +0000 Subject: [PATCH 109/152] New tests for ixml error conditions --- tests/error/test-catalog.xml | 99 ++++++++++++++++++++++++++++++++++++ tests/test-catalog.xml | 1 + 2 files changed, 100 insertions(+) create mode 100644 tests/error/test-catalog.xml diff --git a/tests/error/test-catalog.xml b/tests/error/test-catalog.xml new file mode 100644 index 00000000..baaabd6e --- /dev/null +++ b/tests/error/test-catalog.xml @@ -0,0 +1,99 @@ + + + +

Tests intended to demonstrate errors that processors are required + to raise.

+ + + + + + + +

The number is so large it’s like to exceed the processor’s + ability to represent it.

+
+ s: #decafbadbadbadbad . + + + +
+ + + + +

Exceeds the range of Unicode.

+
+ s: #ffffffff0 . + + + +
+ + + + +

Not a Unicode character.

+
+ s: #fffe . + + + +
+ + + + +

Also not a Unicode character.

+
+ s: #1fffe . + + + +
+ + + + +

A Unicode surrogate.

+
+ s: #d801 . + + + +
+ + + + +

An invalid Unicode character class.

+
+ s: [Xq] . + + + +
+ + + + +

An invalid range.

+
+ s: ['Z'-'A'] . + + + +
+ + diff --git a/tests/test-catalog.xml b/tests/test-catalog.xml index ee5a9e95..f1712c82 100644 --- a/tests/test-catalog.xml +++ b/tests/test-catalog.xml @@ -27,4 +27,5 @@ + From ab7ccd00996d002570da7470dd4eee9d53a1d978 Mon Sep 17 00:00:00 2001 From: Steven Pemberton Date: Tue, 22 Feb 2022 14:52:59 +0100 Subject: [PATCH 110/152] ACTION: integrate resolution #24 into the spec This involved the proposed text and discussion at https://www.w3.org/2022/02/15-ixml-minutes.html#t04 It also adds proposed text for @ handling on the root node. --- ixml-specification.html | 115 +++++++++++++++++++++------------------- 1 file changed, 60 insertions(+), 55 deletions(-) diff --git a/ixml-specification.html b/ixml-specification.html index dad93ae0..37e69caf 100644 --- a/ixml-specification.html +++ b/ixml-specification.html @@ -27,7 +27,7 @@

Invisible XML Specification (Draft)

Editor: Steven Pemberton, CWI, Amsterdam

-

Version: 2022-01-25

+

Version: 2022-02-22

Status

@@ -35,7 +35,8 @@

Status

@@ -532,18 +534,18 @@

Complete

Parsing

The root symbol of the grammar is the name of the first rule in the grammar. -If it is marked as hidden, all of its productions must produce exactly one -non-hidden nonterminal and no non-hidden terminals before or after that -nonterminal (in order to match the XML requirement of a single-rooted -document).

+It may not be marked as an attribute. If it is marked as hidden, all of its +productions must produce exactly one non-hidden non-attribute nonterminal and +no non-hidden terminals before or after that nonterminal (in order to match the +XML requirement of a single-rooted document).

Processors must accept and parse any conforming grammar, and produce at -least one parse of any input that matches the grammar starting at the root +least one parse of supplied input that matches the grammar starting at the root symbol. If more than one parse results, one is chosen; it is not defined how this choice is made, but the resulting parse should be marked as ambiguous by including the attribute ixml:state="ambiguous" on the document element of the serialisation. The ixml namespace URI is -"http://invisiblexml.org/NS".

+"http://invisiblexml.org/NS".

Serialisation

@@ -749,7 +751,7 @@

Conformance

and for processors; it cannot be claimed for input streams or input + grammar pairs.

-

Conformance of grammars

+

Conformance of grammars

An ixml grammar in ixml form conforms to this specification if

    @@ -782,51 +784,54 @@

    Conformance of grammars

  • The number represented in a hex encoding of a character must be within the Unicode character range, and must not denote a Noncharacter or Surrogate code point.
  • -
  • If the first rule in a grammar is marked as hidden, all of its - productions must produce exactly one non-hidden nonterminal and no - non-hidden terminals before or after that nonterminal.
  • +
  • The first rule in a grammar may not be marked as an attribute. If it is + marked as hidden, all of its productions must produce exactly one + non-hidden non-attribute nonterminal and no non-hidden terminals before or + after that nonterminal.
-

Conformance of processors

+

Conformance of processors

A conforming processor must accept grammars in ixml form, and should accept grammars in XML form. A conforming processor must not accept non-conforming -grammars. For any conforming grammar and any input, processors must:

+grammars. For any conforming grammar and any input:

    -
  • Parse the input using the grammar specified, and produce an XML document - representing a parse tree for the input, or establish that the input is not - described by the grammar, and produce an XML document reporting that - fact.  Note: together with other requirements, this requires that grammars - be processed by an algorithm that accepts and parses any context-free - grammar; known parsing algorithms of this class include [Earley], [Unger], [CYK], [GLR], and [GLL]; see also [Grune].
  • +
  • Processors must parse by default the entire input using the grammar, + determining in the process whether or not the input is described by the + grammar. Processors may provide user options for other behaviors, such as + parsing the largest, or smallest, prefix of the input that is described by + the grammar, or supporting invocation with input streams of indeterminate + length.
  • +
  • If the input is unambiguously described by the grammar, the resulting + parse tree must be serialized to an XML document.
  • If more than one parse tree describes the input, the processor must serialize one of them. It is not defined how this choice is made, but the - resulting parse should be marked as ambiguous by including on the document - element of the serialisation the attribute - ixml:state="ambiguous", unless the user has activated an - option to suppress this attribute. Processors may produce more than one - parse tree, but the default mode of operation must serialize exactly - one.
  • -
  • If the parse fails, the processor must produce a 'failure document', some - XML document with ixml:state="failed" on the document element, - with helpful information about where and why it failed; it may be a partial - parse tree that includes parts of the parse that succeeded.
  • -
  • If the root node in the grammar is marked as an attribute, processors - must ignore that marking when serialising the rule as the root.
  • + resulting parse must by default be marked as ambiguous by including on the + document element of the serialisation the attribute + ixml:state="ambiguous". Processors may provide a user option + to suppress that attribute; they may also provide a user option to produce + more than one parse tree. +
  • If the input is not described by the grammar, the processor must produce + some XML document with ixml:state="failed" on the document + element, with helpful information about where and why it failed; it may be + a partial parse tree that includes parts of the parse that succeeded.
  • +
  • If a prefix of the input is described by the grammar, processors may + choose either to produce a failure document as described above, or to + serialize the resulting parse tree with the attribute + ixml:state="prefix", or if the parse is ambiguous + ixml:state="ambiguous prefix".
  • The form in which XML documents are produced is not constrained by this specification; processors should be capable of producing serialized XML as a character stream, but other forms (e.g. DOM instances or XDM instances) may also be used.
  • -
  • The processor must by default parse the input in its entirety against the - grammar and return either a parse tree or a failure document. Processors - may provide user options for other behaviors, such as parsing the largest, - or smallest, prefix of the input that is described by the grammar, or - supporting invocation with input streams of indeterminate length.
+

Note: the requirements require that grammars be processed by an algorithm +that accepts and parses any context-free grammar; known algorithms of this +class include [Earley], [Unger], [CYK], [GLR], and [GLL]; +see also [Grune].

+

References

[Unicode] The Unicode Consortium (ed.), The Unicode @@ -847,35 +852,35 @@

References

Language (XML) 1.0 (Fifth Edition), W3C, 2008, https://www.w3.org/TR/xml/

-

Informational References

- -

[Earley] Earley, J. An efficient context-free parsing -algorithm. Communications of the ACM, 13(2):94–102, February 1970, doi:10.1145/362007.362035

- -

[Unger] Unger, S. H. A global parser for context-free phrase -structure grammars. Communications of the ACM, 11(4):240–247, April -1968, doi:10.1145/362991.363001

+

Informational References

[CYK] Sakai, Itiroo. Syntax in universal translation. In 1961 International Conference on Machine Translation of Languages and Applied Language Analysis, pages 593–608. https://aclanthology.org/www.mt-archive.info/50/NPL-1961-Sakai.pdf

-

[GLR] Masaru Tomita. Generalized LR Parsing. Springer -Science & Business Media. ISBN 978-1-4615-4034-2. doi:10.1007/978-1-4615-4034-2

+

[Earley] Earley, J. An efficient context-free parsing +algorithm. Communications of the ACM, 13(2):94–102, February 1970, doi:10.1145/362007.362035

[GLL] Elizabeth Scott and Adrian Johnstone, GLL Parsing. Electronic Notes in Theoretical Computer Science, Volume 253, Issue 7, 17 September 2010, pages 177-189. doi:10.1016/j.entcs.2010.08.041

+

[GLR] Masaru Tomita. Generalized LR Parsing. Springer +Science & Business Media. ISBN 978-1-4615-4034-2. doi:10.1007/978-1-4615-4034-2

+

[Grune] Grune, D. and Jacobs, C. Parsing techniques : a practical guide (2nd ed.). New York: Springer, 2008. ISBN 978-0-387-20248-8. https://dickgrune.com/Books/PTAPG_2nd_Edition/CompleteList.pdf

+

[Unger] Unger, S. H. A global parser for context-free phrase +structure grammars. Communications of the ACM, 11(4):240–247, April +1968, doi:10.1145/362991.363001

+

Acknowledgements

This specification was produced by the W3C ixml community group, that at the From 1af3e765336b49af8eb1692a4cb71ed0ca13e896 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Tue, 16 Nov 2021 09:39:09 -0700 Subject: [PATCH 111/152] add pragmas.md Draft document to summarize pragma issues (and help MSM stop forgetting what we've already discussed). --- misc/pragmas.md | 170 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 misc/pragmas.md diff --git a/misc/pragmas.md b/misc/pragmas.md new file mode 100644 index 00000000..8135ee34 --- /dev/null +++ b/misc/pragmas.md @@ -0,0 +1,170 @@ +# Pragmas for ixml + +2021-11-16 + + +This document describes a proposal for adding *pragmas* to the +Invisible-XML specification. + +It was prepared (or rather, is being prepared) by Tom Hillman and +Michael Sperberg-McQueen. It is currently not finished. + +The general idea of pragmas is to provide a channel for information +that is not part of the ixml specification but can be used by some +implementations to provide useful behavior, without getting in the way +of other implementations for which the information is irrelevant. The +additional information contained in pragmas may be used to control +options in a processor (like optimization levels in a C compiler) or +to extend the specification. + +The proposal described here is inspired in part by the `xsl:fallback` +and `use-when` mechanisms of XSLT and the *extension expression* +and *annotation* mechanisms of XQuery. + +## Use cases + +Among the use cases that motivate the proposal are these. + +* Namespace declarations. + + Using pragmas to specify that all or some elements of the XML +returned by an ixml processor should go into a specified namespace. + +* Renaming + + Using pragmas to specify that an element or attribute name +serializing a nonterminal should be given a name different from the +nonterminal itself. (As in Steven Pemberton's proposal for element +renaming.) + +* Name indirection + + Using pragmas to specify that an element or attribute name should be +taken not from the grammar but from the string value of a given +nonterminal. + +* Rule rewriting + + Using pragmas to specify that a rule as given is shorthand for a set +of other rules. (As in John Lumley's grammar rewriting for XPath.) + +* Tokenization annotation. + + Using pragmas to annotate nonterminals in an ixml grammar to +indicate that they (a) define a regular language and (b) can be safely +recognized by a greedy regular-expression match. + +* Text injection. + + Using pragmas to indicate that a particular string should be +injected into the XML representation of the input as (part of) a text +node, or as an attribute or element. (This can help make the output of +an ixml parse conform to a pre-existing schema.) + +* Attribute grammar specification. + + Using pragmas to annotate a grammar with information about +grammatical attributes to be associated with nodes of the parse tree, +whether they are inherited from an ancestor or an elder sibling or +synthesized from the children of a node, and what values should be +assigned to them. (Note that grammatical attributes are not to be +confused with XML attributes, although in particular cases it may be +helpful to render a grammatical attribute as an XML attribute.) + +*Are there other use cases that need to be mentioned here?* + +Note that some of these use cases may in practice be handled by +changes to the syntax of ixml. We include them in the list of use +cases for pragmas not because we think they are best handled by +pragmas (although for some of these cases, that may be true) but +because they are (a) plausible ideas for things one might want to do +which are (b) not supported by ixml in its current form, and thus (c) +natural examples of the kinds of things an extension mechanism oughtly +ideally to support. + +Some of these use cases seem most naturally handled by annotations +which apply to a grammar as a whole, some by annotations which apply +to individual rules, and some by annotations which apply to individual +symbols in the grammar. + +We do not see a strong use case for annotations which apply to +arbitrary expressions in a grammar. + +## Requirements and desiderata + +Our tentative list of requirements and desiderata is as follows. + +By *requirement* we mean a property or functionality which must be +achieved for a pragmas proposal to be worth adopting. +By *desideratum* we mean a property or functionality that should be +included if possible, but which need not lead to the rejection of the +proposal if it proves impossible to achieve. + +Requirements: + +* It must be straightforward for processors to ignore pragmas they do +not understand, and to determine whether they `understand' a given +pragma or not. + +* It must be clear to human readers and software which expressions in +standard ixml notation are and are not affected or overridden by a +given pragma. + +* Any pragma must thus specify (explicitly or implicitly) both what +should be done by a processor that understands and processes the +pragma and what should be done by a processor that does not understand +and process the pragma. We refer to the latter as the *fallback +expression*. + + +Desiderata: + +* Ideally, the result of evaluating the fallback expression should be +a useful and meaningful result, but this is more a matter for the +individual writing a grammar than for this proposal. + +* It should ideally be possible to specify pragmas as annotations +applying to a symbol, a rule, or a grammar as a whole, and it should +be possible to know which is which. It is not required that the +distinction be a syntactic one, however, since it can also be +expressed by the semantics of the particular pragma. + +## Design questions + +Several design questions can be distinguished, not necessarily +completely orthogonal. + +* What syntax should pragmas have in invisible XML? + +* What representation should pragmas have in the XML serialization of +an ixml grammar? + +### ixml syntax of pragmas + +*Watch this space.* + +### XML syntax of pragmas + +*Attachment to symbols as attribute.* + +*Insertion of elements as children of `rule`.* + +*Insertion of elements as children of `ixml`.* + + +## Proposal + + +*Discussion of `#qname 'string'` proposal.* + +*Discussion of `*qname data*` proposal.* + +*Discussion of XML translation depending on position.* + +## Worked examples + +*This section should contain, for some or all of the use cases, fully +worked examples showing simple grammars that use the annotations in +question.* + + From 3b974188289c5d593fc0365540a2089a98b2faa8 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Tue, 16 Nov 2021 12:24:44 -0700 Subject: [PATCH 112/152] Update pragmas.md Provide a bit more prose. --- misc/pragmas.md | 400 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 384 insertions(+), 16 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 8135ee34..2c30be3f 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -19,7 +19,9 @@ to extend the specification. The proposal described here is inspired in part by the `xsl:fallback` and `use-when` mechanisms of XSLT and the *extension expression* -and *annotation* mechanisms of XQuery. +and *annotation* mechanisms of XQuery. SGML and XML processing +instructions are also possible models. + ## Use cases @@ -134,37 +136,403 @@ expressed by the semantics of the particular pragma. Several design questions can be distinguished, not necessarily completely orthogonal. -* What syntax should pragmas have in invisible XML? +* What syntax should pragmas have in invisible XML? * What representation should pragmas have in the XML serialization of an ixml grammar? -### ixml syntax of pragmas +* Where can pragmas appear? -*Watch this space.* -### XML syntax of pragmas +## Proposal(s) -*Attachment to symbols as attribute.* +Two concrete proposals have been made; they have been given arbitrary +names for discussion. -*Insertion of elements as children of `rule`.* +### The hash-QName proposal -*Insertion of elements as children of `ixml`.* +In this proposal, pragmas take the form of a hash mark, a QName, and a +string. Because ixml has two string delimiters, pragmas can nest, but +only two deep. +They can occur immediately before a terminal or nonterminal symbol, +before the mark if any. + +In the XML form, they are realized as extension attributes whose name +is the QName given in the pragma and whose value is the value of the +string. + +For example: + +```` + #my:color 'blue' a = b, #my:flavor 'vanilla' c?. +```` + +The corresponding XML form is: + +```` + + + + + + +```` + +Annotations pertaining to a particular occurrence of a symbol appear +immediately before that occurrence, as here the `my:flavor` pragma. + +Annotations pertaining to a rule as a whole, or which provide a +nonterminal with default value for some property appear immediately +before the nonterminal on the left-hand side of a rule, as here the +`my:color` pragma. + +Annotations pertaining to the grammar as a whole appear immediately +before the first rule, and thus appear as attributes on the first +`rule` element of the grammar. + +There are no syntactic distinctions among these cases: if the rule +shown is the first rule in the grammar, `my:color` might be supplying +a default property value for `a`, or annotating the rule, or +annotating the grammar as a whole. The difference must be carried by +the semantics of the pragma: those defining the `my:color` pragma +should be clear about what it means and what its scope is. + +### The brackets-QName proposal + +In this proposal, pragmas take the form of a left square bracket, an +optional mark, a QName, the pragma's data, and a right square bracket. +Nested pairs of square brackets are allowed, so pragmas can nest +arbitrarily deep. + +Pragmas can occur immediately before a terminal or nonterminal symbol, +before the mark if any, or in the whitespace immediately before the +full stop of a rule. + +In the XML form, the serialization of the pragma depends on its +position and the mark following the opening bracket. + +* Pragmas occurring before the full stop of a rule are serialized as +extension elements following the final `alt` of the right-hand side of +the rule. + +* Pragmas occurring before a symbol are serialized as attributes if +marked `@` (ignoring marks on any nested pragmas). + +* Pragmas occurring before a symbol are not serialized at all if +marked `-`. + +* Pragmas occurring before a symbol are serialized as extension +elements if unmarked or marked `^`. + + The extension elements appear as the first children of the XML +representation of the symbol. In the canonical XML representation, the +pragma data is serialized as a 'pragma-data' element within the +extension element, which will contain the pragma-data as a character +sequence. Depending on the semantics of the pragma itself, the +extension element may also contain additional elements. (See the +examples in the final section of this paper.) + +For example: + +```` + [my:color blue] a = b, [@my:flavor vanilla] c? [my:spin ...]. +```` + +The corresponding XML form is: + +```` + + blue + + + + + + ... + + +```` + +Annotations pertaining to a particular occurrence of a symbol appear +immediately before that occurrence, as here the `my:flavor` pragma. + +Annotations which provide a nonterminal with default value for some +property appear immediately before the nonterminal on the left-hand +side of a rule, as here the `my:color` pragma. + +Annotations pertaining to a rule as a whole may occur either before +the left-hand side of the rule, which may be preferred for +light-weight annotations, or before the full stop at the end of the +rule, which is preferable for long complicated annotations. + +Annotations pertaining to the grammar as a whole appear immediately +before the first rule, and thus appear as attributes on the first +`rule` element of the grammar. + +Pragmas occurring before a full stop apply to the rule as a whole. +Pragmas occurring before a symbol in the right-hand side of a rule +apply to that occurrence of that symbol. Pragmas occurring before the +left-hand side of a rule may apply to that symbol in general, or to +the rule as a whole, or (if occurring before the first rule) to the +grammar as a whole; such distinctions are conveyed semantically, not +syntactically. -## Proposal +## Worked examples +*This section should contain, for some or all of the use cases, fully +worked examples showing simple grammars that use the annotations in +question.* -*Discussion of `#qname 'string'` proposal.* -*Discussion of `*qname data*` proposal.* +### Namespace declarations. + +Using pragmas to specify that all or some elements of the XML returned +by an ixml processor should go into a specified namespace. + +For example, let's assume that we want some elements to go into one +namespace, some into another, and some into none, and that namespace +bindings should remain constant throughout the grammar (so: no +changing the default namespace in the middle of the document). + +We define the namespace 'http://example.com/ixml-namespaces" as +providing for namespace bindings, and we adopt the convention that a +prefix `ppp` is bound to a namespace name `nnn` if a pragma of the form +```` + [@nsd:ppp nnn] +```` + +is encountered in a context where the prefix *nsd* is bound to +"'http://example.com/ixml-namespaces". + +To bootstrap the process, we adopt the principle that a +pragma of the form +```` + [@ns:ns http://example.com/ixml-namespaces] +```` + +binds the prefix `ns` to that namespace. (Alternatively, we could +follow the example of XML namespaces and reserve some string for +namespace bindings, but this example is trying to show a way to do +this that does not rely on a decree in the spec but could in principle +be handled as an extension.) + +So a grammar in which some elements are in the *x* namespace, some in +the *y* namespace, and some in no namespace at all, might be + +```` + [@nsd:nsd http://example.com/ixml-namespaces] + [@nsd:x http://example.org/NS/existential] + [@nsd:y http://example.com/NS/yoyo] + x:sentence: x:a, ' ', y:b?, '. ', c. + x:a: 'Speed'. + y:b: 'kills'. + c: 'It really does.'. + +The XML representation of the grammar might be: + +```` + + + + + + + + + + + + + + + + + + + + + + + + + + +```` + +*We have another bootstrapping problem here: because the prefix* +`nsd` *is not declared, the XML shown is not namespace-well-formed. We +need some way of getting it declared, preferably other than by fiat, +but I don't currently see an alternative to fiat.* + +To make the XML be namespace well-formed, we will need somehow to get +at least a namespace declaration for *nsd* to be injected on the +`ixml` element, and preferably also namespace bindings for the +prefixes *x* and *y*, so the `ixml` start tag takes something like the +following form. +```` + + ```` + +### Renaming + +Using pragmas to specify that an element or attribute name +serializing a nonterminal should be given a name different from the +nonterminal itself. (As in Steven Pemberton's proposal for element +renaming.) -*Discussion of XML translation depending on position.* +### Name indirection -## Worked examples +Using pragmas to specify that an element or attribute name should be +taken not from the grammar but from the string value of a given +nonterminal. -*This section should contain, for some or all of the use cases, fully -worked examples showing simple grammars that use the annotations in -question.* +### Rule rewriting + +Using pragmas to specify that a rule as given is shorthand for a set +of other rules. (As in John Lumley's grammar rewriting for XPath.) + +### Tokenization annotation. + +Using pragmas to annotate nonterminals in an ixml grammar to +indicate that they (a) define a regular language and (b) can be safely +recognized by a greedy regular-expression match. + +### Text injection. +Using pragmas to indicate that a particular string should be +injected into the XML representation of the input as (part of) a text +node, or as an attribute or element. (This can help make the output of +an ixml parse conform to a pre-existing schema.) +### Attribute grammar specification. + +*Example: synthesized value attribute for arithmetic expressions.* + +Consider the following simple grammar for arithmetic expressions +involving addition and multiplication over single-digit integers. + +```` + expr: expr, s, '+', s, term. + term: term, s, '*', s, factor. + factor: '0'; '1'; '2'; '3'; '4'; '5'; '6'; '7'; '8'; '9'; '(', s, expr, s, ')'. + s: [#20; #A; #D; #9]*. +```` + +In an attribute-grammar system, we might define the *value* of an +expression as a synthesized (bottom-up) grammatical attribute +following the rules: + +* The value of a *factor* consisting of a single digit is the value of +the integer usually so written: '0' has the value of zero, '1` has the +value of one, etc. + +* The value of a *factor* consisting of a parenthesized *expr* is the +value of the *expr*. + +* The value of a *term* consisting solely of a *factor* is the value +of the *factor*. + +* The value of a *term* consisting solely of a *term* followed by an +asterisk and a *factor* is the product of the values of the *term* and +the *factor*. + +* The value of an *expr* consisting solely of a *term* is the value +of the *term*. + +* The value of an *expr* consisting solely of an *expr* followed by a +plus sign and a *term* is the sum of the values of the *expr* and +the *term*. + +Extending this to handle subtraction, division, and multiple-digit +numbers would be straightforward but require a lot more rules which +would not involve any interesting new principles. + +A conventional system for reading attribute grammars and making +parsers which parse input and calculate the values of grammatical +attributes might represent this grammar thus, naming the grammatical +attribute *v* (this example follows, roughly the syntax of Alblas 191, +and like Alblas assumes whitespace is someone else's problem). + +```` + expr_0 → expr_1 '+' term. + [ expr_0.v = expr_1.v + term.v] + + term_0 → term_1 '*' factor. + [ term_0.v = term_1.v * factor.v] + + factor → '0'. + [ factor.v = 0 ] + factor → '1'. + [ factor.v = 1 ] + factor → '2'. + [ factor.v = 2 ] + factor → '3'. + [ factor.v = 3 ] + factor → '4'. + [ factor.v = 4 ] + factor → '5'. + [ factor.v = 5 ] + factor → '6'. + [ factor.v = 6 ] + factor → '7'. + [ factor.v = 7 ] + factor → '8'. + [ factor.v = 8 ] + factor → '9'. + [ factor.v = 9 ] + factor → '(' expr ')'. + [ factor.v = expr.v ] +```` + +Note that some nonterminals are subscripted so that references to +their grammatical attributes can be unambiguous. To express this +grammar in ixml, we need either to allow multiple rules for the same +nonterminal, or to allow pragmas before connectors like comma or +semicolon, or we need to allow string-to-typed-value functions in the +style of XPath. I'll assume the latter two, along with a string() +function that returns the string value of a nonterminal. With these +assumptions, and the assumption that by means not specified the +prefix *ag* has been bound to an appropriate grammar for +attribute-grammar functionality, the attribute grammar could be +written thus using the brackets-QName syntax + +```` + [@ag:id e0] expr: [@ag:id e1] expr, s, '+', s, term + [ag:rule e0.v := e1.v + term.v ]. + {@ag:id t0] term: [@ag:id t1] term, s, '_', s, factor + [ag:rule t0.v := t1.v * factor.v]. + factor: digit [@ag:rule factor.v := number(string(digit))]; + '(', s, expr, s, ')' [@ag:rule factor.v := expr.v ]. + digit: '0'; '1'; '2'; '3'; '4'; '5'; '6'; '7'; '8'; '9'. + s: [#20; #A; #D; #9]_. +```` + +Here *ag:id* is assumed to associate a unique identifier with a +particular instance of a nonterminal, and *ag:rule* is assumed to +contain a set of assignment statements specifying the values of +particular attributes, in a subset of XPath syntax. (A more serious +proposal would need some way to distinguish *e0.v* meaning "the *v* +attribute of *e0* from the same string as a name which happens to +contain a string. This is not that serious proposal.) + + +*Example: synthesized value attribute and inherited environment attribute with variable bindings, for arithmetic expressions with 'let'.* + + +## Open issues + +* Is it really OK not to have a way to have pragmas turn into elements +before the first `rule` element? From fdd96cf6ab21921a09c3da05393b4046ddfcef88 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Tue, 16 Nov 2021 12:27:38 -0700 Subject: [PATCH 113/152] Update pragmas.md I hate Markdown. --- misc/pragmas.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 2c30be3f..02d90711 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -332,7 +332,7 @@ the *y* namespace, and some in no namespace at all, might be x:a: 'Speed'. y:b: 'kills'. c: 'It really does.'. - +```` The XML representation of the grammar might be: ```` From ec96425b29e0901782a8bd8c440181e6efa3c226 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Tue, 23 Nov 2021 08:51:55 -0700 Subject: [PATCH 114/152] Update pragmas.md Some copy edits and begin a new example --- misc/pragmas.md | 56 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 46 insertions(+), 10 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 02d90711..356de101 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -14,8 +14,10 @@ that is not part of the ixml specification but can be used by some implementations to provide useful behavior, without getting in the way of other implementations for which the information is irrelevant. The additional information contained in pragmas may be used to control -options in a processor (like optimization levels in a C compiler) or -to extend the specification. +options in a processor or to extend the specification (in roughly the +same way as pragmas and structured comments in C or Pascal +programs may be used to control optimization levels in some +compilers). The proposal described here is inspired in part by the `xsl:fallback` and `use-when` mechanisms of XSLT and the *extension expression* @@ -48,13 +50,18 @@ nonterminal. * Rule rewriting Using pragmas to specify that a rule as given is shorthand for a set -of other rules. (As in John Lumley's grammar rewriting for XPath.) +of other rules. (Example: John Lumley's grammar rewriting for XPath.) -* Tokenization annotation. +* Tokenization annotation. - Using pragmas to annotate nonterminals in an ixml grammar to -indicate that they (a) define a regular language and (b) can be safely -recognized by a greedy regular-expression match. + Using pragmas to annotate nonterminals in an ixml grammar to +indicate that they (a) define a regular language and (b) can be safely +recognized by a greedy regular-expression match. + +* Alternative formulations. + + Using pragmas to provide alternative formulations of rules in an +ixml grammar to allow different annotation or better optimization. * Text injection. @@ -404,12 +411,41 @@ nonterminal. Using pragmas to specify that a rule as given is shorthand for a set of other rules. (As in John Lumley's grammar rewriting for XPath.) -### Tokenization annotation. +### Tokenization annotation and alternative formulations. -Using pragmas to annotate nonterminals in an ixml grammar to -indicate that they (a) define a regular language and (b) can be safely +We can use pragmas to annotate nonterminals in an ixml grammar to +indicate that they define a regular language and can be safely recognized by a greedy regular-expression match. +For example, consider the grammar for a simple programming language. +A processor might read programs a little faster if it could read +identifiers in a single operation; this will be true if when an +identifier is encountered, the identifier will always consist of the +longest available sequence of characters legal in an identifier. In +the toy Program.ixml grammar, the rule for identifiers is: + +```` + identifier: letter+, S. +```` + +We can annotate *identifier* to signal that it's safe to consume an +identifier using a single regular-expression match by using a pragma +in a 'lexical scanning' (ls) namespace: + +```` + [ls:token] identifier: letter+, S. +```` + +The rules for comments in ixml itself offer another wrinkle. + +```` + comment: -"{", (cchar; comment)*, -"}". + -cchar: ~["{}"]. +```` + +Within a comment, any sequence of characters matching *cchar* can be +recognized in a single operation; there is no need to look for + ### Text injection. Using pragmas to indicate that a particular string should be From 2d5631d4cd43a110e66614e2638204c5e3932be8 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Tue, 30 Nov 2021 08:25:46 -0700 Subject: [PATCH 115/152] Revising pragmas.md --- misc/pragmas.md | 53 +++++++++++++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 356de101..9e2abefd 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -1,6 +1,10 @@ # Pragmas for ixml -2021-11-16 +2021-11-16, rev. 2021-11-23 + +*Tentative decisions and to-do items* + +* *Drop hash-quotes proposal.* This document describes a proposal for adding *pragmas* to the @@ -10,14 +14,18 @@ It was prepared (or rather, is being prepared) by Tom Hillman and Michael Sperberg-McQueen. It is currently not finished. The general idea of pragmas is to provide a channel for information -that is not part of the ixml specification but can be used by some -implementations to provide useful behavior, without getting in the way -of other implementations for which the information is irrelevant. The -additional information contained in pragmas may be used to control -options in a processor or to extend the specification (in roughly the -same way as pragmas and structured comments in C or Pascal -programs may be used to control optimization levels in some -compilers). +that is not a required part of the ixml specification but can be used +by some implementations to provide useful behavior, without +interfering with the operation of other implementations for which the +information is irrelevant. Pragmas can also be used to provide +optional features in the ixml specification. The additional +information contained in pragmas may be used to control options in a +processor or to extend the specification (in roughly the same way as +pragmas and structured comments in C or Pascal programs may be used to +control optimization levels in some compilers). + +On this view, pragmas are a form of annotation, and we use the terms +*pragma* and *annotation* accordingly. The proposal described here is inspired in part by the `xsl:fallback` and `use-when` mechanisms of XSLT and the *extension expression* @@ -52,25 +60,25 @@ nonterminal. Using pragmas to specify that a rule as given is shorthand for a set of other rules. (Example: John Lumley's grammar rewriting for XPath.) -* Tokenization annotation. +* Tokenization annotation Using pragmas to annotate nonterminals in an ixml grammar to indicate that they (a) define a regular language and (b) can be safely recognized by a greedy regular-expression match. -* Alternative formulations. +* Alternative formulations Using pragmas to provide alternative formulations of rules in an ixml grammar to allow different annotation or better optimization. -* Text injection. +* Text injection Using pragmas to indicate that a particular string should be injected into the XML representation of the input as (part of) a text node, or as an attribute or element. (This can help make the output of an ixml parse conform to a pre-existing schema.) -* Attribute grammar specification. +* Attribute grammar specification Using pragmas to annotate a grammar with information about grammatical attributes to be associated with nodes of the parse tree, @@ -88,7 +96,7 @@ cases for pragmas not because we think they are best handled by pragmas (although for some of these cases, that may be true) but because they are (a) plausible ideas for things one might want to do which are (b) not supported by ixml in its current form, and thus (c) -natural examples of the kinds of things an extension mechanism oughtly +natural examples of the kinds of things an extension mechanism ought ideally to support. Some of these use cases seem most naturally handled by annotations @@ -104,7 +112,7 @@ arbitrary expressions in a grammar. Our tentative list of requirements and desiderata is as follows. By *requirement* we mean a property or functionality which must be -achieved for a pragmas proposal to be worth adopting. +achieved for a pragmas proposal to be worth adopting. By *desideratum* we mean a property or functionality that should be included if possible, but which need not lead to the rejection of the proposal if it proves impossible to achieve. @@ -140,8 +148,10 @@ expressed by the semantics of the particular pragma. ## Design questions -Several design questions can be distinguished, not necessarily -completely orthogonal. +Several design questions can be distinguished; they are not completely +orthogonal. + +* What information should be encodable with pragmas? * What syntax should pragmas have in invisible XML? @@ -228,8 +238,13 @@ the rule. * Pragmas occurring before a symbol are serialized as attributes if marked `@` (ignoring marks on any nested pragmas). -* Pragmas occurring before a symbol are not serialized at all if -marked `-`. +* Pragmas occurring before a symbol are serialized as processing +instructions if marked `-`. + + The processing instructions appear as the first children of the XML +representation of the symbol; the name and data of the processing +instruction in the XML form are the name and pragma data of the pragma +in the ixml form. * Pragmas occurring before a symbol are serialized as extension elements if unmarked or marked `^`. From a55fa6e1da32fd147a27dac746eead4be7283f0f Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Tue, 30 Nov 2021 08:49:50 -0700 Subject: [PATCH 116/152] Copy edit pragmas.md --- misc/pragmas.md | 159 ++++++++++++++++++------------------------------ 1 file changed, 60 insertions(+), 99 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 9e2abefd..9bb76ee1 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -163,59 +163,10 @@ an ixml grammar? ## Proposal(s) -Two concrete proposals have been made; they have been given arbitrary -names for discussion. - -### The hash-QName proposal - -In this proposal, pragmas take the form of a hash mark, a QName, and a -string. Because ixml has two string delimiters, pragmas can nest, but -only two deep. - -They can occur immediately before a terminal or nonterminal symbol, -before the mark if any. - -In the XML form, they are realized as extension attributes whose name -is the QName given in the pragma and whose value is the value of the -string. - -For example: - -```` - #my:color 'blue' a = b, #my:flavor 'vanilla' c?. -```` - -The corresponding XML form is: - -```` - - - - - - -```` - -Annotations pertaining to a particular occurrence of a symbol appear -immediately before that occurrence, as here the `my:flavor` pragma. - -Annotations pertaining to a rule as a whole, or which provide a -nonterminal with default value for some property appear immediately -before the nonterminal on the left-hand side of a rule, as here the -`my:color` pragma. - -Annotations pertaining to the grammar as a whole appear immediately -before the first rule, and thus appear as attributes on the first -`rule` element of the grammar. - -There are no syntactic distinctions among these cases: if the rule -shown is the first rule in the grammar, `my:color` might be supplying -a default property value for `a`, or annotating the rule, or -annotating the grammar as a whole. The difference must be carried by -the semantics of the pragma: those defining the `my:color` pragma -should be clear about what it means and what its scope is. +The current proposal is given the arbitrary name of 'brackets QName' for +discussion; an earlier proposal (the 'hash-QName' proposal) has been +withdrawn, though traces of it may remain in other documents in this +branch. ### The brackets-QName proposal @@ -224,38 +175,41 @@ optional mark, a QName, the pragma's data, and a right square bracket. Nested pairs of square brackets are allowed, so pragmas can nest arbitrarily deep. -Pragmas can occur immediately before a terminal or nonterminal symbol, -before the mark if any, or in the whitespace immediately before the -full stop of a rule. +In the ixml form of a grammar, pragmas can occur immediately + +* before a terminal or nonterminal symbol, before the mark if any, or + +* in the whitespace immediately before the full stop of a rule. In the XML form, the serialization of the pragma depends on its -position and the mark following the opening bracket. +position and in some cases on the mark following the opening bracket. * Pragmas occurring before the full stop of a rule are serialized as extension elements following the final `alt` of the right-hand side of -the rule. +the rule, regardless of the mark. + +* Pragmas occurring before a symbol are -* Pragmas occurring before a symbol are serialized as attributes if -marked `@` (ignoring marks on any nested pragmas). + * serialized as attributes if marked `@` (ignoring marks on any + nested pragmas). -* Pragmas occurring before a symbol are serialized as processing -instructions if marked `-`. + * serialized as processing instructions if marked `-`. - The processing instructions appear as the first children of the XML -representation of the symbol; the name and data of the processing -instruction in the XML form are the name and pragma data of the pragma -in the ixml form. + The processing instructions appear as the first children of the + XML representation of the symbol; the name and data of the + processing instruction in the XML form are the name and pragma + data of the pragma in the ixml form. -* Pragmas occurring before a symbol are serialized as extension -elements if unmarked or marked `^`. + * serialized as extension elements if unmarked or marked `^`. - The extension elements appear as the first children of the XML -representation of the symbol. In the canonical XML representation, the -pragma data is serialized as a 'pragma-data' element within the -extension element, which will contain the pragma-data as a character -sequence. Depending on the semantics of the pragma itself, the -extension element may also contain additional elements. (See the -examples in the final section of this paper.) + The extension elements appear as the first children of the XML + representation of the symbol. In the canonical XML + representation, the pragma data is serialized as a 'pragma-data' + element within the extension element, which will contain the + pragma-data as a character sequence. Depending on the semantics + of the pragma itself, the extension element may also contain + additional elements. (See the examples in the final section of + this paper.) For example: @@ -279,30 +233,37 @@ The corresponding XML form is: ```` - -Annotations pertaining to a particular occurrence of a symbol appear -immediately before that occurrence, as here the `my:flavor` pragma. - -Annotations which provide a nonterminal with default value for some -property appear immediately before the nonterminal on the left-hand -side of a rule, as here the `my:color` pragma. - -Annotations pertaining to a rule as a whole may occur either before -the left-hand side of the rule, which may be preferred for -light-weight annotations, or before the full stop at the end of the -rule, which is preferable for long complicated annotations. - -Annotations pertaining to the grammar as a whole appear immediately -before the first rule, and thus appear as attributes on the first -`rule` element of the grammar. - -Pragmas occurring before a full stop apply to the rule as a whole. -Pragmas occurring before a symbol in the right-hand side of a rule -apply to that occurrence of that symbol. Pragmas occurring before the -left-hand side of a rule may apply to that symbol in general, or to -the rule as a whole, or (if occurring before the first rule) to the -grammar as a whole; such distinctions are conveyed semantically, not -syntactically. + +Annotations appearing immediately before an occurrence of a symbol in +the right-hand side of a rule pertain to the occurrence of that +symbol. In the example, this is the case for the `my:flavor` pragma +on *c*. + +Annotations appearing before the full stop at the end of the rule +pertain to the rule as a whole. In the example, this is the case for +the `my:spin` pragma. + +Annotations appearing immediately before the nonterminal on the +left-hand side of a rule do one of three things: + +* They may provide the nonterminal on the left-hand side with a +default value for some property. + +* They may pertain to the rule as a whole. + +* They may pertain to the grammar as a whole. + +These cases are not distinguished by their syntax; the distinction +follows from the meaning of the pragma. + +In the example, this is the case for the `my:color` pragma. + +It follows that there are two ways to provide annotations pertaining +to a rule as a whole: they may occur either before the left-hand side +of the rule, which may be preferred for light-weight annotations, or +before the full stop at the end of the rule, which is preferable for +long complicated annotations. + ## Worked examples From e81a0624d4b948cdb016e7baf36f27e6052e2b95 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Tue, 30 Nov 2021 20:07:21 -0700 Subject: [PATCH 117/152] Pragmas.md Copy edit, revise proposal to allow grammar-attached pragmas, revise namespaces example, supply renaming and rewriting examples, finish tokenization example, add lists of open issues and decisions for the group. --- misc/pragmas.md | 540 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 437 insertions(+), 103 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 9bb76ee1..84243b39 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -1,10 +1,6 @@ # Pragmas for ixml -2021-11-16, rev. 2021-11-23 - -*Tentative decisions and to-do items* - -* *Drop hash-quotes proposal.* +2021-11-16, rev. most recently 2021-11-30 This document describes a proposal for adding *pragmas* to the @@ -30,13 +26,21 @@ On this view, pragmas are a form of annotation, and we use the terms The proposal described here is inspired in part by the `xsl:fallback` and `use-when` mechanisms of XSLT and the *extension expression* and *annotation* mechanisms of XQuery. SGML and XML processing -instructions are also possible models. +instructions have also contributed to our thinking. ## Use cases Among the use cases that motivate the proposal are these. +Note that some of these use cases may in practice be handled by +changes to the core syntax of ixml. We include them in the list of use +cases for pragmas not because we think they are best handled by +pragmas but because they are (a) plausible ideas for things one might +want to do which are (b) not supported by ixml in its current form, +and thus (c) natural examples of the kinds of things an extension +mechanism like pragmas ought ideally to be able to support. + * Namespace declarations. Using pragmas to specify that all or some elements of the XML @@ -90,15 +94,6 @@ helpful to render a grammatical attribute as an XML attribute.) *Are there other use cases that need to be mentioned here?* -Note that some of these use cases may in practice be handled by -changes to the syntax of ixml. We include them in the list of use -cases for pragmas not because we think they are best handled by -pragmas (although for some of these cases, that may be true) but -because they are (a) plausible ideas for things one might want to do -which are (b) not supported by ixml in its current form, and thus (c) -natural examples of the kinds of things an extension mechanism ought -ideally to support. - Some of these use cases seem most naturally handled by annotations which apply to a grammar as a whole, some by annotations which apply to individual rules, and some by annotations which apply to individual @@ -114,13 +109,13 @@ Our tentative list of requirements and desiderata is as follows. By *requirement* we mean a property or functionality which must be achieved for a pragmas proposal to be worth adopting. By *desideratum* we mean a property or functionality that should be -included if possible, but which need not lead to the rejection of the -proposal if it proves impossible to achieve. +included if possible, but which does not doom the proposal to +pointlessness if it proves impossible to achieve. Requirements: * It must be straightforward for processors to ignore pragmas they do -not understand, and to determine whether they `understand' a given +not understand, and to determine whether they 'understand' a given pragma or not. * It must be clear to human readers and software which expressions in @@ -138,7 +133,9 @@ Desiderata: * Ideally, the result of evaluating the fallback expression should be a useful and meaningful result, but this is more a matter for the -individual writing a grammar than for this proposal. +individual writing a grammar than for this proposal. The desideratum +for a pragmas proposal is to make it easy (or at least not +unnecessarily hard) to write useful fallbacks. * It should ideally be possible to specify pragmas as annotations applying to a symbol, a rule, or a grammar as a whole, and it should @@ -175,51 +172,137 @@ optional mark, a QName, the pragma's data, and a right square bracket. Nested pairs of square brackets are allowed, so pragmas can nest arbitrarily deep. -In the ixml form of a grammar, pragmas can occur immediately +#### The ixml form + +In the ixml form of a grammar, pragmas can occur within whitespace in +several locations: + +* before the first rule of the grammar, after the last rule of the + grammar, or between rules; these pragmas apply to the grammar + as a whole or to the rules following the pragma. + +* before a terminal or nonterminal symbol on the right-hand side of a + rule, before or after the mark if any; these pragmas apply to that + occurrence of the symbol. + +* between the mark on the left-hand side of a rule and the + nonterminal; these pragmas apply to the rule. + +* immediately before the full stop of a rule; these pragmas apply to + the rule. -* before a terminal or nonterminal symbol, before the mark if any, or +Two locations are allowed for pragmas applying to rule in order to +allow them to appear either first or last; this is essentially a +rhetorical choice, as it can make a large difference to readability. -* in the whitespace immediately before the full stop of a rule. +#### Marks on pragmas -In the XML form, the serialization of the pragma depends on its -position and in some cases on the mark following the opening bracket. +Depending on the mark used in the ixml pragma, it may correspond to +various XML constructs in the XML form of the grammar: -* Pragmas occurring before the full stop of a rule are serialized as -extension elements following the final `alt` of the right-hand side of -the rule, regardless of the mark. +* An ixml pragma marked `^` corresponds to an extension element. -* Pragmas occurring before a symbol are +* An ixml pragma marked `@` corresponds to an extension attribute. - * serialized as attributes if marked `@` (ignoring marks on any - nested pragmas). +* An ixml pragma marked `?` corresponds to a processing instruction. - * serialized as processing instructions if marked `-`. +#### The XML form - The processing instructions appear as the first children of the - XML representation of the symbol; the name and data of the - processing instruction in the XML form are the name and pragma - data of the pragma in the ixml form. +These XML constructs may occur in locations corresponding to those in +which pragmas may appear in the ixml grammar: - * serialized as extension elements if unmarked or marked `^`. +* as a child or attribute of the `ixml` element before, between, or + after `rule` elements. - The extension elements appear as the first children of the XML - representation of the symbol. In the canonical XML - representation, the pragma data is serialized as a 'pragma-data' - element within the extension element, which will contain the - pragma-data as a character sequence. Depending on the semantics - of the pragma itself, the extension element may also contain - additional elements. (See the examples in the final section of - this paper.) +* as a child or attribute of a `rule` element. An ixml pragma marked + `^` or `?` occurring on the left-hand side of a rule corresponds to an + extension element or processing instruction occurring before the + first `alt` child of the `rule` element; if it occurs immediately + before the full stop of the rule, it corresponds to an element or + processing instruction occurring after the last `alt` of the `rule`. + +* as a child or attribute of a `nonterminal`, `literal`, `inclusion`, + or `exclusion` element. + +To ensure that the ixml grammar has an XML representation, any two +pragmas marked `@` and attached to the same construct must have +different expanded names. + +When a grammar in XML form is serialized into ixml form, extension +attributes appearing on the `rule` element may be serialized either on +the left-hand side of the rule or before the full stop. Pragmas +attached to a symbol in the right-hand side of a rule may be +serialized either before or after the mark; the two positions are +equivalent. + +For attributes, the attribute name is the QName of the ixml pragma +and the attribute value is the pragma data. + +For processing instructions, the PI name is the QName of the +ixml pragma and the PI value is the pragma data. + +For extension elements, the element name is the QName of the ixml +pragma and the pragma data appears as character data within a child +named `pragma-data`. Other child elements may follow the +`pragma-data` element; their content is required to be reconstructible +from the pragma data and the fallback expression, but they may express +the information in a more convenient form. (For example, the pragma +data may be a structured expression which a conforming application +will parse; the parsed form of the pragma data may be enclosed in the +pragma.) In this way we ensure that the ixml and XML forms of a +grammar contain the same information, although the XML form of the +grammar may be easier to process by machine. + +#### Annotating symbols, rules, or grammars + +Viewed the other way around, as described in the Desiderata, pragmas +can apply to symbols, rules, to a subset of rules, or to the grammar +as a whole, as follows: + +* Pragmas applicable to one occurrence of one symbol appear in ixml + before that symbol, either before or after the mark if any; in XML + they appear as attributes or children of the corresponding XML + element (`nonterminal`, `literal`, etc.). + +* Pragmas applicable to one rule appear in ixml either before the + left-hand side of that rule (after the mark) or before the full stop + of the rule; in XML they appear as attributes or children of the + `rule` element. + + Note that while we speak of the pragma as applying to the rule, + it may in practice apply more narrowly to the symbol on the + left-hand side of the rule, e.g. to provide a default value for + some property which may be overridden on individual occurrences + of the nonterminal, just as marks in ixml do now. + +* Pragmas applicable to a set of rules appear in ixml before the first + rule of the set and in XML before the first `rule` element of the + set. N.B. there is no syntactic method for specifying the last rule + of the set. If it matters, it must be handled semantically in the + specification of the pragma. Any software that does not understand + or implement the pragma in question may and should assume that the + pragma applies to all following rules. (It is not clear exactly + what use a parser that doesn't understand the pragma would make of + that information; we specify this only out of an abundance of + caution.) + +* Pragmas applicable to the grammar as a whole appear the first rule. + +#### An example For example: ```` - [my:color blue] a = b, [@my:flavor vanilla] c? [my:spin ...]. + [my:pitch C#] + ^ [my:color blue] a = b, [@my:flavor vanilla] c? [my:spin ...]. ```` The corresponding XML form is: ```` + + C# + blue @@ -234,35 +317,25 @@ The corresponding XML form is: ```` -Annotations appearing immediately before an occurrence of a symbol in -the right-hand side of a rule pertain to the occurrence of that -symbol. In the example, this is the case for the `my:flavor` pragma -on *c*. - -Annotations appearing before the full stop at the end of the rule -pertain to the rule as a whole. In the example, this is the case for -the `my:spin` pragma. +Annotations appearing between rules in the ixml correspond to nodes in +the XML appearing as children or attributes of the `ixml` element. In +the example, this is the case for the `my:pitch` pragma. -Annotations appearing immediately before the nonterminal on the -left-hand side of a rule do one of three things: +Annotations appearing in the ixml between the mark and the nonterminal +on the left-hand side of a rule correspond in the XML to attributes or +children of `rule` elements. In the example, this is the case for the +`my:color` pragma. -* They may provide the nonterminal on the left-hand side with a -default value for some property. +Annotations appearing immediately before an occurrence of a symbol in +the right-hand side of an ixml rule pertain to the occurrence of that +symbol and correspond to attributes or children of the corresponding +element in the XML grammar. In the example, this is the case for the +`my:flavor` pragma on the nonterminal *c*. -* They may pertain to the rule as a whole. - -* They may pertain to the grammar as a whole. - -These cases are not distinguished by their syntax; the distinction -follows from the meaning of the pragma. - -In the example, this is the case for the `my:color` pragma. - -It follows that there are two ways to provide annotations pertaining -to a rule as a whole: they may occur either before the left-hand side -of the rule, which may be preferred for light-weight annotations, or -before the full stop at the end of the rule, which is preferable for -long complicated annotations. +Annotations appearing before the full stop at the end of the rule +pertain to the rule as a whole and correspond to extension elements +appear as the last children of a `rule` element. In the example, this +is the case for the `my:spin` pragma. ## Worked examples @@ -282,27 +355,53 @@ namespace, some into another, and some into none, and that namespace bindings should remain constant throughout the grammar (so: no changing the default namespace in the middle of the document). -We define the namespace 'http://example.com/ixml-namespaces" as -providing for namespace bindings, and we adopt the convention that a -prefix `ppp` is bound to a namespace name `nnn` if a pragma of the form +We define the namespace 'http://example.com/ixml-namespaces" (*final +decision on namespace name pending*) as providing for namespace +bindings, and we adopt the convention that a prefix `ppp` is bound to +a namespace name `nnn` if a pragma of the form + ```` - [@nsd:ppp nnn] +[@nsd:ppp nnn] ```` is encountered in a context where the prefix *nsd* is bound to -"'http://example.com/ixml-namespaces". +"`http://example.com/ixml-namespaces`". To bootstrap the process, we adopt the principle that a pragma of the form + ```` [@ns:ns http://example.com/ixml-namespaces] ```` -binds the prefix `ns` to that namespace. (Alternatively, we could -follow the example of XML namespaces and reserve some string for -namespace bindings, but this example is trying to show a way to do -this that does not rely on a decree in the spec but could in principle -be handled as an extension.) +binds the prefix *ns* to that namespace. + +That is, a pragma-aware processor must be on the alert for pragmas +with the following properties: + +* In the pragma's QName, the prefix and local name are the same + NCName (non-colonized name). + +* The pragma's data is the magic namespace name + "`http://example.com/ixml-namespaces`". + +When that pragma is found, it is interpreted as binding prefix *ns* +(whatever it might be) to the indicated namespace. Any subsequent +pragma with a QName using that prefix and a URI as pragma data is to +be interpreted as a namespace declaration in the obvious way. + +The corresponding constructs in the XML grammar are (a) a namespace +declaration binding the prefix *ns* to the given namespace and (b) an +attribute with the qualified name *ns:ns* with the value +"`http://example.com/ixml-namespaces`". + +*(Alternatively, we could follow the example of XML namespaces and +reserve some string for namespace bindings, but this example is trying +to show a way to do this that does not trample over what should be the +user's choice of names. Note that either way, at least one thing must +be specified in the spec for the bootstrapping process to work: +either a magic prefix, analogous to the* `xmlns` *prefix of the XML +Names recommendation, or a magic URI as shown here.)* So a grammar in which some elements are in the *x* namespace, some in the *y* namespace, and some in no namespace at all, might be @@ -319,12 +418,11 @@ the *y* namespace, and some in no namespace at all, might be The XML representation of the grammar might be: ```` - - + nsd:y="http://example.com/NS/yoyo" > + @@ -353,21 +451,14 @@ The XML representation of the grammar might be: ```` -*We have another bootstrapping problem here: because the prefix* -`nsd` *is not declared, the XML shown is not namespace-well-formed. We -need some way of getting it declared, preferably other than by fiat, -but I don't currently see an alternative to fiat.* +An ixml parser supporting these namespace pragmas will emit +appropriate namespace bindings on the `x:sentence` element and the +prefixed names in the grammar will serialize in instances as prefixed +names in the XML, with appropriate namespace bindings. + +This example does not define a capability for changing namespace +bindings within a document. It's an example. -To make the XML be namespace well-formed, we will need somehow to get -at least a namespace declaration for *nsd* to be injected on the -`ixml` element, and preferably also namespace bindings for the -prefixes *x* and *y*, so the `ixml` start tag takes something like the -following form. -```` - - ```` ### Renaming @@ -376,6 +467,43 @@ serializing a nonterminal should be given a name different from the nonterminal itself. (As in Steven Pemberton's proposal for element renaming.) +In the following grammar, the two forms of month have different +syntaxes, so they are required to have different nonterminal names, +and so they are required to be serialized using different XML element +names. + +We define a renaming pragma which specifies the name to be used +when serializing a nonterminal as XML. A parser which does not +support the pragma will produce results in which some months +are named `month` and others `nmonth`; a parser which does +support the pragma will call them all `month`. + +```` + [@nsd:nsd http://example.com/ixml-namespaces] + [@nsd:sp https://lists.w3.org/Archives/Public/public-ixml/2021Oct/0014.html] + + date: day, " ", month, " ", year. + day: d, d?. + month: "January"; "February"; etc. + year: d, d, d, d. + + iso: year, "-", [sp:rename month] nmonth, "-", day. + nmonth: d, d. +```` + +The namespace bindings in the example assume namespace pragmas as +described above. Since we require pragmas to be associated with +extended names, some mechanism for binding shortnames to namespaces is +required for convenience. If we wish, however, we can formulate this +example with a literal URI-qualified name. In that case, the *iso* +rule would read as follows. + +```` + iso: year, "-", + [Q{https://lists.w3.org/Archives/Public/public-ixml/2021Oct/0014.html}:rename month] nmonth, + "-", day. +```` + ### Name indirection Using pragmas to specify that an element or attribute name should be @@ -385,7 +513,160 @@ nonterminal. ### Rule rewriting Using pragmas to specify that a rule as given is shorthand for a set -of other rules. (As in John Lumley's grammar rewriting for XPath.) +of other rules. Consider the following simple grammar for +arithmetic expressions. + +```` +expr: term; expr, addop, term. +term: factor; term, mulop, factor. +factor: number; var; -'(', -expr, -')'. +... +```` + +We might find it inconvenient that the number 42 is represented as +```` + + + + 42 + + + +```` + +One simple rule to simplify the XML representation of sentences in +this language is to specify that if an element *E* has only one child, +*E* should not be tagged and only the child should appear in the XML. + +We can do this in ixml by expanding the grammar, splitting each +nonterminal into two rules, one producing a visible serialization and +one hiding the nonterminal on serialization. + +```` +-EXPR: TERM; expr. +expr: EXPR, addop, TERM. +-TERM: FACTOR; term. +term: TERM, mulop, FACTOR. +-FACTOR: number; var; -'(', EXPR, -')'. +... +```` + +Now 42 parses more simply as `42`. + +The rewrite is mechanical enough that we can automate it, and +error-prone enough that it may be worth automating. If a rule has +some right-hand sides guaranteed to produce at most one child each and +some guaranteed to produce at least two children each, it's split into +two rules. The first gets a new nonterminal and has the original +single-child right-hand sides as alternatives, as well as a reference +to the original nonterminal. It's marked hidden. The second rule +gets the original nonterminal. All references to the original +nonterminal are changed to be references to the new nonterminal. + +If we call the relevant pragma *rewrite:no-unit-rules*, or more +briefly *r:nur*, the grammar takes the following form. Note that in +order to ensure that the first pragma is correctly interpreted as +belonging to the first rule and not to the grammar as a whole, we must +specify an explicit mark for the first rule. We specify one for the +second rule as well just for visual parallelism. (In practice, we +also need a rule that means "don't rewrite the entire rule, but +replace references to rules rewritten using *r:nur*; we call this +second pragma *r:ref*.) + +```` +^ [r:nur] expr: term; expr, addop, term. +^ [r:nur] term: factor; term, mulop, factor. +- [r:ref] factor: number; var; -'(', -expr, -')'. +... +```` + +The XML representation of this grammar can plausibly exploit the +ability of extension elements to contain an XML representation of the +new rules. Both the `r:nur` and the `r:ref` elements within a rule +instruct the implementation to replace the enclosing rule with the +rules appearing as children of the extension elements. + +```` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ... + +```` + + ### Tokenization annotation and alternative formulations. @@ -421,6 +702,35 @@ The rules for comments in ixml itself offer another wrinkle. Within a comment, any sequence of characters matching *cchar* can be recognized in a single operation; there is no need to look for +alternate parses that consume only some of the characters. So we +annotate the grammar and supply an alternative formulation of +*comment* that replaces it with two new rules: + +```` + ^ [ls:rewrite + comment: -"{", (cchars; comment)*, -"}". + [ls:token] cchars: cchar+. + ] + comment: -"{", (cchar; comment)*, -"}". + -cchar: ~["{}"]. +```` + +Or we may find it easier to read if we inject the alternative +formulation after, not before, the existing rule: + +```` + comment: -"{", (cchar; comment)*, -"}" + [ls:rewrite + comment: -"{", (cchars; comment)*, -"}". + [ls:token] cchars: cchar+. + ]. + -cchar: ~["{}"]. +```` + +Either way, the rewrite contains an alternative formulation of the +grammar which recognizes the same sentences and provides the same XML +representation but may be processed faster by some processors. + ### Text injection. @@ -541,10 +851,34 @@ attribute of *e0* from the same string as a name which happens to contain a string. This is not that serious proposal.) -*Example: synthesized value attribute and inherited environment attribute with variable bindings, for arithmetic expressions with 'let'.* +*Example: synthesized value attribute and inherited environment + attribute with variable bindings, for arithmetic expressions with + 'let'.* + +[Left as an exercise for the reader.] ## Open issues -* Is it really OK not to have a way to have pragmas turn into elements -before the first `rule` element? +* Ideally we would prefer to allow annotations on rules to precede the +mark on the left-hand side; an earlier version of the bracket-QName +proposal did allow them there, rather than after the mark. The +current version was changed in order to allow pragmas at the beginning +of a grammar to be attached to the grammar as a whole. + +* One result is that while for pragmas on symbols in a right-hand side + it doesn't matter whether they come before or after the mark, on the + left-hand side it does matter. It might be less confusing to + require that pragmas follow the mark on the right-hand side, to make + it parallel to the left-hand side. Or it might be less irritating + to allow them either before or after the mark. At the moment, the + proposal takes the second course. + +## Decisions to be made by the group + +* What name should be used for the magic namespace-binding namespace? + In the examples, we use "`http://example.com/ixml-namespaces`". + +* Alternatively, should the spec provide a magic namespace-binding + prefix analogous to `xmlns`? + From da80f34452a9890e20781545555f97339cc44e9b Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Tue, 30 Nov 2021 20:14:24 -0700 Subject: [PATCH 118/152] pragmas.md Add an open issue --- misc/temp.xy.ixml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 misc/temp.xy.ixml diff --git a/misc/temp.xy.ixml b/misc/temp.xy.ixml new file mode 100644 index 00000000..c7613e5e --- /dev/null +++ b/misc/temp.xy.ixml @@ -0,0 +1,4 @@ +x--sentence: x--a, ' ', y--b?, '. ', c. +x--a: 'Speed'. +y--b: 'kills'. +c: 'It really does.'. From 28059f44b72f339e94452fa4c466dbcd9765e6d1 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Tue, 30 Nov 2021 20:14:54 -0700 Subject: [PATCH 119/152] pragmas.md Add an open issue and a decision for the group --- misc/pragmas.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/misc/pragmas.md b/misc/pragmas.md index 84243b39..d4e1592b 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -874,6 +874,14 @@ of a grammar to be attached to the grammar as a whole. to allow them either before or after the mark. At the moment, the proposal takes the second course. +* The fact that extension elements can contain things that are +implicit but not explicit in the ixml form means that a schema for +the visible-XML form of a grammar, as described here, requires +manual intervention and not just a mechanical derivation from the +ixml grammar for ixml. That will make some people nervous, as +it makes us. But at the moment, it says here that this is the right +compromise. + ## Decisions to be made by the group * What name should be used for the magic namespace-binding namespace? @@ -882,3 +890,4 @@ of a grammar to be attached to the grammar as a whole. * Alternatively, should the spec provide a magic namespace-binding prefix analogous to `xmlns`? +* *I could have sworn there were more things to put here.* From fa56f0ac945b4e18b8f8e4f506fa3b1b0f9e0954 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Wed, 1 Dec 2021 11:35:19 -0700 Subject: [PATCH 120/152] pragmas.md One more copy-editing pass --- misc/pragmas.md | 194 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 140 insertions(+), 54 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index d4e1592b..c9f10183 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -1,6 +1,6 @@ # Pragmas for ixml -2021-11-16, rev. most recently 2021-11-30 +2021-11-16, rev. most recently 2021-12-01 This document describes a proposal for adding *pragmas* to the @@ -62,7 +62,7 @@ nonterminal. * Rule rewriting Using pragmas to specify that a rule as given is shorthand for a set -of other rules. (Example: John Lumley's grammar rewriting for XPath.) +of other rules, which can be obtained by rewriting the rule as given. * Tokenization annotation @@ -152,8 +152,8 @@ orthogonal. * What syntax should pragmas have in invisible XML? -* What representation should pragmas have in the XML serialization of -an ixml grammar? +* What representation should pragmas have in the XML form of a +grammar? * Where can pragmas appear? @@ -191,9 +191,10 @@ several locations: * immediately before the full stop of a rule; these pragmas apply to the rule. -Two locations are allowed for pragmas applying to rule in order to -allow them to appear either first or last; this is essentially a -rhetorical choice, as it can make a large difference to readability. +Two locations are allowed for pragmas applying to rules, in order to +allow them to appear either first or last. This is essentially a +rhetorical choice, but an important one as it can make a large +difference to readability. #### Marks on pragmas @@ -206,37 +207,55 @@ various XML constructs in the XML form of the grammar: * An ixml pragma marked `?` corresponds to a processing instruction. +To ensure that the ixml grammar has an XML representation, any two +pragmas marked `@` and attached to the same construct must have +different expanded names. + +Since ixml pragmas marked `@` all correspond to attributes, the +precise location at which the pragmas appear in the ixml form of a +grammar cannot (*or:* must not; *or:* by definition does not) convey +information relevant to the meaning or processing of the pragma. A +pragma marked `@`, for example, has the same meaning whether it +appears before the first rule in the grammar or after the last rule, +or at some point between rules in the grammar. Similarly the +positions of pragmas marked `@` relative to other pragmas attached to +the same construct carry no meaningful information. + + #### The XML form These XML constructs may occur in locations corresponding to those in which pragmas may appear in the ixml grammar: * as a child or attribute of the `ixml` element before, between, or - after `rule` elements. + after `rule` elements. These correspond to ixml pragmas occurring + before, between, or after rule elements. -* as a child or attribute of a `rule` element. An ixml pragma marked - `^` or `?` occurring on the left-hand side of a rule corresponds to an - extension element or processing instruction occurring before the - first `alt` child of the `rule` element; if it occurs immediately - before the full stop of the rule, it corresponds to an element or - processing instruction occurring after the last `alt` of the `rule`. +* as as attribute of a `rule` element, or as an extension element or + processing instruction occurring as a child of `rule`, either before + all `alt` children of the rule or after them. A pragma occurring + before the `alt` children corresponds to an ixml pragma marked `^` + or `?` occurring on the left-hand side of a rule; a pragma occurring + after the last `alt` child corresponds to an ixml pragma marked `^` + of `?` appearing in the whitespace before the full stop of the rule. * as a child or attribute of a `nonterminal`, `literal`, `inclusion`, - or `exclusion` element. + or `exclusion` element. These correspond to ixml pragmas occurring + immediately before the terminal or nonterminal symbol in question, + before or after the mark. -To ensure that the ixml grammar has an XML representation, any two -pragmas marked `@` and attached to the same construct must have -different expanded names. -When a grammar in XML form is serialized into ixml form, extension -attributes appearing on the `rule` element may be serialized either on +When a grammar in XML form is written out into ixml form, extension +attributes appearing on the `ixml` element may be serialized either +before the first rule, after the last one, or between any two rules. +Attributes appearing on the `rule` element may be serialized either on the left-hand side of the rule or before the full stop. Pragmas attached to a symbol in the right-hand side of a rule may be -serialized either before or after the mark; the two positions are -equivalent. +serialized either before or after the mark. In all of these cases, +the possible positions are all equivalent. -For attributes, the attribute name is the QName of the ixml pragma -and the attribute value is the pragma data. +For attributes, the attribute name is the QName of the ixml pragma and +the attribute value is the pragma data. For processing instructions, the PI name is the QName of the ixml pragma and the PI value is the pragma data. @@ -326,7 +345,7 @@ on the left-hand side of a rule correspond in the XML to attributes or children of `rule` elements. In the example, this is the case for the `my:color` pragma. -Annotations appearing immediately before an occurrence of a symbol in +Annotations appearing immediately before an occurrence of a symbol in the right-hand side of an ixml rule pertain to the occurrence of that symbol and correspond to attributes or children of the corresponding element in the XML grammar. In the example, this is the case for the @@ -379,7 +398,7 @@ binds the prefix *ns* to that namespace. That is, a pragma-aware processor must be on the alert for pragmas with the following properties: -* In the pragma's QName, the prefix and local name are the same +* In the pragma's QName, the prefix and local name are the same NCName (non-colonized name). * The pragma's data is the magic namespace name @@ -390,9 +409,9 @@ When that pragma is found, it is interpreted as binding prefix *ns* pragma with a QName using that prefix and a URI as pragma data is to be interpreted as a namespace declaration in the obvious way. -The corresponding constructs in the XML grammar are (a) a namespace -declaration binding the prefix *ns* to the given namespace and (b) an -attribute with the qualified name *ns:ns* with the value +In the XML form for grammars, the corresponding constructs are (a) a +namespace declaration binding the prefix *ns* to the given namespace +and (b) an attribute with the qualified name *ns:ns* with the value "`http://example.com/ixml-namespaces`". *(Alternatively, we could follow the example of XML namespaces and @@ -456,6 +475,11 @@ appropriate namespace bindings on the `x:sentence` element and the prefixed names in the grammar will serialize in instances as prefixed names in the XML, with appropriate namespace bindings. +The fallback behavior of a parser that does not support these pragmas +will be as under the current spec, which someone wearing a +language-lawyer hat tells us is probably to emit output that is +well-formed XML but not *namespace-well-formed* XML. + This example does not define a capability for changing namespace bindings within a document. It's an example. @@ -467,7 +491,7 @@ serializing a nonterminal should be given a name different from the nonterminal itself. (As in Steven Pemberton's proposal for element renaming.) -In the following grammar, the two forms of month have different +In the grammar below, the two forms of month have different syntaxes, so they are required to have different nonterminal names, and so they are required to be serialized using different XML element names. @@ -499,11 +523,16 @@ example with a literal URI-qualified name. In that case, the *iso* rule would read as follows. ```` - iso: year, "-", - [Q{https://lists.w3.org/Archives/Public/public-ixml/2021Oct/0014.html}:rename month] nmonth, - "-", day. +iso: + year, "-", + [Q{https://lists.w3.org/Archives/Public/public-ixml/2021Oct/0014.html}:rename month] nmonth, + "-", day. ```` +The fallback behavior of a parser that does not support these pragmas +will be to produce output using both the element name `month` and the +element name `nmonth`. + ### Name indirection Using pragmas to specify that an element or attribute name should be @@ -568,10 +597,10 @@ briefly *r:nur*, the grammar takes the following form. Note that in order to ensure that the first pragma is correctly interpreted as belonging to the first rule and not to the grammar as a whole, we must specify an explicit mark for the first rule. We specify one for the -second rule as well just for visual parallelism. (In practice, we +second rule as well just for visual parallelism. In practice, we also need a rule that means "don't rewrite the entire rule, but replace references to rules rewritten using *r:nur*; we call this -second pragma *r:ref*.) +second pragma *r:ref*. ```` ^ [r:nur] expr: term; expr, addop, term. @@ -666,6 +695,9 @@ rules appearing as children of the extension elements. ```` +The fallback behavior of a processor that doesn't support these +pragmas will be to serialize `expr` and `term` elements even when they +have only one child. ### Tokenization annotation and alternative formulations. @@ -702,8 +734,15 @@ The rules for comments in ixml itself offer another wrinkle. Within a comment, any sequence of characters matching *cchar* can be recognized in a single operation; there is no need to look for -alternate parses that consume only some of the characters. So we -annotate the grammar and supply an alternative formulation of +alternate parses that consume only some of the characters. But there +is no nonterminal here that matches all and only non-empty sequences +of *cchar*. In order to use the *ls:token* annotation here, we must +first rewrite the grammar at this point. So we introduce an +annotation named *ls:rewrite* to be attached to a single grammar rule +with the meaning that the pragma data provide an alternate form of the +rule. + +We can now annotate the grammar and supply an alternative formulation of *comment* that replaces it with two new rules: ```` @@ -720,10 +759,10 @@ formulation after, not before, the existing rule: ```` comment: -"{", (cchar; comment)*, -"}" - [ls:rewrite - comment: -"{", (cchars; comment)*, -"}". - [ls:token] cchars: cchar+. - ]. + [ls:rewrite + comment: -"{", (cchars; comment)*, -"}". + [ls:token] cchars: cchar+. + ]. -cchar: ~["{}"]. ```` @@ -731,6 +770,15 @@ Either way, the rewrite contains an alternative formulation of the grammar which recognizes the same sentences and provides the same XML representation but may be processed faster by some processors. +The fallback behavior of a processor that doesn't support these +pragmas will be to parse as usual using the grammar as specified. + +Note however that there is no guarantee or requirement that the +alternate rules in an *ls:rewrite* pragma be equivalent to the +fallback rules: pragmas may change the behavior of a processor, and +they may change the meaning of an expression (or here the meaning of a +grammar or part of it). + ### Text injection. @@ -785,7 +833,7 @@ would not involve any interesting new principles. A conventional system for reading attribute grammars and making parsers which parse input and calculate the values of grammatical attributes might represent this grammar thus, naming the grammatical -attribute *v* (this example follows, roughly the syntax of Alblas 191, +attribute *v* (this example follows, roughly the syntax of Alblas 1991, and like Alblas assumes whitespace is someone else's problem). ```` @@ -847,8 +895,8 @@ particular instance of a nonterminal, and *ag:rule* is assumed to contain a set of assignment statements specifying the values of particular attributes, in a subset of XPath syntax. (A more serious proposal would need some way to distinguish *e0.v* meaning "the *v* -attribute of *e0* from the same string as a name which happens to -contain a string. This is not that serious proposal.) +attribute of *e0*" from *e0.v* occurring as a name which happens to +contain a dot. This is not that serious proposal.) *Example: synthesized value attribute and inherited environment @@ -861,10 +909,10 @@ contain a string. This is not that serious proposal.) ## Open issues * Ideally we would prefer to allow annotations on rules to precede the -mark on the left-hand side; an earlier version of the bracket-QName -proposal did allow them there, rather than after the mark. The -current version was changed in order to allow pragmas at the beginning -of a grammar to be attached to the grammar as a whole. + mark on the left-hand side; an earlier version of the bracket-QName + proposal did allow them there, rather than after the mark. The + current version was changed in order to allow pragmas at the + beginning of a grammar to be attached to the grammar as a whole. * One result is that while for pragmas on symbols in a right-hand side it doesn't matter whether they come before or after the mark, on the @@ -875,15 +923,45 @@ of a grammar to be attached to the grammar as a whole. proposal takes the second course. * The fact that extension elements can contain things that are -implicit but not explicit in the ixml form means that a schema for -the visible-XML form of a grammar, as described here, requires -manual intervention and not just a mechanical derivation from the -ixml grammar for ixml. That will make some people nervous, as -it makes us. But at the moment, it says here that this is the right -compromise. + implicit but not explicit in the ixml form means that a schema for + the visible-XML form of a grammar, as described here, requires + manual intervention and not just a mechanical derivation from the + ixml grammar for ixml. That will make some people nervous, as it + makes us. But at the moment, it says here that this is the right + compromise. + +* Should ixml pragmas marked `@` be restricted in where they can + appear (e.g. before the first rule, not later; on the LHS of a rule, + not before the stop)? Rationale for current decision: it's simpler + not to restrict them, and restricting them does not allow us to get + rid of the rule that their precise location carries no meaning, + since we would still have to specify that their position relative to + other pragmas is not signficant. + +* Should the ixml pragmas for namespace declarations cause standard + XML namespace declarations for all prefixes declared? That would + allow an XSLT or XQuery processor to understand the namespace + bindings relevant for QNames appearing as nonterminal names. + Rationale for current decision: it's an example, not a proposal for + the spec, and it's complicated enough already. + +* Allow pragmas between `alt` elements / immediately before the + separator between top-level alternatives in a right-hand side? + + Con: things are complicated enough as it is. Pro: it would allow + pragmas to support the attribute-grammar use case. It would make + occurrence before, after, or between `alt` elements within a `rule` + parallel to occurrence before, after, or between `rule` elements + within the `ixml` element. + ## Decisions to be made by the group +The group may wish to weigh in on any of the open issues listed above, +assuming the authors have not made a decision and removed all trace of +the open issue before sending this document to the group. Some open +questions will need to be made by the group, not by the authors. + * What name should be used for the magic namespace-binding namespace? In the examples, we use "`http://example.com/ixml-namespaces`". @@ -891,3 +969,11 @@ compromise. prefix analogous to `xmlns`? * *I could have sworn there were more things to put here.* + +## References + +Alblas 1991. Henk Alblas, "Introduction to attribute grammars," in +*Attribute grammars, applications and systems:* *International summer +school SAGA, Prague, Czechoslovakia, June 4-13, 1991, Proceedings*, +ed. H. Alblas and B. Melichar (Berlin et al: Springer, 1991) = LNCS +545, pp. 1-15. From 8b3fdb9245a80d19a74e7f48891363a91329099d Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Fri, 3 Dec 2021 19:45:16 -0700 Subject: [PATCH 121/152] Small copy edits in pragmas.md. --- misc/pragmas.md | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index c9f10183..00aaffcc 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -815,14 +815,14 @@ value of the *expr*. * The value of a *term* consisting solely of a *factor* is the value of the *factor*. -* The value of a *term* consisting solely of a *term* followed by an +* The value of a *term* consisting of a *term* followed by an asterisk and a *factor* is the product of the values of the *term* and the *factor*. * The value of an *expr* consisting solely of a *term* is the value of the *term*. -* The value of an *expr* consisting solely of an *expr* followed by a +* The value of an *expr* consisting of an *expr* followed by a plus sign and a *term* is the sum of the values of the *expr* and the *term*. @@ -832,9 +832,10 @@ would not involve any interesting new principles. A conventional system for reading attribute grammars and making parsers which parse input and calculate the values of grammatical -attributes might represent this grammar thus, naming the grammatical -attribute *v* (this example follows, roughly the syntax of Alblas 1991, -and like Alblas assumes whitespace is someone else's problem). +attributes might represent this grammar as follows. We name the +grammatical attribute *v*. (This example follows roughly the syntax of +Alblas 1991, and like Alblas assumes whitespace is someone else's +problem.) ```` expr_0 → expr_1 '+' term. @@ -869,15 +870,15 @@ and like Alblas assumes whitespace is someone else's problem). Note that some nonterminals are subscripted so that references to their grammatical attributes can be unambiguous. To express this -grammar in ixml, we need either to allow multiple rules for the same -nonterminal, or to allow pragmas before connectors like comma or -semicolon, or we need to allow string-to-typed-value functions in the -style of XPath. I'll assume the latter two, along with a string() -function that returns the string value of a nonterminal. With these -assumptions, and the assumption that by means not specified the -prefix *ag* has been bound to an appropriate grammar for +grammar in ixml, we need either (1) to allow multiple rules for the +same nonterminal, or (2) to allow pragmas before connectors like comma +or semicolon, or (3) we need to allow string-to-typed-value functions +in the style of XPath. I'll assume the latter two, along with a +string() function that returns the string value of a nonterminal. With +these assumptions, and the assumption that by means not specified the +prefix *ag* has been bound to an appropriate namespace for attribute-grammar functionality, the attribute grammar could be -written thus using the brackets-QName syntax +written thus using the brackets-QName syntax: ```` [@ag:id e0] expr: [@ag:id e1] expr, s, '+', s, term @@ -887,7 +888,7 @@ written thus using the brackets-QName syntax factor: digit [@ag:rule factor.v := number(string(digit))]; '(', s, expr, s, ')' [@ag:rule factor.v := expr.v ]. digit: '0'; '1'; '2'; '3'; '4'; '5'; '6'; '7'; '8'; '9'. - s: [#20; #A; #D; #9]_. + s: [#20; #A; #D; #9]. ```` Here *ag:id* is assumed to associate a unique identifier with a From 7939126e02883a0b8568c45741a0b1663fe70d83 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Fri, 3 Dec 2021 19:54:48 -0700 Subject: [PATCH 122/152] Correct some errors caught by Tom Hillman in pragmas.md --- misc/pragmas.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 00aaffcc..f5e94c28 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -748,7 +748,7 @@ We can now annotate the grammar and supply an alternative formulation of ```` ^ [ls:rewrite comment: -"{", (cchars; comment)*, -"}". - [ls:token] cchars: cchar+. + [ls:token] -cchars: cchar+. ] comment: -"{", (cchar; comment)*, -"}". -cchar: ~["{}"]. @@ -761,7 +761,7 @@ formulation after, not before, the existing rule: comment: -"{", (cchar; comment)*, -"}" [ls:rewrite comment: -"{", (cchars; comment)*, -"}". - [ls:token] cchars: cchar+. + - [ls:token] cchars: cchar+. ]. -cchar: ~["{}"]. ```` @@ -806,7 +806,7 @@ expression as a synthesized (bottom-up) grammatical attribute following the rules: * The value of a *factor* consisting of a single digit is the value of -the integer usually so written: '0' has the value of zero, '1` has the +the integer usually so written: '0' has the value of zero, '1' has the value of one, etc. * The value of a *factor* consisting of a parenthesized *expr* is the @@ -883,7 +883,7 @@ written thus using the brackets-QName syntax: ```` [@ag:id e0] expr: [@ag:id e1] expr, s, '+', s, term [ag:rule e0.v := e1.v + term.v ]. - {@ag:id t0] term: [@ag:id t1] term, s, '_', s, factor + [@ag:id t0] term: [@ag:id t1] term, s, '_', s, factor [ag:rule t0.v := t1.v * factor.v]. factor: digit [@ag:rule factor.v := number(string(digit))]; '(', s, expr, s, ')' [@ag:rule factor.v := expr.v ]. @@ -955,6 +955,9 @@ contain a dot. This is not that serious proposal.) parallel to occurrence before, after, or between `rule` elements within the `ixml` element. +* Require pragmas occurring outside rules to be followed by a + full stop, so that pragmas can occur both before the mark on + a left-hand side and between rules? ## Decisions to be made by the group From 75326e795064575dd6f3184f3b4bed344076ea01 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Fri, 3 Dec 2021 21:58:22 -0700 Subject: [PATCH 123/152] pragmas.md Realize we have been assuming dynamic names and more. Add a scaled-back proposal and add a dynamic names use case. --- misc/pragmas.md | 217 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 213 insertions(+), 4 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index f5e94c28..6471831b 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -165,6 +165,40 @@ discussion; an earlier proposal (the 'hash-QName' proposal) has been withdrawn, though traces of it may remain in other documents in this branch. +In working out the details of the brackets-QName proposal it has +become clear that as described below it requires that ixml be extended +in various ways with mechanisms for: + +* Binding prefixes to namespaces so that QNames can be interpreted as +usual in XML and related specifications. (See the *Namespace +declarations* use case below.) + +* Serializing a nonterminal as an element or attribute whose name +is taken not from the grammar (as in ixml as currently specified) +but from the input data. (See the *Name indirection* use case below.) + +* Deciding whether to serialize a given nonterminal as an +element or as an attribute based on what is found in the data. +(This may require nothing more elaborate than what is +described in the *Renaming* use case below.) + +As suggested in the worked examples for the use cases, some of these +can themselves be introduced using pragmas, but it is clear that +extending ixml in these ways for the sake of pragmas may feel like a +heavy lift to some members of the community group. So we have also +prepared a scaled-back proposal, described below as the +*pragma-element* proposal, since one of its most visible properties is +that in the XML form of a grammar, all pragmas are represented as +`pragma` elements, and not in the various ways possible in the +brackets-QName proposal. + +The brackets-QName proposal is described first because it was +developed first and the authors currently think of the pragma-element +proposal in terms of its differences from the brackets-QName proposal. +Other things being equal, the authors realize it would be better +to describe the simpler proposal first. But time is short and other +things are not equal. + ### The brackets-QName proposal In this proposal, pragmas take the form of a left square bracket, an @@ -196,6 +230,42 @@ allow them to appear either first or last. This is essentially a rhetorical choice, but an important one as it can make a large difference to readability. +The relevant changes to the ixml grammar are these. First, in several +rules the nonterminal *S* is replaced by *SP* (space-or-pragma), to +allow pragmas to appear as described above: + +```` +ixml: SP, rule+SP, SP. +rule: (mark, SP)?, name, S, ["=:"], S, -alts, (pragma, SP)?, ".". +nonterminal: (mark, SP)?, name, S. +-quoted: (tmark, SP)?, -string. +-encoded: (tmark, SP)?, -"#", @hex, S. +inclusion: (tmark, SP)?, set. +exclusion: (tmark, SP)?, "~", S, set. +```` + +The new nonterminal *SP* and the nonterminals needed for pragmas +themselves are defined as follows. +```` +-SP: (S; pragma)*. +pragma: "[", @pmark?, @name, (S, pragma-data)?, "]". +@pmark: ["@^?"]. +pragma-data: (pragma-chars; pragma)*. +-pragma-chars: ~["[]"]*. +```` + +To make these ixml fragments easier to read, they use only +the marks currently supported by ixml. To read pragmas +in ixml form and produce the XML representation described +below will require either magic (i.e. the specification simply +says that pragmas are a special case and have their own rules +for translation into XML) or pragmas like those described below +in the worked examples. + +*The grammar fragments just given assume that pragmas +always use QNames; they should be extended to support +EQNames as well.* + #### Marks on pragmas Depending on the mark used in the ixml pragma, it may correspond to @@ -272,6 +342,9 @@ pragma.) In this way we ensure that the ixml and XML forms of a grammar contain the same information, although the XML form of the grammar may be easier to process by machine. +*See also the scaled-down proposal below.* + + #### Annotating symbols, rules, or grammars Viewed the other way around, as described in the Desiderata, pragmas @@ -357,6 +430,36 @@ appear as the last children of a `rule` element. In the example, this is the case for the `my:spin` pragma. +### Scaled-down proposal + +The scaled-down proposal differs from the brackets-QName +proposal primarily in its XML representations. + +* The ixml form is as described above, except that marks are + not allowed on pragmas. *(Or just ignored for the moment?)* + +* In the XML form of a grammar, all pragmas take the form of a +`pragma` element along the following lines, with the ellipses replaced +by appropriate attribute values, character sequences (inside +the `pragma-data` element), or element sequences (following +the `pragma-data` element). + +```` + + ... + ... + +```` + +This approach would be less pleasant to use than the current proposal, +but it would possibly be simpler to explain and to specify. + +The schema governing XML representations of grammars will +need to allow arbitrary sequences of elements following +the `pragma-data` child of `pragma`. This is probably best +handled by fiat. + + ## Worked examples *This section should contain, for some or all of the use cases, fully @@ -539,6 +642,103 @@ Using pragmas to specify that an element or attribute name should be taken not from the grammar but from the string value of a given nonterminal. +Consider the following grammar which recognizes a superset of +a simple subset of XML. It's a subset of XML for simplicity, and it's +a superset of the subset because a grammar written at this level +cannot enforce the well-formedness constraints of XML. +```` +{ A grammar for a small subset of XML, for use as an illustration. } + +element: start-tag, content, end-tag; sole-tag. + +-start-tag: "<", @gi, (ws, attribute)*, ws?, ">". +-end-tag: "". +-sole-tag: "<", @gi, (ws, attribute)*, ws?, "/>". + +attribute: @name, ws?, "=", ws?, @value. +@value: dqstring; sqstring. +-dqstring: dq, ~['"']*, dq. +-sqstring: sq, ~["'"]*, sq. +-dq: -['"']. +-sq: -["'"]. + +-content: (PCDATA; processing-instruction; comment; element)*. + +PCDATA: (~["<>&"]; "&"; "<"; ">")*. +processing-instruction: "". +comment: "<--", commentdata, "-->". + +gi: name. +gi2: name. +{ name is left as an exercise for the reader. } + +ws: (#20; #A; #C; #9)+. +```` + +Among the input sequences which should be accepted +by this grammar is the following XML representation of a +haiku. + +```` + + When the old pond + gets a new frog + it's a new pond. + +```` + +We might like an ixml processor to read this and produce +the same XML that any XML parser would produce. (This +desire makes sense only when the ixml processor's results +are supplied to a user in a DOM or XDM or SAX or other +XML API or model.) What the grammar above will produce +is isomorphic to this result, but not the same (*WARNING: +output produced manually, may be inaccurate*): + +```` + + + + + When the old pond + + + gets a new frog + + + It's a new pond. + + +```` + +We can specify that we want normal XML from the grammar using +the pragmas: + +* `xp:name` *expression* - specifies that the name under which a +nonterminal is to be serialized is given by the value of the supplied +XPath expression, interpreted with the standard ixml result element as +the context node and with the result coerced to type *xs:string*. + +* `xp:serialize` *keyword* - specifies that the nonterminal is to be +serialized as specified by the keyword (which is assumed to be +`attribute`, `element`, or the name of some other XPath node test). + +* `xp:drop` - specifies that the nonterminal so annotated is to be +suppressed entirely, along with the entire parse tree dominated by the +nonterminal.' + +With these pragmas, we can annotate the *element* and *attribute* +rules appropriately: +```` +^ [xp:name @gi] element: start-tag, content, end-tag; sole-tag. +... +-end-tag: "". +... +^ [xp:serialize attribute] + [xp:name @name] + attribute: @name, ws?, "=", ws?, @value. +```` + ### Rule rewriting Using pragmas to specify that a rule as given is shorthand for a set @@ -909,12 +1109,25 @@ contain a dot. This is not that serious proposal.) ## Open issues +* The standard rules for translating an ixml grammar to XML form + by parsing it against *ixml.ixml* do not produce the results + described here. Either we just impose them by fiat, or we need + a fully worked out proposal for generating XML names from + the input data. + + This is a major stumbling block. + * Ideally we would prefer to allow annotations on rules to precede the mark on the left-hand side; an earlier version of the bracket-QName proposal did allow them there, rather than after the mark. The current version was changed in order to allow pragmas at the beginning of a grammar to be attached to the grammar as a whole. + If pragmas occurring outside rules are syntactically distinct (e.g. + if they are always to be followed by a full stop), then pragmas can + occur both before the mark on a left-hand side and between rules. + Worth doing? + * One result is that while for pragmas on symbols in a right-hand side it doesn't matter whether they come before or after the mark, on the left-hand side it does matter. It might be less confusing to @@ -955,10 +1168,6 @@ contain a dot. This is not that serious proposal.) parallel to occurrence before, after, or between `rule` elements within the `ixml` element. -* Require pragmas occurring outside rules to be followed by a - full stop, so that pragmas can occur both before the mark on - a left-hand side and between rules? - ## Decisions to be made by the group The group may wish to weigh in on any of the open issues listed above, From 6dc4cff0d3304f535cba7bcb99fc3075987a1e25 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Fri, 3 Dec 2021 22:06:54 -0700 Subject: [PATCH 124/152] ixml.ixml Attempt to work out grammatical details a bit. Resolved (some) conflicts with main branch. --- ixml.ixml | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/ixml.ixml b/ixml.ixml index ff9e4ee8..01f0c70e 100644 --- a/ixml.ixml +++ b/ixml.ixml @@ -1,5 +1,7 @@ - ixml: s, rule+s, s. + ixml: SP, rule+SP, SP. + -SP: (s; pragma)*. + -s: (whitespace; comment)*. -whitespace: -[Zs]; tab; lf; cr. -tab: -#9. @@ -8,10 +10,19 @@ comment: -"{", (cchar; comment)*, -"}". -cchar: ~["{}"]. - rule: (mark, s)?, name, s, -["=:"], s, -alts, -".". + pragma: "[", @pmark?, @pname, (s, pragma-data)?, "]". + @pname: -QName; -EQName. + -QName: -name, ':', -name. + -EQName: 'Q{', -ns-name, '}', -name. + -ns-name: ~["{}"; '"'; "'"]* { oversimplification }. + @pmark: ["@^?"]. + pragma-data: (pragma-chars; pragma)*. +-pragma-chars: ~["[]"]*. + + rule: (mark, SP)?, name, s, ["=:"], s, -alts, (pragma, SP)?, ".". @mark: ["@^-"]. - alts: alt+(-[";|"], s). - alt: term*(-",", s). + alts: alt+([";|"], s). + alt: term*(",", s). -term: factor; option; repeat0; @@ -23,13 +34,13 @@ repeat1: factor, -"+", s, sep?. option: factor, -"?", s. sep: factor. - nonterminal: (mark, s)?, name, s. + nonterminal: (mark, SP)?, name, s. -terminal: literal; charset. literal: quoted; encoded. - -quoted: (tmark, s)?, string. + -quoted: (tmark, SP)?, -string. @name: namestart, namefollower*. -namestart: ["_"; L]. @@ -37,19 +48,19 @@ @tmark: ["^-"]. @string: -'"', dchar+, -'"', s; - -"'", schar+, -"'", s. + -"'", schar+, -"'", s. dchar: ~['"'; #a; #d]; '"', -'"'. {all characters except line breaks; quotes must be doubled} schar: ~["'"; #a; #d]; "'", -"'". {all characters except line breaks; quotes must be doubled} - -encoded: (tmark, s)?, -"#", @hex, s. + -encoded: (tmark, SP)?, -"#", @hex, s. hex: ["0"-"9"; "a"-"f"; "A"-"F"]+. -charset: inclusion; exclusion. - inclusion: (tmark, s)?, set. - exclusion: (tmark, s)?, -"~", s, set. - -set: -"[", s, member*(-[";|"], s), -"]", s. + inclusion: (tmark, SP)?, set. + exclusion: (tmark, SP)?, "~", s, set. + -set: "[", s, member*([";|"], s), "]", s. -member: literal; range; class. From 13063c9db466f3d7dd393b423f8bc767e79c0187 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Sat, 4 Dec 2021 08:53:37 -0700 Subject: [PATCH 125/152] Restructure pragmas.md Work out a better way to present the fixed- and variable-form proposals. --- misc/pragmas.md | 328 ++++++++++++++++++++++++++++-------------------- 1 file changed, 194 insertions(+), 134 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 6471831b..1a1e9942 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -1,6 +1,6 @@ # Pragmas for ixml -2021-11-16, rev. most recently 2021-12-01 +2021-11-16, rev. most recently 2021-12-04 This document describes a proposal for adding *pragmas* to the @@ -165,9 +165,11 @@ discussion; an earlier proposal (the 'hash-QName' proposal) has been withdrawn, though traces of it may remain in other documents in this branch. +### The brackets-QName proposal + In working out the details of the brackets-QName proposal it has -become clear that as described below it requires that ixml be extended -in various ways with mechanisms for: +become clear that as initially conceived it requires that ixml be +extended in various ways with mechanisms for: * Binding prefixes to namespaces so that QNames can be interpreted as usual in XML and related specifications. (See the *Namespace @@ -182,29 +184,22 @@ element or as an attribute based on what is found in the data. (This may require nothing more elaborate than what is described in the *Renaming* use case below.) -As suggested in the worked examples for the use cases, some of these -can themselves be introduced using pragmas, but it is clear that -extending ixml in these ways for the sake of pragmas may feel like a -heavy lift to some members of the community group. So we have also -prepared a scaled-back proposal, described below as the -*pragma-element* proposal, since one of its most visible properties is -that in the XML form of a grammar, all pragmas are represented as -`pragma` elements, and not in the various ways possible in the -brackets-QName proposal. - -The brackets-QName proposal is described first because it was -developed first and the authors currently think of the pragma-element -proposal in terms of its differences from the brackets-QName proposal. -Other things being equal, the authors realize it would be better -to describe the simpler proposal first. But time is short and other -things are not equal. +Some of these extensions can themselves be introduced using pragmas, +as illustrated in the *Worked examples* section below, but it is clear +that adding so much new functionality to ixml for the sake of pragmas +may feel like a heavy lift to some members of the community group. So +the discussion below describes two variants of the bracket-QName +proposal: a 'fixed-form' variant and a 'variable-form' variant, so +named for the relative fixity or variation in the XML representation +of pragmas in the two forms of the proposal. For brevity they are +often referred to as F and V respectively. Since they have a great +deal in common, they are described in parallel rather than separately. -### The brackets-QName proposal +In both forms of this proposal, pragmas in ixml take the form of a +left square bracket, an optional mark, a QName or a 'URI-qualified +name', the pragma's data, and a right square bracket. Nested pairs of +square brackets are allowed, so pragmas can nest arbitrarily deep. -In this proposal, pragmas take the form of a left square bracket, an -optional mark, a QName, the pragma's data, and a right square bracket. -Nested pairs of square brackets are allowed, so pragmas can nest -arbitrarily deep. #### The ixml form @@ -235,41 +230,49 @@ rules the nonterminal *S* is replaced by *SP* (space-or-pragma), to allow pragmas to appear as described above: ```` -ixml: SP, rule+SP, SP. -rule: (mark, SP)?, name, S, ["=:"], S, -alts, (pragma, SP)?, ".". -nonterminal: (mark, SP)?, name, S. --quoted: (tmark, SP)?, -string. --encoded: (tmark, SP)?, -"#", @hex, S. -inclusion: (tmark, SP)?, set. -exclusion: (tmark, SP)?, "~", S, set. + ixml: SP, rule+SP, SP. + rule: (mark, SP)?, name, S, ["=:"], S, -alts, (pragma, SP)?, ".". + nonterminal: (mark, SP)?, name, S. + -quoted: (tmark, SP)?, -string. + -encoded: (tmark, SP)?, -"#", @hex, S. + inclusion: (tmark, SP)?, set. + exclusion: (tmark, SP)?, "~", S, set. ```` The new nonterminal *SP* and the nonterminals needed for pragmas themselves are defined as follows. + +```` + -SP: (S; pragma)*. + pragma: "[", @pmark?, @pname, (S, pragma-data)?, "]". + @pname: -QName; -UQName. + -QName: -name, ':', -name. + -UQName: 'Q{', -ns-name, '}', -name. + -ns-name: ~["{}"; '"'; "'"]* { oversimplification }. + @pmark: ["@^?"]. + pragma-data: (pragma-chars; pragma)*. + -pragma-chars: ~["[]"]*. ```` --SP: (S; pragma)*. -pragma: "[", @pmark?, @name, (S, pragma-data)?, "]". -@pmark: ["@^?"]. -pragma-data: (pragma-chars; pragma)*. --pragma-chars: ~["[]"]*. + +Note that these ixml fragments use only the marks and serialization +rules currently supported by ixml. If the variable-form proposal is +adopted, it will probably make sense to add new marks or new +serialization rules, or both. + +A simple example illustrates the core syntactic ideas: +```` + [my:pitch C#] + ^ [my:color blue] a = b, [@my:flavor vanilla] c? [my:spin ...]. ```` -To make these ixml fragments easier to read, they use only -the marks currently supported by ixml. To read pragmas -in ixml form and produce the XML representation described -below will require either magic (i.e. the specification simply -says that pragmas are a special case and have their own rules -for translation into XML) or pragmas like those described below -in the worked examples. +This fragment assumes that the prefix *my* is bound to some namespace, +by means not shown here (*and to be determined*). -*The grammar fragments just given assume that pragmas -always use QNames; they should be extended to support -EQNames as well.* -#### Marks on pragmas +#### Marks on pragmas in V -Depending on the mark used in the ixml pragma, it may correspond to -various XML constructs in the XML form of the grammar: +In the variable-form proposal, the *pmark* signals which of various +XML constructs represents the pragma in the XML form of the grammar: * An ixml pragma marked `^` corresponds to an extension element. @@ -291,38 +294,80 @@ or at some point between rules in the grammar. Similarly the positions of pragmas marked `@` relative to other pragmas attached to the same construct carry no meaningful information. +#### Marks on pragmas in F + +In the fixed-form proposal, the *pmark* is included but has no special +meaning for a standard processor, since all pragmas have the same +representation in XML grammars. + + +#### The XML form of pragmas in F #### + +In F, all pragmas in the XML form of a grammar take the form +implicitly described by the grammar fragments shown earlier: a +`pragma` element with attributes named *pname* and *pmark* and a child +element named `pragma-data`. -#### The XML form +It is not signaled in the ixml grammar (because ixml has no way to say +it), but other child elements may follow the `pragma-data` element. +Their content is required to be reconstructible from the pragma data +and the fallback expression, but they may express the information in a +more convenient form. (For example, the pragma data may be a +structured expression which a conforming application will parse; the +parsed form of the pragma data may be enclosed in the pragma.) In this +way we ensure that the ixml and XML forms of a grammar contain the +same information, although the XML form of the grammar may be easier +to process by machine. -These XML constructs may occur in locations corresponding to those in -which pragmas may appear in the ixml grammar: +For example, the ixml pragma `[my:pitch C#]` corresponds to the following +XML pragma -* as a child or attribute of the `ixml` element before, between, or +```` + + C# + ... + +```` + +The ellipsis shows where additional elements not constrained by this +proposal may appear. The only constraint is that it must be possible +in principle to construct them from the ixml form of the grammar. + +It follows from the grammar fragments above that in an XML grammar, +pragmas may occur in locations, which annotate different parts of the +grammar.: + +* as a child of the `ixml` element before, between, or after `rule` elements. These correspond to ixml pragmas occurring before, between, or after rule elements. -* as as attribute of a `rule` element, or as an extension element or - processing instruction occurring as a child of `rule`, either before - all `alt` children of the rule or after them. A pragma occurring - before the `alt` children corresponds to an ixml pragma marked `^` - or `?` occurring on the left-hand side of a rule; a pragma occurring - after the last `alt` child corresponds to an ixml pragma marked `^` - of `?` appearing in the whitespace before the full stop of the rule. +* as a child of the `rule` element, either before all `alt` children + of the rule or after them. A pragma occurring before the `alt` + children corresponds to an ixml pragma occurring on the left-hand + side of a rule; a pragma occurring after the last `alt` child + corresponds to an ixml pragma appearing in the whitespace before the + full stop of the rule. -* as a child or attribute of a `nonterminal`, `literal`, `inclusion`, - or `exclusion` element. These correspond to ixml pragmas occurring +* as a child of a `nonterminal`, `literal`, `inclusion`, or +`exclusion` element. These correspond to ixml pragmas occurring immediately before the terminal or nonterminal symbol in question, before or after the mark. +#### The XML form of pragmas in V + +In the variable-form proposal, XML pragmas may occur in the same +locations as elements or processing instructions, and may also occur +as attributes on the parent element. + When a grammar in XML form is written out into ixml form, extension attributes appearing on the `ixml` element may be serialized either before the first rule, after the last one, or between any two rules. Attributes appearing on the `rule` element may be serialized either on -the left-hand side of the rule or before the full stop. Pragmas +the left-hand side of the rule or before the full stop. Pragmas attached to a symbol in the right-hand side of a rule may be -serialized either before or after the mark. In all of these cases, -the possible positions are all equivalent. +serialized either before or after the mark. In all of these cases, the +possible positions are all equivalent. For attributes, the attribute name is the QName of the ixml pragma and the attribute value is the pragma data. @@ -332,17 +377,8 @@ ixml pragma and the PI value is the pragma data. For extension elements, the element name is the QName of the ixml pragma and the pragma data appears as character data within a child -named `pragma-data`. Other child elements may follow the -`pragma-data` element; their content is required to be reconstructible -from the pragma data and the fallback expression, but they may express -the information in a more convenient form. (For example, the pragma -data may be a structured expression which a conforming application -will parse; the parsed form of the pragma data may be enclosed in the -pragma.) In this way we ensure that the ixml and XML forms of a -grammar contain the same information, although the XML form of the -grammar may be easier to process by machine. - -*See also the scaled-down proposal below.* +named `pragma-data`. As in proposal F, the element may contain other +XML elements with a structured representation of relevant information. #### Annotating symbols, rules, or grammars @@ -380,6 +416,8 @@ as a whole, as follows: * Pragmas applicable to the grammar as a whole appear the first rule. +F and V are the same in this regard. + #### An example For example: @@ -389,7 +427,7 @@ For example: ^ [my:color blue] a = b, [@my:flavor vanilla] c? [my:spin ...]. ```` -The corresponding XML form is: +The corresponding XML form in proposal V is: ```` @@ -409,6 +447,32 @@ The corresponding XML form is: ```` +In F, the corresponding XML form is: + +```` + + C# + + + + blue + + + + + + + ... + + +```` + Annotations appearing between rules in the ixml correspond to nodes in the XML appearing as children or attributes of the `ixml` element. In the example, this is the case for the `my:pitch` pragma. @@ -430,36 +494,6 @@ appear as the last children of a `rule` element. In the example, this is the case for the `my:spin` pragma. -### Scaled-down proposal - -The scaled-down proposal differs from the brackets-QName -proposal primarily in its XML representations. - -* The ixml form is as described above, except that marks are - not allowed on pragmas. *(Or just ignored for the moment?)* - -* In the XML form of a grammar, all pragmas take the form of a -`pragma` element along the following lines, with the ellipses replaced -by appropriate attribute values, character sequences (inside -the `pragma-data` element), or element sequences (following -the `pragma-data` element). - -```` - - ... - ... - -```` - -This approach would be less pleasant to use than the current proposal, -but it would possibly be simpler to explain and to specify. - -The schema governing XML representations of grammars will -need to allow arbitrary sequences of elements following -the `pragma-data` child of `pragma`. This is probably best -handled by fiat. - - ## Worked examples *This section should contain, for some or all of the use cases, fully @@ -537,7 +571,7 @@ the *y* namespace, and some in no namespace at all, might be y:b: 'kills'. c: 'It really does.'. ```` -The XML representation of the grammar might be: +The XML representation of the grammar might be (in form V): ```` ```` +In form F, the beginning of the grammar is different: + +```` + + + http://example.com/ixml-namespaces + + + http://example.com/NS/existential + + + http://example.com/NS/yoyo + + ... +```` + An ixml parser supporting these namespace pragmas will emit appropriate namespace bindings on the `x:sentence` element and the prefixed names in the grammar will serialize in instances as prefixed @@ -647,32 +697,32 @@ a simple subset of XML. It's a subset of XML for simplicity, and it's a superset of the subset because a grammar written at this level cannot enforce the well-formedness constraints of XML. ```` -{ A grammar for a small subset of XML, for use as an illustration. } - -element: start-tag, content, end-tag; sole-tag. - --start-tag: "<", @gi, (ws, attribute)*, ws?, ">". --end-tag: "". --sole-tag: "<", @gi, (ws, attribute)*, ws?, "/>". - -attribute: @name, ws?, "=", ws?, @value. -@value: dqstring; sqstring. --dqstring: dq, ~['"']*, dq. --sqstring: sq, ~["'"]*, sq. --dq: -['"']. --sq: -["'"]. - --content: (PCDATA; processing-instruction; comment; element)*. - -PCDATA: (~["<>&"]; "&"; "<"; ">")*. -processing-instruction: "". -comment: "<--", commentdata, "-->". - -gi: name. -gi2: name. -{ name is left as an exercise for the reader. } - -ws: (#20; #A; #C; #9)+. + { A grammar for a small subset of XML, for use as an illustration. } + + element: start-tag, content, end-tag; sole-tag. + + -start-tag: "<", @gi, (ws, attribute)*, ws?, ">". + -end-tag: "". + -sole-tag: "<", @gi, (ws, attribute)*, ws?, "/>". + + attribute: @name, ws?, "=", ws?, @value. + @value: dqstring; sqstring. + -dqstring: dq, ~['"']*, dq. + -sqstring: sq, ~["'"]*, sq. + -dq: -['"']. + -sq: -["'"]. + + -content: (PCDATA; processing-instruction; comment; element)*. + + PCDATA: (~["<>&"]; "&"; "<"; ">")*. + processing-instruction: "". + comment: "<--", commentdata, "-->". + + gi: name. + gi2: name. + { name is left as an exercise for the reader. } + + ws: (#20; #A; #C; #9)+. ```` Among the input sequences which should be accepted @@ -895,6 +945,10 @@ rules appearing as children of the extension elements. ```` +The attentive reader will note that the XML form shown is that for the +V proposal; the form it would take in the F proposal should be easily +constructed. + The fallback behavior of a processor that doesn't support these pragmas will be to serialize `expr` and `term` elements even when they have only one child. @@ -1109,6 +1163,12 @@ contain a dot. This is not that serious proposal.) ## Open issues +* In the fixed-form variant, drop *pmark* entirely? The current text + leaves it in, on the theory that if it is retained, then it is possible + in principle to adopt the fixed-form variant in the ixml spec and + then use pragmas to specify the behavior of the variable-form + variant. + * The standard rules for translating an ixml grammar to XML form by parsing it against *ixml.ixml* do not produce the results described here. Either we just impose them by fiat, or we need From dbdc2aeb2c3c1d8830d6a64c0f949f88c7295f92 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Sat, 4 Dec 2021 08:57:57 -0700 Subject: [PATCH 126/152] pragmas.md Add slot for pragmas-for-pragmas demo --- misc/pragmas.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/misc/pragmas.md b/misc/pragmas.md index 1a1e9942..c30b82b2 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -1160,6 +1160,15 @@ contain a dot. This is not that serious proposal.) [Left as an exercise for the reader.] +### Pragmas for proposal V + +In the ideal case, it should be possible to use pragmas defined +as in proposal F to describe the behavior of processors under +proposal V. + +*Example to be worked out with list of the required pragmas +and annotated version of the ixml grammar fragments given +earlier.* ## Open issues From 24b42f8961ba3865819f4051caf16c5f0903dcbe Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Sat, 4 Dec 2021 11:09:31 -0700 Subject: [PATCH 127/152] pragmas for pragmas in pragmas.md Add a sketch of pragmas for proposal V. --- misc/pragmas.md | 80 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/misc/pragmas.md b/misc/pragmas.md index c30b82b2..dda5e674 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -1170,6 +1170,86 @@ proposal V. and annotated version of the ixml grammar fragments given earlier.* +The differences between proposals F and V all lie in the +XML representation of pragmas: + +* In F, the element and attribute names of the pragma element + are fixed; in V the element name is assigned dynamically. + +* In F, all pragmas are elements; in V, some are attributes and some + are processing instructions. + +* In F, the *pname* and *pmark* appear as attributes on the + pragma; in V they affect the name and form of the XML pragma + but do not appear as content, attributes, or children. + +The section above on name indirection illustrates ways to solve the +first and third of these. We can adapt the pragmas shown there and +add a third for the remaining item, so that we have three pragmas, +which we define in terms of their operation on an XML representation +of the raw parse tree (i.e. the one an ixml processor would produce if +it ignored all marks); a processor might implement the pragma +differently, as long as the result were the same. + +The first two of these pragmas are defined to apply to a rule and they +describe the relation of the serialized XML for instances of that rule +to the raw parse tree for that instance. + +* `pr:as` *pmark*?: If the *pmark* argument is `^` or absent, the + nonterminal is serialized as an element; if it's `@`, the + nonterminal is serialized as an attribute; if it's `?`, the + nonterminal is serialized as a processing instruction. + +* `pr:name` *pname*: The *pname* is specified by an expression (we + will assume a small subset of XPath). If the value is a lexical + QName, that QName is the name of the corresponding XML node; if the + value is a URIQualifiedName (of the form + Q{namespace-name}local-name), then a prefix is chosen, a lexical + QName is formed from that prefix and the specified local name, and + any namespace declarations necessary to bind the chosen prefix to + the specified URI are created and added to an appropriate element. + +The third pragma applies to nonterminals in a right-hand side. + +* `pr:drop`: The parse tree rooted in the nonterminal annotated with + `pr:drop` does not appear in the serialization. Since that subtree + may be used (e.g. to supply an element name), it is important as a + practical matter that this pragma be interpreted after the others. + +With these three pragmas, the ixml rule for *pragma* can be annotated +as follows: + +```` + ^ [pr:as string(pmark)] + [pr:name string(pname)] + pragma: "[", [pr:drop] @pmark?, [pr:drop] @pname, (S, pragma-data)?, "]". +``` + +Alternatively, we could define a single pragma with a sequence of +comma-separated property/value pairs, using parenthesized +comma-separated values to specify multiple values: + +```` + ^ [pr:v name: string(pname), + as: string(pmark), + drop: (pmark, pname)] + pragma: "[", @pmark?, @pname, (S, pragma-data)?, "]". +``` + +Note: The `pr:v` (for 'pragmas proposal V') pragma seems less general +than the earlier set, but it feels slightly lighter-weight. + +Note: The `pr:as` pragma is very ad hoc; a more general approach would +say that its argument should be one of 'element', 'attribute', +'processing-instruction', 'comment', 'text'. But then we would need +some way of saying "if the string value of *pmark* is '^', then +'element', otherwise ...", and that seems likely to lead to a long +slide down a slippery slope to a Turing-complete programming +language. One of the nice things about defining your own pragmas is +that you can give them ad hoc semantics if you need to, without +spoiling things for other people. + + ## Open issues * In the fixed-form variant, drop *pmark* entirely? The current text From 0b60baa451942d73f425554ac2a48c368365af23 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Sat, 4 Dec 2021 11:23:10 -0700 Subject: [PATCH 128/152] Update pragmas.md I hate MarkDown. --- misc/pragmas.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index dda5e674..0ed3a1ce 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -1223,7 +1223,7 @@ as follows: ^ [pr:as string(pmark)] [pr:name string(pname)] pragma: "[", [pr:drop] @pmark?, [pr:drop] @pname, (S, pragma-data)?, "]". -``` +```` Alternatively, we could define a single pragma with a sequence of comma-separated property/value pairs, using parenthesized @@ -1234,7 +1234,7 @@ comma-separated values to specify multiple values: as: string(pmark), drop: (pmark, pname)] pragma: "[", @pmark?, @pname, (S, pragma-data)?, "]". -``` +```` Note: The `pr:v` (for 'pragmas proposal V') pragma seems less general than the earlier set, but it feels slightly lighter-weight. From f49bf25c6494105d5f20ab5e17844ff7ff685704 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Sat, 4 Dec 2021 14:50:02 -0700 Subject: [PATCH 129/152] pragmas.md one more copy-editing pass (but slacked off at the end) --- misc/pragmas.md | 160 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 110 insertions(+), 50 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 0ed3a1ce..a4af8921 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -80,7 +80,7 @@ ixml grammar to allow different annotation or better optimization. Using pragmas to indicate that a particular string should be injected into the XML representation of the input as (part of) a text node, or as an attribute or element. (This can help make the output of -an ixml parse conform to a pre-existing schema.) +an ixml parser conform to a pre-existing schema.) * Attribute grammar specification @@ -88,9 +88,9 @@ an ixml parse conform to a pre-existing schema.) grammatical attributes to be associated with nodes of the parse tree, whether they are inherited from an ancestor or an elder sibling or synthesized from the children of a node, and what values should be -assigned to them. (Note that grammatical attributes are not to be -confused with XML attributes, although in particular cases it may be -helpful to render a grammatical attribute as an XML attribute.) +assigned to them. Grammatical attributes are not to be confused with +XML attributes, although in particular cases it may be helpful to +render a grammatical attribute as an XML attribute. *Are there other use cases that need to be mentioned here?* @@ -222,36 +222,36 @@ several locations: Two locations are allowed for pragmas applying to rules, in order to allow them to appear either first or last. This is essentially a -rhetorical choice, but an important one as it can make a large -difference to readability. +rhetorical choice, but an important one as it can make a difference to +readability. The relevant changes to the ixml grammar are these. First, in several rules the nonterminal *S* is replaced by *SP* (space-or-pragma), to allow pragmas to appear as described above: ```` - ixml: SP, rule+SP, SP. - rule: (mark, SP)?, name, S, ["=:"], S, -alts, (pragma, SP)?, ".". - nonterminal: (mark, SP)?, name, S. - -quoted: (tmark, SP)?, -string. - -encoded: (tmark, SP)?, -"#", @hex, S. - inclusion: (tmark, SP)?, set. - exclusion: (tmark, SP)?, "~", S, set. +ixml: SP, rule+SP, SP. +rule: (mark, SP)?, name, S, ["=:"], S, -alts, (pragma, SP)?, ".". +nonterminal: (mark, SP)?, name, S. +-quoted: (tmark, SP)?, -string. +-encoded: (tmark, SP)?, -"#", @hex, S. +inclusion: (tmark, SP)?, set. +exclusion: (tmark, SP)?, "~", S, set. ```` The new nonterminal *SP* and the nonterminals needed for pragmas themselves are defined as follows. ```` - -SP: (S; pragma)*. - pragma: "[", @pmark?, @pname, (S, pragma-data)?, "]". - @pname: -QName; -UQName. - -QName: -name, ':', -name. - -UQName: 'Q{', -ns-name, '}', -name. - -ns-name: ~["{}"; '"'; "'"]* { oversimplification }. - @pmark: ["@^?"]. - pragma-data: (pragma-chars; pragma)*. - -pragma-chars: ~["[]"]*. +-SP: (S; pragma)*. +pragma: -"[", @pmark?, @pname, (S, pragma-data)?, -"]". +@pname: -QName; -UQName. +-QName: -name, ':', -name. +-UQName: 'Q{', -ns-name, '}', -name. +-ns-name: ~["{}"; '"'; "'"]* { oversimplification }. +@pmark: ["@^?"]. +pragma-data: (pragma-chars; pragma)*. +-pragma-chars: ~["[]"]*. ```` Note that these ixml fragments use only the marks and serialization @@ -334,8 +334,8 @@ proposal may appear. The only constraint is that it must be possible in principle to construct them from the ixml form of the grammar. It follows from the grammar fragments above that in an XML grammar, -pragmas may occur in locations, which annotate different parts of the -grammar.: +pragmas may occur in different locations which annotate different +parts of the grammar.: * as a child of the `ixml` element before, between, or after `rule` elements. These correspond to ixml pragmas occurring @@ -357,8 +357,8 @@ grammar.: #### The XML form of pragmas in V In the variable-form proposal, XML pragmas may occur in the same -locations as elements or processing instructions, and may also occur -as attributes on the parent element. +locations when they take the form of elements or processing +instructions. They also occur as attributes on the parent element. When a grammar in XML form is written out into ixml form, extension attributes appearing on the `ixml` element may be serialized either @@ -381,11 +381,52 @@ named `pragma-data`. As in proposal F, the element may contain other XML elements with a structured representation of relevant information. +#### Pragmas and other extension mechanisms + +Some XML formats make the provision that any namespace-qualified +attributes and elements may occur in documents, provided their +namespace is not reserved for other purposes. For example, both XSLT +and XSD provide that namespace-qualified attributes in other namespace +may appear on elements in the core namespace, and both allow what we +might call foreign elements in other locations, although not at all +locations in a document. + +In general, the purpose of such provisions is similar to that of +pragmas, so it makes sense to ask how such foreign elements and +attributes relate to the XML pragmas described here. In particular, +when can they be rendered as pragmas in the ixml form? + +Under proposal F, pragmas in XML are always `pragma` elements; foreign +attributes and elements are not formally pragmas and the ixml spec +would under proposal F define no correspondence between them and any +ixml notation. + +Under proposal V, the situation is more complex: + +* Non-ixml namespaced attributes on the `ixml`, `rule`, `nonterminal`, + `literal`, `inclusion`, and `exclusion` elements can be recognized + as pragmas. + +* Non-ixml namespaced elements can be recognized as pragmas if they + appear in one of the specified locations. + +* Processing instructions can be recognized as pragmas if they occur + in one of the specified locations. + +Any pragma recognized can be written out in ixml notation. In the +case of attributes and processing instructions, the pragma data will +be taken from the value of the node. In the case of elements, the +pragma data will be the string value of the `pragma-data` element +appearing as a child of the element, if there is one. + +Non-ixml constructs not recognized as pragmas cannot be translated +interoperably to ixml form. + #### Annotating symbols, rules, or grammars -Viewed the other way around, as described in the Desiderata, pragmas -can apply to symbols, rules, to a subset of rules, or to the grammar -as a whole, as follows: +As described in the Desiderata, pragmas can apply to symbols, rules, +to a subset of rules, or to the grammar as a whole. There are several +cases. * Pragmas applicable to one occurrence of one symbol appear in ixml before that symbol, either before or after the mark if any; in XML @@ -414,7 +455,8 @@ as a whole, as follows: that information; we specify this only out of an abundance of caution.) -* Pragmas applicable to the grammar as a whole appear the first rule. +* Pragmas applicable to the grammar as a whole appear before the first + rule. F and V are the same in this regard. @@ -511,6 +553,13 @@ namespace, some into another, and some into none, and that namespace bindings should remain constant throughout the grammar (so: no changing the default namespace in the middle of the document). +*Note that there is a bootstrapping issue here: the proposal made in +this document requires that pragmas be identified by qualified names, +which requires some level of namespace support in ixml itself. So +there is a certain unavoidable artificiality in the approach taken in +the following discussion, of trying to support pragmas for namespace +declarations without asssuming namespace support in the base ixml.* + We define the namespace 'http://example.com/ixml-namespaces" (*final decision on namespace name pending*) as providing for namespace bindings, and we adopt the convention that a prefix `ppp` is bound to @@ -541,10 +590,18 @@ with the following properties: * The pragma's data is the magic namespace name "`http://example.com/ixml-namespaces`". -When that pragma is found, it is interpreted as binding prefix *ns* -(whatever it might be) to the indicated namespace. Any subsequent -pragma with a QName using that prefix and a URI as pragma data is to -be interpreted as a namespace declaration in the obvious way. +Alternatively, the prefix *ns* might be bound to the namespace +indicate using a pragma of the form + +```` + [@Q{http://example.com/ixml-namespaces}:ns http://example.com/ixml-namespaces] +```` + +When either form of the pragma is found, it is interpreted as binding +prefix *ns* (whatever prefix that might be) to the indicated +namespace. Any subsequent pragma with a QName using that prefix and a +URI as pragma data is to be interpreted as a namespace declaration in +the obvious way. In the XML form for grammars, the corresponding constructs are (a) a namespace declaration binding the prefix *ns* to the given namespace @@ -630,13 +687,14 @@ names in the XML, with appropriate namespace bindings. The fallback behavior of a parser that does not support these pragmas will be as under the current spec, which someone wearing a -language-lawyer hat tells us is probably to emit output that is +language-lawyer hat tells us is probably to emit output that lacks +necessary namespace declarations and is technically speaking well-formed XML but not *namespace-well-formed* XML. This example does not define a capability for changing namespace bindings within a document. It's an example. - + ### Renaming Using pragmas to specify that an element or attribute name @@ -657,15 +715,16 @@ support the pragma will call them all `month`. ```` [@nsd:nsd http://example.com/ixml-namespaces] - [@nsd:sp https://lists.w3.org/Archives/Public/public-ixml/2021Oct/0014.html] + [@nsd:sp + https://lists.w3.org/Archives/Public/public-ixml/2021Oct/0014.html] - date: day, " ", month, " ", year. - day: d, d?. - month: "January"; "February"; etc. - year: d, d, d, d. + date: day, " ", month, " ", year. + day: d, d?. + month: "January"; "February"; etc. + year: d, d, d, d. - iso: year, "-", [sp:rename month] nmonth, "-", day. - nmonth: d, d. + iso: year, "-", [sp:rename month] nmonth, "-", day. + nmonth: d, d. ```` The namespace bindings in the example assume namespace pragmas as @@ -697,7 +756,7 @@ a simple subset of XML. It's a subset of XML for simplicity, and it's a superset of the subset because a grammar written at this level cannot enforce the well-formedness constraints of XML. ```` - { A grammar for a small subset of XML, for use as an illustration. } + { A grammar for a small subset of XML, as an illustration. } element: start-tag, content, end-tag; sole-tag. @@ -749,20 +808,20 @@ output produced manually, may be inaccurate*): - + When the old pond - + gets a new frog - + It's a new pond. ```` -We can specify that we want normal XML from the grammar using -the pragmas: +We can use the following pragmas to obtain normal XML from +parsing with the grammar: * `xp:name` *expression* - specifies that the name under which a nonterminal is to be serialized is given by the value of the supplied @@ -1051,7 +1110,8 @@ involving addition and multiplication over single-digit integers. ```` expr: expr, s, '+', s, term. term: term, s, '*', s, factor. - factor: '0'; '1'; '2'; '3'; '4'; '5'; '6'; '7'; '8'; '9'; '(', s, expr, s, ')'. + factor: '0'; '1'; '2'; '3'; '4'; '5'; '6'; '7'; '8'; '9'; + -'(', s, expr, s, -')'. s: [#20; #A; #D; #9]*. ```` From 9d42af35930034770a8204f259f88c350eec765c Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Sat, 4 Dec 2021 19:15:05 -0700 Subject: [PATCH 130/152] Update pragmas.md Minor copy edits --- misc/pragmas.md | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index a4af8921..8ab4b033 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -1318,32 +1318,35 @@ spoiling things for other people. then use pragmas to specify the behavior of the variable-form variant. -* The standard rules for translating an ixml grammar to XML form - by parsing it against *ixml.ixml* do not produce the results - described here. Either we just impose them by fiat, or we need - a fully worked out proposal for generating XML names from - the input data. - - This is a major stumbling block. - * Ideally we would prefer to allow annotations on rules to precede the mark on the left-hand side; an earlier version of the bracket-QName proposal did allow them there, rather than after the mark. The current version was changed in order to allow pragmas at the beginning of a grammar to be attached to the grammar as a whole. - If pragmas occurring outside rules are syntactically distinct (e.g. - if they are always to be followed by a full stop), then pragmas can - occur both before the mark on a left-hand side and between rules. - Worth doing? + If pragmas occurring outside rules are syntactically distinct, then + pragmas can occur both before the mark on a left-hand side and + between rules. It does complicate the grammar a bit. Worth doing? + + Easiest approach may be to require a full stop after pragmas occurring + outside of rules. + + * Change ixml rule to `ixml: SPS, rule+SPS, SPS.` + * Define SPS as `-SPS: (S; (pragma, S, '.'))*.` + + Or alternatively just change the rule for ixml and define two forms + of pragma: + + * `ixml: S, (rule; Pragma)+S, S.` + * `Pragma: pragma, S, '.'.` -* One result is that while for pragmas on symbols in a right-hand side - it doesn't matter whether they come before or after the mark, on the - left-hand side it does matter. It might be less confusing to - require that pragmas follow the mark on the right-hand side, to make - it parallel to the left-hand side. Or it might be less irritating - to allow them either before or after the mark. At the moment, the - proposal takes the second course. +* One result of the current design is that while for pragmas on symbols + in a *right-hand side* it doesn't matter whether they come before or + after the mark, on the *left-hand side* it does matter. It might be + less confusing to require that pragmas follow the mark on the + right-hand side, to make it parallel to the left-hand side. Or it + might be less irritating to allow them either before or after the mark. + At the moment, the proposal takes the second course. * The fact that extension elements can contain things that are implicit but not explicit in the ixml form means that a schema for @@ -1353,7 +1356,7 @@ spoiling things for other people. makes us. But at the moment, it says here that this is the right compromise. -* Should ixml pragmas marked `@` be restricted in where they can +* Should ixml pragmas marked `@` be restricted in where they can appear (e.g. before the first rule, not later; on the LHS of a rule, not before the stop)? Rationale for current decision: it's simpler not to restrict them, and restricting them does not allow us to get From eb9807acddeecaf1adc3fa15d79546763a1778f4 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Mon, 6 Dec 2021 10:41:26 -0700 Subject: [PATCH 131/152] Note decisions in the pragma.md proposal --- misc/pragmas.md | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 8ab4b033..a6ee9326 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -1316,7 +1316,9 @@ spoiling things for other people. leaves it in, on the theory that if it is retained, then it is possible in principle to adopt the fixed-form variant in the ixml spec and then use pragmas to specify the behavior of the variable-form - variant. + variant. + + *Keep it.* * Ideally we would prefer to allow annotations on rules to precede the mark on the left-hand side; an earlier version of the bracket-QName @@ -1340,6 +1342,8 @@ spoiling things for other people. * `ixml: S, (rule; Pragma)+S, S.` * `Pragma: pragma, S, '.'.` + *Agreed: use full stops, with second grammar form.* + * One result of the current design is that while for pragmas on symbols in a *right-hand side* it doesn't matter whether they come before or after the mark, on the *left-hand side* it does matter. It might be @@ -1348,13 +1352,14 @@ spoiling things for other people. might be less irritating to allow them either before or after the mark. At the moment, the proposal takes the second course. + *Agreement on previous item covers this.* + * The fact that extension elements can contain things that are implicit but not explicit in the ixml form means that a schema for the visible-XML form of a grammar, as described here, requires manual intervention and not just a mechanical derivation from the ixml grammar for ixml. That will make some people nervous, as it - makes us. But at the moment, it says here that this is the right - compromise. + makes us. * Should ixml pragmas marked `@` be restricted in where they can appear (e.g. before the first rule, not later; on the LHS of a rule, @@ -1364,6 +1369,8 @@ spoiling things for other people. since we would still have to specify that their position relative to other pragmas is not signficant. + *Restrict all grammar-level pragmas to occur before the first rule.* + * Should the ixml pragmas for namespace declarations cause standard XML namespace declarations for all prefixes declared? That would allow an XSLT or XQuery processor to understand the namespace @@ -1371,6 +1378,11 @@ spoiling things for other people. Rationale for current decision: it's an example, not a proposal for the spec, and it's complicated enough already. + *In the V proposal, this is required, since attributes and elements + may be using qualified names with bound prefixes. In the F + proposal, it's not required but it may be advantageous. It will + probably be simpler to specify that it always happens.* + * Allow pragmas between `alt` elements / immediately before the separator between top-level alternatives in a right-hand side? @@ -1380,6 +1392,19 @@ spoiling things for other people. parallel to occurrence before, after, or between `rule` elements within the `ixml` element. + *No. Make the attribute-grammar example work some other way.* + +* Is `pragma-data` really necessary? + + *Make it an attribute, and make pragmas cease to nest.* + +* What do we ask for w.r.t. namespaces? + + *We need a way to declare namespaces that apply to the + entire grammar. We can use a defined pragma.* + + + ## Decisions to be made by the group The group may wish to weigh in on any of the open issues listed above, From 5b2d9b61f7082b935a2c57e531abff784ecf30a8 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Mon, 6 Dec 2021 11:54:41 -0700 Subject: [PATCH 132/152] pragmas.md: add explicit namespaces proposals U and S --- misc/pragmas.md | 172 ++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 153 insertions(+), 19 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index a6ee9326..179d16a1 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -28,6 +28,19 @@ and `use-when` mechanisms of XSLT and the *extension expression* and *annotation* mechanisms of XQuery. SGML and XML processing instructions have also contributed to our thinking. +In working out the proposal for pragmas, we have come to believe that +in order for pragmas to work as designed, some form of namespace +binding must be available in ixml. This could be done by inventing +new syntax for namespace bindings, but what we propose here is to use +the syntax of pragmas to declare namespace bindings: the net effect is +that the spec (a) defines a syntax for pragmas and (b) defines one +particular set of pragmas that all ixml processors must support. + +This document thus includes both a proposal for pragmas and a proposal +for namespace binding, each of which assumes the other. Each proposal +has two variants (F and V for the pragmas proposal, U and S for the +namespaces proposal). + ## Use cases @@ -132,16 +145,23 @@ expression*. Desiderata: * Ideally, the result of evaluating the fallback expression should be -a useful and meaningful result, but this is more a matter for the -individual writing a grammar than for this proposal. The desideratum -for a pragmas proposal is to make it easy (or at least not -unnecessarily hard) to write useful fallbacks. + a useful and meaningful result, but this is more a matter for the + individual writing a grammar than for this proposal. The + desideratum for a pragmas proposal is to make it easy (or at least + not unnecessarily hard) to write useful fallbacks. * It should ideally be possible to specify pragmas as annotations -applying to a symbol, a rule, or a grammar as a whole, and it should -be possible to know which is which. It is not required that the -distinction be a syntactic one, however, since it can also be -expressed by the semantics of the particular pragma. + applying to a symbol, a rule, or a grammar as a whole, and it should + be possible to know which is which. It is not required that the + distinction be a syntactic one, however, since it can also be + expressed by the semantics of the particular pragma. + +* It should ideally be possible for processors to generate the XML + representation of an ixml grammar containing pragmas, even if they + do not understand the pragmas contained. And conversely it should + ideally be possible for processors to write out the ixml form of an + XML grammar containing pragmas, even if the processor does not + understand the pragmas appearing in the grammar. ## Design questions @@ -158,12 +178,12 @@ grammar? * Where can pragmas appear? -## Proposal(s) +## Pragma Proposal(s) -The current proposal is given the arbitrary name of 'brackets QName' for -discussion; an earlier proposal (the 'hash-QName' proposal) has been -withdrawn, though traces of it may remain in other documents in this -branch. +The current proposal for pragmas is given the arbitrary name of +'brackets QName' for discussion; an earlier proposal (the 'hash-QName' +proposal) has been withdrawn, though traces of it may remain in other +documents in this branch. ### The brackets-QName proposal @@ -179,10 +199,10 @@ declarations* use case below.) is taken not from the grammar (as in ixml as currently specified) but from the input data. (See the *Name indirection* use case below.) -* Deciding whether to serialize a given nonterminal as an -element or as an attribute based on what is found in the data. -(This may require nothing more elaborate than what is -described in the *Renaming* use case below.) +* Deciding whether to serialize a given nonterminal as an element or +as an attribute based on what is found in the data. (This may require +nothing more elaborate than what is described in the *Renaming* use +case below.) Some of these extensions can themselves be introduced using pragmas, as illustrated in the *Worked examples* section below, but it is clear @@ -1310,6 +1330,111 @@ that you can give them ad hoc semantics if you need to, without spoiling things for other people. +## Namespace binding proposals + +As described in the worked example for *Namespace declarations* above, +there are at least two ways for ixml to use pragmas provide the +namespace declaration functionality necessary to allow QNames to be +used in pragmas. We call them U (for 'user-specified namespace +binding prefix') and S (for 'specification-defined namespace binding +prefix'). + +The two proposals differ in how pragmas are recognized as +namespace-binding pragmas but are otherwise similar. + +### Namespace binding, common rules + +In both proposal, the ixml spec requires that conforming processors +understand the syntax for pragmas (this is implicit in the rule that +they follow the syntax for ixml grammars) and that conforming +processors understand and implement namespace-binding pragmas which +work as follows: + +* A namespace-binding pragma whose QName has the local name *n* binds + *n* as a namespace prefix to the namespace whose name by the pragma + data. + + As is the case for for XML namespaces generally, the pragma data + should be a legal URI, but ixml processors are not obligated to + check the URI for syntactic correctness (although they are may do + so), and normally should not attempt to dereference it. + +* All namespace-binding pragmas pertain to the grammar as a whole and + must be given before the first rule of the grammar. + +* A nonterminal taking the lexical form of a QName must if serialized + be serialized as an XML element name with the same local name and + with a prefix bound to the same namespace. Normally the prefix + should be as given in the grammar. *(If all namespaces are declared + before the first rule, there should be no reason it should be + impossible to use the same prefix. Perhaps we can make this a + 'must'.)* + + The ixml processor is responsible for including appropriate + namespace declarations in the XML output. + +The proposals differ in their rules for how a pragma is recognized as +a namespace-binding pragma. + + +### Namespace binding in proposal U + +In this proposal, namespace-binding pragmas are those whose QName is +in a particular well-known namespace; a bootstrapping rule is used to +recognize the binding of a user-specified prefix to that namespace. + +* A pragma whose QName has the same name as its prefix and its local + name and whose value is the namespace-binding namespace + '`http://example.com/ixml-namespaces`" binds the given prefix to + that namespace. This pragma must be marked `@`. For example: + + ```` + [@nsd:nsd http://example.com/ixml-namespaces] + ```` + +* The equivalent pragma using a URI-qualified name similarly binds the + given prefix to that namespace. + + For example: + + ```` + [@Q{http://example.com/ixml-namespaces}:nsd + http://example.com/ixml-namespaces] + ```` + +In the examples just given, the prefix *nsd* is only an example: the +user can specify any desired prefix to use for namespace bindings. + +* Any pragma whose QName has the namespace + "`http://example.com/ixml-namespaces`" is recognized as a + namespace-binding pragma. + +* Any pragma with an unprefixed name whose local name is bound as a + prefix to the namespace "`http://example.com/ixml-namespaces`" is + recognized as a namespace-binding pragma defining a default + namespace. + + +### Namespace binding in proposal S + +In this proposal, namespace-binding pragmas are recognized by their +use of a reserved prefix in their QName. + +* The prefix *ixmlns* is understood by all conforming ixml software as + bound to the namespace-binding namespace + '`http://example.com/ixml-namespaces`". + + *Open question: use the name 'ixmlns' or some other name? Perhaps + 'xmlns'?* + +* Any pragma whose QName has the prefix *ixmlns* is recognized as a + namespace-binding pragma. + +* Any pragma with the unprefixed *ixmlns* is recognized as a + namespace-binding pragma defining a default namespace. + + + ## Open issues * In the fixed-form variant, drop *pmark* entirely? The current text @@ -1412,8 +1537,17 @@ assuming the authors have not made a decision and removed all trace of the open issue before sending this document to the group. Some open questions will need to be made by the group, not by the authors. -* What name should be used for the magic namespace-binding namespace? - In the examples, we use "`http://example.com/ixml-namespaces`". +* What name should be used for the magic namespace-binding namespace? + In the examples, we use "`http://example.com/ixml-namespaces`". + + Should we use "`http://www.w3.org/2000/xmlns/`", to which the prefix + `xmlns` is bound by convention? + +* What name should be used for the magic namespace-binding prefix in + proposal S? If we use `xmlns`, are we transgressing the rule that + says names beginning with 'xml' are reserved for W3C + Recommendations? + * Alternatively, should the spec provide a magic namespace-binding prefix analogous to `xmlns`? From a74aa2556727fa187e4f47060e43f7db949147c3 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Mon, 6 Dec 2021 11:55:21 -0700 Subject: [PATCH 133/152] pragmas.md - keep pmark --- misc/pragmas.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 179d16a1..3532e99b 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -1437,14 +1437,6 @@ use of a reserved prefix in their QName. ## Open issues -* In the fixed-form variant, drop *pmark* entirely? The current text - leaves it in, on the theory that if it is retained, then it is possible - in principle to adopt the fixed-form variant in the ixml spec and - then use pragmas to specify the behavior of the variable-form - variant. - - *Keep it.* - * Ideally we would prefer to allow annotations on rules to precede the mark on the left-hand side; an earlier version of the bracket-QName proposal did allow them there, rather than after the mark. The From 299eb287e1b3134a15580f2744c3f23348de2e0f Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Mon, 6 Dec 2021 11:58:04 -0700 Subject: [PATCH 134/152] pragmas.md: make pragma-data an attribute, make pragmas cease to nest --- misc/pragmas.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 3532e99b..be547150 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -1511,10 +1511,6 @@ use of a reserved prefix in their QName. *No. Make the attribute-grammar example work some other way.* -* Is `pragma-data` really necessary? - - *Make it an attribute, and make pragmas cease to nest.* - * What do we ask for w.r.t. namespaces? *We need a way to declare namespaces that apply to the From 5ce2bcaf6eaf82697b21de19f1b4a74ff263e0be Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Mon, 6 Dec 2021 12:16:47 -0700 Subject: [PATCH 135/152] pragmas.md - add manual toc --- misc/pragmas.md | 41 +++++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index be547150..03c12f89 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -41,6 +41,36 @@ for namespace binding, each of which assumes the other. Each proposal has two variants (F and V for the pragmas proposal, U and S for the namespaces proposal). +Contents: +* [Use cases](#use-cases) +* [Requirements and desiderata](#requirements-and-desiderata) +* [Design questions](#design-questions) +* [Pragma proposal(s)](#pragma-proposals) + * [The brackets-QName proposal](#the-brackets-qname-proposal) + * [The ixml form](#the-ixml-form) + * [Marks on pragmas in V](#marks-on-pragmas-in-v) + * [Marks on pragmas in F](#marks-on-pragmas-in-f) + * [The XML form of pragmas in F](#the-xml-form-of-pragmas-in-f) + * [The XML form of pragmas in V](#the-xml-form-of-pragmas-in-v) + * [Pragmas and other extension mechanism](#pragmas-and-other-extension-mechanisms) + * [Annotating symbols, rules, or grammars](#annotating-symbols-rules-or-grammars) + * [An example](#an-example) +* [Worked examples](#worked-examples) + * [Namespace declarations](#namespace-declarations) + * [Renaming](#renaming) + * [Name indirection](#name-indirection) + * [Rule rewriting](#rule-rewriting) + * [Tokenization annotation and alternative formulations.](#tokenization-annotation-and-alternative-formulations) + * [Text injection](#text-injection) + * [Attribute grammar specification](#attribute-grammar-specification) + * [Pragmas for proposal V](#Pragmas-for-proposal-V) +* [Namespace binding proposals](#Namespace-binding-proposals) + * [Namespace binding, common rules](#namespace-binding-common-rules) + * [Namespace binding in proposal U](#namespace-binding-in-proposal-u) + * [Namespace binding in proposal S](#namespace-binding-in-proposal-s) +* [Open issues](#open-issues) +* [Decisions to be made by the group](#decisions-to-be-made-by-the-group) +* [References](#references) ## Use cases @@ -1033,7 +1063,7 @@ pragmas will be to serialize `expr` and `term` elements even when they have only one child. -### Tokenization annotation and alternative formulations. +### Tokenization annotation and alternative formulations We can use pragmas to annotate nonterminals in an ixml grammar to indicate that they define a regular language and can be safely @@ -1113,14 +1143,14 @@ they may change the meaning of an expression (or here the meaning of a grammar or part of it). -### Text injection. +### Text injection Using pragmas to indicate that a particular string should be injected into the XML representation of the input as (part of) a text node, or as an attribute or element. (This can help make the output of an ixml parse conform to a pre-existing schema.) -### Attribute grammar specification. +### Attribute grammar specification *Example: synthesized value attribute for arithmetic expressions.* @@ -1511,11 +1541,6 @@ use of a reserved prefix in their QName. *No. Make the attribute-grammar example work some other way.* -* What do we ask for w.r.t. namespaces? - - *We need a way to declare namespaces that apply to the - entire grammar. We can use a defined pragma.* - ## Decisions to be made by the group From d2ec8531569aa048f31ac0754d0a0e917156af04 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Mon, 6 Dec 2021 13:12:46 -0700 Subject: [PATCH 136/152] ixml.ixml, pragmas.md, resolve some conflicts with main branch Prose revision for the prolog. --- ixml.ixml | 13 +++--- misc/pragmas.md | 108 ++++++++++++++++++++++++++++++++++-------------- 2 files changed, 86 insertions(+), 35 deletions(-) diff --git a/ixml.ixml b/ixml.ixml index 01f0c70e..b1eee815 100644 --- a/ixml.ixml +++ b/ixml.ixml @@ -1,8 +1,9 @@ ixml: SP, rule+SP, SP. - -SP: (s; pragma)*. - - -s: (whitespace; comment)*. + -prolog: S, Pragma*S, S. + -Pragma: pragma, S, '.'. + + -S: (whitespace; comment)*. -whitespace: -[Zs]; tab; lf; cr. -tab: -#9. -lf: -#a. @@ -21,8 +22,10 @@ rule: (mark, SP)?, name, s, ["=:"], s, -alts, (pragma, SP)?, ".". @mark: ["@^-"]. - alts: alt+([";|"], s). - alt: term*(",", s). + -SP: (S; pragma)*. + + alts: alt+([";|"], S). + alt: term*(",", S). -term: factor; option; repeat0; diff --git a/misc/pragmas.md b/misc/pragmas.md index 03c12f89..812c49b3 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -256,16 +256,15 @@ square brackets are allowed, so pragmas can nest arbitrarily deep. In the ixml form of a grammar, pragmas can occur within whitespace in several locations: -* before the first rule of the grammar, after the last rule of the - grammar, or between rules; these pragmas apply to the grammar - as a whole or to the rules following the pragma. +* before the first rule of the grammar; these pragmas apply to the + grammar as a whole. * before a terminal or nonterminal symbol on the right-hand side of a rule, before or after the mark if any; these pragmas apply to that occurrence of the symbol. -* between the mark on the left-hand side of a rule and the - nonterminal; these pragmas apply to the rule. +* on the left-hand side of a rule before the rule name, before or + after the mark if any; these pragmas apply to the rule. * immediately before the full stop of a rule; these pragmas apply to the rule. @@ -276,21 +275,31 @@ rhetorical choice, but an important one as it can make a difference to readability. The relevant changes to the ixml grammar are these. First, in several -rules the nonterminal *S* is replaced by *SP* (space-or-pragma), to -allow pragmas to appear as described above: +rules the options `(mark, S)?` and `(tmark, S)?` are replaced by new +nonterminals which provide for both marks and pragmas. In some +locations the nonterminal *S* is replaced by *SP* (space-or-pragma), +to allow pragmas to appear as described above. + ```` -ixml: SP, rule+SP, SP. -rule: (mark, SP)?, name, S, ["=:"], S, -alts, (pragma, SP)?, ".". -nonterminal: (mark, SP)?, name, S. --quoted: (tmark, SP)?, -string. --encoded: (tmark, SP)?, -"#", @hex, S. -inclusion: (tmark, SP)?, set. -exclusion: (tmark, SP)?, "~", S, set. + rule: annotation, name, S, ["=:"], S, -alts, (pragma, SP)?, ".". + nonterminal: annotation, name, S. + -quoted: tannotation, -string. + -encoded: tannotation, -"#", @hex, S. + inclusion: tannotation, set. + exclusion: tannotation, "~", S, set. + + -SP: (S; pragma)* + -annotation: (pragma, SP)?, (mark, SP)?. + -tannotation: (pragma, SP)?, (tmark, SP)?.. ```` -The new nonterminal *SP* and the nonterminals needed for pragmas -themselves are defined as follows. +To allow pragmas pertaining to the grammar as a whole to precede the +first rule of the grammar, the production rule for *ixml* is changed. +To ensure that pragmas in the prolog can be distinguished +syntactically from pragmas attached to the left-hand side of the first +rule, pragmas in the prolog are required to be followed by full stops. + ```` -SP: (S; pragma)*. @@ -1403,6 +1412,14 @@ work as follows: The ixml processor is responsible for including appropriate namespace declarations in the XML output. +* In the XML form of an ixml grammar, all namespaces bound in in the + ixml grammar should be bound in the XML form of the grammar. + + This should normally take the form of namespace declarations on the + `ixml` element. The pragmas should also be represented in the usual + way, if that differs from being realized as a namespace-binding + attribute. + The proposals differ in their rules for how a pragma is recognized as a namespace-binding pragma. @@ -1541,32 +1558,63 @@ use of a reserved prefix in their QName. *No. Make the attribute-grammar example work some other way.* +* How should the prolog be defined? Several formulations have + occurred to me, some equivalent and some not. Which is clearest and + nicest? + + * Inline the full stop: + + `-prolog: S, pragma*(S, (-'.', S)), S.` + + * Require only one full stop, at the end of the prolog: + + `-prolog: S, pragma*S, S, -'.', S.` + * Use a different name for pragmas with full stops, to simplify the + rule for *prolog:* + + ```` + -prolog: S, Pragma*S, S. + -Pragma: pragma, S, '.'. + ```` + + * Use the nonterminal *ppragma* rather than *Pragma:* + + ```` + -prolog: S, ppragma*S, S. + -ppragma: pragma, S, '.'. + ```` ## Decisions to be made by the group -The group may wish to weigh in on any of the open issues listed above, -assuming the authors have not made a decision and removed all trace of -the open issue before sending this document to the group. Some open -questions will need to be made by the group, not by the authors. +* If the proposal is adopted, which form of the pragmas proposal + should be chosen? V or F? Or some other variant? -* What name should be used for the magic namespace-binding namespace? - In the examples, we use "`http://example.com/ixml-namespaces`". +* If the proposal is adopted, which form of the namespace binding + proposal should be chosen? U or S? Or some other variant? - Should we use "`http://www.w3.org/2000/xmlns/`", to which the prefix - `xmlns` is bound by convention? +* If proposal S is adopted, what name should be used for the magic + namespace-binding prefix in proposal S? The proposal above uses + *ixmlns*; it might feel more convenient if we use `xmlns`. If we do + so, are we violating the rule that says names beginning with 'xml' + are reserved for W3C Recommendations? -* What name should be used for the magic namespace-binding prefix in - proposal S? If we use `xmlns`, are we transgressing the rule that - says names beginning with 'xml' are reserved for W3C - Recommendations? +* What name should be used for the magic namespace-binding namespace? + In the examples, we use "`http://example.com/ixml-namespaces`". + Should we use "`http://www.w3.org/2000/xmlns/`", to which the prefix + `xmlns` is bound by convention? -* Alternatively, should the spec provide a magic namespace-binding - prefix analogous to `xmlns`? +* The group may also wish to weigh in on any of the open issues listed + above, if any are left when this document goes to the group. * *I could have sworn there were more things to put here.* +* Once the group has resolved the questions just listed, the remaining + question is: should the proposal as thus refined by adopted for + ixml 1.0 or not? + + ## References Alblas 1991. Henk Alblas, "Introduction to attribute grammars," in From a4935412a9538d36945dcecd99c6e8cb54607598 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Wed, 15 Dec 2021 10:09:16 -0700 Subject: [PATCH 137/152] pragmas.md Small copy-edit --- misc/pragmas.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 812c49b3..3763dcb2 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -33,7 +33,7 @@ in order for pragmas to work as designed, some form of namespace binding must be available in ixml. This could be done by inventing new syntax for namespace bindings, but what we propose here is to use the syntax of pragmas to declare namespace bindings: the net effect is -that the spec (a) defines a syntax for pragmas and (b) defines one +that the spec would (a) define a syntax for pragmas and (b) define one particular set of pragmas that all ixml processors must support. This document thus includes both a proposal for pragmas and a proposal From 3a1766eccf6fb5cdc9991c7d075c56c2457d916a Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Mon, 13 Dec 2021 11:34:02 -0700 Subject: [PATCH 138/152] Update pragmas.md Delete the bits that say this is not yet finished. It's as finished as it is going to get. --- misc/pragmas.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 3763dcb2..a7e4362c 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -6,8 +6,8 @@ This document describes a proposal for adding *pragmas* to the Invisible-XML specification. -It was prepared (or rather, is being prepared) by Tom Hillman and -Michael Sperberg-McQueen. It is currently not finished. +It was prepared by Tom Hillman and +Michael Sperberg-McQueen. It is currently as complete as we expect to make it. The general idea of pragmas is to provide a channel for information that is not a required part of the ixml specification but can be used From 51f8ab0884d4256863aa7d44ec3c5e7a14066c8d Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Wed, 15 Dec 2021 12:02:45 -0700 Subject: [PATCH 139/152] proposal-F-S.md First version of this abbreviated proposal --- misc/proposal-F-S.md | 305 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 305 insertions(+) create mode 100644 misc/proposal-F-S.md diff --git a/misc/proposal-F-S.md b/misc/proposal-F-S.md new file mode 100644 index 00000000..db9ae064 --- /dev/null +++ b/misc/proposal-F-S.md @@ -0,0 +1,305 @@ +# A namespaces + pragmas proposal for ixml + +Tom Hillman, Michael Sperberg-McQueen + +15 December 2021 + +This document describes a proposal for adding namespace declarations +and pragmas to ixml. For background, use cases, some discussion of +design choices, and examples of how pragmas as defined here could be +used in the use cases, see the document (pragmas.md)[pragmas.md] in +this directory. (In that document, the proposals made here are +referred to as namespaces proposal S and pragmas proposal F.) + +## Pragmas + +Pragmas are a syntactic device to allow grammar writers to communicate +with processors without interfering with the operation of other +processors. To avoid interference with other processors, pragmas must +be syntactically identifiable as such, and it must be possible for +processors to distinguish pragmas directed at them from other +pragmas. This proposal uses namespaces, QNames, and URI-qualified +names to allow grammar writers and implementations to avoid +collisions. + +Pragmas may affect the behavior of a processor in any way, either in +ways that leave the meaning of a grammar unchanged or in ways that +change the meaning of the grammar in which the pragmas appear. +Processors should be capable, at user option, of ignoring all pragmas +and processing a grammar using the standard rules of ixml. + +### Syntax in ixml + +In ixml, pragmas are enclosed in square brackets, which contain an +optional mark, a qualified name in some form, and optionally +additional data, which takes the form of a sequence of +square-bracket-balanced characters. The relevant part of the ixml +grammar is: + +```` +pragma: -"[", @pmark?, @pname, (s, pragma-data)?, -"]". +@pname: -QName; -UQName. +@pmark: ["@^?"]. +pragma-data: (-pragma-chars; -bracket-pair)*. +-pragma-chars: ~["[]"]*. +-bracket-pair: '[', -pragma-data, ']'. +```` + +This syntactic proposal assumes that by means specified elsewhere, +prefixes are bound to namespace names and that QNames can be +interpreted in the normal way. The nonterminals *QName* and *UQName* +are defined below in the proposal for namespace declarations. + +For example: + +```` +[?my:blue] +```` + +or + +```` +[?{http://example.org/NS/mine}blue] +```` + +or + +```` +[@my:color blue] +```` + +or + +```` +[ls:rewrite + comment: -"{", (cchars; comment)*, -"}". + [ls:token] -cchars: cchar+. +] +```` + +Pragmas may appear: + +* immediately before a terminal or nonterminal symbol in the +right-hand side of a rule, before or after its mark if any, or + +* immediately before the nonterminal symbol on the left-hand side of a +rule, before or after its mark if any, or + +* after the final alternative of a rule, before the full stop ending +the rule, or + +* before the first rule of the grammar. + +In the final case, each pragma must be followed by a full stop. + +Each of these requires some changes to the grammar of ixml. To allow +pragmas immediately before symbols, we change the grammatical +definitions of symbols, both nonterminals: + +```` +nonterminal: annotation, name, s. +-annotation: (pragma, sp)?, (mark, sp)?. +-sp: (s; pragma)*. +```` + +and terminals: + +```` +-quoted: tannotation, -string. +-encoded: tannotation, -"#", @hex, s. +inclusion: tannotation, set. +exclusion: tannotation, -"~", s, set. +-tannotation: (pragma, sp)?, (mark, sp)?. +```` + +To allow pragmas on the left-hand side of a rule and before its +closing full stop, we modify the definition of *rule*: + +```` +rule: annotation, name, s, -["=:"], s, -alts, (pragma, sp)?, -".". +```` + +To allow pragmas before the first rule and to distinguish them from +pragmas occurring on the left-hand side of the first rule, we modify +the definition of *ixml*: + +```` +ixml: prolog, rule+s, s. +prolog: s, ppragma+s, s. +-ppragma: pragma, s, -'.'. +```` + + +### Syntax in XML + +Following the normal rules of ixml, pragmas are serialized as elements +named `pragma`, with attributes named `pmark` and `pname` and a child +element named `pragma-data`. In addition, in XML grammars `pragma` +elements may contain any number of XML elements following the +`pragma-data` element. + +For example: + +```` + + + +```` + +or + +```` + + blue + +```` + +or + +```` + + comment: -"{", (cchars; comment)*, -"}". + [ls:token] -cchars: cchar+. + + + +```` + +Pragma-oblivious processors and processors which do not implement the +pragma in question will as a matter of course produce `pragma` +elements with just the one child element. But processors which +implement a given pragma are free to inject additional XML elements +into the XML form of the pragma. It is to be assumed that the XML +elements contain no additional information, only a mechanically +derived XML form which makes the information in the pragma easier to +process. It is to be expected that any software to serialize XML +grammars in ixml form will discard the additional XML elements. + +It should be noted that the *pmark* allowed by the syntax has no +effect on the XML representation produced by the core rules of ixml. +Pragma-oblivious processors will always produce XML representation of +pragmas of the form described here. Pragma-aware processors may +implement pragmas which modify the standard XML representation +('pragmas for pragma'). See (pragmas.md)[pragmas.md] for an example. + + +### Static semantics + +In this proposal, pragmas always apply explicitly to some part of a +grammar: + +* to a symbol occurrence in the right-hand side of a rule, or + +* to a rule + +* to the grammar as a whole + +The relation between a pragma and the part of the grammar to which it +applies is reflected in the XML form of a grammar: pragmas appear as +child elements of the part of the grammar they apply to (an element +named `ixml`, `rule`, `nonterminal`, `literal`, `inclusion`, or +`exclusion`). + +These associations are specified here for clarity and to enable +clearer discussion of pragmas, but they have no effect on the +operational semantics of ixml processors. + + +### Operational semantics + +In describing the operational semantics of pragmas, we distinguish +different classes of ixml processor: + +* *pragma-oblivious* processors recognize pragmas syntactically but +otherwise ignore them all. Informally, they do not 'understand' any +pragmas, and their only obligation is not to trip over pragmas when +they encounter them. + +* *pragma-aware* processors recognize pragmas syntactically and modify +their behavior in accordance with some pragmas. Informally, they +'understand' some pragmas but not all. For each pragma they recognize, +they must determine whether it is one they 'understand' and implement, +or not. + +With regard to a given pragma, processors either *implement* that +pragma or they do not. A processor *implements* a pragma iff it +adjusts its behavior as specified by that pragma. In the ideal case +there will be some written specification of the pragma which describes +the operational effect of the pragma clearly. This proposal assumes +that a processor can use the qualified name of a pragma to determine +whether the processor implements the pragma or not and thus decide +whether to modify its normal operation or not. + +The obligation of pragma-oblivious processors is to accept pragmas +when they occur in the ixml form of a grammar, and (if they are +producing an XML form of the grammar) produce the correct XML form of +each pragma, just as they produce the corresponding XML form for any +construct in the grammar. + +Pragma-aware processors must similarly to accept pragmas when they +occur in the ixml form of a grammar, and (if they are producing an XML +form of the grammar) produce the correct XML form of each pragma, just +as they produce the corresponding XML form for any construct in the +grammar. As already noted, however, pragmas may modify this behavior +like any other. + + +## Namespace declarations + +Namespace declarations take the form of a pragma appearing in the +prolog of a grammar and using the reserved prefix *ixmlns* in their +QName. Their pragma data is interpreted an an IRI. + +For example the following namespace declarations bind the prefix +"`xsd`" to the namespace for the XSD schema definition language, and +"`rng`" to that for Relax NG: + +```` +[ixmlns:xsd http://www.w3.org/2001/XMLSchema] +[ixmlns:rng http://relaxng.org/ns/structure/1.0] +```` + +As is the case for for XML namespaces generally, the pragma data +should be a legal URI, but ixml processors are not obligated to check +the URI for syntactic correctness (although they are may do so), and +normally should not attempt to dereference it. + +The effect of a namespace declaration is to bind the local part of the +QName to the given namespace and allow it to be used as a prefix in +QNames to denote qualified names in the given namespace. + +The following rules apply: + +* The prefix *ixmlns* is understood by all conforming ixml software as + bound to the namespace-binding namespace + '`http://example.com/ixml-namespaces`". + +* A pragma with the unprefixed *ixmlns* is interpreted as defining a + default namespace. + +* All namespace declarations pertain to the grammar as a whole and + must be given before the first rule of the grammar. + +* No two namespace declarations may bind the same prefix. + +* A nonterminal taking the lexical form of a QName must if serialized + be serialized as an XML element name with the same local name and + with a prefix bound to the same namespace. Normally the prefix + should be as given in the grammar. *(If all namespaces are declared + before the first rule, there should be no reason it should be + impossible to use the same prefix. Perhaps we can make this a + 'must'.)* + + The ixml processor is responsible for including appropriate + namespace declarations in the XML output. + +* In the XML form of an ixml grammar, all namespaces bound in in the + ixml grammar should be bound in the XML form of the grammar. + + This should normally take the form of namespace declarations on the + `ixml` element. The pragmas should also be represented in the usual + way, if that differs from being realized as a namespace-binding + attribute. + + + From 78c52c80aae2548c65724845fedb30a74fe3a53a Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Wed, 15 Dec 2021 12:23:45 -0700 Subject: [PATCH 140/152] Re-synch ixml.ixml, define QName and UQName. --- ixml.ixml | 61 +++++++++++++++++++++++--------------------- misc/proposal-F-S.md | 13 ++++------ 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/ixml.ixml b/ixml.ixml index b1eee815..57680380 100644 --- a/ixml.ixml +++ b/ixml.ixml @@ -1,9 +1,9 @@ - ixml: SP, rule+SP, SP. + ixml: prolog, rule+s, s. - -prolog: S, Pragma*S, S. - -Pragma: pragma, S, '.'. - - -S: (whitespace; comment)*. + prolog: s, ppragma+s, s. + -ppragma: pragma, s, -".". + + -s: (whitespace; comment)*. -whitespace: -[Zs]; tab; lf; cr. -tab: -#9. -lf: -#a. @@ -11,21 +11,12 @@ comment: -"{", (cchar; comment)*, -"}". -cchar: ~["{}"]. - pragma: "[", @pmark?, @pname, (s, pragma-data)?, "]". - @pname: -QName; -EQName. - -QName: -name, ':', -name. - -EQName: 'Q{', -ns-name, '}', -name. - -ns-name: ~["{}"; '"'; "'"]* { oversimplification }. - @pmark: ["@^?"]. - pragma-data: (pragma-chars; pragma)*. --pragma-chars: ~["[]"]*. - - rule: (mark, SP)?, name, s, ["=:"], s, -alts, (pragma, SP)?, ".". + rule: annotation, name, s, -["=:"], s, -alts, -".". + -annotation: (pragma, sp?), (mark, sp)?. + -sp: (s; pragma)*. @mark: ["@^-"]. - -SP: (S; pragma)*. - - alts: alt+([";|"], S). - alt: term*(",", S). + alts: alt+(-[";|"], s). + alt: term*(-",", s). -term: factor; option; repeat0; @@ -37,13 +28,13 @@ repeat1: factor, -"+", s, sep?. option: factor, -"?", s. sep: factor. - nonterminal: (mark, SP)?, name, s. + nonterminal: annotation, name, s. -terminal: literal; charset. literal: quoted; encoded. - -quoted: (tmark, SP)?, -string. + -quoted: tannotation, -string. @name: namestart, namefollower*. -namestart: ["_"; L]. @@ -56,24 +47,36 @@ '"', -'"'. {all characters except line breaks; quotes must be doubled} schar: ~["'"; #a; #d]; "'", -"'". {all characters except line breaks; quotes must be doubled} - -encoded: (tmark, SP)?, -"#", @hex, s. + -encoded: tannotation, -"#", @hex, s. hex: ["0"-"9"; "a"-"f"; "A"-"F"]+. -charset: inclusion; exclusion. - inclusion: (tmark, SP)?, set. - exclusion: (tmark, SP)?, "~", s, set. - -set: "[", s, member*([";|"], s), "]", s. + inclusion: tannotation, set. + exclusion: tannotation, -"~", s, set. + -set: -"[", s, member*(-[";|"], s), -"]", s. -member: literal; range; class. - range: from, s, -"-", s, to, s. + range: from, -"-", s, to. @from: character. @to: character. - -character: -'"', dchar, -'"'; - -"'", schar, -"'"; - "#", hex. + -character: -'"', dchar, -'"', s; + -"'", schar, -"'", s; + "#", hex, s. class: code, s. @code: capital, letter?. -capital: ["A"-"Z"]. -letter: ["a"-"z"]. + + pragma: -"[", @pmark?, @pname, (s, pragma-data)?, -"]". + @pname: -QName; -UQName. + @pmark: ["@^?"]. + pragma-data: (-pragma-chars; -bracket-pair)*. +-pragma-chars: ~["[]"]*. +-bracket-pair: '[', -pragma-data, ']'. + + -QName: -name, ':', -name. + -UQName: 'Q{', -ns-name, '}', -name. + -ns-name: ~["{}"; '"'; "'"]* + diff --git a/misc/proposal-F-S.md b/misc/proposal-F-S.md index db9ae064..b6feca1b 100644 --- a/misc/proposal-F-S.md +++ b/misc/proposal-F-S.md @@ -43,12 +43,11 @@ pragma: -"[", @pmark?, @pname, (s, pragma-data)?, -"]". pragma-data: (-pragma-chars; -bracket-pair)*. -pragma-chars: ~["[]"]*. -bracket-pair: '[', -pragma-data, ']'. -```` -This syntactic proposal assumes that by means specified elsewhere, -prefixes are bound to namespace names and that QNames can be -interpreted in the normal way. The nonterminals *QName* and *UQName* -are defined below in the proposal for namespace declarations. +-QName: -name, ':', -name. +-UQName: 'Q{', -ns-name, '}', -name. +-ns-name: ~["{}"; '"'; "'"]* +```` For example: @@ -59,7 +58,7 @@ For example: or ```` -[?{http://example.org/NS/mine}blue] +[?Q{http://example.org/NS/mine}blue] ```` or @@ -301,5 +300,3 @@ The following rules apply: way, if that differs from being realized as a namespace-binding attribute. - - From 5152d73ff2e4efa1d7cee064c5daa66d9077c078 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Mon, 3 Jan 2022 14:03:35 -0700 Subject: [PATCH 141/152] Pragmas proposal Revised (and made longer, sigh) --- misc/proposal-F-S.md | 203 ++++++++++++++++++++++++++++++++----------- 1 file changed, 153 insertions(+), 50 deletions(-) diff --git a/misc/proposal-F-S.md b/misc/proposal-F-S.md index b6feca1b..5b9bb7a4 100644 --- a/misc/proposal-F-S.md +++ b/misc/proposal-F-S.md @@ -5,28 +5,39 @@ Tom Hillman, Michael Sperberg-McQueen 15 December 2021 This document describes a proposal for adding namespace declarations -and pragmas to ixml. For background, use cases, some discussion of -design choices, and examples of how pragmas as defined here could be -used in the use cases, see the document (pragmas.md)[pragmas.md] in -this directory. (In that document, the proposals made here are -referred to as namespaces proposal S and pragmas proposal F.) +and pragmas to ixml. + +For background, use cases, some discussion of design choices, and +examples of how pragmas as defined here could be used in the use +cases, see the document (pragmas.md)[pragmas.md] in this directory. In +that document, the proposals made here are referred to as namespaces +proposal S and pragmas proposal F. ## Pragmas Pragmas are a syntactic device to allow grammar writers to communicate with processors without interfering with the operation of other -processors. To avoid interference with other processors, pragmas must -be syntactically identifiable as such, and it must be possible for -processors to distinguish pragmas directed at them from other -pragmas. This proposal uses namespaces, QNames, and URI-qualified -names to allow grammar writers and implementations to avoid -collisions. +processors. To avoid interference with other processors, two +requirements arise: + +* Pragmas must be syntactically identifiable as such. + +* Also, it must be possible for processors to distinguish pragmas +directed at them from other pragmas. This proposal uses namespaces, +QNames, and URI-qualified names to allow grammar writers and +implementations to avoid collisions. Pragmas may affect the behavior of a processor in any way, either in ways that leave the meaning of a grammar unchanged or in ways that change the meaning of the grammar in which the pragmas appear. -Processors should be capable, at user option, of ignoring all pragmas -and processing a grammar using the standard rules of ixml. + +Since specific pragmas will be understood by some processors and not +others, it is necessary in this proposal to discuss both how an +example might be processed by a processor which understands and +implements the pragma and how it will be processed by a processor +oblivious to it. (See below for the terms *understand* and +*oblivious*.) + ### Syntax in ixml @@ -37,11 +48,11 @@ square-bracket-balanced characters. The relevant part of the ixml grammar is: ```` -pragma: -"[", @pmark?, @pname, (s, pragma-data)?, -"]". +pragma: -"[", @pmark?, @pname, (whitespace, pragma-data)?, -"]". @pname: -QName; -UQName. @pmark: ["@^?"]. -pragma-data: (-pragma-chars; -bracket-pair)*. --pragma-chars: ~["[]"]*. +pragma-data: (-pragma-chars; -bracket-pair)*. +-pragma-chars: ~["[]"]+. -bracket-pair: '[', -pragma-data, ']'. -QName: -name, ':', -name. @@ -49,25 +60,19 @@ pragma-data: (-pragma-chars; -bracket-pair)*. -ns-name: ~["{}"; '"'; "'"]* ```` -For example: - -```` -[?my:blue] -```` - -or +For example, the following are all syntactically well formed pragmas: -```` -[?Q{http://example.org/NS/mine}blue] -```` +* `[?my:blue]` +* `[?Q{http://example.org/NS/mine}blue]` +* `[@my:color blue]` -or - -```` -[@my:color blue] -```` - -or +It is a consequence of the syntax that pragmas can nest, though the +nesting is only apparent to a processor which understands the +*ls:rewrite* pragma and knows to parse its pragma data as a sequence +of rules in ixml notation. A processor which does not understand the +*ls:rewrite* pragma will merely know that the pragma data here +contains 100 characters, which happen to include one nested pair of +brackets. ```` [ls:rewrite @@ -120,7 +125,7 @@ rule: annotation, name, s, -["=:"], s, -alts, (pragma, sp)?, -".". To allow pragmas before the first rule and to distinguish them from pragmas occurring on the left-hand side of the first rule, we modify -the definition of *ixml*: +the definition of *ixml* to introduce a *prolog*. ```` ixml: prolog, rule+s, s. @@ -147,6 +152,14 @@ For example: or +```` + + + +```` + +or + ```` blue @@ -161,7 +174,6 @@ or [ls:token] -cchars: cchar+. - ```` Pragma-oblivious processors and processors which do not implement the @@ -174,12 +186,61 @@ derived XML form which makes the information in the pragma easier to process. It is to be expected that any software to serialize XML grammars in ixml form will discard the additional XML elements. +For example, note that a processor which understands the *ls:rewrite* +pragma might prefer to produce a different XML representation for it, +e.g. one in which the embedded grammar rules have their normal XML +representation. As noted above: pragmas may affect the behavior of a +processor in any way. For such a processor, the XML representation +might be: + +```` + + comment: -"{", (cchars; comment)*, -"}". + [ls:token] -cchars: cchar+. + + + + + + + + + + + + + + + + + + + + +```` + +Note that because the additional XML elements within the pragma are +just redundant XML representations of the pragma data, a +pragma-oblivious application to rewrite XML grammars in ixml form will +lose no information when transcribing this XML pragma as + +```` +[ls:rewrite + comment: -"{", (cchars; comment)*, -"}". + [ls:token] -cchars: cchar+. +] +```` + It should be noted that the *pmark* allowed by the syntax has no effect on the XML representation produced by the core rules of ixml. Pragma-oblivious processors will always produce XML representation of pragmas of the form described here. Pragma-aware processors may implement pragmas which modify the standard XML representation -('pragmas for pragma'). See (pragmas.md)[pragmas.md] for an example. +('pragmas for pragmas'). See (pragmas.md)[pragmas.md] for an +example. The point of the *pmark* is in fact to allow such a pragma +for pragmas to specify that pragmas marked "`?`" or "`@`" be +represented in XML as processing instructions or attributes. (Again: +pragmas may affect the behavior of programs.) ### Static semantics @@ -199,9 +260,14 @@ child elements of the part of the grammar they apply to (an element named `ixml`, `rule`, `nonterminal`, `literal`, `inclusion`, or `exclusion`). -These associations are specified here for clarity and to enable -clearer discussion of pragmas, but they have no effect on the -operational semantics of ixml processors. +These associations between pragmas and parts of grammars are specified +here for clarity and to enable clearer discussion of pragmas, but they +have no effect on the operational semantics of ixml processors. A +pragma-oblivious processor will not be affected by the pragmas, +regardless of what they apply to, and a processor that understands a +given pragma will know from its definition what changes in behavior it +requests. The associations given above are thus of most direct use to +those specifying the meaning of specific pragmas. ### Operational semantics @@ -235,13 +301,31 @@ producing an XML form of the grammar) produce the correct XML form of each pragma, just as they produce the corresponding XML form for any construct in the grammar. -Pragma-aware processors must similarly to accept pragmas when they +Pragma-aware processors MUST similarly to accept pragmas when they occur in the ixml form of a grammar, and (if they are producing an XML form of the grammar) produce the correct XML form of each pragma, just as they produce the corresponding XML form for any construct in the grammar. As already noted, however, pragmas may modify this behavior like any other. +### Conformance requirements for pragmas + +Processors MUST be capable, at user option, of ignoring all pragmas +and processing a grammar using the standard rules of ixml. + +Processors MUST accept pragmas in the ixml or XML form of a grammar, +whether they understand or implement the specific pragmas or not. + +If a pragma which the processor does not understand or implement is +present in a grammar used to parse input, the processor MUST process +the grammar in the same way as if the pragma were not present. + +When ixml grammars are processed as input using the grammar for ixml, +processors MUST produce the correct XML form of each pragma, just as +they produce the corresponding XML form for any construct in the +grammar, *except* as the processor's behavior is affected by the +presence of pragmas, in the grammar for ixml used to parse the input. + ## Namespace declarations @@ -259,9 +343,9 @@ For example the following namespace declarations bind the prefix ```` As is the case for for XML namespaces generally, the pragma data -should be a legal URI, but ixml processors are not obligated to check +SHOULD be a legal URI, but ixml processors are not obligated to check the URI for syntactic correctness (although they are may do so), and -normally should not attempt to dereference it. +normally SHOULD NOT attempt to dereference it. The effect of a namespace declaration is to bind the local part of the QName to the given namespace and allow it to be used as a prefix in @@ -277,26 +361,45 @@ The following rules apply: default namespace. * All namespace declarations pertain to the grammar as a whole and - must be given before the first rule of the grammar. + MUST be given before the first rule of the grammar. * No two namespace declarations may bind the same prefix. -* A nonterminal taking the lexical form of a QName must if serialized +* A nonterminal taking the lexical form of a QName MUST if serialized be serialized as an XML element name with the same local name and with a prefix bound to the same namespace. Normally the prefix - should be as given in the grammar. *(If all namespaces are declared + SHOULD be as given in the grammar. *(If all namespaces are declared before the first rule, there should be no reason it should be impossible to use the same prefix. Perhaps we can make this a - 'must'.)* + 'MUST'.)* The ixml processor is responsible for including appropriate namespace declarations in the XML output. * In the XML form of an ixml grammar, all namespaces bound in in the - ixml grammar should be bound in the XML form of the grammar. + ixml grammar SHOULD be bound in the XML form of the grammar. This should normally take the form of namespace declarations on the - `ixml` element. The pragmas should also be represented in the usual - way, if that differs from being realized as a namespace-binding - attribute. + `ixml` element. + +## Possible variations + +* Instead of saying processors MUST be able to ignore all pragmas, we + might say they SHOULD be able to ignore all pragmas. + +* Instead of making pragma-data required but possibly empty, requiring + an empty *pragma-data* element in cases like `[ls:token]`, we might + make it optional but non-empty, so that `[ls:token]` could have the + shorter XML representation ``. + +* Instead of forbidding two namespace declarations for the same + prefix, we could say they MUST agree, or that the first one wins (as + for entity declarations) or that the last one wins (as for multiple + `let` clauses for the same variable in a FLWOR expression in + XQuery). +* Instead of requiring that in the XML form of an ixml grammar, all + namespaces bound in in the ixml grammar SHOULD be bound in the XML + form of the grammar, we could say that those actually used MUST be + bound, or that they all MUST be bound. + From 30ab245b953762dfcb93d31acb57577609d77771 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Mon, 3 Jan 2022 14:07:10 -0700 Subject: [PATCH 142/152] Pragmas proposal Add a claim to adequacy. Also a revision date. --- misc/proposal-F-S.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/misc/proposal-F-S.md b/misc/proposal-F-S.md index 5b9bb7a4..ff39c592 100644 --- a/misc/proposal-F-S.md +++ b/misc/proposal-F-S.md @@ -2,7 +2,7 @@ Tom Hillman, Michael Sperberg-McQueen -15 December 2021 +15 December 2021, rev. 3 January 2022 This document describes a proposal for adding namespace declarations and pragmas to ixml. @@ -10,9 +10,13 @@ and pragmas to ixml. For background, use cases, some discussion of design choices, and examples of how pragmas as defined here could be used in the use cases, see the document (pragmas.md)[pragmas.md] in this directory. In -that document, the proposals made here are referred to as namespaces +that document, the proposal made here is referred to as namespaces proposal S and pragmas proposal F. +We believe that the examples given in (pragmas.md)[pragmas.md] +demonstrate that the proposal outlined here satisfies the known use +cases for pragmas. + ## Pragmas Pragmas are a syntactic device to allow grammar writers to communicate From 7161c7462489197cf07eaa7a7d64c8347d634e89 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Mon, 3 Jan 2022 14:16:09 -0700 Subject: [PATCH 143/152] Correct pragma-data errors The pragma-data element is not always required. --- misc/proposal-F-S.md | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/misc/proposal-F-S.md b/misc/proposal-F-S.md index ff39c592..1798233a 100644 --- a/misc/proposal-F-S.md +++ b/misc/proposal-F-S.md @@ -141,25 +141,21 @@ prolog: s, ppragma+s, s. ### Syntax in XML Following the normal rules of ixml, pragmas are serialized as elements -named `pragma`, with attributes named `pmark` and `pname` and a child -element named `pragma-data`. In addition, in XML grammars `pragma` -elements may contain any number of XML elements following the -`pragma-data` element. +named `pragma`, with attributes named `pmark` and `pname` and an +optional child element named `pragma-data`. In addition, in XML +grammars `pragma` elements may contain any number of XML elements +following the `pragma-data` element. For example: ```` - - - + ```` or ```` - - - + ```` or @@ -182,10 +178,10 @@ or Pragma-oblivious processors and processors which do not implement the pragma in question will as a matter of course produce `pragma` -elements with just the one child element. But processors which -implement a given pragma are free to inject additional XML elements -into the XML form of the pragma. It is to be assumed that the XML -elements contain no additional information, only a mechanically +elements with just the one child element (or none). But processors +which implement a given pragma are free to inject additional XML +elements into the XML form of the pragma. It is to be assumed that the +XML elements contain no additional information, only a mechanically derived XML form which makes the information in the pragma easier to process. It is to be expected that any software to serialize XML grammars in ixml form will discard the additional XML elements. @@ -213,7 +209,7 @@ might be: - + @@ -391,11 +387,6 @@ The following rules apply: * Instead of saying processors MUST be able to ignore all pragmas, we might say they SHOULD be able to ignore all pragmas. -* Instead of making pragma-data required but possibly empty, requiring - an empty *pragma-data* element in cases like `[ls:token]`, we might - make it optional but non-empty, so that `[ls:token]` could have the - shorter XML representation ``. - * Instead of forbidding two namespace declarations for the same prefix, we could say they MUST agree, or that the first one wins (as for entity declarations) or that the last one wins (as for multiple From 10b6bab229273f1cdf78f2280fb366b13049880e Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Mon, 3 Jan 2022 14:18:27 -0700 Subject: [PATCH 144/152] pragmas proposal Markdown claims another victim. --- misc/proposal-F-S.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/proposal-F-S.md b/misc/proposal-F-S.md index 1798233a..0d961865 100644 --- a/misc/proposal-F-S.md +++ b/misc/proposal-F-S.md @@ -9,11 +9,11 @@ and pragmas to ixml. For background, use cases, some discussion of design choices, and examples of how pragmas as defined here could be used in the use -cases, see the document (pragmas.md)[pragmas.md] in this directory. In +cases, see the document [pragmas.md](pragmas.md) in this directory. In that document, the proposal made here is referred to as namespaces proposal S and pragmas proposal F. -We believe that the examples given in (pragmas.md)[pragmas.md] +We believe that the examples given in [pragmas.md](pragmas.md) demonstrate that the proposal outlined here satisfies the known use cases for pragmas. From 2c23cf7de0396bca6cecdf3a9fbeeca97dc31178 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Mon, 3 Jan 2022 14:38:58 -0700 Subject: [PATCH 145/152] Pragmas proposal More copy editing --- misc/proposal-F-S.md | 43 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/misc/proposal-F-S.md b/misc/proposal-F-S.md index 0d961865..3c0b91c9 100644 --- a/misc/proposal-F-S.md +++ b/misc/proposal-F-S.md @@ -70,13 +70,8 @@ For example, the following are all syntactically well formed pragmas: * `[?Q{http://example.org/NS/mine}blue]` * `[@my:color blue]` -It is a consequence of the syntax that pragmas can nest, though the -nesting is only apparent to a processor which understands the -*ls:rewrite* pragma and knows to parse its pragma data as a sequence -of rules in ixml notation. A processor which does not understand the -*ls:rewrite* pragma will merely know that the pragma data here -contains 100 characters, which happen to include one nested pair of -brackets. +It is a consequence of the syntax that pragmas can contain nested +pairs of square brackets. ```` [ls:rewrite @@ -85,6 +80,14 @@ brackets. ] ```` +Here, in fact, the pragma contains a nested pragma, though the nesting +is only apparent to a processor which understands the *ls:rewrite* +pragma and knows to parse its pragma data as a sequence of rules in +ixml notation. A processor which does *not* understand the +*ls:rewrite* pragma will merely know that the pragma data here +contains 100 characters, which happen to include one nested pair of +brackets. That suffices. + Pragmas may appear: * immediately before a terminal or nonterminal symbol in the @@ -310,8 +313,9 @@ like any other. ### Conformance requirements for pragmas -Processors MUST be capable, at user option, of ignoring all pragmas -and processing a grammar using the standard rules of ixml. +Processors MUST be capable, at user option, of ignoring all pragmas +other than namespace declarations and processing a grammar using the +standard rules of ixml. Processors MUST accept pragmas in the ixml or XML form of a grammar, whether they understand or implement the specific pragmas or not. @@ -398,3 +402,24 @@ The following rules apply: form of the grammar, we could say that those actually used MUST be bound, or that they all MUST be bound. +* Instead of using the prefix *ixmlns*, namespace declarations could + use *xmlns* (although strictly speaking that name is reserved, and + it's not clear we have the standing to use it here). + +* Instead of using pragma syntax, namespace declarations could use + some other syntax. E.g. + ```` + prolog: s, (ppragma; namespace)+s, s. + namespace: -'declare', s, -'namespace', s, + @prefix, s, -'=', s, @ns-name, s, '.'. + @prefix: name. + @ns-name: string. + ```` + + In this case, the examples shown above would take the form + ```` + declare namespace xsd = "http://www.w3.org/2001/XMLSchema". + declare namespace rng = "http://relaxng.org/ns/structure/1.0". + ```` + + From 9197b9121d738198c6c76ccd0a4215952889f260 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Mon, 3 Jan 2022 14:47:33 -0700 Subject: [PATCH 146/152] Old pragmas proposal Add status note --- misc/pragmas.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/misc/pragmas.md b/misc/pragmas.md index a7e4362c..7f3f302e 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -2,6 +2,14 @@ 2021-11-16, rev. most recently 2021-12-04 +**Note, 2022-01-02:** A more compact proposal for +pragmas is [elsewhere in this directory](proposal-S-F.md); +it presents only variants S and F of this proposal and omits +much of the design discussion and all of the samples showing +how pragmas can be used to solve specific use cases. This +document remains relevant because it covers those topics, +but for current details of the proposed syntax for pragmas +and namespace declarations, see the other document. This document describes a proposal for adding *pragmas* to the Invisible-XML specification. From 7f3697489caf67bcc4325ab1ff9e7e45655c191c Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Tue, 4 Jan 2022 08:32:13 -0700 Subject: [PATCH 147/152] Pragmas proposal Further copy edits, typo corrections. --- misc/proposal-F-S.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/misc/proposal-F-S.md b/misc/proposal-F-S.md index 3c0b91c9..07408be1 100644 --- a/misc/proposal-F-S.md +++ b/misc/proposal-F-S.md @@ -20,7 +20,7 @@ cases for pragmas. ## Pragmas Pragmas are a syntactic device to allow grammar writers to communicate -with processors without interfering with the operation of other +with processors in non-standard ways without interfering with the operation of other processors. To avoid interference with other processors, two requirements arise: @@ -120,7 +120,7 @@ and terminals: -encoded: tannotation, -"#", @hex, s. inclusion: tannotation, set. exclusion: tannotation, -"~", s, set. --tannotation: (pragma, sp)?, (mark, sp)?. +-tannotation: (pragma, sp)?, (tmark, sp)?. ```` To allow pragmas on the left-hand side of a rule and before its @@ -239,7 +239,7 @@ effect on the XML representation produced by the core rules of ixml. Pragma-oblivious processors will always produce XML representation of pragmas of the form described here. Pragma-aware processors may implement pragmas which modify the standard XML representation -('pragmas for pragmas'). See (pragmas.md)[pragmas.md] for an +('pragmas for pragmas'). See [pragmas.md](pragmas.md) for an example. The point of the *pmark* is in fact to allow such a pragma for pragmas to specify that pragmas marked "`?`" or "`@`" be represented in XML as processing instructions or attributes. (Again: @@ -300,11 +300,11 @@ whether to modify its normal operation or not. The obligation of pragma-oblivious processors is to accept pragmas when they occur in the ixml form of a grammar, and (if they are -producing an XML form of the grammar) produce the correct XML form of +producing an XML form of the grammar) to produce the correct XML form of each pragma, just as they produce the corresponding XML form for any construct in the grammar. -Pragma-aware processors MUST similarly to accept pragmas when they +Pragma-aware processors MUST similarly accept pragmas when they occur in the ixml form of a grammar, and (if they are producing an XML form of the grammar) produce the correct XML form of each pragma, just as they produce the corresponding XML form for any construct in the @@ -328,7 +328,7 @@ When ixml grammars are processed as input using the grammar for ixml, processors MUST produce the correct XML form of each pragma, just as they produce the corresponding XML form for any construct in the grammar, *except* as the processor's behavior is affected by the -presence of pragmas, in the grammar for ixml used to parse the input. +presence of pragmas in the grammar for ixml used to parse the input. ## Namespace declarations @@ -397,17 +397,18 @@ The following rules apply: `let` clauses for the same variable in a FLWOR expression in XQuery). -* Instead of requiring that in the XML form of an ixml grammar, all - namespaces bound in in the ixml grammar SHOULD be bound in the XML +* Instead of requiring that in the XML form of an ixml grammar all + namespaces bound in the ixml grammar SHOULD be bound in the XML form of the grammar, we could say that those actually used MUST be bound, or that they all MUST be bound. * Instead of using the prefix *ixmlns*, namespace declarations could - use *xmlns* (although strictly speaking that name is reserved, and - it's not clear we have the standing to use it here). + use *xmlns*. Strictly speaking, however, that name is reserved and + it's not clear we have the standing to use it here. * Instead of using pragma syntax, namespace declarations could use some other syntax. E.g. + ```` prolog: s, (ppragma; namespace)+s, s. namespace: -'declare', s, -'namespace', s, @@ -417,6 +418,7 @@ The following rules apply: ```` In this case, the examples shown above would take the form + ```` declare namespace xsd = "http://www.w3.org/2001/XMLSchema". declare namespace rng = "http://relaxng.org/ns/structure/1.0". From d7ebc12ad97d00aed4d10386266591b0650bbe63 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Tue, 4 Jan 2022 08:39:23 -0700 Subject: [PATCH 148/152] Update proposal-F-S.md Markdown is so simple and intuitive! It's perfectly obvious how to embed a code block within a paragraph within a list item. I cannot understand how anyone could fail to prefer Markdown to systems with explicit markup. Who can understand those? --- misc/proposal-F-S.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/misc/proposal-F-S.md b/misc/proposal-F-S.md index 07408be1..530358ce 100644 --- a/misc/proposal-F-S.md +++ b/misc/proposal-F-S.md @@ -409,19 +409,13 @@ The following rules apply: * Instead of using pragma syntax, namespace declarations could use some other syntax. E.g. - ```` prolog: s, (ppragma; namespace)+s, s. namespace: -'declare', s, -'namespace', s, @prefix, s, -'=', s, @ns-name, s, '.'. @prefix: name. @ns-name: string. - ```` In this case, the examples shown above would take the form - ```` declare namespace xsd = "http://www.w3.org/2001/XMLSchema". declare namespace rng = "http://relaxng.org/ns/structure/1.0". - ```` - - From a9ed9aad13e670b412c4c35f9c41b80426031465 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Tue, 4 Jan 2022 09:46:52 -0700 Subject: [PATCH 149/152] pragmas proposal Copy edits --- misc/proposal-F-S.md | 49 ++++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/misc/proposal-F-S.md b/misc/proposal-F-S.md index 530358ce..bbf239ab 100644 --- a/misc/proposal-F-S.md +++ b/misc/proposal-F-S.md @@ -7,11 +7,10 @@ Tom Hillman, Michael Sperberg-McQueen This document describes a proposal for adding namespace declarations and pragmas to ixml. -For background, use cases, some discussion of design choices, and -examples of how pragmas as defined here could be used in the use -cases, see the document [pragmas.md](pragmas.md) in this directory. In -that document, the proposal made here is referred to as namespaces -proposal S and pragmas proposal F. +For background, use cases, and some discussion of design choices, see +the document [pragmas.md](pragmas.md) in this directory. In that +document, the proposal made here is referred to as namespaces proposal +S and pragmas proposal F. We believe that the examples given in [pragmas.md](pragmas.md) demonstrate that the proposal outlined here satisfies the known use @@ -240,13 +239,10 @@ Pragma-oblivious processors will always produce XML representation of pragmas of the form described here. Pragma-aware processors may implement pragmas which modify the standard XML representation ('pragmas for pragmas'). See [pragmas.md](pragmas.md) for an -example. The point of the *pmark* is in fact to allow such a pragma -for pragmas to specify that pragmas marked "`?`" or "`@`" be -represented in XML as processing instructions or attributes. (Again: -pragmas may affect the behavior of programs.) +example. -### Static semantics +### Pragma scope In this proposal, pragmas always apply explicitly to some part of a grammar: @@ -278,10 +274,11 @@ those specifying the meaning of specific pragmas. In describing the operational semantics of pragmas, we distinguish different classes of ixml processor: -* *pragma-oblivious* processors recognize pragmas syntactically but -otherwise ignore them all. Informally, they do not 'understand' any -pragmas, and their only obligation is not to trip over pragmas when -they encounter them. +* *pragma-oblivious* processors recognize pragmas syntactically but +otherwise ignore them all, except for namespace +declarations. Informally, they do not 'understand' any pragmas, and +their only obligation is not to trip over pragmas when they encounter +them. * *pragma-aware* processors recognize pragmas syntactically and modify their behavior in accordance with some pragmas. Informally, they @@ -290,7 +287,7 @@ they must determine whether it is one they 'understand' and implement, or not. With regard to a given pragma, processors either *implement* that -pragma or they do not. A processor *implements* a pragma iff it +pragma or they do not. A processor *implements* a pragma if and only if it adjusts its behavior as specified by that pragma. In the ideal case there will be some written specification of the pragma which describes the operational effect of the pragma clearly. This proposal assumes @@ -317,8 +314,13 @@ Processors MUST be capable, at user option, of ignoring all pragmas other than namespace declarations and processing a grammar using the standard rules of ixml. -Processors MUST accept pragmas in the ixml or XML form of a grammar, -whether they understand or implement the specific pragmas or not. +Processors which accept ixml grammars MUST accept pragmas in the ixml +form of a grammar, whether they understand or implement the specific +pragmas or not. + +Processors which accept XML grammars MUST accept pragmas in the XML +form of a grammar, whether they understand or implement the specific +pragmas or not. If a pragma which the processor does not understand or implement is present in a grammar used to parse input, the processor MUST process @@ -383,10 +385,17 @@ The following rules apply: * In the XML form of an ixml grammar, all namespaces bound in in the ixml grammar SHOULD be bound in the XML form of the grammar. - This should normally take the form of namespace declarations on the - `ixml` element. + This should normally take the form of namespace declarations on the + `ixml` element. + + +## Appendix: Possible variations + +Some obvious variations on this proposal can be listed. -## Possible variations +* Instead of saying that pragma-oblivious processors must ignore all + pragmas, we could say that they that they must ignore all pragmas + except namespace declarations. * Instead of saying processors MUST be able to ignore all pragmas, we might say they SHOULD be able to ignore all pragmas. From 6b4da737545cd09696b071fe16adb20fa2136d63 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Tue, 4 Jan 2022 09:48:00 -0700 Subject: [PATCH 150/152] Rename short proposal --- misc/{proposal-F-S.md => pragmas-proposal.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename misc/{proposal-F-S.md => pragmas-proposal.md} (100%) diff --git a/misc/proposal-F-S.md b/misc/pragmas-proposal.md similarity index 100% rename from misc/proposal-F-S.md rename to misc/pragmas-proposal.md From 9288ce356b796ace522a339fb9313587f0693c75 Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Tue, 4 Jan 2022 09:49:35 -0700 Subject: [PATCH 151/152] Update pragmas-proposal.md Correct the revision date. --- misc/pragmas-proposal.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/pragmas-proposal.md b/misc/pragmas-proposal.md index bbf239ab..526b22ba 100644 --- a/misc/pragmas-proposal.md +++ b/misc/pragmas-proposal.md @@ -2,7 +2,7 @@ Tom Hillman, Michael Sperberg-McQueen -15 December 2021, rev. 3 January 2022 +15 December 2021, rev. 4 January 2022 This document describes a proposal for adding namespace declarations and pragmas to ixml. From 34998460137248d80c5b2af5da0c78ab9145cefe Mon Sep 17 00:00:00 2001 From: "C. M. Sperberg-McQueen" Date: Wed, 26 Jan 2022 14:29:18 -0700 Subject: [PATCH 152/152] Replace tabs with spaces --- misc/pragmas.md | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/misc/pragmas.md b/misc/pragmas.md index 7f3f302e..90e9ae23 100644 --- a/misc/pragmas.md +++ b/misc/pragmas.md @@ -68,12 +68,12 @@ Contents: * [Renaming](#renaming) * [Name indirection](#name-indirection) * [Rule rewriting](#rule-rewriting) - * [Tokenization annotation and alternative formulations.](#tokenization-annotation-and-alternative-formulations) - * [Text injection](#text-injection) - * [Attribute grammar specification](#attribute-grammar-specification) - * [Pragmas for proposal V](#Pragmas-for-proposal-V) + * [Tokenization annotation and alternative formulations.](#tokenization-annotation-and-alternative-formulations) + * [Text injection](#text-injection) + * [Attribute grammar specification](#attribute-grammar-specification) + * [Pragmas for proposal V](#Pragmas-for-proposal-V) * [Namespace binding proposals](#Namespace-binding-proposals) - * [Namespace binding, common rules](#namespace-binding-common-rules) + * [Namespace binding, common rules](#namespace-binding-common-rules) * [Namespace binding in proposal U](#namespace-binding-in-proposal-u) * [Namespace binding in proposal S](#namespace-binding-in-proposal-s) * [Open issues](#open-issues) @@ -691,9 +691,9 @@ the *y* namespace, and some in no namespace at all, might be [@nsd:x http://example.org/NS/existential] [@nsd:y http://example.com/NS/yoyo] x:sentence: x:a, ' ', y:b?, '. ', c. - x:a: 'Speed'. - y:b: 'kills'. - c: 'It really does.'. + x:a: 'Speed'. + y:b: 'kills'. + c: 'It really does.'. ```` The XML representation of the grammar might be (in form V): @@ -876,14 +876,14 @@ output produced manually, may be inaccurate*): - When the old pond - + When the old pond + - gets a new frog - + gets a new frog + - It's a new pond. - + It's a new pond. + ```` @@ -1127,9 +1127,9 @@ We can now annotate the grammar and supply an alternative formulation of ```` ^ [ls:rewrite - comment: -"{", (cchars; comment)*, -"}". - [ls:token] -cchars: cchar+. - ] + comment: -"{", (cchars; comment)*, -"}". + [ls:token] -cchars: cchar+. + ] comment: -"{", (cchar; comment)*, -"}". -cchar: ~["{}"]. ```` @@ -1142,7 +1142,7 @@ formulation after, not before, the existing rule: [ls:rewrite comment: -"{", (cchars; comment)*, -"}". - [ls:token] cchars: cchar+. - ]. + ]. -cchar: ~["{}"]. ```` @@ -1227,9 +1227,9 @@ problem.) factor → '0'. [ factor.v = 0 ] - factor → '1'. - [ factor.v = 1 ] - factor → '2'. + factor → '1'. + [ factor.v = 1 ] + factor → '2'. [ factor.v = 2 ] factor → '3'. [ factor.v = 3 ] @@ -1266,7 +1266,7 @@ written thus using the brackets-QName syntax: [ag:rule e0.v := e1.v + term.v ]. [@ag:id t0] term: [@ag:id t1] term, s, '_', s, factor [ag:rule t0.v := t1.v * factor.v]. - factor: digit [@ag:rule factor.v := number(string(digit))]; + factor: digit [@ag:rule factor.v := number(string(digit))]; '(', s, expr, s, ')' [@ag:rule factor.v := expr.v ]. digit: '0'; '1'; '2'; '3'; '4'; '5'; '6'; '7'; '8'; '9'. s: [#20; #A; #D; #9].