Collects all parser particles from character parsers and
joins them to a content model which is DTD compatible.
There are two situations: without and with an explicit element definition.
In both cases the definitions of the parse particles (e.g. "p") must be
collected from the different character parser definitions (which may be recursive!).
All variants must be joined into one disjunction, and this must be normalized
into a content model for later DTD generation and result write-out.
Case without element definition:
chars a = ..... [p ..... [q..][q..] [p ..... ] .... ]
chars b = ..... [p ..... ] ...
In this case NO definition in the module may have the name "p".
or
chars a = ..... [p ..... [q..][q..] [p ..... ] .... ]
chars b = ..... [p ..... ] ...
chars p = #distributed with xmlrep el = "x:y", postprocessor "a.b"
In this case a char parser is defined as "#distributed" and will be assigned
the collected content model of the parse particles in the same module with the name.
Then additional features can be specified, like xml tag and namespace,
Java class as postprocessor, etc.
chars p = #distributed with xmlrep data ...
The keyword "data" means that the sequential order of the input is not significant
and will be re-ordered. The top-level expression will be a permutation "..&.." of
the contained elements (coming from character parsers or parse particles in the
collected regexps).
Usage: create one instance (anew for each instantiated module) and call
resolve(ResolvedModule)
.
(Please note that there is a general problem with more than one instantiations of the
same module, which will result in more than one parser definitions bound to the saem
XML tag !)