-
Notifications
You must be signed in to change notification settings - Fork 111
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
WIP feat: new asm
parser
#1064
base: main
Are you sure you want to change the base?
WIP feat: new asm
parser
#1064
Conversation
Let's start with concrete examples of asm-functions we would like to write and then try to develop some grammar for it. As of now, we should start with instruction sequences and comments (let's use the Tact/Fift syntax for comments). |
i.e. no |
definitely not using this syntax :) |
we might allow asm-blocks to avoid introducing high-level constructions into the assembly language, so the user might able to insert those into loops, etc. |
Hmm, then, something like this we've showed earlier (and have in our tests) won't work anymore:
Proceed with removing that? This kinda goes against POLA. UPD: Edited the original post, saying that the full range of Fift+TVM syntax there was highly experimental and subject to change in next releases. Ok, now we can proceed. |
we haven't documented it, so there is no backwards compatibility violation |
and Tact Kitchen posts are about raw immature things, sneak peek |
WIP WIP WIP
82a65b1
to
f1562ff
Compare
e52f1ec
to
40f118b
Compare
This is another attempt at making the
asm
parser — now we're deliberately limiting ourselves to TVM instructions. In the current iteration it's still possible to write code in a very limited subset of Fift, but only if we won't restrict the list of supported TVM instructions ingrammar.ts
, i.e. during semantical actions on the lexed tokens.TODO:
grammar.ohm
ast.ts
grammar.ts
prettyPrinter.ts
→writeFunction.ts
(to actually have asm instructions written)hash.ts
compare.ts
Issue
Closes #837.
Closes #1030 (once the
grammar.ts
is written, there will be a small check for such gotchas).Checklist