10.2. Lexical overview

small-letter

‘a’ | ‘b’ | … | ‘z’

cap-letter

‘A’ | ‘B’ | … | ‘Z’

letter

small-letter | cap-letter

identifier

(small-letter | ‘_’) {letter | digit | ‘_’}

small-keyword

identifier ‘:’

cap-keyword

cap-letter {letter | digit | ‘_’} ‘:’

argument-name

‘:’ identifier

op-char

‘!’ | ‘@’ | ‘#’ | ‘$’ | ‘%’ | ‘^’ | ‘&’ | ‘*’ | ‘-’ | ‘+’ | ‘=’ | ‘~’ | ‘/’ | ‘?’ | ‘<’ | ‘>’ | ‘,’ | ‘;’ | ‘|’ | ‘‘’ | ‘\’

operator

op-char {op-char}

number

[ ‘-’ ] (integer | real)

integer

[base] general-digit {general-digit}

real

fixed-point | float

fixed-point

decimal ‘.’ decimal

float

decimal [ ‘.’ decimal ] (‘e’ | ‘E’) [ ‘+’ | ‘-’ ] decimal

general-digit

digit | letter

decimal

digit {digit}

base

decimal (‘r’ | ‘R’)

string

‘’’ { normal-char | escape-char } ‘’’

normal-char

any character except ‘\’ and ‘’’

escape-char

‘\t’ | ‘\b’ | ‘\n’ | ‘\f’ | ‘\r’ | ‘\v’ | ‘\a’ | ‘\0’ | ‘\\’ | ‘\’’ | ‘\”’ | ‘\?’ | numeric-escape

numeric-escape

‘\x’ general-digit general-digit | ( ‘\d’ | ‘\o’ ) digit digit digit

comment

‘”’ { comment-char } ‘”’

comment-char

any character but ‘”’