clang warning elimination2
[deliverable/titan.core.git] / core / config_process.l
index aba8584615d68e358980ea4ddab7eb61d9421cdd..3e111129da3eee89f2c08f5c5eafabf3d200f721 100644 (file)
@@ -1,9 +1,26 @@
 /******************************************************************************
- * Copyright (c) 2000-2015 Ericsson Telecom AB
+ * Copyright (c) 2000-2016 Ericsson Telecom AB
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Baji, Laszlo
+ *   Balasko, Jeno
+ *   Baranyi, Botond
+ *   Beres, Szabolcs
+ *   Delic, Adam
+ *   Forstner, Matyas
+ *   Kovacs, Ferenc
+ *   Pandi, Krisztian
+ *   Raduly, Csaba
+ *   Szabados, Kristof
+ *   Szabo, Bence Janos
+ *   Szabo, Janos Zoltan – initial implementation
+ *   Szalai, Gabor
+ *   Zalanyi, Balazs Andor
+ *
  ******************************************************************************/
 %option noyywrap
 %option never-interactive
@@ -117,13 +134,15 @@ DNSNAME {HOSTNAME}(\.{HOSTNAME})*\.?
 /* Example: fe80::c002:37ff:fe6c:0%fastethernet0/0 */
 IPV6 [0-9A-Fa-f:.]+(%[0-9A-Za-z]+)?
 
+UID [uU][+]?[0-9A-Fa-f]{1,8}
+
 TTCNSTRINGPARSING "$#&&&(#TTCNSTRINGPARSING$#&&^#% "
 TTCNSTRINGPARSING_COMPONENT "$#&&&(#TTCNSTRINGPARSING_COMPONENT$#&&^#% "
 
 %x SC_commentblock SC_cstring SC_DEFINE
 %s SC_MODULE_PARAMETERS SC_LOGGING SC_TESTPORT_PARAMETERS SC_EXECUTE SC_GROUPS
 %s SC_COMPONENTS SC_EXTERNAL_COMMANDS SC_MAIN_CONTROLLER SC_INCLUDE SC_ORDERED_INCLUDE
-%s SC_STRING2TTCN_COMPONENT SC_PROFILER
+%s SC_STRING2TTCN_COMPONENT SC_PROFILER SC_CHAR_KEYWORD
 
 %%
 
