Index: tol/btol/text_type/tol_btxtgra.h
===================================================================
--- tol/btol/text_type/tol_btxtgra.h	(revision 1053ab703f7ac5e958422682deabebdf6824c760)
+++ tol/btol/text_type/tol_btxtgra.h	(revision cdd0e842a57ebcd1ec34bdc86b70bcbbe6ce6a42)
@@ -38,5 +38,6 @@
 template class TOL_API BGraContens     < BText >;
 
-TOL_API BText EvalText (const BText& expr, const BText& defVal); 
+TOL_API BText EvalText (const BText& expr, const BText& defVal);
+TOL_API BText CheckSyntax( const BText &expr );
 
 //--------------------------------------------------------------------
Index: tol/btol/text_type/txtgra.cpp
===================================================================
--- tol/btol/text_type/txtgra.cpp	(revision 1053ab703f7ac5e958422682deabebdf6824c760)
+++ tol/btol/text_type/txtgra.cpp	(revision cdd0e842a57ebcd1ec34bdc86b70bcbbe6ce6a42)
@@ -96,4 +96,19 @@
   BGrammar::DecLevel();
   return(result);
+}
+
+//--------------------------------------------------------------------
+TOL_API BText CheckSyntax( const BText& expr ) 
+//--------------------------------------------------------------------
+{
+  BBool stat = BOut::ErrorHci();
+  BOut::PutErrorHci(BFALSE);
+  BParser* parser = new BParser;
+  Tree* tree = parser->Parsing( expr );
+  BText result = parser->MessageError();
+  delete parser;
+  BOut::PutErrorHci( stat );
+  DESTROY(tree);
+  return result;
 }
 
@@ -2598,13 +2613,6 @@
 //--------------------------------------------------------------------
 {
-    BText expr = Text(Arg(1));
-    BBool stat = BOut::ErrorHci();
-    BOut::PutErrorHci(BFALSE);
-    BParser* parser = new BParser;
-    Tree* tree = parser->Parsing(expr);
-    contens_ = parser->MessageError();
-    delete parser;
-    BOut::PutErrorHci(stat);
-    DESTROY(tree);
+  BText &expr = Text(Arg(1));
+  contens_ = CheckSyntax( expr );
 }
 
