Skip to content
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

Fix problems identified in McStas example instrument tests #72

Merged
merged 7 commits into from
Sep 25, 2024
Merged

Commits on Sep 23, 2024

  1. Configuration menu
    Copy the full SHA
    631846b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    41cbc28 View commit details
    Browse the repository at this point in the history
  3. [Fix] misidentification of component setting parameters like 'values[…

    …10]' as array instead of scalar
    g5t committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    beea70c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    68f50e1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3633014 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2024

  1. Configuration menu
    Copy the full SHA
    0e9f865 View commit details
    Browse the repository at this point in the history
  2. [Ref] C block declare and typedef parsing

    In order to insert DECLARE variables into the component-type parameters
    struct, we need to be able to identify their type information.
    These types _could_ be user-defined `typedef` aliases, provided in,
    e.g., the SHARE section of the current or any-other component (probably
    preceding only, but possibly trailing definitions, since SHARE goes
    before all initialization).
    
    Previously parsing for both variable declaration and typedefs was
    performed in one pass, but this led to a confusing Listener class which
    mistakenly identified typenames for `typedef` `struct`s incorrectly,
    sometimes.
    E.g.,
    
    ```
    typdef struct the_struct_label {
        double a_double;
        int an_int;
    } the_struct_alias;
    ```
    would have been misidentified as the equivalent of
    `typedef struct the_struct_label an_int;`
    
    By splitting `typedef` and declaration parsing into two passes, there
    are now two slightly-simpler Listener classes that handle the above case
    plus all others implemented in a new test file.
    This double-pass invariably means slower parsing, but this seems a
    worthwhile trade-off at the moment.
    g5t committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    23f1cce View commit details
    Browse the repository at this point in the history