Last sync 2016.04.01
[deliverable/titan.core.git] / compiler2 / ttcn3 / rawAST.l
index 67bb5f576908de5c657c1087bc2aa9419178ab2e..00a714172433670ee2db19055a66d3fd3849f8de 100644 (file)
@@ -1,9 +1,21 @@
 /******************************************************************************
- * 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:
+ *   Balasko, Jeno
+ *   Baranyi, Botond
+ *   Delic, Adam
+ *   Forstner, Matyas
+ *   Raduly, Csaba
+ *   Szabados, Kristof
+ *   Szabo, Janos Zoltan – initial implementation
+ *   Szalai, Gabor
+ *   Zalanyi, Balazs Andor
+ *
  ******************************************************************************/
 %option noyywrap
 %option never-interactive
@@ -680,10 +692,18 @@ void rawAST_error(const char *str)
   Location loc(infile, yylloc);
   if (*yytext) {
     // the most recently parsed token is known
-    loc.error("in variant attribute, at or before token `%s': %s", yytext, str);
+    if (warnings_for_bad_variants) {
+      loc.warning("in variant attribute, at or before token `%s': %s", yytext, str);
+    } else {
+      loc.error("in variant attribute, at or before token `%s': %s", yytext, str);
+    }
   } else {
     // the most recently parsed token is unknown
-    loc.error("in variant attribute: %s", str);
+    if (warnings_for_bad_variants) {
+      loc.warning("in variant attribute: %s", str);
+    } else {
+      loc.error("in variant attribute: %s", str);
+    }
   }
 }
 
This page took 0.025874 seconds and 5 git commands to generate.