(2020-02-20, 22:36)Michael Horvath Wrote: I'm starting to write my own parser that will convert an MPD file to JSON format.
Are the FILE, Name:, Author:, !LICENSE, ROTATION properties case-sensitive? Will they always be the same case as I typed them or should I ignore case?
Thanks.
There are some old files, either distributed with the AIOI or in OMR (can't remember where) where "0 file " is in lower case.
If you ignore the case while detecting file headers, then you will face trouble with headers, such as:
Code:
0 FILE File_cabinet.ldr
0 File cabinet for Miniland Figures
0 Name: File_cabinet.ldr
...
My proposed solution for handling this is to:
1) Detect if there is any "0 FILE" statement. If such a statement exist, then only accept proper UPPER CASE 0 FILE statements
2) Otherwise, accept all "0 fILE" case insensitive statements as if they were "0 FILE" statements.