We have an IFC that is created by Revit. It is exhibiting some interesting parsing errors. It’s possible that our parser is being too strict, but this particular file also exhibits errors in ArchiCAD, but not in BlenderBIM. It seems out of line with the spec. Any input would be greatly appreciated.
Calling @angel.velez for input.
Problem 1:
Incorrect date format. Other Revit IFCs format the date like ‘2019-01-24T11:32:54’. I believe it may be the extra enclosing ‘’ that is causing this issue.
Our parse error:
line 4:15 mismatched input ''2022-09-29T17:02:02+02:00'' expecting DateTime
Problem 2:
Extraneous ( ) in all list elements. Other Revit IFCs do not exhibit this issue.
Our parse error:
line 142:30 extraneous input '(' expecting {IntegerLiteral, RealLiteral, Id, StringLiteral, TypeRef, '$', AnyString}
line 142:55 extraneous input ')' expecting ';'
Examples:
#136=IFCCARTESIANPOINTLIST3D(((0.,0.,0.),(43.75,0.,0.)));
#300=IFCINDEXEDPOLYGONALFACEWITHVOIDS((1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30),((31,32,33,34),(35,36,37,38),(39,40,41,42),(43,44,45,46),(47,48,49,50)));
Problem 3:
Unescaped ‘’. I believe the 8" pendant light name is causing the parser to emit an error.
Our parse error:
line 186708:71 extraneous input '':2282502'' expecting {',', ')'}
line 186708:102 extraneous input '''' expecting {',', ')'}
Example:
#187204=IFCLIGHTFIXTURE('03ks4u1evCz8SCUk_egWio',#20,'Linear Pendant:8'':2282502',$,'Linear Pendant:8''',#187203,#187200,'2282502',.NOTDEFINED.);
Update
Problem 1 is a date/time parsing issue in our STEP grammar. Older IFCs generated with the Express Data Manager didn’t encode a time with a time zone. Newer ones generated with ODA use the time zone. Here’s the error in the grammar: IFC-dotnet/STEP.g4 at master · ikeough/IFC-dotnet · GitHub
Problem 3 might be a similar problem with the grammar. We support ' but not ‘’. IFC-dotnet/STEP.g4 at master · ikeough/IFC-dotnet · GitHub