Hasanuddin Tamir wrote:

>I don't personally see any problem to include colon in the allowed
>characters. But why the second alternatif is more difficult to parse? If
>you have consistent syntax, it should be simpler.
>
>    m!^(\w+):(\w+?)/(\w+)\.(\w+)$!;
>    $object = $1;
>    $id = $2;
>    $method = $3;
>    $attr = $4;
>
>    m!^(\w+?)/(\w+?)/(\w+)\.(\w+)$!;
>    $object = $1;
>    $id = $2;
>    $method = $3;
>    $attr = $4;
>

The problem is that each object may have subobjects. And additionally 
the id is optional and so is the method.
So the following cases would be valid:
OBJECT.SUBOBJECT.ATTRIBUTE
OBJECT/METHOD
OBJECT:ID.ATTRIBUTE
OBJECT.SUBOBJECT/METHOD
and more

the only special case is that only the root object may have an id since 
subobjects already have one through the relationship to their parent.
But thanks for the regular expressions, maybe I can use them with a 
little tweaking :)

Sam Tregar wrote:

>Hmm, maybe I should change that FAQ answer to be a little more correct.
>The real answer is:
>
>  Anything but the quote character and '>' if you use a quoted name.
>  Anything but '>', '=' and whitespace if you don't use a quoted name.
>
>I guess I imagined that I might want to rewrite the parser to be more
>restrictive at some point.  Maybe I will, but I think you'd be safe enough
>to treat the above as true for at least 2.x.
>
Thanks for clarification, I hope the colon will make it even in a more 
restrictive parser.

Stefan


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to