--- /dev/null
+/*\r
+ Copyright (C) 2012 Modelon AB\r
+\r
+ This program is free software: you can redistribute it and/or modify\r
+ it under the terms of the BSD style license.\r
+\r
+ This program is distributed in the hope that it will be useful,\r
+ but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ FMILIB_License.txt file for more details.\r
+\r
+ You should have received a copy of the FMILIB_License.txt file\r
+ along with this program. If not, contact Modelon AB <http://www.modelon.com>.\r
+*/\r
+\r
+%{\r
+#include "fmi1_xml_variable_name_parser.tab.h"\r
+#define YYSTYPE YYFMI1STYPE\r
+\r
+#define LEX_VAL(ID_NAME) return ID_NAME;\r
+%}\r
+\r
+%option bison-bridge\r
+\r
+q_name "'"({q_char}|{s_escape})+"'"\r
+nondigit [_a-zA-Z]\r
+digit [0-9]\r
+q_char {nondigit}|{digit}|[^'\\]\r
+s_escape ("\\'")|("\\\"")|("\\?")|("\\\\")|("\\a")|("\\b")|("\\f")|("\\n")|("\\r")|("\\t")|("\\v")\r
+unsigned_integer {digit}+\r
+\r
+%option noyywrap\r
+%option reentrant\r
+\r
+%%\r
+\r
+"der(" {LEX_VAL(DER)}\r
+"(" {LEX_VAL('(')}\r
+")" {LEX_VAL(')')}\r
+", " {LEX_VAL(',')}\r
+"," {LEX_VAL(',')}\r
+"." {LEX_VAL('.')}\r
+"[" {LEX_VAL('[')}\r
+"]" {LEX_VAL(']')}\r
+{q_name} {LEX_VAL(Q_NAME)}\r
+{nondigit} {LEX_VAL(NONDIGIT)}\r
+{unsigned_integer} {LEX_VAL(UNSIGNED_INTEGER)}\r
+. {LEX_VAL(*yytext)}\r
+\r
+%{\r
+%}
\ No newline at end of file