D Tokens
Sean Kelly
sean at f4.ca
Thu Mar 30 15:00:46 PST 2006
Derek Parnell wrote:
> On Thu, 30 Mar 2006 20:26:59 +0000 (UTC), Markus wrote:
>
>> In article <e0fo44$1h57$1 at digitaldaemon.com>, Jarrett Billingsley says...
>>> "Markus" <Markus_member at pathlink.com> wrote in message
>>> news:e0fj9n$1d41$1 at digitaldaemon.com...
>>>> My question is this:
>>>> How do you name those characters (delimiters, operators or somehow else)?
>>> I don't know Ada, but do you mean things like braces and semicolons ({, },
>>> ;)? I wrote a C-style scripting language parser thing, and I called those
>>> "particles." This is to parallel the use of particles in Japanese, which do
>>> not have any inherent meaning, but which simply define the grammatical
>>> structure of the sentence. In the same way, braces and semicolons simply
>>> describe the structure of the program, and really only have meaning to the
>>> compiler and aren't directly represented in the final machine code which is
>>> generated.
>>>
>>>
>> I mean the following D symbols: / /= . .. ... & &= && | |= || - -= -- + += ++ <
>> <= << <<= <> <>= > >= >>= >>>= >> >>> ! != !== !<> !<>= !< !<= !> !>= !~ ( ) [ ]
>> { } ? , ; : $ = == === * *= % %= ^ ^= ~ ~= ~~
>> go to http://www.digitalmars.com/d/lex.html and look at 'Tokens'.
>>
>> As i understand, D Tokens are Identifiers, Sring Literals, Charachter Literals,
>> Integer Literals, Float Literals, Keywords, and above-mentioned symbols. How do
>> you call those symbols - Symbols, Operators, or Delimiters?
>>
>> Look at
>> http://en.wikibooks.org/wiki/Ada_Programming/Lexical_elements
>> http://en.wikibooks.org/wiki/Ada_Programming/Operators
>> http://en.wikibooks.org/wiki/Programming:C_plus_plus/Operators_Table
>> http://en.wikibooks.org/wiki/C_Sharp_Programming/Operators
>>
>> I think that there should be a standard name for it. What do you think?
>
> Operators.
It's worth noting that operators are only delimiters because the
language spec says they are. Some languages actually require whitespace
between identifiers, literals, and operators.
Sean
More information about the Digitalmars-d
mailing list