Skip to content

Add a centralized scanner for Modelica names - #638

Open
AntoineGautier wants to merge 3 commits into
mainfrom
ag/635-name-scanner
Open

AntoineGautier wants to merge 3 commits into
mainfrom
ag/635-name-scanner

Conversation

@AntoineGautier

@AntoineGautier AntoineGautier commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This is for #635.
Built on top of #637.
The Modelica name scanner is shared between the server (where it lives: server/src/parser/names.ts) and the client (where it is imported).
The parser output templates.json is byte-identical to the one on main.

- ConfigInterface.projectId, set by configStore.add() to the active
  project
- Scope config store queries and removals to a project (active by
  default);
  add removeAllForProject, used when saving the project details
- Save the default project once hydrated, so that its id does not change
  on reload
- Once both stores are hydrated, attach configurations without a valid
  project to the project if there is only one, report them otherwise
- Create the default project per store instance
- Add a scanner for Modelica names (server/src/parser/names.ts, also
  imported by the client): split, first/last identifier, enclosing name,
  validation, selection key split
- Use it for every name split in the server parser and the client
- Keep quoted identifiers as written: MLS 2.3.1 makes \? and ? the same,
  but Dymola and OCT do not, and keys must give modifications these
  tools
  accept
- Reject quoted class identifiers when reading modelica-json files
- Recognize names with quoted identifiers as values (quoted enumeration
  literals)
- Add test packages with quoted identifiers, parser and interpreter
  tests,
  and scanner unit tests
- Remove the obsolete root docker-compose.yml (EC2 deployment replaced
  by
  the CDK stack)
- Update the specification
@AntoineGautier

Copy link
Copy Markdown
Collaborator Author

@JayHuLBL This is ready to review and merge (after #637).

This branch has not been deployed

No deployments
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