flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2, 3 |
Author |
|
fabbel 22 May 2025, 12:02
Hi,
'?' preffix prepended to identifier seems to be causing problems to fasmg when using number modifier.... running for some time then exiting with exit code -1073741819 Code: calminstruction test_num? arg& local _arg arrange _arg, arg stringify _arg match arg=number, arg, = jno @fail display _arg bappend ' is a litteral number' bappend 0x0A0D exit @fail: display _arg bappend ' is NOT a litteral number' bappend 0x0A0D end calminstruction test_num ?dummy |
|||
![]() |
|
fabbel 22 May 2025, 12:12
... actually it looks to be same err behavior with any special character except '#'
|
|||
![]() |
|
Tomasz Grysztar 22 May 2025, 12:31
Fixed!
|
|||
![]() |
|
fabbel 22 May 2025, 12:39
... indeed... amazingy fast as always .. tx !
|
|||
![]() |
|
fabbel 11 Jun 2025, 13:34
Hi Tomasz,
the new match /modifier feature is really nice.. helping to greatly simplify code, where advanced parsing is needed.. however, i have a small issue, illustrated by below snippet Code: calminstruction test arg*& local _name, _tail match _name:name _tail?, arg, : jno @err_invalid_name arrange _name, _name.=suffix stringify _name display 'suffixed name: ' bappend _name bappend 0x0A0D exit @err_invalid_name: stringify arg err 'invalid identifier / name specif. -> ' bappend arg bappend 0x0A0D end calminstruction test dummy = 1 ... which gives below output : Quote:
=> note the space after identifier 'dummy' in 'dummy .suffix' - where i would have expected 'dummy.suffix' => is this intended ? am i missing sthg ? can u pls have a look tx |
|||
![]() |
|
Tomasz Grysztar 11 Jun 2025, 13:59
Yes, I'm aware of that issue, I was hoping it would not be a big deal. It's a limitation of the engine that causes the trailing whitespace to be consumed when parsing an identifier. This was never a problem when fasmg was only using it internally, because identifier was always interpreted as already complete pointer to a symbol, but once you try to append anything, like in your example, the redundant whitespace causes trouble.
Unfortunately, this limitation is integral to the old core of fasmg's engine, so the only workaround I can offer is to strip the whitespace afterwards with just a regular wildcard matching: Code: match _name:name _tail?, arg, : jno @err_invalid_name match _name,_name ; this strips the whitespace |
|||
![]() |
|
fabbel 11 Jun 2025, 14:03
ok i see.. will use workaround as suggested then... tx
|
|||
![]() |
|
fabbel 02 Oct 2025, 08:33
Hi Tomasz,
I was kinda surprised to find out that macro / priormacro modifiers also seem to match native famsg commands (not overridden of course ...) ... Is this intended / on purpose ? .... those modifer names led me to think that only instructions defined via macro xxx or calminstruction xxx would be recognized .... Code: calminstruction test inx* local _tmp arrange _tmp, inx stringify _tmp display '*** test -> macro ''' bappend _tmp bappend '''' match inx=priormacro, inx, = ; same result with modifier macro i/o priormacro jyes @found display ' NOT Found !!' bappend 0x0A0D exit @found: display ' FOUND !!' bappend 0x0A0D end calminstruction test define Quote:
|
|||
![]() |
|
fabbel 02 Oct 2025, 08:36
... is there any way to circumvent this if I want to match only 'custom' inx ?
|
|||
![]() |
|
Tomasz Grysztar 02 Oct 2025, 10:12
fabbel wrote: ... is there any way to circumvent this if I want to match only 'custom' inx ? |
|||
![]() |
|
fabbel 02 Oct 2025, 10:25
I see ur point indeed... but those modifiers names sound misleading to me nonetheless ....
... feel it would make much more sense to call them sthg like 'command / priorcommand ... and have macro / priormacro match only 'user-defined' macro / calminstruction ... as their names suggest |
|||
![]() |
|
Goto page Previous 1, 2, 3 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.