Re: YAML and blanks
Trans <[email protected]>
| Newsgroups | gmane.text.yaml.general |
|---|---|
| Message-ID | <c93651d3-0e23-4728-a7ad-4c63bf49f79a@v20g2000yqv.googlegroups.com> |
On Apr 19, 2:16 pm, Dan Stromberg <[email protected]> wrote: > We have a build process that uses YAML - pyyaml specifically, not > pyyaml-legacy. > > When our automated processes put things in the YAML files, the YAML > parsing works. But every once in a while a human adds something to a > YAML file, and sometimes these humans don't add blanks after the colons, > and then the process blows up. > > I've been asked to come up with a YAML parser that will be more lenient > about not having a blank after a colon. EG, right now, this doesn't > work for us: > > invoice: 34843 > date : 2001-01-23 > bill-to: &id001 > given :Chris > family : Dumars > > ...because "given :Chris" has no space after the colon. > > So I have some questions: > 1) Is there already a YAML parser that relaxes this? > 2) How can I tell what version of pyyaml we are using? I see the module > names match those of pyyaml, but when grep'ing those modules for > "version", I don't see anything that looks like a version string > 3) I see that pyyaml's trunk has a "tests" directory - how would I > invoke these? Can anyone comment on how comprehensive these tests are? > 4) Does pyyaml currently insist on a blank after a colon for a good > reason? Would eliminating the requirement introduce an ambiguity? Maybe a simple pre-parser suffice? ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev