flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > FASM:s parser |
Author |
|
mindcooler 14 Oct 2010, 05:27
What kind of parser does FASM employ?
_________________ This is a block of text that can be added to posts you make. |
|||
14 Oct 2010, 05:27 |
|
vid 14 Oct 2010, 17:10
What kinds are there?
|
|||
14 Oct 2010, 17:10 |
|
mindcooler 14 Oct 2010, 17:16
Top-down, bottom-up, shift-reducing, I don't know all..
|
|||
14 Oct 2010, 17:16 |
|
Tomasz Grysztar 14 Oct 2010, 17:54
vid wrote: Well, it takes all symbols/numbers/whatever one by one and translates them to internal "tokens" which are easier to work with than text. |
|||
14 Oct 2010, 17:54 |
|
mindcooler 15 Oct 2010, 06:56
I would believe that the assembly instructions don't need a powerful parser, but evaluating expressions and perhaps macros would call for a more powerful recursive parser, perhaps a shift-reducing one.
I'm thinking of writing an 6502 assembler for my thesis, that's my I'm wondering. |
|||
15 Oct 2010, 06:56 |
|
Tomasz Grysztar 15 Oct 2010, 13:22
mindcooler wrote: I would believe that the assembly instructions don't need a powerful parser, but evaluating expressions and perhaps macros would call for a more powerful recursive parser, perhaps a shift-reducing one. As for the main parser of fasm, it is more complex, and could be perhaps characterized as a mix of top-down and bottom-up approaches if you tried to categorize it in this way. But I feel that this terminology only suits well the general theoretical cases, and not a highly specialized one, like the fasm's parser. In fact, fasm's parser module is just a translator, which translates the preprocessed source (which is already tokenized) into a language of assembler module, which is then interpreted in multiple passes by assembler module (and some of the syntax checking and analysis still is left to be done upon interpretation by assembler, parser just translates it regardless of it being nonsense or not). |
|||
15 Oct 2010, 13:22 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.