---input---
structure C = struct
   val a = 12
   fun f x = x + 5
end

(*(*(*(*(* This file is all pretty strange Standard ML *)*)*)*) (**)*)
(* Robert J. Simmons *)

(* Comments (* can be nested *) *)
structure S = struct
  val x = (1, 2, "three")
end

structure Sv = struct
  (* These look good *)
  val x = (1, 2, "three")
  val z = #2 x

  (* Although these look bad (not all the numbers are constants),       *
   * they never occur in practice, as they are equivalent to the above. *)
  val x = {1 = 1, 3 = "three", 2 = 2}
  val z = #
            2 x

  val || = 12
end

signature S = sig end

structure S = struct
  val x = (1, 2, "three")
  datatype 'a t = T of 'a
       and u = U of v * v
  withtype v = {left: int t, right: int t}
  exception E1 of int and E2
  fun 'a id (x: 'a) : 'a = x

  val 
      'a id = fn (x : 'a) => x
end

signature R = sig
  type t
  val x : t
  val f : t * int -> int
end
structure R : R = struct
  datatype t = T of int
  val x : t = T 0
  fun f (T x, i : int) : int = x + i
  fun 'a id (x: 'a) : 'a = x
end

signature BA_Z = sig 
   val s: int
   include S R
end 

structure b______ = struct (* What (* A * strange * name *) for ) a ( struct *)

val !%&$#+-/:<=>?@\~`^|* = 3

type struct' = int list
and 'a sig' = 'a list
and ('a, 'b) end' = 'b option * 'a list

structure baz = struct
  structure Bar = struct 
    val foo = !%&$#+-/:<=>?@\~`^|*
  end  
end

infixr +!+ 
fun (a +!+ b) = (op +) (a, b)

open baz S R

