-
Notifications
You must be signed in to change notification settings - Fork 0
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
Unable to parse declarations with multiple [
, ]
pairs
#87
Comments
@g5t one (reasonable?) way to fix / work around this is likely to use a malloc'ed approach, in the component, i.e.
( Do you know if a simple assignment of the table values "in one go" Plus then spread the word among comp writers that we prefer the use of the "array" definitions for 2/3 d arrays? (We have both are DArray and IArray as I remember...) |
Oh and btw prior to yesterdays related PR om McCode there were other code-bits that raised the same error without being (fully) related, e.g. this function declaration:
(replacing by a standard |
I've just merged #88 to handle the The new issue you mentioned raised the same runtime error because there was only a check for more than a single |
Confirmed to function as expected, see https://new-nightly.mcstas.org/2024-12-07_output.html Only two Union event-logger related instruments now don't compile (section of 2nd column from above table): |
As found by @willend, example instruments which use the
Monochromator_bent
component do not pass code-generation withmccode-antlr
due to aRuntimError
complaining about 'multi-level' arrays.Partial stack trace highlighting where the error originates
... mccode_antlr/translators/c_listener.py", line 298, in visitDeclarator raise RuntimeError('No idea how to handle multi-level arrays')
This would appear to originate from the definition of
double crystal_table[56][10]
It is probably more-sensible to not raise on this issue, but instead to handle it somehow.
The text was updated successfully, but these errors were encountered: