Replies: 6 comments 1 reply
-
In #2012 (comment) @farhi indicated that multiple Investigating grammar changes:Lexer entries renamedSome identifiers in the lexer have been changed to include
Repeated copy grammar rulesEach of the 'copyable' lexer entries now has a Each of the If we refer to
If my understanding is correct, that means that statements like the following are now valid:
Copied contentsEach of the Questions
Proposal
|
Beta Was this translation helpful? Give feedback.
-
Also worth noting: contrary to the PR description,
is not valid syntax for the
@willend @farhi Should |
Beta Was this translation helpful? Give feedback.
-
You are right, a syntax with |
Beta Was this translation helpful? Give feedback.
-
@farhi @g5t I didn't look in the details of what was implemented on McCode/main up to this point. Could you possibly (soonish? :-) ) add / correct what is missing to achieve the My understanding is also that some more discussion on the questions raised by @g5t above would be welcome - do we need a zoom? |
Beta Was this translation helpful? Give feedback.
-
We converge to:
|
Beta Was this translation helpful? Give feedback.
-
https://github.com/mccode-dev/McCode/tree/COPY_to_INHERIT_in_comps is the place. I will start on the work. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @farhi,
As you know, @g5t is providing us with the potential next-generation code-generator mccode-antlr, and is in the process of trying to port the newly added
SECTION COPY(part_one) COPY(part_two)
grammar. (It was/is actually feature complete at least on the McStas side, see e.g. https://new-nightly.mcstas.org/2025-05-21_output.html)Looking at what was implemented on the McStas/McXtrace side, not all aspects of the new syntax seems clear - especially in regard to what aspects are component-specific vs. instrument-specific, and the order of application of e.g. EXTEND in such a "multi-layer sandwich".
I am starting this discussion item to allow more direct and open communication on the found issues - in honesty also to avoid becoming "man in the middle". ;-)
(Also, I think once this stuff is stabilised we need to define a 'policy' on cogen changes going forward - i.e. think, exchange and design together before we start hacking away. ;-) )
Beta Was this translation helpful? Give feedback.
All reactions