Are meta-commands case-sensitive?


Are meta-commands case-sensitive?
#1
Almost all official and unofficial meta-commands that I've seen are written in all-caps (the exceptions being 'Name' and 'Author', presumably for historical reasons). I can't find anything which specifies that this is mandatory when defining new metas, so does anyone know:

- is it in fact mandatory, or just convention?
- should parsers be case-sensitive or case-insensitive when dealing with metas?


(As an aside, 'meta' is not an acronym, so should not be written as 'META' as it seems to be throughout the specs...)
Reply
Re: Are meta-commands case-sensitive?
#2
The official LDraw 1.0.2 spec document specifies that meta-commands must begin with a ! and must be in all caps. The text for this is in something of an odd location: the Meta Command sub-section under the Line Type 0 sub-section of the Line Types section. It is not in the main Meta Commands section of the document.
Reply
Re: Are meta-commands case-sensitive?
#3
That would be why I didn't see it then :-) Thanks!

I take it then that the recommendation is that parsers should not treat (eg) '0 bfc invertnext' and '0 BFC INVERTNEXT' as the same thing?
Reply
Re: Are meta-commands case-sensitive?
#4
Does the LSC want to take a quick vote to put it in the list document?

eg. Change
Quote:The following is a list of META commands that have been formally adopted into the LDraw.org File Format and links to the applicable specifications. Note that all new official META commands will have a "!" as the prefix character
to
Quote:The following is a list of META commands that have been formally adopted into the LDraw.org File Format and links to the applicable specifications. Note that all new official META commands will have a "!" as the prefix character and must be in capital letters.
Reply
Re: Are meta-commands case-sensitive?
#5
I'm not sure we really need to vote since this change is semantic and doesn't actually change any requirements.
Reply
Re: Are meta-commands case-sensitive?
#6
Do you want to make the change? I think it would be better as you are actually on the LSC. I know it's pedantic but since we have a long list of rules and this falls under the spirit of them I'd prefer it.
Reply
Re: Are meta-commands case-sensitive?
#7
No prob. I'll do it after I have dinner.
Reply
Re: Are meta-commands case-sensitive?
#8
This is now done. I made some minor navigational tweaks to the File Format and Official Meta Command docs.
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 3 Guest(s)