# ATS language definition file
#
# Author: Andre Simon
#   Mail: andre.simon1@gmx.de
#   Date: 04.06.2009
# ------------------------------------------
# This file is a part of highlight, a free source code converter released under the GPL.
#
# The file is used to describe keywords and special symbols of programming languages.
# See README in the highlight directory for details.
#
# New definition files for future releases of highlight are always appreciated ;)
# ----------
# andre.simon1@gmx.de
# http:/www.andre-simon.de/

$DESCRIPTION=Applied Type System

$DIRECTIVE=#

$KEYWORDS(kwa)=and as assert asr begin  class constraint do done downto else
end exception external false for fun function functor if in include inherit
initializer land lazy let lor lsl lsr lxor match method mod module mutable new
object of open or private rec sig struct then to true try type val virtual when
while with value
staload macdef typedef static inline return extern implement

# Types and type variables
$KEYWORDS(kwb)=bool string int real word float unit option ref
$KEYWORDS(kwb)=regex('[a-zA-Z0-9_']+)

# Modules
$KEYWORDS(kwc)=regex(\b[A-Z][a-zA-Z0-9_']*(?=\.))

# Constructors
$KEYWORDS(kwd)=regex(\b[A-Z][a-zA-Z0-9_']*)

$STRINGDELIMITERS=" '

$ML_COMMENT=/* */ (* *)

$SL_COMMENT=//

$ALLOWNESTEDCOMMENTS=true

$IGNORECASE=false

$ESCCHAR=regex(\\\d{3}|\\x\p{XDigit}{2}|\\[ntvbrfa\\\?'"])

$SYMBOLS= ( ) [ ] { } , ; : & | < > !  = _ * %  + - . ^

$DIGIT=regex((?:0x|0X|0b|0B)[0-9a-fA-F]+|\d*[\.\_]?\d+(?:[eE][\-\+]\d+)?[lLuUbfdm]*)
