text/x-ocaml
*.ml;*.mli;*.mll;*.mly
(*
*)
\b[A-Z][A-Za-z0-9_']*
\b[a-z][A-Za-z0-9_']*
\\((\\|"|'|n|t|b|r)|[0-9]{3}|x[0-9a-fA-F]{2})
\%{char-esc}
\(\*\*
\*\)
[-]?[0-9][0-9_]*[lLn]?
[-]?0[xX][0-9A-Fa-f][0-9A-Fa-f_]*[lL]?
[-]?0[oO][0-7][0-7_]*[lL]?
[-]?0[bB][01][01_]*[lL]?
[-]?[0-9][0-9_]*(\.[0-9_]*)?([Ee][+-]?[0-9][0-9_]*)?
[~?]\%{low-ident}
`\%{cap-ident}
\%{cap-ident}(\.\%{cap-ident})*(?=\.)
\%{cap-ident}
"
"
('\%{char-esc}')|('[^\\']')
'\%{low-ident}
\[\|
\|\]
\|\]
\[
(?<!\|)\]
\]
true
false
and
assert
begin
do
done
downto
else
end
for
fun
function
if
in
let
match
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
or
lnot
option
ignore
ref
array
bool
char
float
int
list
string
unit
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