[relaxng-user] RNC and repeatedPrimary
Jeff Rafter
lists at jeffrafter.com
Fri May 7 17:49:53 ICT 2004
Thanks Eric and Bob,
> Changing postfix to prefix wouldn't add any expressiveness, and, after
> over 40 years of use, would seem very unusual to programmers and
> mathematicians.
>
> (Thanks for a fun 20 minutes looking up the dates!)
I am still (perhaps even more) surprised that postfix was so dominant-- it
seems that the benefits of prefix for handling data in streams would have
come into play-- but then, I suppose that's why prefix mathematical notation
isn't seen in the "real world" too often-- it is awkward.
With that said, I can't figure out a way to make a single pass through an
RNC grammar without either (a) buffering an unknown number of tokens in
memory, or (b) buffering the resulting grammar. It is likely academic
though-- multiple passes are probably fine, as is storing the result
document/grammar in memory. Luckily RNC grammars are compact.
Of course, the folks on this list know far more than I do about parsing-- so
if there is a way to do it without (a) or (b) then I would love to hear it
(links to various approaches would be very welcome).
Thanks again,
Jeff Rafter
More information about the relaxng-user
mailing list