flat assembler
Message board for the users of flat assembler.
Index
> Programming Language Design > Question about Fasm G User manual |
Author |
|
Tomasz Grysztar 29 Jun 2017, 14:13
Concerning documentation: the use of quotes disables tokenization for the contents of the string, the entire quoted string is always a single token. So even though backslash usually is a standalone token, it is not when it occurs inside a quoted string.
As for your actual problem: the arguments to EVAL define a string and only then this string is evaluated. The "\" can be a part of this string and then the line concatenation occurs within the data contained in it: Code: eval 'display ', '\', 13, 10, "80" |
|||
29 Jun 2017, 14:13 |
|
ProMiNick 03 Jul 2017, 09:22
entry conditions:
Source code - minimal strict form of program that consist of only a sequences of tokens, where each token and sequence separated from each other with single separator symbol (for ex. whitespace and/or CRLF). Source text - decorated form of program that allows comments,indentation (and so on...) to improve human readability. Any character is perceived as a token if it can cross parsing stage from source text to source code and become part of source code, and than can be cathed with match directive as standalone one. demonstration: source: Code: A 0,\\; first one "\" is inline token, last one "\" is not a token is just a line appender symbol db 0x0 macro A args& local params define params args: while 1 match head body,params display `head,13,10 match :,body break else redefine params body end match end match end while end macro output: Code: flat assembler version g.hth67 0 , \ db 0x0 2 passes, 0 bytes. Proved:symbol "\" is trully token. By the way, why behavior of "\" is so that only last "\" is line appender symbol? Why its behavior not like ";" with erasing all text in line that follows that symbol? What for symbol "\" is stayed as token? |
|||
03 Jul 2017, 09:22 |
|
Tomasz Grysztar 03 Jul 2017, 10:24
ProMiNick wrote: By the way, why behavior of "\" is so that only last "\" is line appender symbol? Why its behavior not like ";" with erasing all text in line that follows that symbol? What for symbol "\" is stayed as token? |
|||
03 Jul 2017, 10:24 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.