Skip to content

Feature strings with no quote in BT XML policy#150

Merged
MarcoLm993 merged 5 commits intomainfrom
feature-strings-with-no-quote-in-BT
Mar 31, 2026
Merged

Feature strings with no quote in BT XML policy#150
MarcoLm993 merged 5 commits intomainfrom
feature-strings-with-no-quote-in-BT

Conversation

@MarcoLm993
Copy link
Copy Markdown
Collaborator

With this change, we do not need to wrap strings in the BT.xml ports with single quotes.
If strings contain quotes, they will be considered part of the string itself (via escaping).
This means BT Port = "'aaa'" -> ASCXML data = "'\'aaa\''"

Signed-off-by: Marco Lampacrescia <marco.lampacrescia@de.bosch.com>
Signed-off-by: Marco Lampacrescia <marco.lampacrescia@de.bosch.com>
Signed-off-by: Marco Lampacrescia <marco.lampacrescia@de.bosch.com>
Signed-off-by: Marco Lampacrescia <marco.lampacrescia@de.bosch.com>
Signed-off-by: Marco Lampacrescia <marco.lampacrescia@de.bosch.com>
@MarcoLm993 MarcoLm993 requested a review from ct2034 March 27, 2026 13:31
Copy link
Copy Markdown
Member

@ct2034 ct2034 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💜

<bt_tick target="initial">
<!-- In a Reactive sequence, if another node fails we should reset this... -->
<if cond="waiting == false"> <!-- TODO: support !waiting later on-->
<if cond="!waiting">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💜

@MarcoLm993 MarcoLm993 merged commit 9509101 into main Mar 31, 2026
7 checks passed
@MarcoLm993 MarcoLm993 deleted the feature-strings-with-no-quote-in-BT branch March 31, 2026 11:54
@EnricoGhiorzi
Copy link
Copy Markdown
Contributor

@MarcoLm993 @ct2034 I think this change broke AS2FM compilation/verification with Scan. Now strings are not surrounded by single quotes in SCXML either, and are thus interpreted as identifiers (the outer double quotes belong to the XML syntax, while everything inside them is interpreted as ECMAScript).

I am unsure about the rationale for this change, but at least I would like to recover the previous behavior for the SCXML output. Other than that, are you sure the change could not cause similar issues elsewhere? How is a string literal distinguished by an identifier in general?

@MarcoLm993
Copy link
Copy Markdown
Collaborator Author

@MarcoLm993 @ct2034 I think this change broke AS2FM compilation/verification with Scan. Now strings are not surrounded by single quotes in SCXML either, and are thus interpreted as identifiers (the outer double quotes belong to the XML syntax, while everything inside them is interpreted as ECMAScript).

I am unsure about the rationale for this change, but at least I would like to recover the previous behavior for the SCXML output. Other than that, are you sure the change could not cause similar issues elsewhere? How is a string literal distinguished by an identifier in general?

@EnricoGhiorzi Oh, I did not notice that the SCXML part got broken:
The main idea was to make sure we could digest actual BT.xml files, where strings are not surrounded by the single quotes, but in SCXML this should have stayed as it was originally (hence identifiers with no extra quotes, and strings with the extra single-quotes).
I'll investigate.

@EnricoGhiorzi
Copy link
Copy Markdown
Contributor

Thank you @MarcoLm993 fir the reply, it is now clear why this was necessary. It seems indeed that the issue is limited to string literals originating from the BT. Please, let me know if any help is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants