Constant value
A constant is a numerical value (integer, float or decimal) or a string value. Numbers might be provided as integer, float or decimal values. String values may contain escape sequences for passing control characters or binary (hexadecimal) data. A detailed BNF definition for supported constants is provided below
std_constant := std_bool | std_hex | std_float | std_string
std_bool := std_false | std_true
std_false := 'false' | 'FALSE' | 'NO'
std_true := 'true' | 'TRUE' | 'YES'
std_hex := '0x' std_hexdigs
std_float := std_decimal [ std_floatp ]
std_floatp := 'E' std_integer
std_decimal := std_integer [ std_decimalp ]
std_decimalp := '.' std_digits
std_integer := std_digits | '+' std_digits | '-' std_digits
std_string := '\'' [std_str1(*)] '\'' | '"' [std_str2(*)] '"'
std_str1 := std_cchar1(*)
std_str2 := std_cchar2(*)
std_digits := std_digit(*)
std_hexdigs := std_hexdig(*)
std_cchar1 := std_dapost | std_cchar
std_dapost := '\'' | '''' | '"'
std_cchar2 := std_dquote | std_cchar
std_dquote := '\"' | '""' | '''
std_digit := '0' - '9'
std_hexdig := '0' - '9' | 'A' - 'F' | 'a' - 'f'
std_cchar := std_bss | 1-255 except: ' " \
std_bss := '\' std_bsc
std_bsc := '\' | '"' | 'n' | 't' | 'r' | 'x'
constant ::= ref(std_constant)