Ulf's  >  PLD  >  Names  >     
               
  Overview    Spelling    Binding    ^Domains    
     
     
lexical
syntactic
domain
 NAME   
binding
 
 DENOTABLE  characteristic
semantic
domain
     
    
alphanumeric IDENTIFIERS
- the most generally bindable domain of name-forms.
While strings of a letter followed by letters and digits are identifiers in nearly all PLs, there are subtle differences in the inclusion of «_», «'», and other special characters:
Lisp letter {letter|nonzerodigit}  -- correct???
ML/SML (1978/83?) letter {letter|digit|"_"|"'"}  -- normal
"'"... ["_"] normal-identifier  -- type variable
Ada (1982/84/95) letter { ["_"] (letter|digit) }
Modula2 (1983) letter {letter|digit}
Haskell (19xx/98) lowercaseletter {letter|digit|"'"}  -- for values, etc.
capitalletter {letter|digit|"'"}  -- for types, etc.
Java (1995?) (letter | "$" | "_") {letter | "$" | "_" | digit | UniC0} where UniC0 = unicode character above 00C0.
C.f. list of identifiers better not to define yourself in C/C++.


DENOTABLE
 
   
 

OPERATORS
Symbolic (also alphanumeric?) names, grammatically: infix/prefix/postfix.
While all PLs include the standard arithmetic operators, there is considerable variation in the inclusion of other symbols and symbol-sequences.
arithmetic relational other
Fortran +, -, *, /, ** .eq., .ne., .lt., .le., .gt., .ge.
(operators or special form of identifiers?)
.not., .and., .or., .eqv., .neqv.
C (1971/2/3) +, -, *, /, % ==, !=, <, <=, >, >= ~, !, ^, &, | <<, >>, ++, --, &&, ||
=, +=, -=, *=, /=, ~=, ^=, %=, &=, |= <<=, >>=
Ada (1982/84/95) +, -, *, /, ** =, /=, <, <=, >, >= &



denotable
OPERATIONS
  • arithmetic
  • relational
  • logic
  • bit
  • update
  •  
       
     

    NUMERALS
    While all PLs include decimal numerals, and floating point numerals, there are subtle differences in the support for alternative number formats and for the specificiation of the bit-size
    integer numeral
    (``int-num'')
    floating point numeral
    BCPL (end of 1960s) [ref] digit...
    |  "#" octaldigit...
    |  "#x" hexdigit...
    ?
    ML/SML (1978/83?) ["~"] digit... int-num ["." digit...] ["E" int-num]
    Ada (1982/84/95) digit { ["_"] digit } int-num ["." int-num] ["E"["+"|"-"] int-num]
    Modula2 (1983) digit...
    |  octaldigit... ("B"|"C")
    |  digit{hexdigit} "H"
    digit... "." {digit} ["E"["+"|"-"] digit...]
    Haskell (19xx/98) digit...
    |  ("0o"|"0O") octaldigit...
    |  ("0x"|"0X") hexdigit...
    digit... ["." digit...] [("E"|"e")["+"|"-"] digit...]
    Java (1995?) nonzerodigit {digit}["l"]
    |  {octaldigit}["l"]
    |  "0x" hexdigit... ["l"]
    [digit...] ["." {digit}] ["e"["+"|"-"] digit...] ["f"|"d"]
    where X... = X+ = X{X}



    denotable
    NUMBERS
  • integers
    (short/normal/long)
  • floats
    (single/double precision)
  •  
       
     

    LITERALS
    BCPL was (one of) the first to enclose character literals in single quotes and string literals in double quotes. Development within this tradition takes places only wrt. the escape sequences.
    character literals string literals escape sequences
    (the escaping character itself, ", ', newline, tab, backspace, ...)
    BCPL (end of 1960s) [ref] 'c' "string" **, *", *', *N, *T, *B, ...
    C (1971/2/3) 'c' "string" \\, \", \', \n, \t, \b, ...,
    \number (decimal, octal, hex)
    Smalltalk80 (1980) (and earlier versions?) $c 'string' ?
    Haskell 'c' "string" \\, \", \', \n, \t, \b, ...,
    \number (decimal, octal, hex)
    \^@, \^A, ... (control+X),
    \NUL, ... \DEL (ASCII names)



    CHARACTERS
     
     

    CHARACTER
    -STRINGS
     
    Ulf Schünemann; ulf@cs.mun.ca; 031004