This is an automated email from the ASF dual-hosted git repository.

aradzinski pushed a commit to branch NLPCRAFT-206
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git


The following commit(s) were added to refs/heads/NLPCRAFT-206 by this push:
     new 7eea36f  WIP.
7eea36f is described below

commit 7eea36f579f9fb7896e339c3b1024684781a82da
Author: Aaron Radzinski <[email protected]>
AuthorDate: Sat Feb 13 17:43:29 2021 -0800

    WIP.
---
 .../model/intent/impl/antlr4/NCIntentDsl.g4        |   2 +-
 .../model/intent/impl/antlr4/NCIntentDsl.interp    |  10 +-
 .../model/intent/impl/antlr4/NCIntentDsl.tokens    | 134 +++++++-------
 .../intent/impl/antlr4/NCIntentDslLexer.interp     |  14 +-
 .../model/intent/impl/antlr4/NCIntentDslLexer.java | 192 ++++++++++----------
 .../intent/impl/antlr4/NCIntentDslLexer.tokens     | 134 +++++++-------
 .../intent/impl/antlr4/NCIntentDslParser.java      | 162 ++++++++---------
 .../intent/impl/ver2/NCIntentDslCompiler.scala     | 196 ++++++++++++---------
 8 files changed, 437 insertions(+), 407 deletions(-)

diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDsl.g4
 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDsl.g4
index c1caf42..fd965b4 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDsl.g4
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDsl.g4
@@ -61,8 +61,8 @@ expr
     | expr op=(EQ | NEQ) expr # eqExpr
     | expr op=(AND | OR) expr # logExpr
     | atom # atomExpr
-    | expr COMMA atom # listExpr
     | ID LPAR expr? RPAR # callExpr
+    | expr COMMA expr # listExpr
     ;
 atom
     : NULL
diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDsl.interp
 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDsl.interp
index 99b35ec..1eb286b 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDsl.interp
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDsl.interp
@@ -7,6 +7,8 @@ null
 'term'
 null
 null
+null
+'null'
 '=='
 '!='
 '>='
@@ -40,8 +42,6 @@ null
 '%'
 '$'
 null
-'null'
-null
 null
 null
 null
@@ -57,6 +57,8 @@ null
 null
 SQSTRING
 DQSTRING
+BOOL
+NULL
 EQ
 NEQ
 GTEQ
@@ -89,8 +91,6 @@ MULT
 DIV
 MOD
 DOLLAR
-BOOL
-NULL
 INT
 REAL
 EXP
@@ -123,4 +123,4 @@ minMaxRange
 
 
 atn:
