You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Error when reading an ldf with and empty encoding type container in Signal_encoding_types, I want to mention that Vector's tool LDF explorer can handle this case, Can we support this use case, I think the tool might just ignore that encoding type container and continue parsing the file. To Reproduce
Steps to reproduce the behavior:
read an ldf file with any empty encoding type like this
Signal_encoding_types {
empty_type{
}
}
you get error as the following:
ContextualLexer.lex(self, lexer_state, parser_state)
[672](file:///C:/Python312/Lib/site-packages/lark/lexer.py:672) last_token = lexer_state.last_token # Save last_token. Calling root_lexer.next_token will change this to the wrong token
[673](file:///C:/Python312/Lib/site-packages/lark/lexer.py:673) token = self.root_lexer.next_token(lexer_state, parser_state)
--> [674](file:///C:/Python312/Lib/site-packages/lark/lexer.py:674) raise UnexpectedToken(token, e.allowed, state=parser_state, token_history=[last_token], terminals_by_name=self.root_lexer.terminals_by_name)
[675](file:///C:/Python312/Lib/site-packages/lark/lexer.py:675) except UnexpectedCharacters:
[676](file:///C:/Python312/Lib/site-packages/lark/lexer.py:676) raise e
UnexpectedToken: Unexpected token Token('RBRACE', '}') at line 227, column 3.
Expected one of:
* BCD_VALUE
* PHYSICAL_VALUE
* LOGICAL_VALUE
* ASCII_VALUE
Previous tokens: [Token('LBRACE', '{')]
Expected behavior
I was expecting the parser to ignore empty containers.
Describe the bug
Error when reading an ldf with and empty encoding type container in Signal_encoding_types, I want to mention that Vector's tool LDF explorer can handle this case, Can we support this use case, I think the tool might just ignore that encoding type container and continue parsing the file.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I was expecting the parser to ignore empty containers.
Environment:
I am willing to contribute to implementing this solution if requested.
The text was updated successfully, but these errors were encountered: