[PATCH] Add a VFSFromYAML class and a parser to create it

Argyrios Kyrtzidis kyrtzidis at apple.com
Fri Feb 21 09:02:25 PST 2014

On Feb 21, 2014, at 3:27 AM, Dmitri Gribenko <gribozavr at gmail.com> wrote:

> On Fri, Feb 21, 2014 at 12:34 AM, Ben Langmuir <blangmuir at apple.com> wrote:
>> On Feb 20, 2014, at 4:11 PM, Ben Langmuir <blangmuir at apple.com> wrote:
>>> We could use the YAML version string
>>> %YAML 1.2
>> Actually, if we go this route we should encode our own version number in the same place for compactness.  In YAML, we could use a tag for this
>> %TAG ! tag:vfs-yaml-file,version:1234
>> Where 1234 is a made up version number for our vfs format.
> Then we would need to make sure to use this tag, otherwise its
> presence or absence should not affect the semantics of the file, I
> think.
> But I don't see why is it a big deal to add 'version': 1, since both
> of these solutions will increase the size of file by one line.  Adding
> a field looks simpler, more easily understandable, and keeps
> compatibility with JSON.

The problem with a simple JSON field is that it is not clear that we are depending on the presence of something at the beginning of the file in order to interpret it as JSON.
It is more clear to say
	the file should have this at the top:
		%TAG ! tag:vfs-yaml-file…
	the file should have this at the top:
			‘version’: 1

> Dmitri
> -- 
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

More information about the cfe-commits mailing list