From: Rich M. <rd...@cf...> - 2003-01-04 07:25:25
|
I seem to be making more headway than I thought: * An area where I was really confused turned out to be a bug in YAML.pm (flow sequences can't span multiple lines in YAML.pm). * My suggestion about stacking up dashes caught Brian's interest. So, here's another issue: allowing funny characters in scalars. I can encode the CycL code: (#$implies (#$and (#$isa ?TRANSFER #$TransferringPossession) (#$fromPossessor ?TRANSFER ?FROM)) (#$isa ?FROM #$SocalBeing)) in the YACycL code: - implies - - and - [ isa, '?TRANSFER', TransferringPossession ] - [ fromPossessor, '?TRANSFER', '?FROM' ] - [ isa, '?FROM', SocialBeing ] but this is a bit ugly. The question mark, unfortunately, is a necessary sigil in CycL, flagging temporary variables. Since I can't eliminate it from CycL, I'd like to be able to use it in YACycL without putting it in quotes, as: - implies - - and - [ isa, ?TRANSFER, TransferringPossession ] - [ fromPossessor, ?TRANSFER, ?FROM ] - [ isa, ?FROM, SocialBeing ] I strongly suspect that this is not the only situation where someone will want to expand the character set of scalars, so some sort of general solution is in order. Is there one? FWIW, I realize that I could (in the spirit of OML :-) pre-process the YACycL code before I hand it off to the YAML parser, as: $str =~ s|(\?[0-9A-Za-z_]+)|'$1'|g; but I'd _rather_ be able to do this within the YAML spec. -r -- email: rd...@cf...; phone: +1 650-873-7841 http://www.cfcl.com/rdm - my home page, resume, etc. http://www.cfcl.com/Meta - The FreeBSD Browser, Meta Project, etc. http://www.ptf.com/dossier - Prime Time Freeware's DOSSIER series http://www.ptf.com/tdc - Prime Time Freeware's Darwin Collection |