Re: #define and (brackets)



"Igor Tandetnik" <itandetnik@xxxxxxxx> wrote in message
news:%23$3ZwcXUJHA.6092@xxxxxxxxxxxxxxxxxxxxxxx
"Alan Carre" <alan@xxxxxxxxxxxxxxxxx> wrote in message
news:eAOBdgWUJHA.5244@xxxxxxxxxxxxxxxxxxxx

lots and lots and lots of information which I can hardly (pre)process
myself...

Ok well, then so it seperates everything into these tokens and then pulls
them out (or pops them off or whatever) as seperate entities which
presumably are all seperable by spaces correct? At least by stage 7:
"White-space characters separating tokens are no longer significant."

... You know, actually I find that a little difficult to comprehend: We all
know that white-space characters are significant in the case of consecutive
minus-sign tokens. So how can that be? How can it be that there exists a
point where we can eliminate all whitespace without changing the program? I
mean what about *pnNum1/ *pnNumber ? I can't remove that space following the
division symbol, the whole program would become a comment...

In any case, what if one's macro was, in fact, "--X" (ie. intentionally
decrementing X)? Should the preprocessor seperate those minus signs as well?
How come they are treated differently? Is the preprocessor aware of C++
syntax? Is it actually compiling when it's decifering macro expressions?

Personally, I think instead of learning all these so-called rules and
standards and so on, I'll just let the compiler teach me what the compiler
does. For one thing I KNOW it converts #define -X to --10. That's fact, end
of story. These rules and standards and lofty committees etc etc... are just
pissing in the wind.

The ultimate arbiter is the compiler.

- Alan Carre


.



Relevant Pages

  • Re: If you got to choose the syntax, what would you do?
    ... pretty common these days, so I should put in a few thoughts. ... You can execute the stream serially, but there has to be some local storage to hold the largest loop sequence. ... Anyway, you end up with a few predefined tokens for kernel words, ... execute tokens from the outside world, or put a Forth compiler in there ...
    (comp.lang.forth)
  • Re: Handling error/status messages by interface to C++ programs
    ... The last time I worked on a compiler was in the late '80s and the language was BLISS. ... The means you can figure out what to do in the next parsing step by knowing what the previous, current, and next tokens are. ... one needs to instantiate the objects and their relationships. ... The BNF specification will define and instantiate the [Syntax Row] and objects. ...
    (comp.object)
  • Re: If you got to choose the syntax, what would you do?
    ... pretty common these days, so I should put in a few thoughts. ... Do they execute the tokens serially from the stream or do they ... execute tokens from the outside world, or put a Forth compiler in there ...
    (comp.lang.forth)
  • Re: extended operators
    ... uint32_t u32rotl{ ... my compiler currently doesn't handle constants this large... ... together a "cleaner" way of dealing with temporary text buffers, ... different sets of tokens. ...
    (comp.std.c)
  • Re: If you got to choose the syntax, what would you do?
    ... pretty common these days, so I should put in a few thoughts. ... Do they execute the tokens serially from the stream or do they ... execute tokens from the outside world, or put a Forth compiler in there ...
    (comp.lang.forth)