@@ -303,7 +322,7 @@ TTCNSTRINGPARSING_COMPONENT "$#&&&(#TTCNSTRINGPARSING_COMPONENT$#&&^#% "
 
 {NUMBER}       {
        yylval.int_val = new int_val_t(yytext);
-  if (YY_START == SC_MODULE_PARAMETERS) {
+  if (YY_START == SC_MODULE_PARAMETERS || YY_START == SC_CHAR_KEYWORD) {
     // return a different token for module parameters so it doesn't conflict with references
     return MPNumber;
   }
@@ -312,7 +331,7 @@ TTCNSTRINGPARSING_COMPONENT "$#&&&(#TTCNSTRINGPARSING_COMPONENT$#&&^#% "
 
 {FLOAT}                {
        yylval.float_val = atof(yytext);
-  if (YY_START == SC_MODULE_PARAMETERS) {
+  if (YY_START == SC_MODULE_PARAMETERS || YY_START == SC_CHAR_KEYWORD) {
     // return a different token for module parameters so it doesn't conflict with references
     return MPFloat;
   }
@@ -429,7 +448,7 @@ TTCNSTRINGPARSING_COMPONENT "$#&&&(#TTCNSTRINGPARSING_COMPONENT$#&&^#% "
     break;
   default:
     set_ret_val_cstr(cstring);
-    if (caller_state == SC_MODULE_PARAMETERS) {
+    if (caller_state == SC_MODULE_PARAMETERS || caller_state == SC_CHAR_KEYWORD) {
       // return a different token for module parameters so it doesn't conflict with references
       return MPCstring;
     }
@@ -486,7 +505,7 @@ TTCNSTRINGPARSING_COMPONENT "$#&&&(#TTCNSTRINGPARSING_COMPONENT$#&&^#% "
   BEGIN(caller_state);
   if (caller_state!=SC_DEFINE) {
     set_ret_val_cstr(cstring);
-    if (caller_state == SC_MODULE_PARAMETERS) {
+    if (caller_state == SC_MODULE_PARAMETERS || caller_state == SC_CHAR_KEYWORD) {
       // return a different token for module parameters so it doesn't conflict with references
       return MPCstring;
     }
@@ -497,13 +516,25 @@ TTCNSTRINGPARSING_COMPONENT "$#&&&(#TTCNSTRINGPARSING_COMPONENT$#&&^#% "
        }
 }
 
+<SC_CHAR_KEYWORD>
+{
+  {UID} {
+    yylval.str_val = mcopystrn(yytext, yyleng);
+    return UIDval;
+  }
+
+  [,] { return *yytext; }
+
+  [)] { BEGIN(SC_MODULE_PARAMETERS); return *yytext; }
+}
+
        /* Section-wide keywords */
 
 <SC_MODULE_PARAMETERS>
 {
 NULL           return NULLKeyword;
 null           return nullKeyword;
-char           return CharKeyword;
+char           { BEGIN(SC_CHAR_KEYWORD); return CharKeyword; }
 objid          return ObjIdKeyword;
 omit           return OmitKeyword;
 none           {
@@ -567,6 +598,8 @@ system              return SystemKeyword;
 
 [Ee]mergency[Ll]ogging[Mm]ask     return EmergencyLoggingMask;
 
+[Ee]mergency[Ll]ogging[Ff]or[Ff]ail[Vv]erdict  return EmergencyLoggingForFailVerdict;
+
 [Ff]ile[Mm]ask                 return FileMask;
 
 [Cc]onsole[Mm]ask              return ConsoleMask;
@@ -628,6 +661,14 @@ DEBUG_TESTPORT     {
        yylval.logseverity_val = TTCN_Logger::DEBUG_TESTPORT;
        return LoggingBit;
        }
+DEBUG_USER     {
+       yylval.logseverity_val = TTCN_Logger::DEBUG_USER;
+       return LoggingBit;
+       }
+DEBUG_FRAMEWORK        {
+       yylval.logseverity_val = TTCN_Logger::DEBUG_FRAMEWORK;
+       return LoggingBit;
+       }
 DEBUG_UNQUALIFIED              {
        yylval.logseverity_val = TTCN_Logger::DEBUG_UNQUALIFIED;
        return LoggingBit;
@@ -1274,7 +1315,7 @@ LOG_ALL   {
       "this context.");
     yylval.int_val = new int_val_t((RInt)0);
   }
-  if (YY_START == SC_MODULE_PARAMETERS) {
+  if (YY_START == SC_MODULE_PARAMETERS || YY_START == SC_CHAR_KEYWORD) {
     // return a different token for module parameters so it doesn't conflict with references
     return MPNumber;
   }
@@ -1306,7 +1347,7 @@ LOG_ALL   {
       "this context.");
     yylval.float_val = 0.0;
   }
-  if (YY_START == SC_MODULE_PARAMETERS) {
+  if (YY_START == SC_MODULE_PARAMETERS || YY_START == SC_CHAR_KEYWORD) {
     // return a different token for module parameters so it doesn't conflict with references
     return MPFloat;
   }
@@ -1359,7 +1400,7 @@ LOG_ALL   {
         "this context.");
     yylval.charstring_val.n_chars = 0;
     yylval.charstring_val.chars_ptr = memptystr();
-    if (YY_START == SC_MODULE_PARAMETERS) {
+    if (YY_START == SC_MODULE_PARAMETERS || YY_START == SC_CHAR_KEYWORD) {
       // return a different token for module parameters so it doesn't conflict with references
       return MPCstring;
     }
@@ -1379,7 +1420,7 @@ LOG_ALL   {
     yylval.charstring_val.n_chars=0;
     yylval.charstring_val.chars_ptr=memptystr();
     Free(macroname);
-    if (YY_START == SC_MODULE_PARAMETERS) {
+    if (YY_START == SC_MODULE_PARAMETERS || YY_START == SC_CHAR_KEYWORD) {
       // return a different token for module parameters so it doesn't conflict with references
       return MPCstring;
     }
@@ -1396,7 +1437,7 @@ LOG_ALL   {
     yylval.charstring_val.chars_ptr=(char*)Malloc(macrolen+1);
     memcpy(yylval.charstring_val.chars_ptr, macrovalue, macrolen+1);
     Free(macroname);
-    if (YY_START == SC_MODULE_PARAMETERS) {
+    if (YY_START == SC_MODULE_PARAMETERS || YY_START == SC_CHAR_KEYWORD) {
       // return a different token for module parameters so it doesn't conflict with references
       return MPCstring;
     }
@@ -1595,7 +1636,7 @@ LOG_ALL   {
 
 
 
-.           return yytext[0];
+.       return yytext[0];
 
 
 %%
This page took 0.026654 seconds and 5 git commands to generate.