From b8581987e20be638a6614557942c4af06671f520 Mon Sep 17 00:00:00 2001
From: Norman Walsh An alternative is zero or more terms, separated by commas: A term is a singleton factor, an optional factor, or a repeated factor,
-repeated zero or more times, or one or more times. A term is a singleton factor, an optional factor, or a repeated factor.
+A repeated factor may be repeated zero or more times, one or more
+times, or “n” times where “n” may be a specific number or a range.
+ A factor is a terminal, a nonterminal, an insertion, or a bracketed series
of alternatives:Rules
alt: term**(-",", s).
--term: factor;
option;
repeat0;
- repeat1.
+ repeat1;
+ repeatn.
Rules
a#a, a#a#a etc., but not the empty string.
repeat1: factor, (-"+", s; -"++", s, sep).+
A factor repeated a specified number of times is followed by
+<min,max>,
+or <<min,max>>
+and a separator (where max may be omitted if max=min).
+For instance, a<3,5> would match three, four, or five a,
+a<<2,4>>"," would match two, three, or four a
+separated by commas, and a<3> would match exactly three a.
+
repeatn: factor, (-"<", s, min, s, (-",", s, max, s)?, -">", s; + -"<<", s, min, s, (-",", s, max, s)?, -">>", s, sep).+ +
In the repetition, the min is an integer greater than or equal to zero.
+The max is an integer greater than or equal to min and strictly
+greater than zero; or it is *, indicating an unbounded number of repetitions;
+or it is omitted, in which case it is effectively equal to the min value.
+
An optional factor is followed by a question mark, e.g. abc?.
For instance "a"? would match a or the empty
string.
f**sep ⇒ f-star-sep -f-star-sep: (f++sep)?.+
Exactly m repetitions:
+f<m> ⇒ f₁, f₂, f₃ , ..., fₘ+ +
A range of repetitions:
+f<m,n> ⇒ f₁, f₂, f₃ , ..., fₘ, (fₘ₊₁, (fₘ₊₂, ..., (fₙ)?, ... )? )?+ +
For example, f<3,7> is equivalent to f,f,f,(f,(f,(f,(f)?)?)?)?. The
+simpler conversion, f,f,f,f?,f?,f?,f? also matches the input,
+but it will generate many ambiguous parses.
An unbounded range:
+ +f<m,*> ⇒ f₁, f₂, f₃ , ..., fₘ, f*+ +
Exactly m repetitions with a separator:
+ +f <<m>> sep ⇒ f, (sep, f)<m-1>+ +
A range of repetitions with a separator:
+ +f <<m,n>> sep ⇒ f, (sep, f)<m-1,n-1>+ +
An unbounded repeat with a separator:
+ +f <<m,*>> sep ⇒ f, (sep, f)<m-1,*>+
The complete grammar for ixml:
From 08a13552c8c5d3a5009bb44a37bd5a85ee2abc8f Mon Sep 17 00:00:00 2001 From: Norman WalshAn 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. -A repeated factor may be repeated zero or more times, one or more -times, or “n” times where “n” may be a specific number or a range. -
- +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;
- repeatn.
+ repeat1.
A factor is a terminal, a nonterminal, an insertion, or a bracketed series of alternatives:
@@ -460,24 +456,6 @@a#a, a#a#a etc., but not the empty string.
repeat1: factor, (-"+", s; -"++", s, sep).-
A factor repeated a specified number of times is followed by
-<min,max>,
-or <<min,max>>
-and a separator (where max may be omitted if max=min).
-For instance, a<3,5> would match three, four, or five a,
-a<<2,4>>"," would match two, three, or four a
-separated by commas, and a<3> would match exactly three a.
-
repeatn: factor, (-"<", s, min, s, (-",", s, max, s)?, -">", s; - -"<<", s, min, s, (-",", s, max, s)?, -">>", s, sep).- -
In the repetition, the min is an integer greater than or equal to zero.
-The max is an integer greater than or equal to min and strictly
-greater than zero; or it is *, indicating an unbounded number of repetitions;
-or it is omitted, in which case it is effectively equal to the min value.
-
An optional factor is followed by a question mark, e.g. abc?.
For instance "a"? would match a or the empty
string.
f**sep ⇒ f-star-sep -f-star-sep: (f++sep)?.-
Exactly m repetitions:
-f<m> ⇒ f₁, f₂, f₃ , ..., fₘ- -
A range of repetitions:
-f<m,n> ⇒ f₁, f₂, f₃ , ..., fₘ, (fₘ₊₁, (fₘ₊₂, ..., (fₙ)?, ... )? )?- -
For example, f<3,7> is equivalent to f,f,f,(f,(f,(f,(f)?)?)?)?. The
-simpler conversion, f,f,f,f?,f?,f?,f? also matches the input,
-but it will generate many ambiguous parses.
An unbounded range:
- -f<m,*> ⇒ f₁, f₂, f₃ , ..., fₘ, f*- -
Exactly m repetitions with a separator:
- -f <<m>> sep ⇒ f, (sep, f)<m-1>- -
A range of repetitions with a separator:
- -f <<m,n>> sep ⇒ f, (sep, f)<m-1,n-1>- -
An unbounded repeat with a separator:
- -f <<m,*>> sep ⇒ f, (sep, f)<m-1,*>-
The complete grammar for ixml:
From 8cddb92f10a265bca27695c484b5652fccf38614 Mon Sep 17 00:00:00 2001 From: Norman WalshA conformant Invisible XML processor is required to produce well-formed XML -output, but its choices in constructing the XML are not otherwise constrained. +
A conformant Invisible XML processor is required to produce well-formed +output [XML] +that is namespace well-formed [XMLNS], +but its choices in constructing the XML are not otherwise constrained. 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.
@@ -1032,6 +1034,10 @@[XMLNS] Tim Bray et al. (eds.), Namespaces +in XML 1.0 (Third Edition), W3C, 2009, https://www.w3.org/TR/xml-names/
+[CYK] Sakai, Itiroo. Syntax in universal translation. In