flat assembler
Message board for the users of flat assembler.
Index
> Programming Language Design > FASM Syntax |
Author |
|
DimonSoft 29 Sep 2018, 15:45
I think, you should be aware that FASM syntax is multilevel: preprocessor stage has somewhat separate syntax considerations compared to the assembly stage.
The tool that supports exactly that syntax already exists and is called FASM. It is free, open-source, fast, small, has rich feature set… Why create another one for compiling exactly the same syntax? |
|||
29 Sep 2018, 15:45 |
|
jean-lopes 29 Sep 2018, 15:51
DimonSoft wrote: The tool that supports exactly that syntax already exists and is called FASM. It is free, open-source, fast, small, has rich feature set… Why create another one for compiling exactly the same syntax? I understand your point, but for me, building toy compilers is really enjoyable and a great way to learn more about the target language. |
|||
29 Sep 2018, 15:51 |
|
DimonSoft 29 Sep 2018, 16:04
Maybe it’s worth trying to write a toy compiler for the syntax that will suit your needs better than FASM? FASM syntax is supposedly the best among IA-32 assemblers but it’s definitely not an ideal one having its own problems depending on the specifics of your project. Why reimplement something when you can improve it in the same pass?
Not sure if there even exists ready to use grammar. Tomasz might shed some light though. |
|||
29 Sep 2018, 16:04 |
|
Tomasz Grysztar 29 Sep 2018, 19:58
I have never written the rules as a formal grammar. You can infer them from documentation, though.
Also, as it's been said above, the preprocessor has a separate language and follows different rules. |
|||
29 Sep 2018, 19:58 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.