1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.mal_lang.lib;
18
19 public enum TokenType {
20 SINGLECOMMENT("single line comment"),
21 MULTICOMMENT("multi line comment"),
22 EOF("end-of-file"),
23
24 INCLUDE("'include'"),
25 INFO("'info'"),
26 CATEGORY("'category'"),
27 ABSTRACT("'abstract'"),
28 ASSET("'asset'"),
29 EXTENDS("'extends'"),
30 ASSOCIATIONS("'associations'"),
31 LET("'let'"),
32 EXIST("'E'"),
33 C("'C'"),
34 I("'I'"),
35 A("'A'"),
36
37 STRING("string literal"),
38 MULTI_STRING("multi-line string literal"),
39 ID("identifier"),
40 INT("integer literal"),
41 FLOAT("floating point literal"),
42 HASH("'#'"),
43 COLON("':'"),
44 LCURLY("'{'"),
45 RCURLY("'}'"),
46 INHERIT("'+>'"),
47 OVERRIDE("'->'"),
48 ALL("'&'"),
49 ANY("'|'"),
50 NOTEXIST("'!E'"),
51 AT("'@'"),
52 LBRACKET("'['"),
53 RBRACKET("']'"),
54 LPAREN("'('"),
55 RPAREN("')'"),
56 COMMA("','"),
57 REQUIRE("'<-'"),
58 ASSIGN("'='"),
59 UNION("'\\/'"),
60 INTERSECT("'/\\'"),
61 DOT("'.'"),
62 RANGE("'..'"),
63 STAR("'*'"),
64 PLUS("'+'"),
65 MINUS("'-'"),
66 DIVIDE("'/'"),
67 POWER("'^'"),
68 LARROW("'<--'"),
69 RARROW("'-->'");
70
71 private final String string;
72
73 private TokenType(String string) {
74 this.string = string;
75 }
76
77 @Override
78 public String toString() {
79 return string;
80 }
81 }