1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

Compare commits

..

6 Commits

Author SHA1 Message Date
dpasukhi
75efe3538e 0033818: Data Exchange - Regenerate flex file with latest version
Regenerated bison and Flex files.
  Flex: 2.6.4 dev (august 2024)
  Bison: 3.7.4 release
2024-09-07 12:24:12 +00:00
dpasukhi
ed20837d8b 0033703: Data Exchange, Step Export - Transfer edge speed improvement
Move optional code close to use case to avoid extra calculation
2024-09-06 20:22:00 +00:00
reciprocal
2ab4e9e180 0033319: Coding - Static linking fails with unresolved symbols due to linking order and missing transitive dependencies
The absence of target_link_libraries calls for static libraries caused CMake to fail
in modeling the link dependencies correctly.
This fix ensures that CMake correctly exports the dependencies in OpenCASCADEConfig.cmake and
resolves downstream linking errors for projects that link against static OpenCASCADE libraries.
2024-09-05 18:15:57 +00:00
dpasukhi
d83d72acf9 0033805: Configuration - Implement GitHub Actions build scripts
Enable MSVC code analyzing to push SARIF files
2024-09-05 17:55:07 +00:00
dpasukhi
fae5678dc7 0033750: Configuration - make file configuration failed in mfc example
Updated MFC sample to build together with OCCT
2024-09-05 17:55:01 +00:00
dpasukhi
488c43ed0c 0033812: Configuration, MacOS - Debug Symbols Stripped From Dynamic Libraries
Update optimization flag to release only
2024-09-05 09:14:24 +00:00
26 changed files with 4304 additions and 2693 deletions

View File

@@ -56,14 +56,7 @@ jobs:
# ignoredPaths: ${{ github.workspace }}/dependencies;${{ github.workspace }}/test
# Upload SARIF file to GitHub Code Scanning Alerts
#- name: Upload SARIF to GitHub
# uses: github/codeql-action/upload-sarif@v3.26.5
# with:
# sarif_file: ${{ steps.run-analysis.outputs.sarif }}
# Upload SARIF file as an Artifact to download and view
- name: Upload SARIF as an Artifact
uses: actions/upload-artifact@v4.3.6
- name: Upload SARIF to GitHub
uses: github/codeql-action/upload-sarif@v3.26.5
with:
name: sarif-file
path: ${{ steps.run-analysis.outputs.sarif }}
sarif_file: ${{ steps.run-analysis.outputs.sarif }}

View File

@@ -168,7 +168,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "[Cc][Ll][Aa][Nn][Gg]")
set (CMAKE_CXX_FLAGS "-stdlib=libc++ ${CMAKE_CXX_FLAGS}")
endif()
# Optimize size of binaries
set (CMAKE_SHARED_LINKER_FLAGS "-Wl,-s ${CMAKE_SHARED_LINKER_FLAGS}")
set (CMAKE_SHARED_LINKER_FLAGS_RELEASE "-Wl,-s ${CMAKE_SHARED_LINKER_FLAGS_RELEASE}")
elseif(MINGW)
add_definitions(-D_WIN32_WINNT=0x0601)
# _WIN32_WINNT=0x0601 (use Windows 7 SDK)

View File

@@ -107,8 +107,8 @@ foreach (OCCT_PACKAGE ${USED_PACKAGES})
# 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})
@@ -479,8 +479,8 @@ if (BUILD_SHARED_LIBS OR EXECUTABLE_PROJECT)
if(IS_VTK_9XX)
string (REGEX REPLACE "vtk" "VTK::" USED_TOOLKITS_BY_CURRENT_PROJECT "${USED_TOOLKITS_BY_CURRENT_PROJECT}")
endif()
target_link_libraries (${PROJECT_NAME} ${USED_TOOLKITS_BY_CURRENT_PROJECT} ${USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT})
endif()
target_link_libraries (${PROJECT_NAME} ${USED_TOOLKITS_BY_CURRENT_PROJECT} ${USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT})
if (USE_QT)
foreach (PROJECT_LIBRARY_DEBUG ${PROJECT_LIBRARIES_DEBUG})

View File

