text/x-ocaml
*.ml;*.mli;*.mll;*.mly
(*
*)
\b[A-Z][A-Za-z\d_']*
\b[a-z_][A-Za-z\d_']*
\\((\\|"|'|n|t|b|r)|\d{3}|o[0-3][0-7]{2}|x[\da-fA-F]{2})
\%{char-esc}
\(\*\*(?!\))
\*\)
\B@\w+
\b\d[\d_]*(\.[\d_]*(e[+-]?\d[\d_]*)?|e[+-]?\d[\d_]*)
\b0x[\da-f][0-9a-f_]*l?
\b0o[0-7][0-7_]*l?
\b0b[01][01_]*l?
\b\d[\d_]*[lLn]?
[~?]
\b|[^\w\s]
\(
\%{low-ident}
`\%{cap-ident}
\%{cap-ident}(\.\%{cap-ident})*(?=\.)
\%{cap-ident}
"
"
\{([a-z]*)\|
\|\%{1@start}\}
('\%{char-esc}')|('[^\\']')
'\%{low-ident}
\[\|
\|\]
\|\]
\[
(?<!\|)\]
\]
true
false
and
assert
begin
do
done
downto
else
end
for
fun
function
if
in
let
match
nonrec
rec
then
to
try
val
when
while
with
as
class
constraint
exception
external
functor
include
inherit
initializer
method
module
mutable
new
object
of
open
private
struct
sig
type
virtual
asr
land
lazy
lor
lsl
lsr
lxor
mod
not
lnot
array
bool
bytes
char
exn
float
format6?
int
int32
int64
list
option
nativeint
string
unit
ref
Arg
Arith_status
Array
ArrayLabels
Big_int
Bigarray
Buffer
Callback
CamlinternalMod
CamlinternalOO
Char
Complex
Condition
Dbm
Digest
DynLink
Event
Filename
Format
Gc
Genlex
Graphics
GraphicsX11
Hashtbl
Int32
Int64
LargeFile
Lazy
Lexing
List
ListLabels
Map
Marshal
MoreLabels
Mutex
Mativeint
Num
Oo
Parsing
Printexc
Printf
Queue
Random
Scanf
Set
Sort
Stack
StdLabels
Str
Stream
StringLabels
Sys
Thread
ThreadUnix
Unix
UnixLabels
Weak