| integer-literal | ::= | [-] { 0...9 }+ |
| | | [-] (0x| 0X) { 0...9| A...F| a...f }+ | |
| | | [-] (0o| 0O) { 0...7 }+ | |
| | | [-] (0b| 0B) { 0...1 }+ |
| Prefix | Radix |
| 0x, 0X | hexadecimal (radix 16) |
| 0o, 0O | octal (radix 8) |
| 0b, 0B | binary (radix 2) |
| float-literal | ::= | [-] { 0...9 }+ [. { 0...9 }] [(e| E) [+| -] { 0...9 }+] |
| char-literal | ::= | ' regular-char ' |
| | | ' \ (\ | ' | n | t | b | r) ' | |
| | | ' \ (0...9) (0...9) (0...9) ' |
| Sequence | Character denoted |
| \\ | backslash (\) |
| \' | single quote (') |
| \n | linefeed (LF) |
| \r | return (CR) |
| \t | horizontal tabulation (TAB) |
| \b | backspace (BS) |
| \ddd | the character with ASCII code ddd in decimal |
| string-literal | ::= | " { string-character } " |
| string-character | ::= | regular-char |
| | | \ (\ | " | n | t | b | r) | |
| | | \ (0...9) (0...9) (0...9) |
| Sequence | Character denoted |
| \\ | backslash (\) |
| \" | double quote (") |
| \n | linefeed (LF) |
| \r | return (CR) |
| \t | horizontal tabulation (TAB) |
| \b | backspace (BS) |
| \ddd | the character with ASCII code ddd in decimal |
| infix-symbol | ::= | (= | < | > | @ | ^ | | | & | + | - | * | / | $ | %) { operator-char } |
| prefix-symbol | ::= | (! | ? | ~) { operator-char } |
| operator-char | ::= | ! | $ | % | & | * | + | - | . | / | : | < | = | > | ? | @ | ^ | | | ~ |
and as assert asr begin class
closed constraint do done downto else
end exception external false for fun
function functor if in include inherit
land lazy let lor lsl lsr
lxor match method mod module mutable
new of open or parser private
rec sig struct then to true
try type val virtual when while
with
# & ' ( ) * , -> ?
?? . .. .( .[ : :: := ;
;; <- = [ [| [< {< ] |]
>] >} _ ` { | } ~
| linenum-directive | ::= | # {0 ... 9}+ |
| | | # {0 ... 9}+ " { string-character } " |