From: Clark C . Evans <cce@cl...> - 2001-11-16 19:01:02
YPATH ramblings... ignore if you wish.
Ok. I have a tedious detail with regard to reserved
characters... and I'm not sure how this works out yet.
My context is YPATH, which will be a URI mechansim
for identifying particular nodes in a YAML text
(great for telling the parser which sub-graphs you
want... so that you don't have to load the entire
construct in memory).
Anway, for the URI mechanism, each path segment can
literally contain alphanumerics plus characters from
the following string "-_.!~*'()" all other character
must be escaped using %20 hex notation that I'm sure
you are familar with.
Of the characters, these are useful for content:
- the dash, - , is useful for minus sign (numeric values)
- the underscore, _ , is useful for names
- the tilde, ~ , is useful for our null value.
This leaves a few good for "operators"...
- the bang, . ,is good for matching nodes of
- the star, * , is good as a wild-card,
and also as a node alias.
- the period, . , is good to represent the
- parens, ( ) may be good for a select
operator and/or function calls, etc
That leaves the backtick... I forget, did
we assign any meaning to the backtick?
That said, we may want to add '.' and '*' to
the reserved characters. We need *
added for the alias mechanism.
I'm not sure quite what the impact is, but
I see another class of scalars emerging...
it would not have any syntax description,
it just would require escaping when used
in a YPATH expression.
Anyway... just rambling.