fork
This commit is contained in:
27
langs/ocaml/function.txt
Normal file
27
langs/ocaml/function.txt
Normal file
@ -0,0 +1,27 @@
|
||||
string_of_float
|
||||
float_of_string
|
||||
string_of_bool
|
||||
bool_of_string
|
||||
string_of_int
|
||||
int_of_string
|
||||
int_of_char
|
||||
char_of_int
|
||||
truncate
|
||||
float
|
||||
log10
|
||||
floor
|
||||
ceil
|
||||
sqrt
|
||||
acos
|
||||
asin
|
||||
atan
|
||||
max
|
||||
min
|
||||
not
|
||||
mod
|
||||
cos
|
||||
sin
|
||||
tan
|
||||
abs
|
||||
exp
|
||||
log
|
36
langs/ocaml/ocaml.txt
Normal file
36
langs/ocaml/ocaml.txt
Normal file
@ -0,0 +1,36 @@
|
||||
### OCaml LANGUAGE ###
|
||||
|
||||
# ELEMENT_NAME [optional-css-class] REGULAR_EXPRESSION
|
||||
|
||||
NAME OCaml
|
||||
VERSION 0.1.1
|
||||
|
||||
COMMENT \(\*.*?\*\)
|
||||
|
||||
# Get rid of 'xxxx' string because we can have 'a type name or a''' variable name in ocaml
|
||||
STRING ((?<![^\\]\\)".*?(?<![^\\]\\)")
|
||||
|
||||
# This list(file: reserved.txt) is taken from:
|
||||
# http://caml.inria.fr/pub/docs/manual-ocaml-4.00/manual044.html
|
||||
# Sort the words: awk '{print length, $0}' x.words | sort -nr | awk '{print $2}'
|
||||
RESERVED \b(?alt:reserved.txt)\b
|
||||
|
||||
# Basic types taken from:
|
||||
# http://www.csc.villanova.edu/~dmatusze/resources/ocaml/ocaml.html#Types
|
||||
TYPE \b(?alt:type.txt)\b
|
||||
|
||||
# These functions are also taken from previous page.
|
||||
# There are acting more like operators
|
||||
KEYWORD \b(?alt:function.txt)\b
|
||||
|
||||
ENTITY (?default)
|
||||
|
||||
CAPS:VARIABLE (?-i)\b[A-Z]\w+\b(?i)
|
||||
|
||||
IDENTIFIER (?default)
|
||||
CONSTANT (?default)
|
||||
|
||||
# Taken from previous page.
|
||||
# Might not be complete
|
||||
OPERATOR (?alt:operator.txt)
|
||||
SYMBOL (?default)
|
31
langs/ocaml/operator.txt
Normal file
31
langs/ocaml/operator.txt
Normal file
@ -0,0 +1,31 @@
|
||||
<=
|
||||
>=
|
||||
<>
|
||||
==
|
||||
!=
|
||||
&&
|
||||
||
|
||||
|>
|
||||
<-
|
||||
->
|
||||
+.
|
||||
-.
|
||||
*.
|
||||
/.
|
||||
**
|
||||
::
|
||||
:=
|
||||
@
|
||||
^
|
||||
<
|
||||
=
|
||||
+
|
||||
-
|
||||
*
|
||||
/
|
||||
:
|
||||
|
|
||||
=
|
||||
<
|
||||
>
|
||||
.
|
52
langs/ocaml/reserved.txt
Normal file
52
langs/ocaml/reserved.txt
Normal file
@ -0,0 +1,52 @@
|
||||
initializer
|
||||
constraint
|
||||
exception
|
||||
inherit!
|
||||
function
|
||||
external
|
||||
virtual
|
||||
private
|
||||
mutable
|
||||
method!
|
||||
inherit
|
||||
include
|
||||
functor
|
||||
struct
|
||||
object
|
||||
module
|
||||
method
|
||||
downto
|
||||
assert
|
||||
while
|
||||
match
|
||||
false
|
||||
class
|
||||
begin
|
||||
raise
|
||||
with
|
||||
when
|
||||
val!
|
||||
type
|
||||
true
|
||||
then
|
||||
open
|
||||
lazy
|
||||
else
|
||||
done
|
||||
val
|
||||
try
|
||||
sig
|
||||
rec
|
||||
new
|
||||
let
|
||||
fun
|
||||
for
|
||||
end
|
||||
and
|
||||
to
|
||||
or
|
||||
of
|
||||
in
|
||||
if
|
||||
do
|
||||
as
|
6
langs/ocaml/type.txt
Normal file
6
langs/ocaml/type.txt
Normal file
@ -0,0 +1,6 @@
|
||||
string
|
||||
float
|
||||
unit
|
||||
bool
|
||||
char
|
||||
int
|
Reference in New Issue
Block a user