[REBOL] Re: Enhancement - parse-[scheme] word
From: petr:krenzelok:trz:cz at: 12-Feb-2001 11:08
Andrew Martin wrote:
> Petr wrote:
> > Well, parse-email, parse-xml, parse-xml-rpc, parse-soap, etc, etc. ... is
> there anything about them what could be generalized (kind of net-utils or
> root-protocol for parsed stuff?)
> XML as a pseudo scheme?
> Don't know what this would do.
don't know too ... but - do we need to have it available as scheme? Look at
'import-email for g.e. - it's not scheme too, and it contains several parse
->> source import-email
import-email: func [
"Constructs an email object from an email message."
data [string!] "The email message"
data: parse-header system/standard/email
copy/part data content: any [find/tail data "^/^/" tail data]
data/date: parse-header-date data/date
data/from: parse-email-addrs data/from
data/to: parse-email-addrs data/to
data/reply-to: parse-email-addrs data/reply-to
I don't understand the topic of making parsers/serializers/tokenizers at all
yet, so I can be wrong here, but looking at 'import-email, 'xml-language, etc.,
- what about having some kind of parse rules available, grouped in related
areas? e.g. if some protocol is derived from XML, it will probably (in theory)
contain some rules which comply to parsing XML itself, no? :-)
What's more - we really don't need to have it all available under schemes, as
scheme is something else. Even your 'http scheme uses some kind of url parser.
Maybe system/parser-rules could be created, but it doesn't matter now :-) First
let's find some general ideas thru various protocols/parse-rules, of course ...
if they do exist ....
> XML as a dialect of Rebol?
> p "Hello" br list ["one" "two" "three" now 1 + 2]
> Avoids having to write closing tags. Allows insertion of active Rebol
> Tag 'MyCustomTag
1) Isn't parsing stuff and working with particular protocol two slightly
2) I don't understand your Tag 'MyCustomTag (my-custom-tag in a rebol way ;-))