@@ -29,6 +29,31 @@ const (
29
29
REGEX // Regular expression, REGEX: {PATT} ANy regex pattern inside OPATT and CPATT
30
30
)
31
31
32
+ var ErrorLookup = map [Token ]string {
33
+ ILLEGAL : "ILLEGAL" ,
34
+ EOF : "EOF" , // Spacial token, EOF: Token signals the end of input
35
+ WS : "WHITESPACE" , // Spacial token, WS: Token signals whitespace has been found
36
+
37
+ LITERAL : "LITERAL" , // LITERAL: String literal discovered
38
+
39
+ BUCKEY : "BUCKET >>>> KEY" , // Other operator, BUCKKEY: >>>> Bucket to Key syntax for KVAL
40
+ BUCBUC : "BUCKET >> BUCKET" , // Other operator, BUCBUC: >> Bucket to Bucket syntax for KVAL
41
+ KEYVAL : "KEY :: VALUE" , // Other operator, KEYVALL :: Key to Value syntax for KVAL
42
+ ASSIGN : "ASSIGNMENT" , // Other operator, ASSIGN: => Assignment operator for KVAL renames
43
+
44
+ USCORE : "UNDERSCORE" , // Single character operator, USCORE: _ Return unknown Key or Value
45
+ OPATT : "OPEN REGEX PATTERN" , // Single character operator, OPATT: { Open a regular expression pattern
46
+ CPATT : "CLOSE REGEX PATTERN" , // Single character operator, COATT: } Close a regular expression pattern
47
+
48
+ INS : "INSERT KEYWORD" , // Keyword, INS: Insert capability of KVAL
49
+ GET : "GET KEYWORD" , // Keyword, GET: Get capability of KVAL
50
+ LIS : "LIS KEYWORD" , // Keyword, LIS: LIS capability of KVAL
51
+ DEL : "DEL KEYWORD" , // Keyword, DEL: Delete capability of KVAL
52
+ REN : "REN KEYWORD" , // Keyword, REN: Rename capability of KVAL
53
+
54
+ REGEX : "REGEX PATTERN" , // Regular expression, REGEX: {PATT} ANy regex pattern inside OPATT and CPATT
55
+ }
56
+
32
57
// Mapped values exported for KVAL Parser to verify keywords
33
58
// Lookup 'LIT' value in KeyWordMap and if found we have a KVAL key word,
34
59
// e.g. INS, GET, LIS, REN, DEL. If used correctly this map will help a parser
0 commit comments