Thomas - I'm trying to generate parsing code for the IFC4x3 RC3 and RC4 specification. The express_parser.py script is producing errors as shown below. I've copied the EXP file into the ...\express folder so I don't think it's an input\path issue. Any suggestions?
I've verified I'm using python 3.9.0 and pyparsing is installed (import pyparsing does not generate errors)
PS F:\IfcOpenShell\src\ifcopenshell-python\ifcopenshell\express> python express_parser.py IFC4x3_RC3.exp header implementation schema_class definitions
Traceback (most recent call last):
File "F:\IfcOpenShell\src\ifcopenshell-python\ifcopenshell\express\express_parser.py", line 483, in <module>
m = parse(sys.argv[1])
File "F:\IfcOpenShell\src\ifcopenshell-python\ifcopenshell\express\express_parser.py", line 474, in parse
ast = syntax.parseFile(fn)
File "F:\Python\Python39\lib\site-packages\pyparsing.py", line 2585, in parseFile
raise exc
File "F:\Python\Python39\lib\site-packages\pyparsing.py", line 2969, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pyparsing.ParseException: Expected "schema", found '<' (at char 6), (line:7, col:1)
PS F:\IfcOpenShell\src\ifcopenshell-python\ifcopenshell\express>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Suggests some pretty significant schema error. Are you sure you're parsing the actual express text file and not something completely else, let's say HTML? Can you copy the .exp you're parsing?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem was the express file. It copied to my computer as HTML. Sorry to waste your time - I didn't think to check that.
I got a file from bSI and now the code generate is working.
For the next step, should I take the Ifc4x3_rc3.h/cpp and other generated files, move them to the IfcParser folder, add them to the VisualStudio project and build?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Looking at the Ifc4x1.h/.cpp and other files, I see that they are generated from a python script that reads EXP files.
Where is the python script? How does this process work?
It recently moved here https://github.com/IfcOpenShell/IfcOpenShell/tree/v0.6.0/src/ifcopenshell-python/ifcopenshell/express Let me know if you have further questions
Thomas - I'm trying to generate parsing code for the IFC4x3 RC3 and RC4 specification. The express_parser.py script is producing errors as shown below. I've copied the EXP file into the ...\express folder so I don't think it's an input\path issue. Any suggestions?
I've verified I'm using python 3.9.0 and pyparsing is installed (import pyparsing does not generate errors)
Suggests some pretty significant schema error. Are you sure you're parsing the actual express text file and not something completely else, let's say HTML? Can you copy the .exp you're parsing?
The problem was the express file. It copied to my computer as HTML. Sorry to waste your time - I didn't think to check that.
I got a file from bSI and now the code generate is working.
For the next step, should I take the Ifc4x3_rc3.h/cpp and other generated files, move them to the IfcParser folder, add them to the VisualStudio project and build?