Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0033818: Data Exchange - Regenerate flex file with latest version #59

Draft
wants to merge 3 commits into
base: IR
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions adm/cmake/occt_macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -636,8 +636,8 @@ macro (FLEX_AND_BISON_TARGET_APPLY THE_PACKAGE_NAME RELATIVE_SOURCES_DIR)
set (FLEX_BISON_TARGET_DIR "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${THE_PACKAGE_NAME}")
# choose appropriate extension for generated files: "cxx" if source file contains
# instruction to generate C++ code, "c" otherwise
set (BISON_OUTPUT_FILE_EXT "c")
set (FLEX_OUTPUT_FILE_EXT "c")
set (BISON_OUTPUT_FILE_EXT "cxx")
set (FLEX_OUTPUT_FILE_EXT "cxx")
file (STRINGS "${CURRENT_BISON_FILE}" FILE_BISON_CONTENT)
foreach (FILE_BISON_CONTENT_LINE ${FILE_BISON_CONTENT})
string (REGEX MATCH "%language \"C\\+\\+\"" CXX_BISON_LANGUAGE_FOUND ${FILE_BISON_CONTENT_LINE})
Expand Down
56 changes: 33 additions & 23 deletions src/ExpToCasExe/exptocas.tab.cxx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// A Bison parser, made by GNU Bison 3.7.4.
// A Bison parser, made by GNU Bison 3.8.2.

// Skeleton implementation for Bison LALR(1) parsers in C++

// Copyright (C) 2002-2015, 2018-2020 Free Software Foundation, Inc.
// Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc.

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
Expand All @@ -15,7 +15,7 @@
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// along with this program. If not, see <https://www.gnu.org/licenses/>.

// As a special exception, you may create a larger work that contains
// part or all of the Bison parser skeleton and distribute that work
Expand Down Expand Up @@ -176,7 +176,7 @@ static Express_HSequenceOfField *mkflist ( Express_Field *field, Express_HSequen
#else // !YYDEBUG

# define YYCDEBUG if (false) std::cerr
# define YY_SYMBOL_PRINT(Title, Symbol) YYUSE (Symbol)
# define YY_SYMBOL_PRINT(Title, Symbol) YY_USE (Symbol)
# define YY_REDUCE_PRINT(Rule) static_cast<void> (0)
# define YY_STACK_PRINT() static_cast<void> (0)

Expand Down Expand Up @@ -209,9 +209,9 @@ namespace exptocas {
parser::syntax_error::~syntax_error () YY_NOEXCEPT YY_NOTHROW
{}

/*---------------.
| symbol kinds. |
`---------------*/
/*---------.
| symbol. |
`---------*/

// basic_symbol.
template <typename Base>
Expand All @@ -229,18 +229,20 @@ namespace exptocas {
{}

template <typename Base>
parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, YY_RVREF (semantic_type) v)
parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, YY_RVREF (value_type) v)
: Base (t)
, value (YY_MOVE (v))
{}


template <typename Base>
parser::symbol_kind_type
parser::basic_symbol<Base>::type_get () const YY_NOEXCEPT
{
return this->kind ();
}


template <typename Base>
bool
parser::basic_symbol<Base>::empty () const YY_NOEXCEPT
Expand All @@ -257,28 +259,30 @@ namespace exptocas {
}

// by_kind.
parser::by_kind::by_kind ()
parser::by_kind::by_kind () YY_NOEXCEPT
: kind_ (symbol_kind::S_YYEMPTY)
{}

#if 201103L <= YY_CPLUSPLUS
parser::by_kind::by_kind (by_kind&& that)
parser::by_kind::by_kind (by_kind&& that) YY_NOEXCEPT
: kind_ (that.kind_)
{
that.clear ();
}
#endif

parser::by_kind::by_kind (const by_kind& that)
parser::by_kind::by_kind (const by_kind& that) YY_NOEXCEPT
: kind_ (that.kind_)
{}

parser::by_kind::by_kind (token_kind_type t)
parser::by_kind::by_kind (token_kind_type t) YY_NOEXCEPT
: kind_ (yytranslate_ (t))
{}



void
parser::by_kind::clear ()
parser::by_kind::clear () YY_NOEXCEPT
{
kind_ = symbol_kind::S_YYEMPTY;
}
Expand All @@ -296,13 +300,15 @@ namespace exptocas {
return kind_;
}


parser::symbol_kind_type
parser::by_kind::type_get () const YY_NOEXCEPT
{
return this->kind ();
}



// by_state.
parser::by_state::by_state () YY_NOEXCEPT
: state (empty_state)
Expand Down Expand Up @@ -385,7 +391,7 @@ namespace exptocas {
YY_SYMBOL_PRINT (yymsg, yysym);

// User destructor.
YYUSE (yysym.kind ());
YY_USE (yysym.kind ());
}

#if YYDEBUG
Expand All @@ -394,15 +400,15 @@ namespace exptocas {
parser::yy_print_ (std::ostream& yyo, const basic_symbol<Base>& yysym) const
{
std::ostream& yyoutput = yyo;
YYUSE (yyoutput);
YY_USE (yyoutput);
if (yysym.empty ())
yyo << "empty symbol";
else
{
symbol_kind_type yykind = yysym.kind ();
yyo << (yykind < YYNTOKENS ? "token" : "nterm")
<< ' ' << yysym.name () << " (";
YYUSE (yykind);
YY_USE (yykind);
yyo << ')';
}
}
Expand All @@ -428,7 +434,7 @@ namespace exptocas {
}

void
parser::yypop_ (int n)
parser::yypop_ (int n) YY_NOEXCEPT
{
yystack_.pop (n);
}
Expand Down Expand Up @@ -471,13 +477,13 @@ namespace exptocas {
}

bool
parser::yy_pact_value_is_default_ (int yyvalue)
parser::yy_pact_value_is_default_ (int yyvalue) YY_NOEXCEPT
{
return yyvalue == yypact_ninf_;
}

bool
parser::yy_table_value_is_error_ (int yyvalue)
parser::yy_table_value_is_error_ (int yyvalue) YY_NOEXCEPT
{
return yyvalue == yytable_ninf_;
}
Expand Down Expand Up @@ -1085,6 +1091,10 @@ namespace exptocas {







const short parser::yypact_ninf_ = -134;

const signed char parser::yytable_ninf_ = -1;
Expand Down Expand Up @@ -1143,10 +1153,10 @@ namespace exptocas {
-64, 31, -134, -134, -127, -134, -134, -7, 18, -131
};

const short
const unsigned char
parser::yydefgoto_[] =
{
-1, 2, 9, 10, 11, 12, 13, 14, 15, 109,
0, 2, 9, 10, 11, 12, 13, 14, 15, 109,
49, 40, 41, 42, 43, 72, 152, 47, 24, 61,
85, 86, 87, 88, 119, 121, 123, 124, 106, 166
};
Expand Down Expand Up @@ -1304,7 +1314,7 @@ namespace exptocas {
#endif // YYDEBUG

parser::symbol_kind_type
parser::yytranslate_ (int t)
parser::yytranslate_ (int t) YY_NOEXCEPT
{
// YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to
// TOKEN-NUM as returned by yylex.
Expand Down Expand Up @@ -1348,7 +1358,7 @@ namespace exptocas {
if (t <= 0)
return symbol_kind::S_YYEOF;
else if (t <= code_max)
return YY_CAST (symbol_kind_type, translate_table[t]);
return static_cast <symbol_kind_type> (translate_table[t]);
else
return symbol_kind::S_YYUNDEF;
}
Expand Down
Loading
Loading