@@ -11,7 +11,7 @@ project (ImportExport)
add_definitions (-DWINVER=0x0501 -DUNICODE -D_UNICODE)
set (CMAKE_MFC_FLAG 2)
set (ImportExport_SRC_DIR ${MFC_STANDARD_SAMPLES_DIR}/05_ImportExport/src)
set (ImportExport_SRC_DIR ${MFC_STANDARD_SAMPLES_DIR}/03_ImportExport/src)
set (ImportExport_HEADER_FILES ${ImportExport_SRC_DIR}/ColoredShapes.h
${ImportExport_SRC_DIR}/ImportExportApp.h
${ImportExport_SRC_DIR}/ImportExportDoc.h
@@ -21,7 +21,7 @@ set (ImportExport_SOURCE_FILES ${ImportExport_SRC_DIR}/ColoredShapes.cpp
${ImportExport_SRC_DIR}/ImportExportDoc.cpp
${ImportExport_SRC_DIR}/StdAfx.cpp)
set (ImportExport_RESOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/05_ImportExport/res)
set (ImportExport_RESOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/03_ImportExport/res)
set (ImportExport_RESOURCE_HEADER ${ImportExport_RESOURCE_DIR}/resource.h)
set (ImportExport_RESOURCE_FILES ${ImportExport_RESOURCE_DIR}/Toolbar.bmp
${ImportExport_RESOURCE_DIR}/ImportExport.rc)
@@ -55,7 +55,7 @@ else()
endif()
include_directories (${CMAKE_BINARY_DIR}/inc
${MFC_STANDARD_SAMPLES_DIR}/05_ImportExport
${MFC_STANDARD_SAMPLES_DIR}/03_ImportExport
${ImportExport_SRC_DIR}
${MFC_STANDARD_SAMPLES_DIR}/Common)

View File

@@ -11,7 +11,7 @@ project (HLR)
add_definitions(-DWINVER=0x0501 -DUNICODE -D_UNICODE)
set (CMAKE_MFC_FLAG 2)
set (HLR_SRC_DIR ${MFC_STANDARD_SAMPLES_DIR}/08_HLR/src)
set (HLR_SRC_DIR ${MFC_STANDARD_SAMPLES_DIR}/04_HLR/src)
set (HLR_HEADER_FILES ${HLR_SRC_DIR}/HLRApp.h
${HLR_SRC_DIR}/HLRDoc.h
${HLR_SRC_DIR}/HLRView2D.h
@@ -23,7 +23,7 @@ set (HLR_SOURCE_FILES ${HLR_SRC_DIR}/HLRApp.cpp
${HLR_SRC_DIR}/SelectionDialog.cpp
${HLR_SRC_DIR}/StdAfx.cpp )
set (HLR_RESOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/08_HLR/res)
set (HLR_RESOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/04_HLR/res)
set (HLR_RESOURCE_HEADER ${HLR_RESOURCE_DIR}/resource.h)
set (HLR_RESOURCE_FILES ${HLR_RESOURCE_DIR}/axoviewd.bmp
${HLR_RESOURCE_DIR}/axoviewf.bmp

View File

@@ -82,7 +82,6 @@ set (COMMON_HEADER_FILES ${MFC_STANDARD_COMMON_SAMPLES_DIR}/AISDialogs.h
${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_StereoConfigDlg.h
${MFC_STANDARD_COMMON_SAMPLES_DIR}/ParamsFacesPage.h
${MFC_STANDARD_COMMON_SAMPLES_DIR}/ResultDialog.h
${MFC_STANDARD_COMMON_SAMPLES_DIR}/User_Cylinder.hxx
${MFC_STANDARD_COMMON_SAMPLES_DIR}/ColoredMeshDlg.h
${MFC_STANDARD_COMMON_SAMPLES_DIR}/DimensionDlg.h
${MFC_STANDARD_COMMON_SAMPLES_DIR}/LengthParamsEdgePage.h

View File

@@ -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
@@ -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
@@ -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)
@@ -209,9 +209,9 @@ namespace exptocas {
parser::syntax_error::~syntax_error () YY_NOEXCEPT YY_NOTHROW
{}
/*---------------.
| symbol kinds. |
`---------------*/
/*---------.
| symbol. |
`---------*/
// basic_symbol.
template <typename Base>
@@ -229,11 +229,12 @@ 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
@@ -241,6 +242,7 @@ namespace exptocas {
return this->kind ();
}
template <typename Base>
bool
parser::basic_symbol<Base>::empty () const YY_NOEXCEPT
@@ -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;
}
@@ -296,6 +300,7 @@ namespace exptocas {
return kind_;
}
parser::symbol_kind_type
parser::by_kind::type_get () const YY_NOEXCEPT
{
@@ -303,6 +308,7 @@ namespace exptocas {
}
// by_state.
parser::by_state::by_state () YY_NOEXCEPT
: state (empty_state)
@@ -385,7 +391,7 @@ namespace exptocas {
YY_SYMBOL_PRINT (yymsg, yysym);
// User destructor.
YYUSE (yysym.kind ());
YY_USE (yysym.kind ());
}
#if YYDEBUG
@@ -394,7 +400,7 @@ 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
@@ -402,7 +408,7 @@ namespace exptocas {
symbol_kind_type yykind = yysym.kind ();
yyo << (yykind < YYNTOKENS ? "token" : "nterm")
<< ' ' << yysym.name () << " (";
YYUSE (yykind);
YY_USE (yykind);
yyo << ')';
}
}
@@ -428,7 +434,7 @@ namespace exptocas {
}
void
parser::yypop_ (int n)
parser::yypop_ (int n) YY_NOEXCEPT
{
yystack_.pop (n);
}
@@ -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_;
}
@@ -1087,6 +1093,10 @@ namespace exptocas {
const short parser::yypact_ninf_ = -134;
const signed char parser::yytable_ninf_ = -1;
@@ -1145,10 +1155,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
};
@@ -1306,7 +1316,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.
@@ -1350,7 +1360,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;
}

View File

@@ -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 interface 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
@@ -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
@@ -148,17 +148,23 @@ namespace exptocas {
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
# define YYUSE(E) ((void) (E))
# define YY_USE(E) ((void) (E))
#else
# define YYUSE(E) /* empty */
# define YY_USE(E) /* empty */
#endif
#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
# else
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
_Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
# endif
# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
_Pragma ("GCC diagnostic pop")
#else
@@ -219,9 +225,14 @@ namespace exptocas {
class parser
{
public:
#ifndef YYSTYPE
#ifdef YYSTYPE
# ifdef __GNUC__
# pragma GCC message "bison: do not #define YYSTYPE in C++, use %define api.value.type"
# endif
typedef YYSTYPE value_type;
#else
/// Symbol semantic values.
union semantic_type
union value_type
{
int num;
@@ -237,9 +248,10 @@ namespace exptocas {
};
#else
typedef YYSTYPE semantic_type;
#endif
/// Backward compatibility (Bison 3.8).
typedef value_type semantic_type;
/// Syntax errors thrown from user actions.
struct syntax_error : std::runtime_error
@@ -302,7 +314,7 @@ namespace exptocas {
};
/// Token kind, as returned by yylex.
typedef token::yytokentype token_kind_type;
typedef token::token_kind_type token_kind_type;
/// Backward compatibility alias (Bison 3.6).
typedef token_kind_type token_type;
@@ -412,7 +424,7 @@ namespace exptocas {
typedef Base super_type;
/// Default constructor.
basic_symbol ()
basic_symbol () YY_NOEXCEPT
: value ()
{}
@@ -431,7 +443,7 @@ namespace exptocas {
/// Constructor for symbols with semantic value.
basic_symbol (typename Base::kind_type t,
YY_RVREF (semantic_type) v);
YY_RVREF (value_type) v);
/// Destroy the symbol.
~basic_symbol ()
@@ -439,8 +451,10 @@ namespace exptocas {
clear ();
}
/// Destroy contents, and record that is empty.
void clear ()
void clear () YY_NOEXCEPT
{
Base::clear ();
}
@@ -464,7 +478,7 @@ namespace exptocas {
void move (basic_symbol& s);
/// The semantic value.
semantic_type value;
value_type value;
private:
#if YY_CPLUSPLUS < 201103L
@@ -476,25 +490,27 @@ namespace exptocas {
/// Type access provider for token (enum) based symbols.
struct by_kind
{
/// Default constructor.
by_kind ();
#if 201103L <= YY_CPLUSPLUS
/// Move constructor.
by_kind (by_kind&& that);
#endif
/// Copy constructor.
by_kind (const by_kind& that);
/// The symbol kind as needed by the constructor.
typedef token_kind_type kind_type;
/// Default constructor.
by_kind () YY_NOEXCEPT;
#if 201103L <= YY_CPLUSPLUS
/// Move constructor.
by_kind (by_kind&& that) YY_NOEXCEPT;
#endif
/// Copy constructor.
by_kind (const by_kind& that) YY_NOEXCEPT;
/// Constructor from (external) token numbers.
by_kind (kind_type t);
by_kind (kind_type t) YY_NOEXCEPT;
/// Record that this symbol is empty.
void clear ();
void clear () YY_NOEXCEPT;
/// Steal the symbol kind from \a that.
void move (by_kind& that);
@@ -586,19 +602,19 @@ namespace exptocas {
/// Whether the given \c yypact_ value indicates a defaulted state.
/// \param yyvalue the value to check
static bool yy_pact_value_is_default_ (int yyvalue);
static bool yy_pact_value_is_default_ (int yyvalue) YY_NOEXCEPT;
/// Whether the given \c yytable_ value indicates a syntax error.
/// \param yyvalue the value to check
static bool yy_table_value_is_error_ (int yyvalue);
static bool yy_table_value_is_error_ (int yyvalue) YY_NOEXCEPT;
static const short yypact_ninf_;
static const signed char yytable_ninf_;
/// Convert a scanner token kind \a t to a symbol kind.
/// In theory \a t should be a token_kind_type, but character literals
/// are valid, yet not members of the token_type enum.
static symbol_kind_type yytranslate_ (int t);
/// are valid, yet not members of the token_kind_type enum.
static symbol_kind_type yytranslate_ (int t) YY_NOEXCEPT;
#if YYDEBUG || 0
/// For a symbol, its name in clear.
@@ -620,7 +636,7 @@ namespace exptocas {
static const short yypgoto_[];
// YYDEFGOTO[NTERM-NUM].
static const short yydefgoto_[];
static const unsigned char yydefgoto_[];
// YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
// positive, shift that token. If negative, reduce the rule whose
@@ -629,14 +645,14 @@ namespace exptocas {
static const short yycheck_[];
// YYSTOS[STATE-NUM] -- The (internal number of the) accessing
// symbol of state STATE-NUM.
// YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
// state STATE-NUM.
static const signed char yystos_[];
// YYR1[YYN] -- Symbol number of symbol that rule YYN derives.
// YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM.
static const signed char yyr1_[];
// YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.
// YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM.
static const signed char yyr2_[];
@@ -735,7 +751,7 @@ namespace exptocas {
typedef typename S::size_type size_type;
typedef typename std::ptrdiff_t index_type;
stack (size_type n = 200)
stack (size_type n = 200) YY_NOEXCEPT
: seq_ (n)
{}
@@ -814,7 +830,7 @@ namespace exptocas {
class slice
{
public:
slice (const stack& stack, index_type range)
slice (const stack& stack, index_type range) YY_NOEXCEPT
: stack_ (stack)
, range_ (range)
{}
@@ -864,7 +880,7 @@ namespace exptocas {
void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym);
/// Pop \a n symbols from the stack.
void yypop_ (int n = 1);
void yypop_ (int n = 1) YY_NOEXCEPT;
/// Constants.
enum

File diff suppressed because it is too large Load Diff

View File

@@ -17,7 +17,7 @@
%option yywrap
%{
#include <ExprIntrp.tab.h>
#include <ExprIntrp.tab.hxx>
#include <ExprIntrp_yaccintrf.hxx>

View File

@@ -1,8 +1,8 @@
/* A Bison parser, made by GNU Bison 3.7.4. */
/* A Bison parser, made by GNU Bison 3.8.2. */
/* Bison implementation for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
@@ -16,7 +16,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
@@ -46,10 +46,10 @@
USER NAME SPACE" below. */
/* Identify Bison output, and Bison version. */
#define YYBISON 30704
#define YYBISON 30802
/* Bison version string. */
#define YYBISON_VERSION "3.7.4"
#define YYBISON_VERSION "3.8.2"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -151,7 +151,7 @@ extern void ExprIntrp_EndOfEqual();
# endif
# endif
#include "ExprIntrp.tab.h"
#include "ExprIntrp.tab.hxx"
/* Symbol kind. */
enum yysymbol_kind_t
{
@@ -267,6 +267,18 @@ typedef int_least16_t yytype_int16;
typedef short yytype_int16;
#endif
/* Work around bug in HP-UX 11.23, which defines these macros
incorrectly for preprocessor constants. This workaround can likely
be removed in 2023, as HPE has promised support for HP-UX 11.23
(aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
<https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
#ifdef __hpux
# undef UINT_LEAST8_MAX
# undef UINT_LEAST16_MAX
# define UINT_LEAST8_MAX 255
# define UINT_LEAST16_MAX 65535
#endif
#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
typedef __UINT_LEAST8_TYPE__ yytype_uint8;
#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
@@ -364,17 +376,23 @@ typedef int yy_state_fast_t;
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
# define YYUSE(E) ((void) (E))
# define YY_USE(E) ((void) (E))
#else
# define YYUSE(E) /* empty */
# define YY_USE(E) /* empty */
#endif
#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
# else
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
_Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
# endif
# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
_Pragma ("GCC diagnostic pop")
#else
@@ -590,7 +608,7 @@ static const yytype_int8 yytranslate[] =
};
#if YYDEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint8 yyrline[] =
{
0, 80, 80, 81, 82, 83, 84, 87, 87, 90,
@@ -637,17 +655,6 @@ yysymbol_name (yysymbol_kind_t yysymbol)
}
#endif
#ifdef YYPRINT
/* YYTOKNUM[NUM] -- (External) token number corresponding to the
(internal) symbol number NUM (which must be that of a token). */
static const yytype_int16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
275, 276, 277, 278, 279, 10
};
#endif
#define YYPACT_NINF (-51)
#define yypact_value_is_default(Yyn) \
@@ -658,8 +665,8 @@ static const yytype_int16 yytoknum[] =
#define yytable_value_is_error(Yyn) \
0
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
static const yytype_int16 yypact[] =
{
4, 62, 62, 62, 62, -51, 2, 87, 39, 58,
@@ -679,9 +686,9 @@ static const yytype_int16 yypact[] =
140, 171, 172, -51, -51, 174, 175, -51, -51
};
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
Performed when YYTABLE does not specify something else to do. Zero
means the default is an error. */
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
Performed when YYTABLE does not specify something else to do. Zero
means the default is an error. */
static const yytype_int8 yydefact[] =
{
0, 0, 0, 0, 0, 28, 27, 0, 0, 0,
@@ -701,7 +708,7 @@ static const yytype_int8 yydefact[] =
0, 0, 0, 62, 65, 0, 0, 63, 66
};
/* YYPGOTO[NTERM-NUM]. */
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] =
{
-51, -51, -51, -51, -51, -51, 0, -51, -51, -51,
@@ -711,19 +718,19 @@ static const yytype_int8 yypgoto[] =
-35, -51
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_uint8 yydefgoto[] =
{
-1, 13, 14, 36, 15, 94, 79, 17, 18, 19,
0, 13, 14, 36, 15, 94, 79, 17, 18, 19,
57, 80, 112, 20, 21, 58, 22, 37, 23, 66,
129, 42, 24, 38, 89, 114, 90, 25, 116, 117,
135, 26, 95, 126, 27, 119, 145, 28, 120, 146,
29, 30
};
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule whose
number is the opposite. If YYTABLE_NINF, syntax error. */
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule whose
number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_int16 yytable[] =
{
16, 32, 33, 34, 35, 41, 81, 1, 2, 48,
@@ -770,8 +777,8 @@ static const yytype_int16 yycheck[] =
13, 11, -1, 12, 12, 11, 11, -1, 114, 66
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
state STATE-NUM. */
static const yytype_int8 yystos[] =
{
0, 3, 4, 8, 9, 12, 13, 15, 17, 19,
@@ -791,7 +798,7 @@ static const yytype_int8 yystos[] =
32, 14, 14, 12, 12, 62, 65, 11, 11
};
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
static const yytype_int8 yyr1[] =
{
0, 26, 27, 27, 27, 27, 27, 29, 28, 31,
@@ -804,7 +811,7 @@ static const yytype_int8 yyr1[] =
67
};
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
static const yytype_int8 yyr2[] =
{
0, 2, 1, 1, 1, 1, 1, 0, 4, 0,
@@ -826,6 +833,7 @@ enum { YYENOMEM = -2 };
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
#define YYERROR goto yyerrorlab
#define YYNOMEM goto yyexhaustedlab
#define YYRECOVERING() (!!yyerrstatus)
@@ -866,10 +874,7 @@ do { \
YYFPRINTF Args; \
} while (0)
/* This macro is provided for backward compatibility. */
# ifndef YY_LOCATION_PRINT
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
# endif
# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
@@ -893,15 +898,11 @@ yy_symbol_value_print (FILE *yyo,
yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
{
FILE *yyoutput = yyo;
YYUSE (yyoutput);
YY_USE (yyoutput);
if (!yyvaluep)
return;
# ifdef YYPRINT
if (yykind < YYNTOKENS)
YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
# endif
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
YYUSE (yykind);
YY_USE (yykind);
YY_IGNORE_MAYBE_UNINITIALIZED_END
}
@@ -1015,13 +1016,13 @@ static void
yydestruct (const char *yymsg,
yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
{
YYUSE (yyvaluep);
YY_USE (yyvaluep);
if (!yymsg)
yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
YYUSE (yykind);
YY_USE (yykind);
YY_IGNORE_MAYBE_UNINITIALIZED_END
}
@@ -1084,6 +1085,7 @@ yyparse (void)
YYDPRINTF ((stderr, "Starting parse\n"));
yychar = YYEMPTY; /* Cause a token to be read. */
goto yysetstate;
@@ -1109,7 +1111,7 @@ yysetstate:
if (yyss + yystacksize - 1 <= yyssp)
#if !defined yyoverflow && !defined YYSTACK_RELOCATE
goto yyexhaustedlab;
YYNOMEM;
#else
{
/* Get the current used size of the three stacks, in elements. */
@@ -1137,7 +1139,7 @@ yysetstate:
# else /* defined YYSTACK_RELOCATE */
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
goto yyexhaustedlab;
YYNOMEM;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
yystacksize = YYMAXDEPTH;
@@ -1148,7 +1150,7 @@ yysetstate:
YY_CAST (union yyalloc *,
YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
if (! yyptr)
goto yyexhaustedlab;
YYNOMEM;
YYSTACK_RELOCATE (yyss_alloc, yyss);
YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# undef YYSTACK_RELOCATE
@@ -1170,6 +1172,7 @@ yysetstate:
}
#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
if (yystate == YYFINAL)
YYACCEPT;
@@ -1551,6 +1554,7 @@ yyerrorlab:
label yyerrorlab therefore never appears in user code. */
if (0)
YYERROR;
++yynerrs;
/* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
@@ -1611,7 +1615,7 @@ yyerrlab1:
`-------------------------------------*/
yyacceptlab:
yyresult = 0;
goto yyreturn;
goto yyreturnlab;
/*-----------------------------------.
@@ -1619,24 +1623,22 @@ yyacceptlab:
`-----------------------------------*/
yyabortlab:
yyresult = 1;
goto yyreturn;
goto yyreturnlab;
#if !defined yyoverflow
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
/*-----------------------------------------------------------.
| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
`-----------------------------------------------------------*/
yyexhaustedlab:
yyerror (YY_("memory exhausted"));
yyresult = 2;
goto yyreturn;
#endif
goto yyreturnlab;
/*-------------------------------------------------------.
| yyreturn -- parsing is finished, clean up and return. |
`-------------------------------------------------------*/
yyreturn:
/*----------------------------------------------------------.
| yyreturnlab -- parsing is finished, clean up and return. |
`----------------------------------------------------------*/
yyreturnlab:
if (yychar != YYEMPTY)
{
/* Make sure we have latest lookahead translation. See comments at

View File

@@ -1,8 +1,8 @@
/* A Bison parser, made by GNU Bison 3.7.4. */
/* A Bison parser, made by GNU Bison 3.8.2. */
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
@@ -16,7 +16,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
@@ -35,8 +35,8 @@
especially those whose name start with YY_ or yy_. They are
private implementation details that can be changed or removed. */
#ifndef YY_EXPRINTRP_EXPRINTRP_EXPRINTRP_TAB_H_INCLUDED
# define YY_EXPRINTRP_EXPRINTRP_EXPRINTRP_TAB_H_INCLUDED
#ifndef YY_EXPRINTRP_EXPRINTRP_EXPRINTRP_TAB_HXX_INCLUDED
# define YY_EXPRINTRP_EXPRINTRP_EXPRINTRP_TAB_HXX_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
@@ -90,6 +90,8 @@ typedef int YYSTYPE;
extern YYSTYPE ExprIntrplval;
int ExprIntrpparse (void);
#endif /* !YY_EXPRINTRP_EXPRINTRP_EXPRINTRP_TAB_H_INCLUDED */
#endif /* !YY_EXPRINTRP_EXPRINTRP_EXPRINTRP_TAB_HXX_INCLUDED */

View File

@@ -56,27 +56,27 @@ static TCollection_AsciiString ExprIntrp_funcdefname;
static Standard_Integer ExprIntrp_nbargs;
static Standard_Integer ExprIntrp_nbdiff;
extern "C" void ExprIntrp_StartFunction()
void ExprIntrp_StartFunction()
{
const TCollection_AsciiString& name = ExprIntrp_GetResult();
ExprIntrp_Recept.PushName(name);
ExprIntrp_nbargs = 0;
}
extern "C" void ExprIntrp_StartDerivate()
void ExprIntrp_StartDerivate()
{
const TCollection_AsciiString& name = ExprIntrp_GetResult();
ExprIntrp_Recept.PushName(name);
}
extern "C" void ExprIntrp_EndDerivate()
void ExprIntrp_EndDerivate()
{
int degree;
degree = ExprIntrp_GetDegree();
ExprIntrp_Recept.PushValue(degree);
}
extern "C" void ExprIntrp_Derivation()
void ExprIntrp_Derivation()
{
ExprIntrp_Recept.PushValue(1);
const TCollection_AsciiString& thename = ExprIntrp_GetResult();
@@ -90,14 +90,14 @@ extern "C" void ExprIntrp_Derivation()
ExprIntrp_Recept.Push(namexp);
}
extern "C" void ExprIntrp_DerivationValue()
void ExprIntrp_DerivationValue()
{
const TCollection_AsciiString& aStr = ExprIntrp_GetResult();
ExprIntrp_Recept.PopValue();
ExprIntrp_Recept.PushValue(aStr.IntegerValue());
}
extern "C" void ExprIntrp_EndDerivation()
void ExprIntrp_EndDerivation()
{
Standard_Integer degree = ExprIntrp_Recept.PopValue();
Handle(Expr_NamedUnknown) var = Handle(Expr_NamedUnknown)::DownCast(ExprIntrp_Recept.Pop());
@@ -106,13 +106,13 @@ extern "C" void ExprIntrp_EndDerivation()
ExprIntrp_Recept.Push(exp);
}
extern "C" void ExprIntrp_StartDifferential()
void ExprIntrp_StartDifferential()
{
ExprIntrp_StartDerivate();
ExprIntrp_nbdiff = 0;
}
extern "C" void ExprIntrp_DiffDegreeVar()
void ExprIntrp_DiffDegreeVar()
{
const TCollection_AsciiString& aStr = ExprIntrp_GetResult();
const char* s = aStr.ToCString();
@@ -125,20 +125,20 @@ extern "C" void ExprIntrp_DiffDegreeVar()
ExprIntrp_nbdiff++;
}
extern "C" void ExprIntrp_DiffVar()
void ExprIntrp_DiffVar()
{
ExprIntrp_Recept.PushValue(1);
ExprIntrp_DiffDegreeVar();
}
extern "C" void ExprIntrp_DiffDegree()
void ExprIntrp_DiffDegree()
{
const TCollection_AsciiString& aStr = ExprIntrp_GetResult();
Standard_Integer deg = aStr.IntegerValue();
ExprIntrp_Recept.PushValue(deg);
}
extern "C" void ExprIntrp_VerDiffDegree()
void ExprIntrp_VerDiffDegree()
{
const TCollection_AsciiString& aStr = ExprIntrp_GetResult();
Standard_Integer deg = aStr.IntegerValue();
@@ -149,7 +149,7 @@ extern "C" void ExprIntrp_VerDiffDegree()
ExprIntrp_Recept.PushValue(deg);
}
extern "C" void ExprIntrp_EndDifferential()
void ExprIntrp_EndDifferential()
{
TCollection_AsciiString name = ExprIntrp_Recept.PopName();
Handle(Expr_GeneralFunction) thefunc = ExprIntrp_Recept.GetFunction(name);
@@ -172,7 +172,7 @@ extern "C" void ExprIntrp_EndDifferential()
ExprIntrp_Recept.PushFunction(thefunc);
}
extern "C" void ExprIntrp_EndDiffFunction()
void ExprIntrp_EndDiffFunction()
{
Handle(Expr_GeneralFunction) thefunc = ExprIntrp_Recept.PopFunction();
if (thefunc.IsNull()) {
@@ -276,7 +276,7 @@ static Handle(Expr_GeneralExpression) ExprIntrp_StandardFunction(const TCollecti
}
extern "C" void ExprIntrp_EndDerFunction()
void ExprIntrp_EndDerFunction()
{
TCollection_AsciiString name = ExprIntrp_Recept.PopName();
Handle(Expr_GeneralExpression) op = ExprIntrp_Recept.Pop();
@@ -323,7 +323,7 @@ extern "C" void ExprIntrp_EndDerFunction()
}
}
extern "C" void ExprIntrp_EndFunction()
void ExprIntrp_EndFunction()
{
TCollection_AsciiString name = ExprIntrp_Recept.PopName();
Handle(Expr_GeneralExpression) op = ExprIntrp_Recept.Pop();
@@ -370,17 +370,17 @@ extern "C" void ExprIntrp_EndFunction()
}
}
extern "C" void ExprIntrp_NextFuncArg()
void ExprIntrp_NextFuncArg()
{
ExprIntrp_nbargs++;
}
extern "C" void ExprIntrp_EndFuncArg()
void ExprIntrp_EndFuncArg()
{
ExprIntrp_nbargs++;
}
extern "C" void ExprIntrp_SumOperator()
void ExprIntrp_SumOperator()
{
Handle(Expr_GeneralExpression) op2 = ExprIntrp_Recept.Pop();
Handle(Expr_GeneralExpression) op1 = ExprIntrp_Recept.Pop();
@@ -389,7 +389,7 @@ extern "C" void ExprIntrp_SumOperator()
ExprIntrp_Recept.Push(res);
}
extern "C" void ExprIntrp_MinusOperator()
void ExprIntrp_MinusOperator()
{
Handle(Expr_GeneralExpression) op2 = ExprIntrp_Recept.Pop();
Handle(Expr_GeneralExpression) op1 = ExprIntrp_Recept.Pop();
@@ -397,7 +397,7 @@ extern "C" void ExprIntrp_MinusOperator()
ExprIntrp_Recept.Push(res->ShallowSimplified());
}
extern "C" void ExprIntrp_DivideOperator()
void ExprIntrp_DivideOperator()
{
Handle(Expr_GeneralExpression) op2 = ExprIntrp_Recept.Pop();
Handle(Expr_GeneralExpression) op1 = ExprIntrp_Recept.Pop();
@@ -405,7 +405,7 @@ extern "C" void ExprIntrp_DivideOperator()
ExprIntrp_Recept.Push(res->ShallowSimplified());
}
extern "C" void ExprIntrp_ExpOperator()
void ExprIntrp_ExpOperator()
{
Handle(Expr_GeneralExpression) op2 = ExprIntrp_Recept.Pop();
Handle(Expr_GeneralExpression) op1 = ExprIntrp_Recept.Pop();
@@ -413,7 +413,7 @@ extern "C" void ExprIntrp_ExpOperator()
ExprIntrp_Recept.Push(res->ShallowSimplified());
}
extern "C" void ExprIntrp_ProductOperator()
void ExprIntrp_ProductOperator()
{
Handle(Expr_GeneralExpression) op2 = ExprIntrp_Recept.Pop();
Handle(Expr_GeneralExpression) op1 = ExprIntrp_Recept.Pop();
@@ -421,20 +421,20 @@ extern "C" void ExprIntrp_ProductOperator()
ExprIntrp_Recept.Push(res->ShallowSimplified());
}
extern "C" void ExprIntrp_UnaryMinusOperator()
void ExprIntrp_UnaryMinusOperator()
{
Handle(Expr_GeneralExpression) op = ExprIntrp_Recept.Pop();
Handle(Expr_UnaryMinus) res = new Expr_UnaryMinus(op);
ExprIntrp_Recept.Push(res->ShallowSimplified());
}
extern "C" void ExprIntrp_UnaryPlusOperator()
void ExprIntrp_UnaryPlusOperator()
{
Handle(Expr_GeneralExpression) op = ExprIntrp_Recept.Pop();
ExprIntrp_Recept.Push(op);
}
extern "C" void ExprIntrp_VariableIdentifier()
void ExprIntrp_VariableIdentifier()
{
const TCollection_AsciiString& thename = ExprIntrp_GetResult();
Handle(Expr_NamedExpression) nameexp = ExprIntrp_Recept.GetNamed(thename);
@@ -445,7 +445,7 @@ extern "C" void ExprIntrp_VariableIdentifier()
ExprIntrp_Recept.Push(nameexp);
}
extern "C" void ExprIntrp_NumValue()
void ExprIntrp_NumValue()
{
const TCollection_AsciiString& aStr = ExprIntrp_GetResult();
Standard_Real value = aStr.RealValue();
@@ -453,12 +453,12 @@ extern "C" void ExprIntrp_NumValue()
ExprIntrp_Recept.Push(nval);
}
extern "C" void ExprIntrp_AssignVariable()
void ExprIntrp_AssignVariable()
{
ExprIntrp_assname = ExprIntrp_GetResult();
}
extern "C" void ExprIntrp_Deassign()
void ExprIntrp_Deassign()
{
const TCollection_AsciiString& thename = ExprIntrp_GetResult();
Handle(Expr_NamedExpression) nameexp = ExprIntrp_Recept.GetNamed(thename);
@@ -472,25 +472,25 @@ extern "C" void ExprIntrp_Deassign()
var->Deassign();
}
extern "C" void ExprIntrp_DefineFunction()
void ExprIntrp_DefineFunction()
{
ExprIntrp_funcdefname = ExprIntrp_Recept.PopName();
ExprIntrp_Recept.PushValue(ExprIntrp_nbargs);
}
extern "C" void ExprIntrp_close()
void ExprIntrp_close()
{
ExprIntrp_stop_string();
}
extern "C" void ExprIntrperror(char* msg)
void ExprIntrperror(const char* msg)
{
ExprIntrp_close();
throw ExprIntrp_SyntaxError(msg);
}
extern "C" void ExprIntrp_EndOfEqual()
void ExprIntrp_EndOfEqual()
{
Handle(Expr_GeneralExpression) memb2 = ExprIntrp_Recept.Pop();
Handle(Expr_GeneralExpression) memb1 = ExprIntrp_Recept.Pop();
@@ -498,7 +498,7 @@ extern "C" void ExprIntrp_EndOfEqual()
ExprIntrp_Recept.PushRelation(res);
}
extern "C" void ExprIntrp_EndOfRelation()
void ExprIntrp_EndOfRelation()
{
Handle(Expr_SystemRelation) sys;
Handle(Expr_GeneralRelation) currel;
@@ -524,7 +524,7 @@ extern "C" void ExprIntrp_EndOfRelation()
}
}
extern "C" void ExprIntrp_EndOfAssign()
void ExprIntrp_EndOfAssign()
{
Handle(Expr_NamedExpression) namexp = ExprIntrp_Recept.GetNamed(ExprIntrp_assname);
Handle(Expr_NamedUnknown) namu;
@@ -542,7 +542,7 @@ extern "C" void ExprIntrp_EndOfAssign()
namu->Assign(ExprIntrp_Recept.Pop());
}
extern "C" void ExprIntrp_EndOfFuncDef()
void ExprIntrp_EndOfFuncDef()
{
Handle(Expr_GeneralExpression) theexp = ExprIntrp_Recept.Pop();
Standard_Integer nbargs = ExprIntrp_Recept.PopValue();
@@ -571,13 +571,13 @@ extern "C" void ExprIntrp_EndOfFuncDef()
ExprIntrp_Recept.Use(thefunc);
}
extern "C" void ExprIntrp_ConstantIdentifier()
void ExprIntrp_ConstantIdentifier()
{
const TCollection_AsciiString& thename = ExprIntrp_GetResult();
ExprIntrp_Recept.PushName(thename);
}
extern "C" void ExprIntrp_ConstantDefinition()
void ExprIntrp_ConstantDefinition()
{
TCollection_AsciiString name = ExprIntrp_Recept.PopName();
const TCollection_AsciiString& aStr = ExprIntrp_GetResult();
@@ -589,7 +589,7 @@ extern "C" void ExprIntrp_ConstantDefinition()
}
extern "C" void ExprIntrp_Sumator()
void ExprIntrp_Sumator()
{
Handle(Expr_NumericValue) number = Handle(Expr_NumericValue)::DownCast(ExprIntrp_Recept.Pop());
Standard_Integer nb = (Standard_Integer) number->GetValue();
@@ -617,7 +617,7 @@ extern "C" void ExprIntrp_Sumator()
ExprIntrp_Recept.Push(res->ShallowSimplified());
}
extern "C" void ExprIntrp_Productor()
void ExprIntrp_Productor()
{
Handle(Expr_NumericValue) number = Handle(Expr_NumericValue)::DownCast(ExprIntrp_Recept.Pop());
Standard_Integer nb = (Standard_Integer) number->GetValue();

View File

@@ -17,12 +17,8 @@
#ifndef ExprIntrp_yaccintrf_HeaderFile
#define ExprIntrp_yaccintrf_HeaderFile
#ifdef __cplusplus
extern "C" {
#endif
int ExprIntrpparse();
void ExprIntrperror(char* msg);
void ExprIntrperror(const char* msg);
void ExprIntrp_start_string(const char* str);
void ExprIntrp_stop_string();
@@ -32,17 +28,9 @@ void ExprIntrp_SetDegree();
int ExprIntrplex(void);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
#include <TCollection_AsciiString.hxx>
const TCollection_AsciiString& ExprIntrp_GetResult ();
int ExprIntrp_GetDegree();
#endif
#endif

View File

@@ -23,16 +23,16 @@ static int ExprIntrp_degree;
#ifndef _WIN32
extern char* ExprIntrptext;
#else
extern "C" char* ExprIntrptext;
char* ExprIntrptext;
#endif // _WIN32
extern "C" void ExprIntrp_SetResult()
void ExprIntrp_SetResult()
{
ExprIntrp_curres = ExprIntrptext;
}
extern "C" void ExprIntrp_SetDegree()
void ExprIntrp_SetDegree()
{
ExprIntrp_degree = (int)strlen(ExprIntrptext);
}

View File

@@ -1,8 +1,8 @@
ExprIntrp.cxx
ExprIntrp.hxx
ExprIntrp.lex
ExprIntrp.tab.c
ExprIntrp.tab.h
ExprIntrp.tab.cxx
ExprIntrp.tab.hxx
ExprIntrp.yacc
ExprIntrp_Analysis.cxx
ExprIntrp_Analysis.hxx
@@ -27,4 +27,4 @@ ExprIntrp_yaccanal.hxx
ExprIntrp_yaccintrf.cxx
ExprIntrp_yaccintrf.hxx
ExprIntrp_yacclex.cxx
lex.ExprIntrp.c
lex.ExprIntrp.cxx

View File

@@ -95,14 +95,14 @@ public:
int lineno() const { return yylineno; }
int debug() const { return yy_flex_debug; }
void set_debug( int flag ) { yy_flex_debug = flag; }
int debug() const { return yyflexdebug; }
void set_debug( int flag ) { yyflexdebug = flag; }
protected:
char* yytext;
int yyleng;
int yylineno; // only maintained if you use %option yylineno
int yy_flex_debug; // only has effect with -d or "%option debug"
int yyflexdebug; // only has effect with -d or "%option debug"
};
}
@@ -139,6 +139,7 @@ public:
void yypush_buffer_state( yy_buffer_state* new_buffer );
void yypop_buffer_state();
virtual int yyread(char *buf, size_t);
virtual int yylex();
virtual void switch_streams( std::istream& new_in, std::ostream& new_out );
virtual void switch_streams( std::istream* new_in = 0, std::ostream* new_out = 0 );
@@ -148,8 +149,8 @@ protected:
virtual int LexerInput( char* buf, int max_size );
virtual void LexerOutput( const char* buf, int size );
virtual void LexerError( const char* msg );
void yyunput( int c, char* buf_ptr );
void yyunput_r( int c, char* buf_ptr );
int yyinput();
void yy_load_buffer_state();
@@ -201,6 +202,7 @@ protected:
yy_state_type* yy_state_buf;
yy_state_type* yy_state_ptr;
size_t yy_state_buf_max;
char* yy_full_match;
int* yy_full_state;

View File

@@ -562,40 +562,54 @@ void StdSelect_BRepSelectionTool::GetEdgeSensitive (const TopoDS_Shape& theShape
}
//=======================================================================
//function : getCylinderCircles
//function : getCylinderHeight
//purpose :
//=======================================================================
static NCollection_Array1<gp_Circ> getCylinderCircles (const TopoDS_Face& theHollowCylinder, Standard_Size& theNumCircles)
static Standard_Real getCylinderHeight (const Handle(Poly_Triangulation)& theTriangulation,
const TopLoc_Location& theLoc)
{
NCollection_Array1<gp_Circ> aCircles (1, 2);
theNumCircles = 0;
Standard_Integer aLinesNb = 0;
Bnd_Box aBox;
gp_Trsf aScaleTrsf;
aScaleTrsf.SetScaleFactor (theLoc.Transformation().ScaleFactor());
theTriangulation->MinMax (aBox, aScaleTrsf);
return aBox.CornerMax().Z() - aBox.CornerMin().Z();
}
//=======================================================================
//function : isCylinderOrCone
//purpose :
//=======================================================================
static Standard_Boolean isCylinderOrCone (const TopoDS_Face& theHollowCylinder, const gp_Pnt& theLocation, gp_Dir& theDirection)
{
Standard_Integer aCirclesNb = 0;
Standard_Boolean isCylinder = Standard_False;
gp_Pnt aPos;
TopExp_Explorer anEdgeExp;
for (anEdgeExp.Init (theHollowCylinder, TopAbs_EDGE); anEdgeExp.More(); anEdgeExp.Next())
{
const TopoDS_Edge& anEdge = TopoDS::Edge (anEdgeExp.Current());
BRepAdaptor_Curve anAdaptor (anEdge);
aLinesNb++;
if (anAdaptor.GetType() == GeomAbs_Circle
&& BRep_Tool::IsClosed (anEdge))
{
theNumCircles++;
aCircles[theNumCircles] = anAdaptor.Circle();
}
else if (anAdaptor.GetType() != GeomAbs_Line || aLinesNb > 4)
{
theNumCircles = 0;
return NCollection_Array1<gp_Circ>();
}
if (theNumCircles == 2)
{
break;
aCirclesNb++;
isCylinder = Standard_True;
if (aCirclesNb == 2)
{
// Reverse the direction of the cylinder, relevant if the cylinder was created as a prism
if (aPos.IsEqual (theLocation, Precision::Confusion()))
{
theDirection.Reverse();
}
return Standard_True;
}
aPos = anAdaptor.Circle().Location().XYZ();
}
}
return aCircles;
return isCylinder;
}
//=======================================================================
@@ -644,33 +658,29 @@ Standard_Boolean StdSelect_BRepSelectionTool::GetSensitiveForFace (const TopoDS_
}
else if (Handle(Geom_ConicalSurface) aGeomCone = Handle(Geom_ConicalSurface)::DownCast (aSurf))
{
Standard_Size aNumCircles;
NCollection_Array1<gp_Circ> aCircles = getCylinderCircles (theFace, aNumCircles);
if (aNumCircles > 0 && aNumCircles < 3)
gp_Dir aDummyDir;
if (isCylinderOrCone (theFace, gp_Pnt(), aDummyDir))
{
const gp_Cone aCone = BRepAdaptor_Surface (theFace).Cone();
const Standard_Real aRad1 = aCone.RefRadius();
const Standard_Real aHeight = getCylinderHeight (aTriangulation, aLoc);
gp_Trsf aTrsf;
Standard_Real aRad1;
aTrsf.SetTransformation (aCone.Position(), gp::XOY());
Standard_Real aRad2;
Standard_Real aHeight;
if (aNumCircles == 1)
if (aRad1 == 0.0)
{
aRad1 = 0.0;
aRad2 = aCircles.First().Radius();
aHeight = aRad2 * Tan (aCone.SemiAngle());
aTrsf.SetTransformation (aCone.Position(), gp::XOY());
aRad2 = Tan (aCone.SemiAngle()) * aHeight;
}
else
{
aRad1 = aCircles.First().Radius();
aRad2 = aCircles.Last().Radius();
aHeight = aCircles.First().Location().Distance (aCircles.Last().Location());
const gp_Pnt aPos = aCircles.First().Location();
const gp_Dir aDirection (aCircles.Last().Location().XYZ() - aPos.XYZ());
aTrsf.SetTransformation (gp_Ax3(aPos, aDirection), gp::XOY());
const Standard_Real aTriangleHeight = (aCone.SemiAngle() > 0.0)
? aRad1 / Tan (aCone.SemiAngle())
: aRad1 / Tan (Abs (aCone.SemiAngle())) - aHeight;
aRad2 = (aCone.SemiAngle() > 0.0)
? aRad1 * (aTriangleHeight + aHeight) / aTriangleHeight
: aRad1 * aTriangleHeight / (aTriangleHeight + aHeight);
}
Handle(Select3D_SensitiveCylinder) aSensSCyl = new Select3D_SensitiveCylinder (theOwner, aRad1, aRad2, aHeight, aTrsf, true);
@@ -680,19 +690,18 @@ Standard_Boolean StdSelect_BRepSelectionTool::GetSensitiveForFace (const TopoDS_
}
else if (Handle(Geom_CylindricalSurface) aGeomCyl = Handle(Geom_CylindricalSurface)::DownCast (aSurf))
{
Standard_Size aNumCircles;
NCollection_Array1<gp_Circ> aCircles = getCylinderCircles (theFace, aNumCircles);
if (aNumCircles == 2)
{
const gp_Cylinder aCyl = BRepAdaptor_Surface (theFace).Cylinder();
const gp_Cylinder aCyl = BRepAdaptor_Surface (theFace).Cylinder();
gp_Ax3 aPos = aCyl.Position();
gp_Dir aDirection = aPos.Direction();
if (isCylinderOrCone (theFace, aPos.Location(), aDirection))
{
const Standard_Real aRad = aCyl.Radius();
const gp_Pnt aPos = aCircles.First().Location();
const gp_Dir aDirection (aCircles.Last().Location().XYZ() - aPos.XYZ());
const Standard_Real aHeight = aPos.Distance (aCircles.Last().Location());
const Standard_Real aHeight = getCylinderHeight (aTriangulation, aLoc);
gp_Trsf aTrsf;
aTrsf.SetTransformation (gp_Ax3 (aPos, aDirection), gp::XOY());
aPos.SetDirection (aDirection);
aTrsf.SetTransformation (aPos, gp::XOY());
Handle(Select3D_SensitiveCylinder) aSensSCyl = new Select3D_SensitiveCylinder (theOwner, aRad, aRad, aHeight, aTrsf, true);
theSensitiveList.Append (aSensSCyl);

File diff suppressed because it is too large Load Diff

View File

@@ -27,12 +27,15 @@
case-insensitive enable case insensitive parsing(any ?i: and other case setting will be ignored)
*/
%option c++
%option 8bit warn nodefault
%option 8bit
%option warn
%option noyywrap
%option noinput
%option yyclass="step::scanner"
%option noyyalloc noyyfree noyyrealloc
%option case-insensitive
%option nounistd
%option never-interactive
%top{
// This file is part of Open CASCADE Technology software library.

View File

@@ -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
@@ -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
@@ -117,7 +117,7 @@ void StepFile_Interrupt (Standard_CString theErrorMessage, const Standard_Boolea
#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)
@@ -150,9 +150,9 @@ namespace step {
parser::syntax_error::~syntax_error () YY_NOEXCEPT YY_NOTHROW
{}
/*---------------.
| symbol kinds. |
`---------------*/
/*---------.
| symbol. |
`---------*/
// basic_symbol.
template <typename Base>
@@ -170,11 +170,12 @@ namespace step {
{}
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
@@ -182,6 +183,7 @@ namespace step {
return this->kind ();
}
template <typename Base>
bool
parser::basic_symbol<Base>::empty () const YY_NOEXCEPT
@@ -198,28 +200,30 @@ namespace step {
}
// 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;
}
@@ -237,6 +241,7 @@ namespace step {
return kind_;
}
parser::symbol_kind_type
parser::by_kind::type_get () const YY_NOEXCEPT
{
@@ -244,6 +249,7 @@ namespace step {
}
// by_state.
parser::by_state::by_state () YY_NOEXCEPT
: state (empty_state)
@@ -326,7 +332,7 @@ namespace step {
YY_SYMBOL_PRINT (yymsg, yysym);
// User destructor.
YYUSE (yysym.kind ());
YY_USE (yysym.kind ());
}
#if YYDEBUG
@@ -335,7 +341,7 @@ namespace step {
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
@@ -343,7 +349,7 @@ namespace step {
symbol_kind_type yykind = yysym.kind ();
yyo << (yykind < YYNTOKENS ? "token" : "nterm")
<< ' ' << yysym.name () << " (";
YYUSE (yykind);
YY_USE (yykind);
yyo << ')';
}
}
@@ -369,7 +375,7 @@ namespace step {
}
void
parser::yypop_ (int n)
parser::yypop_ (int n) YY_NOEXCEPT
{
yystack_.pop (n);
}
@@ -412,13 +418,13 @@ namespace step {
}
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_;
}
@@ -884,16 +890,16 @@ namespace step {
// Actual number of expected tokens
int yycount = 0;
int yyn = yypact_[+yyparser_.yystack_[0].state];
const int yyn = yypact_[+yyparser_.yystack_[0].state];
if (!yy_pact_value_is_default_ (yyn))
{
/* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. In other words, skip the first -YYN actions for
this state because they are default actions. */
int yyxbegin = yyn < 0 ? -yyn : 0;
const int yyxbegin = yyn < 0 ? -yyn : 0;
// Stay within bounds of both yycheck and yytname.
int yychecklim = yylast_ - yyn + 1;
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
const int yychecklim = yylast_ - yyn + 1;
const int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
for (int yyx = yyxbegin; yyx < yyxend; ++yyx)
if (yycheck_[yyx + yyn] == yyx && yyx != symbol_kind::S_YYerror
&& !yy_table_value_is_error_ (yytable_[yyx + yyn]))
@@ -914,6 +920,9 @@ namespace step {
int
parser::yy_syntax_error_arguments_ (const context& yyctx,
symbol_kind_type yyarg[], int yyargn) const
@@ -1038,7 +1047,7 @@ namespace step {
const signed char
parser::yydefgoto_[] =
{
-1, 71, 62, 2, 3, 4, 5, 11, 12, 15,
0, 71, 62, 2, 3, 4, 5, 11, 12, 15,
32, 33, 19, 34, 35, 36, 23, 24, 54, 49,
50, 74, 75, 67, 59, 25, 51
};
@@ -1163,7 +1172,7 @@ namespace step {
#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.
@@ -1206,7 +1215,7 @@ namespace step {
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;
}

View File

@@ -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 interface 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
@@ -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
@@ -127,17 +127,23 @@ namespace step {
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
# define YYUSE(E) ((void) (E))
# define YY_USE(E) ((void) (E))
#else
# define YYUSE(E) /* empty */
# define YY_USE(E) /* empty */
#endif
#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
# else
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
_Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
# endif
# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
_Pragma ("GCC diagnostic pop")
#else
@@ -198,12 +204,18 @@ namespace step {
class parser
{
public:
#ifndef YYSTYPE
/// Symbol semantic values.
typedef int semantic_type;
#ifdef YYSTYPE
# ifdef __GNUC__
# pragma GCC message "bison: do not #define YYSTYPE in C++, use %define api.value.type"
# endif
typedef YYSTYPE value_type;
#else
typedef YYSTYPE semantic_type;
/// Symbol semantic values.
typedef int value_type;
#endif
/// Backward compatibility (Bison 3.8).
typedef value_type semantic_type;
/// Syntax errors thrown from user actions.
struct syntax_error : std::runtime_error
@@ -251,7 +263,7 @@ namespace step {
};
/// Token kind, as returned by yylex.
typedef token::yytokentype token_kind_type;
typedef token::token_kind_type token_kind_type;
/// Backward compatibility alias (Bison 3.6).
typedef token_kind_type token_type;
@@ -339,7 +351,7 @@ namespace step {
typedef Base super_type;
/// Default constructor.
basic_symbol ()
basic_symbol () YY_NOEXCEPT
: value ()
{}
@@ -358,7 +370,7 @@ namespace step {
/// Constructor for symbols with semantic value.
basic_symbol (typename Base::kind_type t,
YY_RVREF (semantic_type) v);
YY_RVREF (value_type) v);
/// Destroy the symbol.
~basic_symbol ()
@@ -366,8 +378,10 @@ namespace step {
clear ();
}
/// Destroy contents, and record that is empty.
void clear ()
void clear () YY_NOEXCEPT
{
Base::clear ();
}
@@ -388,7 +402,7 @@ namespace step {
void move (basic_symbol& s);
/// The semantic value.
semantic_type value;
value_type value;
private:
#if YY_CPLUSPLUS < 201103L
@@ -400,25 +414,27 @@ namespace step {
/// Type access provider for token (enum) based symbols.
struct by_kind
{
/// Default constructor.
by_kind ();
#if 201103L <= YY_CPLUSPLUS
/// Move constructor.
by_kind (by_kind&& that);
#endif
/// Copy constructor.
by_kind (const by_kind& that);
/// The symbol kind as needed by the constructor.
typedef token_kind_type kind_type;
/// Default constructor.
by_kind () YY_NOEXCEPT;
#if 201103L <= YY_CPLUSPLUS
/// Move constructor.
by_kind (by_kind&& that) YY_NOEXCEPT;
#endif
/// Copy constructor.
by_kind (const by_kind& that) YY_NOEXCEPT;
/// Constructor from (external) token numbers.
by_kind (kind_type t);
by_kind (kind_type t) YY_NOEXCEPT;
/// Record that this symbol is empty.
void clear ();
void clear () YY_NOEXCEPT;
/// Steal the symbol kind from \a that.
void move (by_kind& that);
@@ -492,8 +508,8 @@ namespace step {
{
public:
context (const parser& yyparser, const symbol_type& yyla);
const symbol_type& lookahead () const { return yyla_; }
symbol_kind_type token () const { return yyla_.kind (); }
const symbol_type& lookahead () const YY_NOEXCEPT { return yyla_; }
symbol_kind_type token () const YY_NOEXCEPT { return yyla_.kind (); }
/// Put in YYARG at most YYARGN of the expected tokens, and return the
/// number of tokens stored in YYARG. If YYARG is null, return the
/// number of expected tokens (guaranteed to be less than YYNTOKENS).
@@ -530,19 +546,19 @@ namespace step {
/// Whether the given \c yypact_ value indicates a defaulted state.
/// \param yyvalue the value to check
static bool yy_pact_value_is_default_ (int yyvalue);
static bool yy_pact_value_is_default_ (int yyvalue) YY_NOEXCEPT;
/// Whether the given \c yytable_ value indicates a syntax error.
/// \param yyvalue the value to check
static bool yy_table_value_is_error_ (int yyvalue);
static bool yy_table_value_is_error_ (int yyvalue) YY_NOEXCEPT;
static const signed char yypact_ninf_;
static const signed char yytable_ninf_;
/// Convert a scanner token kind \a t to a symbol kind.
/// In theory \a t should be a token_kind_type, but character literals
/// are valid, yet not members of the token_type enum.
static symbol_kind_type yytranslate_ (int t);
/// are valid, yet not members of the token_kind_type enum.
static symbol_kind_type yytranslate_ (int t) YY_NOEXCEPT;
/// Convert the symbol name \a n to a form suitable for a diagnostic.
static std::string yytnamerr_ (const char *yystr);
@@ -574,14 +590,14 @@ namespace step {
static const signed char yycheck_[];
// YYSTOS[STATE-NUM] -- The (internal number of the) accessing
// symbol of state STATE-NUM.
// YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
// state STATE-NUM.
static const signed char yystos_[];
// YYR1[YYN] -- Symbol number of symbol that rule YYN derives.
// YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM.
static const signed char yyr1_[];
// YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.
// YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM.
static const signed char yyr2_[];
@@ -680,7 +696,7 @@ namespace step {
typedef typename S::size_type size_type;
typedef typename std::ptrdiff_t index_type;
stack (size_type n = 200)
stack (size_type n = 200) YY_NOEXCEPT
: seq_ (n)
{}
@@ -759,7 +775,7 @@ namespace step {
class slice
{
public:
slice (const stack& stack, index_type range)
slice (const stack& stack, index_type range) YY_NOEXCEPT
: stack_ (stack)
, range_ (range)
{}
@@ -809,7 +825,7 @@ namespace step {
void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym);
/// Pop \a n symbols from the stack.
void yypop_ (int n = 1);
void yypop_ (int n = 1) YY_NOEXCEPT;
/// Constants.
enum

View File

@@ -134,9 +134,6 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge,
if ( count < 2 ) isSeam = Standard_False;
}
BRepAdaptor_Curve CA = BRepAdaptor_Curve(aEdge);
BRepAdaptor_Surface SA = BRepAdaptor_Surface(aTool.CurrentFace());
if (aEdge.Orientation() == TopAbs_INTERNAL ||
aEdge.Orientation() == TopAbs_EXTERNAL ) {
Handle(TransferBRep_ShapeMapper) errShape =
@@ -184,7 +181,7 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge,
// ---------------------------------------
// Translate 3D representation of the Edge
// ---------------------------------------
BRepAdaptor_Curve CA = BRepAdaptor_Curve(aEdge);
Handle(StepGeom_Curve) Gpms;
Handle(Geom_Curve) C = CA.Curve().Curve();
@@ -262,6 +259,8 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge,
#ifdef OCCT_DEBUG
std::cout << "Warning: TopoDSToStep_MakeStepEdge: edge without 3d curve; creating..." << std::endl;
#endif
BRepAdaptor_Surface SA = BRepAdaptor_Surface(aTool.CurrentFace());
if ((SA.GetType() == GeomAbs_Plane) &&
(CA.GetType() == GeomAbs_Line)) {
U1 = CA.FirstParameter();

View File

@@ -1,21 +0,0 @@
puts "============"
puts "0033664: Visualization - Selection does not work for simple shape"
puts "============"
puts ""
pload MODELING VISUALIZATION
vclear
vinit View1
restore [locate_data_file cylinder_surface.brep] b
vdisplay -dispMode 1 b
vfit
vsensdis
vselect 200 200
if {[vnbselected] != "1"} {
puts "ERROR: wrong sensitive area"
}
vselect 0 0
vdump $::imagedir/${::casename}_cylinder.png

View File

@@ -1,36 +0,0 @@
puts "============"
puts "0033664: Visualization - Selection does not work for simple shape"
puts "============"
puts ""
pload MODELING VISUALIZATION
vclear
vinit View1
pcone c1 50 100 100
ttranslate c1 100 0 100
explode c1
explode c1_1
pcone c2 100 50 100
ttranslate c2 -100 0 100
explode c2
explode c2_1
pcone c3 0 100 100
ttranslate c3 100 0 -100
explode c3
explode c3_1
pcone c4 100 0 100
ttranslate c4 -100 0 -100
explode c4
explode c4_1
vdisplay c1_1_1 c2_1_1 c3_1_1 c4_1_1 -dispmode 1
vsensdis
vfront
vfit
vdump $::imagedir/${::casename}_cone.png