flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
vid
there was list of eqtype types in some thread, try to find it.
|
|||
![]() |
|
Tomasz Grysztar
The list is here: http://board.flatassembler.net/topic.php?t=573
It's not complete, however, even though I stated it - it lacks some of the special formatter types and directive operators. Also note that it's the sequence of entities that is compared, not necessarily the single one. That's why "end if" is not only the same type as "end while", but even the same as "mov add", as all of them are the sequence of two instruction/directive mnemonics. The directive operators, like "dup" (for the full list see the "directive_operators" table in SOURCE/TABLES.INC) are a separate types that must be matched exactly, a bit analogously to how the special character symbols are handled by "match". (When you match something against "a:b" pattern, the "a" and "b" can be anything, while ":" must be matched exactly. In a similar manner when you do "eqtype" comparison of "something at 4" with some other sequence, the "at" must be matched exactly.) |
|||
![]() |
|
vid
tomasz: so how about some complete description of eqtype in one chunk? some article or something
|
|||
![]() |
|
MCD
thanks!
yes, I've also noted that eqtype also distinguishes between different number of arguments, like Code: A eqtype "s";1 string A eqtype "s" "t";2 strings are not the same thing |
|||
![]() |
|
IceStudent
Can 'eqtype' to distinguish numbers from a labels? Or another way exist to do it?
Code: if arg eqtype 0 ; number else if arg eqtype ??? ; label end if It would be better to detect difference between data labels" (declared as "t1 dd" or 'label' directive) and "code labels" (t2: ). |
|||
![]() |
|
vid
IceStudent: and what is difference between them? you mean to detect labels with assigned size and without assigned size?
|
|||
![]() |
|
IceStudent
Quote: you mean to detect labels with assigned size and without assigned size? Yes |
|||
![]() |
|
wht36
After some testing, below is a list I came up with:
Code: ;eqtype each element in the sets below are of the same type ; name (e.g. a.b, _, @, !, name?, name%), number (includes $, $$), numeric expression, +, -, /, *, continue, exit, preprocessor words (e.g. include, macro, define, equ, match, irps) ; % ; ? ; , ; space, tab ; "" "string" 'string' '' ; name: ; [, ], [], [abcd] ; (a) ; (a, a) ; {, } ; 0.0 ; registers e.g. ax, eax, fs ; opcodes, data definition (e.g. db, rd), if, else, while, repeat, end, break, virtual, load, store, section, format, entry, stack, heap, segment, extrn ; near, far ; use16, use32 ; byte, word, dword, fword, pword, qword, tbyte, tword, dqword ; code, data, readable, writeable, executable, shareable, discardable, notpageable, linkinfo, linkremove ; fixups, resource, export, import ; console, GUI ; binary, MZ, PE, PE64, COFF, ELF, ELF64 ; MS, MS64 ; align ; file ; dup ; display ; label ; as ; a used b ; a defined b ; a public b ; a times b ; a at b ; a from b ; a rva b ; note ; logical expressions (e.g. a eq b, ~ a eq b, c & b, a|b) cannot eqtyped because they are ; executed before the eqtype ('if logical expression eqtype...') And for comparison: the preprocessor directive match Code: ;match expands equates immediately ; matches quoted strings, ~ & | + - / * : () {} [] <> exactly ; space and tab are delimeters ; @ ^ $ % . _ ? ! etc are alphanumeric and are not matched specifically |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.