val$$$ = fn x => fn y => fn z => fn w => w
val (foo, ++, bar, ||) = (4, baz.Bar.foo, !%&$#+-/:<=>?@\~`^|*, Bar.foo)
val _ = $$$foo++bar||

val val'ue : ' list = []
val struct3 : (' -> ') = fn x => x
val end_struct_' : ('a -> 'a) = fn x => x
val x : (''a -> ''a) = fn x => x
val x : ('''' -> '''') = fn x => x
val x : unit = print "Weird, huh?\n"
val w = {x=1,y=2,##= =3,4=3}
val {##=, x, 4=a,...} = w
val z = #4 w
val z = # ##= w

fun f x y 0 = 4 
  | f x y z = 4 + Sv.||

exception Foo of int
datatype ('0, 'b, '_, ') f'o'o = Bar | baZ12' | dsfa_fad | #@$ | Bug
and (', ''', '''', ''''') bar = 
   Bee of unit
 | Ben of (', ''', '''', ''''') f'o'o * int
 | X of ''' list

fun q x = raise Foo x
and h x = raise Foo (~x)

val x = 4
and y = 5

fun q 0 = 4
  | q 1 = (case 1 of 1 => 2 | 3 => 4 | x => y)
  | q y = case y of 1 => 2 | 3 => 4 | x => y

val x = ref true
fun q 0 = 4
  | q 1 = if false then case 1 of 1 => 2 | 3 => 4 | x => y else 19
  | q 2 = (while !x handle Match => !x | Fail _ => !x do () ; 2)
  | q x = (raise Match) handle Domain => 9 | Match => 3

fun p 0 = 12
  | p 1 = 8
  | p 2 = r false
  | p x = r true
and r true = 19
  | r false = 12

val _ = 123
val _ = 0001
val _ = ~123
val _ = ~0001
val _ = 0w12412
val _ = 0w12412
val _ = 0xfA0
val _ = ~0xfA0
val _ = 0wxfA0
val _ = 1.4
val _ = ~1.4
val _ = 1e~2
val _ = 1E~2
val _ = 1e2
val _ = 1E2
val _ = 1.4e~2
val _ = 1.4E~2
val _ = 1.4e2
val _ = 1.4E2

val c = #"\000"
val st = "foo \
 	 \ bar" ^ "baz \        
  	 \ and \ 
   	 \ such\n"

val () = print st

val _ = foo::bar::4::[++]

end

---tokens---
'structure'   Keyword.Reserved
' '           Text
'C'           Name.Namespace
' '           Text
'='           Punctuation
' '           Text
'struct'      Keyword.Reserved
'\n   '       Text
'val'         Keyword.Reserved
' '           Text
'a'           Name.Variable
' '           Text
'='           Punctuation
' '           Text
'12'          Literal.Number.Integer
'\n   '       Text
'fun'         Keyword.Reserved
' '           Text
'f'           Name.Function
' '           Text
'x'           Name
' '           Text
'='           Punctuation
' '           Text
'x'           Name
' '           Text
'+'           Name
' '           Text
'5'           Literal.Number.Integer
'\n'          Text

'end'         Keyword.Reserved
'\n\n'        Text

'(*'          Comment.Multiline
'(*'          Comment.Multiline
'(*'          Comment.Multiline
'(*'          Comment.Multiline
'(*'          Comment.Multiline
' '           Comment.Multiline
'T'           Comment.Multiline
'h'           Comment.Multiline
'i'           Comment.Multiline
's'           Comment.Multiline
' '           Comment.Multiline
'f'           Comment.Multiline
'i'           Comment.Multiline
'l'           Comment.Multiline
'e'           Comment.Multiline
' '           Comment.Multiline
'i'           Comment.Multiline
's'           Comment.Multiline
' '           Comment.Multiline
'a'           Comment.Multiline
'l'           Comment.Multiline
'l'           Comment.Multiline
' '           Comment.Multiline
'p'           Comment.Multiline
'r'           Comment.Multiline
'e'           Comment.Multiline
't'           Comment.Multiline
't'           Comment.Multiline
'y'           Comment.Multiline
' '           Comment.Multiline
's'           Comment.Multiline
't'           Comment.Multiline
'r'           Comment.Multiline
'a'           Comment.Multiline
'n'           Comment.Multiline
'g'           Comment.Multiline
'e'           Comment.Multiline
' '           Comment.Multiline
'S'           Comment.Multiline
't'           Comment.Multiline
'a'           Comment.Multiline
'n'           Comment.Multiline
'd'           Comment.Multiline
'a'           Comment.Multiline
'r'           Comment.Multiline
'd'           Comment.Multiline
' '           Comment.Multiline
'M'           Comment.Multiline
'L'           Comment.Multiline
' '           Comment.Multiline
'*)'          Comment.Multiline
'*)'          Comment.Multiline
'*)'          Comment.Multiline
'*)'          Comment.Multiline
' '           Comment.Multiline
'(*'          Comment.Multiline
'*)'          Comment.Multiline
'*)'          Comment.Multiline
'\n'          Text

'(*'          Comment.Multiline
' '           Comment.Multiline
'R'           Comment.Multiline
'o'           Comment.Multiline
'b'           Comment.Multiline
'e'           Comment.Multiline
'r'           Comment.Multiline
't'           Comment.Multiline
' '           Comment.Multiline
'J'           Comment.Multiline
'.'           Comment.Multiline
' '           Comment.Multiline
'S'           Comment.Multiline
'i'           Comment.Multiline
'm'           Comment.Multiline
'm'           Comment.Multiline
'o'           Comment.Multiline
'n'           Comment.Multiline
's'           Comment.Multiline
' '           Comment.Multiline
'*)'          Comment.Multiline
'\n\n'        Text

'(*'          Comment.Multiline
' '           Comment.Multiline
'C'           Comment.Multiline
'o'           Comment.Multiline
'm'           Comment.Multiline
'm'           Comment.Multiline
'e'           Comment.Multiline
'n'           Comment.Multiline
't'           Comment.Multiline
's'           Comment.Multiline
' '           Comment.Multiline
'(*'          Comment.Multiline
' '           Comment.Multiline
'c'           Comment.Multiline
'a'           Comment.Multiline
'n'           Comment.Multiline
' '           Comment.Multiline
'b'           Comment.Multiline
'e'           Comment.Multiline
' '           Comment.Multiline
'n'           Comment.Multiline
'e'           Comment.Multiline
's'           Comment.Multiline
't'           Comment.Multiline
'e'           Comment.Multiline
'd'           Comment.Multiline
' '           Comment.Multiline
'*)'          Comment.Multiline
' '           Comment.Multiline
'*)'          Comment.Multiline
'\n'          Text

'structure'   Keyword.Reserved
' '           Text
'S'           Name.Namespace
' '           Text
'='           Punctuation
' '           Text
'struct'      Keyword.Reserved
'\n  '        Text
'val'         Keyword.Reserved
' '           Text
'x'           Name.Variable
' '           Text
'='           Punctuation
' '           Text
'('           Punctuation
'1'           Literal.Number.Integer
','           Punctuation
' '           Text
'2'           Literal.Number.Integer
','           Punctuation
' '           Text
'"'           Literal.String.Double
't'           Literal.String.Double
'h'           Literal.String.Double
'r'           Literal.String.Double
'e'           Literal.String.Double
'e'           Literal.String.Double
'"'           Literal.String.Double
')'           Punctuation
'\n'          Text

'end'         Keyword.Reserved
'\n\n'        Text

'structure'   Keyword.Reserved
' '           Text
'Sv'          Name.Namespace
' '           Text
'='           Punctuation
' '           Text
'struct'      Keyword.Reserved
'\n  '        Text
'(*'          Comment.Multiline
' '           Comment.Multiline
'T'           Comment.Multiline
'h'           Comment.Multiline
'e'           Comment.Multiline
's'           Comment.Multiline
'e'           Comment.Multiline
' '           Comment.Multiline
'l'           Comment.Multiline
'o'           Comment.Multiline
'o'           Comment.Multiline
'k'           Comment.Multiline
' '           Comment.Multiline
'g'           Comment.Multiline
'o'           Comment.Multiline
'o'           Comment.Multiline
'd'           Comment.Multiline
' '           Comment.Multiline
'*)'          Comment.Multiline
'\n  '        Text
'val'         Keyword.Reserved
' '           Text
'x'           Name.Variable
' '           Text
'='           Punctuation
' '           Text
'('           Punctuation
'1'           Literal.Number.Integer
','           Punctuation
' '           Text
'2'           Literal.Number.Integer
','           Punctuation
' '           Text
'"'           Literal.String.Double
't'           Literal.String.Double
'h'           Literal.String.Double
'r'           Literal.String.Double
'e'           Literal.String.Double
'e'           Literal.String.Double
'"'           Literal.String.Double
')'           Punctuation
'\n  '        Text
'val'         Keyword.Reserved
' '           Text
'z'           Name.Variable
' '           Text
'='           Punctuation
' '           Text
'#2'          Name.Label
' '           Text
'x'           Name
'\n\n  '      Text
'(*'          Comment.Multiline
' '           Comment.Multiline
'A'           Comment.Multiline
'l'           Comment.Multiline
't'           Comment.Multiline
'h'           Comment.Multiline
'o'           Comment.Multiline
'u'           Comment.Multiline
'g'           Comment.Multiline
'h'           Comment.Multiline
' '           Comment.Multiline
't'           Comment.Multiline
'h'           Comment.Multiline
'e'           Comment.Multiline
's'           Comment.Multiline
'e'           Comment.Multiline
' '           Comment.Multiline
'l'           Comment.Multiline
'o'           Comment.Multiline
'o'           Comment.Multiline
'k'           Comment.Multiline
' '           Comment.Multiline
'b'           Comment.Multiline
'a'           Comment.Multiline
'd'           Comment.Multiline
' '           Comment.Multiline
'('           Comment.Multiline
'n'           Comment.Multiline
'o'           Comment.Multiline
't'           Comment.Multiline
' '           Comment.Multiline
'a'           Comment.Multiline
'l'           Comment.Multiline
'l'           Comment.Multiline
' '           Comment.Multiline
't'           Comment.Multiline
'h'           Comment.Multiline
'e'           Comment.Multiline
' '           Comment.Multiline
'n'           Comment.Multiline
'u'           Comment.Multiline
'm'           Comment.Multiline
'b'           Comment.Multiline
'e'           Comment.Multiline
'r'           Comment.Multiline
's'           Comment.Multiline
' '           Comment.Multiline
'a'           Comment.Multiline
'r'           Comment.Multiline
'e'           Comment.Multiline
' '           Comment.Multiline
'c'           Comment.Multiline
'o'           Comment.Multiline
'n'           Comment.Multiline
's'           Comment.Multiline
't'           Comment.Multiline
'a'           Comment.Multiline
'n'           Comment.Multiline
't'           Comment.Multiline
's'           Comment.Multiline
')'           Comment.Multiline
','           Comment.Multiline
' '           Comment.Multiline
' '           Comment.Multiline
' '           Comment.Multiline
' '           Comment.Multiline
' '           Comment.Multiline
' '           Comment.Multiline
' '           Comment.Multiline
'*'           Comment.Multiline
'\n'          Comment.Multiline

' '           Comment.Multiline
' '           Comment.Multiline
' '           Comment.Multiline
'*'           Comment.Multiline
' '           Comment.Multiline
't'           Comment.Multiline
'h'           Comment.Multiline
'e'           Comment.Multiline
'y'           Comment.Multiline
' '           Comment.Multiline
'n'           Comment.Multiline
'e'           Comment.Multiline
'v'           Comment.Multiline
'e'           Comment.Multiline
'r'           Comment.Multiline
' '           Comment.Multiline
'o'           Comment.Multiline
'c'           Comment.Multiline
'c'           Comment.Multiline
'u'           Comment.Multiline
'r'           Comment.Multiline
' '           Comment.Multiline
'i'           Comment.Multiline
'n'           Comment.Multiline
' '           Comment.Multiline
'p'           Comment.Multiline
'r'           Comment.Multiline
'a'           Comment.Multiline
'c'           Comment.Multiline
't'           Comment.Multiline
'i'           Comment.Multiline
'c'           Comment.Multiline
'e'           Comment.Multiline
','           Comment.Multiline
' '           Comment.Multiline
'a'           Comment.Multiline
's'           Comment.Multiline
' '           Comment.Multiline
't'           Comment.Multiline
'h'           Comment.Multiline
'e'           Comment.Multiline
'y'           Comment.Multiline
' '           Comment.Multiline
'a'           Comment.Multiline
'r'           Comment.Multiline
'e'           Comment.Multiline
' '           Comment.Multiline
'e'           Comment.Multiline
'q'           Comment.Multiline
'u'           Comment.Multiline
'i'           Comment.Multiline
'v'           Comment.Multiline
'a'           Comment.Multiline
'l'           Comment.Multiline
'e'           Comment.Multiline
'n'           Comment.Multiline
't'           Comment.Multiline
' '           Comment.Multiline
't'           Comment.Multiline
'o'           Comment.Multiline
' '           Comment.Multiline
't'           Comment.Multiline
'h'           Comment.Multiline
'e'           Comment.Multiline
' '           Comment.Multiline
'a'           Comment.Multiline
'b'           Comment.Multiline
'o'           Comment.Multiline
'v'           Comment.Multiline
'e'           Comment.Multiline
'.'           Comment.Multiline
' '           Comment.Multiline
'*)'          Comment.Multiline
'\n  '        Text
'val'         Keyword.Reserved
' '           Text
'x'           Name.Variable
' '           Text
'='           Punctuation
' '           Text
'{'           Punctuation
'1'           Literal.Number.Integer
' '           Text
'='           Punctuation
' '           Text
'1'           Literal.Number.Integer
','           Punctuation
' '           Text
'3'           Literal.Number.Integer
' '           Text
'='           Punctuation
' '           Text
'"'           Literal.String.Double
't'           Literal.String.Double
'h'           Literal.String.Double
'r'           Literal.String.Double
'e'           Literal.String.Double
'e'           Literal.String.Double
'"'           Literal.String.Double
','           Punctuation
' '           Text
'2'           Literal.Number.Integer
' '           Text
'='           Punctuation
' '           Text
'2'           Literal.Number.Integer
'}'           Punctuation
'\n  '        Text
'val'         Keyword.Reserved
' '           Text
'z'           Name.Variable
' '           Text
'='           Punctuation
' '           Text
'#\n            2' Name.Label
' '           Text
'x'           Name
'\n\n  '      Text
'val'         Keyword.Reserved
' '           Text
'||'          Name.Variable
' '           Text
'='           Punctuation
' '           Text
'12'          Literal.Number.Integer
'\n'          Text

'end'         Keyword.Reserved
'\n\n'        Text

'signature'   Keyword.Reserved
' '           Text
'S'           Name.Namespace
' '           Text
'='           Punctuation
' '           Text
'sig'         Keyword.Reserved
' '           Text
'end'         Keyword.Reserved
'\n\n'        Text

'structure'   Keyword.Reserved
' '           Text
'S'           Name.Namespace
' '           Text
'='           Punctuation
' '           Text
'struct'      Keyword.Reserved
'\n  '        Text
'val'         Keyword.Reserved
' '           Text
'x'           Name.Variable
' '           Text
'='           Punctuation
' '           Text
'('           Punctuation
'1'           Literal.Number.Integer
','           Punctuation
' '           Text
'2'           Literal.Number.Integer
','           Punctuation
' '           Text
'"'           Literal.String.Double
't'           Literal.String.Double
'h'           Literal.String.Double
'r'           Literal.String.Double
'e'           Literal.String.Double
'e'           Literal.String.Double
'"'           Literal.String.Double
')'           Punctuation
'\n  '        Text
'datatype'    Keyword.Reserved
' '           Text
"'a"          Name.Decorator
' '           Text
't'           Keyword.Type
' '           Text
'='           Punctuation
' '           Text
'T'           Name.Class
' '           Text
'of'          Keyword.Reserved
' '           Text
"'a"          Name.Decorator
'\n       '   Text
'and'         Keyword.Reserved
' '           Text
'u'           Keyword.Type
' '           Text
'='           Punctuation
' '           Text
'U'           Name.Class
' '           Text
'of'          Keyword.Reserved
' '           Text
'v'           Name
' '           Text
'*'           Name
' '           Text
'v'           Name
'\n  '        Text
'withtype'    Keyword.Reserved
' '           Text
'v'           Keyword.Type
' '           Text
'='           Punctuation
' '           Text
'{'           Punctuation
'left'        Name
':'           Punctuation
' '           Text
'int'         Name
' '           Text
't'           Name
','           Punctuation
' '           Text
'right'       Name
':'           Punctuation
' '           Text
'int'         Name
' '           Text
't'           Name
'}'           Punctuation
'\n  '        Text
''            Text
'exception'   Keyword.Reserved
' '           Text
'E1'          Name.Class
' '           Text
'of'          Keyword.Reserved
' '           Text
'int'         Name.Class
' '           Text
'and'         Keyword.Reserved
' '           Text
'E2'          Name.Class
'\n  '        Text
'fun'         Name.Class
' '           Text
"'a"          Name.Decorator
' '           Text
'id'          Name
' '           Text
'('           Punctuation
'x'           Name
':'           Punctuation
' '           Text
"'a"          Name.Decorator
')'           Punctuation
' '           Text
':'           Punctuation
' '           Text
"'a"          Name.Decorator
' '           Text
'='           Punctuation
' '           Text
'x'           Name
'\n\n  '      Text
'val'         Keyword.Reserved
' \n      '   Text
"'a"          Name.Decorator
' '           Text
'id'          Name.Variable
' '           Text
'='           Punctuation
' '           Text
'fn'          Keyword.Reserved
' '           Text
'('           Punctuation
'x'           Name
' '           Text
':'           Punctuation
' '           Text
"'a"          Name.Decorator
')'           Punctuation
' '           Text
'=>'          Punctuation
' '           Text
'x'           Name
'\n'          Text

'end'         Keyword.Reserved
'\n\n'        Text

'signature'   Keyword.Reserved
' '           Text
'R'           Name.Namespace
' '           Text
'='           Punctuation
' '           Text
'sig'         Keyword.Reserved
'\n  '        Text
'type'        Keyword.Reserved
' '           Text
't'           Keyword.Type
'\n  '        Text
''            Text
'val'         Keyword.Reserved
' '           Text
'x'           Name.Variable
' '           Text
':'           Punctuation
' '           Text
't'           Name
'\n  '        Text
'val'         Keyword.Reserved
' '           Text
'f'           Name.Variable
' '           Text
':'           Punctuation
' '           Text
't'           Name
' '           Text
'*'           Name
' '           Text
'int'         Name
' '           Text
'->'          Punctuation
' '           Text
'int'         Name
'\n'          Text

'end'         Keyword.Reserved
'\n'          Text

'structure'   Keyword.Reserved
' '           Text
'R'           Name.Namespace
' '           Text
':'           Punctuation
' '           Text
'R'           Name
' '           Text
'='           Punctuation
' '           Text
'struct'      Keyword.Reserved
'\n  '        Text
'datatype'    Keyword.Reserved
' '           Text
't'           Keyword.Type
' '           Text
'='           Punctuation
' '           Text
'T'           Name.Class
' '           Text
'of'          Keyword.Reserved
' '           Text
'int'         Name
'\n  '        Text
''            Text
'val'         Keyword.Reserved
' '           Text
'x'           Name.Variable
' '           Text
':'           Punctuation
' '           Text
't'           Name
' '           Text
'='           Punctuation
' '           Text
'T'           Name
' '           Text
'0'           Literal.Number.Integer
'\n  '        Text
'fun'         Keyword.Reserved
' '           Text
'f'           Name.Function
' '           Text
'('           Punctuation
'T'           Name
' '           Text
'x'           Name
','           Punctuation
' '           Text
'i'           Name
' '           Text
':'           Punctuation
' '           Text
'int'         Name
')'           Punctuation
' '           Text
':'           Punctuation
' '           Text
'int'         Name
' '           Text
'='           Punctuation
' '           Text
'x'           Name
' '           Text
'+'           Name
' '           Text
'i'           Name
'\n  '        Text
'fun'         Keyword.Reserved
' '           Text
"'a"          Name.Decorator
' '           Text
'id'          Name.Function
' '           Text
'('           Punctuation
'x'           Name
':'           Punctuation
' '           Text
"'a"          Name.Decorator
')'           Punctuation
' '           Text
':'           Punctuation
' '           Text
"'a"          Name.Decorator
' '           Text
'='           Punctuation
' '           Text
'x'           Name
'\n'          Text

'end'         Keyword.Reserved
'\n\n'        Text

'signature'   Keyword.Reserved
' '           Text
'BA_Z'        Name.Namespace
' '           Text
'='           Punctuation
' '           Text
'sig'         Keyword.Reserved
' \n   '      Text
'val'         Keyword.Reserved
' '           Text
's'           Name.Variable
':'           Punctuation
' '           Text
'int'         Name
'\n   '       Text
'include'     Keyword.Reserved
' '           Text
'S'           Name.Namespace
' '           Text
'R'           Name.Namespace
'\n'          Text

''            Text
'end'         Keyword.Reserved
' \n\n'       Text

'structure'   Keyword.Reserved
' '           Text
'b______'     Name.Namespace
' '           Text
'='           Punctuation
' '           Text
'struct'      Keyword.Reserved
' '           Text
'(*'          Comment.Multiline
' '           Comment.Multiline
'W'           Comment.Multiline
'h'           Comment.Multiline
'a'           Comment.Multiline
't'           Comment.Multiline
' '           Comment.Multiline
'(*'          Comment.Multiline
' '           Comment.Multiline
'A'           Comment.Multiline
' '           Comment.Multiline
'*'           Comment.Multiline
' '           Comment.Multiline
's'           Comment.Multiline
't'           Comment.Multiline
'r'           Comment.Multiline
'a'           Comment.Multiline
'n'           Comment.Multiline
'g'           Comment.Multiline
'e'           Comment.Multiline
' '           Comment.Multiline
'*'           Comment.Multiline
' '           Comment.Multiline
'n'           Comment.Multiline
'a'           Comment.Multiline
'm'           Comment.Multiline
'e'           Comment.Multiline
' '           Comment.Multiline
'*)'          Comment.Multiline
' '           Comment.Multiline
'f'           Comment.Multiline
'o'           Comment.Multiline
'r'           Comment.Multiline
' '           Comment.Multiline
')'           Comment.Multiline
' '           Comment.Multiline
'a'           Comment.Multiline
' '           Comment.Multiline
'('           Comment.Multiline
' '           Comment.Multiline
's'           Comment.Multiline
't'           Comment.Multiline
'r'           Comment.Multiline
'u'           Comment.Multiline
'c'           Comment.Multiline
't'           Comment.Multiline
' '           Comment.Multiline
'*)'          Comment.Multiline
'\n\n'        Text

'val'         Keyword.Reserved
' '           Text
'!%&$#+-/:<=>?@\\~`^|*' Name.Variable
' '           Text
'='           Punctuation
' '           Text
'3'           Literal.Number.Integer
'\n\n'        Text

'type'        Keyword.Reserved
' '           Text
"struct'"     Keyword.Type
' '           Text
'='           Punctuation
' '           Text
'int'         Name
' '           Text
'list'        Name
'\n'          Text

'and'         Keyword.Reserved
' '           Text
"'a"          Name.Decorator
' '           Text
"sig'"        Keyword.Type
' '           Text
'='           Punctuation
' '           Text
"'a"          Name.Decorator
' '           Text
'list'        Name
'\n'          Text

'and'         Keyword.Reserved
' '           Text
'('           Punctuation
"'a"          Name.Decorator
','           Punctuation
' '           Text
"'b"          Name.Decorator
')'           Punctuation
' '           Text
"end'"        Keyword.Type
' '           Text
'='           Punctuation
' '           Text
"'b"          Name.Decorator
' '           Text
'option'      Name
' '           Text
'*'           Name
' '           Text
"'a"          Name.Decorator
' '           Text
'list'        Name
'\n\n'        Text

''            Text
'structure'   Keyword.Reserved
' '           Text
'baz'         Name.Namespace
' '           Text
'='           Punctuation
' '           Text
'struct'      Keyword.Reserved
'\n  '        Text
'structure'   Keyword.Reserved
' '           Text
'Bar'         Name.Namespace
' '           Text
'='           Punctuation
' '           Text
'struct'      Keyword.Reserved
' \n    '     Text
'val'         Keyword.Reserved
' '           Text
'foo'         Name.Variable
' '           Text
'='           Punctuation
' '           Text
'!%&$#+-/:<=>?@\\~`^|*' Name
'\n  '        Text
'end'         Keyword.Reserved
'  \n'        Text

'end'         Keyword.Reserved
'\n\n'        Text

'infixr'      Keyword.Reserved
' '           Text
'+!+'         Name
' \n'         Text

'fun'         Keyword.Reserved
' '           Text
'('           Punctuation
'a'           Name
' '           Text
'+!+'         Name
' '           Text
'b'           Name
')'           Punctuation
' '           Text
'='           Name.Function
' '           Text
'('           Punctuation
'op'          Keyword.Reserved
' '           Text
'+'           Name
')'           Punctuation
' '           Text
'('           Punctuation
'a'           Name
','           Punctuation
' '           Text
'b'           Name
')'           Punctuation
'\n\n'        Text

'open'        Keyword.Reserved
' '           Text
'baz'         Name.Namespace
' '           Text
'S'           Name.Namespace
' '           Text
'R'           Name.Namespace
'\n\n'        Text

''            Text
'val'         Keyword.Reserved
'$$$'         Name.Variable
' '           Text
'='           Punctuation
' '           Text
'fn'          Keyword.Reserved
' '           Text
'x'           Name
' '           Text
'=>'          Punctuation
' '           Text
'fn'          Keyword.Reserved
' '           Text
'y'           Name
' '           Text
'=>'          Punctuation
' '           Text
'fn'          Keyword.Reserved
' '           Text
'z'           Name
' '           Text
'=>'          Punctuation
' '           Text
'fn'          Keyword.Reserved
' '           Text
'w'           Name
' '           Text
'=>'          Punctuation
' '           Text
'w'           Name
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'('           Punctuation
'foo'         Name
','           Punctuation
' '           Text
'++'          Name
','           Punctuation
' '           Text
'bar'         Name
','           Punctuation
' '           Text
'||'          Name
')'           Punctuation
' '           Text
'='           Name.Variable
' '           Text
'('           Punctuation
'4'           Literal.Number.Integer
','           Punctuation
' '           Text
'baz'         Name.Namespace
'.'           Punctuation
'Bar'         Name.Namespace
'.'           Punctuation
'foo'         Name
','           Punctuation
' '           Text
'!%&$#+-/:<=>?@\\~`^|*' Name
','           Punctuation
' '           Text
'Bar'         Name.Namespace
'.'           Punctuation
'foo'         Name
')'           Punctuation
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'_'           Punctuation
' '           Text
'='           Punctuation
' '           Text
'$$$'         Name
'foo'         Name
'++'          Name
'bar'         Name
'||'          Name
'\n\n'        Text

'val'         Keyword.Reserved
' '           Text
"val'ue"      Name.Variable
' '           Text
':'           Punctuation
' '           Text
"'"           Name.Decorator
' '           Text
'list'        Name
' '           Text
'='           Punctuation
' '           Text
'['           Punctuation
']'           Punctuation
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'struct3'     Name.Variable
' '           Text
':'           Punctuation
' '           Text
'('           Punctuation
"'"           Name.Decorator
' '           Text
'->'          Punctuation
' '           Text
"'"           Name.Decorator
')'           Punctuation
' '           Text
'='           Punctuation
' '           Text
'fn'          Keyword.Reserved
' '           Text
'x'           Name
' '           Text
'=>'          Punctuation
' '           Text
'x'           Name
'\n'          Text

'val'         Keyword.Reserved
' '           Text
"end_struct_'" Name.Variable
' '           Text
':'           Punctuation
' '           Text
'('           Punctuation
"'a"          Name.Decorator
' '           Text
'->'          Punctuation
' '           Text
"'a"          Name.Decorator
')'           Punctuation
' '           Text
'='           Punctuation
' '           Text
'fn'          Keyword.Reserved
' '           Text
'x'           Name
' '           Text
'=>'          Punctuation
' '           Text
'x'           Name
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'x'           Name.Variable
' '           Text
':'           Punctuation
' '           Text
'('           Punctuation
"''a"         Name.Decorator
' '           Text
'->'          Punctuation
' '           Text
"''a"         Name.Decorator
')'           Punctuation
' '           Text
'='           Punctuation
' '           Text
'fn'          Keyword.Reserved
' '           Text
'x'           Name
' '           Text
'=>'          Punctuation
' '           Text
'x'           Name
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'x'           Name.Variable
' '           Text
':'           Punctuation
' '           Text
'('           Punctuation
"''''"        Name.Decorator
' '           Text
'->'          Punctuation
' '           Text
"''''"        Name.Decorator
')'           Punctuation
' '           Text
'='           Punctuation
' '           Text
'fn'          Keyword.Reserved
' '           Text
'x'           Name
' '           Text
'=>'          Punctuation
' '           Text
'x'           Name
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'x'           Name.Variable
' '           Text
':'           Punctuation
' '           Text
'unit'        Name
' '           Text
'='           Punctuation
' '           Text
'print'       Name
' '           Text
'"'           Literal.String.Double
'W'           Literal.String.Double
'e'           Literal.String.Double
'i'           Literal.String.Double
'r'           Literal.String.Double
'd'           Literal.String.Double
','           Literal.String.Double
' '           Literal.String.Double
'h'           Literal.String.Double
'u'           Literal.String.Double
'h'           Literal.String.Double
'?'           Literal.String.Double
'\\n'         Literal.String.Escape
'"'           Literal.String.Double
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'w'           Name.Variable
' '           Text
'='           Punctuation
' '           Text
'{'           Punctuation
'x'           Name
'='           Punctuation
'1'           Literal.Number.Integer
','           Punctuation
'y'           Name
'='           Punctuation
'2'           Literal.Number.Integer
','           Punctuation
'##='         Name
' '           Text
'='           Punctuation
'3'           Literal.Number.Integer
','           Punctuation
'4'           Literal.Number.Integer
'='           Punctuation
'3'           Literal.Number.Integer
'}'           Punctuation
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'{'           Punctuation
'##='         Name
','           Punctuation
' '           Text
'x'           Name
','           Punctuation
' '           Text
'4'           Literal.Number.Integer
'='           Punctuation
'a'           Name
','           Punctuation
'...'         Punctuation
'}'           Punctuation
' '           Text
'='           Punctuation
' '           Text
'w'           Name
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'z'           Name.Variable
' '           Text
'='           Punctuation
' '           Text
'#4'          Name.Label
' '           Text
'w'           Name
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'z'           Name.Variable
' '           Text
'='           Punctuation
' '           Text
'# ##='       Name.Label
' '           Text
'w'           Name
'\n\n'        Text

'fun'         Keyword.Reserved
' '           Text
'f'           Name.Function
' '           Text
'x'           Name
' '           Text
'y'           Name
' '           Text
'0'           Literal.Number.Integer
' '           Text
'='           Punctuation
' '           Text
'4'           Literal.Number.Integer
' \n  '       Text
'|'           Punctuation
' '           Text
'f'           Name.Function
' '           Text
'x'           Name
' '           Text
'y'           Name
' '           Text
'z'           Name
' '           Text
'='           Punctuation
' '           Text
'4'           Literal.Number.Integer
' '           Text
'+'           Name
' '           Text
'Sv'          Name.Namespace
'.'           Punctuation
'||'          Name
'\n\n'        Text

'exception'   Keyword.Reserved
' '           Text
'Foo'         Name.Class
' '           Text
'of'          Keyword.Reserved
' '           Text
'int'         Name.Class
'\n'          Text

'datatype'    Name.Class
' '           Text
'('           Punctuation
"'0"          Name.Decorator
','           Punctuation
' '           Text
"'b"          Name.Decorator
','           Punctuation
' '           Text
"'_"          Name.Decorator
','           Punctuation
' '           Text
"'"           Name.Decorator
')'           Punctuation
' '           Text
"f'o'o"       Name
' '           Text
'='           Punctuation
' '           Text
'Bar'         Name
' '           Text
'|'           Punctuation
' '           Text
"baZ12'"      Name.Function
' '           Text
'|'           Punctuation
' '           Text
'dsfa_fad'    Name.Function
' '           Text
'|'           Punctuation
' '           Text
'#@$'         Name.Function
' '           Text
'|'           Punctuation
' '           Text
'Bug'         Name.Function
'\n'          Text

'and'         Keyword.Reserved
' '           Text
'('           Punctuation
"'"           Name.Decorator
','           Punctuation
' '           Text
"'''"         Name.Decorator
','           Punctuation
' '           Text
"''''"        Name.Decorator
','           Punctuation
' '           Text
"'''''"       Name.Decorator
')'           Punctuation
' '           Text
'bar'         Name.Function
' '           Text
'='           Punctuation
' \n   '      Text
'Bee'         Name
' '           Text
'of'          Keyword.Reserved
' '           Text
'unit'        Name
'\n '         Text
'|'           Punctuation
' '           Text
'Ben'         Name.Function
' '           Text
'of'          Keyword.Reserved
' '           Text
'('           Punctuation
"'"           Name.Decorator
','           Punctuation
' '           Text
"'''"         Name.Decorator
','           Punctuation
' '           Text
"''''"        Name.Decorator
','           Punctuation
' '           Text
"'''''"       Name.Decorator
')'           Punctuation
' '           Text
"f'o'o"       Name
' '           Text
'*'           Name
' '           Text
'int'         Name
'\n '         Text
'|'           Punctuation
' '           Text
'X'           Name.Function
' '           Text
'of'          Keyword.Reserved
' '           Text
"'''"         Name.Decorator
' '           Text
'list'        Name
'\n\n'        Text

'fun'         Keyword.Reserved
' '           Text
'q'           Name.Function
' '           Text
'x'           Name
' '           Text
'='           Punctuation
' '           Text
'raise'       Keyword.Reserved
' '           Text
'Foo'         Name
' '           Text
'x'           Name
'\n'          Text

'and'         Keyword.Reserved
' '           Text
'h'           Name.Function
' '           Text
'x'           Name
' '           Text
'='           Punctuation
' '           Text
'raise'       Keyword.Reserved
' '           Text
'Foo'         Name
' '           Text
'('           Punctuation
'~'           Name
'x'           Name
')'           Punctuation
'\n\n'        Text

'val'         Keyword.Reserved
' '           Text
'x'           Name.Variable
' '           Text
'='           Punctuation
' '           Text
'4'           Literal.Number.Integer
'\n'          Text

'and'         Keyword.Reserved
' '           Text
'y'           Name.Variable
' '           Text
'='           Punctuation
' '           Text
'5'           Literal.Number.Integer
'\n\n'        Text

'fun'         Keyword.Reserved
' '           Text
'q'           Name.Function
' '           Text
'0'           Literal.Number.Integer
' '           Text
'='           Punctuation
' '           Text
'4'           Literal.Number.Integer
'\n  '        Text
'|'           Punctuation
' '           Text
'q'           Name.Function
' '           Text
'1'           Literal.Number.Integer
' '           Text
'='           Punctuation
' '           Text
'('           Punctuation
'case'        Keyword.Reserved
' '           Text
'1'           Literal.Number.Integer
' '           Text
'of'          Keyword.Reserved
' '           Text
'1'           Literal.Number.Integer
' '           Text
'=>'          Punctuation
' '           Text
'2'           Literal.Number.Integer
' '           Text
'|'           Name
' '           Text
'3'           Literal.Number.Integer
' '           Text
'=>'          Punctuation
' '           Text
'4'           Literal.Number.Integer
' '           Text
'|'           Name
' '           Text
'x'           Name
' '           Text
'=>'          Punctuation
' '           Text
'y'           Name
')'           Punctuation
'\n  '        Text
'|'           Punctuation
' '           Text
'q'           Name.Function
' '           Text
'y'           Name
' '           Text
'='           Punctuation
' '           Text
'case'        Keyword.Reserved
' '           Text
'y'           Name
' '           Text
'of'          Keyword.Reserved
' '           Text
'1'           Literal.Number.Integer
' '           Text
'=>'          Punctuation
' '           Text
'2'           Literal.Number.Integer
' '           Text
'|'           Name
' '           Text
'3'           Literal.Number.Integer
' '           Text
'=>'          Punctuation
' '           Text
'4'           Literal.Number.Integer
' '           Text
'|'           Name
' '           Text
'x'           Name
' '           Text
'=>'          Punctuation
' '           Text
'y'           Name
'\n\n'        Text

'val'         Keyword.Reserved
' '           Text
'x'           Name.Variable
' '           Text
'='           Punctuation
' '           Text
'ref'         Name
' '           Text
'true'        Name
'\n'          Text

'fun'         Keyword.Reserved
' '           Text
'q'           Name.Function
' '           Text
'0'           Literal.Number.Integer
' '           Text
'='           Punctuation
' '           Text
'4'           Literal.Number.Integer
'\n  '        Text
'|'           Punctuation
' '           Text
'q'           Name.Function
' '           Text
'1'           Literal.Number.Integer
' '           Text
'='           Punctuation
' '           Text
'if'          Keyword.Reserved
' '           Text
'false'       Name
' '           Text
'then'        Keyword.Reserved
' '           Text
'case'        Keyword.Reserved
' '           Text
'1'           Literal.Number.Integer
' '           Text
'of'          Keyword.Reserved
' '           Text
'1'           Literal.Number.Integer
' '           Text
'=>'          Punctuation
' '           Text
'2'           Literal.Number.Integer
' '           Text
'|'           Name
' '           Text
'3'           Literal.Number.Integer
' '           Text
'=>'          Punctuation
' '           Text
'4'           Literal.Number.Integer
' '           Text
'|'           Name
' '           Text
'x'           Name
' '           Text
'=>'          Punctuation
' '           Text
'y'           Name
' '           Text
'else'        Keyword.Reserved
' '           Text
'19'          Literal.Number.Integer
'\n  '        Text
'|'           Punctuation
' '           Text
'q'           Name.Function
' '           Text
'2'           Literal.Number.Integer
' '           Text
'='           Punctuation
' '           Text
'('           Punctuation
'while'       Keyword.Reserved
' '           Text
'!'           Name
'x'           Name
' '           Text
'handle'      Keyword.Reserved
' '           Text
'Match'       Name
' '           Text
'=>'          Punctuation
' '           Text
'!'           Name
'x'           Name
' '           Text
'|'           Name
' '           Text
'Fail'        Name
' '           Text
'_'           Punctuation
' '           Text
'=>'          Punctuation
' '           Text
'!'           Name
'x'           Name
' '           Text
'do'          Keyword.Reserved
' '           Text
'('           Punctuation
')'           Punctuation
' '           Text
';'           Punctuation
' '           Text
'2'           Literal.Number.Integer
')'           Punctuation
'\n  '        Text
'|'           Punctuation
' '           Text
'q'           Name.Function
' '           Text
'x'           Name
' '           Text
'='           Punctuation
' '           Text
'('           Punctuation
'raise'       Keyword.Reserved
' '           Text
'Match'       Name
')'           Punctuation
' '           Text
'handle'      Keyword.Reserved
' '           Text
'Domain'      Name
' '           Text
'=>'          Punctuation
' '           Text
'9'           Literal.Number.Integer
' '           Text
'|'           Name
' '           Text
'Match'       Name
' '           Text
'=>'          Punctuation
' '           Text
'3'           Literal.Number.Integer
'\n\n'        Text

'fun'         Keyword.Reserved
' '           Text
'p'           Name.Function
' '           Text
'0'           Literal.Number.Integer
' '           Text
'='           Punctuation
' '           Text
'12'          Literal.Number.Integer
'\n  '        Text
'|'           Punctuation
' '           Text
'p'           Name.Function
' '           Text
'1'           Literal.Number.Integer
' '           Text
'='           Punctuation
' '           Text
'8'           Literal.Number.Integer
'\n  '        Text
'|'           Punctuation
' '           Text
'p'           Name.Function
' '           Text
'2'           Literal.Number.Integer
' '           Text
'='           Punctuation
' '           Text
'r'           Name
' '           Text
'false'       Name
'\n  '        Text
'|'           Punctuation
' '           Text
'p'           Name.Function
' '           Text
'x'           Name
' '           Text
'='           Punctuation
' '           Text
'r'           Name
' '           Text
'true'        Name
'\n'          Text

'and'         Keyword.Reserved
' '           Text
'r'           Name.Function
' '           Text
'true'        Name
' '           Text
'='           Punctuation
' '           Text
'19'          Literal.Number.Integer
'\n  '        Text
'|'           Punctuation
' '           Text
'r'           Name.Function
' '           Text
'false'       Name
' '           Text
'='           Punctuation
' '           Text
'12'          Literal.Number.Integer
'\n\n'        Text

'val'         Keyword.Reserved
' '           Text
'_'           Punctuation
' '           Text
'='           Punctuation
' '           Text
'123'         Literal.Number.Integer
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'_'           Punctuation
' '           Text
'='           Punctuation
' '           Text
'0001'        Literal.Number.Integer
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'_'           Punctuation
' '           Text
'='           Punctuation
' '           Text
'~123'        Literal.Number.Integer
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'_'           Punctuation
' '           Text
'='           Punctuation
' '           Text
'~0001'       Literal.Number.Integer
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'_'           Punctuation
' '           Text
'='           Punctuation
' '           Text
'0w12412'     Literal.Number.Integer
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'_'           Punctuation
' '           Text
'='           Punctuation
' '           Text
'0w12412'     Literal.Number.Integer
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'_'           Punctuation
' '           Text
'='           Punctuation
' '           Text
'0xfA0'       Literal.Number.Hex
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'_'           Punctuation
' '           Text
'='           Punctuation
' '           Text
'~0xfA0'      Literal.Number.Hex
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'_'           Punctuation
' '           Text
'='           Punctuation
' '           Text
'0wxfA0'      Literal.Number.Hex
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'_'           Punctuation
' '           Text
'='           Punctuation
' '           Text
'1.4'         Literal.Number.Float
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'_'           Punctuation
' '           Text
'='           Punctuation
' '           Text
'~1.4'        Literal.Number.Float
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'_'           Punctuation
' '           Text
'='           Punctuation
' '           Text
'1e~2'        Literal.Number.Float
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'_'           Punctuation
' '           Text
'='           Punctuation
' '           Text
'1E~2'        Literal.Number.Float
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'_'           Punctuation
' '           Text
'='           Punctuation
' '           Text
'1e2'         Literal.Number.Float
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'_'           Punctuation
' '           Text
'='           Punctuation
' '           Text
'1E2'         Literal.Number.Float
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'_'           Punctuation
' '           Text
'='           Punctuation
' '           Text
'1.4e~2'      Literal.Number.Float
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'_'           Punctuation
' '           Text
'='           Punctuation
' '           Text
'1.4E~2'      Literal.Number.Float
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'_'           Punctuation
' '           Text
'='           Punctuation
' '           Text
'1.4e2'       Literal.Number.Float
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'_'           Punctuation
' '           Text
'='           Punctuation
' '           Text
'1.4E2'       Literal.Number.Float
'\n\n'        Text

'val'         Keyword.Reserved
' '           Text
'c'           Name.Variable
' '           Text
'='           Punctuation
' '           Text
'#"'          Literal.String.Char
'\\000'       Literal.String.Escape
'"'           Literal.String.Char
'\n'          Text

'val'         Keyword.Reserved
' '           Text
'st'          Name.Variable
' '           Text
'='           Punctuation
' '           Text
'"'           Literal.String.Double
'f'           Literal.String.Double
'o'           Literal.String.Double
'o'           Literal.String.Double
' '           Literal.String.Double
'\\\n \t \\'  Literal.String.Interpol
' '           Literal.String.Double
'b'           Literal.String.Double
'a'           Literal.String.Double
'r'           Literal.String.Double
'"'           Literal.String.Double
' '           Text
'^'           Name
' '           Text
'"'           Literal.String.Double
'b'           Literal.String.Double
'a'           Literal.String.Double
'z'           Literal.String.Double
' '           Literal.String.Double
'\\        \n  \t \\' Literal.String.Interpol
' '           Literal.String.Double
'a'           Literal.String.Double
'n'           Literal.String.Double
'd'           Literal.String.Double
' '           Literal.String.Double
'\\ \n   \t \\' Literal.String.Interpol
' '           Literal.String.Double
's'           Literal.String.Double
'u'           Literal.String.Double
'c'           Literal.String.Double
'h'           Literal.String.Double
'\\n'         Literal.String.Escape
'"'           Literal.String.Double
'\n\n'        Text

'val'         Keyword.Reserved
' '           Text
'('           Punctuation
')'           Punctuation
' '           Text
'='           Name.Variable
' '           Text
'print'       Name
' '           Text
'st'          Name
'\n\n'        Text

'val'         Keyword.Reserved
' '           Text
'_'           Punctuation
' '           Text
'='           Punctuation
' '           Text
'foo'         Name
'::'          Name
'bar'         Name
'::'          Name
'4'           Literal.Number.Integer
'::'          Name
'['           Punctuation
'++'          Name
']'           Punctuation
'\n\n'        Text

'end'         Keyword.Reserved
'\n'          Text
