Skip to content

Add support for other mechanism in Publicodes compiler#685

Merged
johangirod merged 4 commits intofeat/publicodes-v2from
v2/mechanism-somme
May 15, 2025
Merged

Add support for other mechanism in Publicodes compiler#685
johangirod merged 4 commits intofeat/publicodes-v2from
v2/mechanism-somme

Conversation

@johangirod
Copy link
Copy Markdown
Member

@johangirod johangirod commented May 14, 2025

Refactor parsing components to better handle expressions and add mechanisms support:

Refactor parsing components to better handle expressions and add sum
support:
- Rename expressions directory to expr
- Extract mechanism parsing logic into separate file
- Extend AST to support Sum nodes
- Improve error handling in lexer and parser
- Fix pass numbering in main compiler flow
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented May 14, 2025

⚠️ No Changeset found

Latest commit: 921d55b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Implement new mechanisms:
- produit
- toutes ces conditions
- une de ces conditions

Update parser, resolver, type checker and code generator to handle
these new operations.
@johangirod johangirod force-pushed the v2/mechanism-somme branch from c53fcfb to 44d7c8f Compare May 14, 2025 16:32
@johangirod johangirod changed the title Add support for sum mechanism in Publicodes compiler Add support for other mechanism in Publicodes compiler May 14, 2025
@johangirod johangirod merged commit eb302a2 into feat/publicodes-v2 May 15, 2025
0 of 4 checks passed
@johangirod johangirod deleted the v2/mechanism-somme branch May 15, 2025 08:24
johangirod added a commit that referenced this pull request Sep 19, 2025
* Add support for sum mechanism in Publicodes compiler

Refactor parsing components to better handle expressions and add sum
support:
- Rename expressions directory to expr
- Extract mechanism parsing logic into separate file
- Extend AST to support Sum nodes
- Improve error handling in lexer and parser
- Fix pass numbering in main compiler flow

* Add product and logical operations to compiler

Implement new mechanisms:
- produit
- toutes ces conditions
- une de ces conditions

Update parser, resolver, type checker and code generator to handle
these new operations.

* Enforce single mechanism at the same indentation level in parser

* Add duplicate YAML key detection and handling
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.

1 participant