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

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


The following commit(s) were added to refs/heads/master by this push:
     new b5912dc  WIP.
b5912dc is described below

commit b5912dc55f8856e767bdcf84ffee783a3cabe16c
Author: Aaron Radzinzski <[email protected]>
AuthorDate: Thu Apr 15 14:49:58 2021 +0300

    WIP.
---
 _layouts/documentation.html |  2 +-
 intent-matching.html        | 76 +++++++++++++--------------------------------
 2 files changed, 23 insertions(+), 55 deletions(-)

diff --git a/_layouts/documentation.html b/_layouts/documentation.html
index 9e10ce1..49b26e7 100644
--- a/_layouts/documentation.html
+++ b/_layouts/documentation.html
@@ -23,7 +23,7 @@ layout: interior
     <span><i class="fas fa-fw fa-book"></i> {{ page.active_crumb }}</span>
 </h1>
 
-<div class="three-cols-container">
+<div class="row three-cols-container">
     <div class="col-md-2 first-column">
         <ul class="side-nav">
             <li class="side-nav-title">Introduction</li>
diff --git a/intent-matching.html b/intent-matching.html
index 2ce199a..f169308 100644
--- a/intent-matching.html
+++ b/intent-matching.html
@@ -284,61 +284,29 @@ id: intent_matching
                                     }
                                 </pre>
                                 <p>
-                                    Term variable initialization expression as 
well as term's expression follow Java-like expression
-                                    grammar including precedence rules, 
brackets and logical combinators. Most of the functionality
-                                    in these expressions is provided by <a 
href="#idl_functions">IDL functions</a>.
+                                    Term variable initialization expression as 
well as term's expression follow
+                                    <em>Java-like expression grammar</em> 
including precedence rules, brackets and logical combinators, as well as
+                                    built-in <a href="#idl_functions">IDL 
functions</a> calls:
                                 </p>
-                                <p>
-                                    IDL expression is mostly defined by the 
following ANTLR4 grammar productions that closely
-                                    matches Java-like expression style:
-                                </p>
-                                <pre class="brush: java, highlight: [10, 11, 
12]">
-                                    expr
-                                        // NOTE: order of productions defines 
precedence.
-                                        : op=(MINUS | NOT) expr # unaryExpr
-                                        | LPAR expr RPAR # parExpr
-                                        | expr op=(MULT | DIV | MOD) expr # 
multDivModExpr
-                                        | expr op=(PLUS | MINUS) expr # 
plusMinusExpr
-                                        | expr op=(LTEQ | GTEQ | LT | GT) expr 
# compExpr
-                                        | expr op=(EQ | NEQ) expr # eqNeqExpr
-                                        | expr op=(AND | OR) expr # andOrExpr
-                                        | atom # atomExpr
-                                        | FUN_NAME LPAR paramList? RPAR # 
callExpr
-                                        | AT id # varRef
-                                        ;
-                                    vars
-                                        : varDecl
-                                        | vars varDecl
-                                        ;
-                                    varDecl: AT id ASSIGN expr;
-                                    paramList
-                                        : expr
-                                        | paramList COMMA expr
-                                        ;
-                                    atom
-                                        : NULL // 'null'.
-                                        | INT REAL? EXP? // Numeric (int and 
real).
-                                        | BOOL // 'true' or 'false'
-                                        | qstring // Single or double quoted 
string.
-                                        ;
+                                <pre class="brush: idl">
+                                    term={true} // Special case of 'constant' 
term.
+                                    term={
+                                        // Variable declarations.
+                                        @a = round(1.25)
+                                        @b = meta_model('my_prop')
+
+                                        // Last expression must evaluate to 
boolean.
+                                        (@a + 2) * @b > 0
+                                    }
+                                    term={
+                                        // Variable declarations.
+                                        @c = meta_tok('prop')
+                                        @lst = list(1, 2, 3)
+
+                                        // Last expression must evaluate to 
boolean.
+                                        abs(@c) > 1 && size(@lst) != 5
+                                    }
                                 </pre>
-                                <p><b>NOTES:</b></p>
-                                <ul>
-                                    <li>
-                                        Line 10 defines an expression atom - a 
terminal literal like a number,
-                                        double or single quoted string, 
<code>true</code> and
-                                        <code>false</code> boolean value as 
well as
-                                        <code>null</code> value.
-                                    </li>
-                                    <li>
-                                        Line 11 provides grammar for the IDL 
function call. <a href="#idl_functions">IDL functions</a>
-                                        provide most of the IDL functionality.
-                                    </li>
-                                    <li>
-                                        Line 12 provides grammar for variable 
reference. Note that variable must be defined
-                                        prior to referencing it.
-                                    </li>
-                                </ul>
                                 <div class="bq info">
                                     <p>
                                         <b>NOTE:</b> while term variable 
initialization expressions can have any type - the
@@ -383,7 +351,7 @@ id: intent_matching
                         </ul>
                         <p>
                             As mentioned above the quantifier is inclusive, 
i.e. the <code>[1,3]</code> means that
-                            term should appear once, two times or three times.
+                            the term should appear once, two times or three 
times.
                         </p>
                     </dd>
                     <dt>

Reply via email to