-[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 49, 241, 4, 2, 
9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 
4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 
14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 
20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 3, 2, 3, 2, 5, 2, 47, 10, 2, 3, 2, 5, 2, 
50, 10, 2, 3, 2, 5, 2, 53, 10, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 
4, 3, 4, 3, 4, 3, 4, 3 [...]
\ No newline at end of file
+[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 49, 241, 4, 2, 
9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 
4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 
14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 
20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 3, 2, 3, 2, 5, 2, 47, 10, 2, 3, 2, 5, 2, 
50, 10, 2, 3, 2, 5, 2, 53, 10, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 
4, 3, 4, 3, 4, 3, 4, 3 [...]
\ No newline at end of file
diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDsl.tokens
 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDsl.tokens
index 9a95dd2..0206736 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDsl.tokens
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDsl.tokens
@@ -5,40 +5,40 @@ T__3=4
 T__4=5
 SQSTRING=6
 DQSTRING=7
-EQ=8
-NEQ=9
-GTEQ=10
-LTEQ=11
-GT=12
-LT=13
-AND=14
-OR=15
-VERT=16
-NOT=17
-LPAR=18
-RPAR=19
-LBRACE=20
-RBRACE=21
-SQUOTE=22
-DQUOTE=23
-TILDA=24
-LBR=25
-RBR=26
-POUND=27
-COMMA=28
-COLON=29
-MINUS=30
-DOT=31
-UNDERSCORE=32
-ASSIGN=33
-PLUS=34
-QUESTION=35
-MULT=36
-DIV=37
-MOD=38
-DOLLAR=39
-BOOL=40
-NULL=41
+BOOL=8
+NULL=9
+EQ=10
+NEQ=11
+GTEQ=12
+LTEQ=13
+GT=14
+LT=15
+AND=16
+OR=17
+VERT=18
+NOT=19
+LPAR=20
+RPAR=21
+LBRACE=22
+RBRACE=23
+SQUOTE=24
+DQUOTE=25
+TILDA=26
+LBR=27
+RBR=28
+POUND=29
+COMMA=30
+COLON=31
+MINUS=32
+DOT=33
+UNDERSCORE=34
+ASSIGN=35
+PLUS=36
+QUESTION=37
+MULT=38
+DIV=39
+MOD=40
+DOLLAR=41
 INT=42
 REAL=43
 EXP=44
@@ -50,36 +50,36 @@ ErrorCharacter=47
 'flow'=3
 'meta'=4
 'term'=5
-'=='=8
-'!='=9
-'>='=10
-'<='=11
-'>'=12
-'<'=13
-'&&'=14
-'||'=15
-'|'=16
-'!'=17
-'('=18
-')'=19
-'{'=20
-'}'=21
-'\''=22
-'"'=23
-'~'=24
-'['=25
-']'=26
-'#'=27
-','=28
-':'=29
-'-'=30
-'.'=31
-'_'=32
-'='=33
-'+'=34
-'?'=35
-'*'=36
-'/'=37
-'%'=38
-'$'=39
-'null'=41
+'null'=9
+'=='=10
+'!='=11
+'>='=12
+'<='=13
+'>'=14
+'<'=15
+'&&'=16
+'||'=17
+'|'=18
+'!'=19
+'('=20
+')'=21
+'{'=22
+'}'=23
+'\''=24
+'"'=25
+'~'=26
+'['=27
+']'=28
+'#'=29
+','=30
+':'=31
+'-'=32
+'.'=33
+'_'=34
+'='=35
+'+'=36
+'?'=37
+'*'=38
+'/'=39
+'%'=40
+'$'=41
diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDslLexer.interp
 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDslLexer.interp
index 3ff0c35..9b1be1d 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDslLexer.interp
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDslLexer.interp
@@ -7,6 +7,8 @@ null
 'term'
 null
 null
+null
+'null'
 '=='
 '!='
 '>='
@@ -40,8 +42,6 @@ null
 '%'
 '$'
 null
-'null'
-null
 null
 null
 null
@@ -57,6 +57,8 @@ null
 null
 SQSTRING
 DQSTRING
+BOOL
+NULL
 EQ
 NEQ
 GTEQ
@@ -89,8 +91,6 @@ MULT
 DIV
 MOD
 DOLLAR
-BOOL
-NULL
 INT
 REAL
 EXP
@@ -106,6 +106,8 @@ T__3
 T__4
 SQSTRING
 DQSTRING
+BOOL
+NULL
 EQ
 NEQ
 GTEQ
@@ -138,8 +140,6 @@ MULT
 DIV
 MOD
 DOLLAR
-BOOL
-NULL
 INT
 REAL
 EXP
@@ -155,4 +155,4 @@ mode names:
 DEFAULT_MODE
 
 atn:
-[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 49, 279, 8, 1, 
4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 
9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 
14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 
19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 
25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 
30, 4, 31, 9, 31, 4, 32, 9,  [...]
\ No newline at end of file
+[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 49, 279, 8, 1, 
4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 
9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 
14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 
19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 
25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 
30, 4, 31, 9, 31, 4, 32, 9,  [...]
\ No newline at end of file
diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDslLexer.java
 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDslLexer.java
index 04d8d18..3704fa8 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDslLexer.java
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDslLexer.java
@@ -17,12 +17,12 @@ public class NCIntentDslLexer extends Lexer {
        protected static final PredictionContextCache _sharedContextCache =
                new PredictionContextCache();
        public static final int
-               T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, SQSTRING=6, DQSTRING=7, 
EQ=8, 
-               NEQ=9, GTEQ=10, LTEQ=11, GT=12, LT=13, AND=14, OR=15, VERT=16, 
NOT=17, 
-               LPAR=18, RPAR=19, LBRACE=20, RBRACE=21, SQUOTE=22, DQUOTE=23, 
TILDA=24, 
-               LBR=25, RBR=26, POUND=27, COMMA=28, COLON=29, MINUS=30, DOT=31, 
UNDERSCORE=32, 
-               ASSIGN=33, PLUS=34, QUESTION=35, MULT=36, DIV=37, MOD=38, 
DOLLAR=39, BOOL=40, 
-               NULL=41, INT=42, REAL=43, EXP=44, ID=45, WS=46, 
ErrorCharacter=47;
+               T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, SQSTRING=6, DQSTRING=7, 
BOOL=8, 
+               NULL=9, EQ=10, NEQ=11, GTEQ=12, LTEQ=13, GT=14, LT=15, AND=16, 
OR=17, 
+               VERT=18, NOT=19, LPAR=20, RPAR=21, LBRACE=22, RBRACE=23, 
SQUOTE=24, DQUOTE=25, 
+               TILDA=26, LBR=27, RBR=28, POUND=29, COMMA=30, COLON=31, 
MINUS=32, DOT=33, 
+               UNDERSCORE=34, ASSIGN=35, PLUS=36, QUESTION=37, MULT=38, 
DIV=39, MOD=40, 
+               DOLLAR=41, INT=42, REAL=43, EXP=44, ID=45, WS=46, 
ErrorCharacter=47;
        public static String[] channelNames = {
                "DEFAULT_TOKEN_CHANNEL", "HIDDEN"
        };
@@ -33,12 +33,12 @@ public class NCIntentDslLexer extends Lexer {
 
        private static String[] makeRuleNames() {
                return new String[] {
-                       "T__0", "T__1", "T__2", "T__3", "T__4", "SQSTRING", 
"DQSTRING", "EQ", 
-                       "NEQ", "GTEQ", "LTEQ", "GT", "LT", "AND", "OR", "VERT", 
"NOT", "LPAR", 
-                       "RPAR", "LBRACE", "RBRACE", "SQUOTE", "DQUOTE", 
"TILDA", "LBR", "RBR", 
-                       "POUND", "COMMA", "COLON", "MINUS", "DOT", 
"UNDERSCORE", "ASSIGN", "PLUS", 
-                       "QUESTION", "MULT", "DIV", "MOD", "DOLLAR", "BOOL", 
"NULL", "INT", "REAL", 
-                       "EXP", "ID", "WS", "ErrorCharacter"
+                       "T__0", "T__1", "T__2", "T__3", "T__4", "SQSTRING", 
"DQSTRING", "BOOL", 
+                       "NULL", "EQ", "NEQ", "GTEQ", "LTEQ", "GT", "LT", "AND", 
"OR", "VERT", 
+                       "NOT", "LPAR", "RPAR", "LBRACE", "RBRACE", "SQUOTE", 
"DQUOTE", "TILDA", 
+                       "LBR", "RBR", "POUND", "COMMA", "COLON", "MINUS", 
"DOT", "UNDERSCORE", 
+                       "ASSIGN", "PLUS", "QUESTION", "MULT", "DIV", "MOD", 
"DOLLAR", "INT", 
+                       "REAL", "EXP", "ID", "WS", "ErrorCharacter"
                };
        }
        public static final String[] ruleNames = makeRuleNames();
@@ -46,20 +46,20 @@ public class NCIntentDslLexer extends Lexer {
        private static String[] makeLiteralNames() {
                return new String[] {
                        null, "'intent'", "'ordered'", "'flow'", "'meta'", 
"'term'", null, null, 
-                       "'=='", "'!='", "'>='", "'<='", "'>'", "'<'", "'&&'", 
"'||'", "'|'", 
-                       "'!'", "'('", "')'", "'{'", "'}'", "'''", "'\"'", 
"'~'", "'['", "']'", 
-                       "'#'", "','", "':'", "'-'", "'.'", "'_'", "'='", "'+'", 
"'?'", "'*'", 
-                       "'/'", "'%'", "'$'", null, "'null'"
+                       null, "'null'", "'=='", "'!='", "'>='", "'<='", "'>'", 
"'<'", "'&&'", 
+                       "'||'", "'|'", "'!'", "'('", "')'", "'{'", "'}'", 
"'''", "'\"'", "'~'", 
+                       "'['", "']'", "'#'", "','", "':'", "'-'", "'.'", "'_'", 
"'='", "'+'", 
+                       "'?'", "'*'", "'/'", "'%'", "'$'"
                };
        }
        private static final String[] _LITERAL_NAMES = makeLiteralNames();
        private static String[] makeSymbolicNames() {
                return new String[] {
-                       null, null, null, null, null, null, "SQSTRING", 
"DQSTRING", "EQ", "NEQ", 
-                       "GTEQ", "LTEQ", "GT", "LT", "AND", "OR", "VERT", "NOT", 
"LPAR", "RPAR", 
-                       "LBRACE", "RBRACE", "SQUOTE", "DQUOTE", "TILDA", "LBR", 
"RBR", "POUND", 
-                       "COMMA", "COLON", "MINUS", "DOT", "UNDERSCORE", 
"ASSIGN", "PLUS", "QUESTION", 
-                       "MULT", "DIV", "MOD", "DOLLAR", "BOOL", "NULL", "INT", 
"REAL", "EXP", 
+                       null, null, null, null, null, null, "SQSTRING", 
"DQSTRING", "BOOL", "NULL", 
+                       "EQ", "NEQ", "GTEQ", "LTEQ", "GT", "LT", "AND", "OR", 
"VERT", "NOT", 
+                       "LPAR", "RPAR", "LBRACE", "RBRACE", "SQUOTE", "DQUOTE", 
"TILDA", "LBR", 
+                       "RBR", "POUND", "COMMA", "COLON", "MINUS", "DOT", 
"UNDERSCORE", "ASSIGN", 
+                       "PLUS", "QUESTION", "MULT", "DIV", "MOD", "DOLLAR", 
"INT", "REAL", "EXP", 
                        "ID", "WS", "ErrorCharacter"
                };
        }
@@ -131,86 +131,86 @@ public class NCIntentDslLexer extends Lexer {
                
"+\4,\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\3\3"+
                
"\3\3\3\3\3\3\3\3\3\3\3\3\3\3\4\3\4\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\5\3\6"+
                
"\3\6\3\6\3\6\3\6\3\7\3\7\7\7\u0082\n\7\f\7\16\7\u0085\13\7\3\7\3\7\3\b"+
-               
"\3\b\7\b\u008b\n\b\f\b\16\b\u008e\13\b\3\b\3\b\3\t\3\t\3\t\3\n\3\n\3\n"+
-               
"\3\13\3\13\3\13\3\f\3\f\3\f\3\r\3\r\3\16\3\16\3\17\3\17\3\17\3\20\3\20"+
-               
"\3\20\3\21\3\21\3\22\3\22\3\23\3\23\3\24\3\24\3\25\3\25\3\26\3\26\3\27"+
-               
"\3\27\3\30\3\30\3\31\3\31\3\32\3\32\3\33\3\33\3\34\3\34\3\35\3\35\3\36"+
-               "\3\36\3\37\3\37\3 \3 
\3!\3!\3\"\3\"\3#\3#\3$\3$\3%\3%\3&\3&\3\'\3\'\3"+
-               
"(\3(\3)\3)\3)\3)\3)\3)\3)\3)\3)\5)\u00e1\n)\3*\3*\3*\3*\3*\3+\3+\3+\7"+
-               
"+\u00eb\n+\f+\16+\u00ee\13+\5+\u00f0\n+\3,\3,\6,\u00f4\n,\r,\16,\u00f5"+
-               
"\3-\3-\5-\u00fa\n-\3-\3-\3.\3.\3.\6.\u0101\n.\r.\16.\u0102\3.\3.\3.\3"+
-               
".\3.\7.\u010a\n.\f.\16.\u010d\13.\3/\6/\u0110\n/\r/\16/\u0111\3/\3/\3"+
-               
"\60\3\60\2\2\61\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25\f\27\r\31"+
-               
"\16\33\17\35\20\37\21!\22#\23%\24\'\25)\26+\27-\30/\31\61\32\63\33\65"+
-               "\34\67\359\36;\37= 
?!A\"C#E$G%I&K\'M(O)Q*S+U,W-Y.[/]\60_\61\3\2\f\3\2"+
-               
"))\3\2$$\3\2\63;\4\2\62;aa\3\2\62;\4\2GGgg\4\2--//\4\2C\\c|\5\2\62;C\\"+
-               
"c|\5\2\13\f\16\17\"\"\2\u0126\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t"+
-               
"\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2"+
-               
"\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2"+
-               
"\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2"+
-               
"+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2"+
-               
"\2\67\3\2\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2"+
-               
"C\3\2\2\2\2E\3\2\2\2\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O\3"+
-               
"\2\2\2\2Q\3\2\2\2\2S\3\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2[\3\2\2"+
-               
"\2\2]\3\2\2\2\2_\3\2\2\2\3a\3\2\2\2\5h\3\2\2\2\7p\3\2\2\2\tu\3\2\2\2\13"+
-               
"z\3\2\2\2\r\177\3\2\2\2\17\u0088\3\2\2\2\21\u0091\3\2\2\2\23\u0094\3\2"+
-               
"\2\2\25\u0097\3\2\2\2\27\u009a\3\2\2\2\31\u009d\3\2\2\2\33\u009f\3\2\2"+
-               
"\2\35\u00a1\3\2\2\2\37\u00a4\3\2\2\2!\u00a7\3\2\2\2#\u00a9\3\2\2\2%\u00ab"+
-               
"\3\2\2\2\'\u00ad\3\2\2\2)\u00af\3\2\2\2+\u00b1\3\2\2\2-\u00b3\3\2\2\2"+
-               
"/\u00b5\3\2\2\2\61\u00b7\3\2\2\2\63\u00b9\3\2\2\2\65\u00bb\3\2\2\2\67"+
-               
"\u00bd\3\2\2\29\u00bf\3\2\2\2;\u00c1\3\2\2\2=\u00c3\3\2\2\2?\u00c5\3\2"+
-               
"\2\2A\u00c7\3\2\2\2C\u00c9\3\2\2\2E\u00cb\3\2\2\2G\u00cd\3\2\2\2I\u00cf"+
-               
"\3\2\2\2K\u00d1\3\2\2\2M\u00d3\3\2\2\2O\u00d5\3\2\2\2Q\u00e0\3\2\2\2S"+
-               
"\u00e2\3\2\2\2U\u00ef\3\2\2\2W\u00f1\3\2\2\2Y\u00f7\3\2\2\2[\u0100\3\2"+
-               
"\2\2]\u010f\3\2\2\2_\u0115\3\2\2\2ab\7k\2\2bc\7p\2\2cd\7v\2\2de\7g\2\2"+
-               
"ef\7p\2\2fg\7v\2\2g\4\3\2\2\2hi\7q\2\2ij\7t\2\2jk\7f\2\2kl\7g\2\2lm\7"+
-               
"t\2\2mn\7g\2\2no\7f\2\2o\6\3\2\2\2pq\7h\2\2qr\7n\2\2rs\7q\2\2st\7y\2\2"+
-               
"t\b\3\2\2\2uv\7o\2\2vw\7g\2\2wx\7v\2\2xy\7c\2\2y\n\3\2\2\2z{\7v\2\2{|"+
-               
"\7g\2\2|}\7t\2\2}~\7o\2\2~\f\3\2\2\2\177\u0083\5-\27\2\u0080\u0082\n\2"+
-               
"\2\2\u0081\u0080\3\2\2\2\u0082\u0085\3\2\2\2\u0083\u0081\3\2\2\2\u0083"+
-               
"\u0084\3\2\2\2\u0084\u0086\3\2\2\2\u0085\u0083\3\2\2\2\u0086\u0087\5-"+
-               
"\27\2\u0087\16\3\2\2\2\u0088\u008c\5/\30\2\u0089\u008b\n\3\2\2\u008a\u0089"+
-               
"\3\2\2\2\u008b\u008e\3\2\2\2\u008c\u008a\3\2\2\2\u008c\u008d\3\2\2\2\u008d"+
-               
"\u008f\3\2\2\2\u008e\u008c\3\2\2\2\u008f\u0090\5/\30\2\u0090\20\3\2\2"+
-               
"\2\u0091\u0092\7?\2\2\u0092\u0093\7?\2\2\u0093\22\3\2\2\2\u0094\u0095"+
-               
"\7#\2\2\u0095\u0096\7?\2\2\u0096\24\3\2\2\2\u0097\u0098\7@\2\2\u0098\u0099"+
-               
"\7?\2\2\u0099\26\3\2\2\2\u009a\u009b\7>\2\2\u009b\u009c\7?\2\2\u009c\30"+
-               
"\3\2\2\2\u009d\u009e\7@\2\2\u009e\32\3\2\2\2\u009f\u00a0\7>\2\2\u00a0"+
-               
"\34\3\2\2\2\u00a1\u00a2\7(\2\2\u00a2\u00a3\7(\2\2\u00a3\36\3\2\2\2\u00a4"+
-               "\u00a5\7~\2\2\u00a5\u00a6\7~\2\2\u00a6 
\3\2\2\2\u00a7\u00a8\7~\2\2\u00a8"+
-               
"\"\3\2\2\2\u00a9\u00aa\7#\2\2\u00aa$\3\2\2\2\u00ab\u00ac\7*\2\2\u00ac"+
-               
"&\3\2\2\2\u00ad\u00ae\7+\2\2\u00ae(\3\2\2\2\u00af\u00b0\7}\2\2\u00b0*"+
-               
"\3\2\2\2\u00b1\u00b2\7\177\2\2\u00b2,\3\2\2\2\u00b3\u00b4\7)\2\2\u00b4"+
-               
".\3\2\2\2\u00b5\u00b6\7$\2\2\u00b6\60\3\2\2\2\u00b7\u00b8\7\u0080\2\2"+
-               
"\u00b8\62\3\2\2\2\u00b9\u00ba\7]\2\2\u00ba\64\3\2\2\2\u00bb\u00bc\7_\2"+
-               
"\2\u00bc\66\3\2\2\2\u00bd\u00be\7%\2\2\u00be8\3\2\2\2\u00bf\u00c0\7.\2"+
-               
"\2\u00c0:\3\2\2\2\u00c1\u00c2\7<\2\2\u00c2<\3\2\2\2\u00c3\u00c4\7/\2\2"+
-               
"\u00c4>\3\2\2\2\u00c5\u00c6\7\60\2\2\u00c6@\3\2\2\2\u00c7\u00c8\7a\2\2"+
-               
"\u00c8B\3\2\2\2\u00c9\u00ca\7?\2\2\u00caD\3\2\2\2\u00cb\u00cc\7-\2\2\u00cc"+
-               
"F\3\2\2\2\u00cd\u00ce\7A\2\2\u00ceH\3\2\2\2\u00cf\u00d0\7,\2\2\u00d0J"+
-               
"\3\2\2\2\u00d1\u00d2\7\61\2\2\u00d2L\3\2\2\2\u00d3\u00d4\7\'\2\2\u00d4"+
-               
"N\3\2\2\2\u00d5\u00d6\7&\2\2\u00d6P\3\2\2\2\u00d7\u00d8\7v\2\2\u00d8\u00d9"+
-               
"\7t\2\2\u00d9\u00da\7w\2\2\u00da\u00e1\7g\2\2\u00db\u00dc\7h\2\2\u00dc"+
-               
"\u00dd\7c\2\2\u00dd\u00de\7n\2\2\u00de\u00df\7u\2\2\u00df\u00e1\7g\2\2"+
-               
"\u00e0\u00d7\3\2\2\2\u00e0\u00db\3\2\2\2\u00e1R\3\2\2\2\u00e2\u00e3\7"+
-               
"p\2\2\u00e3\u00e4\7w\2\2\u00e4\u00e5\7n\2\2\u00e5\u00e6\7n\2\2\u00e6T"+
-               
"\3\2\2\2\u00e7\u00f0\7\62\2\2\u00e8\u00ec\t\4\2\2\u00e9\u00eb\t\5\2\2"+
-               
"\u00ea\u00e9\3\2\2\2\u00eb\u00ee\3\2\2\2\u00ec\u00ea\3\2\2\2\u00ec\u00ed"+
-               
"\3\2\2\2\u00ed\u00f0\3\2\2\2\u00ee\u00ec\3\2\2\2\u00ef\u00e7\3\2\2\2\u00ef"+
-               "\u00e8\3\2\2\2\u00f0V\3\2\2\2\u00f1\u00f3\5? 
\2\u00f2\u00f4\t\6\2\2\u00f3"+
+               
"\3\b\7\b\u008b\n\b\f\b\16\b\u008e\13\b\3\b\3\b\3\t\3\t\3\t\3\t\3\t\3\t"+
+               
"\3\t\3\t\3\t\5\t\u009b\n\t\3\n\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3\f\3\f"+
+               
"\3\f\3\r\3\r\3\r\3\16\3\16\3\16\3\17\3\17\3\20\3\20\3\21\3\21\3\21\3\22"+
+               
"\3\22\3\22\3\23\3\23\3\24\3\24\3\25\3\25\3\26\3\26\3\27\3\27\3\30\3\30"+
+               
"\3\31\3\31\3\32\3\32\3\33\3\33\3\34\3\34\3\35\3\35\3\36\3\36\3\37\3\37"+
+               "\3 \3 
\3!\3!\3\"\3\"\3#\3#\3$\3$\3%\3%\3&\3&\3\'\3\'\3(\3(\3)\3)\3*\3"+
+               
"*\3+\3+\3+\7+\u00eb\n+\f+\16+\u00ee\13+\5+\u00f0\n+\3,\3,\6,\u00f4\n,"+
+               
"\r,\16,\u00f5\3-\3-\5-\u00fa\n-\3-\3-\3.\3.\3.\6.\u0101\n.\r.\16.\u0102"+
+               
"\3.\3.\3.\3.\3.\7.\u010a\n.\f.\16.\u010d\13.\3/\6/\u0110\n/\r/\16/\u0111"+
+               
"\3/\3/\3\60\3\60\2\2\61\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25\f"+
+               
"\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'\25)\26+\27-\30/\31\61\32\63"+
+               "\33\65\34\67\359\36;\37= 
?!A\"C#E$G%I&K\'M(O)Q*S+U,W-Y.[/]\60_\61\3\2"+
+               
"\f\3\2))\3\2$$\3\2\63;\4\2\62;aa\3\2\62;\4\2GGgg\4\2--//\4\2C\\c|\5\2"+
+               
"\62;C\\c|\5\2\13\f\16\17\"\"\2\u0126\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2"+
+               
"\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23"+
+               
"\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2"+
+               
"\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2"+
+               
"\2\2\2+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3"+
+               
"\2\2\2\2\67\3\2\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2"+
+               
"\2\2\2C\3\2\2\2\2E\3\2\2\2\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2"+
+               
"\2O\3\2\2\2\2Q\3\2\2\2\2S\3\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2["+
+               
"\3\2\2\2\2]\3\2\2\2\2_\3\2\2\2\3a\3\2\2\2\5h\3\2\2\2\7p\3\2\2\2\tu\3\2"+
+               
"\2\2\13z\3\2\2\2\r\177\3\2\2\2\17\u0088\3\2\2\2\21\u009a\3\2\2\2\23\u009c"+
+               
"\3\2\2\2\25\u00a1\3\2\2\2\27\u00a4\3\2\2\2\31\u00a7\3\2\2\2\33\u00aa\3"+
+               
"\2\2\2\35\u00ad\3\2\2\2\37\u00af\3\2\2\2!\u00b1\3\2\2\2#\u00b4\3\2\2\2"+
+               
"%\u00b7\3\2\2\2\'\u00b9\3\2\2\2)\u00bb\3\2\2\2+\u00bd\3\2\2\2-\u00bf\3"+
+               
"\2\2\2/\u00c1\3\2\2\2\61\u00c3\3\2\2\2\63\u00c5\3\2\2\2\65\u00c7\3\2\2"+
+               
"\2\67\u00c9\3\2\2\29\u00cb\3\2\2\2;\u00cd\3\2\2\2=\u00cf\3\2\2\2?\u00d1"+
+               
"\3\2\2\2A\u00d3\3\2\2\2C\u00d5\3\2\2\2E\u00d7\3\2\2\2G\u00d9\3\2\2\2I"+
+               
"\u00db\3\2\2\2K\u00dd\3\2\2\2M\u00df\3\2\2\2O\u00e1\3\2\2\2Q\u00e3\3\2"+
+               
"\2\2S\u00e5\3\2\2\2U\u00ef\3\2\2\2W\u00f1\3\2\2\2Y\u00f7\3\2\2\2[\u0100"+
+               
"\3\2\2\2]\u010f\3\2\2\2_\u0115\3\2\2\2ab\7k\2\2bc\7p\2\2cd\7v\2\2de\7"+
+               
"g\2\2ef\7p\2\2fg\7v\2\2g\4\3\2\2\2hi\7q\2\2ij\7t\2\2jk\7f\2\2kl\7g\2\2"+
+               
"lm\7t\2\2mn\7g\2\2no\7f\2\2o\6\3\2\2\2pq\7h\2\2qr\7n\2\2rs\7q\2\2st\7"+
+               
"y\2\2t\b\3\2\2\2uv\7o\2\2vw\7g\2\2wx\7v\2\2xy\7c\2\2y\n\3\2\2\2z{\7v\2"+
+               
"\2{|\7g\2\2|}\7t\2\2}~\7o\2\2~\f\3\2\2\2\177\u0083\5\61\31\2\u0080\u0082"+
+               
"\n\2\2\2\u0081\u0080\3\2\2\2\u0082\u0085\3\2\2\2\u0083\u0081\3\2\2\2\u0083"+
+               
"\u0084\3\2\2\2\u0084\u0086\3\2\2\2\u0085\u0083\3\2\2\2\u0086\u0087\5\61"+
+               
"\31\2\u0087\16\3\2\2\2\u0088\u008c\5\63\32\2\u0089\u008b\n\3\2\2\u008a"+
+               
"\u0089\3\2\2\2\u008b\u008e\3\2\2\2\u008c\u008a\3\2\2\2\u008c\u008d\3\2"+
+               
"\2\2\u008d\u008f\3\2\2\2\u008e\u008c\3\2\2\2\u008f\u0090\5\63\32\2\u0090"+
+               
"\20\3\2\2\2\u0091\u0092\7v\2\2\u0092\u0093\7t\2\2\u0093\u0094\7w\2\2\u0094"+
+               
"\u009b\7g\2\2\u0095\u0096\7h\2\2\u0096\u0097\7c\2\2\u0097\u0098\7n\2\2"+
+               
"\u0098\u0099\7u\2\2\u0099\u009b\7g\2\2\u009a\u0091\3\2\2\2\u009a\u0095"+
+               
"\3\2\2\2\u009b\22\3\2\2\2\u009c\u009d\7p\2\2\u009d\u009e\7w\2\2\u009e"+
+               
"\u009f\7n\2\2\u009f\u00a0\7n\2\2\u00a0\24\3\2\2\2\u00a1\u00a2\7?\2\2\u00a2"+
+               
"\u00a3\7?\2\2\u00a3\26\3\2\2\2\u00a4\u00a5\7#\2\2\u00a5\u00a6\7?\2\2\u00a6"+
+               
"\30\3\2\2\2\u00a7\u00a8\7@\2\2\u00a8\u00a9\7?\2\2\u00a9\32\3\2\2\2\u00aa"+
+               
"\u00ab\7>\2\2\u00ab\u00ac\7?\2\2\u00ac\34\3\2\2\2\u00ad\u00ae\7@\2\2\u00ae"+
+               "\36\3\2\2\2\u00af\u00b0\7>\2\2\u00b0 
\3\2\2\2\u00b1\u00b2\7(\2\2\u00b2"+
+               
"\u00b3\7(\2\2\u00b3\"\3\2\2\2\u00b4\u00b5\7~\2\2\u00b5\u00b6\7~\2\2\u00b6"+
+               
"$\3\2\2\2\u00b7\u00b8\7~\2\2\u00b8&\3\2\2\2\u00b9\u00ba\7#\2\2\u00ba("+
+               
"\3\2\2\2\u00bb\u00bc\7*\2\2\u00bc*\3\2\2\2\u00bd\u00be\7+\2\2\u00be,\3"+
+               
"\2\2\2\u00bf\u00c0\7}\2\2\u00c0.\3\2\2\2\u00c1\u00c2\7\177\2\2\u00c2\60"+
+               
"\3\2\2\2\u00c3\u00c4\7)\2\2\u00c4\62\3\2\2\2\u00c5\u00c6\7$\2\2\u00c6"+
+               
"\64\3\2\2\2\u00c7\u00c8\7\u0080\2\2\u00c8\66\3\2\2\2\u00c9\u00ca\7]\2"+
+               
"\2\u00ca8\3\2\2\2\u00cb\u00cc\7_\2\2\u00cc:\3\2\2\2\u00cd\u00ce\7%\2\2"+
+               
"\u00ce<\3\2\2\2\u00cf\u00d0\7.\2\2\u00d0>\3\2\2\2\u00d1\u00d2\7<\2\2\u00d2"+
+               
"@\3\2\2\2\u00d3\u00d4\7/\2\2\u00d4B\3\2\2\2\u00d5\u00d6\7\60\2\2\u00d6"+
+               
"D\3\2\2\2\u00d7\u00d8\7a\2\2\u00d8F\3\2\2\2\u00d9\u00da\7?\2\2\u00daH"+
+               
"\3\2\2\2\u00db\u00dc\7-\2\2\u00dcJ\3\2\2\2\u00dd\u00de\7A\2\2\u00deL\3"+
+               
"\2\2\2\u00df\u00e0\7,\2\2\u00e0N\3\2\2\2\u00e1\u00e2\7\61\2\2\u00e2P\3"+
+               
"\2\2\2\u00e3\u00e4\7\'\2\2\u00e4R\3\2\2\2\u00e5\u00e6\7&\2\2\u00e6T\3"+
+               
"\2\2\2\u00e7\u00f0\7\62\2\2\u00e8\u00ec\t\4\2\2\u00e9\u00eb\t\5\2\2\u00ea"+
+               
"\u00e9\3\2\2\2\u00eb\u00ee\3\2\2\2\u00ec\u00ea\3\2\2\2\u00ec\u00ed\3\2"+
+               
"\2\2\u00ed\u00f0\3\2\2\2\u00ee\u00ec\3\2\2\2\u00ef\u00e7\3\2\2\2\u00ef"+
+               
"\u00e8\3\2\2\2\u00f0V\3\2\2\2\u00f1\u00f3\5C\"\2\u00f2\u00f4\t\6\2\2\u00f3"+
                
"\u00f2\3\2\2\2\u00f4\u00f5\3\2\2\2\u00f5\u00f3\3\2\2\2\u00f5\u00f6\3\2"+
                
"\2\2\u00f6X\3\2\2\2\u00f7\u00f9\t\7\2\2\u00f8\u00fa\t\b\2\2\u00f9\u00f8"+
                
"\3\2\2\2\u00f9\u00fa\3\2\2\2\u00fa\u00fb\3\2\2\2\u00fb\u00fc\5U+\2\u00fc"+
-               
"Z\3\2\2\2\u00fd\u0101\5A!\2\u00fe\u0101\t\t\2\2\u00ff\u0101\5O(\2\u0100"+
+               
"Z\3\2\2\2\u00fd\u0101\5E#\2\u00fe\u0101\t\t\2\2\u00ff\u0101\5S*\2\u0100"+
                
"\u00fd\3\2\2\2\u0100\u00fe\3\2\2\2\u0100\u00ff\3\2\2\2\u0101\u0102\3\2"+
                
"\2\2\u0102\u0100\3\2\2\2\u0102\u0103\3\2\2\2\u0103\u010b\3\2\2\2\u0104"+
-               
"\u010a\5O(\2\u0105\u010a\t\n\2\2\u0106\u010a\5;\36\2\u0107\u010a\5=\37"+
-               
"\2\u0108\u010a\5A!\2\u0109\u0104\3\2\2\2\u0109\u0105\3\2\2\2\u0109\u0106"+
-               
"\3\2\2\2\u0109\u0107\3\2\2\2\u0109\u0108\3\2\2\2\u010a\u010d\3\2\2\2\u010b"+
-               
"\u0109\3\2\2\2\u010b\u010c\3\2\2\2\u010c\\\3\2\2\2\u010d\u010b\3\2\2\2"+
-               
"\u010e\u0110\t\13\2\2\u010f\u010e\3\2\2\2\u0110\u0111\3\2\2\2\u0111\u010f"+
-               
"\3\2\2\2\u0111\u0112\3\2\2\2\u0112\u0113\3\2\2\2\u0113\u0114\b/\2\2\u0114"+
-               
"^\3\2\2\2\u0115\u0116\13\2\2\2\u0116`\3\2\2\2\17\2\u0083\u008c\u00e0\u00ec"+
+               "\u010a\5S*\2\u0105\u010a\t\n\2\2\u0106\u010a\5? 
\2\u0107\u010a\5A!\2\u0108"+
+               
"\u010a\5E#\2\u0109\u0104\3\2\2\2\u0109\u0105\3\2\2\2\u0109\u0106\3\2\2"+
+               
"\2\u0109\u0107\3\2\2\2\u0109\u0108\3\2\2\2\u010a\u010d\3\2\2\2\u010b\u0109"+
+               
"\3\2\2\2\u010b\u010c\3\2\2\2\u010c\\\3\2\2\2\u010d\u010b\3\2\2\2\u010e"+
+               
"\u0110\t\13\2\2\u010f\u010e\3\2\2\2\u0110\u0111\3\2\2\2\u0111\u010f\3"+
+               
"\2\2\2\u0111\u0112\3\2\2\2\u0112\u0113\3\2\2\2\u0113\u0114\b/\2\2\u0114"+
+               
"^\3\2\2\2\u0115\u0116\13\2\2\2\u0116`\3\2\2\2\17\2\u0083\u008c\u009a\u00ec"+
                "\u00ef\u00f5\u00f9\u0100\u0102\u0109\u010b\u0111\3\b\2\2";
        public static final ATN _ATN =
                new ATNDeserializer().deserialize(_serializedATN.toCharArray());
diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDslLexer.tokens
 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDslLexer.tokens
index 9a95dd2..0206736 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDslLexer.tokens
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDslLexer.tokens
@@ -5,40 +5,40 @@ T__3=4
 T__4=5
 SQSTRING=6
 DQSTRING=7
-EQ=8
-NEQ=9
-GTEQ=10
-LTEQ=11
-GT=12
-LT=13
-AND=14
-OR=15
-VERT=16
-NOT=17
-LPAR=18
-RPAR=19
-LBRACE=20
-RBRACE=21
-SQUOTE=22
-DQUOTE=23
-TILDA=24
-LBR=25
-RBR=26
-POUND=27
-COMMA=28
-COLON=29
-MINUS=30
-DOT=31
-UNDERSCORE=32
-ASSIGN=33
-PLUS=34
-QUESTION=35
-MULT=36
-DIV=37
-MOD=38
-DOLLAR=39
-BOOL=40
-NULL=41
+BOOL=8
+NULL=9
+EQ=10
+NEQ=11
+GTEQ=12
+LTEQ=13
+GT=14
+LT=15
+AND=16
+OR=17
+VERT=18
+NOT=19
+LPAR=20
+RPAR=21
+LBRACE=22
+RBRACE=23
+SQUOTE=24
+DQUOTE=25
+TILDA=26
+LBR=27
+RBR=28
+POUND=29
+COMMA=30
+COLON=31
+MINUS=32
+DOT=33
+UNDERSCORE=34
+ASSIGN=35
+PLUS=36
+QUESTION=37
+MULT=38
+DIV=39
+MOD=40
+DOLLAR=41
 INT=42
 REAL=43
 EXP=44
@@ -50,36 +50,36 @@ ErrorCharacter=47
 'flow'=3
 'meta'=4
 'term'=5
-'=='=8
-'!='=9
-'>='=10
-'<='=11
-'>'=12
-'<'=13
-'&&'=14
-'||'=15
-'|'=16
-'!'=17
-'('=18
-')'=19
-'{'=20
-'}'=21
-'\''=22
-'"'=23
-'~'=24
-'['=25
-']'=26
-'#'=27
-','=28
-':'=29
-'-'=30
-'.'=31
-'_'=32
-'='=33
-'+'=34
-'?'=35
-'*'=36
-'/'=37
-'%'=38
-'$'=39
-'null'=41
+'null'=9
+'=='=10
+'!='=11
+'>='=12
+'<='=13
+'>'=14
+'<'=15
+'&&'=16
+'||'=17
+'|'=18
+'!'=19
+'('=20
+')'=21
+'{'=22
+'}'=23
+'\''=24
+'"'=25
+'~'=26
+'['=27
+']'=28
+'#'=29
+','=30
+':'=31
+'-'=32
+'.'=33
+'_'=34
+'='=35
+'+'=36
+'?'=37
+'*'=38
+'/'=39
+'%'=40
+'$'=41
diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDslParser.java
 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDslParser.java
index d7a1358..5cba0cc 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDslParser.java
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/antlr4/NCIntentDslParser.java
@@ -17,12 +17,12 @@ public class NCIntentDslParser extends Parser {
        protected static final PredictionContextCache _sharedContextCache =
                new PredictionContextCache();
        public static final int
-               T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, SQSTRING=6, DQSTRING=7, 
EQ=8, 
-               NEQ=9, GTEQ=10, LTEQ=11, GT=12, LT=13, AND=14, OR=15, VERT=16, 
NOT=17, 
-               LPAR=18, RPAR=19, LBRACE=20, RBRACE=21, SQUOTE=22, DQUOTE=23, 
TILDA=24, 
-               LBR=25, RBR=26, POUND=27, COMMA=28, COLON=29, MINUS=30, DOT=31, 
UNDERSCORE=32, 
-               ASSIGN=33, PLUS=34, QUESTION=35, MULT=36, DIV=37, MOD=38, 
DOLLAR=39, BOOL=40, 
-               NULL=41, INT=42, REAL=43, EXP=44, ID=45, WS=46, 
ErrorCharacter=47;
+               T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, SQSTRING=6, DQSTRING=7, 
BOOL=8, 
+               NULL=9, EQ=10, NEQ=11, GTEQ=12, LTEQ=13, GT=14, LT=15, AND=16, 
OR=17, 
+               VERT=18, NOT=19, LPAR=20, RPAR=21, LBRACE=22, RBRACE=23, 
SQUOTE=24, DQUOTE=25, 
+               TILDA=26, LBR=27, RBR=28, POUND=29, COMMA=30, COLON=31, 
MINUS=32, DOT=33, 
+               UNDERSCORE=34, ASSIGN=35, PLUS=36, QUESTION=37, MULT=38, 
DIV=39, MOD=40, 
+               DOLLAR=41, INT=42, REAL=43, EXP=44, ID=45, WS=46, 
ErrorCharacter=47;
        public static final int
                RULE_intent = 0, RULE_intentId = 1, RULE_orderedDecl = 2, 
RULE_flowDecl = 3, 
                RULE_metaDecl = 4, RULE_jsonObj = 5, RULE_jsonPair = 6, 
RULE_jsonVal = 7, 
@@ -42,20 +42,20 @@ public class NCIntentDslParser extends Parser {
        private static String[] makeLiteralNames() {
                return new String[] {
                        null, "'intent'", "'ordered'", "'flow'", "'meta'", 
"'term'", null, null, 
-                       "'=='", "'!='", "'>='", "'<='", "'>'", "'<'", "'&&'", 
"'||'", "'|'", 
-                       "'!'", "'('", "')'", "'{'", "'}'", "'''", "'\"'", 
"'~'", "'['", "']'", 
-                       "'#'", "','", "':'", "'-'", "'.'", "'_'", "'='", "'+'", 
"'?'", "'*'", 
-                       "'/'", "'%'", "'$'", null, "'null'"
+                       null, "'null'", "'=='", "'!='", "'>='", "'<='", "'>'", 
"'<'", "'&&'", 
+                       "'||'", "'|'", "'!'", "'('", "')'", "'{'", "'}'", 
"'''", "'\"'", "'~'", 
+                       "'['", "']'", "'#'", "','", "':'", "'-'", "'.'", "'_'", 
"'='", "'+'", 
+                       "'?'", "'*'", "'/'", "'%'", "'$'"
                };
        }
        private static final String[] _LITERAL_NAMES = makeLiteralNames();
        private static String[] makeSymbolicNames() {
                return new String[] {
-                       null, null, null, null, null, null, "SQSTRING", 
"DQSTRING", "EQ", "NEQ", 
-                       "GTEQ", "LTEQ", "GT", "LT", "AND", "OR", "VERT", "NOT", 
"LPAR", "RPAR", 
-                       "LBRACE", "RBRACE", "SQUOTE", "DQUOTE", "TILDA", "LBR", 
"RBR", "POUND", 
-                       "COMMA", "COLON", "MINUS", "DOT", "UNDERSCORE", 
"ASSIGN", "PLUS", "QUESTION", 
-                       "MULT", "DIV", "MOD", "DOLLAR", "BOOL", "NULL", "INT", 
"REAL", "EXP", 
+                       null, null, null, null, null, null, "SQSTRING", 
"DQSTRING", "BOOL", "NULL", 
+                       "EQ", "NEQ", "GTEQ", "LTEQ", "GT", "LT", "AND", "OR", 
"VERT", "NOT", 
+                       "LPAR", "RPAR", "LBRACE", "RBRACE", "SQUOTE", "DQUOTE", 
"TILDA", "LBR", 
+                       "RBR", "POUND", "COMMA", "COLON", "MINUS", "DOT", 
"UNDERSCORE", "ASSIGN", 
+                       "PLUS", "QUESTION", "MULT", "DIV", "MOD", "DOLLAR", 
"INT", "REAL", "EXP", 
                        "ID", "WS", "ErrorCharacter"
                };
        }
@@ -1257,13 +1257,13 @@ public class NCIntentDslParser extends Parser {
                }
        }
        public static class ListExprContext extends ExprContext {
-               public ExprContext expr() {
-                       return getRuleContext(ExprContext.class,0);
+               public List<ExprContext> expr() {
+                       return getRuleContexts(ExprContext.class);
                }
-               public TerminalNode COMMA() { return 
getToken(NCIntentDslParser.COMMA, 0); }
-               public AtomContext atom() {
-                       return getRuleContext(AtomContext.class,0);
+               public ExprContext expr(int i) {
+                       return getRuleContext(ExprContext.class,i);
                }
+               public TerminalNode COMMA() { return 
getToken(NCIntentDslParser.COMMA, 0); }
                public ListExprContext(ExprContext ctx) { copyFrom(ctx); }
                @Override
                public void enterRule(ParseTreeListener listener) {
@@ -1394,7 +1394,7 @@ public class NCIntentDslParser extends Parser {
                                setState(184);
                                _errHandler.sync(this);
                                _la = _input.LA(1);
-                               if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 
((1L << SQSTRING) | (1L << DQSTRING) | (1L << NOT) | (1L << LPAR) | (1L << 
MINUS) | (1L << BOOL) | (1L << NULL) | (1L << INT) | (1L << ID))) != 0)) {
+                               if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 
((1L << SQSTRING) | (1L << DQSTRING) | (1L << BOOL) | (1L << NULL) | (1L << 
NOT) | (1L << LPAR) | (1L << MINUS) | (1L << INT) | (1L << ID))) != 0)) {
                                        {
                                        setState(183);
                                        expr(0);
@@ -1530,11 +1530,11 @@ public class NCIntentDslParser extends Parser {
                                                _localctx = new 
ListExprContext(new ExprContext(_parentctx, _parentState));
                                                
pushNewRecursionContext(_localctx, _startState, RULE_expr);
                                                setState(204);
-                                               if (!(precpred(_ctx, 2))) throw 
new FailedPredicateException(this, "precpred(_ctx, 2)");
+                                               if (!(precpred(_ctx, 1))) throw 
new FailedPredicateException(this, "precpred(_ctx, 1)");
                                                setState(205);
                                                match(COMMA);
                                                setState(206);
-                                               atom();
+                                               expr(2);
                                                }
                                                break;
                                        }
@@ -1894,7 +1894,7 @@ public class NCIntentDslParser extends Parser {
                case 6:
                        return precpred(_ctx, 4);
                case 7:
-                       return precpred(_ctx, 2);
+                       return precpred(_ctx, 1);
                }
                return true;
        }
@@ -1919,66 +1919,66 @@ public class NCIntentDslParser extends Parser {
                
"\u00da\n\22\3\22\5\22\u00dd\n\22\3\22\3\22\5\22\u00e1\n\22\3\23\3\23\3"+
                
"\24\3\24\5\24\u00e7\n\24\3\25\3\25\3\26\3\26\3\26\3\26\3\26\3\26\3\26"+
                "\2\5\24\34 \27\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 
\"$&(*\2\13\4\2"+
-               "\32\32##\4\2\23\23  \3\2&(\4\2  
$$\3\2\f\17\3\2\n\13\3\2\20\21\3\2\b\t"+
-               
"\3\2$&\2\u0100\2,\3\2\2\2\49\3\2\2\2\6=\3\2\2\2\bA\3\2\2\2\nE\3\2\2\2"+
-               
"\fV\3\2\2\2\16X\3\2\2\2\20k\3\2\2\2\22z\3\2\2\2\24|\3\2\2\2\26\u0086\3"+
-               
"\2\2\2\30\u0088\3\2\2\2\32\u009b\3\2\2\2\34\u00a0\3\2\2\2\36\u00ab\3\2"+
-               "\2\2 
\u00bd\3\2\2\2\"\u00e0\3\2\2\2$\u00e2\3\2\2\2&\u00e6\3\2\2\2(\u00e8"+
+               
"\34\34%%\4\2\25\25\"\"\3\2(*\4\2\"\"&&\3\2\16\21\3\2\f\r\3\2\22\23\3\2"+
+               
"\b\t\3\2&(\2\u0100\2,\3\2\2\2\49\3\2\2\2\6=\3\2\2\2\bA\3\2\2\2\nE\3\2"+
+               
"\2\2\fV\3\2\2\2\16X\3\2\2\2\20k\3\2\2\2\22z\3\2\2\2\24|\3\2\2\2\26\u0086"+
+               
"\3\2\2\2\30\u0088\3\2\2\2\32\u009b\3\2\2\2\34\u00a0\3\2\2\2\36\u00ab\3"+
+               "\2\2\2 
\u00bd\3\2\2\2\"\u00e0\3\2\2\2$\u00e2\3\2\2\2&\u00e6\3\2\2\2(\u00e8"+
                
"\3\2\2\2*\u00ea\3\2\2\2,.\5\4\3\2-/\5\6\4\2.-\3\2\2\2./\3\2\2\2/\61\3"+
                
"\2\2\2\60\62\5\b\5\2\61\60\3\2\2\2\61\62\3\2\2\2\62\64\3\2\2\2\63\65\5"+
                
"\n\6\2\64\63\3\2\2\2\64\65\3\2\2\2\65\66\3\2\2\2\66\67\5\24\13\2\678\7"+
-               
"\2\2\38\3\3\2\2\29:\7\3\2\2:;\7#\2\2;<\7/\2\2<\5\3\2\2\2=>\7\4\2\2>?\7"+
-               
"#\2\2?@\7*\2\2@\7\3\2\2\2AB\7\5\2\2BC\7#\2\2CD\5$\23\2D\t\3\2\2\2EF\7"+
-               
"\6\2\2FG\7#\2\2GH\5\f\7\2H\13\3\2\2\2IJ\7\26\2\2JO\5\16\b\2KL\7\36\2\2"+
-               
"LN\5\16\b\2MK\3\2\2\2NQ\3\2\2\2OM\3\2\2\2OP\3\2\2\2PR\3\2\2\2QO\3\2\2"+
-               
"\2RS\7\27\2\2SW\3\2\2\2TU\7\26\2\2UW\7\27\2\2VI\3\2\2\2VT\3\2\2\2W\r\3"+
-               
"\2\2\2XY\5$\23\2YZ\7\37\2\2Z[\5\20\t\2[\17\3\2\2\2\\l\5$\23\2]_\7 \2\2"+
-               
"^]\3\2\2\2^_\3\2\2\2_`\3\2\2\2`b\7,\2\2ac\7-\2\2ba\3\2\2\2bc\3\2\2\2c"+
-               
"e\3\2\2\2df\7.\2\2ed\3\2\2\2ef\3\2\2\2fl\3\2\2\2gl\5\f\7\2hl\5\22\n\2"+
-               
"il\7*\2\2jl\7+\2\2k\\\3\2\2\2k^\3\2\2\2kg\3\2\2\2kh\3\2\2\2ki\3\2\2\2"+
-               
"kj\3\2\2\2l\21\3\2\2\2mn\7\33\2\2ns\5\20\t\2op\7\36\2\2pr\5\20\t\2qo\3"+
-               
"\2\2\2ru\3\2\2\2sq\3\2\2\2st\3\2\2\2tv\3\2\2\2us\3\2\2\2vw\7\34\2\2w{"+
-               
"\3\2\2\2xy\7\33\2\2y{\7\34\2\2zm\3\2\2\2zx\3\2\2\2{\23\3\2\2\2|}\b\13"+
-               
"\1\2}~\5\30\r\2~\u0083\3\2\2\2\177\u0080\f\3\2\2\u0080\u0082\5\30\r\2"+
-               
"\u0081\177\3\2\2\2\u0082\u0085\3\2\2\2\u0083\u0081\3\2\2\2\u0083\u0084"+
-               
"\3\2\2\2\u0084\25\3\2\2\2\u0085\u0083\3\2\2\2\u0086\u0087\t\2\2\2\u0087"+
-               
"\27\3\2\2\2\u0088\u008a\7\7\2\2\u0089\u008b\5\36\20\2\u008a\u0089\3\2"+
-               
"\2\2\u008a\u008b\3\2\2\2\u008b\u008c\3\2\2\2\u008c\u0095\5\26\f\2\u008d"+
-               "\u008e\7\26\2\2\u008e\u008f\5 
\21\2\u008f\u0090\7\27\2\2\u0090\u0096\3"+
-               
"\2\2\2\u0091\u0092\7\'\2\2\u0092\u0093\5\32\16\2\u0093\u0094\7\'\2\2\u0094"+
-               
"\u0096\3\2\2\2\u0095\u008d\3\2\2\2\u0095\u0091\3\2\2\2\u0096\u0098\3\2"+
-               
"\2\2\u0097\u0099\5&\24\2\u0098\u0097\3\2\2\2\u0098\u0099\3\2\2\2\u0099"+
-               
"\31\3\2\2\2\u009a\u009c\5\34\17\2\u009b\u009a\3\2\2\2\u009b\u009c\3\2"+
-               
"\2\2\u009c\u009d\3\2\2\2\u009d\u009e\7\35\2\2\u009e\u009f\7/\2\2\u009f"+
-               
"\33\3\2\2\2\u00a0\u00a1\b\17\1\2\u00a1\u00a2\7/\2\2\u00a2\u00a8\3\2\2"+
-               
"\2\u00a3\u00a4\f\3\2\2\u00a4\u00a5\7!\2\2\u00a5\u00a7\7/\2\2\u00a6\u00a3"+
-               
"\3\2\2\2\u00a7\u00aa\3\2\2\2\u00a8\u00a6\3\2\2\2\u00a8\u00a9\3\2\2\2\u00a9"+
-               
"\35\3\2\2\2\u00aa\u00a8\3\2\2\2\u00ab\u00ac\7\24\2\2\u00ac\u00ad\7/\2"+
-               
"\2\u00ad\u00ae\7\25\2\2\u00ae\37\3\2\2\2\u00af\u00b0\b\21\1\2\u00b0\u00b1"+
-               "\t\3\2\2\u00b1\u00be\5 
\21\f\u00b2\u00b3\7\24\2\2\u00b3\u00b4\5 \21\2"+
-               
"\u00b4\u00b5\7\25\2\2\u00b5\u00be\3\2\2\2\u00b6\u00be\5\"\22\2\u00b7\u00b8"+
-               "\7/\2\2\u00b8\u00ba\7\24\2\2\u00b9\u00bb\5 
\21\2\u00ba\u00b9\3\2\2\2\u00ba"+
-               
"\u00bb\3\2\2\2\u00bb\u00bc\3\2\2\2\u00bc\u00be\7\25\2\2\u00bd\u00af\3"+
-               
"\2\2\2\u00bd\u00b2\3\2\2\2\u00bd\u00b6\3\2\2\2\u00bd\u00b7\3\2\2\2\u00be"+
-               
"\u00d3\3\2\2\2\u00bf\u00c0\f\n\2\2\u00c0\u00c1\t\4\2\2\u00c1\u00d2\5 "+
-               "\21\13\u00c2\u00c3\f\t\2\2\u00c3\u00c4\t\5\2\2\u00c4\u00d2\5 
\21\n\u00c5"+
-               "\u00c6\f\b\2\2\u00c6\u00c7\t\6\2\2\u00c7\u00d2\5 
\21\t\u00c8\u00c9\f\7"+
-               "\2\2\u00c9\u00ca\t\7\2\2\u00ca\u00d2\5 
\21\b\u00cb\u00cc\f\6\2\2\u00cc"+
-               "\u00cd\t\b\2\2\u00cd\u00d2\5 
\21\7\u00ce\u00cf\f\4\2\2\u00cf\u00d0\7\36"+
-               
"\2\2\u00d0\u00d2\5\"\22\2\u00d1\u00bf\3\2\2\2\u00d1\u00c2\3\2\2\2\u00d1"+
-               
"\u00c5\3\2\2\2\u00d1\u00c8\3\2\2\2\u00d1\u00cb\3\2\2\2\u00d1\u00ce\3\2"+
-               
"\2\2\u00d2\u00d5\3\2\2\2\u00d3\u00d1\3\2\2\2\u00d3\u00d4\3\2\2\2\u00d4"+
-               
"!\3\2\2\2\u00d5\u00d3\3\2\2\2\u00d6\u00e1\7+\2\2\u00d7\u00d9\7,\2\2\u00d8"+
-               
"\u00da\7-\2\2\u00d9\u00d8\3\2\2\2\u00d9\u00da\3\2\2\2\u00da\u00dc\3\2"+
-               
"\2\2\u00db\u00dd\7.\2\2\u00dc\u00db\3\2\2\2\u00dc\u00dd\3\2\2\2\u00dd"+
-               
"\u00e1\3\2\2\2\u00de\u00e1\7*\2\2\u00df\u00e1\5$\23\2\u00e0\u00d6\3\2"+
-               
"\2\2\u00e0\u00d7\3\2\2\2\u00e0\u00de\3\2\2\2\u00e0\u00df\3\2\2\2\u00e1"+
-               
"#\3\2\2\2\u00e2\u00e3\t\t\2\2\u00e3%\3\2\2\2\u00e4\u00e7\5(\25\2\u00e5"+
-               
"\u00e7\5*\26\2\u00e6\u00e4\3\2\2\2\u00e6\u00e5\3\2\2\2\u00e7\'\3\2\2\2"+
-               
"\u00e8\u00e9\t\n\2\2\u00e9)\3\2\2\2\u00ea\u00eb\7\33\2\2\u00eb\u00ec\7"+
-               
",\2\2\u00ec\u00ed\7\36\2\2\u00ed\u00ee\7,\2\2\u00ee\u00ef\7\34\2\2\u00ef"+
-               
"+\3\2\2\2\33.\61\64OV^beksz\u0083\u008a\u0095\u0098\u009b\u00a8\u00ba"+
-               "\u00bd\u00d1\u00d3\u00d9\u00dc\u00e0\u00e6";
+               
"\2\2\38\3\3\2\2\29:\7\3\2\2:;\7%\2\2;<\7/\2\2<\5\3\2\2\2=>\7\4\2\2>?\7"+
+               
"%\2\2?@\7\n\2\2@\7\3\2\2\2AB\7\5\2\2BC\7%\2\2CD\5$\23\2D\t\3\2\2\2EF\7"+
+               
"\6\2\2FG\7%\2\2GH\5\f\7\2H\13\3\2\2\2IJ\7\30\2\2JO\5\16\b\2KL\7 \2\2L"+
+               
"N\5\16\b\2MK\3\2\2\2NQ\3\2\2\2OM\3\2\2\2OP\3\2\2\2PR\3\2\2\2QO\3\2\2\2"+
+               
"RS\7\31\2\2SW\3\2\2\2TU\7\30\2\2UW\7\31\2\2VI\3\2\2\2VT\3\2\2\2W\r\3\2"+
+               
"\2\2XY\5$\23\2YZ\7!\2\2Z[\5\20\t\2[\17\3\2\2\2\\l\5$\23\2]_\7\"\2\2^]"+
+               
"\3\2\2\2^_\3\2\2\2_`\3\2\2\2`b\7,\2\2ac\7-\2\2ba\3\2\2\2bc\3\2\2\2ce\3"+
+               
"\2\2\2df\7.\2\2ed\3\2\2\2ef\3\2\2\2fl\3\2\2\2gl\5\f\7\2hl\5\22\n\2il\7"+
+               
"\n\2\2jl\7\13\2\2k\\\3\2\2\2k^\3\2\2\2kg\3\2\2\2kh\3\2\2\2ki\3\2\2\2k"+
+               "j\3\2\2\2l\21\3\2\2\2mn\7\35\2\2ns\5\20\t\2op\7 
\2\2pr\5\20\t\2qo\3\2"+
+               
"\2\2ru\3\2\2\2sq\3\2\2\2st\3\2\2\2tv\3\2\2\2us\3\2\2\2vw\7\36\2\2w{\3"+
+               
"\2\2\2xy\7\35\2\2y{\7\36\2\2zm\3\2\2\2zx\3\2\2\2{\23\3\2\2\2|}\b\13\1"+
+               
"\2}~\5\30\r\2~\u0083\3\2\2\2\177\u0080\f\3\2\2\u0080\u0082\5\30\r\2\u0081"+
+               
"\177\3\2\2\2\u0082\u0085\3\2\2\2\u0083\u0081\3\2\2\2\u0083\u0084\3\2\2"+
+               
"\2\u0084\25\3\2\2\2\u0085\u0083\3\2\2\2\u0086\u0087\t\2\2\2\u0087\27\3"+
+               
"\2\2\2\u0088\u008a\7\7\2\2\u0089\u008b\5\36\20\2\u008a\u0089\3\2\2\2\u008a"+
+               
"\u008b\3\2\2\2\u008b\u008c\3\2\2\2\u008c\u0095\5\26\f\2\u008d\u008e\7"+
+               "\30\2\2\u008e\u008f\5 
\21\2\u008f\u0090\7\31\2\2\u0090\u0096\3\2\2\2\u0091"+
+               
"\u0092\7)\2\2\u0092\u0093\5\32\16\2\u0093\u0094\7)\2\2\u0094\u0096\3\2"+
+               
"\2\2\u0095\u008d\3\2\2\2\u0095\u0091\3\2\2\2\u0096\u0098\3\2\2\2\u0097"+
+               
"\u0099\5&\24\2\u0098\u0097\3\2\2\2\u0098\u0099\3\2\2\2\u0099\31\3\2\2"+
+               
"\2\u009a\u009c\5\34\17\2\u009b\u009a\3\2\2\2\u009b\u009c\3\2\2\2\u009c"+
+               
"\u009d\3\2\2\2\u009d\u009e\7\37\2\2\u009e\u009f\7/\2\2\u009f\33\3\2\2"+
+               
"\2\u00a0\u00a1\b\17\1\2\u00a1\u00a2\7/\2\2\u00a2\u00a8\3\2\2\2\u00a3\u00a4"+
+               
"\f\3\2\2\u00a4\u00a5\7#\2\2\u00a5\u00a7\7/\2\2\u00a6\u00a3\3\2\2\2\u00a7"+
+               
"\u00aa\3\2\2\2\u00a8\u00a6\3\2\2\2\u00a8\u00a9\3\2\2\2\u00a9\35\3\2\2"+
+               
"\2\u00aa\u00a8\3\2\2\2\u00ab\u00ac\7\26\2\2\u00ac\u00ad\7/\2\2\u00ad\u00ae"+
+               
"\7\27\2\2\u00ae\37\3\2\2\2\u00af\u00b0\b\21\1\2\u00b0\u00b1\t\3\2\2\u00b1"+
+               "\u00be\5 \21\f\u00b2\u00b3\7\26\2\2\u00b3\u00b4\5 
\21\2\u00b4\u00b5\7"+
+               
"\27\2\2\u00b5\u00be\3\2\2\2\u00b6\u00be\5\"\22\2\u00b7\u00b8\7/\2\2\u00b8"+
+               "\u00ba\7\26\2\2\u00b9\u00bb\5 
\21\2\u00ba\u00b9\3\2\2\2\u00ba\u00bb\3"+
+               
"\2\2\2\u00bb\u00bc\3\2\2\2\u00bc\u00be\7\27\2\2\u00bd\u00af\3\2\2\2\u00bd"+
+               
"\u00b2\3\2\2\2\u00bd\u00b6\3\2\2\2\u00bd\u00b7\3\2\2\2\u00be\u00d3\3\2"+
+               "\2\2\u00bf\u00c0\f\n\2\2\u00c0\u00c1\t\4\2\2\u00c1\u00d2\5 
\21\13\u00c2"+
+               "\u00c3\f\t\2\2\u00c3\u00c4\t\5\2\2\u00c4\u00d2\5 
\21\n\u00c5\u00c6\f\b"+
+               "\2\2\u00c6\u00c7\t\6\2\2\u00c7\u00d2\5 
\21\t\u00c8\u00c9\f\7\2\2\u00c9"+
+               "\u00ca\t\7\2\2\u00ca\u00d2\5 
\21\b\u00cb\u00cc\f\6\2\2\u00cc\u00cd\t\b"+
+               "\2\2\u00cd\u00d2\5 \21\7\u00ce\u00cf\f\3\2\2\u00cf\u00d0\7 
\2\2\u00d0"+
+               "\u00d2\5 
\21\4\u00d1\u00bf\3\2\2\2\u00d1\u00c2\3\2\2\2\u00d1\u00c5\3\2"+
+               
"\2\2\u00d1\u00c8\3\2\2\2\u00d1\u00cb\3\2\2\2\u00d1\u00ce\3\2\2\2\u00d2"+
+               
"\u00d5\3\2\2\2\u00d3\u00d1\3\2\2\2\u00d3\u00d4\3\2\2\2\u00d4!\3\2\2\2"+
+               
"\u00d5\u00d3\3\2\2\2\u00d6\u00e1\7\13\2\2\u00d7\u00d9\7,\2\2\u00d8\u00da"+
+               
"\7-\2\2\u00d9\u00d8\3\2\2\2\u00d9\u00da\3\2\2\2\u00da\u00dc\3\2\2\2\u00db"+
+               
"\u00dd\7.\2\2\u00dc\u00db\3\2\2\2\u00dc\u00dd\3\2\2\2\u00dd\u00e1\3\2"+
+               
"\2\2\u00de\u00e1\7\n\2\2\u00df\u00e1\5$\23\2\u00e0\u00d6\3\2\2\2\u00e0"+
+               
"\u00d7\3\2\2\2\u00e0\u00de\3\2\2\2\u00e0\u00df\3\2\2\2\u00e1#\3\2\2\2"+
+               
"\u00e2\u00e3\t\t\2\2\u00e3%\3\2\2\2\u00e4\u00e7\5(\25\2\u00e5\u00e7\5"+
+               
"*\26\2\u00e6\u00e4\3\2\2\2\u00e6\u00e5\3\2\2\2\u00e7\'\3\2\2\2\u00e8\u00e9"+
+               
"\t\n\2\2\u00e9)\3\2\2\2\u00ea\u00eb\7\35\2\2\u00eb\u00ec\7,\2\2\u00ec"+
+               "\u00ed\7 
\2\2\u00ed\u00ee\7,\2\2\u00ee\u00ef\7\36\2\2\u00ef+\3\2\2\2\33"+
+               
".\61\64OV^beksz\u0083\u008a\u0095\u0098\u009b\u00a8\u00ba\u00bd\u00d1"+
+               "\u00d3\u00d9\u00dc\u00e0\u00e6";
        public static final ATN _ATN =
                new ATNDeserializer().deserialize(_serializedATN.toCharArray());
        static {
diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/ver2/NCIntentDslCompiler.scala
 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/ver2/NCIntentDslCompiler.scala
index d2fa4ee..3b06dc3 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/ver2/NCIntentDslCompiler.scala
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/ver2/NCIntentDslCompiler.scala
@@ -30,8 +30,8 @@ import scala.collection.immutable.HashMap
 import scala.collection.mutable
 import scala.collection.mutable.ArrayBuffer
 import java.lang.{Double ⇒ JDouble, IllegalArgumentException ⇒ IAE, Long ⇒ 
JLong}
-import java.util.{List ⇒ JList}
-
+import java.util
+import java.util.{List ⇒ JList, Map ⇒ JMap}
 import scala.language.implicitConversions
 
 object NCIntentDslCompiler extends LazyLogging {
@@ -73,6 +73,8 @@ object NCIntentDslCompiler extends LazyLogging {
         private def asString(v: AnyRef): String = v.asInstanceOf[String]
         private def asJList(v: AnyRef): JList[AnyRef] = 
v.asInstanceOf[JList[AnyRef]]
         private def isJList(v: AnyRef): Boolean = v.isInstanceOf[JList[AnyRef]]
+        private def asJMap(v: AnyRef): JMap[AnyRef, AnyRef] = 
v.asInstanceOf[JMap[AnyRef, AnyRef]]
+        private def isJMap(v: AnyRef): Boolean = v.isInstanceOf[JMap[AnyRef, 
AnyRef]]
 
         private def pushAny(any: AnyRef, usedTok: Boolean)(implicit stack: 
StackType): Unit =
             stack.push(NCDslTermRetVal(any, usedTok))
@@ -129,17 +131,39 @@ object NCIntentDslCompiler extends LazyLogging {
 
         override def exitListExpr(ctx: NCIntentDslParser.ListExprContext): 
Unit = {
             termCode += ((_, stack: StackType, _) ⇒ {
-                require(stack.nonEmpty)
+                require(stack.size >= 2)
+
+                implicit val s = stack
+
+                val (val1, val2, usedTok) = pop2()
+
+                if (isJList(val1) && isJList(val2)) {
+                    val lst1 = asJList(val1)
+                    val lst2 = asJList(val2)
+
+                    lst1.addAll(lst2)
 
-                val NCDslTermRetVal(lastVal, usedTok) = stack.pop()
+                    pushAny(lst1, usedTok)
 
-                // Only use Java collections.
-                val newVal: AnyRef = lastVal match {
-                    case x: JList[Object] ⇒ x.add(mkVal(ctx.atom().getText)); x
-                    case _ ⇒ java.util.Collections.singletonList(lastVal)
                 }
+                else if (isJList(val1)) {
+                    val lst = asJList(val1)
 
-                pushAny(newVal, usedTok)(stack)
+                    lst.add(val2)
+
+                    pushAny(lst, usedTok)
+                }
+                else if (isJList(val2)) {
+                    val lst = asJList(val2)
+
+                    lst.add(val1)
+
+                    pushAny(lst, usedTok)
+
+                }
+                else {
+                    pushAny(util.Arrays.asList(val1, val2), usedTok)
+                }
             })
         }
 
@@ -202,29 +226,7 @@ object NCIntentDslCompiler extends LazyLogging {
                 val (val1, val2, usedTok) = pop2()
 
                 if (ctx.PLUS() != null) {
-                    if (isJList(val1) && isJList(val2)) {
-                        val lst1 = asJList(val1)
-                        val lst2 = asJList(val2)
-
-                        lst1.addAll(lst2)
-
-                        pushAny(lst1, usedTok)
-                    }
-                    else if (isJList(val1)) {
-                        val lst1 = asJList(val1)
-
-                        lst1.add(val2)
-
-                        pushAny(lst1, usedTok)
-                    }
-                    else if (isJList(val2)) {
-                        val lst2 = asJList(val2)
-
-                        lst2.add(val1)
-
-                        pushAny(lst2, usedTok)
-                    }
-                    else if (isString(val1) && isString(val2))
+                    if (isString(val1) && isString(val2))
                         pushAny(asString(val1) + asString(val2), usedTok)
                     else if (isJLong(val1) && isJLong(val2))
                         pushLong(asJLong(val1).longValue() + 
asJLong(val2).longValue(), usedTok)
@@ -240,22 +242,7 @@ object NCIntentDslCompiler extends LazyLogging {
                 else {
                     assert(ctx.MINUS() != null)
 
-                    if (isJList(val1) && isJList(val2)) {
-                        val lst1 = asJList(val1)
-                        val lst2 = asJList(val2)
-
-                        lst1.removeAll(lst2)
-
-                        pushAny(lst1, usedTok)
-                    }
-                    else if (isJList(val1)) {
-                        val lst1 = asJList(val1)
-
-                        lst1.remove(val2)
-
-                        pushAny(lst1, usedTok)
-                    }
-                    else if (isJLong(val1) && isJLong(val2))
+                    if (isJLong(val1) && isJLong(val2))
                         pushLong(asJLong(val1).longValue() - 
asJLong(val2).longValue(), usedTok)
                     else if (isJLong(val1) && isJDouble(val2))
                         pushDouble(asJLong(val1).longValue() - 
asJDouble(val2).doubleValue(), usedTok)
@@ -271,19 +258,58 @@ object NCIntentDslCompiler extends LazyLogging {
 
         override def exitCompExpr(ctx: NCIntentDslParser.CompExprContext): 
Unit = {
             termCode += ((_, stack: StackType, _) ⇒ {
+                require(stack.size >= 2)
+
+                implicit val s = stack
+
+                val (val1, val2, usedTok) = pop2()
+
+                if (ctx.LT() != null) {
+
+                }
+                else if (ctx.GT() != null) {
+
+                }
+                else if (ctx.LTEQ() != null) {
+
+                }
+                else {
+                    assert(ctx.GT() != null)
+                }
             })
         }
 
         override def exitLogExpr(ctx: NCIntentDslParser.LogExprContext): Unit 
= {
             termCode += ((_, stack: StackType, _) ⇒ {
+                require(stack.size >= 2)
 
-            })
+                implicit val s = stack
+
+                val (val1, val2, usedTok) = pop2()
+
+                if (ctx.AND() != null) {
 
+                }
+                else {
+                    assert(ctx.OR() != null)
+                }
+            })
         }
 
         override def exitEqExpr(ctx: NCIntentDslParser.EqExprContext): Unit = {
             termCode += ((_, stack: StackType, _) ⇒ {
+                require(stack.size >= 2)
+
+                implicit val s = stack
+
+                val (val1, val2, usedTok) = pop2()
 
+                if (ctx.EQ() != null) {
+
+                }
+                else {
+                    assert(ctx.NEQ() != null)
+                }
             })
         }
 
@@ -312,7 +338,12 @@ object NCIntentDslCompiler extends LazyLogging {
 
                 fun match {
                     // Metadata access.
-                    case "meta" ⇒
+                    case "token_meta" ⇒
+                    case "model_meta" ⇒
+                    case "intent_meta" ⇒
+                    case "data_meta" ⇒
+                    case "user_meta" ⇒
+                    case "company_meta" ⇒
 
                     // Converts JSON to map.
                     case "json" ⇒
@@ -384,6 +415,9 @@ object NCIntentDslCompiler extends LazyLogging {
                     case "get" ⇒
                     case "index" ⇒
                     case "contains" ⇒
+                    case "tail" ⇒
+                    case "add" ⇒
+                    case "remove" ⇒
                     case "first" ⇒
                     case "last" ⇒
                     case "keys" ⇒
@@ -418,13 +452,13 @@ object NCIntentDslCompiler extends LazyLogging {
 
         override def exitClsNer(ctx: NCIntentDslParser.ClsNerContext): Unit = {
             if (ctx.javaFqn() != null)
-                termClsName = ctx.javaFqn().getText.strip()
+                termClsName = ctx.javaFqn().getText
 
-            termMtdName = ctx.ID().getText.strip()
+            termMtdName = ctx.ID().getText
         }
 
         override def exitTermId(ctx: NCIntentDslParser.TermIdContext): Unit = {
-            termId = ctx.ID().getText.trim
+            termId = ctx.ID().getText
         }
 
         override def exitTermEq(ctx: NCIntentDslParser.TermEqContext): Unit = {
@@ -432,17 +466,17 @@ object NCIntentDslCompiler extends LazyLogging {
         }
 
         override def exitFlowDecl(ctx: NCIntentDslParser.FlowDeclContext): 
Unit = {
-            val qRegex = ctx.qstring().getText.trim
+            val qRegex = ctx.qstring().getText
 
             if (qRegex != null && qRegex.length > 2) {
-                val regex = qRegex.substring(1, qRegex.length - 1).strip // 
Remove single quotes.
+                val regex = qRegex.substring(1, qRegex.length - 1).strip // 
Remove quotes.
 
                 flowRegex = if (regex.nonEmpty) Some(regex) else None
             }
         }
 
         override def exitIntentId(ctx: NCIntentDslParser.IntentIdContext): 
Unit = {
-            id = ctx.ID().getText.trim
+            id = ctx.ID().getText
         }
 
         override def exitMetaDecl(ctx: NCIntentDslParser.MetaDeclContext): 
Unit = {
@@ -450,38 +484,34 @@ object NCIntentDslCompiler extends LazyLogging {
         }
 
         override def exitOrderedDecl(ctx: 
NCIntentDslParser.OrderedDeclContext): Unit = {
-            ordered = ctx.BOOL().getText.strip == "true"
+            ordered = ctx.BOOL().getText == "true"
         }
 
         override def exitAtom(ctx: NCIntentDslParser.AtomContext): Unit = {
-            termCode += ((_, stack, _) ⇒ pushAny(mkVal(ctx.getText), 
false)(stack))
-        }
+            val s = ctx.getText
 
-        /**
-         *
-         * @param s
-         * @return
-         */
-        private def mkVal(s: String): Object = {
-            if (s == "null") null // Try 'null'.
-            else if (s == "true") Boolean.box(true) // Try 'boolean'.
-            else if (s == "false") Boolean.box(false) // Try 'boolean'.
-            // Only numeric or string values below...
-            else {
-                // Strip '_' from numeric values.
-                val num = s.replaceAll("_", "")
-
-                try
-                    Long.box(JLong.parseLong(num)) // Try 'long'.
-                catch {
-                    case _: NumberFormatException ⇒
-                        try
-                            Double.box(JDouble.parseDouble(num)) // Try 
'double'.
-                        catch {
-                            case _: NumberFormatException ⇒ s // String by 
default (incl. quotes).
-                        }
+            val atom =
+                if (s == "null") null // Try 'null'.
+                else if (s == "true") Boolean.box(true) // Try 'boolean'.
+                else if (s == "false") Boolean.box(false) // Try 'boolean'.
+                // Only numeric or string values below...
+                else {
+                    // Strip '_' from numeric values.
+                    val num = s.replaceAll("_", "")
+
+                    try
+                        Long.box(JLong.parseLong(num)) // Try 'long'.
+                    catch {
+                        case _: NumberFormatException ⇒
+                            try
+                                Double.box(JDouble.parseDouble(num)) // Try 
'double'.
+                            catch {
+                                case _: NumberFormatException ⇒ s // String by 
default (incl. quotes).
+                            }
+                    }
                 }
-            }
+
+            termCode += ((_, stack, _) ⇒ pushAny(atom, false)(stack))
         }
 
         /**

Reply via email to