-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python code capable of parsing matter IDL files (including some unit tests) #13725
Conversation
Can parse current IDL format (but that may change). Has working unit tests.
PR #13725: Size comparison from d5e7431 to 79594c0 Full report (41 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
PR #13725: Size comparison from 786fdfa to 4181a79 Full report (14 builds for efr32, k32w, linux, p6, qpg, telink)
|
…ython and is too generic to attempt a top level import on it
PR #13725: Size comparison from 786fdfa to 1994684 Increases above 0.2%:
Increases (1 build for linux)
Full report (32 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
PR #13725: Size comparison from aa72854 to b4408df Full report (14 builds for efr32, k32w, linux, p6, qpg, telink)
|
PR #13725: Size comparison from 3a2106c to 33e0440 Full report (32 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
PR #13725: Size comparison from 3a2106c to 3795a0d Increases (25 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
Full report (32 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
PR #13725: Size comparison from 5394388 to 2336fc9 Full report (33 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
fast tracking: PR has been up for a few days, it does not affect SDK functionality and includes unit tests. |
…tests) (project-chip#13725) * A IDL parser: Can parse current IDL format (but that may change). Has working unit tests. * one more test * minor comment * make the structs a bit more compact: easier to read * one more tests * more tests, fixed one bug * Add unit test for cluster commands * Unit test for cluster enums * Unit test for cluster events * Rename "structure_member" to field since that seems easier to type and is a good term * Match the newest attribute format for IDLs * Allow test_parsing to be run stand alone and hope that this fix also fixes mac * Rename "parser" to a more specific name: the name parser is used in python and is too generic to attempt a top level import on it * Restyle fixes * Add support for global tag parsing after idl updated in master * Add support for datatype sizes and unit tests * Add test for sized strings in structs as well * Ran restyler
Problem
Want to be able to parse IDLs and do processing on them. This parsing is much faster than running the equivalent ZAP javascript-based generation, is deterministic and python is part of the build system.
Change overview
IDL parser with unit test. Not used anywhere, however it is capable of parsing current IDL files in a reasonably fast manner.
On my machine:
Testing
Unit tests inclued.
I manually tested the largest IDL files we have and they do not error out.