mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-16 10:08:36 +03:00
0031740: Configuration - recover support of Yacc and Lex generation
Scripts adm/cmake/bison.cmake and adm/cmake/flex.cmake are refactored to enable actual search for bison and flex. Apart of standard locations, also sub-folders of 3RDPARTY_DIR whose names contain "bison" and "flex", respectively, are added to search. Cache variables 3RDPARTY_BISON_EXECUTABLE and 3RDPARTY_FLEX_EXECUTABLE are removed to avoid confusion (they duplicated similar variables without "3RDPARTY_" prefix). Lex and Yacc files are corrected to match changes made manually in generated files during last years: - StepFile/step.yacc: correction missing from #22972 - StepFile/step.lex: corrected for compilation (broken by #31060) - MSVC-specific code is synchronized between StepFile/step.lex and ExprIntrp/ExprIntrp.lex - Old commented code and duplicate code blocks removed Commands for execution of Flex and Bison tools in CMake scripts are tweaked to avoid embedding line numbers (with local paths) in generated files. Scanners and parsers are regenerated from updated source files with modified options. Note that lex.ExprIntrp.c is regenerated with multiple differences because option -f (fast scanner) was used for generation of previous version (by WOK).
This commit is contained in:
parent
dda9303c69
commit
fba34cf8ba
@ -2,19 +2,28 @@
|
|||||||
|
|
||||||
# execute FindBISON script by "find_package (Bison)" is required to define BISON_TARGET macro
|
# execute FindBISON script by "find_package (Bison)" is required to define BISON_TARGET macro
|
||||||
|
|
||||||
if (NOT DEFINED 3RDPARTY_BISON_EXECUTABLE)
|
# delete obsolete 3RDPARTY_BISON_EXECUTABLE cache variable (not used anymore)
|
||||||
set (3RDPARTY_BISON_EXECUTABLE "" CACHE FILEPATH "The path to the bison command")
|
unset (3RDPARTY_BISON_EXECUTABLE CACHE)
|
||||||
|
|
||||||
|
# delete BISON_EXECUTABLE cache variable if it is empty, otherwise find_package will fail
|
||||||
|
# without reasonable diagnostic
|
||||||
|
if (NOT BISON_EXECUTABLE)
|
||||||
|
unset (BISON_EXECUTABLE CACHE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# BISON_EXECUTABLE is required by BISON_TARGET macro and should be defined
|
# Add paths to 3rdparty subfolders containing name "bison" to CMAKE_PROGRAM_PATH variable to make
|
||||||
set (BISON_EXECUTABLE "${3RDPARTY_BISON_EXECUTABLE}" CACHE FILEPATH "path to the bison executable" FORCE)
|
# these paths searhed by find_package
|
||||||
|
if (3RDPARTY_DIR)
|
||||||
find_package (BISON)
|
file (GLOB BISON_PATHS LIST_DIRECTORIES true "${3RDPARTY_DIR}/*bison*/")
|
||||||
|
foreach (candidate_path ${BISON_PATHS})
|
||||||
if (BISON_FOUND)
|
if (IS_DIRECTORY ${candidate_path})
|
||||||
set (3RDPARTY_BISON_EXECUTABLE "${BISON_EXECUTABLE}" CACHE FILEPATH "The Path to the bison command" FORCE)
|
list (APPEND CMAKE_PROGRAM_PATH ${candidate_path})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT 3RDPARTY_BISON_EXECUTABLE OR NOT EXISTS "${3RDPARTY_BISON_EXECUTABLE}")
|
find_package (BISON 2.7)
|
||||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_BISON_EXECUTABLE)
|
|
||||||
|
if (NOT BISON_FOUND OR NOT BISON_EXECUTABLE OR NOT EXISTS "${BISON_EXECUTABLE}")
|
||||||
|
list (APPEND 3RDPARTY_NOT_INCLUDED BISON_EXECUTABLE)
|
||||||
endif()
|
endif()
|
@ -2,19 +2,28 @@
|
|||||||
|
|
||||||
# execute FindFLEX script by "find_package (Flex)" is required to define FLEX_TARGET macro
|
# execute FindFLEX script by "find_package (Flex)" is required to define FLEX_TARGET macro
|
||||||
|
|
||||||
if (NOT DEFINED 3RDPARTY_FLEX_EXECUTABLE)
|
# delete obsolete 3RDPARTY_FLEX_EXECUTABLE cache variable (not used anymore)
|
||||||
set (3RDPARTY_FLEX_EXECUTABLE "" CACHE FILEPATH "The Path to the flex command")
|
unset (3RDPARTY_FLEX_EXECUTABLE CACHE)
|
||||||
|
|
||||||
|
# delete FLEX_EXECUTABLE cache variable if it is empty, otherwise find_package will fail
|
||||||
|
# without reasonable diagnostic
|
||||||
|
if (NOT FLEX_EXECUTABLE)
|
||||||
|
unset (FLEX_EXECUTABLE CACHE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# FLEX_EXECUTABLE is required by FLEX_TARGET macro and should be defined
|
# Add paths to 3rdparty subfolders containing name "flex" to CMAKE_PROGRAM_PATH variable to make
|
||||||
set (FLEX_EXECUTABLE "${3RDPARTY_FLEX_EXECUTABLE}" CACHE FILEPATH "path to the flex executable" FORCE)
|
# these paths searhed by find_package
|
||||||
|
if (3RDPARTY_DIR)
|
||||||
find_package (FLEX)
|
file (GLOB FLEX_PATHS LIST_DIRECTORIES true "${3RDPARTY_DIR}/*flex*")
|
||||||
|
foreach (candidate_path ${FLEX_PATHS})
|
||||||
if (FLEX_FOUND)
|
if (IS_DIRECTORY ${candidate_path})
|
||||||
set (3RDPARTY_FLEX_EXECUTABLE "${FLEX_EXECUTABLE}" CACHE FILEPATH "The Path to the flex command" FORCE)
|
list (APPEND CMAKE_PROGRAM_PATH ${candidate_path})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT 3RDPARTY_FLEX_EXECUTABLE OR NOT EXISTS "${3RDPARTY_FLEX_EXECUTABLE}")
|
find_package (FLEX 2.5.3)
|
||||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FLEX_EXECUTABLE)
|
|
||||||
|
if (NOT FLEX_FOUND OR NOT FLEX_EXECUTABLE OR NOT EXISTS "${FLEX_EXECUTABLE}")
|
||||||
|
list (APPEND 3RDPARTY_NOT_INCLUDED FLEX_EXECUTABLE)
|
||||||
endif()
|
endif()
|
@ -93,8 +93,8 @@ foreach (OCCT_PACKAGE ${USED_PACKAGES})
|
|||||||
if (EXISTS "${CURRENT_FLEX_FILE}" AND EXISTS "${CURRENT_BISON_FILE}" AND ${ARE_FILES_EQUAL})
|
if (EXISTS "${CURRENT_FLEX_FILE}" AND EXISTS "${CURRENT_BISON_FILE}" AND ${ARE_FILES_EQUAL})
|
||||||
set (BISON_OUTPUT_FILE ${CURRENT_BISON_FILE_NAME}.tab.c)
|
set (BISON_OUTPUT_FILE ${CURRENT_BISON_FILE_NAME}.tab.c)
|
||||||
set (FLEX_OUTPUT_FILE lex.${CURRENT_FLEX_FILE_NAME}.c)
|
set (FLEX_OUTPUT_FILE lex.${CURRENT_FLEX_FILE_NAME}.c)
|
||||||
BISON_TARGET (Parser_${CURRENT_BISON_FILE_NAME} ${CURRENT_BISON_FILE} ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${BISON_OUTPUT_FILE} COMPILE_FLAGS "-p ${CURRENT_BISON_FILE_NAME}")
|
BISON_TARGET (Parser_${CURRENT_BISON_FILE_NAME} ${CURRENT_BISON_FILE} ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${BISON_OUTPUT_FILE} COMPILE_FLAGS "-p ${CURRENT_BISON_FILE_NAME} -l")
|
||||||
FLEX_TARGET (Scanner_${CURRENT_FLEX_FILE_NAME} ${CURRENT_FLEX_FILE} ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${FLEX_OUTPUT_FILE} COMPILE_FLAGS "-P${CURRENT_FLEX_FILE_NAME}")
|
FLEX_TARGET (Scanner_${CURRENT_FLEX_FILE_NAME} ${CURRENT_FLEX_FILE} ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${FLEX_OUTPUT_FILE} COMPILE_FLAGS "-P${CURRENT_FLEX_FILE_NAME} -L")
|
||||||
ADD_FLEX_BISON_DEPENDENCY (Scanner_${CURRENT_FLEX_FILE_NAME} Parser_${CURRENT_BISON_FILE_NAME})
|
ADD_FLEX_BISON_DEPENDENCY (Scanner_${CURRENT_FLEX_FILE_NAME} Parser_${CURRENT_BISON_FILE_NAME})
|
||||||
|
|
||||||
list (APPEND SOURCE_FILES ${BISON_OUTPUT_FILE} ${FLEX_OUTPUT_FILE})
|
list (APPEND SOURCE_FILES ${BISON_OUTPUT_FILE} ${FLEX_OUTPUT_FILE})
|
||||||
|
@ -45,7 +45,9 @@ static int yywrap()
|
|||||||
// provide safe error handler (exception instead of exit())
|
// provide safe error handler (exception instead of exit())
|
||||||
#define YY_FATAL_ERROR(msg) ExprIntrperror(msg)
|
#define YY_FATAL_ERROR(msg) ExprIntrperror(msg)
|
||||||
|
|
||||||
|
// MSVC specifics
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
|
||||||
// add includes for flex 2.91 (Linux version)
|
// add includes for flex 2.91 (Linux version)
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
@ -65,7 +67,7 @@ static int yywrap()
|
|||||||
#pragma warning(disable:4131 4244 4273 4127 4267)
|
#pragma warning(disable:4131 4244 4273 4127 4267)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif /* MSC_VER */
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
// add includes for flex 2.91 (Linux version)
|
// add includes for flex 2.91 (Linux version)
|
||||||
|
@ -69,8 +69,7 @@
|
|||||||
#define yynerrs ExprIntrpnerrs
|
#define yynerrs ExprIntrpnerrs
|
||||||
|
|
||||||
/* Copy the first part of user declarations. */
|
/* Copy the first part of user declarations. */
|
||||||
/* Line 371 of yacc.c */
|
|
||||||
#line 17 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
|
|
||||||
#include <ExprIntrp_yaccintrf.hxx>
|
#include <ExprIntrp_yaccintrf.hxx>
|
||||||
|
|
||||||
@ -124,12 +123,10 @@ extern void ExprIntrp_EndOfEqual();
|
|||||||
#pragma warning(disable:4131 4244 4127 4702)
|
#pragma warning(disable:4131 4244 4127 4702)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Line 371 of yacc.c */
|
|
||||||
#line 77 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
|
|
||||||
|
|
||||||
/* Line 371 of yacc.c */
|
|
||||||
#line 133 "ExprIntrp.tab.c"
|
|
||||||
|
|
||||||
# ifndef YY_NULL
|
# ifndef YY_NULL
|
||||||
# if defined __cplusplus && 201103L <= __cplusplus
|
# if defined __cplusplus && 201103L <= __cplusplus
|
||||||
@ -149,8 +146,8 @@ extern void ExprIntrp_EndOfEqual();
|
|||||||
|
|
||||||
/* In a future release of Bison, this section will be replaced
|
/* In a future release of Bison, this section will be replaced
|
||||||
by #include "ExprIntrp.tab.h". */
|
by #include "ExprIntrp.tab.h". */
|
||||||
#ifndef YY_EXPRINTRP_EXPRINTRP_TAB_H_INCLUDED
|
#ifndef YY_EXPRINTRP_D_ABV_OCCT_OCCT_SRC_EXPRINTRP_EXPRINTRP_TAB_H_INCLUDED
|
||||||
# define YY_EXPRINTRP_EXPRINTRP_TAB_H_INCLUDED
|
# define YY_EXPRINTRP_D_ABV_OCCT_OCCT_SRC_EXPRINTRP_EXPRINTRP_TAB_H_INCLUDED
|
||||||
/* Enabling traces. */
|
/* Enabling traces. */
|
||||||
#ifndef YYDEBUG
|
#ifndef YYDEBUG
|
||||||
# define YYDEBUG 0
|
# define YYDEBUG 0
|
||||||
@ -214,12 +211,11 @@ int ExprIntrpparse ();
|
|||||||
#endif
|
#endif
|
||||||
#endif /* ! YYPARSE_PARAM */
|
#endif /* ! YYPARSE_PARAM */
|
||||||
|
|
||||||
#endif /* !YY_EXPRINTRP_EXPRINTRP_TAB_H_INCLUDED */
|
#endif /* !YY_EXPRINTRP_D_ABV_OCCT_OCCT_SRC_EXPRINTRP_EXPRINTRP_TAB_H_INCLUDED */
|
||||||
|
|
||||||
/* Copy the second part of user declarations. */
|
/* Copy the second part of user declarations. */
|
||||||
|
|
||||||
/* Line 390 of yacc.c */
|
|
||||||
#line 223 "ExprIntrp.tab.c"
|
|
||||||
|
|
||||||
#ifdef short
|
#ifdef short
|
||||||
# undef short
|
# undef short
|
||||||
@ -1544,290 +1540,242 @@ yyreduce:
|
|||||||
switch (yyn)
|
switch (yyn)
|
||||||
{
|
{
|
||||||
case 5:
|
case 5:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 84 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_EndOfFuncDef();}
|
{ExprIntrp_EndOfFuncDef();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
case 6:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 85 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_EndOfRelation();}
|
{ExprIntrp_EndOfRelation();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 7:
|
case 7:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 88 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_AssignVariable();}
|
{ExprIntrp_AssignVariable();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 8:
|
case 8:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 88 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_EndOfAssign();}
|
{ExprIntrp_EndOfAssign();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 9:
|
case 9:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 91 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_Deassign();}
|
{ExprIntrp_Deassign();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 11:
|
case 11:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 94 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_SumOperator();}
|
{ExprIntrp_SumOperator();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 12:
|
case 12:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 95 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_MinusOperator();}
|
{ExprIntrp_MinusOperator();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 13:
|
case 13:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 96 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_ProductOperator();}
|
{ExprIntrp_ProductOperator();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 14:
|
case 14:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 97 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_DivideOperator();}
|
{ExprIntrp_DivideOperator();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 15:
|
case 15:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 98 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_ExpOperator();}
|
{ExprIntrp_ExpOperator();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 18:
|
case 18:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 101 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_UnaryMinusOperator();}
|
{ExprIntrp_UnaryMinusOperator();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 19:
|
case 19:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 102 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_UnaryPlusOperator();}
|
{ExprIntrp_UnaryPlusOperator();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 27:
|
case 27:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 115 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_VariableIdentifier();}
|
{ExprIntrp_VariableIdentifier();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 28:
|
case 28:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 116 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_NumValue();}
|
{ExprIntrp_NumValue();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 29:
|
case 29:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 119 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_EndFunction();}
|
{ExprIntrp_EndFunction();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 30:
|
case 30:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 120 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_EndDerFunction();}
|
{ExprIntrp_EndDerFunction();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 31:
|
case 31:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 121 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_EndDifferential();}
|
{ExprIntrp_EndDifferential();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 32:
|
case 32:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 121 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_EndDiffFunction();}
|
{ExprIntrp_EndDiffFunction();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 33:
|
case 33:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 124 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_EndFuncArg();}
|
{ExprIntrp_EndFuncArg();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 34:
|
case 34:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 125 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_NextFuncArg();}
|
{ExprIntrp_NextFuncArg();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 36:
|
case 36:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 128 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_StartFunction();}
|
{ExprIntrp_StartFunction();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 37:
|
case 37:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 131 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_DefineFunction();}
|
{ExprIntrp_DefineFunction();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 39:
|
case 39:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 134 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_StartDerivate();}
|
{ExprIntrp_StartDerivate();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 40:
|
case 40:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 134 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_EndDerivate();}
|
{ExprIntrp_EndDerivate();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 41:
|
case 41:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 137 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_DiffVar();}
|
{ExprIntrp_DiffVar();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 42:
|
case 42:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 138 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_DiffDegree();}
|
{ExprIntrp_DiffDegree();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 43:
|
case 43:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 138 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_VerDiffDegree();}
|
{ExprIntrp_VerDiffDegree();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 44:
|
case 44:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 138 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_DiffDegreeVar();}
|
{ExprIntrp_DiffDegreeVar();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 45:
|
case 45:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 141 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_StartDifferential();}
|
{ExprIntrp_StartDifferential();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 47:
|
case 47:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 145 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_StartFunction();}
|
{ExprIntrp_StartFunction();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 49:
|
case 49:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 148 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_EndFuncArg();}
|
{ExprIntrp_EndFuncArg();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 50:
|
case 50:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 149 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_NextFuncArg();}
|
{ExprIntrp_NextFuncArg();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 52:
|
case 52:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 152 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_VariableIdentifier();}
|
{ExprIntrp_VariableIdentifier();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 53:
|
case 53:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 155 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_Derivation();}
|
{ExprIntrp_Derivation();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 54:
|
case 54:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 155 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_EndDerivation();}
|
{ExprIntrp_EndDerivation();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 55:
|
case 55:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 156 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_Derivation();}
|
{ExprIntrp_Derivation();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 56:
|
case 56:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 156 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_DerivationValue();}
|
{ExprIntrp_DerivationValue();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 57:
|
case 57:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 156 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_EndDerivation();}
|
{ExprIntrp_EndDerivation();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 58:
|
case 58:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 159 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_ConstantIdentifier();}
|
{ExprIntrp_ConstantIdentifier();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 59:
|
case 59:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 159 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_ConstantDefinition();}
|
{ExprIntrp_ConstantDefinition();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 61:
|
case 61:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 162 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_VariableIdentifier();}
|
{ExprIntrp_VariableIdentifier();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 62:
|
case 62:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 162 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_NumValue();}
|
{ExprIntrp_NumValue();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 63:
|
case 63:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 162 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_Sumator();}
|
{ExprIntrp_Sumator();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 64:
|
case 64:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 165 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_VariableIdentifier();}
|
{ExprIntrp_VariableIdentifier();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 65:
|
case 65:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 165 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_NumValue();}
|
{ExprIntrp_NumValue();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 66:
|
case 66:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 165 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_Productor();}
|
{ExprIntrp_Productor();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 70:
|
case 70:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 173 "D:/ABV/OCCT/occt7/src/ExprIntrp/ExprIntrp.yacc"
|
|
||||||
{ExprIntrp_EndOfEqual();}
|
{ExprIntrp_EndOfEqual();}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 1831 "ExprIntrp.tab.c"
|
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
/* User semantic actions sometimes alter yychar, and that requires
|
/* User semantic actions sometimes alter yychar, and that requires
|
||||||
|
@ -30,8 +30,8 @@
|
|||||||
This special exception was added by the Free Software Foundation in
|
This special exception was added by the Free Software Foundation in
|
||||||
version 2.2 of Bison. */
|
version 2.2 of Bison. */
|
||||||
|
|
||||||
#ifndef YY_EXPRINTRP_EXPRINTRP_TAB_H_INCLUDED
|
#ifndef YY_EXPRINTRP_D_ABV_OCCT_OCCT_SRC_EXPRINTRP_EXPRINTRP_TAB_H_INCLUDED
|
||||||
# define YY_EXPRINTRP_EXPRINTRP_TAB_H_INCLUDED
|
# define YY_EXPRINTRP_D_ABV_OCCT_OCCT_SRC_EXPRINTRP_EXPRINTRP_TAB_H_INCLUDED
|
||||||
/* Enabling traces. */
|
/* Enabling traces. */
|
||||||
#ifndef YYDEBUG
|
#ifndef YYDEBUG
|
||||||
# define YYDEBUG 0
|
# define YYDEBUG 0
|
||||||
@ -95,4 +95,4 @@ int ExprIntrpparse ();
|
|||||||
#endif
|
#endif
|
||||||
#endif /* ! YYPARSE_PARAM */
|
#endif /* ! YYPARSE_PARAM */
|
||||||
|
|
||||||
#endif /* !YY_EXPRINTRP_EXPRINTRP_TAB_H_INCLUDED */
|
#endif /* !YY_EXPRINTRP_D_ABV_OCCT_OCCT_SRC_EXPRINTRP_EXPRINTRP_TAB_H_INCLUDED */
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -28,10 +28,10 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef WNT
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
# include <io.h>
|
# include <io.h>
|
||||||
#endif /* _MSC_VER */
|
#endif /* WNT */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -529,7 +529,29 @@ long string in files Henri.stp and 401.stp*/
|
|||||||
#define YY_FATAL_ERROR(msg) StepFile_CallFailure( msg )
|
#define YY_FATAL_ERROR(msg) StepFile_CallFailure( msg )
|
||||||
|
|
||||||
/* abv 07.06.02: force inclusion of stdlib.h on WNT to avoid warnings */
|
/* abv 07.06.02: force inclusion of stdlib.h on WNT to avoid warnings */
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
// add includes for flex 2.91 (Linux version)
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <io.h>
|
||||||
|
|
||||||
|
// Avoid includion of unistd.h if parser is generated on Linux (flex 2.5.35)
|
||||||
|
#ifndef YY_NO_UNISTD_H
|
||||||
|
#define YY_NO_UNISTD_H
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// disable MSVC warnings in flex 2.89 and 2.5.35 code
|
||||||
|
// Note that Intel compiler also defines _MSC_VER but has different warning ids
|
||||||
|
#if defined(__INTEL_COMPILER)
|
||||||
|
#pragma warning(disable:177 1786 1736)
|
||||||
|
#elif defined(__clang__)
|
||||||
|
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||||
|
#pragma GCC diagnostic ignored "-Winconsistent-dllimport"
|
||||||
|
#pragma GCC diagnostic ignored "-Wunneeded-internal-declaration"
|
||||||
|
#else
|
||||||
|
#pragma warning(disable:4131 4244 4273 4127 4267)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* MSC_VER */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
void steperror ( FILE *input_file );
|
void steperror ( FILE *input_file );
|
||||||
@ -545,26 +567,6 @@ void rec_typarg(int argtype);
|
|||||||
void resultat () /* Resultat alloue dynamiquement, "jete" une fois lu */
|
void resultat () /* Resultat alloue dynamiquement, "jete" une fois lu */
|
||||||
{ if (modcom == 0) rec_restext(yytext,yyleng); }
|
{ if (modcom == 0) rec_restext(yytext,yyleng); }
|
||||||
|
|
||||||
// MSVC specifics
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
|
|
||||||
// disable MSVC warnings in flex code
|
|
||||||
// Note that Intel compiler also defines _MSC_VER but has different warning ids
|
|
||||||
#if defined(__INTEL_COMPILER)
|
|
||||||
#pragma warning(disable:177 1786 1736)
|
|
||||||
#elif defined(__clang__)
|
|
||||||
#pragma GCC diagnostic ignored "-Wunused-function"
|
|
||||||
#pragma GCC diagnostic ignored "-Winconsistent-dllimport"
|
|
||||||
#pragma GCC diagnostic ignored "-Wunneeded-internal-declaration"
|
|
||||||
#else
|
|
||||||
#pragma warning(disable:4131 4244 4273 4267 4127)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Avoid includion of unistd.h if parser is generated on Linux (flex 2.5.35)
|
|
||||||
#define YY_NO_UNISTD_H
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// disable GCC warnings in flex code
|
// disable GCC warnings in flex code
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#pragma GCC diagnostic ignored "-Wunused-function"
|
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||||
|
@ -24,7 +24,29 @@ long string in files Henri.stp and 401.stp*/
|
|||||||
#define YY_FATAL_ERROR(msg) StepFile_CallFailure( msg )
|
#define YY_FATAL_ERROR(msg) StepFile_CallFailure( msg )
|
||||||
|
|
||||||
/* abv 07.06.02: force inclusion of stdlib.h on WNT to avoid warnings */
|
/* abv 07.06.02: force inclusion of stdlib.h on WNT to avoid warnings */
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
// add includes for flex 2.91 (Linux version)
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <io.h>
|
||||||
|
|
||||||
|
// Avoid includion of unistd.h if parser is generated on Linux (flex 2.5.35)
|
||||||
|
#ifndef YY_NO_UNISTD_H
|
||||||
|
#define YY_NO_UNISTD_H
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// disable MSVC warnings in flex 2.89 and 2.5.35 code
|
||||||
|
// Note that Intel compiler also defines _MSC_VER but has different warning ids
|
||||||
|
#if defined(__INTEL_COMPILER)
|
||||||
|
#pragma warning(disable:177 1786 1736)
|
||||||
|
#elif defined(__clang__)
|
||||||
|
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||||
|
#pragma GCC diagnostic ignored "-Winconsistent-dllimport"
|
||||||
|
#pragma GCC diagnostic ignored "-Wunneeded-internal-declaration"
|
||||||
|
#else
|
||||||
|
#pragma warning(disable:4131 4244 4273 4127 4267)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* MSC_VER */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
void steperror ( FILE *input_file );
|
void steperror ( FILE *input_file );
|
||||||
@ -40,27 +62,6 @@ void rec_typarg(int argtype);
|
|||||||
void resultat () /* Resultat alloue dynamiquement, "jete" une fois lu */
|
void resultat () /* Resultat alloue dynamiquement, "jete" une fois lu */
|
||||||
{ if (modcom == 0) rec_restext(yytext,yyleng); }
|
{ if (modcom == 0) rec_restext(yytext,yyleng); }
|
||||||
|
|
||||||
// MSVC specifics
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
|
|
||||||
// disable MSVC warnings in flex code
|
|
||||||
// Note that Intel compiler also defines _MSC_VER but has different warning ids
|
|
||||||
#if defined(__INTEL_COMPILER)
|
|
||||||
#pragma warning(disable:177 1786 1736)
|
|
||||||
#elif defined(__clang__)
|
|
||||||
#pragma GCC diagnostic ignored "-Wunused-function"
|
|
||||||
#pragma GCC diagnostic ignored "-Winconsistent-dllimport"
|
|
||||||
#pragma GCC diagnostic ignored "-Wunneeded-internal-declaration"
|
|
||||||
#else
|
|
||||||
#else
|
|
||||||
#pragma warning(disable:4131 4244 4273 4267 4127)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Avoid includion of unistd.h if parser is generated on Linux (flex 2.5.35)
|
|
||||||
#define YY_NO_UNISTD_H
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// disable GCC warnings in flex code
|
// disable GCC warnings in flex code
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#pragma GCC diagnostic ignored "-Wunused-function"
|
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||||
|
@ -58,6 +58,14 @@
|
|||||||
/* Pull parsers. */
|
/* Pull parsers. */
|
||||||
#define YYPULL 1
|
#define YYPULL 1
|
||||||
|
|
||||||
|
/* "%code top" blocks. */
|
||||||
|
|
||||||
|
|
||||||
|
// This file is part of Open CASCADE Technology software library.
|
||||||
|
// This file is generated, do not modify it directly; edit source file step.yacc instead.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Substitute the variable and function names. */
|
/* Substitute the variable and function names. */
|
||||||
#define yyparse stepparse
|
#define yyparse stepparse
|
||||||
@ -69,43 +77,14 @@
|
|||||||
#define yynerrs stepnerrs
|
#define yynerrs stepnerrs
|
||||||
|
|
||||||
/* Copy the first part of user declarations. */
|
/* Copy the first part of user declarations. */
|
||||||
/* Line 371 of yacc.c */
|
|
||||||
#line 18 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
|
|
||||||
|
|
||||||
#include "recfile.ph" /* definitions des types d'arguments */
|
#include "recfile.ph" /* definitions des types d'arguments */
|
||||||
#include "recfile.pc" /* la-dedans, tout y est */
|
#include "recfile.pc" /* la-dedans, tout y est */
|
||||||
/*
|
|
||||||
#define stepparse STEPparse
|
|
||||||
#define steplex STEPlex
|
|
||||||
#define stepwrap STEPwrap
|
|
||||||
#define steprestart STEPrestart
|
|
||||||
#define steplex STEPlex
|
|
||||||
#define steplval STEPlval
|
|
||||||
#define stepval STEPval
|
|
||||||
#define stepchar STEPchar
|
|
||||||
#define stepdebug STEPdebug
|
|
||||||
#define stepnerrs STEPnerrs
|
|
||||||
#define steperror STEPerror
|
|
||||||
*/
|
|
||||||
#define stepclearin yychar = -1
|
#define stepclearin yychar = -1
|
||||||
#define steperrok yyerrflag = 0
|
#define steperrok yyerrflag = 0
|
||||||
|
|
||||||
/*
|
|
||||||
#define stepin STEPin
|
|
||||||
#define yyerrflag STEPerrflag
|
|
||||||
#define yyerrstatus STEPerrflag
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* ABV 19.12.00: merging porting modifications by POP (for WNT, AIX) */
|
|
||||||
#if defined(_WIN32) && !defined(MSDOS)
|
|
||||||
#define MSDOS _WIN32
|
|
||||||
#endif
|
|
||||||
#if defined(_AIX)
|
|
||||||
#include <malloc.h>
|
|
||||||
#define alloca malloc
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// disable MSVC warnings in bison code
|
// disable MSVC warnings in bison code
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma warning(disable:4244 4131 4127 4702)
|
#pragma warning(disable:4244 4131 4127 4702)
|
||||||
@ -114,8 +93,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Line 371 of yacc.c */
|
|
||||||
#line 119 "step.tab.c"
|
|
||||||
|
|
||||||
# ifndef YY_NULL
|
# ifndef YY_NULL
|
||||||
# if defined __cplusplus && 201103L <= __cplusplus
|
# if defined __cplusplus && 201103L <= __cplusplus
|
||||||
@ -135,8 +113,8 @@
|
|||||||
|
|
||||||
/* In a future release of Bison, this section will be replaced
|
/* In a future release of Bison, this section will be replaced
|
||||||
by #include "step.tab.h". */
|
by #include "step.tab.h". */
|
||||||
#ifndef YY_STEP_STEP_TAB_H_INCLUDED
|
#ifndef YY_STEP_D_ABV_OCCT_OCCT_SRC_STEPFILE_STEP_TAB_H_INCLUDED
|
||||||
# define YY_STEP_STEP_TAB_H_INCLUDED
|
# define YY_STEP_D_ABV_OCCT_OCCT_SRC_STEPFILE_STEP_TAB_H_INCLUDED
|
||||||
/* Enabling traces. */
|
/* Enabling traces. */
|
||||||
#ifndef YYDEBUG
|
#ifndef YYDEBUG
|
||||||
# define YYDEBUG 0
|
# define YYDEBUG 0
|
||||||
@ -195,12 +173,11 @@ int stepparse ();
|
|||||||
#endif
|
#endif
|
||||||
#endif /* ! YYPARSE_PARAM */
|
#endif /* ! YYPARSE_PARAM */
|
||||||
|
|
||||||
#endif /* !YY_STEP_STEP_TAB_H_INCLUDED */
|
#endif /* !YY_STEP_D_ABV_OCCT_OCCT_SRC_STEPFILE_STEP_TAB_H_INCLUDED */
|
||||||
|
|
||||||
/* Copy the second part of user declarations. */
|
/* Copy the second part of user declarations. */
|
||||||
|
|
||||||
/* Line 390 of yacc.c */
|
|
||||||
#line 204 "step.tab.c"
|
|
||||||
|
|
||||||
#ifdef short
|
#ifdef short
|
||||||
# undef short
|
# undef short
|
||||||
@ -507,11 +484,11 @@ static const yytype_int8 yyrhs[] =
|
|||||||
/* 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[] =
|
static const yytype_uint8 yyrline[] =
|
||||||
{
|
{
|
||||||
0, 64, 64, 65, 66, 67, 68, 69, 70, 71,
|
0, 41, 41, 42, 43, 44, 45, 46, 47, 48,
|
||||||
71, 71, 74, 75, 77, 78, 80, 83, 84, 85,
|
48, 48, 51, 52, 54, 55, 57, 60, 61, 62,
|
||||||
86, 87, 91, 94, 97, 102, 103, 104, 106, 107,
|
63, 64, 68, 71, 74, 79, 80, 81, 83, 84,
|
||||||
108, 110, 111, 113, 114, 115, 116, 118, 119, 121,
|
85, 87, 88, 90, 91, 92, 93, 95, 96, 98,
|
||||||
122, 124, 127, 130, 131, 133, 136, 138, 143, 146
|
99, 101, 104, 107, 108, 110, 113, 115, 120, 123
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1459,114 +1436,96 @@ yyreduce:
|
|||||||
switch (yyn)
|
switch (yyn)
|
||||||
{
|
{
|
||||||
case 11:
|
case 11:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 72 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
|
|
||||||
{ rec_finfile(); return(0); /* fini pour celui-la */ }
|
{ rec_finfile(); return(0); /* fini pour celui-la */ }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 16:
|
case 16:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 81 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
|
|
||||||
{ rec_finhead(); }
|
{ rec_finhead(); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 17:
|
case 17:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 83 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
|
|
||||||
{ rec_typarg(rec_argIdent); rec_newarg(); }
|
{ rec_typarg(rec_argIdent); rec_newarg(); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 18:
|
case 18:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 84 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
|
|
||||||
{ /* deja fait par lex*/ rec_newarg(); }
|
{ /* deja fait par lex*/ rec_newarg(); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 19:
|
case 19:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 85 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
|
|
||||||
{ rec_newarg(); }
|
{ rec_newarg(); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 20:
|
case 20:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 86 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
|
|
||||||
{ rec_newarg(); }
|
{ rec_newarg(); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 21:
|
case 21:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 87 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
|
|
||||||
{ rec_typarg(rec_argMisc); rec_newarg();
|
{ rec_typarg(rec_argMisc); rec_newarg();
|
||||||
yyerrstatus = 1; yyclearin; }
|
yyerrstatus = 1; yyclearin; }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 22:
|
case 22:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 92 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
|
|
||||||
{ rec_listype(); }
|
{ rec_listype(); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 23:
|
case 23:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 95 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
|
|
||||||
{ rec_deblist(); }
|
{ rec_deblist(); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 24:
|
case 24:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 98 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
|
|
||||||
{ if (modeprint > 0)
|
{ if (modeprint > 0)
|
||||||
{ printf("Record no : %d -- ",nbrec+1); rec_print(currec); }
|
{ printf("Record no : %d -- ",nbrec+1); rec_print(currec); }
|
||||||
rec_newent (); yyerrstatus = 0; }
|
rec_newent (); yyerrstatus = 0; }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 41:
|
case 41:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 125 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
|
|
||||||
{ scope_debut(); }
|
{ scope_debut(); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 42:
|
case 42:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 128 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
|
|
||||||
{ rec_typarg(rec_argIdent); rec_newarg(); }
|
{ rec_typarg(rec_argIdent); rec_newarg(); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 45:
|
case 45:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 134 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
|
|
||||||
{ rec_deblist(); }
|
{ rec_deblist(); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 46:
|
case 46:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 137 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
|
|
||||||
{ scope_fin(); }
|
{ scope_fin(); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 47:
|
case 47:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 139 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
|
|
||||||
{ printf("*** Warning : Export List not yet processed\n");
|
{ printf("*** Warning : Export List not yet processed\n");
|
||||||
rec_newent(); scope_fin() ; }
|
rec_newent(); scope_fin() ; }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 48:
|
case 48:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 144 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
|
|
||||||
{ rec_ident(); }
|
{ rec_ident(); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 49:
|
case 49:
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 147 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
|
|
||||||
{ rec_type (); }
|
{ rec_type (); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
/* Line 1792 of yacc.c */
|
|
||||||
#line 1570 "step.tab.c"
|
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
/* User semantic actions sometimes alter yychar, and that requires
|
/* User semantic actions sometimes alter yychar, and that requires
|
||||||
|
@ -30,8 +30,8 @@
|
|||||||
This special exception was added by the Free Software Foundation in
|
This special exception was added by the Free Software Foundation in
|
||||||
version 2.2 of Bison. */
|
version 2.2 of Bison. */
|
||||||
|
|
||||||
#ifndef YY_STEP_STEP_TAB_H_INCLUDED
|
#ifndef YY_STEP_D_ABV_OCCT_OCCT_SRC_STEPFILE_STEP_TAB_H_INCLUDED
|
||||||
# define YY_STEP_STEP_TAB_H_INCLUDED
|
# define YY_STEP_D_ABV_OCCT_OCCT_SRC_STEPFILE_STEP_TAB_H_INCLUDED
|
||||||
/* Enabling traces. */
|
/* Enabling traces. */
|
||||||
#ifndef YYDEBUG
|
#ifndef YYDEBUG
|
||||||
# define YYDEBUG 0
|
# define YYDEBUG 0
|
||||||
@ -90,4 +90,4 @@ int stepparse ();
|
|||||||
#endif
|
#endif
|
||||||
#endif /* ! YYPARSE_PARAM */
|
#endif /* ! YYPARSE_PARAM */
|
||||||
|
|
||||||
#endif /* !YY_STEP_STEP_TAB_H_INCLUDED */
|
#endif /* !YY_STEP_D_ABV_OCCT_OCCT_SRC_STEPFILE_STEP_TAB_H_INCLUDED */
|
||||||
|
@ -13,43 +13,20 @@
|
|||||||
commercial license or contractual agreement.
|
commercial license or contractual agreement.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
%code top {
|
||||||
|
// This file is part of Open CASCADE Technology software library.
|
||||||
|
// This file is generated, do not modify it directly; edit source file step.yacc instead.
|
||||||
|
}
|
||||||
|
|
||||||
%token STEP HEADER ENDSEC DATA ENDSTEP SCOPE ENDSCOPE ENTITY TYPE INTEGER FLOAT IDENT TEXT NONDEF ENUM HEXA QUID
|
%token STEP HEADER ENDSEC DATA ENDSTEP SCOPE ENDSCOPE ENTITY TYPE INTEGER FLOAT IDENT TEXT NONDEF ENUM HEXA QUID
|
||||||
%start stepf
|
%start stepf
|
||||||
%{
|
%{
|
||||||
#include "recfile.ph" /* definitions des types d'arguments */
|
#include "recfile.ph" /* definitions des types d'arguments */
|
||||||
#include "recfile.pc" /* la-dedans, tout y est */
|
#include "recfile.pc" /* la-dedans, tout y est */
|
||||||
/*
|
|
||||||
#define stepparse STEPparse
|
|
||||||
#define steplex STEPlex
|
|
||||||
#define stepwrap STEPwrap
|
|
||||||
#define steprestart STEPrestart
|
|
||||||
#define steplex STEPlex
|
|
||||||
#define steplval STEPlval
|
|
||||||
#define stepval STEPval
|
|
||||||
#define stepchar STEPchar
|
|
||||||
#define stepdebug STEPdebug
|
|
||||||
#define stepnerrs STEPnerrs
|
|
||||||
#define steperror STEPerror
|
|
||||||
*/
|
|
||||||
#define stepclearin yychar = -1
|
#define stepclearin yychar = -1
|
||||||
#define steperrok yyerrflag = 0
|
#define steperrok yyerrflag = 0
|
||||||
|
|
||||||
/*
|
|
||||||
#define stepin STEPin
|
|
||||||
#define yyerrflag STEPerrflag
|
|
||||||
#define yyerrstatus STEPerrflag
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* ABV 19.12.00: merging porting modifications by POP (for WNT, AIX) */
|
|
||||||
#if defined(WNT) && !defined(MSDOS)
|
|
||||||
#define MSDOS WNT
|
|
||||||
#endif
|
|
||||||
#if defined(_AIX)
|
|
||||||
#include <malloc.h>
|
|
||||||
#define alloca malloc
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// disable MSVC warnings in bison code
|
// disable MSVC warnings in bison code
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma warning(disable:4244 4131 4127 4702)
|
#pragma warning(disable:4244 4131 4127 4702)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user