flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
mindcooler
What kind of parser does FASM employ?
_________________ This is a block of text that can be added to posts you make. |
|||
![]() |
|
vid
What kinds are there?
|
|||
![]() |
|
mindcooler
Top-down, bottom-up, shift-reducing, I don't know all..
|
|||
![]() |
|
Tomasz Grysztar
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. |
|||
![]() |
|
mindcooler
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. |
|||
![]() |
|
Tomasz Grysztar
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). |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.