Closed FersiMajd closed 2 years ago
Could you provide more information?
Node_attributes
section?Slaves
in the Nodes
section but provide no nodes or do you completely omit this field?This is an "issue" with the grammar, in the nodes group the slaves field is mandatory both according to the standard and this library.
I've created a branch that makes this part optional, you can install it using: pip install git+https://github.com/c4deszes/ldfparser.git@feature/optional-nodes
, this is using 0.14.0
but it should be easy to backport to 0.10.0
. In the lark file a lot of fields could be made optional, in this case though the LdfTransformer
had to be modified as well.
In the future error handling will be better shared between the grammar and the parser, but as long as you're only using the library to convert the LDF to JSON this wouldn't affect you. These parts in particular will likely be optional but with the parser raising an error at the end that can be suppressed.
If you need this ported to 0.10.0
or have further issues parsing your LDF let me know, otherwise you could close this issue.
When parsing ldf file that contains only Master ECU, the script shows an error and skips the file. While it's not an error the file is valid and should be parsed.