-
Notifications
You must be signed in to change notification settings - Fork 1
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
Error Parsing Custom Type Declaration #26
Comments
If changing the PlcDeclaration class to handle string types (like WORD) is an acceptable solution, I can make the necessary changes. But before proceeding, I wanted to confirm if that would be the right approach, or if there is a more elegant or preferable solution that avoids modifying the source code directly. |
I tried this inside the
|
Thanks for your report @Philipp1297 ! I'll have to admit I've never seen a Am I understanding correctly this prevents Sphinx from completing, as in your run into an uncaught exception? There's two things to pick up then:
I'll look into either. I can use your suggested grammar modifications as a starting point. But I'll have to admit it might be a while before I can make some progress here. |
I have identified additional cases where the grammar is currently not functioning as expected. |
Limitation in case of default value for TYPE Decleration:
I fixed this by changing the grammer to this:
|
Limitation in case of the char ';' for string default value like:
|
Last (atm) found Limitation
Double Semicolon |
Thanks again, I'll look into these. Are these from an open source project by any chance? In order to test the grammar for failures I would ideally just throw it against big existing projects. I'm already doing that for |
Description
I encountered an issue when parsing a type declaration in a Structured Text (ST) file. The declaration is as follows:
However, when attempting to parse it using the current configuration, I receive the following error:
Error parsing node
T_INTERLOCK
in filetest_files\baselib\BaseLibProj\BaseLib\POUs\HMI\Datentypen\T_INTERLOCK.TcDUT
(None:1:24: Expected '.' or '\s' or '//' or '(*(.|\n)?*)' or '{' or 'END_TYPE' => 'OCK : WORD; END_TYP')
Steps Taken:
I tried modifying the st_declaration.tx grammar in an attempt to accommodate this type declaration by adding or adjusting the TypeDef rule as follows:
However, making these changes requires modifying the source code, and I’m wondering if there's a better approach.
The text was updated successfully, but these errors were encountered: