From 8c12da13e6386dce36599801a288ab0fac176689 Mon Sep 17 00:00:00 2001 From: shungeer Date: Mon, 1 Jul 2024 09:20:30 +0800 Subject: [PATCH] Update README.md about extend express usage (#4841) 1. C++ code generation by extend express. 2. python rule code generation by extend express. --- .../ifcopenshell/express/README.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/express/README.md b/src/ifcopenshell-python/ifcopenshell/express/README.md index 6def60b872..3c57d4cab5 100644 --- a/src/ifcopenshell-python/ifcopenshell/express/README.md +++ b/src/ifcopenshell-python/ifcopenshell/express/README.md @@ -8,11 +8,24 @@ The code can be invoked in the following way and results in several code outputs named according to the schema name in the Express file. A python 3 interpreter with the `pyparsing` (`pip install pyparsing`) library is required. +note: +**Keep in mind that Express is not very suitable for this kind of usage. In the end, (as far as I can tell) no tool is able to read your model, because it doesn't understand the schema as it has no notion of the core part vs the addition.** + ## Command line usage for code generation +The usage for C++ project. ~~~ -# python3 bootstrap.py express.bnf > express_parser.py -python3 express_parser.py IFC2X3_TC1.exp header implementation schema_class definitions +# bootstrap.py express.bnf in ifcopenshell-python.ifcopenshell.express. +>>> python3 bootstrap.py express.bnf > express_parser.py +>>> python3 express_parser.py IFC2X3_TC1.exp header implementation schema_class definitions +~~~ + +The usage for python project. +~~~ +# code rule generation +# generating 'ifcopenshell.express.rules.IFC2X3_TC1' in ifcopenshell-python.ifcopenshell.express.rules. +# rule_compiler in ifcopenshell-python.ifcopenshell.express. +>>> python -m rule_compiler IFC2X3_TC1.exp ~~~ ## Programmatic usage