2 Copyright (C) 2012 Modelon AB
\r
4 This program is free software: you can redistribute it and/or modify
\r
5 it under the terms of the BSD style license.
\r
7 This program is distributed in the hope that it will be useful,
\r
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
10 FMILIB_License.txt file for more details.
\r
12 You should have received a copy of the FMILIB_License.txt file
\r
13 along with this program. If not, contact Modelon AB <http://www.modelon.com>.
\r
16 /* http://www.gnu.org/software/bison/manual/bison.html#Decl-Summary */
\r
25 #include "fmi2_xml_variable_name_parser.tab.h"
\r
26 #include "fmi2_xml_variable_name_lex.h"
\r
28 #define MODULE "FMI2XML"
\r
29 #include <JM/jm_portability.h>
\r
31 void yyfmi2error(yyscan_t* scanner, jm_callbacks* cb, char* name, char const *msg)
\r
33 jm_log_error(cb, MODULE, "Invalid structured ScalarVariable name \"%s\": %s", name, msg);
\r
39 %expect 0 //Declare the expected number of shift-reduce conflicts
\r
43 %define api.pure full
\r
45 %parse-param {void* scanner}
\r
46 %parse-param {void* cb}
\r
47 %parse-param {char* name}
\r
48 %lex-param {yyscan_t scanner}
\r
52 %token DER UNSIGNED_INTEGER NONDIGIT Q_NAME
\r
59 | DER identifier_list ')'
\r
60 | DER identifier_list ',' UNSIGNED_INTEGER ')'
\r
65 | identifier_list '.' identifier
\r
70 | bname '[' arrayIndices ']'
\r
74 NONDIGIT nondigit_or_digit
\r
80 | UNSIGNED_INTEGER nondigit_or_digit
\r
81 | NONDIGIT nondigit_or_digit
\r
86 | arrayIndices ',' UNSIGNED_INTEGER
\r