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

Add type indices #52

Merged
merged 12 commits into from
Dec 18, 2023
Merged

Add type indices #52

merged 12 commits into from
Dec 18, 2023

Conversation

rossberg
Copy link
Collaborator

@rossberg rossberg commented Dec 7, 2023

This introduces parameters of the form

param ::=
  (varid ":") typ
  "syntax" synid
  "grammar" gramid ":" typ

that apply uniformly to syntax, grammar, and function definitions (refactoring the syntax of the latter). For now, they are all erased when lowering to the IL, except for value parameters on functions.

Also updates specs to use these in the definition of numeric types, values, and grammars.

Due to erasure, the IL remains unchanged for the time being, so this shouldn't affect most backends. The ones using the EL may need to adjust for the new function parameter AST, however. @f52985

@rossberg rossberg merged commit 9ff4a91 into main Dec 18, 2023
1 check passed
@rossberg rossberg deleted the params branch December 18, 2023 07:20
Alan-Liang pushed a commit to Alan-Liang/spectec that referenced this pull request Sep 2, 2024
Including a new `stack.new` instruction. Also add new descriptions of the
semantics of each instruction and a section on potential future instructions we
might want to add.
rossberg pushed a commit that referenced this pull request Nov 7, 2024
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