Regenerated bison and Flex files.
Flex: 2.6.4 dev (august 2024)
Bison: 3.7.4 release
# 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})
-// 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
// 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
#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)
parser::syntax_error::~syntax_error () YY_NOEXCEPT YY_NOTHROW
{}
- /*---------------.
- | symbol kinds. |
- `---------------*/
+ /*---------.
+ | symbol. |
+ `---------*/
// basic_symbol.
template <typename Base>
{}
template <typename Base>
- parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, YY_RVREF (semantic_type) v)
+ parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, YY_RVREF (value_type) v)
: Base (t)
, value (YY_MOVE (v))
{}
+
template <typename Base>
parser::symbol_kind_type
parser::basic_symbol<Base>::type_get () const YY_NOEXCEPT
return this->kind ();
}
+
template <typename Base>
bool
parser::basic_symbol<Base>::empty () const YY_NOEXCEPT
}
// 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;
}
return kind_;
}
+
parser::symbol_kind_type
parser::by_kind::type_get () const YY_NOEXCEPT
{
}
+
// by_state.
parser::by_state::by_state () YY_NOEXCEPT
: state (empty_state)
YY_SYMBOL_PRINT (yymsg, yysym);
// User destructor.
- YYUSE (yysym.kind ());
+ YY_USE (yysym.kind ());
}
#if YYDEBUG
parser::yy_print_ (std::ostream& yyo, const basic_symbol<Base>& yysym) const
{
std::ostream& yyoutput = yyo;
- YYUSE (yyoutput);
+ YY_USE (yyoutput);
if (yysym.empty ())
yyo << "empty symbol";
else
symbol_kind_type yykind = yysym.kind ();
yyo << (yykind < YYNTOKENS ? "token" : "nterm")
<< ' ' << yysym.name () << " (";
- YYUSE (yykind);
+ YY_USE (yykind);
yyo << ')';
}
}
}
void
- parser::yypop_ (int n)
+ parser::yypop_ (int n) YY_NOEXCEPT
{
yystack_.pop (n);
}
}
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_;
}
+
+
+
+
const short parser::yypact_ninf_ = -134;
const signed char parser::yytable_ninf_ = -1;
-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
};
#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.
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;
}
-// 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
// 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
/* 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
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;
};
-#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
};
/// 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;
typedef Base super_type;
/// Default constructor.
- basic_symbol ()
+ basic_symbol () YY_NOEXCEPT
: value ()
{}
/// 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 ()
clear ();
}
+
+
/// Destroy contents, and record that is empty.
- void clear ()
+ void clear () YY_NOEXCEPT
{
Base::clear ();
}
void move (basic_symbol& s);
/// The semantic value.
- semantic_type value;
+ value_type value;
private:
#if YY_CPLUSPLUS < 201103L
/// Type access provider for token (enum) based symbols.
struct by_kind
{
+ /// The symbol kind as needed by the constructor.
+ typedef token_kind_type kind_type;
+
/// Default constructor.
- by_kind ();
+ by_kind () YY_NOEXCEPT;
#if 201103L <= YY_CPLUSPLUS
/// Move constructor.
- by_kind (by_kind&& that);
+ by_kind (by_kind&& that) YY_NOEXCEPT;
#endif
/// Copy constructor.
- by_kind (const by_kind& that);
-
- /// The symbol kind as needed by the constructor.
- typedef token_kind_type kind_type;
+ 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);
/// 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.
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
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_[];
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)
{}
class slice
{
public:
- slice (const stack& stack, index_type range)
+ slice (const stack& stack, index_type range) YY_NOEXCEPT
: stack_ (stack)
, range_ (range)
{}
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
+
+/* A lexical scanner generated by flex */
+#line 88 "/home/coder/work/OCCT/src/ExpToCasExe/exptocas.lex"
// Pre-include stdlib.h to avoid redefinition of integer type macros (INT8_MIN and similar in generated code)
#if !defined(_MSC_VER) || (_MSC_VER >= 1600) // Visual Studio 2010+
#include "stdint.h"
#endif
-#define YY_INT_ALIGNED short int
-/* A lexical scanner generated by flex */
+/* Target: C/C++ */
+/* START of m4 controls */
+/* M4_YY_TABLES_VERIFY = 0 */
+/* M4_MODE_NO_DO_STDINIT */
+/* M4_MODE_NO_YYTEXT_IS_ARRAY */
+/* M4_MODE_NO_YYMORE_USED */
+/* M4_MODE_NO_REAL_FULLSPD */
+/* M4_MODE_NO_REAL_FULLTBL */
+/* M4_MODE_NO_CPP_USE_READ */
+/* M4_MODE_NO_VARIABLE_TRAILING_CONTEXT_RULES */
+/* M4_MODE_FIND_ACTION_REJECT_REALLY_USED */
+/* M4_MODE_NO_USES_REJECT */
+/* M4_MODE_USEMECS */
+/* M4_MODE_FIND_ACTION_COMPRESSED */
+/* M4_MODE_NO_FULLSPD */
+/* M4_MODE_NO_BOL_NEEDED */
+/* M4_MODE_USEECS */
+/* M4_MODE_GENTABLES */
+/* M4_MODE_INTERACTIVE */
+/* M4_MODE_NO_FULLSPD_OR_FULLTBL */
+/* M4_MODE_FIND_ACTION_REJECT_OR_INTERACTIVE */
+/* M4_MODE_YYCLASS */
+/* M4_MODE_NO_YYWRAP */
+/* M4_MODE_INTERACTIVE */
+/* M4_MODE_CXX_ONLY */
+/* M4_MODE_PREFIX = exptocas */
+/* M4_YY_NO_UNISTD_H */
+/* M4_MODE_NO_REWRITE */
+/* END of m4 controls */
+
+
+
+
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define FLEX_BETA
#endif
+
+
+
+
+
+
+
+
+
+
+
+
+
/* The c++ scanner is a mess. The FlexLexer.h header file relies on the
* following macro. This is required in order to pass the c++-multiple-scanners
* test in the regression suite. We get reports that it breaks inheritance.
*/
#define yyFlexLexer exptocasFlexLexer
+
+
+
+
+
+
+
+
#ifdef yyalloc
#define exptocasalloc_ALREADY_DEFINED
#else
#define yyalloc exptocasalloc
#endif
+
#ifdef yyrealloc
#define exptocasrealloc_ALREADY_DEFINED
#else
#define yyrealloc exptocasrealloc
#endif
+
#ifdef yyfree
#define exptocasfree_ALREADY_DEFINED
#else
#define yyfree exptocasfree
#endif
+
+
+
+
+
+
+
/* First, we deal with platform-specific or compiler-specific issues. */
/* begin standard C headers. */
+
+
/* end standard C headers. */
-/* flex integer type definitions */
+/* begin standard C++ headers. */
+
+#include <iostream>
+#include <errno.h>
+#include <cstdlib>
+#include <cstdio>
+#include <cstring>
+/* end standard C++ headers. */
-#ifndef FLEXINT_H
-#define FLEXINT_H
-/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+/* flex integer type definitions */
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#ifndef YYFLEX_INTTYPES_DEFINED
+#define YYFLEX_INTTYPES_DEFINED
-/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
- */
-#ifndef __STDC_LIMIT_MACROS
-#define __STDC_LIMIT_MACROS 1
-#endif
+/* Prefer C99 integer types if available. */
+# if defined(__cplusplus) && __cplusplus >= 201103L
+#include <cstdint>
+# define YYFLEX_USE_STDINT
+# endif
+# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+/* Include <inttypes.h> and not <stdint.h> because Solaris 2.6 has the former
+ * and not the latter.
+ */
#include <inttypes.h>
+# define YYFLEX_USE_STDINT
+# else
+# if defined(_MSC_VER) && _MSC_VER >= 1600
+/* Visual C++ 2010 does not define __STDC_VERSION__ and has <stdint.h> but not
+ * <inttypes.h>.
+ */
+#include <stdint.h>
+# define YYFLEX_USE_STDINT
+# endif
+# endif
+# ifdef YYFLEX_USE_STDINT
typedef int8_t flex_int8_t;
typedef uint8_t flex_uint8_t;
typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
-#else
-typedef signed char flex_int8_t;
+# else
+typedef unsigned char flex_uint8_t;
typedef short int flex_int16_t;
-typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
+# ifdef __STDC__
+typedef signed char flex_int8_t;
+/* ISO C only requires at least 16 bits for int. */
+# ifdef __cplusplus
+#include <climits>
+# else
+#include <limits.h>
+# endif
+# if UINT_MAX >= 4294967295
+# define YYFLEX_INT32_DEFINED
+typedef int flex_int32_t;
typedef unsigned int flex_uint32_t;
+# endif
+# else
+typedef char flex_int8_t;
+# endif
+# ifndef YYFLEX_INT32_DEFINED
+typedef long int flex_int32_t;
+typedef unsigned long int flex_uint32_t;
+# endif
+# endif
+#endif /* YYFLEX_INTTYPES_DEFINED */
-/* Limits of integral types. */
-#ifndef INT8_MIN
-#define INT8_MIN (-128)
-#endif
-#ifndef INT16_MIN
-#define INT16_MIN (-32767-1)
-#endif
-#ifndef INT32_MIN
-#define INT32_MIN (-2147483647-1)
-#endif
-#ifndef INT8_MAX
-#define INT8_MAX (127)
-#endif
-#ifndef INT16_MAX
-#define INT16_MAX (32767)
-#endif
-#ifndef INT32_MAX
-#define INT32_MAX (2147483647)
-#endif
-#ifndef UINT8_MAX
-#define UINT8_MAX (255U)
-#endif
-#ifndef UINT16_MAX
-#define UINT16_MAX (65535U)
-#endif
-#ifndef UINT32_MAX
-#define UINT32_MAX (4294967295U)
-#endif
-
-#ifndef SIZE_MAX
-#define SIZE_MAX (~(size_t)0)
-#endif
-
-#endif /* ! C99 */
-
-#endif /* ! FLEXINT_H */
-
-/* begin standard C++ headers. */
-#include <iostream>
-#include <errno.h>
-#include <cstdlib>
-#include <cstdio>
-#include <cstring>
-/* end standard C++ headers. */
/* TODO: this is always defined, so inline it */
#define yyconst const
/* Returned upon end-of-file. */
#define YY_NULL 0
+
/* Promotes a possibly negative, possibly signed char to an
* integer in range [0..255] for use as an array index.
*/
#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
+#define yybegin(s) (yy_start) = 1 + 2 * (s)
+/* Legacy interface */
#define BEGIN (yy_start) = 1 + 2 *
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
+#define yystart() (((yy_start) - 1) / 2)
+/* Legacy interfaces */
#define YY_START (((yy_start) - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
-/* Size of default input buffer. */
-#ifndef YY_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k.
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
- * Ditto for the __ia64__ case accordingly.
- */
-#define YY_BUF_SIZE 32768
-#else
-#define YY_BUF_SIZE 16384
-#endif /* __ia64__ */
-#endif
-/* The state buf must be large enough to hold one state per character in the main buffer.
+
+/* The state buf must be large enough to hold one state per character in the main buffer,
+ * plus the start state, plus the two end-of-buffer byte states.
*/
-#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
+#define YY_STATE_BUF_EXTRA_SPACE 3
+#define YY_STATE_BUF_SIZE (YY_BUF_SIZE + YY_STATE_BUF_EXTRA_SPACE)
+
+
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *yybuffer;
+/* Legacy interface */
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
typedef size_t yy_size_t;
#endif
+
extern int yyleng;
+
+
+
+
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
-#define unput(c) yyunput( c, (yytext_ptr) )
+#define yyunput(c) yyunput_r( c, (yytext_ptr) )
+/* Legacy interface */
+#define unput(c) yyunput_r( c, (yytext_ptr) )
+
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
{
+
std::streambuf* yy_input_file;
char *yy_ch_buf; /* input buffer */
* If so, '^' rules will be active on the next match, otherwise
* not.
*/
- int yy_at_bol;
+ int yyatbol;
- int yy_bs_lineno; /**< The line count. */
- int yy_bs_column; /**< The column count. */
+ int yy_bs_lineno; /**< The line count. */
+ int yy_bs_column; /**< The column count. */
/* Whether to try to fill the input buffer when we reach the
* end of it.
};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+
+
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
* "scanner state".
*
* Returns the top of the stack, or NULL.
*/
-#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
+#define yy_current_buffer() ( (yy_buffer_stack) \
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
: NULL)
+/* Legacy interface */
+#define YY_CURRENT_BUFFER yy_current_buffer()
/* Same as previous macro, but useful when we know that the buffer stack is not
* NULL or when we need an lvalue. For internal use only.
*/
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
+
+
+
void *yyalloc ( yy_size_t );
void *yyrealloc ( void *, yy_size_t );
void yyfree ( void * );
+
#define yy_new_buffer yy_create_buffer
-#define yy_set_interactive(is_interactive) \
+#define yy_set_interactive(is_interactive) { \
+ if ( yy_current_buffer() == NULL ) { \
+ yyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+}
+#define yysetbol(at_bol) \
{ \
- if ( ! YY_CURRENT_BUFFER ){ \
- yyensure_buffer_stack (); \
+ if ( yy_current_buffer() == NULL ) { \
+ yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \
- YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
- }
+ YY_CURRENT_BUFFER_LVALUE->yyatbol = at_bol; \
+}
+#define yyatbol() (YY_CURRENT_BUFFER_LVALUE->yyatbol)
+/* Legacy interface */
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yyatbol)
#define yy_set_bol(at_bol) \
{ \
- if ( ! YY_CURRENT_BUFFER ){\
- yyensure_buffer_stack (); \
+ if ( yy_current_buffer() == NULL ) { \
+ yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \
- YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
- }
-#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+ YY_CURRENT_BUFFER_LVALUE->yyatbol = at_bol; \
+}
+
/* Begin user sect3 */
+
+
+
#define YY_SKIP_YYWRAP
+
+
typedef flex_uint8_t YY_CHAR;
+
#define yytext_ptr yytext
#define YY_INTERACTIVE
+
+
+
+
+
+
+
+
#include <FlexLexer.h>
-inline int yyFlexLexer::yywrap() { return 1; }
+int yyFlexLexer::yywrap() { return 1;}
+
+
int yyFlexLexer::yylex()
{
LexerError( "yyFlexLexer::yylex invoked but %option yyclass used" );
#define YY_DECL int exptocas::scanner::yylex()
+
+
+
+
+/* %% [1.5] DFA */
+/* START of m4 controls */
+/* M4_MODE_NO_NULTRANS */
+/* M4_MODE_NO_NULTRANS_FULLTBL */
+/* M4_MODE_NO_NULTRANS_FULLSPD */
+/* END of m4 controls */
+
+/* START of Flex-generated definitions */
+#define YY_NUM_RULES 56
+#define YY_END_OF_BUFFER 57
+#define YY_JAMBASE 413
+#define YY_JAMSTATE 305
+#define YY_NUL_EC 1
+#define YY_OFFSET_TYPE flex_int16_t
+/* END of Flex-generated definitions */
+
+
+
+
+
+struct yy_trans_info
+ {
+ /* We require that yy_verify and yy_nxt must be of the same size int. */
+
+
+ /* We generate a bogus 'struct yy_trans_info' data type
+ * so we can guarantee that it is always declared in the skel.
+ * This is so we can compile "sizeof(struct yy_trans_info)"
+ * in any scanner.
+ */
+ flex_int32_t yy_verify;
+ flex_int32_t yy_nxt;
+
+ };
+
+
+
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
+ do { \
(yytext_ptr) = yy_bp; \
+ \
yyleng = (int) (yy_cp - yy_bp); \
+ \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
- (yy_c_buf_p) = yy_cp;
-#define YY_NUM_RULES 56
-#define YY_END_OF_BUFFER 57
-/* This struct is not used in this scanner,
- but its presence is necessary. */
-struct yy_trans_info
- {
- flex_int32_t yy_verify;
- flex_int32_t yy_nxt;
- };
-static const flex_int16_t yy_accept[306] =
- { 0,
+ \
+ (yy_c_buf_p) = yy_cp; \
+ } while(0)
+
+
+
+
+
+/* %% [2.0] data tables for the DFA are inserted here */
+
+
+
+
+
+
+
+
+/* footprint: 29833 bytes */
+/* tblend: 453 */
+/* numecs: 40 */
+/* num_rules: 56 */
+/* lastdfa: 304 */
+
+/* m4 controls begin */
+/* M4_MODE_HAS_BACKING_UP */
+/* M4_MODE_NEED_YY_CP */
+/* m4 controls end */
+
+
+
+
+
+static const flex_int16_t yy_accept[306] = { 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 44, 44, 57, 54, 52, 55, 40, 40,
54, 39, 53, 53, 53, 53, 53, 53, 53, 53,
53, 0, 53, 0, 53, 0, 53, 0, 53, 0,
53, 0, 53, 51, 0
- } ;
+};
+
+
-static const YY_CHAR yy_ec[256] =
- { 0,
+
+/* Character equivalence-class mapping */
+static const YY_CHAR yy_ec[256] = { 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
- } ;
+};
+
+
+
-static const YY_CHAR yy_meta[41] =
- { 0,
+/* Character meta-equivalence-class mappings */
+static const YY_CHAR yy_meta[41] = { 0,
1, 2, 3, 2, 2, 2, 1, 1, 2, 4,
2, 2, 5, 5, 5, 5, 4, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 1, 1, 4, 4, 2
- } ;
+};
+
+
+
+
+
+
+
+
-static const flex_int16_t yy_base[316] =
- { 0,
+
+static const flex_int16_t yy_base[316] = { 0,
0, 0, 24, 26, 29, 35, 52, 54, 45, 51,
61, 62, 79, 119, 412, 413, 409, 413, 403, 413,
400, 398, 75, 79, 381, 0, 381, 373, 379, 45,
44, 60, 37, 413, 413, 199, 204, 209, 214, 216,
221, 223, 228, 233, 237
- } ;
+};
+
+
+
-static const flex_int16_t yy_def[316] =
- { 0,
+static const flex_int16_t yy_def[316] = { 0,
305, 1, 1, 1, 1, 1, 306, 306, 307, 307,
308, 308, 309, 309, 305, 305, 305, 305, 305, 305,
305, 310, 310, 310, 310, 310, 310, 310, 310, 310,
310, 305, 310, 305, 0, 305, 305, 305, 305, 305,
305, 305, 305, 305, 305
- } ;
+};
-static const flex_int16_t yy_nxt[454] =
- { 0,
+
+
+
+static const flex_int16_t yy_nxt[454] = { 0,
16, 17, 18, 16, 19, 20, 16, 20, 21, 22,
20, 20, 23, 24, 25, 26, 27, 28, 26, 26,
29, 26, 30, 26, 31, 32, 26, 26, 33, 34,
305, 305, 305, 305, 305, 305, 305, 305, 305, 305,
305, 305, 305, 305, 305, 305, 305, 305, 305, 305,
305, 305, 305
- } ;
+};
+
-static const flex_int16_t yy_chk[454] =
- { 0,
+
+
+static const flex_int16_t yy_chk[454] = { 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
305, 305, 305, 305, 305, 305, 305, 305, 305, 305,
305, 305, 305, 305, 305, 305, 305, 305, 305, 305,
305, 305, 305
- } ;
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/* The intent behind this definition is that it'll catch
- * any uses of REJECT which flex missed.
+ * any uses of yyreject() which flex missed.
*/
+#define yyreject() reject_used_but_not_detected
#define REJECT reject_used_but_not_detected
+
+
+
+
+
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
-// Created: Thu Oct 28 12:21:16 1999
-// Author: Andrey BETENEV
+
+
+
+/* %% [3.0] static declarations conditional on mode switches go here */
+
+// Created: Thu Oct 28 12:21:16 1999
+// Author: Andrey BETENEV
// Copyright (c) 1999-2020 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
/*
c++ generate C++ parser class
*/
-#define YY_NO_UNISTD_H 1
+
+
+
// Tell flex which function to define
#ifdef YY_DECL
/* Section 2 */
/* parsing rules */
+
+
#define INITIAL 0
#define TYP 1
#define ENT 2
#define RULE 5
#define FUN 6
-#ifndef YY_NO_UNISTD_H
-/* Special case for "unistd.h", since it is non-ANSI. We include it way
- * down here because we want the user's section 1 to have been scanned first.
- * The user has a chance to override it with an option.
- */
-#include <unistd.h>
-#endif
-
+
+
+
+
+
#ifndef YY_EXTRA_TYPE
#define YY_EXTRA_TYPE void *
#endif
+
+
+
+
#ifndef yytext_ptr
static void yy_flex_strncpy ( char *, const char *, int );
#endif
static int yy_flex_strlen ( const char * );
#endif
-#ifndef YY_NO_INPUT
+
+
+#ifndef YY_NO_YYINPUT
#endif
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k */
-#define YY_READ_BUF_SIZE 16384
-#else
-#define YY_READ_BUF_SIZE 8192
-#endif /* __ia64__ */
+
+
+
+/*
+ * Amount of stuff to slurp up with each read.
+ * We assume the stdio library has already
+ * chosen a fit size foe whatever platform
+ * we're running on.
+ */
+#define YY_READ_BUF_SIZE BUFSIZ
+
+/* Size of default input buffer. We want to be able to fit two
+ * OS-level reads, but efficiency gains as the buffer size
+ * increases fall off after that
+ */
+#ifndef YY_BUF_SIZE
+#define YY_BUF_SIZE (2 * YY_READ_BUF_SIZE)
#endif
+
/* Copy whatever the last rule matched to the standard output. */
-#ifndef ECHO
-#define ECHO LexerOutput( yytext, yyleng )
+#ifndef yyecho
+
+
+#define yyecho() LexerOutput( yytext, yyleng )
+
+#endif
+/* Legacy interface */
+#define ECHO yyecho()
+
+
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
#endif
+
+
+
+void yyFlexLexer::LexerError( const char* msg ) {
+ std::cerr << msg << std::endl;
+ exit( YY_EXIT_FAILURE );
+}
+
+
+
+/* Report a fatal error. Legacy interface. */
+#ifndef YY_FATAL_ERROR
+
+
+#define YY_FATAL_ERROR(msg) LexerError( msg )
+
+#endif
+
+/* Legacy interface */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) do {result = yyread(buf, max_size );} while (0)
+
+
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
* is returned in "result".
*/
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
-\
- if ( (int)(result = LexerInput( (char *) buf, max_size )) < 0 ) \
+
+int yyFlexLexer::yyread(char *buf, size_t max_size) {
+
+
+ int result;
+
+
+
+ if ( (int)(result = LexerInput( (char *) buf, max_size )) < 0 ) {
YY_FATAL_ERROR( "input in flex scanner failed" );
+ }
+ return result;
+}
#endif
+
+
+
+
/* No semi-colon after return; correct usage is to write "yyterminate();" -
* we don't want an extra ';' after the "return" because that will cause
* some compilers to complain about unreachable statements.
#define yyterminate() return YY_NULL
#endif
+
+
/* Number of entries by which start-condition stack grows. */
#ifndef YY_START_STACK_INCR
#define YY_START_STACK_INCR 25
#endif
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) LexerError( msg )
-#endif
-/* end tables serialization structures and prototypes */
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
+
+
#define YY_DECL int yyFlexLexer::yylex()
+
#endif /* !YY_DECL */
+
/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
*/
#define YY_USER_ACTION
#endif
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK /*LINTED*/break;
-#endif
+
#define YY_RULE_SETUP \
- YY_USER_ACTION
+ YY_USER_ACTION
+
+
+
+
+
+
+
+
+
+
/** The main scanner function which does all the work.
*/
-YY_DECL
-{
+YY_DECL {
yy_state_type yy_current_state;
char *yy_cp, *yy_bp;
int yy_act;
- if ( !(yy_init) )
- {
+
+
+
+
+
+
+
+
+
+ if ( !(yy_init) ) {
(yy_init) = 1;
#ifdef YY_USER_INIT
YY_USER_INIT;
#endif
- if ( ! (yy_start) )
+ if ( ! (yy_start) ) {
(yy_start) = 1; /* first start state */
+ }
+ if ( ! yyin ) {
+
- if ( ! yyin )
yyin.rdbuf(std::cin.rdbuf());
- if ( ! yyout )
+ }
+ if ( ! yyout ) {
+
+
yyout.rdbuf(std::cout.rdbuf());
- if ( ! YY_CURRENT_BUFFER ) {
+ }
+ if ( yy_current_buffer() == NULL ) {
yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
yy_create_buffer( yyin, YY_BUF_SIZE );
}
+
+
yy_load_buffer_state( );
- }
+ }
+ /* open scope of user declarationns */
{
+/* %% [4.0] user's declarations go here */
+
+
+
+ while ( /*CONSTCOND*/1 ) { /* loops until end-of-file is reached */
+
+ yy_cp = (yy_c_buf_p);
+
+ /* Support of yytext. */
+ *yy_cp = (yy_hold_char);
+
+ /* yy_bp points to the position in yy_ch_buf of the start of
+ * the current run.
+ */
+ yy_bp = yy_cp;
+
+
+ /* Generate the code to find the start state. */
+
+
+ yy_current_state = (yy_start);
+
+ /* Set up for storing up states. */
+
+
+
+
+ yy_match:
+ /* Generate the code to find the next match. */
+
+
+
+
+
+
+ do {
+
+ int yy_c = *(yy_ec+YY_SC_TO_UI(*yy_cp));
+ /* Save the backing-up info \before/ computing the next state
+ * because we always compute one more state than needed - we
+ * always proceed until we reach a jam state
+ */
+
+
+
+ /* Generate code to keep backing-up information. */
+
+
+ if ( yy_accept[yy_current_state] ) {
+
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
- while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
- {
- yy_cp = (yy_c_buf_p);
- /* Support of yytext. */
- *yy_cp = (yy_hold_char);
- /* yy_bp points to the position in yy_ch_buf of the start of
- * the current run.
+
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) {
+ yy_current_state = (int) yy_def[yy_current_state];
+
+
+ /* We've arranged it so that templates are never chained
+ * to one another. This means we can afford to make a
+ * very simple test to see if we need to convert to
+ * yy_c's meta-equivalence class without worrying
+ * about erroneously looking up the meta-equivalence
+ * class twice
*/
- yy_bp = yy_cp;
- yy_current_state = (yy_start);
-yy_match:
- do
- {
- YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
- if ( yy_accept[yy_current_state] )
- {
- (yy_last_accepting_state) = yy_current_state;
- (yy_last_accepting_cpos) = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 306 )
- yy_c = yy_meta[yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
- ++yy_cp;
+ /* lastdfa + 2 == YY_JAMSTATE + 1 is the beginning of the templates */
+ if (yy_current_state >= YY_JAMSTATE + 1) {
+ yy_c = yy_meta[yy_c];
+ }
+
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+
+
+
+ ++yy_cp;
+
}
- while ( yy_base[yy_current_state] != 413 );
+ while ( yy_base[yy_current_state] != YY_JAMBASE );
+
+
+
+
+
+
+
+ yy_find_action:
+ /* code to find the action number goes here */
+
+
-yy_find_action:
yy_act = yy_accept[yy_current_state];
- if ( yy_act == 0 )
- { /* have to back up */
- yy_cp = (yy_last_accepting_cpos);
- yy_current_state = (yy_last_accepting_state);
- yy_act = yy_accept[yy_current_state];
+ if ( yy_act == 0 ) { /* have to back up */
+ yy_cp = (yy_last_accepting_cpos);
+ yy_current_state = (yy_last_accepting_state);
+ yy_act = yy_accept[yy_current_state];
}
- YY_DO_BEFORE_ACTION;
-do_action: /* This label is used only to access EOF actions. */
+ YY_DO_BEFORE_ACTION;
+
+
+
+ do_action: /* This label is used only to access EOF actions. */
+
+
+
+ switch ( yy_act ) { /* beginning of action switch */
+
- switch ( yy_act )
- { /* beginning of action switch */
case 0: /* must back up */
- /* undo the effects of YY_DO_BEFORE_ACTION */
- *yy_cp = (yy_hold_char);
- yy_cp = (yy_last_accepting_cpos);
- yy_current_state = (yy_last_accepting_state);
- goto yy_find_action;
+ /* undo the effects of YY_DO_BEFORE_ACTION */
+ *yy_cp = (yy_hold_char);
+
+ /* Backing-up info for compressed tables is taken \after/ */
+ /* yy_cp has been incremented for the next state. */
+ yy_cp = (yy_last_accepting_cpos);
+
+
-case 1:
+ yy_current_state = (yy_last_accepting_state);
+ goto yy_find_action;
+
+
+/* %% [5.0] user actions get inserted here */
+ case 1:
YY_RULE_SETUP
+
{ /* Eat line comments */ }
- YY_BREAK
-case 2:
+ /*LINTED*/break;
+ case 2:
YY_RULE_SETUP
+
{ ec_state = YYSTATE; BEGIN(COMM); }
- YY_BREAK
-case 3:
+ /*LINTED*/break;
+ case 3:
YY_RULE_SETUP
+
{ /* Eat multiline comments */ }
- YY_BREAK
-case 4:
+ /*LINTED*/break;
+ case 4:
YY_RULE_SETUP
+
{ BEGIN(ec_state); }
- YY_BREAK
-case 5:
+ /*LINTED*/break;
+ case 5:
YY_RULE_SETUP
+
{ return yylval->num = token::KSCHEM; }
- YY_BREAK
-case 6:
+ /*LINTED*/break;
+ case 6:
YY_RULE_SETUP
+
{ return yylval->num = token::KENDS; }
- YY_BREAK
-case 7:
+ /*LINTED*/break;
+ case 7:
YY_RULE_SETUP
+
{ BEGIN(TYP); return yylval->num = token::KTYP; }
- YY_BREAK
-case 8:
+ /*LINTED*/break;
+ case 8:
YY_RULE_SETUP
+
{ BEGIN(0); return yylval->num = token::KENDT; }
- YY_BREAK
-case 9:
+ /*LINTED*/break;
+ case 9:
YY_RULE_SETUP
+
{ BEGIN(ENT); return yylval->num = token::KENT; }
- YY_BREAK
-case 10:
+ /*LINTED*/break;
+ case 10:
YY_RULE_SETUP
+
{ BEGIN(0); return yylval->num = token::KENDE; }
- YY_BREAK
-case 11:
-case 12:
-case 13:
+ /*LINTED*/break;
+ case 11:
+ case 12:
+ case 13:
YY_RULE_SETUP
+
{ BEGIN(SKP); }
- YY_BREAK
-case 14:
+ /*LINTED*/break;
+ case 14:
YY_RULE_SETUP
+
{ /* eat contents of WHERE and DERIVE subclauses of ENTITY and TYPE */ }
- YY_BREAK
-case 15:
+ /*LINTED*/break;
+ case 15:
YY_RULE_SETUP
+
{ return yylval->num = token::KSEL; }
- YY_BREAK
-case 16:
+ /*LINTED*/break;
+ case 16:
YY_RULE_SETUP
+
{ return yylval->num = token::KENUM; }
- YY_BREAK
-case 17:
+ /*LINTED*/break;
+ case 17:
YY_RULE_SETUP
+
{ return yylval->num = token::KLIST; }
- YY_BREAK
-case 18:
+ /*LINTED*/break;
+ case 18:
YY_RULE_SETUP
+
{ return yylval->num = token::KARR; }
- YY_BREAK
-case 19:
+ /*LINTED*/break;
+ case 19:
YY_RULE_SETUP
+
{ return yylval->num = token::KSET; }
- YY_BREAK
-case 20:
+ /*LINTED*/break;
+ case 20:
YY_RULE_SETUP
+
{ return yylval->num = token::KBAG; }
- YY_BREAK
-case 21:
+ /*LINTED*/break;
+ case 21:
YY_RULE_SETUP
+
{ return yylval->num = token::KOF; }
- YY_BREAK
-case 22:
+ /*LINTED*/break;
+ case 22:
YY_RULE_SETUP
+
{ return yylval->num = token::KNUM; }
- YY_BREAK
-case 23:
+ /*LINTED*/break;
+ case 23:
YY_RULE_SETUP
+
{ return yylval->num = token::KINT; }
- YY_BREAK
-case 24:
+ /*LINTED*/break;
+ case 24:
YY_RULE_SETUP
+
{ return yylval->num = token::KDBL; }
- YY_BREAK
-case 25:
+ /*LINTED*/break;
+ case 25:
YY_RULE_SETUP
+
{ return yylval->num = token::KSTR; }
- YY_BREAK
-case 26:
+ /*LINTED*/break;
+ case 26:
YY_RULE_SETUP
+
{ return yylval->num = token::KLOG; }
- YY_BREAK
-case 27:
+ /*LINTED*/break;
+ case 27:
YY_RULE_SETUP
+
{ return yylval->num = token::KBOOL; }
- YY_BREAK
-case 28:
+ /*LINTED*/break;
+ case 28:
YY_RULE_SETUP
+
{ return yylval->num = token::KOPT; }
- YY_BREAK
-case 29:
+ /*LINTED*/break;
+ case 29:
YY_RULE_SETUP
+
{ return yylval->num = token::KUNIQ; }
- YY_BREAK
-case 30:
+ /*LINTED*/break;
+ case 30:
YY_RULE_SETUP
+
{ return yylval->num = token::KSELF; }
- YY_BREAK
-case 31:
+ /*LINTED*/break;
+ case 31:
YY_RULE_SETUP
+
{ return yylval->num = token::KABSTR; }
- YY_BREAK
-case 32:
+ /*LINTED*/break;
+ case 32:
YY_RULE_SETUP
+
{ return yylval->num = token::KSUBT; }
- YY_BREAK
-case 33:
+ /*LINTED*/break;
+ case 33:
YY_RULE_SETUP
+
{ return yylval->num = token::KSPRT; }
- YY_BREAK
-case 34:
+ /*LINTED*/break;
+ case 34:
YY_RULE_SETUP
+
{ return yylval->num = token::KANDOR; }
- YY_BREAK
-case 35:
+ /*LINTED*/break;
+ case 35:
YY_RULE_SETUP
+
{ return yylval->num = token::K1OF; }
- YY_BREAK
-case 36:
+ /*LINTED*/break;
+ case 36:
YY_RULE_SETUP
+
{ return yylval->num = token::KAND; }
- YY_BREAK
-case 37:
+ /*LINTED*/break;
+ case 37:
YY_RULE_SETUP
+
{ yylval->str = strdup ( yytext ); return token::NAME; }
- YY_BREAK
-case 38:
+ /*LINTED*/break;
+ case 38:
YY_RULE_SETUP
+
{ yylval->str = strdup ( yytext ); return token::NAME; }
- YY_BREAK
-case 39:
+ /*LINTED*/break;
+ case 39:
YY_RULE_SETUP
+
{ yylval->num = atoi ( yytext ); return token::NUMBER; }
- YY_BREAK
-case 40:
+ /*LINTED*/break;
+ case 40:
YY_RULE_SETUP
+
{ return yylval->num = yytext[0]; }
- YY_BREAK
-case 41:
+ /*LINTED*/break;
+ case 41:
YY_RULE_SETUP
+
{ BEGIN(FUN); fun_level++; }
- YY_BREAK
-case 42:
+ /*LINTED*/break;
+ case 42:
YY_RULE_SETUP
+
{ ec_state = YYSTATE; BEGIN(COMM); /* eat comments in functions */ }
- YY_BREAK
-case 43:
+ /*LINTED*/break;
+ case 43:
YY_RULE_SETUP
+
{ /* Eat line comments in functions */ }
- YY_BREAK
-case 44:
+ /*LINTED*/break;
+ case 44:
YY_RULE_SETUP
+
{ /* eat FUNCTIONs - skip IDs explicitly */ }
- YY_BREAK
-case 45:
+ /*LINTED*/break;
+ case 45:
/* rule 45 can match eol */
YY_RULE_SETUP
+
{ /* eat FUNCTIONs - skip strings explicitly */ }
- YY_BREAK
-case 46:
+ /*LINTED*/break;
+ case 46:
YY_RULE_SETUP
+
{ /* eat FUNCTIONs - skip all other symbols in functions */ }
- YY_BREAK
-case 47:
+ /*LINTED*/break;
+ case 47:
YY_RULE_SETUP
+
{ fun_level--; if ( ! fun_level ) BEGIN(0); }
- YY_BREAK
-case 48:
+ /*LINTED*/break;
+ case 48:
YY_RULE_SETUP
+
{ BEGIN(RULE); /* eat RULEs */ }
- YY_BREAK
-case 49:
+ /*LINTED*/break;
+ case 49:
YY_RULE_SETUP
+
{ /* eat RULEs */ }
- YY_BREAK
-case 50:
+ /*LINTED*/break;
+ case 50:
YY_RULE_SETUP
+
{ BEGIN(0); }
- YY_BREAK
-case 51:
+ /*LINTED*/break;
+ case 51:
/* rule 51 can match eol */
YY_RULE_SETUP
+
{ /* eat CONSTANTs */
char *s = yytext; /* but don't forget to count lines.. */
while ( *s ) if ( *(s++) == '\n' ) ec_linenum++;
}
- YY_BREAK
-case 52:
+ /*LINTED*/break;
+ case 52:
YY_RULE_SETUP
+
{ /* eat spaces */ }
- YY_BREAK
-case 53:
+ /*LINTED*/break;
+ case 53:
YY_RULE_SETUP
+
{ ec_error ( "unknown keyword ", yytext ); /* put unrecognized keywords to cerr */ }
- YY_BREAK
-case 54:
+ /*LINTED*/break;
+ case 54:
YY_RULE_SETUP
+
{ ec_error ( "unknown symbol ", yytext ); /* put unrecognized data to cerr */ }
- YY_BREAK
-case 55:
+ /*LINTED*/break;
+ case 55:
/* rule 55 can match eol */
YY_RULE_SETUP
+
{ ec_linenum++; /* count lines */ }
- YY_BREAK
-case 56:
+ /*LINTED*/break;
+ case 56:
YY_RULE_SETUP
-ECHO;
- YY_BREAK
-case YY_STATE_EOF(INITIAL):
-case YY_STATE_EOF(TYP):
-case YY_STATE_EOF(ENT):
-case YY_STATE_EOF(COMM):
-case YY_STATE_EOF(SKP):
-case YY_STATE_EOF(RULE):
-case YY_STATE_EOF(FUN):
- yyterminate();
-
- case YY_END_OF_BUFFER:
- {
- /* Amount of text matched not including the EOB char. */
- int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
-
- /* Undo the effects of YY_DO_BEFORE_ACTION. */
- *yy_cp = (yy_hold_char);
- YY_RESTORE_YY_MORE_OFFSET
-
- if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
- {
- /* We're scanning a new file or input source. It's
- * possible that this happened because the user
- * just pointed yyin at a new source and called
- * yylex(). If so, then we have to assure
- * consistency between YY_CURRENT_BUFFER and our
- * globals. Here is the right place to do so, because
- * this is the first action (other than possibly a
- * back-up) that will match for the new input source.
- */
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin.rdbuf();
- YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
- }
-
- /* Note that here we test for yy_c_buf_p "<=" to the position
- * of the first EOB in the buffer, since yy_c_buf_p will
- * already have been incremented past the NUL character
- * (since all states make transitions on EOB to the
- * end-of-buffer state). Contrast this with the test
- * in input().
- */
- if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
- { /* This was really a NUL. */
- yy_state_type yy_next_state;
- (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
-
- yy_current_state = yy_get_previous_state( );
-
- /* Okay, we're now positioned to make the NUL
- * transition. We couldn't have
- * yy_get_previous_state() go ahead and do it
- * for us because it doesn't know how to deal
- * with the possibility of jamming (and we don't
- * want to build jamming into it because then it
- * will run more slowly).
- */
+yyecho();
+ /*LINTED*/break;
+ case YY_STATE_EOF(INITIAL):
+ /* FALLTHROUGH */
+ case YY_STATE_EOF(TYP):
+ /* FALLTHROUGH */
+ case YY_STATE_EOF(ENT):
+ /* FALLTHROUGH */
+ case YY_STATE_EOF(COMM):
+ /* FALLTHROUGH */
+ case YY_STATE_EOF(SKP):
+ /* FALLTHROUGH */
+ case YY_STATE_EOF(RULE):
+ /* FALLTHROUGH */
+ case YY_STATE_EOF(FUN):
+ /* FALLTHROUGH */
+ yyterminate();
+
+ case YY_END_OF_BUFFER:
+ {
+ /* Amount of text matched not including the EOB char. */
+ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
+
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
+ *yy_cp = (yy_hold_char);
+ YY_RESTORE_YY_MORE_OFFSET
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) {
+ /* We're scanning a new file or input source. It's
+ * possible that this happened because the user
+ * just pointed yyin at a new source and called
+ * yylex(). If so, then we have to assure
+ * consistency between yy_current_buffer() and our
+ * globals. Here is the right place to do so, because
+ * this is the first action (other than possibly a
+ * back-up) that will match for the new input source.
+ */
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- yy_next_state = yy_try_NUL_trans( yy_current_state );
- yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin.rdbuf();
- if ( yy_next_state )
- {
- /* Consume the NUL. */
- yy_cp = ++(yy_c_buf_p);
- yy_current_state = yy_next_state;
- goto yy_match;
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
}
- else
- {
- yy_cp = (yy_c_buf_p);
- goto yy_find_action;
- }
- }
-
- else switch ( yy_get_next_buffer( ) )
- {
- case EOB_ACT_END_OF_FILE:
- {
- (yy_did_buffer_switch_on_eof) = 0;
-
- if ( yywrap( ) )
- {
- /* Note: because we've taken care in
- * yy_get_next_buffer() to have set up
- * yytext, we can now set up
- * yy_c_buf_p so that if some total
- * hoser (like flex itself) wants to
- * call the scanner after we return the
- * YY_NULL, it'll still work - another
- * YY_NULL will get returned.
+ /* Note that here we test for yy_c_buf_p "<=" to the position
+ * of the first EOB in the buffer, since yy_c_buf_p will
+ * already have been incremented past the NUL character
+ * (since all states make transitions on EOB to the
+ * end-of-buffer state). Contrast this with the test
+ * in input().
+ */
+ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */
+ yy_state_type yy_next_state;
+
+ (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state( );
+
+ /* Okay, we're now positioned to make the NUL
+ * transition. We couldn't have
+ * yy_get_previous_state() go ahead and do it
+ * for us because it doesn't know how to deal
+ * with the possibility of jamming (and we don't
+ * want to build jamming into it because then it
+ * will run more slowly).
*/
- (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
- yy_act = YY_STATE_EOF(YY_START);
- goto do_action;
- }
+ yy_next_state = yy_try_NUL_trans( yy_current_state );
- else
- {
- if ( ! (yy_did_buffer_switch_on_eof) )
- YY_NEW_FILE;
- }
- break;
- }
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
- case EOB_ACT_CONTINUE_SCAN:
- (yy_c_buf_p) =
- (yytext_ptr) + yy_amount_of_matched_text;
+ if ( yy_next_state ) {
+ /* Consume the NUL. */
+ yy_cp = ++(yy_c_buf_p);
+ yy_current_state = yy_next_state;
+ goto yy_match;
+ } else {
+
+
- yy_current_state = yy_get_previous_state( );
- yy_cp = (yy_c_buf_p);
- yy_bp = (yytext_ptr) + YY_MORE_ADJ;
- goto yy_match;
- case EOB_ACT_LAST_MATCH:
- (yy_c_buf_p) =
- &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
- yy_current_state = yy_get_previous_state( );
- yy_cp = (yy_c_buf_p);
- yy_bp = (yytext_ptr) + YY_MORE_ADJ;
- goto yy_find_action;
- }
- break;
- }
+ /* Still need to initialize yy_cp, though
+ * yy_current_state was set up by
+ * yy_get_previous_state().
+ */
+ yy_cp = (yy_c_buf_p);
+
- default:
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--no action found" );
- } /* end of action switch */
+ goto yy_find_action;
+ }
+ } else { /* not a NUL */
+ switch ( yy_get_next_buffer( ) ) {
+ case EOB_ACT_END_OF_FILE:
+ (yy_did_buffer_switch_on_eof) = 0;
+
+ if ( yywrap( ) ) {
+ /* Note: because we've taken care in
+ * yy_get_next_buffer() to have set up
+ * yytext, we can now set up
+ * yy_c_buf_p so that if some total
+ * hoser (like flex itself) wants to
+ * call the scanner after we return the
+ * YY_NULL, it'll still work - another
+ * YY_NULL will get returned.
+ */
+ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
+
+ yy_act = YY_STATE_EOF(yystart());
+ goto do_action;
+ } else {
+ if ( ! (yy_did_buffer_switch_on_eof) ) {
+ YY_NEW_FILE;
+ }
+ }
+ break;
+ case EOB_ACT_CONTINUE_SCAN:
+ (yy_c_buf_p) =
+ (yytext_ptr) + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state( );
+
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ goto yy_match;
+
+ case EOB_ACT_LAST_MATCH:
+ (yy_c_buf_p) =
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
+
+ yy_current_state = yy_get_previous_state( );
+
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ goto yy_find_action;
+ default:
+ YY_FATAL_ERROR("unexpected return value from yy_get_next_buffer()");
+ } /* end EOB inner switch */
+ } /* end if */
+ break;
+ } /* case YY_END_OF_BUFFER */
+ default:
+ YY_FATAL_ERROR("fatal flex scanner internal error--no action found" );
+ } /* end of action switch */
} /* end of scanning one token */
} /* end of user's declarations */
} /* end of yylex */
+
+
/* The contents of this function are C++ specific, so the () macro is not used.
* This constructor simply maintains backward compatibility.
* DEPRECATED
/* The contents of this function are C++ specific, so the () macro is not used.
*/
-void yyFlexLexer::ctor_common()
-{
+void yyFlexLexer::ctor_common() {
yy_c_buf_p = 0;
yy_init = 0;
yy_start = 0;
- yy_flex_debug = 0;
+ yyflexdebug = 0;
yylineno = 1; // this will only get updated if %option yylineno
yy_did_buffer_switch_on_eof = 0;
yy_buffer_stack_top = 0;
yy_buffer_stack_max = 0;
+
+
yy_state_buf = 0;
}
/* The contents of this function are C++ specific, so the () macro is not used.
*/
-yyFlexLexer::~yyFlexLexer()
-{
+yyFlexLexer::~yyFlexLexer() {
delete [] yy_state_buf;
yyfree( yy_start_stack );
- yy_delete_buffer( YY_CURRENT_BUFFER );
+ yy_delete_buffer( yy_current_buffer() );
yyfree( yy_buffer_stack );
}
/* The contents of this function are C++ specific, so the () macro is not used.
*/
-void yyFlexLexer::switch_streams( std::istream& new_in, std::ostream& new_out )
-{
+void yyFlexLexer::switch_streams( std::istream& new_in, std::ostream& new_out ) {
// was if( new_in )
yy_delete_buffer( YY_CURRENT_BUFFER );
yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) );
int yyFlexLexer::LexerInput( char* buf, int max_size )
#endif
{
- if ( yyin.eof() || yyin.fail() )
+ if ( yyin.eof() || yyin.fail() ) {
return 0;
-
+ }
#ifdef YY_INTERACTIVE
yyin.get( buf[0] );
- if ( yyin.eof() )
+ if ( yyin.eof() ) {
return 0;
-
- if ( yyin.bad() )
+ }
+ if ( yyin.bad() ) {
return -1;
-
+ }
return 1;
#else
(void) yyin.read( buf, max_size );
- if ( yyin.bad() )
+ if ( yyin.bad() ) {
return -1;
- else
- return yyin.gcount();
+ } else {
+ return (int)yyin.gcount();
+ }
#endif
}
-void yyFlexLexer::LexerOutput( const char* buf, int size )
-{
+void yyFlexLexer::LexerOutput( const char* buf, int size ) {
(void) yyout.write( buf, size );
}
+
+
+
/* yy_get_next_buffer - try to read in a new buffer
*
* Returns a code representing an action:
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
+
+
int yyFlexLexer::yy_get_next_buffer()
+
{
- char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
char *source = (yytext_ptr);
int number_to_move, i;
int ret_val;
- if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--end of buffer missed" );
-
- if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
- { /* Don't try to fill the buffer, so this is an EOF. */
- if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
- {
+ if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) {
+ YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" );
+ }
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) {
+ /* Don't try to fill the buffer, so this is an EOF. */
+ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) {
/* We matched a single character, the EOB, so
* treat this as a final EOF.
*/
return EOB_ACT_END_OF_FILE;
- }
-
- else
- {
+ } else {
/* We matched some text prior to the EOB, first
* process it.
*/
return EOB_ACT_LAST_MATCH;
- }
}
+ }
/* Try to read more data. */
/* First move last chars to start of buffer. */
number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
- for ( i = 0; i < number_to_move; ++i )
+ for ( i = 0; i < number_to_move; ++i ) {
*(dest++) = *(source++);
-
- if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ }
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) {
/* don't do the read, it's not guaranteed to return an EOF,
* just force an EOF
*/
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
-
- else
- {
- int num_to_read =
+ } else {
+ int num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
- while ( num_to_read <= 0 )
- { /* Not enough room in the buffer - grow it. */
+ while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */
/* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
+ yybuffer b = YY_CURRENT_BUFFER_LVALUE;
int yy_c_buf_p_offset =
(int) ((yy_c_buf_p) - b->yy_ch_buf);
- if ( b->yy_is_our_buffer )
- {
+ if ( b->yy_is_our_buffer ) {
int new_size = b->yy_buf_size * 2;
- if ( new_size <= 0 )
+ if ( new_size <= 0 ) {
b->yy_buf_size += b->yy_buf_size / 8;
- else
+ } else {
b->yy_buf_size *= 2;
-
+ }
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
yyrealloc( (void *) b->yy_ch_buf,
(yy_size_t) (b->yy_buf_size + 2) );
- }
- else
+ } else {
/* Can't grow it, we don't own it. */
b->yy_ch_buf = NULL;
-
- if ( ! b->yy_ch_buf )
+ }
+ if ( ! b->yy_ch_buf ) {
YY_FATAL_ERROR(
"fatal error - scanner input buffer overflow" );
-
+ }
(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
number_to_move - 1;
- }
+ }
- if ( num_to_read > YY_READ_BUF_SIZE )
+ if ( num_to_read > YY_READ_BUF_SIZE ) {
num_to_read = YY_READ_BUF_SIZE;
-
+ }
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
(yy_n_chars), num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
- }
+ }
- if ( (yy_n_chars) == 0 )
- {
- if ( number_to_move == YY_MORE_ADJ )
- {
+ if ( (yy_n_chars) == 0 ) {
+ if ( number_to_move == YY_MORE_ADJ ) {
ret_val = EOB_ACT_END_OF_FILE;
yyrestart( yyin );
- }
-
- else
- {
+ } else {
ret_val = EOB_ACT_LAST_MATCH;
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
- }
}
-
- else
+ } else {
ret_val = EOB_ACT_CONTINUE_SCAN;
-
+ }
if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
- int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1) + 2;
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
(void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
- if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) {
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ }
/* "- 2" to take care of EOB's */
YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
}
return ret_val;
}
+
/* yy_get_previous_state - get the state just before the EOB char was reached */
- yy_state_type yyFlexLexer::yy_get_previous_state()
+
+
+yy_state_type yyFlexLexer::yy_get_previous_state()
+
{
yy_state_type yy_current_state;
char *yy_cp;
-
- yy_current_state = (yy_start);
+
+
+ /* Generate the code to find the start state. */
+
+
+ yy_current_state = (yy_start);
+
+ /* Set up for storing up states. */
+
+
+
+ for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) {
+ /* Generate the code to find the next state. */
+
+
+
+
+
+
+
+
+
+ int yy_c = (*yy_cp ? *(yy_ec+YY_SC_TO_UI(*yy_cp)) : YY_NUL_EC);
+ /* Save the backing-up info \before/ computing the next state
+ * because we always compute one more state than needed - we
+ * always proceed until we reach a jam state
+ */
+
+
+
+ /* Generate code to keep backing-up information. */
+
+
+ if ( yy_accept[yy_current_state] ) {
- for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
- {
- YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
- if ( yy_accept[yy_current_state] )
- {
(yy_last_accepting_state) = yy_current_state;
(yy_last_accepting_cpos) = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 306 )
- yy_c = yy_meta[yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
}
+
+
+
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) {
+ yy_current_state = (int) yy_def[yy_current_state];
+
+
+ /* We've arranged it so that templates are never chained
+ * to one another. This means we can afford to make a
+ * very simple test to see if we need to convert to
+ * yy_c's meta-equivalence class without worrying
+ * about erroneously looking up the meta-equivalence
+ * class twice
+ */
+
+ /* lastdfa + 2 == YY_JAMSTATE + 1 is the beginning of the templates */
+ if (yy_current_state >= YY_JAMSTATE + 1) {
+ yy_c = yy_meta[yy_c];
+ }
+
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+
+
+
+
+
+
+
+ }
+
return yy_current_state;
}
+
/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
- yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
+
+
+yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
+
{
int yy_is_jam;
- char *yy_cp = (yy_c_buf_p);
+ /* Generate code for handling NUL's, if needed. */
+
+ /* First, deal with backing up and setting up yy_cp if the scanner
+ * finds that it should JAM on the NUL.
+ *
+ * Only generate a definition for "yy_cp" if we'll generate code
+ * that uses it. Otherwise lint and the like complain.
+ */
+ char *yy_cp = (yy_c_buf_p);
+
+
+
+
+
+
+
+
+
+
+
+ int yy_c = YY_NUL_EC;
+ /* Save the backing-up info \before/ computing the next state
+ * because we always compute one more state than needed - we
+ * always proceed until we reach a jam state
+ */
+
+
+
+ /* Generate code to keep backing-up information. */
+
- YY_CHAR yy_c = 1;
- if ( yy_accept[yy_current_state] )
- {
- (yy_last_accepting_state) = yy_current_state;
- (yy_last_accepting_cpos) = yy_cp;
+ if ( yy_accept[yy_current_state] ) {
+
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
}
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
+
+
+
+
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) {
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 306 )
+
+
+ /* We've arranged it so that templates are never chained
+ * to one another. This means we can afford to make a
+ * very simple test to see if we need to convert to
+ * yy_c's meta-equivalence class without worrying
+ * about erroneously looking up the meta-equivalence
+ * class twice
+ */
+
+ /* lastdfa + 2 == YY_JAMSTATE + 1 is the beginning of the templates */
+ if (yy_current_state >= YY_JAMSTATE + 1) {
yy_c = yy_meta[yy_c];
}
+
+ }
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
- yy_is_jam = (yy_current_state == 305);
- return yy_is_jam ? 0 : yy_current_state;
+yy_is_jam = (yy_current_state == YY_JAMSTATE);
+
+
+
+
+
+
+
+ return yy_is_jam ? 0 : yy_current_state;
}
-#ifndef YY_NO_UNPUT
- void yyFlexLexer::yyunput( int c, char* yy_bp)
+
+
+
+
+void yyFlexLexer::yyunput_r( int c, char* yy_bp)
+
{
char *yy_cp;
-
- yy_cp = (yy_c_buf_p);
+
+ yy_cp = (yy_c_buf_p);
/* undo effects of setting up yytext */
*yy_cp = (yy_hold_char);
- if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
- { /* need to shift things up to make room */
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) {
+ /* need to shift things up to make room */
/* +2 for EOB chars. */
int number_to_move = (yy_n_chars) + 2;
char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
char *source =
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
- while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) {
*--dest = *--source;
-
+ }
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
(yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
- if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) {
YY_FATAL_ERROR( "flex scanner push-back overflow" );
}
+ }
*--yy_cp = (char) c;
+
+
(yytext_ptr) = yy_bp;
(yy_hold_char) = *yy_cp;
(yy_c_buf_p) = yy_cp;
}
-#endif
- int yyFlexLexer::yyinput()
+
+
+
+
+int yyFlexLexer::yyinput()
+
{
int c;
-
+
*(yy_c_buf_p) = (yy_hold_char);
- if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
- {
+ if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) {
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
- if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) {
/* This was really a NUL. */
*(yy_c_buf_p) = '\0';
-
- else
- { /* need more input */
+ } else {
+ /* need more input */
int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
++(yy_c_buf_p);
- switch ( yy_get_next_buffer( ) )
- {
- case EOB_ACT_LAST_MATCH:
- /* This happens because yy_g_n_b()
- * sees that we've accumulated a
- * token and flags that we need to
- * try matching the token before
- * proceeding. But for input(),
- * there's no matching to consider.
- * So convert the EOB_ACT_LAST_MATCH
- * to EOB_ACT_END_OF_FILE.
- */
-
- /* Reset buffer status. */
- yyrestart( yyin );
-
- /*FALLTHROUGH*/
+ switch ( yy_get_next_buffer( ) ) {
+ case EOB_ACT_LAST_MATCH:
+ /* This happens because yy_g_n_b()
+ * sees that we've accumulated a
+ * token and flags that we need to
+ * try matching the token before
+ * proceeding. But for input(),
+ * there's no matching to consider.
+ * So convert the EOB_ACT_LAST_MATCH
+ * to EOB_ACT_END_OF_FILE.
+ */
- case EOB_ACT_END_OF_FILE:
- {
- if ( yywrap( ) )
- return 0;
+ /* Reset buffer status. */
+ yyrestart( yyin );
- if ( ! (yy_did_buffer_switch_on_eof) )
- YY_NEW_FILE;
-#ifdef __cplusplus
- return yyinput();
-#else
- return input();
-#endif
- }
+ /*FALLTHROUGH*/
- case EOB_ACT_CONTINUE_SCAN:
- (yy_c_buf_p) = (yytext_ptr) + offset;
- break;
+ case EOB_ACT_END_OF_FILE:
+ if ( yywrap( ) ) {
+ return 0;
+ }
+ if ( ! (yy_did_buffer_switch_on_eof) ) {
+ YY_NEW_FILE;
}
+ return yyinput();
+
+ case EOB_ACT_CONTINUE_SCAN:
+ (yy_c_buf_p) = (yytext_ptr) + offset;
+ break;
+ default:
+ YY_FATAL_ERROR("unexpected return value from yy_get_next_buffer()");
}
}
+ }
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
*(yy_c_buf_p) = '\0'; /* preserve yytext */
(yy_hold_char) = *++(yy_c_buf_p);
+
+
+
+
+
return c;
}
+
/** Immediately switch to a different input stream.
* @param input_file A readable stream.
*
* @note This function does not reset the start condition to @c INITIAL .
*/
- void yyFlexLexer::yyrestart( std::istream& input_file )
+
+
+void yyFlexLexer::yyrestart( std::istream& input_file )
+
{
-
- if ( ! YY_CURRENT_BUFFER ){
- yyensure_buffer_stack ();
+
+
+ if ( yy_current_buffer() == NULL ) {
+ yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer( yyin, YY_BUF_SIZE );
+ yy_create_buffer( yyin, YY_BUF_SIZE );
}
- yy_init_buffer( YY_CURRENT_BUFFER, input_file );
+ yy_init_buffer( YY_CURRENT_BUFFER_LVALUE, input_file );
yy_load_buffer_state( );
+
+
+
+ /* We don't actually know whether we did this switch during
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
+ * to go ahead and always set it.
+ */
+ (yy_did_buffer_switch_on_eof) = 1;
}
+
/** Delegate to the new version that takes an istream reference.
* @param input_file A readable stream.
*
yyrestart( *input_file );
}
+
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
*
*/
- void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+
+
+void yyFlexLexer::yy_switch_to_buffer( yybuffer new_buffer )
+
{
-
+
+
/* TODO. We should be able to replace this entire function body
* with
* yypop_buffer_state();
* yypush_buffer_state(new_buffer);
- */
+ */
yyensure_buffer_stack ();
- if ( YY_CURRENT_BUFFER == new_buffer )
+ if ( yy_current_buffer() == new_buffer ) {
return;
-
- if ( YY_CURRENT_BUFFER )
- {
+ }
+ if ( yy_current_buffer() ) {
/* Flush out information for old buffer. */
*(yy_c_buf_p) = (yy_hold_char);
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
- }
+ }
YY_CURRENT_BUFFER_LVALUE = new_buffer;
yy_load_buffer_state( );
+
+
/* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe
(yy_did_buffer_switch_on_eof) = 1;
}
- void yyFlexLexer::yy_load_buffer_state()
+
+
+
+void yyFlexLexer::yy_load_buffer_state()
+
{
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+
+
yyin.rdbuf(YY_CURRENT_BUFFER_LVALUE->yy_input_file);
+
(yy_hold_char) = *(yy_c_buf_p);
}
*
* @return the allocated buffer state.
*/
- YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream& file, int size )
+
+
+yybuffer yyFlexLexer::yy_create_buffer( std::istream& file, int size )
+
{
- YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
- if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+ yybuffer b;
+ b = (yybuffer) yyalloc( sizeof( struct yy_buffer_state ) );
+ if ( b == NULL ) {
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+ }
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
- if ( ! b->yy_ch_buf )
+ if ( b->yy_ch_buf == NULL ) {
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
+ }
b->yy_is_our_buffer = 1;
yy_init_buffer( b, file );
return b;
}
+
/** Delegate creation of buffers to the new version that takes an istream reference.
* @param file A readable stream.
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
*
* @return the allocated buffer state.
*/
- YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size )
+yybuffer yyFlexLexer::yy_create_buffer( std::istream* file, int size )
{
return yy_create_buffer( *file, size );
}
+
/** Destroy the buffer.
* @param b a buffer created with yy_create_buffer()
*
*/
- void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )
-{
-
- if ( ! b )
- return;
- if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
- YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
- if ( b->yy_is_our_buffer )
- yyfree( (void *) b->yy_ch_buf );
+void yyFlexLexer::yy_delete_buffer( yybuffer b )
+{
+
+ if ( b == NULL ) {
+ return;
+ }
+ if ( b == yy_current_buffer() ) { /* Not sure if we should pop here. */
+ YY_CURRENT_BUFFER_LVALUE = (yybuffer) 0;
+ }
+ if ( b->yy_is_our_buffer ) {
+ yyfree( (void *) b->yy_ch_buf );
+ }
yyfree( (void *) b );
}
+
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
* such as during a yyrestart() or at EOF.
*/
- void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream& file )
+
+
+void yyFlexLexer::yy_init_buffer( yybuffer b, std::istream& file )
{
int oerrno = errno;
-
+
yy_flush_buffer( b );
+
+
b->yy_input_file = file.rdbuf();
- b->yy_fill_buffer = 1;
- /* If b is the current buffer, then yy_init_buffer was _probably_
- * called from yyrestart() or through yy_get_next_buffer.
- * In that case, we don't want to reset the lineno or column.
- */
- if (b != YY_CURRENT_BUFFER){
- b->yy_bs_lineno = 1;
- b->yy_bs_column = 0;
- }
+
+ /* b->yy_input_file should never by NULL but we'll handle it cleanly
+ * on the off chance.
+ */
+ if (b->yy_input_file == NULL){
+ b->yy_fill_buffer = 0;
+ } else {
+ b->yy_fill_buffer = 1;
+ }
+
+
+
+ /* If b is the current buffer, then yy_init_buffer was _probably_
+ * called from yyrestart() or through yy_get_next_buffer.
+ * In that case, we don't want to reset the lineno or column.
+ */
+ if (b != yy_current_buffer()) {
+ b->yy_bs_lineno = 1;
+ b->yy_bs_column = 0;
+ }
+
+
b->yy_is_interactive = 0;
+
errno = oerrno;
}
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
- * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ * @param b the buffer state to be flushed, usually @c yy_current_buffer().
*
*/
- void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )
+
+
+void yyFlexLexer::yy_flush_buffer( yybuffer b )
+
{
- if ( ! b )
+ if ( b == NULL ) {
return;
-
+ }
b->yy_n_chars = 0;
/* We always need two end-of-buffer characters. The first causes
b->yy_buf_pos = &b->yy_ch_buf[0];
- b->yy_at_bol = 1;
+ b->yyatbol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
- if ( b == YY_CURRENT_BUFFER )
+ if ( b == yy_current_buffer() ) {
yy_load_buffer_state( );
+ }
}
/** Pushes the new state onto the stack. The new state becomes
* @param new_buffer The new state.
*
*/
-void yyFlexLexer::yypush_buffer_state (YY_BUFFER_STATE new_buffer)
+
+
+void yyFlexLexer::yypush_buffer_state (yybuffer new_buffer)
+
{
- if (new_buffer == NULL)
+ if (new_buffer == NULL) {
return;
-
+ }
yyensure_buffer_stack();
/* This block is copied from yy_switch_to_buffer. */
- if ( YY_CURRENT_BUFFER )
- {
+ if ( yy_current_buffer() != NULL ) {
/* Flush out information for old buffer. */
*(yy_c_buf_p) = (yy_hold_char);
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
- }
+ }
/* Only push if top exists. Otherwise, replace top. */
- if (YY_CURRENT_BUFFER)
+ if (yy_current_buffer()) {
(yy_buffer_stack_top)++;
+ }
YY_CURRENT_BUFFER_LVALUE = new_buffer;
/* copied from yy_switch_to_buffer. */
(yy_did_buffer_switch_on_eof) = 1;
}
+
/** Removes and deletes the top of the stack, if present.
* The next element becomes the new top.
*
*/
+
+
void yyFlexLexer::yypop_buffer_state (void)
+
{
- if (!YY_CURRENT_BUFFER)
+ if (yy_current_buffer() == NULL) {
return;
-
- yy_delete_buffer(YY_CURRENT_BUFFER );
+ }
+ yy_delete_buffer(yy_current_buffer() );
YY_CURRENT_BUFFER_LVALUE = NULL;
- if ((yy_buffer_stack_top) > 0)
+ if ((yy_buffer_stack_top) > 0) {
--(yy_buffer_stack_top);
-
- if (YY_CURRENT_BUFFER) {
+ }
+ if (yy_current_buffer() != NULL) {
yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
}
+
/* Allocates the stack if it does not exist.
* Guarantees space for at least one push.
*/
+
+
void yyFlexLexer::yyensure_buffer_stack(void)
+
{
yy_size_t num_to_alloc;
-
- if (!(yy_buffer_stack)) {
-
+
+ if ((yy_buffer_stack) == NULL) {
/* First allocation is just for 2 elements, since we don't know if this
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
- */
- num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
+ */
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
- if ( ! (yy_buffer_stack) )
+ if ( (yy_buffer_stack == NULL) ) {
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+ }
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
return;
}
- if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
-
+ if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1) {
/* Increase the buffer to prepare for a possible push. */
yy_size_t grow_size = 8 /* arbitrary grow size */;
((yy_buffer_stack),
num_to_alloc * sizeof(struct yy_buffer_state*)
);
- if ( ! (yy_buffer_stack) )
+ if ((yy_buffer_stack) == NULL) {
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
-
+ }
/* zero only the new slots.*/
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
(yy_buffer_stack_max) = num_to_alloc;
}
}
- void yyFlexLexer::yy_push_state( int _new_state )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+void yyFlexLexer::yy_push_state( int _new_state )
+
{
- if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
- {
+ if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) ) {
yy_size_t new_size;
(yy_start_stack_depth) += YY_START_STACK_INCR;
new_size = (yy_size_t) (yy_start_stack_depth) * sizeof( int );
- if ( ! (yy_start_stack) )
+ if ( ! (yy_start_stack) ) {
(yy_start_stack) = (int *) yyalloc( new_size );
- else
+ } else {
(yy_start_stack) = (int *) yyrealloc(
(void *) (yy_start_stack), new_size );
-
- if ( ! (yy_start_stack) )
+ }
+ if ( ! (yy_start_stack) ) {
YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
}
+ }
+ (yy_start_stack)[(yy_start_stack_ptr)++] = yystart();
- (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;
-
- BEGIN(_new_state);
+ yybegin(_new_state);
}
- void yyFlexLexer::yy_pop_state()
-{
- if ( --(yy_start_stack_ptr) < 0 )
- YY_FATAL_ERROR( "start-condition stack underflow" );
- BEGIN((yy_start_stack)[(yy_start_stack_ptr)]);
-}
- int yyFlexLexer::yy_top_state()
+
+
+
+void yyFlexLexer::yy_pop_state()
+
{
- return (yy_start_stack)[(yy_start_stack_ptr) - 1];
+ if ( --(yy_start_stack_ptr) < 0 ) {
+ YY_FATAL_ERROR( "start-condition stack underflow" );
+ }
+ yybegin((yy_start_stack)[(yy_start_stack_ptr)]);
}
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-void yyFlexLexer::LexerError( const char* msg )
+
+
+
+
+int yyFlexLexer::yy_top_state()
+
{
- std::cerr << msg << std::endl;
- exit( YY_EXIT_FAILURE );
+ return (yy_start_stack_ptr) > 0 ? (yy_start_stack)[(yy_start_stack_ptr) - 1] : yystart();
}
+
/* Redefine yyless() so it works in section 3 code. */
#undef yyless
#define yyless(n) \
- do \
- { \
+ do { \
/* Undo effects of setting up yytext. */ \
- int yyless_macro_arg = (n); \
- YY_LESS_LINENO(yyless_macro_arg);\
- yytext[yyleng] = (yy_hold_char); \
- (yy_c_buf_p) = yytext + yyless_macro_arg; \
- (yy_hold_char) = *(yy_c_buf_p); \
- *(yy_c_buf_p) = '\0'; \
- yyleng = yyless_macro_arg; \
- } \
- while ( 0 )
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ yytext[yyleng] = (yy_hold_char); \
+ (yy_c_buf_p) = yytext + yyless_macro_arg; \
+ (yy_hold_char) = *(yy_c_buf_p); \
+ *(yy_c_buf_p) = '\0'; \
+ yyleng = yyless_macro_arg; \
+ } while ( 0 )
+
+
/* Accessor methods (get/set functions) to struct members. */
+
+
+
+
+
+
+
+
+
+
+
/*
* Internal utility routines.
*/
+
+
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, const char * s2, int n )
-{
+static void yy_flex_strncpy (char* s1, const char * s2, int n ) {
int i;
- for ( i = 0; i < n; ++i )
+ for ( i = 0; i < n; ++i ) {
s1[i] = s2[i];
+ }
}
#endif
+
+
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (const char * s )
{
}
#endif
-void *yyalloc (yy_size_t size )
-{
+
+
+void *yyalloc (yy_size_t size ) {
return malloc(size);
}
-void *yyrealloc (void * ptr, yy_size_t size )
-{
+
+
+void *yyrealloc (void * ptr, yy_size_t size ) {
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
return realloc(ptr, size);
}
-void yyfree (void * ptr )
-{
+
+
+void yyfree (void * ptr ) {
free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
}
-#define YYTABLES_NAME "yytables"
+
+
+
+
+
+
+
+
+
+
/************************************/
/* Section 3 */
}
*/
+
%option yywrap
%{
-#include <ExprIntrp.tab.h>
+#include <ExprIntrp.tab.hxx>
#include <ExprIntrp_yaccintrf.hxx>
+++ /dev/null
-/* A Bison parser, made by GNU Bison 3.7.4. */
-
-/* Bison implementation for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 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
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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/>. */
-
-/* As a special exception, you may create a larger work that contains
- part or all of the Bison parser skeleton and distribute that work
- under terms of your choice, so long as that work isn't itself a
- parser generator using the skeleton or a modified version thereof
- as a parser skeleton. Alternatively, if you modify or redistribute
- the parser skeleton itself, you may (at your option) remove this
- special exception, which will cause the skeleton and the resulting
- Bison output files to be licensed under the GNU General Public
- License without this special exception.
-
- This special exception was added by the Free Software Foundation in
- version 2.2 of Bison. */
-
-/* C LALR(1) parser skeleton written by Richard Stallman, by
- simplifying the original so-called "semantic" parser. */
-
-/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
- especially those whose name start with YY_ or yy_. They are
- private implementation details that can be changed or removed. */
-
-/* All symbols defined below should begin with yy or YY, to avoid
- infringing on user name space. This should be done even for local
- variables, as they might otherwise be expanded by user macros.
- There are some unavoidable exceptions within include files to
- define necessary library symbols; they are noted "INFRINGES ON
- USER NAME SPACE" below. */
-
-/* Identify Bison output, and Bison version. */
-#define YYBISON 30704
-
-/* Bison version string. */
-#define YYBISON_VERSION "3.7.4"
-
-/* Skeleton name. */
-#define YYSKELETON_NAME "yacc.c"
-
-/* Pure parsers. */
-#define YYPURE 0
-
-/* Push parsers. */
-#define YYPUSH 0
-
-/* Pull parsers. */
-#define YYPULL 1
-
-
-/* Substitute the variable and function names. */
-#define yyparse ExprIntrpparse
-#define yylex ExprIntrplex
-#define yyerror ExprIntrperror
-#define yydebug ExprIntrpdebug
-#define yynerrs ExprIntrpnerrs
-#define yylval ExprIntrplval
-#define yychar ExprIntrpchar
-
-/* First part of user prologue. */
-
-#include <ExprIntrp_yaccintrf.hxx>
-
-extern void ExprIntrp_EndOfFuncDef();
-extern void ExprIntrp_EndOfRelation();
-extern void ExprIntrp_AssignVariable();
-extern void ExprIntrp_EndOfAssign();
-extern void ExprIntrp_Deassign();
-extern void ExprIntrp_SumOperator();
-extern void ExprIntrp_MinusOperator();
-extern void ExprIntrp_ProductOperator();
-extern void ExprIntrp_DivideOperator();
-extern void ExprIntrp_ExpOperator();
-extern void ExprIntrp_UnaryMinusOperator();
-extern void ExprIntrp_UnaryPlusOperator();
-extern void ExprIntrp_VariableIdentifier();
-extern void ExprIntrp_NumValue();
-extern void ExprIntrp_EndFunction();
-extern void ExprIntrp_EndDerFunction();
-extern void ExprIntrp_EndDifferential();
-extern void ExprIntrp_EndDiffFunction();
-extern void ExprIntrp_EndFuncArg();
-extern void ExprIntrp_NextFuncArg();
-extern void ExprIntrp_StartFunction();
-extern void ExprIntrp_DefineFunction();
-extern void ExprIntrp_StartDerivate();
-extern void ExprIntrp_EndDerivate();
-extern void ExprIntrp_DiffVar();
-extern void ExprIntrp_DiffDegree();
-extern void ExprIntrp_VerDiffDegree();
-extern void ExprIntrp_DiffDegreeVar();
-extern void ExprIntrp_StartDifferential();
-extern void ExprIntrp_StartFunction();
-extern void ExprIntrp_EndFuncArg();
-extern void ExprIntrp_NextFuncArg();
-extern void ExprIntrp_VariableIdentifier();
-extern void ExprIntrp_Derivation();
-extern void ExprIntrp_EndDerivation();
-extern void ExprIntrp_DerivationValue();
-extern void ExprIntrp_ConstantIdentifier();
-extern void ExprIntrp_ConstantDefinition();
-extern void ExprIntrp_VariableIdentifier();
-extern void ExprIntrp_NumValue();
-extern void ExprIntrp_Sumator();
-extern void ExprIntrp_VariableIdentifier();
-extern void ExprIntrp_Productor();
-extern void ExprIntrp_EndOfEqual();
-
-// disable MSVC warnings in bison code
-#ifdef _MSC_VER
-#pragma warning(disable:4131 4244 4127 4702)
-#endif
-
-
-
-
-# ifndef YY_CAST
-# ifdef __cplusplus
-# define YY_CAST(Type, Val) static_cast<Type> (Val)
-# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
-# else
-# define YY_CAST(Type, Val) ((Type) (Val))
-# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
-# endif
-# endif
-# ifndef YY_NULLPTR
-# if defined __cplusplus
-# if 201103L <= __cplusplus
-# define YY_NULLPTR nullptr
-# else
-# define YY_NULLPTR 0
-# endif
-# else
-# define YY_NULLPTR ((void*)0)
-# endif
-# endif
-
-#include "ExprIntrp.tab.h"
-/* Symbol kind. */
-enum yysymbol_kind_t
-{
- YYSYMBOL_YYEMPTY = -2,
- YYSYMBOL_YYEOF = 0, /* "end of file" */
- YYSYMBOL_YYerror = 1, /* error */
- YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
- YYSYMBOL_SUMOP = 3, /* SUMOP */
- YYSYMBOL_MINUSOP = 4, /* MINUSOP */
- YYSYMBOL_DIVIDEOP = 5, /* DIVIDEOP */
- YYSYMBOL_EXPOP = 6, /* EXPOP */
- YYSYMBOL_MULTOP = 7, /* MULTOP */
- YYSYMBOL_PARENTHESIS = 8, /* PARENTHESIS */
- YYSYMBOL_BRACKET = 9, /* BRACKET */
- YYSYMBOL_ENDPARENTHESIS = 10, /* ENDPARENTHESIS */
- YYSYMBOL_ENDBRACKET = 11, /* ENDBRACKET */
- YYSYMBOL_VALUE = 12, /* VALUE */
- YYSYMBOL_IDENTIFIER = 13, /* IDENTIFIER */
- YYSYMBOL_COMMA = 14, /* COMMA */
- YYSYMBOL_DIFFERENTIAL = 15, /* DIFFERENTIAL */
- YYSYMBOL_DERIVATE = 16, /* DERIVATE */
- YYSYMBOL_DERIVKEY = 17, /* DERIVKEY */
- YYSYMBOL_ASSIGNOP = 18, /* ASSIGNOP */
- YYSYMBOL_DEASSIGNKEY = 19, /* DEASSIGNKEY */
- YYSYMBOL_EQUALOP = 20, /* EQUALOP */
- YYSYMBOL_RELSEPARATOR = 21, /* RELSEPARATOR */
- YYSYMBOL_CONSTKEY = 22, /* CONSTKEY */
- YYSYMBOL_SUMKEY = 23, /* SUMKEY */
- YYSYMBOL_PRODKEY = 24, /* PRODKEY */
- YYSYMBOL_25_n_ = 25, /* '\n' */
- YYSYMBOL_YYACCEPT = 26, /* $accept */
- YYSYMBOL_exprentry = 27, /* exprentry */
- YYSYMBOL_Assignment = 28, /* Assignment */
- YYSYMBOL_29_1 = 29, /* $@1 */
- YYSYMBOL_Deassignment = 30, /* Deassignment */
- YYSYMBOL_31_2 = 31, /* $@2 */
- YYSYMBOL_GenExpr = 32, /* GenExpr */
- YYSYMBOL_SingleExpr = 33, /* SingleExpr */
- YYSYMBOL_Single = 34, /* Single */
- YYSYMBOL_Function = 35, /* Function */
- YYSYMBOL_36_3 = 36, /* $@3 */
- YYSYMBOL_ListGenExpr = 37, /* ListGenExpr */
- YYSYMBOL_38_4 = 38, /* $@4 */
- YYSYMBOL_funcident = 39, /* funcident */
- YYSYMBOL_FunctionDefinition = 40, /* FunctionDefinition */
- YYSYMBOL_41_5 = 41, /* $@5 */
- YYSYMBOL_DerFunctionId = 42, /* DerFunctionId */
- YYSYMBOL_43_6 = 43, /* $@6 */
- YYSYMBOL_DiffFuncId = 44, /* DiffFuncId */
- YYSYMBOL_45_7 = 45, /* $@7 */
- YYSYMBOL_46_8 = 46, /* $@8 */
- YYSYMBOL_DiffId = 47, /* DiffId */
- YYSYMBOL_FunctionDef = 48, /* FunctionDef */
- YYSYMBOL_49_9 = 49, /* $@9 */
- YYSYMBOL_ListArg = 50, /* ListArg */
- YYSYMBOL_51_10 = 51, /* $@10 */
- YYSYMBOL_unarg = 52, /* unarg */
- YYSYMBOL_Derivation = 53, /* Derivation */
- YYSYMBOL_54_11 = 54, /* $@11 */
- YYSYMBOL_55_12 = 55, /* $@12 */
- YYSYMBOL_56_13 = 56, /* $@13 */
- YYSYMBOL_ConstantDefinition = 57, /* ConstantDefinition */
- YYSYMBOL_58_14 = 58, /* $@14 */
- YYSYMBOL_59_15 = 59, /* $@15 */
- YYSYMBOL_Sumator = 60, /* Sumator */
- YYSYMBOL_61_16 = 61, /* $@16 */
- YYSYMBOL_62_17 = 62, /* $@17 */
- YYSYMBOL_Productor = 63, /* Productor */
- YYSYMBOL_64_18 = 64, /* $@18 */
- YYSYMBOL_65_19 = 65, /* $@19 */
- YYSYMBOL_RelationList = 66, /* RelationList */
- YYSYMBOL_SingleRelation = 67 /* SingleRelation */
-};
-typedef enum yysymbol_kind_t yysymbol_kind_t;
-
-
-
-
-#ifdef short
-# undef short
-#endif
-
-/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
- <limits.h> and (if available) <stdint.h> are included
- so that the code can choose integer types of a good width. */
-
-#ifndef __PTRDIFF_MAX__
-# include <limits.h> /* INFRINGES ON USER NAME SPACE */
-# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
-# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
-# define YY_STDINT_H
-# endif
-#endif
-
-/* Narrow types that promote to a signed type and that can represent a
- signed or unsigned integer of at least N bits. In tables they can
- save space and decrease cache pressure. Promoting to a signed type
- helps avoid bugs in integer arithmetic. */
-
-#ifdef __INT_LEAST8_MAX__
-typedef __INT_LEAST8_TYPE__ yytype_int8;
-#elif defined YY_STDINT_H
-typedef int_least8_t yytype_int8;
-#else
-typedef signed char yytype_int8;
-#endif
-
-#ifdef __INT_LEAST16_MAX__
-typedef __INT_LEAST16_TYPE__ yytype_int16;
-#elif defined YY_STDINT_H
-typedef int_least16_t yytype_int16;
-#else
-typedef short yytype_int16;
-#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 \
- && UINT_LEAST8_MAX <= INT_MAX)
-typedef uint_least8_t yytype_uint8;
-#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
-typedef unsigned char yytype_uint8;
-#else
-typedef short yytype_uint8;
-#endif
-
-#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
-typedef __UINT_LEAST16_TYPE__ yytype_uint16;
-#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
- && UINT_LEAST16_MAX <= INT_MAX)
-typedef uint_least16_t yytype_uint16;
-#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
-typedef unsigned short yytype_uint16;
-#else
-typedef int yytype_uint16;
-#endif
-
-#ifndef YYPTRDIFF_T
-# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
-# define YYPTRDIFF_T __PTRDIFF_TYPE__
-# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
-# elif defined PTRDIFF_MAX
-# ifndef ptrdiff_t
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-# endif
-# define YYPTRDIFF_T ptrdiff_t
-# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
-# else
-# define YYPTRDIFF_T long
-# define YYPTRDIFF_MAXIMUM LONG_MAX
-# endif
-#endif
-
-#ifndef YYSIZE_T
-# ifdef __SIZE_TYPE__
-# define YYSIZE_T __SIZE_TYPE__
-# elif defined size_t
-# define YYSIZE_T size_t
-# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
-# else
-# define YYSIZE_T unsigned
-# endif
-#endif
-
-#define YYSIZE_MAXIMUM \
- YY_CAST (YYPTRDIFF_T, \
- (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
- ? YYPTRDIFF_MAXIMUM \
- : YY_CAST (YYSIZE_T, -1)))
-
-#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
-
-
-/* Stored state numbers (used for stacks). */
-typedef yytype_uint8 yy_state_t;
-
-/* State numbers in computations. */
-typedef int yy_state_fast_t;
-
-#ifndef YY_
-# if defined YYENABLE_NLS && YYENABLE_NLS
-# if ENABLE_NLS
-# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
-# endif
-# endif
-# ifndef YY_
-# define YY_(Msgid) Msgid
-# endif
-#endif
-
-
-#ifndef YY_ATTRIBUTE_PURE
-# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
-# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
-# else
-# define YY_ATTRIBUTE_PURE
-# endif
-#endif
-
-#ifndef YY_ATTRIBUTE_UNUSED
-# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
-# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
-# else
-# define YY_ATTRIBUTE_UNUSED
-# endif
-#endif
-
-/* Suppress unused-variable warnings by "using" E. */
-#if ! defined lint || defined __GNUC__
-# define YYUSE(E) ((void) (E))
-#else
-# define YYUSE(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 \
- _Pragma ("GCC diagnostic push") \
- _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
- _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
- _Pragma ("GCC diagnostic pop")
-#else
-# define YY_INITIAL_VALUE(Value) Value
-#endif
-#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END
-#endif
-#ifndef YY_INITIAL_VALUE
-# define YY_INITIAL_VALUE(Value) /* Nothing. */
-#endif
-
-#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
-# define YY_IGNORE_USELESS_CAST_BEGIN \
- _Pragma ("GCC diagnostic push") \
- _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
-# define YY_IGNORE_USELESS_CAST_END \
- _Pragma ("GCC diagnostic pop")
-#endif
-#ifndef YY_IGNORE_USELESS_CAST_BEGIN
-# define YY_IGNORE_USELESS_CAST_BEGIN
-# define YY_IGNORE_USELESS_CAST_END
-#endif
-
-
-#define YY_ASSERT(E) ((void) (0 && (E)))
-
-#if !defined yyoverflow
-
-/* The parser invokes alloca or malloc; define the necessary symbols. */
-
-# ifdef YYSTACK_USE_ALLOCA
-# if YYSTACK_USE_ALLOCA
-# ifdef __GNUC__
-# define YYSTACK_ALLOC __builtin_alloca
-# elif defined __BUILTIN_VA_ARG_INCR
-# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
-# elif defined _AIX
-# define YYSTACK_ALLOC __alloca
-# elif defined _MSC_VER
-# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
-# define alloca _alloca
-# else
-# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
- /* Use EXIT_SUCCESS as a witness for stdlib.h. */
-# ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
-# endif
-# endif
-# endif
-# endif
-# endif
-
-# ifdef YYSTACK_ALLOC
- /* Pacify GCC's 'empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
-# ifndef YYSTACK_ALLOC_MAXIMUM
- /* The OS might guarantee only one guard page at the bottom of the stack,
- and a page size can be as small as 4096 bytes. So we cannot safely
- invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
- to allow for a few compiler-allocated temporary stack slots. */
-# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
-# endif
-# else
-# define YYSTACK_ALLOC YYMALLOC
-# define YYSTACK_FREE YYFREE
-# ifndef YYSTACK_ALLOC_MAXIMUM
-# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
-# endif
-# if (defined __cplusplus && ! defined EXIT_SUCCESS \
- && ! ((defined YYMALLOC || defined malloc) \
- && (defined YYFREE || defined free)))
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
-# endif
-# endif
-# ifndef YYMALLOC
-# define YYMALLOC malloc
-# if ! defined malloc && ! defined EXIT_SUCCESS
-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
-# endif
-# endif
-# ifndef YYFREE
-# define YYFREE free
-# if ! defined free && ! defined EXIT_SUCCESS
-void free (void *); /* INFRINGES ON USER NAME SPACE */
-# endif
-# endif
-# endif
-#endif /* !defined yyoverflow */
-
-#if (! defined yyoverflow \
- && (! defined __cplusplus \
- || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
-
-/* A type that is properly aligned for any stack member. */
-union yyalloc
-{
- yy_state_t yyss_alloc;
- YYSTYPE yyvs_alloc;
-};
-
-/* The size of the maximum gap between one aligned stack and the next. */
-# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
- N elements. */
-# define YYSTACK_BYTES(N) \
- ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
- + YYSTACK_GAP_MAXIMUM)
-
-# define YYCOPY_NEEDED 1
-
-/* Relocate STACK from its old location to the new one. The
- local variables YYSIZE and YYSTACKSIZE give the old and new number of
- elements in the stack, and YYPTR gives the new location of the
- stack. Advance YYPTR to a properly aligned location for the next
- stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- do \
- { \
- YYPTRDIFF_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / YYSIZEOF (*yyptr); \
- } \
- while (0)
-
-#endif
-
-#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
-/* Copy COUNT objects from SRC to DST. The source and destination do
- not overlap. */
-# ifndef YYCOPY
-# if defined __GNUC__ && 1 < __GNUC__
-# define YYCOPY(Dst, Src, Count) \
- __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
-# else
-# define YYCOPY(Dst, Src, Count) \
- do \
- { \
- YYPTRDIFF_T yyi; \
- for (yyi = 0; yyi < (Count); yyi++) \
- (Dst)[yyi] = (Src)[yyi]; \
- } \
- while (0)
-# endif
-# endif
-#endif /* !YYCOPY_NEEDED */
-
-/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 48
-/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 189
-
-/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 26
-/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 42
-/* YYNRULES -- Number of rules. */
-#define YYNRULES 70
-/* YYNSTATES -- Number of states. */
-#define YYNSTATES 149
-
-/* YYMAXUTOK -- Last valid token kind. */
-#define YYMAXUTOK 279
-
-
-/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
- as returned by yylex, with out-of-bounds checking. */
-#define YYTRANSLATE(YYX) \
- (0 <= (YYX) && (YYX) <= YYMAXUTOK \
- ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
- : YYSYMBOL_YYUNDEF)
-
-/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
- as returned by yylex. */
-static const yytype_int8 yytranslate[] =
-{
- 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 25, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
- 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, 22, 23, 24
-};
-
-#if YYDEBUG
- /* 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,
- 90, 93, 94, 95, 96, 97, 98, 99, 100, 101,
- 102, 103, 104, 105, 106, 109, 110, 114, 115, 118,
- 119, 120, 120, 123, 124, 124, 127, 130, 130, 133,
- 133, 136, 137, 137, 137, 140, 141, 144, 144, 147,
- 148, 148, 151, 154, 154, 155, 155, 155, 158, 158,
- 158, 161, 161, 161, 164, 164, 164, 167, 168, 169,
- 172
-};
-#endif
-
-/** Accessing symbol of state STATE. */
-#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
-
-#if YYDEBUG || 0
-/* The user-facing name of the symbol whose (internal) number is
- YYSYMBOL. No bounds checking. */
-static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
-
-/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
- First, the terminals, then, starting at YYNTOKENS, nonterminals. */
-static const char *const yytname[] =
-{
- "\"end of file\"", "error", "\"invalid token\"", "SUMOP", "MINUSOP",
- "DIVIDEOP", "EXPOP", "MULTOP", "PARENTHESIS", "BRACKET",
- "ENDPARENTHESIS", "ENDBRACKET", "VALUE", "IDENTIFIER", "COMMA",
- "DIFFERENTIAL", "DERIVATE", "DERIVKEY", "ASSIGNOP", "DEASSIGNKEY",
- "EQUALOP", "RELSEPARATOR", "CONSTKEY", "SUMKEY", "PRODKEY", "'\\n'",
- "$accept", "exprentry", "Assignment", "$@1", "Deassignment", "$@2",
- "GenExpr", "SingleExpr", "Single", "Function", "$@3", "ListGenExpr",
- "$@4", "funcident", "FunctionDefinition", "$@5", "DerFunctionId", "$@6",
- "DiffFuncId", "$@7", "$@8", "DiffId", "FunctionDef", "$@9", "ListArg",
- "$@10", "unarg", "Derivation", "$@11", "$@12", "$@13",
- "ConstantDefinition", "$@14", "$@15", "Sumator", "$@16", "$@17",
- "Productor", "$@18", "$@19", "RelationList", "SingleRelation", YY_NULLPTR
-};
-
-static const char *
-yysymbol_name (yysymbol_kind_t yysymbol)
-{
- return yytname[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) \
- ((Yyn) == YYPACT_NINF)
-
-#define YYTABLE_NINF (-56)
-
-#define yytable_value_is_error(Yyn) \
- 0
-
- /* 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,
- 59, 60, 63, 9, -51, -51, 35, -51, -51, -51,
- 7, -51, 37, -51, -51, -51, -51, -51, -51, -51,
- 36, 6, 24, 24, 161, 152, 55, 64, 67, -51,
- -51, -51, 73, 62, 68, 69, 62, 62, -51, 62,
- 62, 62, 62, 62, 62, 62, 62, 93, 79, 62,
- 62, -51, -51, 62, -51, 103, 43, 99, 30, -51,
- -51, 84, 89, 24, 24, 111, -51, 111, 169, 101,
- 108, 109, 62, 62, 35, -51, -51, 169, -51, 115,
- 116, 124, 120, 121, 137, 117, 122, 138, -51, -51,
- -51, 142, 169, -51, -51, 145, -51, 136, -51, 141,
- -51, -51, 62, -51, 103, 149, 151, 155, -51, 156,
- 163, -51, -51, -51, -51, 166, 168, 62, 62, 167,
- -51, -51, 106, 118, -51, 170, 62, 62, -51, 135,
- 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. */
-static const yytype_int8 yydefact[] =
-{
- 0, 0, 0, 0, 0, 28, 27, 0, 0, 0,
- 0, 0, 0, 0, 3, 4, 2, 20, 25, 26,
- 0, 5, 0, 31, 37, 21, 22, 23, 24, 6,
- 67, 27, 19, 18, 0, 0, 0, 0, 0, 42,
- 45, 46, 0, 0, 0, 0, 0, 0, 1, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 16, 17, 0, 40, 0, 0, 0, 0, 9,
- 58, 0, 0, 11, 12, 14, 15, 13, 70, 33,
- 0, 0, 0, 0, 0, 68, 69, 8, 52, 0,
- 49, 0, 0, 0, 0, 0, 0, 0, 34, 29,
- 30, 0, 38, 48, 50, 0, 41, 53, 10, 0,
- 61, 64, 0, 32, 0, 0, 0, 0, 59, 0,
- 0, 35, 51, 43, 54, 0, 0, 0, 0, 0,
- 56, 60, 0, 0, 44, 0, 0, 0, 57, 0,
- 0, 0, 0, 62, 65, 0, 0, 63, 66
-};
-
- /* YYPGOTO[NTERM-NUM]. */
-static const yytype_int8 yypgoto[] =
-{
- -51, -51, -51, -51, -51, -51, 0, -51, -51, -51,
- -51, -50, -51, -51, -51, -51, -51, -51, -2, -51,
- -51, 123, -51, -51, 74, -51, -51, -51, -51, -51,
- -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
- -35, -51
-};
-
- /* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int16 yydefgoto[] =
-{
- -1, 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. */
-static const yytype_int16 yytable[] =
-{
- 16, 32, 33, 34, 35, 41, 81, 1, 2, 48,
- -36, -47, 3, 4, -36, 55, 5, 6, -39, 7,
- -7, 8, -39, 9, 85, 86, 10, 11, 12, 51,
- 52, 53, 101, 49, 50, 51, 52, 53, 49, 50,
- 51, 52, 53, 68, 93, 56, 71, 72, 43, 73,
- 74, 75, 76, 77, 78, 54, 40, 59, 7, 84,
- 84, 60, 121, 87, 41, 1, 2, 44, 45, 46,
- 3, 4, 47, 63, 5, 31, 65, 7, 67, 8,
- 64, 69, 70, 102, 10, 11, 12, 49, 50, 51,
- 52, 53, 49, 50, 51, 52, 53, 83, 96, 39,
- 40, 82, 7, 97, 49, 50, 51, 52, 53, 49,
- 50, 51, 52, 53, 92, 98, 88, 52, 99, 100,
- 136, 49, 50, 51, 52, 53, 103, 132, 133, 105,
- 104, 109, 137, 106, 107, 110, 139, 140, 49, 50,
- 51, 52, 53, 49, 50, 51, 52, 53, 108, 141,
- -55, 111, 113, 118, 142, 49, 50, 51, 52, 53,
- 115, 123, 124, 62, 49, 50, 51, 52, 53, 125,
- 127, 61, 49, 50, 51, 52, 53, 128, 130, 131,
- 134, 138, 0, 143, 144, 147, 148, 0, 122, 91
-};
-
-static const yytype_int16 yycheck[] =
-{
- 0, 1, 2, 3, 4, 7, 56, 3, 4, 0,
- 8, 9, 8, 9, 8, 8, 12, 13, 16, 15,
- 18, 17, 16, 19, 59, 60, 22, 23, 24, 5,
- 6, 7, 82, 3, 4, 5, 6, 7, 3, 4,
- 5, 6, 7, 43, 14, 8, 46, 47, 9, 49,
- 50, 51, 52, 53, 54, 20, 13, 21, 15, 59,
- 60, 25, 112, 63, 66, 3, 4, 9, 9, 9,
- 8, 9, 9, 18, 12, 13, 9, 15, 5, 17,
- 16, 13, 13, 83, 22, 23, 24, 3, 4, 5,
- 6, 7, 3, 4, 5, 6, 7, 18, 14, 12,
- 13, 8, 15, 14, 3, 4, 5, 6, 7, 3,
- 4, 5, 6, 7, 15, 14, 13, 6, 10, 10,
- 14, 3, 4, 5, 6, 7, 11, 127, 128, 5,
- 14, 14, 14, 13, 13, 13, 136, 137, 3, 4,
- 5, 6, 7, 3, 4, 5, 6, 7, 11, 14,
- 14, 13, 10, 12, 14, 3, 4, 5, 6, 7,
- 15, 12, 11, 11, 3, 4, 5, 6, 7, 14,
- 14, 10, 3, 4, 5, 6, 7, 14, 12, 11,
- 13, 11, -1, 12, 12, 11, 11, -1, 114, 66
-};
-
- /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- symbol of state STATE-NUM. */
-static const yytype_int8 yystos[] =
-{
- 0, 3, 4, 8, 9, 12, 13, 15, 17, 19,
- 22, 23, 24, 27, 28, 30, 32, 33, 34, 35,
- 39, 40, 42, 44, 48, 53, 57, 60, 63, 66,
- 67, 13, 32, 32, 32, 32, 29, 43, 49, 12,
- 13, 44, 47, 9, 9, 9, 9, 9, 0, 3,
- 4, 5, 6, 7, 20, 8, 8, 36, 41, 21,
- 25, 10, 11, 18, 16, 9, 45, 5, 32, 13,
- 13, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 37, 37, 8, 18, 32, 66, 66, 32, 13, 50,
- 52, 47, 15, 14, 31, 58, 14, 14, 14, 10,
- 10, 37, 32, 11, 14, 5, 13, 13, 11, 14,
- 13, 13, 38, 10, 51, 15, 54, 55, 12, 61,
- 64, 37, 50, 12, 11, 14, 59, 14, 14, 46,
- 12, 11, 32, 32, 13, 56, 14, 14, 11, 32,
- 32, 14, 14, 12, 12, 62, 65, 11, 11
-};
-
- /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const yytype_int8 yyr1[] =
-{
- 0, 26, 27, 27, 27, 27, 27, 29, 28, 31,
- 30, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 33, 33, 34, 34, 35,
- 35, 36, 35, 37, 38, 37, 39, 41, 40, 43,
- 42, 44, 45, 46, 44, 47, 47, 49, 48, 50,
- 51, 50, 52, 54, 53, 55, 56, 53, 58, 59,
- 57, 61, 62, 60, 64, 65, 63, 66, 66, 66,
- 67
-};
-
- /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
-static const yytype_int8 yyr2[] =
-{
- 0, 2, 1, 1, 1, 1, 1, 0, 4, 0,
- 5, 3, 3, 3, 3, 3, 3, 3, 2, 2,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 4,
- 4, 0, 5, 1, 0, 4, 1, 0, 4, 0,
- 3, 5, 0, 0, 9, 1, 1, 0, 5, 1,
- 0, 4, 1, 0, 7, 0, 0, 10, 0, 0,
- 8, 0, 0, 14, 0, 0, 14, 1, 3, 3,
- 3
-};
-
-
-enum { YYENOMEM = -2 };
-
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrorlab
-
-
-#define YYRECOVERING() (!!yyerrstatus)
-
-#define YYBACKUP(Token, Value) \
- do \
- if (yychar == YYEMPTY) \
- { \
- yychar = (Token); \
- yylval = (Value); \
- YYPOPSTACK (yylen); \
- yystate = *yyssp; \
- goto yybackup; \
- } \
- else \
- { \
- yyerror (YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
- while (0)
-
-/* Backward compatibility with an undocumented macro.
- Use YYerror or YYUNDEF. */
-#define YYERRCODE YYUNDEF
-
-
-/* Enable debugging if requested. */
-#if YYDEBUG
-
-# ifndef YYFPRINTF
-# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-# define YYFPRINTF fprintf
-# endif
-
-# define YYDPRINTF(Args) \
-do { \
- if (yydebug) \
- 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) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Kind, Value); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (0)
-
-
-/*-----------------------------------.
-| Print this symbol's value on YYO. |
-`-----------------------------------*/
-
-static void
-yy_symbol_value_print (FILE *yyo,
- yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
-{
- FILE *yyoutput = yyo;
- YYUSE (yyoutput);
- if (!yyvaluep)
- return;
-# ifdef YYPRINT
- if (yykind < YYNTOKENS)
- YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
-# endif
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- YYUSE (yykind);
- YY_IGNORE_MAYBE_UNINITIALIZED_END
-}
-
-
-/*---------------------------.
-| Print this symbol on YYO. |
-`---------------------------*/
-
-static void
-yy_symbol_print (FILE *yyo,
- yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
-{
- YYFPRINTF (yyo, "%s %s (",
- yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
-
- yy_symbol_value_print (yyo, yykind, yyvaluep);
- YYFPRINTF (yyo, ")");
-}
-
-/*------------------------------------------------------------------.
-| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (included). |
-`------------------------------------------------------------------*/
-
-static void
-yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
-{
- YYFPRINTF (stderr, "Stack now");
- for (; yybottom <= yytop; yybottom++)
- {
- int yybot = *yybottom;
- YYFPRINTF (stderr, " %d", yybot);
- }
- YYFPRINTF (stderr, "\n");
-}
-
-# define YY_STACK_PRINT(Bottom, Top) \
-do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
-} while (0)
-
-
-/*------------------------------------------------.
-| Report that the YYRULE is going to be reduced. |
-`------------------------------------------------*/
-
-static void
-yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
- int yyrule)
-{
- int yylno = yyrline[yyrule];
- int yynrhs = yyr2[yyrule];
- int yyi;
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
- yyrule - 1, yylno);
- /* The symbols being reduced. */
- for (yyi = 0; yyi < yynrhs; yyi++)
- {
- YYFPRINTF (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr,
- YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
- &yyvsp[(yyi + 1) - (yynrhs)]);
- YYFPRINTF (stderr, "\n");
- }
-}
-
-# define YY_REDUCE_PRINT(Rule) \
-do { \
- if (yydebug) \
- yy_reduce_print (yyssp, yyvsp, Rule); \
-} while (0)
-
-/* Nonzero means print parse trace. It is left uninitialized so that
- multiple parsers can coexist. */
-int yydebug;
-#else /* !YYDEBUG */
-# define YYDPRINTF(Args) ((void) 0)
-# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
-# define YY_STACK_PRINT(Bottom, Top)
-# define YY_REDUCE_PRINT(Rule)
-#endif /* !YYDEBUG */
-
-
-/* YYINITDEPTH -- initial size of the parser's stacks. */
-#ifndef YYINITDEPTH
-# define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
- if the built-in stack extension method is used).
-
- Do not make this value too large; the results are undefined if
- YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
- evaluated with infinite-precision integer arithmetic. */
-
-#ifndef YYMAXDEPTH
-# define YYMAXDEPTH 10000
-#endif
-
-
-
-
-
-
-/*-----------------------------------------------.
-| Release the memory associated to this symbol. |
-`-----------------------------------------------*/
-
-static void
-yydestruct (const char *yymsg,
- yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
-{
- YYUSE (yyvaluep);
- if (!yymsg)
- yymsg = "Deleting";
- YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
-
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- YYUSE (yykind);
- YY_IGNORE_MAYBE_UNINITIALIZED_END
-}
-
-
-/* Lookahead token kind. */
-int yychar;
-
-/* The semantic value of the lookahead symbol. */
-YYSTYPE yylval;
-/* Number of syntax errors so far. */
-int yynerrs;
-
-
-
-
-/*----------.
-| yyparse. |
-`----------*/
-
-int
-yyparse (void)
-{
- yy_state_fast_t yystate = 0;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus = 0;
-
- /* Refer to the stacks through separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
-
- /* Their size. */
- YYPTRDIFF_T yystacksize = YYINITDEPTH;
-
- /* The state stack: array, bottom, top. */
- yy_state_t yyssa[YYINITDEPTH];
- yy_state_t *yyss = yyssa;
- yy_state_t *yyssp = yyss;
-
- /* The semantic value stack: array, bottom, top. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs = yyvsa;
- YYSTYPE *yyvsp = yyvs;
-
- int yyn;
- /* The return value of yyparse. */
- int yyresult;
- /* Lookahead symbol kind. */
- yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
- /* The variables used to return semantic value and location from the
- action routines. */
- YYSTYPE yyval;
-
-
-
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
-
- /* The number of symbols on the RHS of the reduced rule.
- Keep to zero when no symbol should be popped. */
- int yylen = 0;
-
- YYDPRINTF ((stderr, "Starting parse\n"));
-
- yychar = YYEMPTY; /* Cause a token to be read. */
- goto yysetstate;
-
-
-/*------------------------------------------------------------.
-| yynewstate -- push a new state, which is found in yystate. |
-`------------------------------------------------------------*/
-yynewstate:
- /* In all cases, when you get here, the value and location stacks
- have just been pushed. So pushing a state here evens the stacks. */
- yyssp++;
-
-
-/*--------------------------------------------------------------------.
-| yysetstate -- set current state (the top of the stack) to yystate. |
-`--------------------------------------------------------------------*/
-yysetstate:
- YYDPRINTF ((stderr, "Entering state %d\n", yystate));
- YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
- YY_IGNORE_USELESS_CAST_BEGIN
- *yyssp = YY_CAST (yy_state_t, yystate);
- YY_IGNORE_USELESS_CAST_END
- YY_STACK_PRINT (yyss, yyssp);
-
- if (yyss + yystacksize - 1 <= yyssp)
-#if !defined yyoverflow && !defined YYSTACK_RELOCATE
- goto yyexhaustedlab;
-#else
- {
- /* Get the current used size of the three stacks, in elements. */
- YYPTRDIFF_T yysize = yyssp - yyss + 1;
-
-# if defined yyoverflow
- {
- /* Give user a chance to reallocate the stack. Use copies of
- these so that the &'s don't force the real ones into
- memory. */
- yy_state_t *yyss1 = yyss;
- YYSTYPE *yyvs1 = yyvs;
-
- /* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. This used to be a
- conditional around just the two extra args, but that might
- be undefined if yyoverflow is a macro. */
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * YYSIZEOF (*yyssp),
- &yyvs1, yysize * YYSIZEOF (*yyvsp),
- &yystacksize);
- yyss = yyss1;
- yyvs = yyvs1;
- }
-# else /* defined YYSTACK_RELOCATE */
- /* Extend the stack our own way. */
- if (YYMAXDEPTH <= yystacksize)
- goto yyexhaustedlab;
- yystacksize *= 2;
- if (YYMAXDEPTH < yystacksize)
- yystacksize = YYMAXDEPTH;
-
- {
- yy_state_t *yyss1 = yyss;
- union yyalloc *yyptr =
- YY_CAST (union yyalloc *,
- YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
- if (! yyptr)
- goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
-# undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
- }
-# endif
-
- yyssp = yyss + yysize - 1;
- yyvsp = yyvs + yysize - 1;
-
- YY_IGNORE_USELESS_CAST_BEGIN
- YYDPRINTF ((stderr, "Stack size increased to %ld\n",
- YY_CAST (long, yystacksize)));
- YY_IGNORE_USELESS_CAST_END
-
- if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
- }
-#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
-
- if (yystate == YYFINAL)
- YYACCEPT;
-
- goto yybackup;
-
-
-/*-----------.
-| yybackup. |
-`-----------*/
-yybackup:
- /* Do appropriate processing given the current state. Read a
- lookahead token if we need one and don't already have one. */
-
- /* First try to decide what to do without reference to lookahead token. */
- yyn = yypact[yystate];
- if (yypact_value_is_default (yyn))
- goto yydefault;
-
- /* Not known => get a lookahead token if don't already have one. */
-
- /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
- if (yychar == YYEMPTY)
- {
- YYDPRINTF ((stderr, "Reading a token\n"));
- yychar = yylex ();
- }
-
- if (yychar <= YYEOF)
- {
- yychar = YYEOF;
- yytoken = YYSYMBOL_YYEOF;
- YYDPRINTF ((stderr, "Now at end of input.\n"));
- }
- else if (yychar == YYerror)
- {
- /* The scanner already issued an error message, process directly
- to error recovery. But do not keep the error token as
- lookahead, it is too special and may lead us to an endless
- loop in error recovery. */
- yychar = YYUNDEF;
- yytoken = YYSYMBOL_YYerror;
- goto yyerrlab1;
- }
- else
- {
- yytoken = YYTRANSLATE (yychar);
- YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
- }
-
- /* If the proper action on seeing token YYTOKEN is to reduce or to
- detect an error, take that action. */
- yyn += yytoken;
- if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
- goto yydefault;
- yyn = yytable[yyn];
- if (yyn <= 0)
- {
- if (yytable_value_is_error (yyn))
- goto yyerrlab;
- yyn = -yyn;
- goto yyreduce;
- }
-
- /* Count tokens shifted since error; after three, turn off error
- status. */
- if (yyerrstatus)
- yyerrstatus--;
-
- /* Shift the lookahead token. */
- YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
- yystate = yyn;
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- *++yyvsp = yylval;
- YY_IGNORE_MAYBE_UNINITIALIZED_END
-
- /* Discard the shifted token. */
- yychar = YYEMPTY;
- goto yynewstate;
-
-
-/*-----------------------------------------------------------.
-| yydefault -- do the default action for the current state. |
-`-----------------------------------------------------------*/
-yydefault:
- yyn = yydefact[yystate];
- if (yyn == 0)
- goto yyerrlab;
- goto yyreduce;
-
-
-/*-----------------------------.
-| yyreduce -- do a reduction. |
-`-----------------------------*/
-yyreduce:
- /* yyn is the number of a rule to reduce with. */
- yylen = yyr2[yyn];
-
- /* If YYLEN is nonzero, implement the default value of the action:
- '$$ = $1'.
-
- Otherwise, the following line sets YYVAL to garbage.
- This behavior is undocumented and Bison
- users should not rely upon it. Assigning to YYVAL
- unconditionally makes the parser a bit smaller, and it avoids a
- GCC warning that YYVAL may be used uninitialized. */
- yyval = yyvsp[1-yylen];
-
-
- YY_REDUCE_PRINT (yyn);
- switch (yyn)
- {
- case 5: /* exprentry: FunctionDefinition */
- {ExprIntrp_EndOfFuncDef();}
- break;
-
- case 6: /* exprentry: RelationList */
- {ExprIntrp_EndOfRelation();}
- break;
-
- case 7: /* $@1: %empty */
- {ExprIntrp_AssignVariable();}
- break;
-
- case 8: /* Assignment: IDENTIFIER $@1 ASSIGNOP GenExpr */
- {ExprIntrp_EndOfAssign();}
- break;
-
- case 9: /* $@2: %empty */
- {ExprIntrp_Deassign();}
- break;
-
- case 11: /* GenExpr: GenExpr SUMOP GenExpr */
- {ExprIntrp_SumOperator();}
- break;
-
- case 12: /* GenExpr: GenExpr MINUSOP GenExpr */
- {ExprIntrp_MinusOperator();}
- break;
-
- case 13: /* GenExpr: GenExpr MULTOP GenExpr */
- {ExprIntrp_ProductOperator();}
- break;
-
- case 14: /* GenExpr: GenExpr DIVIDEOP GenExpr */
- {ExprIntrp_DivideOperator();}
- break;
-
- case 15: /* GenExpr: GenExpr EXPOP GenExpr */
- {ExprIntrp_ExpOperator();}
- break;
-
- case 18: /* GenExpr: MINUSOP GenExpr */
- {ExprIntrp_UnaryMinusOperator();}
- break;
-
- case 19: /* GenExpr: SUMOP GenExpr */
- {ExprIntrp_UnaryPlusOperator();}
- break;
-
- case 27: /* Single: IDENTIFIER */
- {ExprIntrp_VariableIdentifier();}
- break;
-
- case 28: /* Single: VALUE */
- {ExprIntrp_NumValue();}
- break;
-
- case 29: /* Function: funcident PARENTHESIS ListGenExpr ENDPARENTHESIS */
- {ExprIntrp_EndFunction();}
- break;
-
- case 30: /* Function: DerFunctionId PARENTHESIS ListGenExpr ENDPARENTHESIS */
- {ExprIntrp_EndDerFunction();}
- break;
-
- case 31: /* $@3: %empty */
- {ExprIntrp_EndDifferential();}
- break;
-
- case 32: /* Function: DiffFuncId $@3 PARENTHESIS ListGenExpr ENDPARENTHESIS */
- {ExprIntrp_EndDiffFunction();}
- break;
-
- case 33: /* ListGenExpr: GenExpr */
- {ExprIntrp_EndFuncArg();}
- break;
-
- case 34: /* $@4: %empty */
- {ExprIntrp_NextFuncArg();}
- break;
-
- case 36: /* funcident: IDENTIFIER */
- {ExprIntrp_StartFunction();}
- break;
-
- case 37: /* $@5: %empty */
- {ExprIntrp_DefineFunction();}
- break;
-
- case 39: /* $@6: %empty */
- {ExprIntrp_StartDerivate();}
- break;
-
- case 40: /* DerFunctionId: IDENTIFIER $@6 DERIVATE */
- {ExprIntrp_EndDerivate();}
- break;
-
- case 41: /* DiffFuncId: DIFFERENTIAL DiffId DIVIDEOP DIFFERENTIAL IDENTIFIER */
- {ExprIntrp_DiffVar();}
- break;
-
- case 42: /* $@7: %empty */
- {ExprIntrp_DiffDegree();}
- break;
-
- case 43: /* $@8: %empty */
- {ExprIntrp_VerDiffDegree();}
- break;
-
- case 44: /* DiffFuncId: DIFFERENTIAL VALUE $@7 DiffId DIVIDEOP DIFFERENTIAL VALUE $@8 IDENTIFIER */
- {ExprIntrp_DiffDegreeVar();}
- break;
-
- case 45: /* DiffId: IDENTIFIER */
- {ExprIntrp_StartDifferential();}
- break;
-
- case 47: /* $@9: %empty */
- {ExprIntrp_StartFunction();}
- break;
-
- case 49: /* ListArg: unarg */
- {ExprIntrp_EndFuncArg();}
- break;
-
- case 50: /* $@10: %empty */
- {ExprIntrp_NextFuncArg();}
- break;
-
- case 52: /* unarg: IDENTIFIER */
- {ExprIntrp_VariableIdentifier();}
- break;
-
- case 53: /* $@11: %empty */
- {ExprIntrp_Derivation();}
- break;
-
- case 54: /* Derivation: DERIVKEY BRACKET GenExpr COMMA IDENTIFIER $@11 ENDBRACKET */
- {ExprIntrp_EndDerivation();}
- break;
-
- case 55: /* $@12: %empty */
- {ExprIntrp_Derivation();}
- break;
-
- case 56: /* $@13: %empty */
- {ExprIntrp_DerivationValue();}
- break;
-
- case 57: /* Derivation: DERIVKEY BRACKET GenExpr COMMA IDENTIFIER $@12 COMMA VALUE $@13 ENDBRACKET */
- {ExprIntrp_EndDerivation();}
- break;
-
- case 58: /* $@14: %empty */
- {ExprIntrp_ConstantIdentifier();}
- break;
-
- case 59: /* $@15: %empty */
- {ExprIntrp_ConstantDefinition();}
- break;
-
- case 61: /* $@16: %empty */
- {ExprIntrp_VariableIdentifier();}
- break;
-
- case 62: /* $@17: %empty */
- {ExprIntrp_NumValue();}
- break;
-
- case 63: /* Sumator: SUMKEY BRACKET GenExpr COMMA IDENTIFIER $@16 COMMA GenExpr COMMA GenExpr COMMA VALUE $@17 ENDBRACKET */
- {ExprIntrp_Sumator();}
- break;
-
- case 64: /* $@18: %empty */
- {ExprIntrp_VariableIdentifier();}
- break;
-
- case 65: /* $@19: %empty */
- {ExprIntrp_NumValue();}
- break;
-
- case 66: /* Productor: PRODKEY BRACKET GenExpr COMMA IDENTIFIER $@18 COMMA GenExpr COMMA GenExpr COMMA VALUE $@19 ENDBRACKET */
- {ExprIntrp_Productor();}
- break;
-
- case 70: /* SingleRelation: GenExpr EQUALOP GenExpr */
- {ExprIntrp_EndOfEqual();}
- break;
-
-
-
- default: break;
- }
- /* User semantic actions sometimes alter yychar, and that requires
- that yytoken be updated with the new translation. We take the
- approach of translating immediately before every use of yytoken.
- One alternative is translating here after every semantic action,
- but that translation would be missed if the semantic action invokes
- YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
- if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
- incorrect destructor might then be invoked immediately. In the
- case of YYERROR or YYBACKUP, subsequent parser actions might lead
- to an incorrect destructor call or verbose syntax error message
- before the lookahead is translated. */
- YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
-
- YYPOPSTACK (yylen);
- yylen = 0;
-
- *++yyvsp = yyval;
-
- /* Now 'shift' the result of the reduction. Determine what state
- that goes to, based on the state we popped back to and the rule
- number reduced by. */
- {
- const int yylhs = yyr1[yyn] - YYNTOKENS;
- const int yyi = yypgoto[yylhs] + *yyssp;
- yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
- ? yytable[yyi]
- : yydefgoto[yylhs]);
- }
-
- goto yynewstate;
-
-
-/*--------------------------------------.
-| yyerrlab -- here on detecting error. |
-`--------------------------------------*/
-yyerrlab:
- /* Make sure we have latest lookahead translation. See comments at
- user semantic actions for why this is necessary. */
- yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
- /* If not already recovering from an error, report this error. */
- if (!yyerrstatus)
- {
- ++yynerrs;
- yyerror (YY_("syntax error"));
- }
-
- if (yyerrstatus == 3)
- {
- /* If just tried and failed to reuse lookahead token after an
- error, discard it. */
-
- if (yychar <= YYEOF)
- {
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- YYABORT;
- }
- else
- {
- yydestruct ("Error: discarding",
- yytoken, &yylval);
- yychar = YYEMPTY;
- }
- }
-
- /* Else will try to reuse lookahead token after shifting the error
- token. */
- goto yyerrlab1;
-
-
-/*---------------------------------------------------.
-| yyerrorlab -- error raised explicitly by YYERROR. |
-`---------------------------------------------------*/
-yyerrorlab:
- /* Pacify compilers when the user code never invokes YYERROR and the
- label yyerrorlab therefore never appears in user code. */
- if (0)
- YYERROR;
-
- /* Do not reclaim the symbols of the rule whose action triggered
- this YYERROR. */
- YYPOPSTACK (yylen);
- yylen = 0;
- YY_STACK_PRINT (yyss, yyssp);
- yystate = *yyssp;
- goto yyerrlab1;
-
-
-/*-------------------------------------------------------------.
-| yyerrlab1 -- common code for both syntax error and YYERROR. |
-`-------------------------------------------------------------*/
-yyerrlab1:
- yyerrstatus = 3; /* Each real token shifted decrements this. */
-
- /* Pop stack until we find a state that shifts the error token. */
- for (;;)
- {
- yyn = yypact[yystate];
- if (!yypact_value_is_default (yyn))
- {
- yyn += YYSYMBOL_YYerror;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
- {
- yyn = yytable[yyn];
- if (0 < yyn)
- break;
- }
- }
-
- /* Pop the current state because it cannot handle the error token. */
- if (yyssp == yyss)
- YYABORT;
-
-
- yydestruct ("Error: popping",
- YY_ACCESSING_SYMBOL (yystate), yyvsp);
- YYPOPSTACK (1);
- yystate = *yyssp;
- YY_STACK_PRINT (yyss, yyssp);
- }
-
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- *++yyvsp = yylval;
- YY_IGNORE_MAYBE_UNINITIALIZED_END
-
-
- /* Shift the error token. */
- YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
-
- yystate = yyn;
- goto yynewstate;
-
-
-/*-------------------------------------.
-| yyacceptlab -- YYACCEPT comes here. |
-`-------------------------------------*/
-yyacceptlab:
- yyresult = 0;
- goto yyreturn;
-
-
-/*-----------------------------------.
-| yyabortlab -- YYABORT comes here. |
-`-----------------------------------*/
-yyabortlab:
- yyresult = 1;
- goto yyreturn;
-
-
-#if !defined yyoverflow
-/*-------------------------------------------------.
-| yyexhaustedlab -- memory exhaustion comes here. |
-`-------------------------------------------------*/
-yyexhaustedlab:
- yyerror (YY_("memory exhausted"));
- yyresult = 2;
- goto yyreturn;
-#endif
-
-
-/*-------------------------------------------------------.
-| yyreturn -- parsing is finished, clean up and return. |
-`-------------------------------------------------------*/
-yyreturn:
- if (yychar != YYEMPTY)
- {
- /* Make sure we have latest lookahead translation. See comments at
- user semantic actions for why this is necessary. */
- yytoken = YYTRANSLATE (yychar);
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval);
- }
- /* Do not reclaim the symbols of the rule whose action triggered
- this YYABORT or YYACCEPT. */
- YYPOPSTACK (yylen);
- YY_STACK_PRINT (yyss, yyssp);
- while (yyssp != yyss)
- {
- yydestruct ("Cleanup: popping",
- YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
- YYPOPSTACK (1);
- }
-#ifndef yyoverflow
- if (yyss != yyssa)
- YYSTACK_FREE (yyss);
-#endif
-
- return yyresult;
-}
-
--- /dev/null
+/* 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-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
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ 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 <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
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+ simplifying the original so-called "semantic" parser. */
+
+/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
+ especially those whose name start with YY_ or yy_. They are
+ private implementation details that can be changed or removed. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output, and Bison version. */
+#define YYBISON 30802
+
+/* Bison version string. */
+#define YYBISON_VERSION "3.8.2"
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 0
+
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
+
+/* Substitute the variable and function names. */
+#define yyparse ExprIntrpparse
+#define yylex ExprIntrplex
+#define yyerror ExprIntrperror
+#define yydebug ExprIntrpdebug
+#define yynerrs ExprIntrpnerrs
+#define yylval ExprIntrplval
+#define yychar ExprIntrpchar
+
+/* First part of user prologue. */
+
+#include <ExprIntrp_yaccintrf.hxx>
+
+extern void ExprIntrp_EndOfFuncDef();
+extern void ExprIntrp_EndOfRelation();
+extern void ExprIntrp_AssignVariable();
+extern void ExprIntrp_EndOfAssign();
+extern void ExprIntrp_Deassign();
+extern void ExprIntrp_SumOperator();
+extern void ExprIntrp_MinusOperator();
+extern void ExprIntrp_ProductOperator();
+extern void ExprIntrp_DivideOperator();
+extern void ExprIntrp_ExpOperator();
+extern void ExprIntrp_UnaryMinusOperator();
+extern void ExprIntrp_UnaryPlusOperator();
+extern void ExprIntrp_VariableIdentifier();
+extern void ExprIntrp_NumValue();
+extern void ExprIntrp_EndFunction();
+extern void ExprIntrp_EndDerFunction();
+extern void ExprIntrp_EndDifferential();
+extern void ExprIntrp_EndDiffFunction();
+extern void ExprIntrp_EndFuncArg();
+extern void ExprIntrp_NextFuncArg();
+extern void ExprIntrp_StartFunction();
+extern void ExprIntrp_DefineFunction();
+extern void ExprIntrp_StartDerivate();
+extern void ExprIntrp_EndDerivate();
+extern void ExprIntrp_DiffVar();
+extern void ExprIntrp_DiffDegree();
+extern void ExprIntrp_VerDiffDegree();
+extern void ExprIntrp_DiffDegreeVar();
+extern void ExprIntrp_StartDifferential();
+extern void ExprIntrp_StartFunction();
+extern void ExprIntrp_EndFuncArg();
+extern void ExprIntrp_NextFuncArg();
+extern void ExprIntrp_VariableIdentifier();
+extern void ExprIntrp_Derivation();
+extern void ExprIntrp_EndDerivation();
+extern void ExprIntrp_DerivationValue();
+extern void ExprIntrp_ConstantIdentifier();
+extern void ExprIntrp_ConstantDefinition();
+extern void ExprIntrp_VariableIdentifier();
+extern void ExprIntrp_NumValue();
+extern void ExprIntrp_Sumator();
+extern void ExprIntrp_VariableIdentifier();
+extern void ExprIntrp_Productor();
+extern void ExprIntrp_EndOfEqual();
+
+// disable MSVC warnings in bison code
+#ifdef _MSC_VER
+#pragma warning(disable:4131 4244 4127 4702)
+#endif
+
+
+
+
+# ifndef YY_CAST
+# ifdef __cplusplus
+# define YY_CAST(Type, Val) static_cast<Type> (Val)
+# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
+# else
+# define YY_CAST(Type, Val) ((Type) (Val))
+# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
+# endif
+# endif
+# ifndef YY_NULLPTR
+# if defined __cplusplus
+# if 201103L <= __cplusplus
+# define YY_NULLPTR nullptr
+# else
+# define YY_NULLPTR 0
+# endif
+# else
+# define YY_NULLPTR ((void*)0)
+# endif
+# endif
+
+#include "ExprIntrp.tab.hxx"
+/* Symbol kind. */
+enum yysymbol_kind_t
+{
+ YYSYMBOL_YYEMPTY = -2,
+ YYSYMBOL_YYEOF = 0, /* "end of file" */
+ YYSYMBOL_YYerror = 1, /* error */
+ YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
+ YYSYMBOL_SUMOP = 3, /* SUMOP */
+ YYSYMBOL_MINUSOP = 4, /* MINUSOP */
+ YYSYMBOL_DIVIDEOP = 5, /* DIVIDEOP */
+ YYSYMBOL_EXPOP = 6, /* EXPOP */
+ YYSYMBOL_MULTOP = 7, /* MULTOP */
+ YYSYMBOL_PARENTHESIS = 8, /* PARENTHESIS */
+ YYSYMBOL_BRACKET = 9, /* BRACKET */
+ YYSYMBOL_ENDPARENTHESIS = 10, /* ENDPARENTHESIS */
+ YYSYMBOL_ENDBRACKET = 11, /* ENDBRACKET */
+ YYSYMBOL_VALUE = 12, /* VALUE */
+ YYSYMBOL_IDENTIFIER = 13, /* IDENTIFIER */
+ YYSYMBOL_COMMA = 14, /* COMMA */
+ YYSYMBOL_DIFFERENTIAL = 15, /* DIFFERENTIAL */
+ YYSYMBOL_DERIVATE = 16, /* DERIVATE */
+ YYSYMBOL_DERIVKEY = 17, /* DERIVKEY */
+ YYSYMBOL_ASSIGNOP = 18, /* ASSIGNOP */
+ YYSYMBOL_DEASSIGNKEY = 19, /* DEASSIGNKEY */
+ YYSYMBOL_EQUALOP = 20, /* EQUALOP */
+ YYSYMBOL_RELSEPARATOR = 21, /* RELSEPARATOR */
+ YYSYMBOL_CONSTKEY = 22, /* CONSTKEY */
+ YYSYMBOL_SUMKEY = 23, /* SUMKEY */
+ YYSYMBOL_PRODKEY = 24, /* PRODKEY */
+ YYSYMBOL_25_n_ = 25, /* '\n' */
+ YYSYMBOL_YYACCEPT = 26, /* $accept */
+ YYSYMBOL_exprentry = 27, /* exprentry */
+ YYSYMBOL_Assignment = 28, /* Assignment */
+ YYSYMBOL_29_1 = 29, /* $@1 */
+ YYSYMBOL_Deassignment = 30, /* Deassignment */
+ YYSYMBOL_31_2 = 31, /* $@2 */
+ YYSYMBOL_GenExpr = 32, /* GenExpr */
+ YYSYMBOL_SingleExpr = 33, /* SingleExpr */
+ YYSYMBOL_Single = 34, /* Single */
+ YYSYMBOL_Function = 35, /* Function */
+ YYSYMBOL_36_3 = 36, /* $@3 */
+ YYSYMBOL_ListGenExpr = 37, /* ListGenExpr */
+ YYSYMBOL_38_4 = 38, /* $@4 */
+ YYSYMBOL_funcident = 39, /* funcident */
+ YYSYMBOL_FunctionDefinition = 40, /* FunctionDefinition */
+ YYSYMBOL_41_5 = 41, /* $@5 */
+ YYSYMBOL_DerFunctionId = 42, /* DerFunctionId */
+ YYSYMBOL_43_6 = 43, /* $@6 */
+ YYSYMBOL_DiffFuncId = 44, /* DiffFuncId */
+ YYSYMBOL_45_7 = 45, /* $@7 */
+ YYSYMBOL_46_8 = 46, /* $@8 */
+ YYSYMBOL_DiffId = 47, /* DiffId */
+ YYSYMBOL_FunctionDef = 48, /* FunctionDef */
+ YYSYMBOL_49_9 = 49, /* $@9 */
+ YYSYMBOL_ListArg = 50, /* ListArg */
+ YYSYMBOL_51_10 = 51, /* $@10 */
+ YYSYMBOL_unarg = 52, /* unarg */
+ YYSYMBOL_Derivation = 53, /* Derivation */
+ YYSYMBOL_54_11 = 54, /* $@11 */
+ YYSYMBOL_55_12 = 55, /* $@12 */
+ YYSYMBOL_56_13 = 56, /* $@13 */
+ YYSYMBOL_ConstantDefinition = 57, /* ConstantDefinition */
+ YYSYMBOL_58_14 = 58, /* $@14 */
+ YYSYMBOL_59_15 = 59, /* $@15 */
+ YYSYMBOL_Sumator = 60, /* Sumator */
+ YYSYMBOL_61_16 = 61, /* $@16 */
+ YYSYMBOL_62_17 = 62, /* $@17 */
+ YYSYMBOL_Productor = 63, /* Productor */
+ YYSYMBOL_64_18 = 64, /* $@18 */
+ YYSYMBOL_65_19 = 65, /* $@19 */
+ YYSYMBOL_RelationList = 66, /* RelationList */
+ YYSYMBOL_SingleRelation = 67 /* SingleRelation */
+};
+typedef enum yysymbol_kind_t yysymbol_kind_t;
+
+
+
+
+#ifdef short
+# undef short
+#endif
+
+/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
+ <limits.h> and (if available) <stdint.h> are included
+ so that the code can choose integer types of a good width. */
+
+#ifndef __PTRDIFF_MAX__
+# include <limits.h> /* INFRINGES ON USER NAME SPACE */
+# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
+# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_STDINT_H
+# endif
+#endif
+
+/* Narrow types that promote to a signed type and that can represent a
+ signed or unsigned integer of at least N bits. In tables they can
+ save space and decrease cache pressure. Promoting to a signed type
+ helps avoid bugs in integer arithmetic. */
+
+#ifdef __INT_LEAST8_MAX__
+typedef __INT_LEAST8_TYPE__ yytype_int8;
+#elif defined YY_STDINT_H
+typedef int_least8_t yytype_int8;
+#else
+typedef signed char yytype_int8;
+#endif
+
+#ifdef __INT_LEAST16_MAX__
+typedef __INT_LEAST16_TYPE__ yytype_int16;
+#elif defined YY_STDINT_H
+typedef int_least16_t yytype_int16;
+#else
+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 \
+ && UINT_LEAST8_MAX <= INT_MAX)
+typedef uint_least8_t yytype_uint8;
+#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
+typedef unsigned char yytype_uint8;
+#else
+typedef short yytype_uint8;
+#endif
+
+#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
+typedef __UINT_LEAST16_TYPE__ yytype_uint16;
+#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
+ && UINT_LEAST16_MAX <= INT_MAX)
+typedef uint_least16_t yytype_uint16;
+#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
+typedef unsigned short yytype_uint16;
+#else
+typedef int yytype_uint16;
+#endif
+
+#ifndef YYPTRDIFF_T
+# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
+# define YYPTRDIFF_T __PTRDIFF_TYPE__
+# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
+# elif defined PTRDIFF_MAX
+# ifndef ptrdiff_t
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# endif
+# define YYPTRDIFF_T ptrdiff_t
+# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
+# else
+# define YYPTRDIFF_T long
+# define YYPTRDIFF_MAXIMUM LONG_MAX
+# endif
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define YYSIZE_T size_t
+# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# else
+# define YYSIZE_T unsigned
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM \
+ YY_CAST (YYPTRDIFF_T, \
+ (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
+ ? YYPTRDIFF_MAXIMUM \
+ : YY_CAST (YYSIZE_T, -1)))
+
+#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
+
+
+/* Stored state numbers (used for stacks). */
+typedef yytype_uint8 yy_state_t;
+
+/* State numbers in computations. */
+typedef int yy_state_fast_t;
+
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(Msgid) Msgid
+# endif
+#endif
+
+
+#ifndef YY_ATTRIBUTE_PURE
+# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
+# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
+# else
+# define YY_ATTRIBUTE_PURE
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
+# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+# else
+# define YY_ATTRIBUTE_UNUSED
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define YY_USE(E) ((void) (E))
+#else
+# define YY_USE(E) /* empty */
+#endif
+
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+#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
+# define YY_INITIAL_VALUE(Value) Value
+#endif
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
+#endif
+
+#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
+# define YY_IGNORE_USELESS_CAST_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
+# define YY_IGNORE_USELESS_CAST_END \
+ _Pragma ("GCC diagnostic pop")
+#endif
+#ifndef YY_IGNORE_USELESS_CAST_BEGIN
+# define YY_IGNORE_USELESS_CAST_BEGIN
+# define YY_IGNORE_USELESS_CAST_END
+#endif
+
+
+#define YY_ASSERT(E) ((void) (0 && (E)))
+
+#if !defined yyoverflow
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# elif defined __BUILTIN_VA_ARG_INCR
+# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
+# else
+# define YYSTACK_ALLOC alloca
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+ /* Use EXIT_SUCCESS as a witness for stdlib.h. */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's 'empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+# endif
+# else
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+# endif
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
+ && ! ((defined YYMALLOC || defined malloc) \
+ && (defined YYFREE || defined free)))
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if ! defined malloc && ! defined EXIT_SUCCESS
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if ! defined free && ! defined EXIT_SUCCESS
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# endif
+#endif /* !defined yyoverflow */
+
+#if (! defined yyoverflow \
+ && (! defined __cplusplus \
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ yy_state_t yyss_alloc;
+ YYSTYPE yyvs_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
+
+# define YYCOPY_NEEDED 1
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYPTRDIFF_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / YYSIZEOF (*yyptr); \
+ } \
+ while (0)
+
+#endif
+
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from SRC to DST. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(Dst, Src, Count) \
+ __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
+# else
+# define YYCOPY(Dst, Src, Count) \
+ do \
+ { \
+ YYPTRDIFF_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (Dst)[yyi] = (Src)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 48
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 189
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 26
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 42
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 70
+/* YYNSTATES -- Number of states. */
+#define YYNSTATES 149
+
+/* YYMAXUTOK -- Last valid token kind. */
+#define YYMAXUTOK 279
+
+
+/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, with out-of-bounds checking. */
+#define YYTRANSLATE(YYX) \
+ (0 <= (YYX) && (YYX) <= YYMAXUTOK \
+ ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
+ : YYSYMBOL_YYUNDEF)
+
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex. */
+static const yytype_int8 yytranslate[] =
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 25, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24
+};
+
+#if YYDEBUG
+/* 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,
+ 90, 93, 94, 95, 96, 97, 98, 99, 100, 101,
+ 102, 103, 104, 105, 106, 109, 110, 114, 115, 118,
+ 119, 120, 120, 123, 124, 124, 127, 130, 130, 133,
+ 133, 136, 137, 137, 137, 140, 141, 144, 144, 147,
+ 148, 148, 151, 154, 154, 155, 155, 155, 158, 158,
+ 158, 161, 161, 161, 164, 164, 164, 167, 168, 169,
+ 172
+};
+#endif
+
+/** Accessing symbol of state STATE. */
+#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
+
+#if YYDEBUG || 0
+/* The user-facing name of the symbol whose (internal) number is
+ YYSYMBOL. No bounds checking. */
+static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
+
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "\"end of file\"", "error", "\"invalid token\"", "SUMOP", "MINUSOP",
+ "DIVIDEOP", "EXPOP", "MULTOP", "PARENTHESIS", "BRACKET",
+ "ENDPARENTHESIS", "ENDBRACKET", "VALUE", "IDENTIFIER", "COMMA",
+ "DIFFERENTIAL", "DERIVATE", "DERIVKEY", "ASSIGNOP", "DEASSIGNKEY",
+ "EQUALOP", "RELSEPARATOR", "CONSTKEY", "SUMKEY", "PRODKEY", "'\\n'",
+ "$accept", "exprentry", "Assignment", "$@1", "Deassignment", "$@2",
+ "GenExpr", "SingleExpr", "Single", "Function", "$@3", "ListGenExpr",
+ "$@4", "funcident", "FunctionDefinition", "$@5", "DerFunctionId", "$@6",
+ "DiffFuncId", "$@7", "$@8", "DiffId", "FunctionDef", "$@9", "ListArg",
+ "$@10", "unarg", "Derivation", "$@11", "$@12", "$@13",
+ "ConstantDefinition", "$@14", "$@15", "Sumator", "$@16", "$@17",
+ "Productor", "$@18", "$@19", "RelationList", "SingleRelation", YY_NULLPTR
+};
+
+static const char *
+yysymbol_name (yysymbol_kind_t yysymbol)
+{
+ return yytname[yysymbol];
+}
+#endif
+
+#define YYPACT_NINF (-51)
+
+#define yypact_value_is_default(Yyn) \
+ ((Yyn) == YYPACT_NINF)
+
+#define YYTABLE_NINF (-56)
+
+#define yytable_value_is_error(Yyn) \
+ 0
+
+/* 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,
+ 59, 60, 63, 9, -51, -51, 35, -51, -51, -51,
+ 7, -51, 37, -51, -51, -51, -51, -51, -51, -51,
+ 36, 6, 24, 24, 161, 152, 55, 64, 67, -51,
+ -51, -51, 73, 62, 68, 69, 62, 62, -51, 62,
+ 62, 62, 62, 62, 62, 62, 62, 93, 79, 62,
+ 62, -51, -51, 62, -51, 103, 43, 99, 30, -51,
+ -51, 84, 89, 24, 24, 111, -51, 111, 169, 101,
+ 108, 109, 62, 62, 35, -51, -51, 169, -51, 115,
+ 116, 124, 120, 121, 137, 117, 122, 138, -51, -51,
+ -51, 142, 169, -51, -51, 145, -51, 136, -51, 141,
+ -51, -51, 62, -51, 103, 149, 151, 155, -51, 156,
+ 163, -51, -51, -51, -51, 166, 168, 62, 62, 167,
+ -51, -51, 106, 118, -51, 170, 62, 62, -51, 135,
+ 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. */
+static const yytype_int8 yydefact[] =
+{
+ 0, 0, 0, 0, 0, 28, 27, 0, 0, 0,
+ 0, 0, 0, 0, 3, 4, 2, 20, 25, 26,
+ 0, 5, 0, 31, 37, 21, 22, 23, 24, 6,
+ 67, 27, 19, 18, 0, 0, 0, 0, 0, 42,
+ 45, 46, 0, 0, 0, 0, 0, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 16, 17, 0, 40, 0, 0, 0, 0, 9,
+ 58, 0, 0, 11, 12, 14, 15, 13, 70, 33,
+ 0, 0, 0, 0, 0, 68, 69, 8, 52, 0,
+ 49, 0, 0, 0, 0, 0, 0, 0, 34, 29,
+ 30, 0, 38, 48, 50, 0, 41, 53, 10, 0,
+ 61, 64, 0, 32, 0, 0, 0, 0, 59, 0,
+ 0, 35, 51, 43, 54, 0, 0, 0, 0, 0,
+ 56, 60, 0, 0, 44, 0, 0, 0, 57, 0,
+ 0, 0, 0, 62, 65, 0, 0, 63, 66
+};
+
+/* YYPGOTO[NTERM-NUM]. */
+static const yytype_int8 yypgoto[] =
+{
+ -51, -51, -51, -51, -51, -51, 0, -51, -51, -51,
+ -51, -50, -51, -51, -51, -51, -51, -51, -2, -51,
+ -51, 123, -51, -51, 74, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -35, -51
+};
+
+/* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_uint8 yydefgoto[] =
+{
+ 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. */
+static const yytype_int16 yytable[] =
+{
+ 16, 32, 33, 34, 35, 41, 81, 1, 2, 48,
+ -36, -47, 3, 4, -36, 55, 5, 6, -39, 7,
+ -7, 8, -39, 9, 85, 86, 10, 11, 12, 51,
+ 52, 53, 101, 49, 50, 51, 52, 53, 49, 50,
+ 51, 52, 53, 68, 93, 56, 71, 72, 43, 73,
+ 74, 75, 76, 77, 78, 54, 40, 59, 7, 84,
+ 84, 60, 121, 87, 41, 1, 2, 44, 45, 46,
+ 3, 4, 47, 63, 5, 31, 65, 7, 67, 8,
+ 64, 69, 70, 102, 10, 11, 12, 49, 50, 51,
+ 52, 53, 49, 50, 51, 52, 53, 83, 96, 39,
+ 40, 82, 7, 97, 49, 50, 51, 52, 53, 49,
+ 50, 51, 52, 53, 92, 98, 88, 52, 99, 100,
+ 136, 49, 50, 51, 52, 53, 103, 132, 133, 105,
+ 104, 109, 137, 106, 107, 110, 139, 140, 49, 50,
+ 51, 52, 53, 49, 50, 51, 52, 53, 108, 141,
+ -55, 111, 113, 118, 142, 49, 50, 51, 52, 53,
+ 115, 123, 124, 62, 49, 50, 51, 52, 53, 125,
+ 127, 61, 49, 50, 51, 52, 53, 128, 130, 131,
+ 134, 138, 0, 143, 144, 147, 148, 0, 122, 91
+};
+
+static const yytype_int16 yycheck[] =
+{
+ 0, 1, 2, 3, 4, 7, 56, 3, 4, 0,
+ 8, 9, 8, 9, 8, 8, 12, 13, 16, 15,
+ 18, 17, 16, 19, 59, 60, 22, 23, 24, 5,
+ 6, 7, 82, 3, 4, 5, 6, 7, 3, 4,
+ 5, 6, 7, 43, 14, 8, 46, 47, 9, 49,
+ 50, 51, 52, 53, 54, 20, 13, 21, 15, 59,
+ 60, 25, 112, 63, 66, 3, 4, 9, 9, 9,
+ 8, 9, 9, 18, 12, 13, 9, 15, 5, 17,
+ 16, 13, 13, 83, 22, 23, 24, 3, 4, 5,
+ 6, 7, 3, 4, 5, 6, 7, 18, 14, 12,
+ 13, 8, 15, 14, 3, 4, 5, 6, 7, 3,
+ 4, 5, 6, 7, 15, 14, 13, 6, 10, 10,
+ 14, 3, 4, 5, 6, 7, 11, 127, 128, 5,
+ 14, 14, 14, 13, 13, 13, 136, 137, 3, 4,
+ 5, 6, 7, 3, 4, 5, 6, 7, 11, 14,
+ 14, 13, 10, 12, 14, 3, 4, 5, 6, 7,
+ 15, 12, 11, 11, 3, 4, 5, 6, 7, 14,
+ 14, 10, 3, 4, 5, 6, 7, 14, 12, 11,
+ 13, 11, -1, 12, 12, 11, 11, -1, 114, 66
+};
+
+/* 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,
+ 22, 23, 24, 27, 28, 30, 32, 33, 34, 35,
+ 39, 40, 42, 44, 48, 53, 57, 60, 63, 66,
+ 67, 13, 32, 32, 32, 32, 29, 43, 49, 12,
+ 13, 44, 47, 9, 9, 9, 9, 9, 0, 3,
+ 4, 5, 6, 7, 20, 8, 8, 36, 41, 21,
+ 25, 10, 11, 18, 16, 9, 45, 5, 32, 13,
+ 13, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 37, 37, 8, 18, 32, 66, 66, 32, 13, 50,
+ 52, 47, 15, 14, 31, 58, 14, 14, 14, 10,
+ 10, 37, 32, 11, 14, 5, 13, 13, 11, 14,
+ 13, 13, 38, 10, 51, 15, 54, 55, 12, 61,
+ 64, 37, 50, 12, 11, 14, 59, 14, 14, 46,
+ 12, 11, 32, 32, 13, 56, 14, 14, 11, 32,
+ 32, 14, 14, 12, 12, 62, 65, 11, 11
+};
+
+/* 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,
+ 30, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 33, 33, 34, 34, 35,
+ 35, 36, 35, 37, 38, 37, 39, 41, 40, 43,
+ 42, 44, 45, 46, 44, 47, 47, 49, 48, 50,
+ 51, 50, 52, 54, 53, 55, 56, 53, 58, 59,
+ 57, 61, 62, 60, 64, 65, 63, 66, 66, 66,
+ 67
+};
+
+/* 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,
+ 5, 3, 3, 3, 3, 3, 3, 3, 2, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 4,
+ 4, 0, 5, 1, 0, 4, 1, 0, 4, 0,
+ 3, 5, 0, 0, 9, 1, 1, 0, 5, 1,
+ 0, 4, 1, 0, 7, 0, 0, 10, 0, 0,
+ 8, 0, 0, 14, 0, 0, 14, 1, 3, 3,
+ 3
+};
+
+
+enum { YYENOMEM = -2 };
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+#define YYNOMEM goto yyexhaustedlab
+
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+ do \
+ if (yychar == YYEMPTY) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ YYPOPSTACK (yylen); \
+ yystate = *yyssp; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+ while (0)
+
+/* Backward compatibility with an undocumented macro.
+ Use YYerror or YYUNDEF. */
+#define YYERRCODE YYUNDEF
+
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+
+
+
+# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Kind, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+
+/*-----------------------------------.
+| Print this symbol's value on YYO. |
+`-----------------------------------*/
+
+static void
+yy_symbol_value_print (FILE *yyo,
+ yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
+{
+ FILE *yyoutput = yyo;
+ YY_USE (yyoutput);
+ if (!yyvaluep)
+ return;
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ YY_USE (yykind);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+}
+
+
+/*---------------------------.
+| Print this symbol on YYO. |
+`---------------------------*/
+
+static void
+yy_symbol_print (FILE *yyo,
+ yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
+{
+ YYFPRINTF (yyo, "%s %s (",
+ yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
+
+ yy_symbol_value_print (yyo, yykind, yyvaluep);
+ YYFPRINTF (yyo, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+static void
+yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+static void
+yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
+ int yyrule)
+{
+ int yylno = yyrline[yyrule];
+ int yynrhs = yyr2[yyrule];
+ int yyi;
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
+ yyrule - 1, yylno);
+ /* The symbols being reduced. */
+ for (yyi = 0; yyi < yynrhs; yyi++)
+ {
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr,
+ YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
+ &yyvsp[(yyi + 1) - (yynrhs)]);
+ YYFPRINTF (stderr, "\n");
+ }
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyssp, yyvsp, Rule); \
+} while (0)
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args) ((void) 0)
+# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+
+
+
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+static void
+yydestruct (const char *yymsg,
+ yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
+{
+ YY_USE (yyvaluep);
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ YY_USE (yykind);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+}
+
+
+/* Lookahead token kind. */
+int yychar;
+
+/* The semantic value of the lookahead symbol. */
+YYSTYPE yylval;
+/* Number of syntax errors so far. */
+int yynerrs;
+
+
+
+
+/*----------.
+| yyparse. |
+`----------*/
+
+int
+yyparse (void)
+{
+ yy_state_fast_t yystate = 0;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus = 0;
+
+ /* Refer to the stacks through separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* Their size. */
+ YYPTRDIFF_T yystacksize = YYINITDEPTH;
+
+ /* The state stack: array, bottom, top. */
+ yy_state_t yyssa[YYINITDEPTH];
+ yy_state_t *yyss = yyssa;
+ yy_state_t *yyssp = yyss;
+
+ /* The semantic value stack: array, bottom, top. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs = yyvsa;
+ YYSTYPE *yyvsp = yyvs;
+
+ int yyn;
+ /* The return value of yyparse. */
+ int yyresult;
+ /* Lookahead symbol kind. */
+ yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+
+ /* The number of symbols on the RHS of the reduced rule.
+ Keep to zero when no symbol should be popped. */
+ int yylen = 0;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yychar = YYEMPTY; /* Cause a token to be read. */
+
+ goto yysetstate;
+
+
+/*------------------------------------------------------------.
+| yynewstate -- push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. So pushing a state here evens the stacks. */
+ yyssp++;
+
+
+/*--------------------------------------------------------------------.
+| yysetstate -- set current state (the top of the stack) to yystate. |
+`--------------------------------------------------------------------*/
+yysetstate:
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+ YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
+ YY_IGNORE_USELESS_CAST_BEGIN
+ *yyssp = YY_CAST (yy_state_t, yystate);
+ YY_IGNORE_USELESS_CAST_END
+ YY_STACK_PRINT (yyss, yyssp);
+
+ if (yyss + yystacksize - 1 <= yyssp)
+#if !defined yyoverflow && !defined YYSTACK_RELOCATE
+ YYNOMEM;
+#else
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYPTRDIFF_T yysize = yyssp - yyss + 1;
+
+# if defined yyoverflow
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ yy_state_t *yyss1 = yyss;
+ YYSTYPE *yyvs1 = yyvs;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * YYSIZEOF (*yyssp),
+ &yyvs1, yysize * YYSIZEOF (*yyvsp),
+ &yystacksize);
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
+# else /* defined YYSTACK_RELOCATE */
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ YYNOMEM;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ yy_state_t *yyss1 = yyss;
+ union yyalloc *yyptr =
+ YY_CAST (union yyalloc *,
+ YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
+ if (! yyptr)
+ YYNOMEM;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+
+ YY_IGNORE_USELESS_CAST_BEGIN
+ YYDPRINTF ((stderr, "Stack size increased to %ld\n",
+ YY_CAST (long, yystacksize)));
+ YY_IGNORE_USELESS_CAST_END
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
+
+
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
+ goto yybackup;
+
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+ /* Do appropriate processing given the current state. Read a
+ lookahead token if we need one and don't already have one. */
+
+ /* First try to decide what to do without reference to lookahead token. */
+ yyn = yypact[yystate];
+ if (yypact_value_is_default (yyn))
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token\n"));
+ yychar = yylex ();
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = YYEOF;
+ yytoken = YYSYMBOL_YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else if (yychar == YYerror)
+ {
+ /* The scanner already issued an error message, process directly
+ to error recovery. But do not keep the error token as
+ lookahead, it is too special and may lead us to an endless
+ loop in error recovery. */
+ yychar = YYUNDEF;
+ yytoken = YYSYMBOL_YYerror;
+ goto yyerrlab1;
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yytable_value_is_error (yyn))
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ /* Shift the lookahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+ yystate = yyn;
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ '$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 5: /* exprentry: FunctionDefinition */
+ {ExprIntrp_EndOfFuncDef();}
+ break;
+
+ case 6: /* exprentry: RelationList */
+ {ExprIntrp_EndOfRelation();}
+ break;
+
+ case 7: /* $@1: %empty */
+ {ExprIntrp_AssignVariable();}
+ break;
+
+ case 8: /* Assignment: IDENTIFIER $@1 ASSIGNOP GenExpr */
+ {ExprIntrp_EndOfAssign();}
+ break;
+
+ case 9: /* $@2: %empty */
+ {ExprIntrp_Deassign();}
+ break;
+
+ case 11: /* GenExpr: GenExpr SUMOP GenExpr */
+ {ExprIntrp_SumOperator();}
+ break;
+
+ case 12: /* GenExpr: GenExpr MINUSOP GenExpr */
+ {ExprIntrp_MinusOperator();}
+ break;
+
+ case 13: /* GenExpr: GenExpr MULTOP GenExpr */
+ {ExprIntrp_ProductOperator();}
+ break;
+
+ case 14: /* GenExpr: GenExpr DIVIDEOP GenExpr */
+ {ExprIntrp_DivideOperator();}
+ break;
+
+ case 15: /* GenExpr: GenExpr EXPOP GenExpr */
+ {ExprIntrp_ExpOperator();}
+ break;
+
+ case 18: /* GenExpr: MINUSOP GenExpr */
+ {ExprIntrp_UnaryMinusOperator();}
+ break;
+
+ case 19: /* GenExpr: SUMOP GenExpr */
+ {ExprIntrp_UnaryPlusOperator();}
+ break;
+
+ case 27: /* Single: IDENTIFIER */
+ {ExprIntrp_VariableIdentifier();}
+ break;
+
+ case 28: /* Single: VALUE */
+ {ExprIntrp_NumValue();}
+ break;
+
+ case 29: /* Function: funcident PARENTHESIS ListGenExpr ENDPARENTHESIS */
+ {ExprIntrp_EndFunction();}
+ break;
+
+ case 30: /* Function: DerFunctionId PARENTHESIS ListGenExpr ENDPARENTHESIS */
+ {ExprIntrp_EndDerFunction();}
+ break;
+
+ case 31: /* $@3: %empty */
+ {ExprIntrp_EndDifferential();}
+ break;
+
+ case 32: /* Function: DiffFuncId $@3 PARENTHESIS ListGenExpr ENDPARENTHESIS */
+ {ExprIntrp_EndDiffFunction();}
+ break;
+
+ case 33: /* ListGenExpr: GenExpr */
+ {ExprIntrp_EndFuncArg();}
+ break;
+
+ case 34: /* $@4: %empty */
+ {ExprIntrp_NextFuncArg();}
+ break;
+
+ case 36: /* funcident: IDENTIFIER */
+ {ExprIntrp_StartFunction();}
+ break;
+
+ case 37: /* $@5: %empty */
+ {ExprIntrp_DefineFunction();}
+ break;
+
+ case 39: /* $@6: %empty */
+ {ExprIntrp_StartDerivate();}
+ break;
+
+ case 40: /* DerFunctionId: IDENTIFIER $@6 DERIVATE */
+ {ExprIntrp_EndDerivate();}
+ break;
+
+ case 41: /* DiffFuncId: DIFFERENTIAL DiffId DIVIDEOP DIFFERENTIAL IDENTIFIER */
+ {ExprIntrp_DiffVar();}
+ break;
+
+ case 42: /* $@7: %empty */
+ {ExprIntrp_DiffDegree();}
+ break;
+
+ case 43: /* $@8: %empty */
+ {ExprIntrp_VerDiffDegree();}
+ break;
+
+ case 44: /* DiffFuncId: DIFFERENTIAL VALUE $@7 DiffId DIVIDEOP DIFFERENTIAL VALUE $@8 IDENTIFIER */
+ {ExprIntrp_DiffDegreeVar();}
+ break;
+
+ case 45: /* DiffId: IDENTIFIER */
+ {ExprIntrp_StartDifferential();}
+ break;
+
+ case 47: /* $@9: %empty */
+ {ExprIntrp_StartFunction();}
+ break;
+
+ case 49: /* ListArg: unarg */
+ {ExprIntrp_EndFuncArg();}
+ break;
+
+ case 50: /* $@10: %empty */
+ {ExprIntrp_NextFuncArg();}
+ break;
+
+ case 52: /* unarg: IDENTIFIER */
+ {ExprIntrp_VariableIdentifier();}
+ break;
+
+ case 53: /* $@11: %empty */
+ {ExprIntrp_Derivation();}
+ break;
+
+ case 54: /* Derivation: DERIVKEY BRACKET GenExpr COMMA IDENTIFIER $@11 ENDBRACKET */
+ {ExprIntrp_EndDerivation();}
+ break;
+
+ case 55: /* $@12: %empty */
+ {ExprIntrp_Derivation();}
+ break;
+
+ case 56: /* $@13: %empty */
+ {ExprIntrp_DerivationValue();}
+ break;
+
+ case 57: /* Derivation: DERIVKEY BRACKET GenExpr COMMA IDENTIFIER $@12 COMMA VALUE $@13 ENDBRACKET */
+ {ExprIntrp_EndDerivation();}
+ break;
+
+ case 58: /* $@14: %empty */
+ {ExprIntrp_ConstantIdentifier();}
+ break;
+
+ case 59: /* $@15: %empty */
+ {ExprIntrp_ConstantDefinition();}
+ break;
+
+ case 61: /* $@16: %empty */
+ {ExprIntrp_VariableIdentifier();}
+ break;
+
+ case 62: /* $@17: %empty */
+ {ExprIntrp_NumValue();}
+ break;
+
+ case 63: /* Sumator: SUMKEY BRACKET GenExpr COMMA IDENTIFIER $@16 COMMA GenExpr COMMA GenExpr COMMA VALUE $@17 ENDBRACKET */
+ {ExprIntrp_Sumator();}
+ break;
+
+ case 64: /* $@18: %empty */
+ {ExprIntrp_VariableIdentifier();}
+ break;
+
+ case 65: /* $@19: %empty */
+ {ExprIntrp_NumValue();}
+ break;
+
+ case 66: /* Productor: PRODKEY BRACKET GenExpr COMMA IDENTIFIER $@18 COMMA GenExpr COMMA GenExpr COMMA VALUE $@19 ENDBRACKET */
+ {ExprIntrp_Productor();}
+ break;
+
+ case 70: /* SingleRelation: GenExpr EQUALOP GenExpr */
+ {ExprIntrp_EndOfEqual();}
+ break;
+
+
+
+ default: break;
+ }
+ /* User semantic actions sometimes alter yychar, and that requires
+ that yytoken be updated with the new translation. We take the
+ approach of translating immediately before every use of yytoken.
+ One alternative is translating here after every semantic action,
+ but that translation would be missed if the semantic action invokes
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
+ incorrect destructor might then be invoked immediately. In the
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
+ to an incorrect destructor call or verbose syntax error message
+ before the lookahead is translated. */
+ YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
+
+ YYPOPSTACK (yylen);
+ yylen = 0;
+
+ *++yyvsp = yyval;
+
+ /* Now 'shift' the result of the reduction. Determine what state
+ that goes to, based on the state we popped back to and the rule
+ number reduced by. */
+ {
+ const int yylhs = yyr1[yyn] - YYNTOKENS;
+ const int yyi = yypgoto[yylhs] + *yyssp;
+ yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
+ ? yytable[yyi]
+ : yydefgoto[yylhs]);
+ }
+
+ goto yynewstate;
+
+
+/*--------------------------------------.
+| yyerrlab -- here on detecting error. |
+`--------------------------------------*/
+yyerrlab:
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+ yyerror (YY_("syntax error"));
+ }
+
+ if (yyerrstatus == 3)
+ {
+ /* If just tried and failed to reuse lookahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval);
+ yychar = YYEMPTY;
+ }
+ }
+
+ /* Else will try to reuse lookahead token after shifting the error
+ token. */
+ goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+ /* Pacify compilers when the user code never invokes YYERROR and the
+ 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. */
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+ yystate = *yyssp;
+ goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+
+ /* Pop stack until we find a state that shifts the error token. */
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (!yypact_value_is_default (yyn))
+ {
+ yyn += YYSYMBOL_YYerror;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
+
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
+
+
+ yydestruct ("Error: popping",
+ YY_ACCESSING_SYMBOL (yystate), yyvsp);
+ YYPOPSTACK (1);
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
+ }
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturnlab;
+
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturnlab;
+
+
+/*-----------------------------------------------------------.
+| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
+`-----------------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
+ yyresult = 2;
+ goto yyreturnlab;
+
+
+/*----------------------------------------------------------.
+| yyreturnlab -- parsing is finished, clean up and return. |
+`----------------------------------------------------------*/
+yyreturnlab:
+ if (yychar != YYEMPTY)
+ {
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = YYTRANSLATE (yychar);
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ }
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYABORT or YYACCEPT. */
+ YYPOPSTACK (yylen);
+ YY_STACK_PRINT (yyss, yyssp);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
+ YYPOPSTACK (1);
+ }
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+
+ return yyresult;
+}
+
+++ /dev/null
-/* A Bison parser, made by GNU Bison 3.7.4. */
-
-/* Bison interface for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 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
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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/>. */
-
-/* As a special exception, you may create a larger work that contains
- part or all of the Bison parser skeleton and distribute that work
- under terms of your choice, so long as that work isn't itself a
- parser generator using the skeleton or a modified version thereof
- as a parser skeleton. Alternatively, if you modify or redistribute
- the parser skeleton itself, you may (at your option) remove this
- special exception, which will cause the skeleton and the resulting
- Bison output files to be licensed under the GNU General Public
- License without this special exception.
-
- This special exception was added by the Free Software Foundation in
- version 2.2 of Bison. */
-
-/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
- 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
-/* Debug traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-#if YYDEBUG
-extern int ExprIntrpdebug;
-#endif
-
-/* Token kinds. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- enum yytokentype
- {
- YYEMPTY = -2,
- YYEOF = 0, /* "end of file" */
- YYerror = 256, /* error */
- YYUNDEF = 257, /* "invalid token" */
- SUMOP = 258, /* SUMOP */
- MINUSOP = 259, /* MINUSOP */
- DIVIDEOP = 260, /* DIVIDEOP */
- EXPOP = 261, /* EXPOP */
- MULTOP = 262, /* MULTOP */
- PARENTHESIS = 263, /* PARENTHESIS */
- BRACKET = 264, /* BRACKET */
- ENDPARENTHESIS = 265, /* ENDPARENTHESIS */
- ENDBRACKET = 266, /* ENDBRACKET */
- VALUE = 267, /* VALUE */
- IDENTIFIER = 268, /* IDENTIFIER */
- COMMA = 269, /* COMMA */
- DIFFERENTIAL = 270, /* DIFFERENTIAL */
- DERIVATE = 271, /* DERIVATE */
- DERIVKEY = 272, /* DERIVKEY */
- ASSIGNOP = 273, /* ASSIGNOP */
- DEASSIGNKEY = 274, /* DEASSIGNKEY */
- EQUALOP = 275, /* EQUALOP */
- RELSEPARATOR = 276, /* RELSEPARATOR */
- CONSTKEY = 277, /* CONSTKEY */
- SUMKEY = 278, /* SUMKEY */
- PRODKEY = 279 /* PRODKEY */
- };
- typedef enum yytokentype yytoken_kind_t;
-#endif
-
-/* Value type. */
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef int YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
-
-extern YYSTYPE ExprIntrplval;
-
-int ExprIntrpparse (void);
-
-#endif /* !YY_EXPRINTRP_EXPRINTRP_EXPRINTRP_TAB_H_INCLUDED */
--- /dev/null
+/* 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-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
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ 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 <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
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
+ 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_HXX_INCLUDED
+# define YY_EXPRINTRP_EXPRINTRP_EXPRINTRP_TAB_HXX_INCLUDED
+/* Debug traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int ExprIntrpdebug;
+#endif
+
+/* Token kinds. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ enum yytokentype
+ {
+ YYEMPTY = -2,
+ YYEOF = 0, /* "end of file" */
+ YYerror = 256, /* error */
+ YYUNDEF = 257, /* "invalid token" */
+ SUMOP = 258, /* SUMOP */
+ MINUSOP = 259, /* MINUSOP */
+ DIVIDEOP = 260, /* DIVIDEOP */
+ EXPOP = 261, /* EXPOP */
+ MULTOP = 262, /* MULTOP */
+ PARENTHESIS = 263, /* PARENTHESIS */
+ BRACKET = 264, /* BRACKET */
+ ENDPARENTHESIS = 265, /* ENDPARENTHESIS */
+ ENDBRACKET = 266, /* ENDBRACKET */
+ VALUE = 267, /* VALUE */
+ IDENTIFIER = 268, /* IDENTIFIER */
+ COMMA = 269, /* COMMA */
+ DIFFERENTIAL = 270, /* DIFFERENTIAL */
+ DERIVATE = 271, /* DERIVATE */
+ DERIVKEY = 272, /* DERIVKEY */
+ ASSIGNOP = 273, /* ASSIGNOP */
+ DEASSIGNKEY = 274, /* DEASSIGNKEY */
+ EQUALOP = 275, /* EQUALOP */
+ RELSEPARATOR = 276, /* RELSEPARATOR */
+ CONSTKEY = 277, /* CONSTKEY */
+ SUMKEY = 278, /* SUMKEY */
+ PRODKEY = 279 /* PRODKEY */
+ };
+ typedef enum yytokentype yytoken_kind_t;
+#endif
+
+/* Value type. */
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+extern YYSTYPE ExprIntrplval;
+
+
+int ExprIntrpparse (void);
+
+
+#endif /* !YY_EXPRINTRP_EXPRINTRP_EXPRINTRP_TAB_HXX_INCLUDED */
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();
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());
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();
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();
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);
ExprIntrp_Recept.PushFunction(thefunc);
}
-extern "C" void ExprIntrp_EndDiffFunction()
+void ExprIntrp_EndDiffFunction()
{
Handle(Expr_GeneralFunction) thefunc = ExprIntrp_Recept.PopFunction();
if (thefunc.IsNull()) {
}
-extern "C" void ExprIntrp_EndDerFunction()
+void ExprIntrp_EndDerFunction()
{
TCollection_AsciiString name = ExprIntrp_Recept.PopName();
Handle(Expr_GeneralExpression) op = ExprIntrp_Recept.Pop();
}
}
-extern "C" void ExprIntrp_EndFunction()
+void ExprIntrp_EndFunction()
{
TCollection_AsciiString name = ExprIntrp_Recept.PopName();
Handle(Expr_GeneralExpression) op = ExprIntrp_Recept.Pop();
}
}
-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();
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();
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();
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();
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();
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);
ExprIntrp_Recept.Push(nameexp);
}
-extern "C" void ExprIntrp_NumValue()
+void ExprIntrp_NumValue()
{
const TCollection_AsciiString& aStr = ExprIntrp_GetResult();
Standard_Real value = aStr.RealValue();
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);
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();
ExprIntrp_Recept.PushRelation(res);
}
-extern "C" void ExprIntrp_EndOfRelation()
+void ExprIntrp_EndOfRelation()
{
Handle(Expr_SystemRelation) sys;
Handle(Expr_GeneralRelation) currel;
}
}
-extern "C" void ExprIntrp_EndOfAssign()
+void ExprIntrp_EndOfAssign()
{
Handle(Expr_NamedExpression) namexp = ExprIntrp_Recept.GetNamed(ExprIntrp_assname);
Handle(Expr_NamedUnknown) namu;
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();
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();
}
-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();
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();
#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();
int ExprIntrplex(void);
-#ifdef __cplusplus
-}
-#endif
-
-#ifdef __cplusplus
-
#include <TCollection_AsciiString.hxx>
const TCollection_AsciiString& ExprIntrp_GetResult ();
int ExprIntrp_GetDegree();
#endif
-
-#endif
#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);
}
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
ExprIntrp_yaccintrf.cxx
ExprIntrp_yaccintrf.hxx
ExprIntrp_yacclex.cxx
-lex.ExprIntrp.c
+lex.ExprIntrp.cxx
+++ /dev/null
-
-#define YY_INT_ALIGNED short int
-
-/* A lexical scanner generated by flex */
-
-#define yy_create_buffer ExprIntrp_create_buffer
-#define yy_delete_buffer ExprIntrp_delete_buffer
-#define yy_scan_buffer ExprIntrp_scan_buffer
-#define yy_scan_string ExprIntrp_scan_string
-#define yy_scan_bytes ExprIntrp_scan_bytes
-#define yy_init_buffer ExprIntrp_init_buffer
-#define yy_flush_buffer ExprIntrp_flush_buffer
-#define yy_load_buffer_state ExprIntrp_load_buffer_state
-#define yy_switch_to_buffer ExprIntrp_switch_to_buffer
-#define yypush_buffer_state ExprIntrppush_buffer_state
-#define yypop_buffer_state ExprIntrppop_buffer_state
-#define yyensure_buffer_stack ExprIntrpensure_buffer_stack
-#define yy_flex_debug ExprIntrp_flex_debug
-#define yyin ExprIntrpin
-#define yyleng ExprIntrpleng
-#define yylex ExprIntrplex
-#define yylineno ExprIntrplineno
-#define yyout ExprIntrpout
-#define yyrestart ExprIntrprestart
-#define yytext ExprIntrptext
-#define yywrap ExprIntrpwrap
-#define yyalloc ExprIntrpalloc
-#define yyrealloc ExprIntrprealloc
-#define yyfree ExprIntrpfree
-
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 6
-#define YY_FLEX_SUBMINOR_VERSION 4
-#if YY_FLEX_SUBMINOR_VERSION > 0
-#define FLEX_BETA
-#endif
-
-#ifdef yy_create_buffer
-#define ExprIntrp_create_buffer_ALREADY_DEFINED
-#else
-#define yy_create_buffer ExprIntrp_create_buffer
-#endif
-
-#ifdef yy_delete_buffer
-#define ExprIntrp_delete_buffer_ALREADY_DEFINED
-#else
-#define yy_delete_buffer ExprIntrp_delete_buffer
-#endif
-
-#ifdef yy_scan_buffer
-#define ExprIntrp_scan_buffer_ALREADY_DEFINED
-#else
-#define yy_scan_buffer ExprIntrp_scan_buffer
-#endif
-
-#ifdef yy_scan_string
-#define ExprIntrp_scan_string_ALREADY_DEFINED
-#else
-#define yy_scan_string ExprIntrp_scan_string
-#endif
-
-#ifdef yy_scan_bytes
-#define ExprIntrp_scan_bytes_ALREADY_DEFINED
-#else
-#define yy_scan_bytes ExprIntrp_scan_bytes
-#endif
-
-#ifdef yy_init_buffer
-#define ExprIntrp_init_buffer_ALREADY_DEFINED
-#else
-#define yy_init_buffer ExprIntrp_init_buffer
-#endif
-
-#ifdef yy_flush_buffer
-#define ExprIntrp_flush_buffer_ALREADY_DEFINED
-#else
-#define yy_flush_buffer ExprIntrp_flush_buffer
-#endif
-
-#ifdef yy_load_buffer_state
-#define ExprIntrp_load_buffer_state_ALREADY_DEFINED
-#else
-#define yy_load_buffer_state ExprIntrp_load_buffer_state
-#endif
-
-#ifdef yy_switch_to_buffer
-#define ExprIntrp_switch_to_buffer_ALREADY_DEFINED
-#else
-#define yy_switch_to_buffer ExprIntrp_switch_to_buffer
-#endif
-
-#ifdef yypush_buffer_state
-#define ExprIntrppush_buffer_state_ALREADY_DEFINED
-#else
-#define yypush_buffer_state ExprIntrppush_buffer_state
-#endif
-
-#ifdef yypop_buffer_state
-#define ExprIntrppop_buffer_state_ALREADY_DEFINED
-#else
-#define yypop_buffer_state ExprIntrppop_buffer_state
-#endif
-
-#ifdef yyensure_buffer_stack
-#define ExprIntrpensure_buffer_stack_ALREADY_DEFINED
-#else
-#define yyensure_buffer_stack ExprIntrpensure_buffer_stack
-#endif
-
-#ifdef yylex
-#define ExprIntrplex_ALREADY_DEFINED
-#else
-#define yylex ExprIntrplex
-#endif
-
-#ifdef yyrestart
-#define ExprIntrprestart_ALREADY_DEFINED
-#else
-#define yyrestart ExprIntrprestart
-#endif
-
-#ifdef yylex_init
-#define ExprIntrplex_init_ALREADY_DEFINED
-#else
-#define yylex_init ExprIntrplex_init
-#endif
-
-#ifdef yylex_init_extra
-#define ExprIntrplex_init_extra_ALREADY_DEFINED
-#else
-#define yylex_init_extra ExprIntrplex_init_extra
-#endif
-
-#ifdef yylex_destroy
-#define ExprIntrplex_destroy_ALREADY_DEFINED
-#else
-#define yylex_destroy ExprIntrplex_destroy
-#endif
-
-#ifdef yyget_debug
-#define ExprIntrpget_debug_ALREADY_DEFINED
-#else
-#define yyget_debug ExprIntrpget_debug
-#endif
-
-#ifdef yyset_debug
-#define ExprIntrpset_debug_ALREADY_DEFINED
-#else
-#define yyset_debug ExprIntrpset_debug
-#endif
-
-#ifdef yyget_extra
-#define ExprIntrpget_extra_ALREADY_DEFINED
-#else
-#define yyget_extra ExprIntrpget_extra
-#endif
-
-#ifdef yyset_extra
-#define ExprIntrpset_extra_ALREADY_DEFINED
-#else
-#define yyset_extra ExprIntrpset_extra
-#endif
-
-#ifdef yyget_in
-#define ExprIntrpget_in_ALREADY_DEFINED
-#else
-#define yyget_in ExprIntrpget_in
-#endif
-
-#ifdef yyset_in
-#define ExprIntrpset_in_ALREADY_DEFINED
-#else
-#define yyset_in ExprIntrpset_in
-#endif
-
-#ifdef yyget_out
-#define ExprIntrpget_out_ALREADY_DEFINED
-#else
-#define yyget_out ExprIntrpget_out
-#endif
-
-#ifdef yyset_out
-#define ExprIntrpset_out_ALREADY_DEFINED
-#else
-#define yyset_out ExprIntrpset_out
-#endif
-
-#ifdef yyget_leng
-#define ExprIntrpget_leng_ALREADY_DEFINED
-#else
-#define yyget_leng ExprIntrpget_leng
-#endif
-
-#ifdef yyget_text
-#define ExprIntrpget_text_ALREADY_DEFINED
-#else
-#define yyget_text ExprIntrpget_text
-#endif
-
-#ifdef yyget_lineno
-#define ExprIntrpget_lineno_ALREADY_DEFINED
-#else
-#define yyget_lineno ExprIntrpget_lineno
-#endif
-
-#ifdef yyset_lineno
-#define ExprIntrpset_lineno_ALREADY_DEFINED
-#else
-#define yyset_lineno ExprIntrpset_lineno
-#endif
-
-#ifdef yywrap
-#define ExprIntrpwrap_ALREADY_DEFINED
-#else
-#define yywrap ExprIntrpwrap
-#endif
-
-#ifdef yyalloc
-#define ExprIntrpalloc_ALREADY_DEFINED
-#else
-#define yyalloc ExprIntrpalloc
-#endif
-
-#ifdef yyrealloc
-#define ExprIntrprealloc_ALREADY_DEFINED
-#else
-#define yyrealloc ExprIntrprealloc
-#endif
-
-#ifdef yyfree
-#define ExprIntrpfree_ALREADY_DEFINED
-#else
-#define yyfree ExprIntrpfree
-#endif
-
-#ifdef yytext
-#define ExprIntrptext_ALREADY_DEFINED
-#else
-#define yytext ExprIntrptext
-#endif
-
-#ifdef yyleng
-#define ExprIntrpleng_ALREADY_DEFINED
-#else
-#define yyleng ExprIntrpleng
-#endif
-
-#ifdef yyin
-#define ExprIntrpin_ALREADY_DEFINED
-#else
-#define yyin ExprIntrpin
-#endif
-
-#ifdef yyout
-#define ExprIntrpout_ALREADY_DEFINED
-#else
-#define yyout ExprIntrpout
-#endif
-
-#ifdef yy_flex_debug
-#define ExprIntrp_flex_debug_ALREADY_DEFINED
-#else
-#define yy_flex_debug ExprIntrp_flex_debug
-#endif
-
-#ifdef yylineno
-#define ExprIntrplineno_ALREADY_DEFINED
-#else
-#define yylineno ExprIntrplineno
-#endif
-
-/* First, we deal with platform-specific or compiler-specific issues. */
-
-/* begin standard C headers. */
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <stdlib.h>
-
-/* end standard C headers. */
-
-/* flex integer type definitions */
-
-#ifndef FLEXINT_H
-#define FLEXINT_H
-
-/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
-
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-
-/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
- */
-#ifndef __STDC_LIMIT_MACROS
-#define __STDC_LIMIT_MACROS 1
-#endif
-
-#include <inttypes.h>
-typedef int8_t flex_int8_t;
-typedef uint8_t flex_uint8_t;
-typedef int16_t flex_int16_t;
-typedef uint16_t flex_uint16_t;
-typedef int32_t flex_int32_t;
-typedef uint32_t flex_uint32_t;
-#else
-typedef signed char flex_int8_t;
-typedef short int flex_int16_t;
-typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
-typedef unsigned short int flex_uint16_t;
-typedef unsigned int flex_uint32_t;
-
-/* Limits of integral types. */
-#ifndef INT8_MIN
-#define INT8_MIN (-128)
-#endif
-#ifndef INT16_MIN
-#define INT16_MIN (-32767-1)
-#endif
-#ifndef INT32_MIN
-#define INT32_MIN (-2147483647-1)
-#endif
-#ifndef INT8_MAX
-#define INT8_MAX (127)
-#endif
-#ifndef INT16_MAX
-#define INT16_MAX (32767)
-#endif
-#ifndef INT32_MAX
-#define INT32_MAX (2147483647)
-#endif
-#ifndef UINT8_MAX
-#define UINT8_MAX (255U)
-#endif
-#ifndef UINT16_MAX
-#define UINT16_MAX (65535U)
-#endif
-#ifndef UINT32_MAX
-#define UINT32_MAX (4294967295U)
-#endif
-
-#ifndef SIZE_MAX
-#define SIZE_MAX (~(size_t)0)
-#endif
-
-#endif /* ! C99 */
-
-#endif /* ! FLEXINT_H */
-
-/* begin standard C++ headers. */
-
-/* TODO: this is always defined, so inline it */
-#define yyconst const
-
-#if defined(__GNUC__) && __GNUC__ >= 3
-#define yynoreturn __attribute__((__noreturn__))
-#else
-#define yynoreturn
-#endif
-
-/* Returned upon end-of-file. */
-#define YY_NULL 0
-
-/* Promotes a possibly negative, possibly signed char to an
- * integer in range [0..255] for use as an array index.
- */
-#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
-
-/* Enter a start condition. This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#define BEGIN (yy_start) = 1 + 2 *
-/* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state. The YYSTATE alias is for lex
- * compatibility.
- */
-#define YY_START (((yy_start) - 1) / 2)
-#define YYSTATE YY_START
-/* Action number for EOF rule of a given start state. */
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart( yyin )
-#define YY_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#ifndef YY_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k.
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
- * Ditto for the __ia64__ case accordingly.
- */
-#define YY_BUF_SIZE 32768
-#else
-#define YY_BUF_SIZE 16384
-#endif /* __ia64__ */
-#endif
-
-/* The state buf must be large enough to hold one state per character in the main buffer.
- */
-#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
-
-#ifndef YY_TYPEDEF_YY_BUFFER_STATE
-#define YY_TYPEDEF_YY_BUFFER_STATE
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-#endif
-
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
-extern int yyleng;
-
-extern FILE *yyin, *yyout;
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-
- #define YY_LESS_LINENO(n)
- #define YY_LINENO_REWIND_TO(ptr)
-
-/* Return all but the first "n" matched characters back to the input stream. */
-#define yyless(n) \
- do \
- { \
- /* Undo effects of setting up yytext. */ \
- int yyless_macro_arg = (n); \
- YY_LESS_LINENO(yyless_macro_arg);\
- *yy_cp = (yy_hold_char); \
- YY_RESTORE_YY_MORE_OFFSET \
- (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
- YY_DO_BEFORE_ACTION; /* set up yytext again */ \
- } \
- while ( 0 )
-#define unput(c) yyunput( c, (yytext_ptr) )
-
-#ifndef YY_STRUCT_YY_BUFFER_STATE
-#define YY_STRUCT_YY_BUFFER_STATE
-struct yy_buffer_state
- {
- FILE *yy_input_file;
-
- char *yy_ch_buf; /* input buffer */
- char *yy_buf_pos; /* current position in input buffer */
-
- /* Size of input buffer in bytes, not including room for EOB
- * characters.
- */
- int yy_buf_size;
-
- /* Number of characters read into yy_ch_buf, not including EOB
- * characters.
- */
- int yy_n_chars;
-
- /* Whether we "own" the buffer - i.e., we know we created it,
- * and can realloc() it to grow it, and should free() it to
- * delete it.
- */
- int yy_is_our_buffer;
-
- /* Whether this is an "interactive" input source; if so, and
- * if we're using stdio for input, then we want to use getc()
- * instead of fread(), to make sure we stop fetching input after
- * each newline.
- */
- int yy_is_interactive;
-
- /* Whether we're considered to be at the beginning of a line.
- * If so, '^' rules will be active on the next match, otherwise
- * not.
- */
- int yy_at_bol;
-
- int yy_bs_lineno; /**< The line count. */
- int yy_bs_column; /**< The column count. */
-
- /* Whether to try to fill the input buffer when we reach the
- * end of it.
- */
- int yy_fill_buffer;
-
- int yy_buffer_status;
-
-#define YY_BUFFER_NEW 0
-#define YY_BUFFER_NORMAL 1
- /* When an EOF's been seen but there's still some text to process
- * then we mark the buffer as YY_EOF_PENDING, to indicate that we
- * shouldn't try reading from the input source any more. We might
- * still have a bunch of tokens to match, though, because of
- * possible backing-up.
- *
- * When we actually see the EOF, we change the status to "new"
- * (via yyrestart()), so that the user can continue scanning by
- * just pointing yyin at a new input file.
- */
-#define YY_BUFFER_EOF_PENDING 2
-
- };
-#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-
-/* Stack of input buffers. */
-static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
-static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
-
-/* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- *
- * Returns the top of the stack, or NULL.
- */
-#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
- ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
- : NULL)
-/* Same as previous macro, but useful when we know that the buffer stack is not
- * NULL or when we need an lvalue. For internal use only.
- */
-#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
-
-/* yy_hold_char holds the character lost when yytext is formed. */
-static char yy_hold_char;
-static int yy_n_chars; /* number of characters read into yy_ch_buf */
-int yyleng;
-
-/* Points to current character in buffer. */
-static char *yy_c_buf_p = NULL;
-static int yy_init = 0; /* whether we need to initialize */
-static int yy_start = 0; /* start state number */
-
-/* Flag which is used to allow yywrap()'s to do buffer switches
- * instead of setting up a fresh yyin. A bit of a hack ...
- */
-static int yy_did_buffer_switch_on_eof;
-
-void yyrestart ( FILE *input_file );
-void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
-YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
-void yy_delete_buffer ( YY_BUFFER_STATE b );
-void yy_flush_buffer ( YY_BUFFER_STATE b );
-void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
-void yypop_buffer_state ( void );
-
-static void yyensure_buffer_stack ( void );
-static void yy_load_buffer_state ( void );
-static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
-#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
-
-YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
-YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
-YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
-
-void *yyalloc ( yy_size_t );
-void *yyrealloc ( void *, yy_size_t );
-void yyfree ( void * );
-
-#define yy_new_buffer yy_create_buffer
-#define yy_set_interactive(is_interactive) \
- { \
- if ( ! YY_CURRENT_BUFFER ){ \
- yyensure_buffer_stack (); \
- YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer( yyin, YY_BUF_SIZE ); \
- } \
- YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
- }
-#define yy_set_bol(at_bol) \
- { \
- if ( ! YY_CURRENT_BUFFER ){\
- yyensure_buffer_stack (); \
- YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer( yyin, YY_BUF_SIZE ); \
- } \
- YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
- }
-#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
-
-typedef flex_uint8_t YY_CHAR;
-
-FILE *yyin = NULL, *yyout = NULL;
-
-typedef int yy_state_type;
-
-extern int yylineno;
-int yylineno = 1;
-
-extern char *yytext;
-#ifdef yytext_ptr
-#undef yytext_ptr
-#endif
-#define yytext_ptr yytext
-
-static yy_state_type yy_get_previous_state ( void );
-static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
-static int yy_get_next_buffer ( void );
-static void yynoreturn yy_fatal_error ( const char* msg );
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
- */
-#define YY_DO_BEFORE_ACTION \
- (yytext_ptr) = yy_bp; \
- yyleng = (int) (yy_cp - yy_bp); \
- (yy_hold_char) = *yy_cp; \
- *yy_cp = '\0'; \
- (yy_c_buf_p) = yy_cp;
-#define YY_NUM_RULES 26
-#define YY_END_OF_BUFFER 27
-/* This struct is not used in this scanner,
- but its presence is necessary. */
-struct yy_trans_info
- {
- flex_int32_t yy_verify;
- flex_int32_t yy_nxt;
- };
-static const flex_int16_t yy_accept[55] =
- { 0,
- 0, 0, 27, 26, 1, 25, 8, 10, 7, 2,
- 12, 3, 22, 4, 24, 26, 15, 13, 23, 23,
- 23, 23, 23, 9, 11, 5, 25, 6, 22, 0,
- 14, 23, 23, 23, 23, 23, 0, 21, 23, 23,
- 23, 23, 19, 23, 23, 23, 20, 18, 23, 17,
- 23, 23, 16, 0
- } ;
-
-static const YY_CHAR yy_ec[256] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 1, 1, 1, 1, 1, 1, 3, 4,
- 5, 6, 7, 8, 9, 10, 11, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 1, 13, 14,
- 15, 1, 1, 16, 17, 17, 18, 19, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 20,
- 17, 17, 21, 17, 17, 17, 17, 17, 17, 17,
- 22, 1, 23, 24, 25, 1, 26, 17, 17, 27,
-
- 28, 17, 29, 17, 30, 17, 17, 17, 31, 32,
- 33, 17, 17, 34, 35, 36, 37, 38, 17, 17,
- 17, 17, 1, 39, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1
- } ;
-
-static const YY_CHAR yy_meta[40] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 1, 1, 1, 1, 2, 2, 2, 2,
- 2, 1, 1, 1, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 1
- } ;
-
-static const flex_int16_t yy_base[56] =
- { 0,
- 0, 0, 75, 77, 77, 71, 77, 77, 67, 77,
- 77, 77, 30, 77, 77, 63, 77, 77, 0, 38,
- 42, 35, 31, 77, 77, 77, 64, 77, 31, 37,
- 77, 0, 34, 19, 32, 33, 51, 50, 26, 25,
- 27, 29, 0, 19, 19, 14, 0, 0, 21, 0,
- 21, 16, 0, 77, 45
- } ;
-
-static const flex_int16_t yy_def[56] =
- { 0,
- 54, 1, 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 54, 55, 55,
- 55, 55, 55, 54, 54, 54, 54, 54, 54, 54,
- 54, 55, 55, 55, 55, 55, 54, 54, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 0, 54
- } ;
-
-static const flex_int16_t yy_nxt[117] =
- { 0,
- 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
- 14, 13, 15, 16, 17, 18, 19, 20, 21, 22,
- 23, 24, 25, 26, 4, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 4, 29,
- 29, 29, 29, 37, 40, 37, 32, 53, 38, 52,
- 51, 50, 41, 49, 48, 47, 46, 30, 30, 45,
- 44, 38, 38, 43, 42, 39, 27, 36, 35, 34,
- 33, 31, 28, 27, 54, 37, 3, 54, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
-
- 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 54
- } ;
-
-static const flex_int16_t yy_chk[117] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 13,
- 29, 13, 29, 30, 34, 30, 55, 52, 30, 51,
- 49, 46, 34, 45, 44, 42, 41, 13, 29, 40,
- 39, 38, 37, 36, 35, 33, 27, 23, 22, 21,
- 20, 16, 9, 6, 3, 30, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
-
- 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 54
- } ;
-
-static yy_state_type yy_last_accepting_state;
-static char *yy_last_accepting_cpos;
-
-extern int yy_flex_debug;
-int yy_flex_debug = 0;
-
-/* The intent behind this definition is that it'll catch
- * any uses of REJECT which flex missed.
- */
-#define REJECT reject_used_but_not_detected
-#define yymore() yymore_used_but_not_detected
-#define YY_MORE_ADJ 0
-#define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
-/*
-
- Copyright (c) 1997-1999 Matra Datavision
- Copyright (c) 1999-2014 OPEN CASCADE SAS
-
- This file is part of Open CASCADE Technology software library.
-
- This library is free software; you can redistribute it and/or modify it under
- the terms of the GNU Lesser General Public License version 2.1 as published
- by the Free Software Foundation, with special exception defined in the file
- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
- distribution for complete text of the license and disclaimer of any warranty.
-
- Alternatively, this file may be used under the terms of Open CASCADE
- commercial license or contractual agreement.
-*/
-#include <ExprIntrp.tab.h>
-
-#include <ExprIntrp_yaccintrf.hxx>
-
-#define YY_SKIP_YYWRAP
-
-static YY_BUFFER_STATE ExprIntrp_bufstring;
-
-void ExprIntrp_start_string(const char* str)
-{
- // depending on configuration and generator, yyconst may be defined as const or empty
- ExprIntrp_bufstring = ExprIntrp_scan_string((yyconst char*)str);
-}
-
-void ExprIntrp_stop_string()
-{
- ExprIntrp_delete_buffer(ExprIntrp_bufstring);
- ExprIntrp_bufstring = (YY_BUFFER_STATE) 0;
-}
-
-static int yywrap()
-{
- return 1;
-}
-
-// provide safe error handler (exception instead of exit())
-#define YY_FATAL_ERROR(msg) ExprIntrperror(msg)
-
-// MSVC specifics
-#ifdef _MSC_VER
-
-// add includes for flex 2.91 (Linux version)
-#include <stdlib.h>
-#include <io.h>
-
-// Avoid includion of unistd.h if parser is generated on Linux (flex 2.5.35)
-#define YY_NO_UNISTD_H
-
-// 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 */
-
-#ifdef __GNUC__
-// add includes for flex 2.91 (Linux version)
-#include <unistd.h>
-
-// disable GCC warnings in flex 2.91 code
-#pragma GCC diagnostic ignored "-Wunused-function"
-#endif
-
-#define INITIAL 0
-
-#ifndef YY_NO_UNISTD_H
-/* Special case for "unistd.h", since it is non-ANSI. We include it way
- * down here because we want the user's section 1 to have been scanned first.
- * The user has a chance to override it with an option.
- */
-#include <unistd.h>
-#endif
-
-#ifndef YY_EXTRA_TYPE
-#define YY_EXTRA_TYPE void *
-#endif
-
-static int yy_init_globals ( void );
-
-/* Accessor methods to globals.
- These are made visible to non-reentrant scanners for convenience. */
-
-int yylex_destroy ( void );
-
-int yyget_debug ( void );
-
-void yyset_debug ( int debug_flag );
-
-YY_EXTRA_TYPE yyget_extra ( void );
-
-void yyset_extra ( YY_EXTRA_TYPE user_defined );
-
-FILE *yyget_in ( void );
-
-void yyset_in ( FILE * _in_str );
-
-FILE *yyget_out ( void );
-
-void yyset_out ( FILE * _out_str );
-
- int yyget_leng ( void );
-
-char *yyget_text ( void );
-
-int yyget_lineno ( void );
-
-void yyset_lineno ( int _line_number );
-
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
-extern "C" int yywrap ( void );
-#else
-extern int yywrap ( void );
-#endif
-#endif
-
-#ifndef YY_NO_UNPUT
-
- static void yyunput ( int c, char *buf_ptr );
-
-#endif
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy ( char *, const char *, int );
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen ( const char * );
-#endif
-
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-static int yyinput ( void );
-#else
-static int input ( void );
-#endif
-
-#endif
-
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k */
-#define YY_READ_BUF_SIZE 16384
-#else
-#define YY_READ_BUF_SIZE 8192
-#endif /* __ia64__ */
-#endif
-
-/* Copy whatever the last rule matched to the standard output. */
-#ifndef ECHO
-/* This used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite().
- */
-#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
-#endif
-
-/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
- * is returned in "result".
- */
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
- if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
- { \
- int c = '*'; \
- int n; \
- for ( n = 0; n < max_size && \
- (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
- buf[n] = (char) c; \
- if ( c == '\n' ) \
- buf[n++] = (char) c; \
- if ( c == EOF && ferror( yyin ) ) \
- YY_FATAL_ERROR( "input in flex scanner failed" ); \
- result = n; \
- } \
- else \
- { \
- errno=0; \
- while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
- { \
- if( errno != EINTR) \
- { \
- YY_FATAL_ERROR( "input in flex scanner failed" ); \
- break; \
- } \
- errno=0; \
- clearerr(yyin); \
- } \
- }\
-\
-
-#endif
-
-/* No semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
-#ifndef yyterminate
-#define yyterminate() return YY_NULL
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
-
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
-#endif
-
-/* end tables serialization structures and prototypes */
-
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef YY_DECL
-#define YY_DECL_IS_OURS 1
-
-extern int yylex (void);
-
-#define YY_DECL int yylex (void)
-#endif /* !YY_DECL */
-
-/* Code executed at the beginning of each rule, after yytext and yyleng
- * have been set up.
- */
-#ifndef YY_USER_ACTION
-#define YY_USER_ACTION
-#endif
-
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK /*LINTED*/break;
-#endif
-
-#define YY_RULE_SETUP \
- YY_USER_ACTION
-
-/** The main scanner function which does all the work.
- */
-YY_DECL
-{
- yy_state_type yy_current_state;
- char *yy_cp, *yy_bp;
- int yy_act;
-
- if ( !(yy_init) )
- {
- (yy_init) = 1;
-
-#ifdef YY_USER_INIT
- YY_USER_INIT;
-#endif
-
- if ( ! (yy_start) )
- (yy_start) = 1; /* first start state */
-
- if ( ! yyin )
- yyin = stdin;
-
- if ( ! yyout )
- yyout = stdout;
-
- if ( ! YY_CURRENT_BUFFER ) {
- yyensure_buffer_stack ();
- YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer( yyin, YY_BUF_SIZE );
- }
-
- yy_load_buffer_state( );
- }
-
- {
-
- while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
- {
- yy_cp = (yy_c_buf_p);
-
- /* Support of yytext. */
- *yy_cp = (yy_hold_char);
-
- /* yy_bp points to the position in yy_ch_buf of the start of
- * the current run.
- */
- yy_bp = yy_cp;
-
- yy_current_state = (yy_start);
-yy_match:
- do
- {
- YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
- if ( yy_accept[yy_current_state] )
- {
- (yy_last_accepting_state) = yy_current_state;
- (yy_last_accepting_cpos) = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 55 )
- yy_c = yy_meta[yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
- ++yy_cp;
- }
- while ( yy_base[yy_current_state] != 77 );
-
-yy_find_action:
- yy_act = yy_accept[yy_current_state];
- if ( yy_act == 0 )
- { /* have to back up */
- yy_cp = (yy_last_accepting_cpos);
- yy_current_state = (yy_last_accepting_state);
- yy_act = yy_accept[yy_current_state];
- }
-
- YY_DO_BEFORE_ACTION;
-
-do_action: /* This label is used only to access EOF actions. */
-
- switch ( yy_act )
- { /* beginning of action switch */
- case 0: /* must back up */
- /* undo the effects of YY_DO_BEFORE_ACTION */
- *yy_cp = (yy_hold_char);
- yy_cp = (yy_last_accepting_cpos);
- yy_current_state = (yy_last_accepting_state);
- goto yy_find_action;
-
-case 1:
-YY_RULE_SETUP
-{;}
- YY_BREAK
-case 2:
-YY_RULE_SETUP
-{return(SUMOP) ;}
- YY_BREAK
-case 3:
-YY_RULE_SETUP
-{return(MINUSOP) ;}
- YY_BREAK
-case 4:
-YY_RULE_SETUP
-{return(DIVIDEOP) ;}
- YY_BREAK
-case 5:
-YY_RULE_SETUP
-{return(EXPOP) ;}
- YY_BREAK
-case 6:
-YY_RULE_SETUP
-{return(EXPOP) ;}
- YY_BREAK
-case 7:
-YY_RULE_SETUP
-{return(MULTOP) ;}
- YY_BREAK
-case 8:
-YY_RULE_SETUP
-{return(PARENTHESIS);}
- YY_BREAK
-case 9:
-YY_RULE_SETUP
-{return(BRACKET);}
- YY_BREAK
-case 10:
-YY_RULE_SETUP
-{return(ENDPARENTHESIS);}
- YY_BREAK
-case 11:
-YY_RULE_SETUP
-{return(ENDBRACKET);}
- YY_BREAK
-case 12:
-YY_RULE_SETUP
-{return(COMMA);}
- YY_BREAK
-case 13:
-YY_RULE_SETUP
-{return(DIFFERENTIAL);}
- YY_BREAK
-case 14:
-YY_RULE_SETUP
-{return(ASSIGNOP);}
- YY_BREAK
-case 15:
-YY_RULE_SETUP
-{return(EQUALOP);}
- YY_BREAK
-case 16:
-YY_RULE_SETUP
-{return(DEASSIGNKEY);}
- YY_BREAK
-case 17:
-YY_RULE_SETUP
-{return(DERIVKEY);}
- YY_BREAK
-case 18:
-YY_RULE_SETUP
-{return(CONSTKEY);}
- YY_BREAK
-case 19:
-YY_RULE_SETUP
-{return(SUMKEY);}
- YY_BREAK
-case 20:
-YY_RULE_SETUP
-{return(PRODKEY);}
- YY_BREAK
-case 21:
-YY_RULE_SETUP
-{ExprIntrp_SetResult(); return(VALUE);}
- YY_BREAK
-case 22:
-YY_RULE_SETUP
-{ExprIntrp_SetResult(); return(VALUE);}
- YY_BREAK
-case 23:
-YY_RULE_SETUP
-{ExprIntrp_SetResult(); return(IDENTIFIER);}
- YY_BREAK
-case 24:
-YY_RULE_SETUP
-{return(RELSEPARATOR);}
- YY_BREAK
-case 25:
-YY_RULE_SETUP
-{ExprIntrp_SetDegree();return(DERIVATE);}
- YY_BREAK
-case 26:
-YY_RULE_SETUP
-ECHO;
- YY_BREAK
-case YY_STATE_EOF(INITIAL):
- yyterminate();
-
- case YY_END_OF_BUFFER:
- {
- /* Amount of text matched not including the EOB char. */
- int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
-
- /* Undo the effects of YY_DO_BEFORE_ACTION. */
- *yy_cp = (yy_hold_char);
- YY_RESTORE_YY_MORE_OFFSET
-
- if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
- {
- /* We're scanning a new file or input source. It's
- * possible that this happened because the user
- * just pointed yyin at a new source and called
- * yylex(). If so, then we have to assure
- * consistency between YY_CURRENT_BUFFER and our
- * globals. Here is the right place to do so, because
- * this is the first action (other than possibly a
- * back-up) that will match for the new input source.
- */
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
- YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
- }
-
- /* Note that here we test for yy_c_buf_p "<=" to the position
- * of the first EOB in the buffer, since yy_c_buf_p will
- * already have been incremented past the NUL character
- * (since all states make transitions on EOB to the
- * end-of-buffer state). Contrast this with the test
- * in input().
- */
- if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
- { /* This was really a NUL. */
- yy_state_type yy_next_state;
-
- (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
-
- yy_current_state = yy_get_previous_state( );
-
- /* Okay, we're now positioned to make the NUL
- * transition. We couldn't have
- * yy_get_previous_state() go ahead and do it
- * for us because it doesn't know how to deal
- * with the possibility of jamming (and we don't
- * want to build jamming into it because then it
- * will run more slowly).
- */
-
- yy_next_state = yy_try_NUL_trans( yy_current_state );
-
- yy_bp = (yytext_ptr) + YY_MORE_ADJ;
-
- if ( yy_next_state )
- {
- /* Consume the NUL. */
- yy_cp = ++(yy_c_buf_p);
- yy_current_state = yy_next_state;
- goto yy_match;
- }
-
- else
- {
- yy_cp = (yy_c_buf_p);
- goto yy_find_action;
- }
- }
-
- else switch ( yy_get_next_buffer( ) )
- {
- case EOB_ACT_END_OF_FILE:
- {
- (yy_did_buffer_switch_on_eof) = 0;
-
- if ( yywrap( ) )
- {
- /* Note: because we've taken care in
- * yy_get_next_buffer() to have set up
- * yytext, we can now set up
- * yy_c_buf_p so that if some total
- * hoser (like flex itself) wants to
- * call the scanner after we return the
- * YY_NULL, it'll still work - another
- * YY_NULL will get returned.
- */
- (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
-
- yy_act = YY_STATE_EOF(YY_START);
- goto do_action;
- }
-
- else
- {
- if ( ! (yy_did_buffer_switch_on_eof) )
- YY_NEW_FILE;
- }
- break;
- }
-
- case EOB_ACT_CONTINUE_SCAN:
- (yy_c_buf_p) =
- (yytext_ptr) + yy_amount_of_matched_text;
-
- yy_current_state = yy_get_previous_state( );
-
- yy_cp = (yy_c_buf_p);
- yy_bp = (yytext_ptr) + YY_MORE_ADJ;
- goto yy_match;
-
- case EOB_ACT_LAST_MATCH:
- (yy_c_buf_p) =
- &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
-
- yy_current_state = yy_get_previous_state( );
-
- yy_cp = (yy_c_buf_p);
- yy_bp = (yytext_ptr) + YY_MORE_ADJ;
- goto yy_find_action;
- }
- break;
- }
-
- default:
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--no action found" );
- } /* end of action switch */
- } /* end of scanning one token */
- } /* end of user's declarations */
-} /* end of yylex */
-
-/* yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- * EOB_ACT_LAST_MATCH -
- * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- * EOB_ACT_END_OF_FILE - end of file
- */
-static int yy_get_next_buffer (void)
-{
- char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- char *source = (yytext_ptr);
- int number_to_move, i;
- int ret_val;
-
- if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--end of buffer missed" );
-
- if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
- { /* Don't try to fill the buffer, so this is an EOF. */
- if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
- {
- /* We matched a single character, the EOB, so
- * treat this as a final EOF.
- */
- return EOB_ACT_END_OF_FILE;
- }
-
- else
- {
- /* We matched some text prior to the EOB, first
- * process it.
- */
- return EOB_ACT_LAST_MATCH;
- }
- }
-
- /* Try to read more data. */
-
- /* First move last chars to start of buffer. */
- number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
-
- for ( i = 0; i < number_to_move; ++i )
- *(dest++) = *(source++);
-
- if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
- /* don't do the read, it's not guaranteed to return an EOF,
- * just force an EOF
- */
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
-
- else
- {
- int num_to_read =
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
-
- while ( num_to_read <= 0 )
- { /* Not enough room in the buffer - grow it. */
-
- /* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
-
- int yy_c_buf_p_offset =
- (int) ((yy_c_buf_p) - b->yy_ch_buf);
-
- if ( b->yy_is_our_buffer )
- {
- int new_size = b->yy_buf_size * 2;
-
- if ( new_size <= 0 )
- b->yy_buf_size += b->yy_buf_size / 8;
- else
- b->yy_buf_size *= 2;
-
- b->yy_ch_buf = (char *)
- /* Include room in for 2 EOB chars. */
- yyrealloc( (void *) b->yy_ch_buf,
- (yy_size_t) (b->yy_buf_size + 2) );
- }
- else
- /* Can't grow it, we don't own it. */
- b->yy_ch_buf = NULL;
-
- if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR(
- "fatal error - scanner input buffer overflow" );
-
- (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
-
- num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
- number_to_move - 1;
-
- }
-
- if ( num_to_read > YY_READ_BUF_SIZE )
- num_to_read = YY_READ_BUF_SIZE;
-
- /* Read in more data. */
- YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- (yy_n_chars), num_to_read );
-
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
- }
-
- if ( (yy_n_chars) == 0 )
- {
- if ( number_to_move == YY_MORE_ADJ )
- {
- ret_val = EOB_ACT_END_OF_FILE;
- yyrestart( yyin );
- }
-
- else
- {
- ret_val = EOB_ACT_LAST_MATCH;
- YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
- YY_BUFFER_EOF_PENDING;
- }
- }
-
- else
- ret_val = EOB_ACT_CONTINUE_SCAN;
-
- if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
- /* Extend the array by 50%, plus the number we really need. */
- int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
- (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
- if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
- /* "- 2" to take care of EOB's */
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
- }
-
- (yy_n_chars) += number_to_move;
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
-
- (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
-
- return ret_val;
-}
-
-/* yy_get_previous_state - get the state just before the EOB char was reached */
-
- static yy_state_type yy_get_previous_state (void)
-{
- yy_state_type yy_current_state;
- char *yy_cp;
-
- yy_current_state = (yy_start);
-
- for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
- {
- YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
- if ( yy_accept[yy_current_state] )
- {
- (yy_last_accepting_state) = yy_current_state;
- (yy_last_accepting_cpos) = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 55 )
- yy_c = yy_meta[yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
- }
-
- return yy_current_state;
-}
-
-/* yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- * next_state = yy_try_NUL_trans( current_state );
- */
- static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
-{
- int yy_is_jam;
- char *yy_cp = (yy_c_buf_p);
-
- YY_CHAR yy_c = 1;
- if ( yy_accept[yy_current_state] )
- {
- (yy_last_accepting_state) = yy_current_state;
- (yy_last_accepting_cpos) = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 55 )
- yy_c = yy_meta[yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
- yy_is_jam = (yy_current_state == 54);
-
- return yy_is_jam ? 0 : yy_current_state;
-}
-
-#ifndef YY_NO_UNPUT
-
- static void yyunput (int c, char * yy_bp )
-{
- char *yy_cp;
-
- yy_cp = (yy_c_buf_p);
-
- /* undo effects of setting up yytext */
- *yy_cp = (yy_hold_char);
-
- if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
- { /* need to shift things up to make room */
- /* +2 for EOB chars. */
- int number_to_move = (yy_n_chars) + 2;
- char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
- char *source =
- &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
-
- while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
- *--dest = *--source;
-
- yy_cp += (int) (dest - source);
- yy_bp += (int) (dest - source);
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
- (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
-
- if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
- YY_FATAL_ERROR( "flex scanner push-back overflow" );
- }
-
- *--yy_cp = (char) c;
-
- (yytext_ptr) = yy_bp;
- (yy_hold_char) = *yy_cp;
- (yy_c_buf_p) = yy_cp;
-}
-
-#endif
-
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
- static int yyinput (void)
-#else
- static int input (void)
-#endif
-
-{
- int c;
-
- *(yy_c_buf_p) = (yy_hold_char);
-
- if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
- {
- /* yy_c_buf_p now points to the character we want to return.
- * If this occurs *before* the EOB characters, then it's a
- * valid NUL; if not, then we've hit the end of the buffer.
- */
- if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
- /* This was really a NUL. */
- *(yy_c_buf_p) = '\0';
-
- else
- { /* need more input */
- int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
- ++(yy_c_buf_p);
-
- switch ( yy_get_next_buffer( ) )
- {
- case EOB_ACT_LAST_MATCH:
- /* This happens because yy_g_n_b()
- * sees that we've accumulated a
- * token and flags that we need to
- * try matching the token before
- * proceeding. But for input(),
- * there's no matching to consider.
- * So convert the EOB_ACT_LAST_MATCH
- * to EOB_ACT_END_OF_FILE.
- */
-
- /* Reset buffer status. */
- yyrestart( yyin );
-
- /*FALLTHROUGH*/
-
- case EOB_ACT_END_OF_FILE:
- {
- if ( yywrap( ) )
- return 0;
-
- if ( ! (yy_did_buffer_switch_on_eof) )
- YY_NEW_FILE;
-#ifdef __cplusplus
- return yyinput();
-#else
- return input();
-#endif
- }
-
- case EOB_ACT_CONTINUE_SCAN:
- (yy_c_buf_p) = (yytext_ptr) + offset;
- break;
- }
- }
- }
-
- c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
- *(yy_c_buf_p) = '\0'; /* preserve yytext */
- (yy_hold_char) = *++(yy_c_buf_p);
-
- return c;
-}
-#endif /* ifndef YY_NO_INPUT */
-
-/** Immediately switch to a different input stream.
- * @param input_file A readable stream.
- *
- * @note This function does not reset the start condition to @c INITIAL .
- */
- void yyrestart (FILE * input_file )
-{
-
- if ( ! YY_CURRENT_BUFFER ){
- yyensure_buffer_stack ();
- YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer( yyin, YY_BUF_SIZE );
- }
-
- yy_init_buffer( YY_CURRENT_BUFFER, input_file );
- yy_load_buffer_state( );
-}
-
-/** Switch to a different input buffer.
- * @param new_buffer The new input buffer.
- *
- */
- void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
-{
-
- /* TODO. We should be able to replace this entire function body
- * with
- * yypop_buffer_state();
- * yypush_buffer_state(new_buffer);
- */
- yyensure_buffer_stack ();
- if ( YY_CURRENT_BUFFER == new_buffer )
- return;
-
- if ( YY_CURRENT_BUFFER )
- {
- /* Flush out information for old buffer. */
- *(yy_c_buf_p) = (yy_hold_char);
- YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
- }
-
- YY_CURRENT_BUFFER_LVALUE = new_buffer;
- yy_load_buffer_state( );
-
- /* We don't actually know whether we did this switch during
- * EOF (yywrap()) processing, but the only time this flag
- * is looked at is after yywrap() is called, so it's safe
- * to go ahead and always set it.
- */
- (yy_did_buffer_switch_on_eof) = 1;
-}
-
-static void yy_load_buffer_state (void)
-{
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
- yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
- (yy_hold_char) = *(yy_c_buf_p);
-}
-
-/** Allocate and initialize an input buffer state.
- * @param file A readable stream.
- * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- *
- * @return the allocated buffer state.
- */
- YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
-{
- YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
- if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
- b->yy_buf_size = size;
-
- /* yy_ch_buf has to be 2 characters longer than the size given because
- * we need to put in 2 end-of-buffer characters.
- */
- b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
- if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
- b->yy_is_our_buffer = 1;
-
- yy_init_buffer( b, file );
-
- return b;
-}
-
-/** Destroy the buffer.
- * @param b a buffer created with yy_create_buffer()
- *
- */
- void yy_delete_buffer (YY_BUFFER_STATE b )
-{
-
- if ( ! b )
- return;
-
- if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
- YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
-
- if ( b->yy_is_our_buffer )
- yyfree( (void *) b->yy_ch_buf );
-
- yyfree( (void *) b );
-}
-
-/* Initializes or reinitializes a buffer.
- * This function is sometimes called more than once on the same buffer,
- * such as during a yyrestart() or at EOF.
- */
- static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
-
-{
- int oerrno = errno;
-
- yy_flush_buffer( b );
-
- b->yy_input_file = file;
- b->yy_fill_buffer = 1;
-
- /* If b is the current buffer, then yy_init_buffer was _probably_
- * called from yyrestart() or through yy_get_next_buffer.
- * In that case, we don't want to reset the lineno or column.
- */
- if (b != YY_CURRENT_BUFFER){
- b->yy_bs_lineno = 1;
- b->yy_bs_column = 0;
- }
-
- b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-
- errno = oerrno;
-}
-
-/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
- * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- *
- */
- void yy_flush_buffer (YY_BUFFER_STATE b )
-{
- if ( ! b )
- return;
-
- b->yy_n_chars = 0;
-
- /* We always need two end-of-buffer characters. The first causes
- * a transition to the end-of-buffer state. The second causes
- * a jam in that state.
- */
- b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
- b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
-
- b->yy_buf_pos = &b->yy_ch_buf[0];
-
- b->yy_at_bol = 1;
- b->yy_buffer_status = YY_BUFFER_NEW;
-
- if ( b == YY_CURRENT_BUFFER )
- yy_load_buffer_state( );
-}
-
-/** Pushes the new state onto the stack. The new state becomes
- * the current state. This function will allocate the stack
- * if necessary.
- * @param new_buffer The new state.
- *
- */
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
-{
- if (new_buffer == NULL)
- return;
-
- yyensure_buffer_stack();
-
- /* This block is copied from yy_switch_to_buffer. */
- if ( YY_CURRENT_BUFFER )
- {
- /* Flush out information for old buffer. */
- *(yy_c_buf_p) = (yy_hold_char);
- YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
- }
-
- /* Only push if top exists. Otherwise, replace top. */
- if (YY_CURRENT_BUFFER)
- (yy_buffer_stack_top)++;
- YY_CURRENT_BUFFER_LVALUE = new_buffer;
-
- /* copied from yy_switch_to_buffer. */
- yy_load_buffer_state( );
- (yy_did_buffer_switch_on_eof) = 1;
-}
-
-/** Removes and deletes the top of the stack, if present.
- * The next element becomes the new top.
- *
- */
-void yypop_buffer_state (void)
-{
- if (!YY_CURRENT_BUFFER)
- return;
-
- yy_delete_buffer(YY_CURRENT_BUFFER );
- YY_CURRENT_BUFFER_LVALUE = NULL;
- if ((yy_buffer_stack_top) > 0)
- --(yy_buffer_stack_top);
-
- if (YY_CURRENT_BUFFER) {
- yy_load_buffer_state( );
- (yy_did_buffer_switch_on_eof) = 1;
- }
-}
-
-/* Allocates the stack if it does not exist.
- * Guarantees space for at least one push.
- */
-static void yyensure_buffer_stack (void)
-{
- yy_size_t num_to_alloc;
-
- if (!(yy_buffer_stack)) {
-
- /* First allocation is just for 2 elements, since we don't know if this
- * scanner will even need a stack. We use 2 instead of 1 to avoid an
- * immediate realloc on the next call.
- */
- num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
- (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
- (num_to_alloc * sizeof(struct yy_buffer_state*)
- );
- if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
-
- memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
- (yy_buffer_stack_max) = num_to_alloc;
- (yy_buffer_stack_top) = 0;
- return;
- }
-
- if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
-
- /* Increase the buffer to prepare for a possible push. */
- yy_size_t grow_size = 8 /* arbitrary grow size */;
-
- num_to_alloc = (yy_buffer_stack_max) + grow_size;
- (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
- ((yy_buffer_stack),
- num_to_alloc * sizeof(struct yy_buffer_state*)
- );
- if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
-
- /* zero only the new slots.*/
- memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
- (yy_buffer_stack_max) = num_to_alloc;
- }
-}
-
-/** Setup the input buffer state to scan directly from a user-specified character buffer.
- * @param base the character buffer
- * @param size the size in bytes of the character buffer
- *
- * @return the newly allocated buffer state object.
- */
-YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
-{
- YY_BUFFER_STATE b;
-
- if ( size < 2 ||
- base[size-2] != YY_END_OF_BUFFER_CHAR ||
- base[size-1] != YY_END_OF_BUFFER_CHAR )
- /* They forgot to leave room for the EOB's. */
- return NULL;
-
- b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
- if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
-
- b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
- b->yy_buf_pos = b->yy_ch_buf = base;
- b->yy_is_our_buffer = 0;
- b->yy_input_file = NULL;
- b->yy_n_chars = b->yy_buf_size;
- b->yy_is_interactive = 0;
- b->yy_at_bol = 1;
- b->yy_fill_buffer = 0;
- b->yy_buffer_status = YY_BUFFER_NEW;
-
- yy_switch_to_buffer( b );
-
- return b;
-}
-
-/** Setup the input buffer state to scan a string. The next call to yylex() will
- * scan from a @e copy of @a str.
- * @param yystr a NUL-terminated string to scan
- *
- * @return the newly allocated buffer state object.
- * @note If you want to scan bytes that may contain NUL values, then use
- * yy_scan_bytes() instead.
- */
-YY_BUFFER_STATE yy_scan_string (const char * yystr )
-{
-
- return yy_scan_bytes( yystr, (int) strlen(yystr) );
-}
-
-/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
- * scan from a @e copy of @a bytes.
- * @param yybytes the byte buffer to scan
- * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
- *
- * @return the newly allocated buffer state object.
- */
-YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
-{
- YY_BUFFER_STATE b;
- char *buf;
- yy_size_t n;
- int i;
-
- /* Get memory for full buffer, including space for trailing EOB's. */
- n = (yy_size_t) (_yybytes_len + 2);
- buf = (char *) yyalloc( n );
- if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
-
- for ( i = 0; i < _yybytes_len; ++i )
- buf[i] = yybytes[i];
-
- buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
-
- b = yy_scan_buffer( buf, n );
- if ( ! b )
- YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
-
- /* It's okay to grow etc. this buffer, and we should throw it
- * away when we're done.
- */
- b->yy_is_our_buffer = 1;
-
- return b;
-}
-
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-
-static void yynoreturn yy_fatal_error (const char* msg )
-{
- fprintf( stderr, "%s\n", msg );
- exit( YY_EXIT_FAILURE );
-}
-
-/* Redefine yyless() so it works in section 3 code. */
-
-#undef yyless
-#define yyless(n) \
- do \
- { \
- /* Undo effects of setting up yytext. */ \
- int yyless_macro_arg = (n); \
- YY_LESS_LINENO(yyless_macro_arg);\
- yytext[yyleng] = (yy_hold_char); \
- (yy_c_buf_p) = yytext + yyless_macro_arg; \
- (yy_hold_char) = *(yy_c_buf_p); \
- *(yy_c_buf_p) = '\0'; \
- yyleng = yyless_macro_arg; \
- } \
- while ( 0 )
-
-/* Accessor methods (get/set functions) to struct members. */
-
-/** Get the current line number.
- *
- */
-int yyget_lineno (void)
-{
-
- return yylineno;
-}
-
-/** Get the input stream.
- *
- */
-FILE *yyget_in (void)
-{
- return yyin;
-}
-
-/** Get the output stream.
- *
- */
-FILE *yyget_out (void)
-{
- return yyout;
-}
-
-/** Get the length of the current token.
- *
- */
-int yyget_leng (void)
-{
- return yyleng;
-}
-
-/** Get the current token.
- *
- */
-
-char *yyget_text (void)
-{
- return yytext;
-}
-
-/** Set the current line number.
- * @param _line_number line number
- *
- */
-void yyset_lineno (int _line_number )
-{
-
- yylineno = _line_number;
-}
-
-/** Set the input stream. This does not discard the current
- * input buffer.
- * @param _in_str A readable stream.
- *
- * @see yy_switch_to_buffer
- */
-void yyset_in (FILE * _in_str )
-{
- yyin = _in_str ;
-}
-
-void yyset_out (FILE * _out_str )
-{
- yyout = _out_str ;
-}
-
-int yyget_debug (void)
-{
- return yy_flex_debug;
-}
-
-void yyset_debug (int _bdebug )
-{
- yy_flex_debug = _bdebug ;
-}
-
-static int yy_init_globals (void)
-{
- /* Initialization is the same as for the non-reentrant scanner.
- * This function is called from yylex_destroy(), so don't allocate here.
- */
-
- (yy_buffer_stack) = NULL;
- (yy_buffer_stack_top) = 0;
- (yy_buffer_stack_max) = 0;
- (yy_c_buf_p) = NULL;
- (yy_init) = 0;
- (yy_start) = 0;
-
-/* Defined in main.c */
-#ifdef YY_STDINIT
- yyin = stdin;
- yyout = stdout;
-#else
- yyin = NULL;
- yyout = NULL;
-#endif
-
- /* For future reference: Set errno on error, since we are called by
- * yylex_init()
- */
- return 0;
-}
-
-/* yylex_destroy is for both reentrant and non-reentrant scanners. */
-int yylex_destroy (void)
-{
-
- /* Pop the buffer stack, destroying each element. */
- while(YY_CURRENT_BUFFER){
- yy_delete_buffer( YY_CURRENT_BUFFER );
- YY_CURRENT_BUFFER_LVALUE = NULL;
- yypop_buffer_state();
- }
-
- /* Destroy the stack itself. */
- yyfree((yy_buffer_stack) );
- (yy_buffer_stack) = NULL;
-
- /* Reset the globals. This is important in a non-reentrant scanner so the next time
- * yylex() is called, initialization will occur. */
- yy_init_globals( );
-
- return 0;
-}
-
-/*
- * Internal utility routines.
- */
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, const char * s2, int n )
-{
-
- int i;
- for ( i = 0; i < n; ++i )
- s1[i] = s2[i];
-}
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (const char * s )
-{
- int n;
- for ( n = 0; s[n]; ++n )
- ;
-
- return n;
-}
-#endif
-
-void *yyalloc (yy_size_t size )
-{
- return malloc(size);
-}
-
-void *yyrealloc (void * ptr, yy_size_t size )
-{
-
- /* The cast to (char *) in the following accommodates both
- * implementations that use char* generic pointers, and those
- * that use void* generic pointers. It works with the latter
- * because both ANSI C and C++ allow castless assignment from
- * any pointer type to void*, and deal with argument conversions
- * as though doing an assignment.
- */
- return realloc(ptr, size);
-}
-
-void yyfree (void * ptr )
-{
- free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
-}
-
-#define YYTABLES_NAME "yytables"
-
--- /dev/null
+
+/* A lexical scanner generated by flex */
+
+/* Target: C/C++ */
+/* START of m4 controls */
+/* M4_YY_TABLES_VERIFY = 0 */
+/* M4_MODE_NO_DO_STDINIT */
+/* M4_MODE_NO_YYTEXT_IS_ARRAY */
+/* M4_MODE_NO_YYMORE_USED */
+/* M4_MODE_NO_REAL_FULLSPD */
+/* M4_MODE_NO_REAL_FULLTBL */
+/* M4_MODE_NO_CPP_USE_READ */
+/* M4_MODE_NO_VARIABLE_TRAILING_CONTEXT_RULES */
+/* M4_MODE_FIND_ACTION_REJECT_REALLY_USED */
+/* M4_MODE_NO_USES_REJECT */
+/* M4_MODE_USEMECS */
+/* M4_MODE_FIND_ACTION_COMPRESSED */
+/* M4_MODE_NO_FULLSPD */
+/* M4_MODE_NO_BOL_NEEDED */
+/* M4_MODE_USEECS */
+/* M4_MODE_GENTABLES */
+/* M4_MODE_INTERACTIVE */
+/* M4_MODE_NO_FULLSPD_OR_FULLTBL */
+/* M4_MODE_FIND_ACTION_REJECT_OR_INTERACTIVE */
+/* M4_MODE_YYWRAP */
+/* M4_MODE_INTERACTIVE */
+/* M4_MODE_C_ONLY */
+/* M4_MODE_PREFIX = ExprIntrp */
+/* M4_MODE_NO_REWRITE */
+/* END of m4 controls */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+#ifdef yy_create_buffer
+#define ExprIntrp_create_buffer_ALREADY_DEFINED
+#else
+#define yy_create_buffer ExprIntrp_create_buffer
+#endif
+
+#ifdef yy_delete_buffer
+#define ExprIntrp_delete_buffer_ALREADY_DEFINED
+#else
+#define yy_delete_buffer ExprIntrp_delete_buffer
+#endif
+
+#ifdef yy_scan_buffer
+#define ExprIntrp_scan_buffer_ALREADY_DEFINED
+#else
+#define yy_scan_buffer ExprIntrp_scan_buffer
+#endif
+
+#ifdef yy_scan_string
+#define ExprIntrp_scan_string_ALREADY_DEFINED
+#else
+#define yy_scan_string ExprIntrp_scan_string
+#endif
+
+#ifdef yy_scan_bytes
+#define ExprIntrp_scan_bytes_ALREADY_DEFINED
+#else
+#define yy_scan_bytes ExprIntrp_scan_bytes
+#endif
+
+#ifdef yy_init_buffer
+#define ExprIntrp_init_buffer_ALREADY_DEFINED
+#else
+#define yy_init_buffer ExprIntrp_init_buffer
+#endif
+
+#ifdef yy_flush_buffer
+#define ExprIntrp_flush_buffer_ALREADY_DEFINED
+#else
+#define yy_flush_buffer ExprIntrp_flush_buffer
+#endif
+
+#ifdef yy_load_buffer_state
+#define ExprIntrp_load_buffer_state_ALREADY_DEFINED
+#else
+#define yy_load_buffer_state ExprIntrp_load_buffer_state
+#endif
+
+#ifdef yy_switch_to_buffer
+#define ExprIntrp_switch_to_buffer_ALREADY_DEFINED
+#else
+#define yy_switch_to_buffer ExprIntrp_switch_to_buffer
+#endif
+
+#ifdef yypush_buffer_state
+#define ExprIntrppush_buffer_state_ALREADY_DEFINED
+#else
+#define yypush_buffer_state ExprIntrppush_buffer_state
+#endif
+
+#ifdef yypop_buffer_state
+#define ExprIntrppop_buffer_state_ALREADY_DEFINED
+#else
+#define yypop_buffer_state ExprIntrppop_buffer_state
+#endif
+
+#ifdef yyensure_buffer_stack
+#define ExprIntrpensure_buffer_stack_ALREADY_DEFINED
+#else
+#define yyensure_buffer_stack ExprIntrpensure_buffer_stack
+#endif
+
+#ifdef yylex
+#define ExprIntrplex_ALREADY_DEFINED
+#else
+#define yylex ExprIntrplex
+#endif
+
+#ifdef yyrestart
+#define ExprIntrprestart_ALREADY_DEFINED
+#else
+#define yyrestart ExprIntrprestart
+#endif
+
+#ifdef yylex_init
+#define ExprIntrplex_init_ALREADY_DEFINED
+#else
+#define yylex_init ExprIntrplex_init
+#endif
+
+#ifdef yylex_init_extra
+#define ExprIntrplex_init_extra_ALREADY_DEFINED
+#else
+#define yylex_init_extra ExprIntrplex_init_extra
+#endif
+
+#ifdef yylex_destroy
+#define ExprIntrplex_destroy_ALREADY_DEFINED
+#else
+#define yylex_destroy ExprIntrplex_destroy
+#endif
+
+#ifdef yyget_debug
+#define ExprIntrpget_debug_ALREADY_DEFINED
+#else
+#define yyget_debug ExprIntrpget_debug
+#endif
+
+#ifdef yyset_debug
+#define ExprIntrpset_debug_ALREADY_DEFINED
+#else
+#define yyset_debug ExprIntrpset_debug
+#endif
+
+#ifdef yyget_extra
+#define ExprIntrpget_extra_ALREADY_DEFINED
+#else
+#define yyget_extra ExprIntrpget_extra
+#endif
+
+#ifdef yyset_extra
+#define ExprIntrpset_extra_ALREADY_DEFINED
+#else
+#define yyset_extra ExprIntrpset_extra
+#endif
+
+#ifdef yyget_in
+#define ExprIntrpget_in_ALREADY_DEFINED
+#else
+#define yyget_in ExprIntrpget_in
+#endif
+
+#ifdef yyset_in
+#define ExprIntrpset_in_ALREADY_DEFINED
+#else
+#define yyset_in ExprIntrpset_in
+#endif
+
+#ifdef yyget_out
+#define ExprIntrpget_out_ALREADY_DEFINED
+#else
+#define yyget_out ExprIntrpget_out
+#endif
+
+#ifdef yyset_out
+#define ExprIntrpset_out_ALREADY_DEFINED
+#else
+#define yyset_out ExprIntrpset_out
+#endif
+
+#ifdef yyget_leng
+#define ExprIntrpget_leng_ALREADY_DEFINED
+#else
+#define yyget_leng ExprIntrpget_leng
+#endif
+
+#ifdef yyget_text
+#define ExprIntrpget_text_ALREADY_DEFINED
+#else
+#define yyget_text ExprIntrpget_text
+#endif
+
+#ifdef yyget_lineno
+#define ExprIntrpget_lineno_ALREADY_DEFINED
+#else
+#define yyget_lineno ExprIntrpget_lineno
+#endif
+
+#ifdef yyset_lineno
+#define ExprIntrpset_lineno_ALREADY_DEFINED
+#else
+#define yyset_lineno ExprIntrpset_lineno
+#endif
+
+#ifdef yywrap
+#define ExprIntrpwrap_ALREADY_DEFINED
+#else
+#define yywrap ExprIntrpwrap
+#endif
+
+#ifdef yyalloc
+#define ExprIntrpalloc_ALREADY_DEFINED
+#else
+#define yyalloc ExprIntrpalloc
+#endif
+
+#ifdef yyrealloc
+#define ExprIntrprealloc_ALREADY_DEFINED
+#else
+#define yyrealloc ExprIntrprealloc
+#endif
+
+#ifdef yyfree
+#define ExprIntrpfree_ALREADY_DEFINED
+#else
+#define yyfree ExprIntrpfree
+#endif
+
+#ifdef yytext
+#define ExprIntrptext_ALREADY_DEFINED
+#else
+#define yytext ExprIntrptext
+#endif
+
+#ifdef yyleng
+#define ExprIntrpleng_ALREADY_DEFINED
+#else
+#define yyleng ExprIntrpleng
+#endif
+
+#ifdef yyin
+#define ExprIntrpin_ALREADY_DEFINED
+#else
+#define yyin ExprIntrpin
+#endif
+
+#ifdef yyout
+#define ExprIntrpout_ALREADY_DEFINED
+#else
+#define yyout ExprIntrpout
+#endif
+
+#ifdef yyflexdebug
+#define ExprIntrpflexdebug_ALREADY_DEFINED
+#else
+#define yyflexdebug ExprIntrpflexdebug
+#endif
+
+#ifdef yylineno
+#define ExprIntrplineno_ALREADY_DEFINED
+#else
+#define yylineno ExprIntrplineno
+#endif
+
+/* First, we deal with platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+
+/* Feature test macros. Flex uses functions that require a minimum set of
+ * macros defined. As defining some macros may hide function declarations that
+ * user code might use, be conservative and respect user's definitions as much
+ * as possible. In glibc, feature test macros may not be all set up until one
+ * of the libc header (that includes <features.h>) is included. This creates
+ * a circular dependency when we check the macros. <assert.h> is the safest
+ * header we can include and does not declare too many functions we don't need.
+ */
+#if !defined(__GNU_LIBRARY__) && defined(__STDC__)
+#include <assert.h>
+#endif
+#if !(defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
+ defined(_POSIX_SOURCE))
+# define _POSIX_C_SOURCE 1 /* Required for fileno() */
+# define _POSIX_SOURCE 1
+#endif
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* end standard C headers. */
+
+/* begin standard C++ headers. */
+
+/* flex integer type definitions */
+
+#ifndef YYFLEX_INTTYPES_DEFINED
+#define YYFLEX_INTTYPES_DEFINED
+
+/* Prefer C99 integer types if available. */
+
+# if defined(__cplusplus) && __cplusplus >= 201103L
+#include <cstdint>
+# define YYFLEX_USE_STDINT
+# endif
+# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+/* Include <inttypes.h> and not <stdint.h> because Solaris 2.6 has the former
+ * and not the latter.
+ */
+#include <inttypes.h>
+# define YYFLEX_USE_STDINT
+# else
+# if defined(_MSC_VER) && _MSC_VER >= 1600
+/* Visual C++ 2010 does not define __STDC_VERSION__ and has <stdint.h> but not
+ * <inttypes.h>.
+ */
+#include <stdint.h>
+# define YYFLEX_USE_STDINT
+# endif
+# endif
+# ifdef YYFLEX_USE_STDINT
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+# else
+typedef unsigned char flex_uint8_t;
+typedef short int flex_int16_t;
+typedef unsigned short int flex_uint16_t;
+# ifdef __STDC__
+typedef signed char flex_int8_t;
+/* ISO C only requires at least 16 bits for int. */
+# ifdef __cplusplus
+#include <climits>
+# else
+#include <limits.h>
+# endif
+# if UINT_MAX >= 4294967295
+# define YYFLEX_INT32_DEFINED
+typedef int flex_int32_t;
+typedef unsigned int flex_uint32_t;
+# endif
+# else
+typedef char flex_int8_t;
+# endif
+# ifndef YYFLEX_INT32_DEFINED
+typedef long int flex_int32_t;
+typedef unsigned long int flex_uint32_t;
+# endif
+# endif
+#endif /* YYFLEX_INTTYPES_DEFINED */
+
+/* TODO: this is always defined, so inline it */
+#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
+#else
+#define yynoreturn
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an
+ * integer in range [0..255] for use as an array index.
+ */
+#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
+
+/* Enter a start condition. This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define yybegin(s) (yy_start) = 1 + 2 * (s)
+/* Legacy interface */
+#define BEGIN (yy_start) = 1 + 2 *
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state. The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define yystart() (((yy_start) - 1) / 2)
+/* Legacy interfaces */
+#define YY_START (((yy_start) - 1) / 2)
+#define YYSTATE YY_START
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart( yyin )
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* The state buf must be large enough to hold one state per character in the main buffer,
+ * plus the start state, plus the two end-of-buffer byte states.
+ */
+#define YY_STATE_BUF_EXTRA_SPACE 3
+#define YY_STATE_BUF_SIZE (YY_BUF_SIZE + YY_STATE_BUF_EXTRA_SPACE)
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *yybuffer;
+/* Legacy interface */
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+extern int yyleng;
+
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+ #define YY_LESS_LINENO(n)
+ #define YY_LINENO_REWIND_TO(ptr)
+
+/* Return all but the first "n" matched characters back to the input stream. */
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ *yy_cp = (yy_hold_char); \
+ YY_RESTORE_YY_MORE_OFFSET \
+ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+ } \
+ while ( 0 )
+#define yyunput(c) yyunput_r( c, (yytext_ptr) )
+/* Legacy interface */
+#define unput(c) yyunput_r( c, (yytext_ptr) )
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct yy_buffer_state
+ {
+
+ FILE *yy_input_file;
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ int yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ int yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yyatbol;
+
+ int yy_bs_lineno; /**< The line count. */
+ int yy_bs_column; /**< The column count. */
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+ /* When an EOF's been seen but there's still some text to process
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+ * shouldn't try reading from the input source any more. We might
+ * still have a bunch of tokens to match, though, because of
+ * possible backing-up.
+ *
+ * When we actually see the EOF, we change the status to "new"
+ * (via yyrestart()), so that the user can continue scanning by
+ * just pointing yyin at a new input file.
+ */
+#define YY_BUFFER_EOF_PENDING 2
+
+ };
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+/* Stack of input buffers. */
+static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
+static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
+static yybuffer * yy_buffer_stack = NULL; /**< Stack as an array. */
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ *
+ * Returns the top of the stack, or NULL.
+ */
+#define yy_current_buffer() ( (yy_buffer_stack) \
+ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
+ : NULL)
+/* Legacy interface */
+#define YY_CURRENT_BUFFER yy_current_buffer()
+/* Same as previous macro, but useful when we know that the buffer stack is not
+ * NULL or when we need an lvalue. For internal use only.
+ */
+#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+int yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = NULL;
+static int yy_init = 0; /* whether we need to initialize */
+static int yy_start = 0; /* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin. A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void yyrestart ( FILE *input_file );
+void yy_switch_to_buffer ( yybuffer new_buffer );
+yybuffer yy_create_buffer ( FILE *file, int size );
+void yy_delete_buffer ( yybuffer b );
+void yy_flush_buffer ( yybuffer b );
+void yypush_buffer_state ( yybuffer new_buffer );
+void yypop_buffer_state ( void );
+
+static void yyensure_buffer_stack ( void );
+static void yy_load_buffer_state ( void );
+static void yy_init_buffer ( yybuffer b, FILE *file );
+#define yy_flush_current_buffer() yy_flush_buffer( yy_current_buffer() )
+#define YY_FLUSH_BUFFER yy_flush_current_buffer()
+
+yybuffer yy_scan_buffer ( char *base, yy_size_t size );
+yybuffer yy_scan_string ( const char *yy_str );
+yybuffer yy_scan_bytes ( const char *bytes, int len );
+
+void *yyalloc ( yy_size_t );
+void *yyrealloc ( void *, yy_size_t );
+void yyfree ( void * );
+
+#define yy_new_buffer yy_create_buffer
+#define yy_set_interactive(is_interactive) { \
+ if ( yy_current_buffer() == NULL ) { \
+ yyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+}
+#define yysetbol(at_bol) \
+ { \
+ if ( yy_current_buffer() == NULL ) { \
+ yyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yyatbol = at_bol; \
+}
+#define yyatbol() (YY_CURRENT_BUFFER_LVALUE->yyatbol)
+/* Legacy interface */
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yyatbol)
+#define yy_set_bol(at_bol) \
+ { \
+ if ( yy_current_buffer() == NULL ) { \
+ yyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yyatbol = at_bol; \
+}
+
+/* Begin user sect3 */
+
+typedef flex_uint8_t YY_CHAR;
+
+FILE *yyin = NULL, *yyout = NULL;
+
+typedef int yy_state_type;
+
+extern int yylineno;
+int yylineno = 1;
+
+/* Watch out: yytext_ptr is a variable when yytext is an array,
+ * but it's a macro when yytext is a pointer.
+ */
+
+extern char *yytext;
+
+#ifdef yytext_ptr
+#undef yytext_ptr
+#endif
+#define yytext_ptr yytext
+
+/* %% [1.5] DFA */
+/* START of m4 controls */
+/* M4_MODE_NO_NULTRANS */
+/* M4_MODE_NO_NULTRANS_FULLTBL */
+/* M4_MODE_NO_NULTRANS_FULLSPD */
+/* END of m4 controls */
+
+/* START of Flex-generated definitions */
+#define YY_NUM_RULES 26
+#define YY_END_OF_BUFFER 27
+#define YY_JAMBASE 77
+#define YY_JAMSTATE 54
+#define YY_NUL_EC 1
+#define YY_OFFSET_TYPE flex_int16_t
+/* END of Flex-generated definitions */
+
+static yy_state_type yy_get_previous_state ( void );
+static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
+static int yy_get_next_buffer ( void );
+static void yynoreturn yypanic ( const char* msg );
+
+struct yy_trans_info
+ {
+ /* We require that yy_verify and yy_nxt must be of the same size int. */
+
+ /* We generate a bogus 'struct yy_trans_info' data type
+ * so we can guarantee that it is always declared in the skel.
+ * This is so we can compile "sizeof(struct yy_trans_info)"
+ * in any scanner.
+ */
+ flex_int32_t yy_verify;
+ flex_int32_t yy_nxt;
+
+ };
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+ do { \
+ (yytext_ptr) = yy_bp; \
+ \
+ yyleng = (int) (yy_cp - yy_bp); \
+ \
+ (yy_hold_char) = *yy_cp; \
+ *yy_cp = '\0'; \
+ \
+ (yy_c_buf_p) = yy_cp; \
+ } while(0)
+
+extern int yyflexdebug;
+int yyflexdebug = 0;
+/* Legacy interface */
+#ifndef yy_flex_debug
+#define yy_flex_debug yyflexdebug
+#endif
+
+/* %% [2.0] data tables for the DFA are inserted here */
+
+/* footprint: 6712 bytes */
+/* tblend: 116 */
+/* numecs: 39 */
+/* num_rules: 26 */
+/* lastdfa: 53 */
+
+/* m4 controls begin */
+/* M4_MODE_HAS_BACKING_UP */
+/* M4_MODE_NEED_YY_CP */
+/* m4 controls end */
+
+static const flex_int16_t yy_accept[55] = { 0,
+ 0, 0, 27, 26, 1, 25, 8, 10, 7, 2,
+ 12, 3, 22, 4, 24, 26, 15, 13, 23, 23,
+ 23, 23, 23, 9, 11, 5, 25, 6, 22, 0,
+ 14, 23, 23, 23, 23, 23, 0, 21, 23, 23,
+ 23, 23, 19, 23, 23, 23, 20, 18, 23, 17,
+ 23, 23, 16, 0
+};
+
+/* Character equivalence-class mapping */
+static const YY_CHAR yy_ec[256] = { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 1, 1, 1, 1, 1, 1, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 1, 13, 14,
+ 15, 1, 1, 16, 17, 17, 18, 19, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 20,
+ 17, 17, 21, 17, 17, 17, 17, 17, 17, 17,
+ 22, 1, 23, 24, 25, 1, 26, 17, 17, 27,
+
+ 28, 17, 29, 17, 30, 17, 17, 17, 31, 32,
+ 33, 17, 17, 34, 35, 36, 37, 38, 17, 17,
+ 17, 17, 1, 39, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1
+};
+
+/* Character meta-equivalence-class mappings */
+static const YY_CHAR yy_meta[40] = { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 1, 1, 1, 1, 2, 2, 2, 2,
+ 2, 1, 1, 1, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 1
+};
+
+static const flex_int16_t yy_base[56] = { 0,
+ 0, 0, 75, 77, 77, 71, 77, 77, 67, 77,
+ 77, 77, 30, 77, 77, 63, 77, 77, 0, 38,
+ 42, 35, 31, 77, 77, 77, 64, 77, 31, 37,
+ 77, 0, 34, 19, 32, 33, 51, 50, 26, 25,
+ 27, 29, 0, 19, 19, 14, 0, 0, 21, 0,
+ 21, 16, 0, 77, 45
+};
+
+static const flex_int16_t yy_def[56] = { 0,
+ 54, 1, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 55, 55,
+ 55, 55, 55, 54, 54, 54, 54, 54, 54, 54,
+ 54, 55, 55, 55, 55, 55, 54, 54, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 0, 54
+};
+
+static const flex_int16_t yy_nxt[117] = { 0,
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
+ 14, 13, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 4, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 4, 29,
+ 29, 29, 29, 37, 40, 37, 32, 53, 38, 52,
+ 51, 50, 41, 49, 48, 47, 46, 30, 30, 45,
+ 44, 38, 38, 43, 42, 39, 27, 36, 35, 34,
+ 33, 31, 28, 27, 54, 37, 3, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54
+};
+
+static const flex_int16_t yy_chk[117] = { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 13,
+ 29, 13, 29, 30, 34, 30, 55, 52, 30, 51,
+ 49, 46, 34, 45, 44, 42, 41, 13, 29, 40,
+ 39, 38, 37, 36, 35, 33, 27, 23, 22, 21,
+ 20, 16, 9, 6, 3, 30, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54
+};
+
+/* Definitions for backing up. We don't need them if yyreject()
+ * is being used because then we use an alternative backing-up
+ * technique instead.
+ */
+static yy_state_type yy_last_accepting_state;
+static char *yy_last_accepting_cpos;
+
+/* The intent behind this definition is that it'll catch
+ * any uses of yyreject() which flex missed.
+ */
+#define yyreject() reject_used_but_not_detected
+#define REJECT reject_used_but_not_detected
+
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+
+char *yytext;
+
+/* %% [3.0] static declarations conditional on mode switches go here */
+/*
+
+ Copyright (c) 1997-1999 Matra Datavision
+ Copyright (c) 1999-2014 OPEN CASCADE SAS
+
+ This file is part of Open CASCADE Technology software library.
+
+ This library is free software; you can redistribute it and/or modify it under
+ the terms of the GNU Lesser General Public License version 2.1 as published
+ by the Free Software Foundation, with special exception defined in the file
+ OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+ distribution for complete text of the license and disclaimer of any warranty.
+
+ Alternatively, this file may be used under the terms of Open CASCADE
+ commercial license or contractual agreement.
+*/
+#include <ExprIntrp.tab.hxx>
+
+#include <ExprIntrp_yaccintrf.hxx>
+
+#define YY_SKIP_YYWRAP
+
+static YY_BUFFER_STATE ExprIntrp_bufstring;
+
+void ExprIntrp_start_string(const char* str)
+{
+ // depending on configuration and generator, yyconst may be defined as const or empty
+ ExprIntrp_bufstring = ExprIntrp_scan_string((yyconst char*)str);
+}
+
+void ExprIntrp_stop_string()
+{
+ ExprIntrp_delete_buffer(ExprIntrp_bufstring);
+ ExprIntrp_bufstring = (YY_BUFFER_STATE) 0;
+}
+
+static int yywrap()
+{
+ return 1;
+}
+
+// provide safe error handler (exception instead of exit())
+#define YY_FATAL_ERROR(msg) ExprIntrperror(msg)
+
+// MSVC specifics
+#ifdef _MSC_VER
+
+// add includes for flex 2.91 (Linux version)
+#include <stdlib.h>
+#include <io.h>
+
+// Avoid includion of unistd.h if parser is generated on Linux (flex 2.5.35)
+#define YY_NO_UNISTD_H
+
+// 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 */
+
+#ifdef __GNUC__
+// add includes for flex 2.91 (Linux version)
+#include <unistd.h>
+
+// disable GCC warnings in flex 2.91 code
+#pragma GCC diagnostic ignored "-Wunused-function"
+#endif
+
+#define INITIAL 0
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+
+#include <unistd.h>
+
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+/* Accessor methods to globals.
+ These are made visible to non-reentrant scanners for convenience. */
+
+int yylex_destroy ( void );
+
+int yyget_debug ( void );
+
+void yyset_debug ( int debug_flag );
+
+YY_EXTRA_TYPE yyget_extra ( void );
+
+void yyset_extra ( YY_EXTRA_TYPE user_defined );
+
+FILE *yyget_in ( void );
+
+void yyset_in ( FILE * _in_str );
+
+FILE *yyget_out ( void );
+
+void yyset_out ( FILE * _out_str );
+
+ int yyget_leng ( void );
+
+char *yyget_text ( void );
+
+int yyget_lineno ( void );
+
+void yyset_lineno ( int _line_number );
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap ( void );
+#else
+extern int yywrap ( void );
+#endif
+#endif
+
+#ifndef YY_NO_YYUNPUT
+
+ static void yyunput_r ( int c, char *buf_ptr );
+
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy ( char *, const char *, int );
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen ( const char * );
+#endif
+
+#ifndef YY_NO_YYINPUT
+
+static int yyinput ( void );
+#ifndef __cplusplus
+#define input yyinput
+#endif
+
+#endif
+
+/*
+ * Amount of stuff to slurp up with each read.
+ * We assume the stdio library has already
+ * chosen a fit size foe whatever platform
+ * we're running on.
+ */
+#define YY_READ_BUF_SIZE BUFSIZ
+
+/* Size of default input buffer. We want to be able to fit two
+ * OS-level reads, but efficiency gains as the buffer size
+ * increases fall off after that
+ */
+#ifndef YY_BUF_SIZE
+#define YY_BUF_SIZE (2 * YY_READ_BUF_SIZE)
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+#ifndef yyecho
+
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define yyecho() do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
+
+#endif
+/* Legacy interface */
+#define ECHO yyecho()
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+static void yynoreturn yypanic (const char* msg ) {
+ fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+}
+
+/* Report a fatal error. Legacy interface. */
+#ifndef YY_FATAL_ERROR
+
+#define YY_FATAL_ERROR(msg) yypanic( msg )
+
+#endif
+
+/* Legacy interface */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) do {result = yyread(buf, max_size );} while (0)
+
+/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+
+static int yyread(char *buf, size_t max_size ) {
+
+ int result;
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) {
+ int c = '*';
+ yy_size_t n;
+ for ( n = 0; n < max_size &&
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) {
+ buf[n] = (char) c;
+ }
+ if ( c == '\n' ) {
+ buf[n++] = (char) c;
+ }
+ if ( c == EOF && ferror( yyin ) ) {
+ YY_FATAL_ERROR( "input in flex scanner failed" );
+ }
+ result = n;
+ } else {
+ errno=0;
+ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) {
+ if( errno != EINTR) {
+ YY_FATAL_ERROR( "input in flex scanner failed" );
+ break;
+ }
+ errno=0;
+ clearerr(yyin);
+ }
+ }
+
+ return result;
+}
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+
+extern int yylex (void);
+
+#define YY_DECL int yylex (void)
+
+#endif /* !YY_DECL */
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+#define YY_RULE_SETUP \
+ YY_USER_ACTION
+
+/** The main scanner function which does all the work.
+ */
+YY_DECL {
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
+
+ if ( !(yy_init) ) {
+ (yy_init) = 1;
+
+#ifdef YY_USER_INIT
+ YY_USER_INIT;
+#endif
+
+ if ( ! (yy_start) ) {
+ (yy_start) = 1; /* first start state */
+ }
+ if ( ! yyin ) {
+
+ yyin = stdin;
+
+ }
+ if ( ! yyout ) {
+
+ yyout = stdout;
+
+ }
+ if ( yy_current_buffer() == NULL ) {
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+ }
+
+ yy_load_buffer_state( );
+ }
+
+ /* open scope of user declarationns */
+ {
+/* %% [4.0] user's declarations go here */
+
+ while ( /*CONSTCOND*/1 ) { /* loops until end-of-file is reached */
+
+ yy_cp = (yy_c_buf_p);
+
+ /* Support of yytext. */
+ *yy_cp = (yy_hold_char);
+
+ /* yy_bp points to the position in yy_ch_buf of the start of
+ * the current run.
+ */
+ yy_bp = yy_cp;
+
+ /* Generate the code to find the start state. */
+
+ yy_current_state = (yy_start);
+
+ /* Set up for storing up states. */
+
+ yy_match:
+ /* Generate the code to find the next match. */
+
+ do {
+
+ int yy_c = *(yy_ec+YY_SC_TO_UI(*yy_cp));
+ /* Save the backing-up info \before/ computing the next state
+ * because we always compute one more state than needed - we
+ * always proceed until we reach a jam state
+ */
+
+ /* Generate code to keep backing-up information. */
+
+ if ( yy_accept[yy_current_state] ) {
+
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
+
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) {
+ yy_current_state = (int) yy_def[yy_current_state];
+
+ /* We've arranged it so that templates are never chained
+ * to one another. This means we can afford to make a
+ * very simple test to see if we need to convert to
+ * yy_c's meta-equivalence class without worrying
+ * about erroneously looking up the meta-equivalence
+ * class twice
+ */
+
+ /* lastdfa + 2 == YY_JAMSTATE + 1 is the beginning of the templates */
+ if (yy_current_state >= YY_JAMSTATE + 1) {
+ yy_c = yy_meta[yy_c];
+ }
+
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+
+ ++yy_cp;
+
+ }
+ while ( yy_base[yy_current_state] != YY_JAMBASE );
+
+ yy_find_action:
+ /* code to find the action number goes here */
+
+ yy_act = yy_accept[yy_current_state];
+ if ( yy_act == 0 ) { /* have to back up */
+ yy_cp = (yy_last_accepting_cpos);
+ yy_current_state = (yy_last_accepting_state);
+ yy_act = yy_accept[yy_current_state];
+ }
+
+ YY_DO_BEFORE_ACTION;
+
+ do_action: /* This label is used only to access EOF actions. */
+
+ switch ( yy_act ) { /* beginning of action switch */
+
+ case 0: /* must back up */
+ /* undo the effects of YY_DO_BEFORE_ACTION */
+ *yy_cp = (yy_hold_char);
+
+ /* Backing-up info for compressed tables is taken \after/ */
+ /* yy_cp has been incremented for the next state. */
+ yy_cp = (yy_last_accepting_cpos);
+
+ yy_current_state = (yy_last_accepting_state);
+ goto yy_find_action;
+
+/* %% [5.0] user actions get inserted here */
+ case 1:
+YY_RULE_SETUP
+
+{;}
+ /*LINTED*/break;
+ case 2:
+YY_RULE_SETUP
+
+{return(SUMOP) ;}
+ /*LINTED*/break;
+ case 3:
+YY_RULE_SETUP
+
+{return(MINUSOP) ;}
+ /*LINTED*/break;
+ case 4:
+YY_RULE_SETUP
+
+{return(DIVIDEOP) ;}
+ /*LINTED*/break;
+ case 5:
+YY_RULE_SETUP
+
+{return(EXPOP) ;}
+ /*LINTED*/break;
+ case 6:
+YY_RULE_SETUP
+
+{return(EXPOP) ;}
+ /*LINTED*/break;
+ case 7:
+YY_RULE_SETUP
+
+{return(MULTOP) ;}
+ /*LINTED*/break;
+ case 8:
+YY_RULE_SETUP
+
+{return(PARENTHESIS);}
+ /*LINTED*/break;
+ case 9:
+YY_RULE_SETUP
+
+{return(BRACKET);}
+ /*LINTED*/break;
+ case 10:
+YY_RULE_SETUP
+
+{return(ENDPARENTHESIS);}
+ /*LINTED*/break;
+ case 11:
+YY_RULE_SETUP
+
+{return(ENDBRACKET);}
+ /*LINTED*/break;
+ case 12:
+YY_RULE_SETUP
+
+{return(COMMA);}
+ /*LINTED*/break;
+ case 13:
+YY_RULE_SETUP
+
+{return(DIFFERENTIAL);}
+ /*LINTED*/break;
+ case 14:
+YY_RULE_SETUP
+
+{return(ASSIGNOP);}
+ /*LINTED*/break;
+ case 15:
+YY_RULE_SETUP
+
+{return(EQUALOP);}
+ /*LINTED*/break;
+ case 16:
+YY_RULE_SETUP
+
+{return(DEASSIGNKEY);}
+ /*LINTED*/break;
+ case 17:
+YY_RULE_SETUP
+
+{return(DERIVKEY);}
+ /*LINTED*/break;
+ case 18:
+YY_RULE_SETUP
+
+{return(CONSTKEY);}
+ /*LINTED*/break;
+ case 19:
+YY_RULE_SETUP
+
+{return(SUMKEY);}
+ /*LINTED*/break;
+ case 20:
+YY_RULE_SETUP
+
+{return(PRODKEY);}
+ /*LINTED*/break;
+ case 21:
+YY_RULE_SETUP
+
+{ExprIntrp_SetResult(); return(VALUE);}
+ /*LINTED*/break;
+ case 22:
+YY_RULE_SETUP
+
+{ExprIntrp_SetResult(); return(VALUE);}
+ /*LINTED*/break;
+ case 23:
+YY_RULE_SETUP
+
+{ExprIntrp_SetResult(); return(IDENTIFIER);}
+ /*LINTED*/break;
+ case 24:
+YY_RULE_SETUP
+
+{return(RELSEPARATOR);}
+ /*LINTED*/break;
+ case 25:
+YY_RULE_SETUP
+
+{ExprIntrp_SetDegree();return(DERIVATE);}
+ /*LINTED*/break;
+ case 26:
+YY_RULE_SETUP
+
+yyecho();
+ /*LINTED*/break;
+ case YY_STATE_EOF(INITIAL):
+ /* FALLTHROUGH */
+ yyterminate();
+
+ case YY_END_OF_BUFFER:
+ {
+ /* Amount of text matched not including the EOB char. */
+ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
+
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
+ *yy_cp = (yy_hold_char);
+ YY_RESTORE_YY_MORE_OFFSET
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) {
+ /* We're scanning a new file or input source. It's
+ * possible that this happened because the user
+ * just pointed yyin at a new source and called
+ * yylex(). If so, then we have to assure
+ * consistency between yy_current_buffer() and our
+ * globals. Here is the right place to do so, because
+ * this is the first action (other than possibly a
+ * back-up) that will match for the new input source.
+ */
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
+ }
+
+ /* Note that here we test for yy_c_buf_p "<=" to the position
+ * of the first EOB in the buffer, since yy_c_buf_p will
+ * already have been incremented past the NUL character
+ * (since all states make transitions on EOB to the
+ * end-of-buffer state). Contrast this with the test
+ * in input().
+ */
+ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */
+ yy_state_type yy_next_state;
+
+ (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state( );
+
+ /* Okay, we're now positioned to make the NUL
+ * transition. We couldn't have
+ * yy_get_previous_state() go ahead and do it
+ * for us because it doesn't know how to deal
+ * with the possibility of jamming (and we don't
+ * want to build jamming into it because then it
+ * will run more slowly).
+ */
+
+ yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+
+ if ( yy_next_state ) {
+ /* Consume the NUL. */
+ yy_cp = ++(yy_c_buf_p);
+ yy_current_state = yy_next_state;
+ goto yy_match;
+ } else {
+
+ /* Still need to initialize yy_cp, though
+ * yy_current_state was set up by
+ * yy_get_previous_state().
+ */
+ yy_cp = (yy_c_buf_p);
+
+ goto yy_find_action;
+ }
+ } else { /* not a NUL */
+ switch ( yy_get_next_buffer( ) ) {
+ case EOB_ACT_END_OF_FILE:
+ (yy_did_buffer_switch_on_eof) = 0;
+
+ if ( yywrap( ) ) {
+ /* Note: because we've taken care in
+ * yy_get_next_buffer() to have set up
+ * yytext, we can now set up
+ * yy_c_buf_p so that if some total
+ * hoser (like flex itself) wants to
+ * call the scanner after we return the
+ * YY_NULL, it'll still work - another
+ * YY_NULL will get returned.
+ */
+ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
+
+ yy_act = YY_STATE_EOF(yystart());
+ goto do_action;
+ } else {
+ if ( ! (yy_did_buffer_switch_on_eof) ) {
+ YY_NEW_FILE;
+ }
+ }
+ break;
+ case EOB_ACT_CONTINUE_SCAN:
+ (yy_c_buf_p) =
+ (yytext_ptr) + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state( );
+
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ goto yy_match;
+
+ case EOB_ACT_LAST_MATCH:
+ (yy_c_buf_p) =
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
+
+ yy_current_state = yy_get_previous_state( );
+
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ goto yy_find_action;
+ default:
+ YY_FATAL_ERROR("unexpected return value from yy_get_next_buffer()");
+ } /* end EOB inner switch */
+ } /* end if */
+ break;
+ } /* case YY_END_OF_BUFFER */
+ default:
+ YY_FATAL_ERROR("fatal flex scanner internal error--no action found" );
+ } /* end of action switch */
+ } /* end of scanning one token */
+ } /* end of user's declarations */
+} /* end of yylex */
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ * EOB_ACT_LAST_MATCH -
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ * EOB_ACT_END_OF_FILE - end of file
+ */
+
+static int yy_get_next_buffer (void)
+
+{
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = (yytext_ptr);
+ int number_to_move, i;
+ int ret_val;
+
+ if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) {
+ YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" );
+ }
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) {
+ /* Don't try to fill the buffer, so this is an EOF. */
+ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) {
+ /* We matched a single character, the EOB, so
+ * treat this as a final EOF.
+ */
+ return EOB_ACT_END_OF_FILE;
+ } else {
+ /* We matched some text prior to the EOB, first
+ * process it.
+ */
+ return EOB_ACT_LAST_MATCH;
+ }
+ }
+
+ /* Try to read more data. */
+
+ /* First move last chars to start of buffer. */
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
+
+ for ( i = 0; i < number_to_move; ++i ) {
+ *(dest++) = *(source++);
+ }
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) {
+ /* don't do the read, it's not guaranteed to return an EOF,
+ * just force an EOF
+ */
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
+ } else {
+ int num_to_read =
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+
+ while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */
+
+ /* just a shorter name for the current buffer */
+ yybuffer b = YY_CURRENT_BUFFER_LVALUE;
+
+ int yy_c_buf_p_offset =
+ (int) ((yy_c_buf_p) - b->yy_ch_buf);
+
+ if ( b->yy_is_our_buffer ) {
+ int new_size = b->yy_buf_size * 2;
+
+ if ( new_size <= 0 ) {
+ b->yy_buf_size += b->yy_buf_size / 8;
+ } else {
+ b->yy_buf_size *= 2;
+ }
+ b->yy_ch_buf = (char *)
+ /* Include room in for 2 EOB chars. */
+ yyrealloc( (void *) b->yy_ch_buf,
+ (yy_size_t) (b->yy_buf_size + 2) );
+ } else {
+ /* Can't grow it, we don't own it. */
+ b->yy_ch_buf = NULL;
+ }
+ if ( ! b->yy_ch_buf ) {
+ YY_FATAL_ERROR(
+ "fatal error - scanner input buffer overflow" );
+ }
+ (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+ number_to_move - 1;
+
+ }
+
+ if ( num_to_read > YY_READ_BUF_SIZE ) {
+ num_to_read = YY_READ_BUF_SIZE;
+ }
+ /* Read in more data. */
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+ (yy_n_chars), num_to_read );
+
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ if ( (yy_n_chars) == 0 ) {
+ if ( number_to_move == YY_MORE_ADJ ) {
+ ret_val = EOB_ACT_END_OF_FILE;
+ yyrestart( yyin );
+ } else {
+ ret_val = EOB_ACT_LAST_MATCH;
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
+ YY_BUFFER_EOF_PENDING;
+ }
+ } else {
+ ret_val = EOB_ACT_CONTINUE_SCAN;
+ }
+ if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ /* Extend the array by 50%, plus the number we really need. */
+ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1) + 2;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
+ (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) {
+ YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ }
+ /* "- 2" to take care of EOB's */
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
+ }
+
+ (yy_n_chars) += number_to_move;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
+
+ (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
+
+ return ret_val;
+}
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+static yy_state_type yy_get_previous_state (void)
+
+{
+ yy_state_type yy_current_state;
+ char *yy_cp;
+
+ /* Generate the code to find the start state. */
+
+ yy_current_state = (yy_start);
+
+ /* Set up for storing up states. */
+
+ for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) {
+ /* Generate the code to find the next state. */
+
+ int yy_c = (*yy_cp ? *(yy_ec+YY_SC_TO_UI(*yy_cp)) : YY_NUL_EC);
+ /* Save the backing-up info \before/ computing the next state
+ * because we always compute one more state than needed - we
+ * always proceed until we reach a jam state
+ */
+
+ /* Generate code to keep backing-up information. */
+
+ if ( yy_accept[yy_current_state] ) {
+
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
+
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) {
+ yy_current_state = (int) yy_def[yy_current_state];
+
+ /* We've arranged it so that templates are never chained
+ * to one another. This means we can afford to make a
+ * very simple test to see if we need to convert to
+ * yy_c's meta-equivalence class without worrying
+ * about erroneously looking up the meta-equivalence
+ * class twice
+ */
+
+ /* lastdfa + 2 == YY_JAMSTATE + 1 is the beginning of the templates */
+ if (yy_current_state >= YY_JAMSTATE + 1) {
+ yy_c = yy_meta[yy_c];
+ }
+
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+
+ }
+
+ return yy_current_state;
+}
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ * next_state = yy_try_NUL_trans( current_state );
+ */
+
+static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
+
+{
+ int yy_is_jam;
+ /* Generate code for handling NUL's, if needed. */
+
+ /* First, deal with backing up and setting up yy_cp if the scanner
+ * finds that it should JAM on the NUL.
+ *
+ * Only generate a definition for "yy_cp" if we'll generate code
+ * that uses it. Otherwise lint and the like complain.
+ */
+ char *yy_cp = (yy_c_buf_p);
+
+ int yy_c = YY_NUL_EC;
+ /* Save the backing-up info \before/ computing the next state
+ * because we always compute one more state than needed - we
+ * always proceed until we reach a jam state
+ */
+
+ /* Generate code to keep backing-up information. */
+
+ if ( yy_accept[yy_current_state] ) {
+
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
+
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) {
+ yy_current_state = (int) yy_def[yy_current_state];
+
+ /* We've arranged it so that templates are never chained
+ * to one another. This means we can afford to make a
+ * very simple test to see if we need to convert to
+ * yy_c's meta-equivalence class without worrying
+ * about erroneously looking up the meta-equivalence
+ * class twice
+ */
+
+ /* lastdfa + 2 == YY_JAMSTATE + 1 is the beginning of the templates */
+ if (yy_current_state >= YY_JAMSTATE + 1) {
+ yy_c = yy_meta[yy_c];
+ }
+
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+
+yy_is_jam = (yy_current_state == YY_JAMSTATE);
+
+ return yy_is_jam ? 0 : yy_current_state;
+}
+
+#ifndef YY_NO_YYUNPUT
+static void yyunput_r (int c, char * yy_bp )
+
+{
+ char *yy_cp;
+
+ yy_cp = (yy_c_buf_p);
+
+ /* undo effects of setting up yytext */
+ *yy_cp = (yy_hold_char);
+
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) {
+ /* need to shift things up to make room */
+ /* +2 for EOB chars. */
+ int number_to_move = (yy_n_chars) + 2;
+ char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
+ char *source =
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
+
+ while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) {
+ *--dest = *--source;
+ }
+ yy_cp += (int) (dest - source);
+ yy_bp += (int) (dest - source);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
+ (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
+
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) {
+ YY_FATAL_ERROR( "flex scanner push-back overflow" );
+ }
+ }
+
+ *--yy_cp = (char) c;
+
+ (yytext_ptr) = yy_bp;
+ (yy_hold_char) = *yy_cp;
+ (yy_c_buf_p) = yy_cp;
+}
+
+#endif /* ifndef YY_NO_YYINPUT */
+
+#ifndef YY_NO_YYINPUT
+int yyinput (void)
+
+{
+ int c;
+
+ *(yy_c_buf_p) = (yy_hold_char);
+
+ if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) {
+ /* yy_c_buf_p now points to the character we want to return.
+ * If this occurs *before* the EOB characters, then it's a
+ * valid NUL; if not, then we've hit the end of the buffer.
+ */
+ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) {
+ /* This was really a NUL. */
+ *(yy_c_buf_p) = '\0';
+ } else {
+ /* need more input */
+ int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
+ ++(yy_c_buf_p);
+
+ switch ( yy_get_next_buffer( ) ) {
+ case EOB_ACT_LAST_MATCH:
+ /* This happens because yy_g_n_b()
+ * sees that we've accumulated a
+ * token and flags that we need to
+ * try matching the token before
+ * proceeding. But for input(),
+ * there's no matching to consider.
+ * So convert the EOB_ACT_LAST_MATCH
+ * to EOB_ACT_END_OF_FILE.
+ */
+
+ /* Reset buffer status. */
+ yyrestart( yyin );
+
+ /*FALLTHROUGH*/
+
+ case EOB_ACT_END_OF_FILE:
+ if ( yywrap( ) ) {
+ return 0;
+ }
+ if ( ! (yy_did_buffer_switch_on_eof) ) {
+ YY_NEW_FILE;
+ }
+ return yyinput();
+
+ case EOB_ACT_CONTINUE_SCAN:
+ (yy_c_buf_p) = (yytext_ptr) + offset;
+ break;
+ default:
+ YY_FATAL_ERROR("unexpected return value from yy_get_next_buffer()");
+ }
+ }
+ }
+
+ c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
+ *(yy_c_buf_p) = '\0'; /* preserve yytext */
+ (yy_hold_char) = *++(yy_c_buf_p);
+
+ return c;
+}
+
+#endif /* ifndef YY_NO_YYINPUT */
+
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ *
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+
+void yyrestart (FILE * input_file )
+
+{
+
+ if ( yy_current_buffer() == NULL ) {
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+ }
+
+ yy_init_buffer( YY_CURRENT_BUFFER_LVALUE, input_file );
+ yy_load_buffer_state( );
+
+ /* We don't actually know whether we did this switch during
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
+ * to go ahead and always set it.
+ */
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ *
+ */
+
+void yy_switch_to_buffer (yybuffer new_buffer )
+
+{
+
+ /* TODO. We should be able to replace this entire function body
+ * with
+ * yypop_buffer_state();
+ * yypush_buffer_state(new_buffer);
+ */
+ yyensure_buffer_stack ();
+ if ( yy_current_buffer() == new_buffer ) {
+ return;
+ }
+ if ( yy_current_buffer() ) {
+ /* Flush out information for old buffer. */
+ *(yy_c_buf_p) = (yy_hold_char);
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+ yy_load_buffer_state( );
+
+ /* We don't actually know whether we did this switch during
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
+ * to go ahead and always set it.
+ */
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+
+static void yy_load_buffer_state (void)
+
+{
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+
+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+
+ (yy_hold_char) = *(yy_c_buf_p);
+}
+
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ *
+ * @return the allocated buffer state.
+ */
+
+yybuffer yy_create_buffer (FILE * file, int size )
+
+{
+ yybuffer b;
+
+ b = (yybuffer) yyalloc( sizeof( struct yy_buffer_state ) );
+ if ( b == NULL ) {
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+ }
+ b->yy_buf_size = size;
+
+ /* yy_ch_buf has to be 2 characters longer than the size given because
+ * we need to put in 2 end-of-buffer characters.
+ */
+ b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
+ if ( b->yy_ch_buf == NULL ) {
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+ }
+ b->yy_is_our_buffer = 1;
+
+ yy_init_buffer( b, file );
+
+ return b;
+}
+
+/** Destroy the buffer.
+ * @param b a buffer created with yy_create_buffer()
+ *
+ */
+
+void yy_delete_buffer (yybuffer b )
+
+{
+
+ if ( b == NULL ) {
+ return;
+ }
+ if ( b == yy_current_buffer() ) { /* Not sure if we should pop here. */
+ YY_CURRENT_BUFFER_LVALUE = (yybuffer) 0;
+ }
+ if ( b->yy_is_our_buffer ) {
+ yyfree( (void *) b->yy_ch_buf );
+ }
+ yyfree( (void *) b );
+}
+
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a yyrestart() or at EOF.
+ */
+
+static void yy_init_buffer (yybuffer b, FILE * file )
+
+{
+ int oerrno = errno;
+
+ yy_flush_buffer( b );
+
+ b->yy_input_file = file;
+
+ /* b->yy_input_file should never by NULL but we'll handle it cleanly
+ * on the off chance.
+ */
+ if (b->yy_input_file == NULL){
+ b->yy_fill_buffer = 0;
+ } else {
+ b->yy_fill_buffer = 1;
+ }
+
+ /* If b is the current buffer, then yy_init_buffer was _probably_
+ * called from yyrestart() or through yy_get_next_buffer.
+ * In that case, we don't want to reset the lineno or column.
+ */
+ if (b != yy_current_buffer()) {
+ b->yy_bs_lineno = 1;
+ b->yy_bs_column = 0;
+ }
+
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+
+ errno = oerrno;
+}
+
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c yy_current_buffer().
+ *
+ */
+
+void yy_flush_buffer (yybuffer b )
+
+{
+ if ( b == NULL ) {
+ return;
+ }
+ b->yy_n_chars = 0;
+
+ /* We always need two end-of-buffer characters. The first causes
+ * a transition to the end-of-buffer state. The second causes
+ * a jam in that state.
+ */
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+ b->yy_buf_pos = &b->yy_ch_buf[0];
+
+ b->yyatbol = 1;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ if ( b == yy_current_buffer() ) {
+ yy_load_buffer_state( );
+ }
+}
+
+/** Pushes the new state onto the stack. The new state becomes
+ * the current state. This function will allocate the stack
+ * if necessary.
+ * @param new_buffer The new state.
+ *
+ */
+
+void yypush_buffer_state (yybuffer new_buffer )
+
+{
+ if (new_buffer == NULL) {
+ return;
+ }
+ yyensure_buffer_stack();
+
+ /* This block is copied from yy_switch_to_buffer. */
+ if ( yy_current_buffer() != NULL ) {
+ /* Flush out information for old buffer. */
+ *(yy_c_buf_p) = (yy_hold_char);
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ /* Only push if top exists. Otherwise, replace top. */
+ if (yy_current_buffer()) {
+ (yy_buffer_stack_top)++;
+ }
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+
+ /* copied from yy_switch_to_buffer. */
+ yy_load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+
+/** Removes and deletes the top of the stack, if present.
+ * The next element becomes the new top.
+ *
+ */
+
+void yypop_buffer_state (void)
+
+{
+ if (yy_current_buffer() == NULL) {
+ return;
+ }
+ yy_delete_buffer(yy_current_buffer() );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ if ((yy_buffer_stack_top) > 0) {
+ --(yy_buffer_stack_top);
+ }
+ if (yy_current_buffer() != NULL) {
+ yy_load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
+ }
+}
+
+/* Allocates the stack if it does not exist.
+ * Guarantees space for at least one push.
+ */
+
+static void yyensure_buffer_stack (void)
+
+{
+ yy_size_t num_to_alloc;
+
+ if ((yy_buffer_stack) == NULL) {
+ /* First allocation is just for 2 elements, since we don't know if this
+ * scanner will even need a stack. We use 2 instead of 1 to avoid an
+ * immediate realloc on the next call.
+ */
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+ (num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+ if ( (yy_buffer_stack == NULL) ) {
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+ }
+
+ memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
+
+ (yy_buffer_stack_max) = num_to_alloc;
+ (yy_buffer_stack_top) = 0;
+ return;
+ }
+
+ if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1) {
+ /* Increase the buffer to prepare for a possible push. */
+ yy_size_t grow_size = 8 /* arbitrary grow size */;
+
+ num_to_alloc = (yy_buffer_stack_max) + grow_size;
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
+ ((yy_buffer_stack),
+ num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+ if ((yy_buffer_stack) == NULL) {
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+ }
+ /* zero only the new slots.*/
+ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
+ (yy_buffer_stack_max) = num_to_alloc;
+ }
+}
+
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ *
+ * @return the newly allocated buffer state object.
+ */
+yybuffer yy_scan_buffer (char * base, yy_size_t size )
+{
+ yybuffer b;
+
+ if ( size < 2 ||
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
+ base[size-1] != YY_END_OF_BUFFER_CHAR ) {
+ /* They forgot to leave room for the EOB's. */
+ return NULL;
+ }
+ b = (yybuffer) yyalloc( sizeof( struct yy_buffer_state ) );
+ if ( b == NULL ) {
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+ }
+ b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
+ b->yy_buf_pos = b->yy_ch_buf = base;
+ b->yy_is_our_buffer = 0;
+ b->yy_input_file = NULL;
+ b->yy_n_chars = b->yy_buf_size;
+ b->yy_is_interactive = 0;
+ b->yyatbol = 1;
+ b->yy_fill_buffer = 0;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ yy_switch_to_buffer( b );
+
+ return b;
+}
+
+/** Setup the input buffer state to scan a string. The next call to yylex() will
+ * scan from a @e copy of @a str.
+ * @param yystr a NUL-terminated string to scan
+ *
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ * yy_scan_bytes() instead.
+ */
+yybuffer yy_scan_string (const char * yystr )
+{
+
+ return yy_scan_bytes( yystr, (int) strlen(yystr) );
+}
+
+/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
+ * scan from a @e copy of @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ *
+ * @return the newly allocated buffer state object.
+ */
+yybuffer yy_scan_bytes (const char * yybytes, int _yybytes_len ) {
+ yybuffer b;
+ char *buf;
+ yy_size_t n;
+ int i;
+
+ /* Get memory for full buffer, including space for trailing EOB's. */
+ n = (yy_size_t) (_yybytes_len + 2);
+ buf = (char *) yyalloc( n );
+ if ( buf == 0 ) {
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+ }
+ for ( i = 0; i < _yybytes_len; ++i ) {
+ buf[i] = yybytes[i];
+ }
+ buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
+
+ b = yy_scan_buffer( buf, n );
+ if ( b == NULL ) {
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+ }
+ /* It's okay to grow etc. this buffer, and we should throw it
+ * away when we're done.
+ */
+ b->yy_is_our_buffer = 1;
+
+ return b;
+}
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+ do { \
+ /* Undo effects of setting up yytext. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ yytext[yyleng] = (yy_hold_char); \
+ (yy_c_buf_p) = yytext + yyless_macro_arg; \
+ (yy_hold_char) = *(yy_c_buf_p); \
+ *(yy_c_buf_p) = '\0'; \
+ yyleng = yyless_macro_arg; \
+ } while ( 0 )
+
+/* Accessor methods (get/set functions) to struct members. */
+
+/** Get the current line number.
+ *
+ */
+int yyget_lineno (void) {
+
+ return yylineno;
+}
+
+/** Get the input stream.
+ *
+ */
+FILE *yyget_in (void) {
+ return yyin;
+}
+
+/** Get the output stream.
+ *
+ */
+FILE *yyget_out (void) {
+ return yyout;
+}
+
+/** Get the length of the current token.
+ *
+ */
+int yyget_leng (void) {
+ return yyleng;
+}
+
+/** Get the current token.
+ *
+ */
+
+char *yyget_text (void) {
+ return yytext;
+}
+
+/** Set the current line number.
+ * @param _line_number line number
+ *
+ */
+void yyset_lineno (int _line_number ) {
+
+ yylineno = _line_number;
+}
+
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param _in_str A readable stream.
+ *
+ * @see yy_switch_to_buffer
+ */
+void yyset_in (FILE * _in_str ) {
+ yyin = _in_str ;
+}
+
+void yyset_out (FILE * _out_str ) {
+ yyout = _out_str ;
+}
+
+int yyget_debug (void) {
+ return yyflexdebug;
+}
+
+void yyset_debug (int _bdebug ) {
+ yyflexdebug = _bdebug ;
+}
+
+static int yy_init_globals (void) {
+ /* Initialization is the same as for the non-reentrant scanner.
+ * This function is called from yylex_destroy(), so don't allocate here.
+ */
+
+ (yy_buffer_stack) = NULL;
+ (yy_buffer_stack_top) = 0;
+ (yy_buffer_stack_max) = 0;
+ (yy_c_buf_p) = NULL;
+ (yy_init) = 0;
+ (yy_start) = 0;
+
+/* Defined in main.c */
+#ifdef YY_STDINIT
+ yyin = stdin;
+ yyout = stdout;
+#else
+ yyin = NULL;
+ yyout = NULL;
+#endif
+
+ /* For future reference: Set errno on error, since we are called by
+ * yylex_init()
+ */
+ return 0;
+}
+
+/* yylex_destroy is for both reentrant and non-reentrant scanners. */
+int yylex_destroy (void) {
+
+ /* Pop the buffer stack, destroying each element. */
+ while(yy_current_buffer()) {
+ yypop_buffer_state();
+ }
+
+ /* Destroy the stack itself. */
+ yyfree((yy_buffer_stack) );
+ (yy_buffer_stack) = NULL;
+
+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
+ * yylex() is called, initialization will occur. */
+ yy_init_globals( );
+
+ return 0;
+}
+
+/*
+ * Internal utility routines.
+ */
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char* s1, const char * s2, int n ) {
+
+ int i;
+ for ( i = 0; i < n; ++i ) {
+ s1[i] = s2[i];
+ }
+}
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (const char * s )
+{
+ int n;
+ for ( n = 0; s[n]; ++n )
+ ;
+
+ return n;
+}
+#endif
+
+void *yyalloc (yy_size_t size ) {
+ return malloc(size);
+}
+
+void *yyrealloc (void * ptr, yy_size_t size ) {
+
+ /* The cast to (char *) in the following accommodates both
+ * implementations that use char* generic pointers, and those
+ * that use void* generic pointers. It works with the latter
+ * because both ANSI C and C++ allow castless assignment from
+ * any pointer type to void*, and deal with argument conversions
+ * as though doing an assignment.
+ */
+ return realloc(ptr, size);
+}
+
+void yyfree (void * ptr ) {
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
+}
+
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"
};
}
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 );
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();
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;
#include "stdint.h"
#endif
-#define YY_INT_ALIGNED short int
-/* A lexical scanner generated by flex */
+/* Target: C/C++ */
+/* START of m4 controls */
+/* M4_YY_TABLES_VERIFY = 0 */
+/* M4_MODE_NO_DO_STDINIT */
+/* M4_MODE_NO_YYTEXT_IS_ARRAY */
+/* M4_MODE_YYMORE_USED */
+/* M4_MODE_NO_REAL_FULLSPD */
+/* M4_MODE_NO_REAL_FULLTBL */
+/* M4_MODE_NO_CPP_USE_READ */
+/* M4_MODE_VARIABLE_TRAILING_CONTEXT_RULES */
+/* M4_MODE_FIND_ACTION_REJECT_REALLY_USED */
+/* M4_MODE_USES_REJECT */
+/* M4_MODE_USEMECS */
+/* M4_MODE_FIND_ACTION_REJECT */
+/* M4_MODE_NO_FULLSPD */
+/* M4_MODE_NO_BOL_NEEDED */
+/* M4_MODE_USEECS */
+/* M4_MODE_GENTABLES */
+/* M4_MODE_NO_INTERACTIVE */
+/* M4_MODE_NO_FULLSPD_OR_FULLTBL */
+/* M4_MODE_FIND_ACTION_REJECT_OR_INTERACTIVE */
+/* M4_MODE_YYCLASS */
+/* M4_MODE_NO_YYWRAP */
+/* M4_MODE_CXX_ONLY */
+/* M4_MODE_PREFIX = step */
+/* M4_MODE_NO_YYINPUT */
+/* M4_YY_NO_FLEX_ALLOC */
+/* M4_YY_NO_FLEX_REALLOC */
+/* M4_YY_NO_FLEX_FREE */
+/* M4_YY_NO_UNISTD_H */
+/* M4_YY_NEVER_INTERACTIVE */
+/* M4_MODE_NO_REWRITE */
+/* END of m4 controls */
+
+
+
+
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define FLEX_BETA
#endif
+
+
+
+
+
+
+
+
+
+
+
+
+
/* The c++ scanner is a mess. The FlexLexer.h header file relies on the
* following macro. This is required in order to pass the c++-multiple-scanners
* test in the regression suite. We get reports that it breaks inheritance.
*/
#define yyFlexLexer stepFlexLexer
+
+
+
+
+
+
+
+
#ifdef yyalloc
#define stepalloc_ALREADY_DEFINED
#else
#define yyalloc stepalloc
#endif
+
#ifdef yyrealloc
#define steprealloc_ALREADY_DEFINED
#else
#define yyrealloc steprealloc
#endif
+
#ifdef yyfree
#define stepfree_ALREADY_DEFINED
#else
#define yyfree stepfree
#endif
+
+
+
+
+
+
+
/* First, we deal with platform-specific or compiler-specific issues. */
/* begin standard C headers. */
+
+
/* end standard C headers. */
-/* flex integer type definitions */
+/* begin standard C++ headers. */
-#ifndef FLEXINT_H
-#define FLEXINT_H
+#include <iostream>
+#include <errno.h>
+#include <cstdlib>
+#include <cstdio>
+#include <cstring>
+/* end standard C++ headers. */
-/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+/* flex integer type definitions */
-/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
- */
-#ifndef __STDC_LIMIT_MACROS
-#define __STDC_LIMIT_MACROS 1
-#endif
+#ifndef YYFLEX_INTTYPES_DEFINED
+#define YYFLEX_INTTYPES_DEFINED
+/* Prefer C99 integer types if available. */
+
+# if defined(__cplusplus) && __cplusplus >= 201103L
+#include <cstdint>
+# define YYFLEX_USE_STDINT
+# endif
+# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+/* Include <inttypes.h> and not <stdint.h> because Solaris 2.6 has the former
+ * and not the latter.
+ */
#include <inttypes.h>
+# define YYFLEX_USE_STDINT
+# else
+# if defined(_MSC_VER) && _MSC_VER >= 1600
+/* Visual C++ 2010 does not define __STDC_VERSION__ and has <stdint.h> but not
+ * <inttypes.h>.
+ */
+#include <stdint.h>
+# define YYFLEX_USE_STDINT
+# endif
+# endif
+# ifdef YYFLEX_USE_STDINT
typedef int8_t flex_int8_t;
typedef uint8_t flex_uint8_t;
typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
-#else
-typedef signed char flex_int8_t;
+# else
+typedef unsigned char flex_uint8_t;
typedef short int flex_int16_t;
-typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
+# ifdef __STDC__
+typedef signed char flex_int8_t;
+/* ISO C only requires at least 16 bits for int. */
+# ifdef __cplusplus
+#include <climits>
+# else
+#include <limits.h>
+# endif
+# if UINT_MAX >= 4294967295
+# define YYFLEX_INT32_DEFINED
+typedef int flex_int32_t;
typedef unsigned int flex_uint32_t;
+# endif
+# else
+typedef char flex_int8_t;
+# endif
+# ifndef YYFLEX_INT32_DEFINED
+typedef long int flex_int32_t;
+typedef unsigned long int flex_uint32_t;
+# endif
+# endif
+#endif /* YYFLEX_INTTYPES_DEFINED */
-/* Limits of integral types. */
-#ifndef INT8_MIN
-#define INT8_MIN (-128)
-#endif
-#ifndef INT16_MIN
-#define INT16_MIN (-32767-1)
-#endif
-#ifndef INT32_MIN
-#define INT32_MIN (-2147483647-1)
-#endif
-#ifndef INT8_MAX
-#define INT8_MAX (127)
-#endif
-#ifndef INT16_MAX
-#define INT16_MAX (32767)
-#endif
-#ifndef INT32_MAX
-#define INT32_MAX (2147483647)
-#endif
-#ifndef UINT8_MAX
-#define UINT8_MAX (255U)
-#endif
-#ifndef UINT16_MAX
-#define UINT16_MAX (65535U)
-#endif
-#ifndef UINT32_MAX
-#define UINT32_MAX (4294967295U)
-#endif
-
-#ifndef SIZE_MAX
-#define SIZE_MAX (~(size_t)0)
-#endif
-
-#endif /* ! C99 */
-
-#endif /* ! FLEXINT_H */
-
-/* begin standard C++ headers. */
-#include <iostream>
-#include <errno.h>
-#include <cstdlib>
-#include <cstdio>
-#include <cstring>
-/* end standard C++ headers. */
/* TODO: this is always defined, so inline it */
#define yyconst const
/* Returned upon end-of-file. */
#define YY_NULL 0
+
/* Promotes a possibly negative, possibly signed char to an
* integer in range [0..255] for use as an array index.
*/
#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
+#define yybegin(s) (yy_start) = 1 + 2 * (s)
+/* Legacy interface */
#define BEGIN (yy_start) = 1 + 2 *
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
+#define yystart() (((yy_start) - 1) / 2)
+/* Legacy interfaces */
#define YY_START (((yy_start) - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
-/* Size of default input buffer. */
-#ifndef YY_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k.
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
- * Ditto for the __ia64__ case accordingly.
- */
-#define YY_BUF_SIZE 32768
-#else
-#define YY_BUF_SIZE 16384
-#endif /* __ia64__ */
-#endif
-/* The state buf must be large enough to hold one state per character in the main buffer.
+
+/* The state buf must be large enough to hold one state per character in the main buffer,
+ * plus the start state, plus the two end-of-buffer byte states.
*/
-#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
+#define YY_STATE_BUF_EXTRA_SPACE 3
+#define YY_STATE_BUF_SIZE (YY_BUF_SIZE + YY_STATE_BUF_EXTRA_SPACE)
+
+
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *yybuffer;
+/* Legacy interface */
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
typedef size_t yy_size_t;
#endif
+
extern int yyleng;
+
+
+
+
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
-#define unput(c) yyunput( c, (yytext_ptr) )
+#define yyunput(c) yyunput_r( c, (yytext_ptr) )
+/* Legacy interface */
+#define unput(c) yyunput_r( c, (yytext_ptr) )
+
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
{
+
std::streambuf* yy_input_file;
char *yy_ch_buf; /* input buffer */
* If so, '^' rules will be active on the next match, otherwise
* not.
*/
- int yy_at_bol;
+ int yyatbol;
- int yy_bs_lineno; /**< The line count. */
- int yy_bs_column; /**< The column count. */
+ int yy_bs_lineno; /**< The line count. */
+ int yy_bs_column; /**< The column count. */
/* Whether to try to fill the input buffer when we reach the
* end of it.
};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+
+
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
* "scanner state".
*
* Returns the top of the stack, or NULL.
*/
-#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
+#define yy_current_buffer() ( (yy_buffer_stack) \
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
: NULL)
+/* Legacy interface */
+#define YY_CURRENT_BUFFER yy_current_buffer()
/* Same as previous macro, but useful when we know that the buffer stack is not
* NULL or when we need an lvalue. For internal use only.
*/
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
+
+
+
void *yyalloc ( yy_size_t );
void *yyrealloc ( void *, yy_size_t );
void yyfree ( void * );
+
#define yy_new_buffer yy_create_buffer
-#define yy_set_interactive(is_interactive) \
+#define yy_set_interactive(is_interactive) { \
+ if ( yy_current_buffer() == NULL ) { \
+ yyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+}
+#define yysetbol(at_bol) \
{ \
- if ( ! YY_CURRENT_BUFFER ){ \
- yyensure_buffer_stack (); \
+ if ( yy_current_buffer() == NULL ) { \
+ yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \
- YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
- }
+ YY_CURRENT_BUFFER_LVALUE->yyatbol = at_bol; \
+}
+#define yyatbol() (YY_CURRENT_BUFFER_LVALUE->yyatbol)
+/* Legacy interface */
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yyatbol)
#define yy_set_bol(at_bol) \
{ \
- if ( ! YY_CURRENT_BUFFER ){\
- yyensure_buffer_stack (); \
+ if ( yy_current_buffer() == NULL ) { \
+ yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \
- YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
- }
-#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+ YY_CURRENT_BUFFER_LVALUE->yyatbol = at_bol; \
+}
+
/* Begin user sect3 */
+
+
+
#define YY_SKIP_YYWRAP
+
+
typedef flex_uint8_t YY_CHAR;
+
#define yytext_ptr yytext
-#define YY_INTERACTIVE
+
+
+
+
+
+
+
+
+
#include <FlexLexer.h>
-inline int yyFlexLexer::yywrap() { return 1; }
+int yyFlexLexer::yywrap() { return 1;}
+
+
int yyFlexLexer::yylex()
{
LexerError( "yyFlexLexer::yylex invoked but %option yyclass used" );
#define YY_DECL int step::scanner::yylex()
+
+
+
+
+/* %% [1.5] DFA */
+/* START of m4 controls */
+/* M4_MODE_NO_NULTRANS */
+/* M4_MODE_NO_NULTRANS_FULLTBL */
+/* M4_MODE_NO_NULTRANS_FULLSPD */
+/* END of m4 controls */
+
+/* START of Flex-generated definitions */
+#define YY_NUM_RULES 44
+#define YY_END_OF_BUFFER 45
+#define YY_JAMBASE 323
+#define YY_JAMSTATE 123
+#define YY_NUL_EC 49
+#define YY_OFFSET_TYPE flex_int16_t
+/* END of Flex-generated definitions */
+
+
+
+
+
+struct yy_trans_info
+ {
+ /* We require that yy_verify and yy_nxt must be of the same size int. */
+
+
+ /* We generate a bogus 'struct yy_trans_info' data type
+ * so we can guarantee that it is always declared in the skel.
+ * This is so we can compile "sizeof(struct yy_trans_info)"
+ * in any scanner.
+ */
+ flex_int32_t yy_verify;
+ flex_int32_t yy_nxt;
+
+ };
+
+
+
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
+ do { \
(yytext_ptr) = yy_bp; \
(yytext_ptr) -= (yy_more_len); \
yyleng = (int) (yy_cp - (yytext_ptr)); \
+ \
+ \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
- (yy_c_buf_p) = yy_cp;
-#define YY_NUM_RULES 44
-#define YY_END_OF_BUFFER 45
-/* This struct is not used in this scanner,
- but its presence is necessary. */
-struct yy_trans_info
- {
- flex_int32_t yy_verify;
- flex_int32_t yy_nxt;
- };
-static const flex_int16_t yy_acclist[167] =
- { 0,
- 2, 2, 45, 42, 44, 10, 42, 44, 12, 42,
- 44, 13, 42, 44, 11, 42, 44, 42, 44, 42,
- 44, 42, 44, 26, 42, 44, 42, 44, 5, 42,
- 44, 23, 42, 44, 24, 44, 18, 42, 44, 25,
- 42, 44, 42, 44, 37, 42, 44, 18, 40, 42,
- 44, 28, 42, 44, 27, 42, 44, 40, 42, 44,
- 40, 42, 44, 40, 42, 44, 40, 42, 44, 40,
- 42, 44, 40, 42, 44, 14, 42, 44, 2, 44,
- 12, 44, 3, 44, 43, 44, 8, 44, 6, 12,
- 44, 7, 44, 41, 17,16400, 19, 18, 19, 19,
+ \
+ (yy_c_buf_p) = yy_cp; \
+ } while(0)
- 19, 1, 19, 22, 18, 19, 40, 40, 22, 40,
- 40, 40, 40, 40, 14, 2, 3, 3, 4, 8,
- 9, 21, 15, 8208, 40, 40, 40, 40, 40, 40,
- 8208, 20, 20, 20, 40, 40, 40, 40, 40, 36,
- 40, 20, 20, 20, 40, 32, 40, 40, 40, 40,
- 29, 38, 40, 40, 40, 40, 40, 31, 40, 30,
- 35, 39, 40, 33, 34, 34
- } ;
-static const flex_int16_t yy_accept[125] =
- { 0,
+
+
+
+/* %% [2.0] data tables for the DFA are inserted here */
+
+
+
+
+
+
+
+
+
+/* footprint: 21234 bytes */
+/* tblend: 372 */
+/* numecs: 49 */
+/* num_rules: 44 */
+/* lastdfa: 122 */
+
+/* m4 controls begin */
+/* M4_MODE_HAS_BACKING_UP */
+/* m4 controls end */
+
+
+
+
+
+static const flex_int16_t yy_accept[125] = { 0,
1, 1, 1, 2, 3, 3, 3, 3, 3, 4,
6, 9, 12, 15, 18, 20, 22, 24, 27, 29,
32, 35, 37, 40, 43, 45, 48, 52, 55, 58,
147, 147, 148, 149, 150, 151, 152, 153, 153, 154,
155, 156, 157, 157, 158, 159, 160, 161, 161, 162,
164, 166, 167, 167
- } ;
+};
+
-static const YY_CHAR yy_ec[256] =
- { 0,
+
+
+/* Character equivalence-class mapping */
+static const YY_CHAR yy_ec[256] = { 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
- } ;
+};
+
-static const YY_CHAR yy_meta[50] =
- { 0,
+
+
+/* Character meta-equivalence-class mappings */
+static const YY_CHAR yy_meta[50] = { 0,
1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
3, 1, 1, 4, 1, 1, 1, 5, 1, 6,
1, 1, 6, 6, 6, 6, 6, 7, 7, 7,
7, 7, 7, 7, 7, 7, 6, 6, 6, 6,
7, 7, 7, 7, 7, 7, 7, 7, 1
- } ;
+};
+
+
+
+
+
-static const flex_int16_t yy_base[135] =
- { 0,
+
+
+static const flex_int16_t yy_acclist[167] = { 0,
+ 2, 2, 45, 42, 44, 10, 42, 44, 12, 42,
+ 44, 13, 42, 44, 11, 42, 44, 42, 44, 42,
+ 44, 42, 44, 26, 42, 44, 42, 44, 5, 42,
+ 44, 23, 42, 44, 24, 44, 18, 42, 44, 25,
+ 42, 44, 42, 44, 37, 42, 44, 18, 40, 42,
+ 44, 28, 42, 44, 27, 42, 44, 40, 42, 44,
+ 40, 42, 44, 40, 42, 44, 40, 42, 44, 40,
+ 42, 44, 40, 42, 44, 14, 42, 44, 2, 44,
+ 12, 44, 3, 44, 43, 44, 8, 44, 6, 12,
+ 44, 7, 44, 41, 17,16400, 19, 18, 19, 19,
+
+ 19, 1, 19, 22, 18, 19, 40, 40, 22, 40,
+ 40, 40, 40, 40, 14, 2, 3, 3, 4, 8,
+ 9, 21, 15, 8208, 40, 40, 40, 40, 40, 40,
+ 8208, 20, 20, 20, 40, 40, 40, 40, 40, 36,
+ 40, 20, 20, 20, 40, 32, 40, 40, 40, 40,
+ 29, 38, 40, 40, 40, 40, 40, 31, 40, 30,
+ 35, 39, 40, 33, 34, 34
+};
+
+
+
+
+static const flex_int16_t yy_base[135] = { 0,
0, 0, 47, 48, 255, 252, 49, 52, 253, 323,
323, 323, 323, 323, 0, 0, 221, 323, 18, 323,
323, 323, 36, 323, 39, 223, 46, 323, 323, 211,
217, 218, 228, 225, 323, 233, 323, 240, 323, 82,
0, 0, 323, 265, 272, 279, 281, 83, 284, 287,
294, 301, 308, 315
- } ;
+};
+
+
+
-static const flex_int16_t yy_def[135] =
- { 0,
+static const flex_int16_t yy_def[135] = { 0,
123, 1, 124, 124, 125, 125, 126, 126, 123, 123,
123, 123, 123, 123, 127, 128, 123, 123, 123, 123,
123, 123, 123, 123, 129, 123, 130, 123, 123, 130,
130, 130, 123, 130, 123, 130, 123, 123, 123, 130,
134, 134, 0, 123, 123, 123, 123, 123, 123, 123,
123, 123, 123, 123
- } ;
+};
+
+
+
-static const flex_int16_t yy_nxt[373] =
- { 0,
+static const flex_int16_t yy_nxt[373] = { 0,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 10, 23, 24, 23, 25, 26, 27,
28, 29, 30, 30, 30, 31, 32, 30, 33, 34,
123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
123, 123
- } ;
+};
-static const flex_int16_t yy_chk[373] =
- { 0,
+
+
+
+static const flex_int16_t yy_chk[373] = { 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
123, 123
- } ;
+};
+
+
+
+
+
+
+
+
+
+
+
+
#define YY_TRAILING_MASK 0x2000
#define YY_TRAILING_HEAD_MASK 0x4000
-#define REJECT \
+
+
+
+
+
+#define yyreject() \
{ \
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \
yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
+ \
(yy_lp) = (yy_full_lp); /* restore orig. accepting pos. */ \
(yy_state_ptr) = (yy_full_state); /* restore orig. state */ \
yy_current_state = *(yy_state_ptr); /* restore curr. state */ \
+ \
++(yy_lp); \
goto find_rule; \
}
+#define REJECT yyreject()
+
+
+
+
+
+
#define yymore() ((yy_more_flag) = 1)
#define YY_MORE_ADJ (yy_more_len)
#define YY_RESTORE_YY_MORE_OFFSET
+
+
+
+
+
+
+
+/* %% [3.0] static declarations conditional on mode switches go here */
/*
Copyright (c) 1999-2014 OPEN CASCADE SAS
noyyalloc disables default allocation function
noyyfree disables default deallocation function
noyyrealloc disables default reallocation function
+ case-insensitive enable case insensitive parsing(any ?i: and other case setting will be ignored)
*/
-#define YY_NO_INPUT 1
#include <step.tab.hxx>
#include "stdio.h"
#pragma GCC diagnostic ignored "-Wunused-function"
#endif
+
+
+
#define INITIAL 0
#define Com 1
#define End 2
#define Text 3
-#ifndef YY_NO_UNISTD_H
-/* Special case for "unistd.h", since it is non-ANSI. We include it way
- * down here because we want the user's section 1 to have been scanned first.
- * The user has a chance to override it with an option.
- */
-#include <unistd.h>
-#endif
-
+
+
+
+
+
#ifndef YY_EXTRA_TYPE
#define YY_EXTRA_TYPE void *
#endif
+
+
+
+
#ifndef yytext_ptr
static void yy_flex_strncpy ( char *, const char *, int );
#endif
static int yy_flex_strlen ( const char * );
#endif
-#ifndef YY_NO_INPUT
+#define YY_NO_YYINPUT 1
+
+#ifndef YY_NO_YYINPUT
#endif
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k */
-#define YY_READ_BUF_SIZE 16384
-#else
-#define YY_READ_BUF_SIZE 8192
-#endif /* __ia64__ */
+
+
+
+/*
+ * Amount of stuff to slurp up with each read.
+ * We assume the stdio library has already
+ * chosen a fit size foe whatever platform
+ * we're running on.
+ */
+#define YY_READ_BUF_SIZE BUFSIZ
+
+/* Size of default input buffer. We want to be able to fit two
+ * OS-level reads, but efficiency gains as the buffer size
+ * increases fall off after that
+ */
+#ifndef YY_BUF_SIZE
+#define YY_BUF_SIZE (2 * YY_READ_BUF_SIZE)
#endif
+
/* Copy whatever the last rule matched to the standard output. */
-#ifndef ECHO
-#define ECHO LexerOutput( yytext, yyleng )
+#ifndef yyecho
+
+
+#define yyecho() LexerOutput( yytext, yyleng )
+
#endif
+/* Legacy interface */
+#define ECHO yyecho()
+
+
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+
+
+
+void yyFlexLexer::LexerError( const char* msg ) {
+ std::cerr << msg << std::endl;
+ exit( YY_EXIT_FAILURE );
+}
+
+
+
+/* Report a fatal error. Legacy interface. */
+#ifndef YY_FATAL_ERROR
+
+
+#define YY_FATAL_ERROR(msg) LexerError( msg )
+
+#endif
+
+/* Legacy interface */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) do {result = yyread(buf, max_size );} while (0)
+
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
* is returned in "result".
*/
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
-\
- if ( (int)(result = LexerInput( (char *) buf, max_size )) < 0 ) \
+
+int yyFlexLexer::yyread(char *buf, size_t max_size) {
+
+
+ int result;
+
+
+
+ if ( (int)(result = LexerInput( (char *) buf, max_size )) < 0 ) {
YY_FATAL_ERROR( "input in flex scanner failed" );
+ }
+ return result;
+}
#endif
+
+
+
+
/* No semi-colon after return; correct usage is to write "yyterminate();" -
* we don't want an extra ';' after the "return" because that will cause
* some compilers to complain about unreachable statements.
#define yyterminate() return YY_NULL
#endif
+
+
/* Number of entries by which start-condition stack grows. */
#ifndef YY_START_STACK_INCR
#define YY_START_STACK_INCR 25
#endif
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) LexerError( msg )
+
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+
+
+#define YY_DECL int yyFlexLexer::yylex()
+
+#endif /* !YY_DECL */
+
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
#endif
-/* end tables serialization structures and prototypes */
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef YY_DECL
-#define YY_DECL_IS_OURS 1
-#define YY_DECL int yyFlexLexer::yylex()
-#endif /* !YY_DECL */
-/* Code executed at the beginning of each rule, after yytext and yyleng
- * have been set up.
- */
-#ifndef YY_USER_ACTION
-#define YY_USER_ACTION
-#endif
+#define YY_RULE_SETUP \
+ YY_USER_ACTION
+
+
+
+
+
+
+
+
+
+
+
+/** The main scanner function which does all the work.
+ */
+YY_DECL {
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
+
+
+
+
+
+
+
+
+
+
+ if ( !(yy_init) ) {
+ (yy_init) = 1;
+
+#ifdef YY_USER_INIT
+ YY_USER_INIT;
+#endif
+
+ if ( ! (yy_start) ) {
+ (yy_start) = 1; /* first start state */
+ }
+ if ( ! yyin ) {
+
+
+ yyin.rdbuf(std::cin.rdbuf());
+
+ }
+ if ( ! yyout ) {
+
+
+ yyout.rdbuf(std::cout.rdbuf());
+
+ }
+ if ( yy_current_buffer() == NULL ) {
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+ }
+
+
+ /* Create the reject buffer large enough to save one state per allowed character.
+ * If the reject buffer already exists, keep using it.
+ */
+ if ( ! (yy_state_buf) ) {
+ (yy_state_buf) = (yy_state_type *)yyalloc( ((YY_CURRENT_BUFFER_LVALUE->yy_buf_size + YY_STATE_BUF_EXTRA_SPACE) * sizeof(yy_state_type)) );
+ if ( ! (yy_state_buf) ) {
+ YY_FATAL_ERROR( "out of dynamic memory in yylex()" );
+ }
+ (yy_state_buf_max) = (YY_CURRENT_BUFFER_LVALUE->yy_buf_size + YY_STATE_BUF_EXTRA_SPACE);
+ }
+
+
+ yy_load_buffer_state( );
+ }
+
+ /* open scope of user declarationns */
+ {
+/* %% [4.0] user's declarations go here */
+
+
+ while ( /*CONSTCOND*/1 ) { /* loops until end-of-file is reached */
+
+
+ (yy_more_len) = 0;
+ if ( (yy_more_flag) ) {
+ (yy_more_len) = (int) ((yy_c_buf_p) - (yytext_ptr));
+ (yy_more_flag) = 0;
+ }
+
+
+ yy_cp = (yy_c_buf_p);
+
+ /* Support of yytext. */
+ *yy_cp = (yy_hold_char);
+
+ /* yy_bp points to the position in yy_ch_buf of the start of
+ * the current run.
+ */
+ yy_bp = yy_cp;
+
+
+ /* Generate the code to find the start state. */
+
+
+ yy_current_state = (yy_start);
+
+ /* Set up for storing up states. */
+
+ (yy_state_ptr) = (yy_state_buf);
+ *(yy_state_ptr)++ = yy_current_state;
+
+
+
+
+ yy_match:
+ /* Generate the code to find the next match. */
+
+
+
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK /*LINTED*/break;
-#endif
-#define YY_RULE_SETUP \
- YY_USER_ACTION
-/** The main scanner function which does all the work.
- */
-YY_DECL
-{
- yy_state_type yy_current_state;
- char *yy_cp, *yy_bp;
- int yy_act;
-
- if ( !(yy_init) )
- {
- (yy_init) = 1;
+ do {
+
+ int yy_c = *(yy_ec+YY_SC_TO_UI(*yy_cp));
+ /* Save the backing-up info \before/ computing the next state
+ * because we always compute one more state than needed - we
+ * always proceed until we reach a jam state
+ */
+
-#ifdef YY_USER_INIT
- YY_USER_INIT;
-#endif
- /* Create the reject buffer large enough to save one state per allowed character. */
- if ( ! (yy_state_buf) )
- (yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE );
- if ( ! (yy_state_buf) )
- YY_FATAL_ERROR( "out of dynamic memory in yylex()" );
- if ( ! (yy_start) )
- (yy_start) = 1; /* first start state */
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) {
+ yy_current_state = (int) yy_def[yy_current_state];
- if ( ! yyin )
- yyin.rdbuf(std::cin.rdbuf());
- if ( ! yyout )
- yyout.rdbuf(std::cout.rdbuf());
+ /* We've arranged it so that templates are never chained
+ * to one another. This means we can afford to make a
+ * very simple test to see if we need to convert to
+ * yy_c's meta-equivalence class without worrying
+ * about erroneously looking up the meta-equivalence
+ * class twice
+ */
- if ( ! YY_CURRENT_BUFFER ) {
- yyensure_buffer_stack ();
- YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer( yyin, YY_BUF_SIZE );
+ /* lastdfa + 2 == YY_JAMSTATE + 1 is the beginning of the templates */
+ if (yy_current_state >= YY_JAMSTATE + 1) {
+ yy_c = yy_meta[yy_c];
}
- yy_load_buffer_state( );
- }
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
- {
- while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
- {
- (yy_more_len) = 0;
- if ( (yy_more_flag) )
- {
- (yy_more_len) = (int) ((yy_c_buf_p) - (yytext_ptr));
- (yy_more_flag) = 0;
- }
- yy_cp = (yy_c_buf_p);
+ *(yy_state_ptr)++ = yy_current_state;
+ ++yy_cp;
- /* Support of yytext. */
- *yy_cp = (yy_hold_char);
+ }
+
+ while ( yy_current_state != YY_JAMSTATE );
- /* yy_bp points to the position in yy_ch_buf of the start of
- * the current run.
- */
- yy_bp = yy_cp;
- yy_current_state = (yy_start);
- (yy_state_ptr) = (yy_state_buf);
- *(yy_state_ptr)++ = yy_current_state;
-yy_match:
- do
- {
- YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 124 )
- yy_c = yy_meta[yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
- *(yy_state_ptr)++ = yy_current_state;
- ++yy_cp;
- }
- while ( yy_base[yy_current_state] != 323 );
+ yy_find_action:
+ /* code to find the action number goes here */
+
+
-yy_find_action:
- yy_current_state = *--(yy_state_ptr);
- (yy_lp) = yy_accept[yy_current_state];
+ yy_current_state = *--(yy_state_ptr);
+ (yy_lp) = yy_accept[yy_current_state];
find_rule: /* we branch to this label when backing up */
- for ( ; ; ) /* until we find what rule we matched */
- {
- if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
- {
- yy_act = yy_acclist[(yy_lp)];
- if ( yy_act & YY_TRAILING_HEAD_MASK ||
- (yy_looking_for_trail_begin) )
- {
- if ( yy_act == (yy_looking_for_trail_begin) )
- {
- (yy_looking_for_trail_begin) = 0;
- yy_act &= ~YY_TRAILING_HEAD_MASK;
- break;
+ for ( ; ; ) { /* loop until we find out what rule we matched */
+ if ((yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1]) {
+ yy_act = yy_acclist[(yy_lp)];
+
+ if ((yy_act & YY_TRAILING_HEAD_MASK) != 0 || (yy_looking_for_trail_begin)) {
+ if (yy_act == (yy_looking_for_trail_begin)) {
+ (yy_looking_for_trail_begin) = 0;
+ yy_act &= ~YY_TRAILING_HEAD_MASK;
+ break;
}
+ } else if (( yy_act & YY_TRAILING_MASK) != 0) {
+ (yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK;
+ (yy_looking_for_trail_begin) |= YY_TRAILING_HEAD_MASK;
+
+ } else {
+ (yy_full_match) = yy_cp;
+ (yy_full_state) = (yy_state_ptr);
+ (yy_full_lp) = (yy_lp);
+ break;
}
- else if ( yy_act & YY_TRAILING_MASK )
- {
- (yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK;
- (yy_looking_for_trail_begin) |= YY_TRAILING_HEAD_MASK;
- }
- else
- {
- (yy_full_match) = yy_cp;
- (yy_full_state) = (yy_state_ptr);
- (yy_full_lp) = (yy_lp);
- break;
- }
- ++(yy_lp);
+ ++(yy_lp);
goto find_rule;
+
+
}
- --yy_cp;
- yy_current_state = *--(yy_state_ptr);
- (yy_lp) = yy_accept[yy_current_state];
- }
- YY_DO_BEFORE_ACTION;
+ --yy_cp;
+
+ /* We could consolidate the following two lines with those at
+ * the beginning, but at the cost of complaints that we're
+ * branching inside a loop.
+ */
+ yy_current_state = *--(yy_state_ptr);
+ (yy_lp) = yy_accept[yy_current_state];
+ } /* close for */
+
-do_action: /* This label is used only to access EOF actions. */
- switch ( yy_act )
- { /* beginning of action switch */
-case 1:
+ YY_DO_BEFORE_ACTION;
+
+
+
+ do_action: /* This label is used only to access EOF actions. */
+
+
+
+ switch ( yy_act ) { /* beginning of action switch */
+
+/* %% [5.0] user actions get inserted here */
+ case 1:
YY_RULE_SETUP
+
{ BEGIN(Com); } /* start of comment - put the scanner in the "Com" state */
- YY_BREAK
-case 2:
+ /*LINTED*/break;
+ case 2:
YY_RULE_SETUP
+
{;} /* in comment, skip any characters except asterisk (and newline, handled by its own rule) */
- YY_BREAK
-case 3:
+ /*LINTED*/break;
+ case 3:
YY_RULE_SETUP
+
{;} /* in comment, skip any sequence of asterisks followed by other symbols (except slash or newline) */
- YY_BREAK
-case 4:
+ /*LINTED*/break;
+ case 4:
YY_RULE_SETUP
+
{ BEGIN(INITIAL); } /* end of comment - reset the scanner to initial state */
- YY_BREAK
-case 5:
+ /*LINTED*/break;
+ case 5:
YY_RULE_SETUP
+
{ BEGIN(Text); yymore(); } /* start of quoted text string - put the scanner in the "Text" state, but keep ' as part of yytext */
- YY_BREAK
-case 6:
+ /*LINTED*/break;
+ case 6:
/* rule 6 can match eol */
YY_RULE_SETUP
+
{ yymore(); yylineno ++; } /* newline in text string - increment line counter and keep collecting yytext */
- YY_BREAK
-case 7:
+ /*LINTED*/break;
+ case 7:
YY_RULE_SETUP
+
{ yymore(); } /* single ' inside text string - keep collecting yytext*/
- YY_BREAK
-case 8:
+ /*LINTED*/break;
+ case 8:
YY_RULE_SETUP
+
{ yymore(); } /* a sequence of any characters except ' and \n - keep collecting yytext */
- YY_BREAK
-case 9:
+ /*LINTED*/break;
+ case 9:
/* rule 9 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_bp + 1);
(yy_c_buf_p) = yy_cp = yy_bp + 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_DO_BEFORE_ACTION; /* set up yytext */
YY_RULE_SETUP
+
{ BEGIN(INITIAL); CreateNewText(YYText(),YYLeng()); SetTypeArg(Interface_ParamText); return(token::QUID); } /* end of string (apostrophe followed by comma or closing parenthesis) - reset the scanner to initial state, record the value of all yytext collected */
- YY_BREAK
-case 10:
+ /*LINTED*/break;
+ case 10:
YY_RULE_SETUP
+
{;}
- YY_BREAK
-case 11:
+ /*LINTED*/break;
+ case 11:
YY_RULE_SETUP
+
{;}
- YY_BREAK
-case 12:
+ /*LINTED*/break;
+ case 12:
/* rule 12 can match eol */
YY_RULE_SETUP
+
{ yylineno ++; } /* count lines (one rule for all start conditions) */
- YY_BREAK
-case 13:
+ /*LINTED*/break;
+ case 13:
YY_RULE_SETUP
+
{;} /* abv 30.06.00: for reading DOS files */
- YY_BREAK
-case 14:
+ /*LINTED*/break;
+ case 14:
YY_RULE_SETUP
+
{;} /* fix from C21. for test load e3i file with line 15 with null symbols */
- YY_BREAK
-case 15:
+ /*LINTED*/break;
+ case 15:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_DO_BEFORE_ACTION; /* set up yytext */
YY_RULE_SETUP
+
{ CreateNewText(YYText(),YYLeng()); return(token::ENTITY); }
- YY_BREAK
-case 16:
+ /*LINTED*/break;
+ case 16:
YY_RULE_SETUP
+
{ CreateNewText(YYText(),YYLeng()); return(token::ENTITY); }
- YY_BREAK
-case 17:
+ /*LINTED*/break;
+ case 17:
YY_RULE_SETUP
+
{ CreateNewText(YYText(),YYLeng()); return(token::IDENT); }
- YY_BREAK
-case 18:
+ /*LINTED*/break;
+ case 18:
YY_RULE_SETUP
+
{ CreateNewText(YYText(),YYLeng()); SetTypeArg(Interface_ParamInteger); return(token::QUID); }
- YY_BREAK
-case 19:
+ /*LINTED*/break;
+ case 19:
YY_RULE_SETUP
+
{ CreateNewText(YYText(),YYLeng()); SetTypeArg(Interface_ParamReal); return(token::QUID); }
- YY_BREAK
-case 20:
+ /*LINTED*/break;
+ case 20:
YY_RULE_SETUP
+
{ CreateNewText(YYText(),YYLeng()); SetTypeArg(Interface_ParamReal); return(token::QUID); }
- YY_BREAK
-case 21:
+ /*LINTED*/break;
+ case 21:
YY_RULE_SETUP
+
{ CreateNewText(YYText(),YYLeng()); SetTypeArg(Interface_ParamHexa); return(token::QUID); }
- YY_BREAK
-case 22:
+ /*LINTED*/break;
+ case 22:
YY_RULE_SETUP
+
{ CreateNewText(YYText(),YYLeng()); SetTypeArg(Interface_ParamEnum); return(token::QUID); }
- YY_BREAK
-case 23:
+ /*LINTED*/break;
+ case 23:
YY_RULE_SETUP
+
{ return ('('); }
- YY_BREAK
-case 24:
+ /*LINTED*/break;
+ case 24:
YY_RULE_SETUP
+
{ return (')'); }
- YY_BREAK
-case 25:
+ /*LINTED*/break;
+ case 25:
YY_RULE_SETUP
+
{ myDataModel->PrepareNewArg(); return (','); }
- YY_BREAK
-case 26:
+ /*LINTED*/break;
+ case 26:
YY_RULE_SETUP
+
{ CreateNewText(YYText(),YYLeng()); SetTypeArg(Interface_ParamVoid); return(token::QUID); }
- YY_BREAK
-case 27:
+ /*LINTED*/break;
+ case 27:
YY_RULE_SETUP
+
{ return ('='); }
- YY_BREAK
-case 28:
+ /*LINTED*/break;
+ case 28:
YY_RULE_SETUP
+
{ return (';'); }
- YY_BREAK
-case 29:
+ /*LINTED*/break;
+ case 29:
YY_RULE_SETUP
+
{ return(token::STEP); }
- YY_BREAK
-case 30:
+ /*LINTED*/break;
+ case 30:
YY_RULE_SETUP
+
{ return(token::HEADER); }
- YY_BREAK
-case 31:
+ /*LINTED*/break;
+ case 31:
YY_RULE_SETUP
+
{ return(token::ENDSEC); }
- YY_BREAK
-case 32:
+ /*LINTED*/break;
+ case 32:
YY_RULE_SETUP
+
{ return(token::DATA); }
- YY_BREAK
-case 33:
+ /*LINTED*/break;
+ case 33:
YY_RULE_SETUP
+
{ return(token::ENDSTEP);}
- YY_BREAK
-case 34:
+ /*LINTED*/break;
+ case 34:
YY_RULE_SETUP
+
{ return(token::ENDSTEP);}
- YY_BREAK
-case 35:
+ /*LINTED*/break;
+ case 35:
YY_RULE_SETUP
+
{ BEGIN(End); return(token::ENDSTEP); } /* at the end of the STEP data, enter dedicated start condition "End" to skip everything that follows */
- YY_BREAK
-case 36:
+ /*LINTED*/break;
+ case 36:
YY_RULE_SETUP
+
{ return(token::STEP); }
- YY_BREAK
-case 37:
+ /*LINTED*/break;
+ case 37:
YY_RULE_SETUP
+
{ return ('/'); }
- YY_BREAK
-case 38:
+ /*LINTED*/break;
+ case 38:
YY_RULE_SETUP
+
{ return(token::SCOPE); }
- YY_BREAK
-case 39:
+ /*LINTED*/break;
+ case 39:
YY_RULE_SETUP
+
{ return(token::ENDSCOPE); }
- YY_BREAK
-case 40:
+ /*LINTED*/break;
+ case 40:
YY_RULE_SETUP
+
{ CreateNewText(YYText(),YYLeng()); return(token::TYPE); }
- YY_BREAK
-case 41:
+ /*LINTED*/break;
+ case 41:
YY_RULE_SETUP
+
{ CreateNewText(YYText(),YYLeng()); return(token::TYPE); }
- YY_BREAK
-case 42:
+ /*LINTED*/break;
+ case 42:
/* rule 42 can match eol */
YY_RULE_SETUP
+
{ CreateNewText(YYText(),YYLeng()); SetTypeArg(Interface_ParamMisc); return(token::QUID); }
- YY_BREAK
-case 43:
+ /*LINTED*/break;
+ case 43:
YY_RULE_SETUP
+
{;} /* skip any characters (except newlines) */
- YY_BREAK
-case 44:
+ /*LINTED*/break;
+ case 44:
YY_RULE_SETUP
-YY_FATAL_ERROR( "flex scanner jammed" );
- YY_BREAK
- case YY_STATE_EOF(INITIAL):
- case YY_STATE_EOF(Com):
- case YY_STATE_EOF(End):
- case YY_STATE_EOF(Text):
- yyterminate();
-
- case YY_END_OF_BUFFER:
- {
- /* Amount of text matched not including the EOB char. */
- int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
-
- /* Undo the effects of YY_DO_BEFORE_ACTION. */
- *yy_cp = (yy_hold_char);
- YY_RESTORE_YY_MORE_OFFSET
-
- if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
- {
- /* We're scanning a new file or input source. It's
- * possible that this happened because the user
- * just pointed yyin at a new source and called
- * yylex(). If so, then we have to assure
- * consistency between YY_CURRENT_BUFFER and our
- * globals. Here is the right place to do so, because
- * this is the first action (other than possibly a
- * back-up) that will match for the new input source.
- */
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin.rdbuf();
- YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
- }
- /* Note that here we test for yy_c_buf_p "<=" to the position
- * of the first EOB in the buffer, since yy_c_buf_p will
- * already have been incremented past the NUL character
- * (since all states make transitions on EOB to the
- * end-of-buffer state). Contrast this with the test
- * in input().
- */
- if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
- { /* This was really a NUL. */
- yy_state_type yy_next_state;
+yyecho();
+ /*LINTED*/break;
+ case YY_STATE_EOF(INITIAL):
+ /* FALLTHROUGH */
+ case YY_STATE_EOF(Com):
+ /* FALLTHROUGH */
+ case YY_STATE_EOF(End):
+ /* FALLTHROUGH */
+ case YY_STATE_EOF(Text):
+ /* FALLTHROUGH */
+ yyterminate();
+
+ case YY_END_OF_BUFFER:
+ {
+ /* Amount of text matched not including the EOB char. */
+ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
+
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
+ *yy_cp = (yy_hold_char);
+ YY_RESTORE_YY_MORE_OFFSET
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) {
+ /* We're scanning a new file or input source. It's
+ * possible that this happened because the user
+ * just pointed yyin at a new source and called
+ * yylex(). If so, then we have to assure
+ * consistency between yy_current_buffer() and our
+ * globals. Here is the right place to do so, because
+ * this is the first action (other than possibly a
+ * back-up) that will match for the new input source.
+ */
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
- yy_current_state = yy_get_previous_state( );
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin.rdbuf();
- /* Okay, we're now positioned to make the NUL
- * transition. We couldn't have
- * yy_get_previous_state() go ahead and do it
- * for us because it doesn't know how to deal
- * with the possibility of jamming (and we don't
- * want to build jamming into it because then it
- * will run more slowly).
- */
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
+ }
- yy_next_state = yy_try_NUL_trans( yy_current_state );
+ /* Note that here we test for yy_c_buf_p "<=" to the position
+ * of the first EOB in the buffer, since yy_c_buf_p will
+ * already have been incremented past the NUL character
+ * (since all states make transitions on EOB to the
+ * end-of-buffer state). Contrast this with the test
+ * in input().
+ */
+ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */
+ yy_state_type yy_next_state;
+
+ (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state( );
+
+ /* Okay, we're now positioned to make the NUL
+ * transition. We couldn't have
+ * yy_get_previous_state() go ahead and do it
+ * for us because it doesn't know how to deal
+ * with the possibility of jamming (and we don't
+ * want to build jamming into it because then it
+ * will run more slowly).
+ */
- yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ yy_next_state = yy_try_NUL_trans( yy_current_state );
- if ( yy_next_state )
- {
- /* Consume the NUL. */
- yy_cp = ++(yy_c_buf_p);
- yy_current_state = yy_next_state;
- goto yy_match;
- }
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
- else
- {
- yy_cp = (yy_c_buf_p);
- goto yy_find_action;
- }
- }
+ if ( yy_next_state ) {
+ /* Consume the NUL. */
+ yy_cp = ++(yy_c_buf_p);
+ yy_current_state = yy_next_state;
+ goto yy_match;
+ } else {
+
+
- else switch ( yy_get_next_buffer( ) )
- {
- case EOB_ACT_END_OF_FILE:
- {
- (yy_did_buffer_switch_on_eof) = 0;
-
- if ( yywrap( ) )
- {
- /* Note: because we've taken care in
- * yy_get_next_buffer() to have set up
- * yytext, we can now set up
- * yy_c_buf_p so that if some total
- * hoser (like flex itself) wants to
- * call the scanner after we return the
- * YY_NULL, it'll still work - another
- * YY_NULL will get returned.
- */
- (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
- yy_act = YY_STATE_EOF(YY_START);
- goto do_action;
- }
- else
- {
- if ( ! (yy_did_buffer_switch_on_eof) )
- YY_NEW_FILE;
- }
- break;
- }
+ /* Still need to initialize yy_cp, though
+ * yy_current_state was set up by
+ * yy_get_previous_state().
+ */
+ yy_cp = (yy_c_buf_p);
- case EOB_ACT_CONTINUE_SCAN:
- (yy_c_buf_p) =
- (yytext_ptr) + yy_amount_of_matched_text;
- yy_current_state = yy_get_previous_state( );
+ goto yy_find_action;
+ }
+ } else { /* not a NUL */
+ switch ( yy_get_next_buffer( ) ) {
+ case EOB_ACT_END_OF_FILE:
+ (yy_did_buffer_switch_on_eof) = 0;
+
+ if ( yywrap( ) ) {
+ /* Note: because we've taken care in
+ * yy_get_next_buffer() to have set up
+ * yytext, we can now set up
+ * yy_c_buf_p so that if some total
+ * hoser (like flex itself) wants to
+ * call the scanner after we return the
+ * YY_NULL, it'll still work - another
+ * YY_NULL will get returned.
+ */
+ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
+
+ yy_act = YY_STATE_EOF(yystart());
+ goto do_action;
+ } else {
+ if ( ! (yy_did_buffer_switch_on_eof) ) {
+ YY_NEW_FILE;
+ }
+ }
+ break;
+ case EOB_ACT_CONTINUE_SCAN:
+ (yy_c_buf_p) =
+ (yytext_ptr) + yy_amount_of_matched_text;
- yy_cp = (yy_c_buf_p);
- yy_bp = (yytext_ptr) + YY_MORE_ADJ;
- goto yy_match;
+ yy_current_state = yy_get_previous_state( );
- case EOB_ACT_LAST_MATCH:
- (yy_c_buf_p) =
- &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ goto yy_match;
- yy_current_state = yy_get_previous_state( );
+ case EOB_ACT_LAST_MATCH:
+ (yy_c_buf_p) =
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
- yy_cp = (yy_c_buf_p);
- yy_bp = (yytext_ptr) + YY_MORE_ADJ;
- goto yy_find_action;
- }
- break;
- }
+ yy_current_state = yy_get_previous_state( );
- default:
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--no action found" );
- } /* end of action switch */
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ goto yy_find_action;
+ default:
+ YY_FATAL_ERROR("unexpected return value from yy_get_next_buffer()");
+ } /* end EOB inner switch */
+ } /* end if */
+ break;
+ } /* case YY_END_OF_BUFFER */
+ default:
+ YY_FATAL_ERROR("fatal flex scanner internal error--no action found" );
+ } /* end of action switch */
} /* end of scanning one token */
} /* end of user's declarations */
} /* end of yylex */
+
+
/* The contents of this function are C++ specific, so the () macro is not used.
* This constructor simply maintains backward compatibility.
* DEPRECATED
/* The contents of this function are C++ specific, so the () macro is not used.
*/
-void yyFlexLexer::ctor_common()
-{
+void yyFlexLexer::ctor_common() {
yy_c_buf_p = 0;
yy_init = 0;
yy_start = 0;
- yy_flex_debug = 0;
+ yyflexdebug = 0;
yylineno = 1; // this will only get updated if %option yylineno
yy_did_buffer_switch_on_eof = 0;
yy_buffer_stack_top = 0;
yy_buffer_stack_max = 0;
+
+
yy_state_buf = new yy_state_type[YY_STATE_BUF_SIZE];
+ yy_state_buf_max = YY_STATE_BUF_SIZE;
}
/* The contents of this function are C++ specific, so the () macro is not used.
*/
-yyFlexLexer::~yyFlexLexer()
-{
+yyFlexLexer::~yyFlexLexer() {
delete [] yy_state_buf;
yyfree( yy_start_stack );
- yy_delete_buffer( YY_CURRENT_BUFFER );
+ yy_delete_buffer( yy_current_buffer() );
yyfree( yy_buffer_stack );
}
/* The contents of this function are C++ specific, so the () macro is not used.
*/
-void yyFlexLexer::switch_streams( std::istream& new_in, std::ostream& new_out )
-{
+void yyFlexLexer::switch_streams( std::istream& new_in, std::ostream& new_out ) {
// was if( new_in )
yy_delete_buffer( YY_CURRENT_BUFFER );
yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) );
int yyFlexLexer::LexerInput( char* buf, int max_size )
#endif
{
- if ( yyin.eof() || yyin.fail() )
+ if ( yyin.eof() || yyin.fail() ) {
return 0;
-
+ }
#ifdef YY_INTERACTIVE
yyin.get( buf[0] );
- if ( yyin.eof() )
+ if ( yyin.eof() ) {
return 0;
-
- if ( yyin.bad() )
+ }
+ if ( yyin.bad() ) {
return -1;
-
+ }
return 1;
#else
(void) yyin.read( buf, max_size );
- if ( yyin.bad() )
+ if ( yyin.bad() ) {
return -1;
- else
- return yyin.gcount();
+ } else {
+ return (int)yyin.gcount();
+ }
#endif
}
-void yyFlexLexer::LexerOutput( const char* buf, int size )
-{
+void yyFlexLexer::LexerOutput( const char* buf, int size ) {
(void) yyout.write( buf, size );
}
+
+
+
/* yy_get_next_buffer - try to read in a new buffer
*
* Returns a code representing an action:
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
+
+
int yyFlexLexer::yy_get_next_buffer()
+
{
- char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
char *source = (yytext_ptr);
int number_to_move, i;
int ret_val;
- if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--end of buffer missed" );
-
- if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
- { /* Don't try to fill the buffer, so this is an EOF. */
- if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
- {
+ if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) {
+ YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" );
+ }
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) {
+ /* Don't try to fill the buffer, so this is an EOF. */
+ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) {
/* We matched a single character, the EOB, so
* treat this as a final EOF.
*/
return EOB_ACT_END_OF_FILE;
- }
-
- else
- {
+ } else {
/* We matched some text prior to the EOB, first
* process it.
*/
return EOB_ACT_LAST_MATCH;
- }
}
+ }
/* Try to read more data. */
/* First move last chars to start of buffer. */
number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
- for ( i = 0; i < number_to_move; ++i )
+ for ( i = 0; i < number_to_move; ++i ) {
*(dest++) = *(source++);
-
- if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ }
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) {
/* don't do the read, it's not guaranteed to return an EOF,
* just force an EOF
*/
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
-
- else
- {
- int num_to_read =
+ } else {
+ int num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
- while ( num_to_read <= 0 )
- { /* Not enough room in the buffer - grow it. */
+ while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */
YY_FATAL_ERROR(
-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+"input buffer overflow, can't enlarge buffer because scanner uses yyreject()" );
- }
+ }
- if ( num_to_read > YY_READ_BUF_SIZE )
+ if ( num_to_read > YY_READ_BUF_SIZE ) {
num_to_read = YY_READ_BUF_SIZE;
-
+ }
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
(yy_n_chars), num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
- }
+ }
- if ( (yy_n_chars) == 0 )
- {
- if ( number_to_move == YY_MORE_ADJ )
- {
+ if ( (yy_n_chars) == 0 ) {
+ if ( number_to_move == YY_MORE_ADJ ) {
ret_val = EOB_ACT_END_OF_FILE;
yyrestart( yyin );
- }
-
- else
- {
+ } else {
ret_val = EOB_ACT_LAST_MATCH;
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
- }
}
-
- else
+ } else {
ret_val = EOB_ACT_CONTINUE_SCAN;
-
+ }
if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
- int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1) + 2;
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
(void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
- if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) {
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ }
/* "- 2" to take care of EOB's */
YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
}
return ret_val;
}
+
/* yy_get_previous_state - get the state just before the EOB char was reached */
- yy_state_type yyFlexLexer::yy_get_previous_state()
+
+
+yy_state_type yyFlexLexer::yy_get_previous_state()
+
{
yy_state_type yy_current_state;
char *yy_cp;
-
- yy_current_state = (yy_start);
+
+
+ /* Generate the code to find the start state. */
- (yy_state_ptr) = (yy_state_buf);
- *(yy_state_ptr)++ = yy_current_state;
- for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
- {
- YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 49);
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 124 )
- yy_c = yy_meta[yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
- *(yy_state_ptr)++ = yy_current_state;
+ yy_current_state = (yy_start);
+
+ /* Set up for storing up states. */
+
+ (yy_state_ptr) = (yy_state_buf);
+ *(yy_state_ptr)++ = yy_current_state;
+
+
+
+ for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) {
+ /* Generate the code to find the next state. */
+
+
+
+
+
+
+
+
+
+ int yy_c = (*yy_cp ? *(yy_ec+YY_SC_TO_UI(*yy_cp)) : YY_NUL_EC);
+ /* Save the backing-up info \before/ computing the next state
+ * because we always compute one more state than needed - we
+ * always proceed until we reach a jam state
+ */
+
+
+
+
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) {
+ yy_current_state = (int) yy_def[yy_current_state];
+
+
+ /* We've arranged it so that templates are never chained
+ * to one another. This means we can afford to make a
+ * very simple test to see if we need to convert to
+ * yy_c's meta-equivalence class without worrying
+ * about erroneously looking up the meta-equivalence
+ * class twice
+ */
+
+ /* lastdfa + 2 == YY_JAMSTATE + 1 is the beginning of the templates */
+ if (yy_current_state >= YY_JAMSTATE + 1) {
+ yy_c = yy_meta[yy_c];
}
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+
+
+
+
+
+
+ *(yy_state_ptr)++ = yy_current_state;
+ }
+
return yy_current_state;
}
+
/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
- yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
+
+
+yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
+
{
int yy_is_jam;
-
- YY_CHAR yy_c = 49;
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
+ /* Generate code for handling NUL's, if needed. */
+
+ /* First, deal with backing up and setting up yy_cp if the scanner
+ * finds that it should JAM on the NUL.
+ *
+ * Only generate a definition for "yy_cp" if we'll generate code
+ * that uses it. Otherwise lint and the like complain.
+ */
+
+
+
+
+
+
+
+
+
+
+
+
+ int yy_c = YY_NUL_EC;
+ /* Save the backing-up info \before/ computing the next state
+ * because we always compute one more state than needed - we
+ * always proceed until we reach a jam state
+ */
+
+
+
+
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) {
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 124 )
+
+
+ /* We've arranged it so that templates are never chained
+ * to one another. This means we can afford to make a
+ * very simple test to see if we need to convert to
+ * yy_c's meta-equivalence class without worrying
+ * about erroneously looking up the meta-equivalence
+ * class twice
+ */
+
+ /* lastdfa + 2 == YY_JAMSTATE + 1 is the beginning of the templates */
+ if (yy_current_state >= YY_JAMSTATE + 1) {
yy_c = yy_meta[yy_c];
}
+
+ }
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
- yy_is_jam = (yy_current_state == 123);
- if ( ! yy_is_jam )
+
+yy_is_jam = (yy_current_state == YY_JAMSTATE);
+
+ /* Only stack this state if it's a transition we
+ * actually make. If we stack it on a jam, then
+ * the state stack and yy_c_buf_p get out of sync.
+ */
+ if ( ! yy_is_jam ) {
*(yy_state_ptr)++ = yy_current_state;
+ }
+
+
+
+
- return yy_is_jam ? 0 : yy_current_state;
+
+
+ return yy_is_jam ? 0 : yy_current_state;
}
-#ifndef YY_NO_UNPUT
- void yyFlexLexer::yyunput( int c, char* yy_bp)
+
+
+
+
+void yyFlexLexer::yyunput_r( int c, char* yy_bp)
+
{
char *yy_cp;
-
- yy_cp = (yy_c_buf_p);
+
+ yy_cp = (yy_c_buf_p);
/* undo effects of setting up yytext */
*yy_cp = (yy_hold_char);
- if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
- { /* need to shift things up to make room */
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) {
+ /* need to shift things up to make room */
/* +2 for EOB chars. */
int number_to_move = (yy_n_chars) + 2;
char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
char *source =
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
- while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) {
*--dest = *--source;
-
+ }
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
(yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
- if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) {
YY_FATAL_ERROR( "flex scanner push-back overflow" );
}
+ }
*--yy_cp = (char) c;
+
+
(yytext_ptr) = yy_bp;
(yy_hold_char) = *yy_cp;
(yy_c_buf_p) = yy_cp;
}
-#endif
- int yyFlexLexer::yyinput()
+
+
+
+
+int yyFlexLexer::yyinput()
+
{
int c;
-
+
*(yy_c_buf_p) = (yy_hold_char);
- if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
- {
+ if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) {
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
- if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) {
/* This was really a NUL. */
*(yy_c_buf_p) = '\0';
-
- else
- { /* need more input */
+ } else {
+ /* need more input */
int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
++(yy_c_buf_p);
- switch ( yy_get_next_buffer( ) )
- {
- case EOB_ACT_LAST_MATCH:
- /* This happens because yy_g_n_b()
- * sees that we've accumulated a
- * token and flags that we need to
- * try matching the token before
- * proceeding. But for input(),
- * there's no matching to consider.
- * So convert the EOB_ACT_LAST_MATCH
- * to EOB_ACT_END_OF_FILE.
- */
-
- /* Reset buffer status. */
- yyrestart( yyin );
-
- /*FALLTHROUGH*/
+ switch ( yy_get_next_buffer( ) ) {
+ case EOB_ACT_LAST_MATCH:
+ /* This happens because yy_g_n_b()
+ * sees that we've accumulated a
+ * token and flags that we need to
+ * try matching the token before
+ * proceeding. But for input(),
+ * there's no matching to consider.
+ * So convert the EOB_ACT_LAST_MATCH
+ * to EOB_ACT_END_OF_FILE.
+ */
- case EOB_ACT_END_OF_FILE:
- {
- if ( yywrap( ) )
- return 0;
+ /* Reset buffer status. */
+ yyrestart( yyin );
- if ( ! (yy_did_buffer_switch_on_eof) )
- YY_NEW_FILE;
-#ifdef __cplusplus
- return yyinput();
-#else
- return input();
-#endif
- }
+ /*FALLTHROUGH*/
- case EOB_ACT_CONTINUE_SCAN:
- (yy_c_buf_p) = (yytext_ptr) + offset;
- break;
+ case EOB_ACT_END_OF_FILE:
+ if ( yywrap( ) ) {
+ return 0;
+ }
+ if ( ! (yy_did_buffer_switch_on_eof) ) {
+ YY_NEW_FILE;
}
+ return yyinput();
+
+ case EOB_ACT_CONTINUE_SCAN:
+ (yy_c_buf_p) = (yytext_ptr) + offset;
+ break;
+ default:
+ YY_FATAL_ERROR("unexpected return value from yy_get_next_buffer()");
}
}
+ }
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
*(yy_c_buf_p) = '\0'; /* preserve yytext */
(yy_hold_char) = *++(yy_c_buf_p);
+
+
+
+
+
return c;
}
+
/** Immediately switch to a different input stream.
* @param input_file A readable stream.
*
* @note This function does not reset the start condition to @c INITIAL .
*/
- void yyFlexLexer::yyrestart( std::istream& input_file )
+
+
+void yyFlexLexer::yyrestart( std::istream& input_file )
+
{
-
- if ( ! YY_CURRENT_BUFFER ){
- yyensure_buffer_stack ();
+
+ size_t new_size = 0;
+ yy_state_type *new_state_buf = 0;
+
+
+ if ( yy_current_buffer() == NULL ) {
+ yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer( yyin, YY_BUF_SIZE );
+ yy_create_buffer( yyin, YY_BUF_SIZE );
}
- yy_init_buffer( YY_CURRENT_BUFFER, input_file );
+ yy_init_buffer( YY_CURRENT_BUFFER_LVALUE, input_file );
yy_load_buffer_state( );
+
+
+ /* Ensure the reject state buffer is large enough.
+ */
+ if ( (yy_state_buf_max) < (yy_size_t) (yy_current_buffer()->yy_buf_size + YY_STATE_BUF_EXTRA_SPACE) ) {
+ new_size = yy_current_buffer()->yy_buf_size + YY_STATE_BUF_EXTRA_SPACE;
+ new_state_buf = (yy_state_type *)yyrealloc( (yy_state_buf), (new_size * sizeof(yy_state_type)) );
+
+ if ( new_state_buf == NULL ) {
+ YY_FATAL_ERROR( "out of dynamic memory in yylex()" );
+ }
+ else {
+ (yy_state_buf) = new_state_buf;
+ (yy_state_buf_max) = new_size;
+ }
+ }
+
+
+ /* We don't actually know whether we did this switch during
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
+ * to go ahead and always set it.
+ */
+ (yy_did_buffer_switch_on_eof) = 1;
}
+
/** Delegate to the new version that takes an istream reference.
* @param input_file A readable stream.
*
yyrestart( *input_file );
}
+
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
*
*/
- void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+
+
+void yyFlexLexer::yy_switch_to_buffer( yybuffer new_buffer )
+
{
-
+
+ size_t new_size = 0;
+ yy_state_type *new_state_buf = 0;
+
+
/* TODO. We should be able to replace this entire function body
* with
* yypop_buffer_state();
* yypush_buffer_state(new_buffer);
- */
+ */
yyensure_buffer_stack ();
- if ( YY_CURRENT_BUFFER == new_buffer )
+ if ( yy_current_buffer() == new_buffer ) {
return;
-
- if ( YY_CURRENT_BUFFER )
- {
+ }
+ if ( yy_current_buffer() ) {
/* Flush out information for old buffer. */
*(yy_c_buf_p) = (yy_hold_char);
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
- }
+ }
YY_CURRENT_BUFFER_LVALUE = new_buffer;
yy_load_buffer_state( );
+
+ /* Ensure the reject state buffer is large enough.
+ */
+ if ( (yy_state_buf_max) < (yy_size_t) (YY_CURRENT_BUFFER_LVALUE->yy_buf_size + YY_STATE_BUF_EXTRA_SPACE) ) {
+ new_size = YY_CURRENT_BUFFER_LVALUE->yy_buf_size + YY_STATE_BUF_EXTRA_SPACE;
+ new_state_buf = (yy_state_type *)yyrealloc( (yy_state_buf), (new_size * sizeof(yy_state_type)) );
+
+ if ( new_state_buf == NULL ) {
+ YY_FATAL_ERROR( "out of dynamic memory in yylex()" );
+ }
+ else {
+ (yy_state_buf) = new_state_buf;
+ (yy_state_buf_max) = new_size;
+ }
+ }
+
+
/* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe
(yy_did_buffer_switch_on_eof) = 1;
}
- void yyFlexLexer::yy_load_buffer_state()
+
+
+
+void yyFlexLexer::yy_load_buffer_state()
+
{
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+
+
yyin.rdbuf(YY_CURRENT_BUFFER_LVALUE->yy_input_file);
+
(yy_hold_char) = *(yy_c_buf_p);
}
*
* @return the allocated buffer state.
*/
- YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream& file, int size )
+
+
+yybuffer yyFlexLexer::yy_create_buffer( std::istream& file, int size )
+
{
- YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
- if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+ yybuffer b;
+ b = (yybuffer) yyalloc( sizeof( struct yy_buffer_state ) );
+ if ( b == NULL ) {
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+ }
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
- if ( ! b->yy_ch_buf )
+ if ( b->yy_ch_buf == NULL ) {
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
+ }
b->yy_is_our_buffer = 1;
yy_init_buffer( b, file );
return b;
}
+
/** Delegate creation of buffers to the new version that takes an istream reference.
* @param file A readable stream.
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
*
* @return the allocated buffer state.
*/
- YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size )
+yybuffer yyFlexLexer::yy_create_buffer( std::istream* file, int size )
{
return yy_create_buffer( *file, size );
}
+
/** Destroy the buffer.
* @param b a buffer created with yy_create_buffer()
*
*/
- void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )
-{
-
- if ( ! b )
- return;
- if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
- YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
- if ( b->yy_is_our_buffer )
- yyfree( (void *) b->yy_ch_buf );
+void yyFlexLexer::yy_delete_buffer( yybuffer b )
+{
+
+ if ( b == NULL ) {
+ return;
+ }
+ if ( b == yy_current_buffer() ) { /* Not sure if we should pop here. */
+ YY_CURRENT_BUFFER_LVALUE = (yybuffer) 0;
+ }
+ if ( b->yy_is_our_buffer ) {
+ yyfree( (void *) b->yy_ch_buf );
+ }
yyfree( (void *) b );
}
+
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
* such as during a yyrestart() or at EOF.
*/
- void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream& file )
+
+
+void yyFlexLexer::yy_init_buffer( yybuffer b, std::istream& file )
{
int oerrno = errno;
-
+
yy_flush_buffer( b );
+
+
b->yy_input_file = file.rdbuf();
- b->yy_fill_buffer = 1;
- /* If b is the current buffer, then yy_init_buffer was _probably_
- * called from yyrestart() or through yy_get_next_buffer.
- * In that case, we don't want to reset the lineno or column.
- */
- if (b != YY_CURRENT_BUFFER){
- b->yy_bs_lineno = 1;
- b->yy_bs_column = 0;
- }
+
+ /* b->yy_input_file should never by NULL but we'll handle it cleanly
+ * on the off chance.
+ */
+ if (b->yy_input_file == NULL){
+ b->yy_fill_buffer = 0;
+ } else {
+ b->yy_fill_buffer = 1;
+ }
+
+
+
+ /* If b is the current buffer, then yy_init_buffer was _probably_
+ * called from yyrestart() or through yy_get_next_buffer.
+ * In that case, we don't want to reset the lineno or column.
+ */
+ if (b != yy_current_buffer()) {
+ b->yy_bs_lineno = 1;
+ b->yy_bs_column = 0;
+ }
+
+
b->yy_is_interactive = 0;
+
errno = oerrno;
}
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
- * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ * @param b the buffer state to be flushed, usually @c yy_current_buffer().
*
*/
- void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )
+
+
+void yyFlexLexer::yy_flush_buffer( yybuffer b )
+
{
- if ( ! b )
+ if ( b == NULL ) {
return;
-
+ }
b->yy_n_chars = 0;
/* We always need two end-of-buffer characters. The first causes
b->yy_buf_pos = &b->yy_ch_buf[0];
- b->yy_at_bol = 1;
+ b->yyatbol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
- if ( b == YY_CURRENT_BUFFER )
+ if ( b == yy_current_buffer() ) {
yy_load_buffer_state( );
+ }
}
/** Pushes the new state onto the stack. The new state becomes
* @param new_buffer The new state.
*
*/
-void yyFlexLexer::yypush_buffer_state (YY_BUFFER_STATE new_buffer)
+
+
+void yyFlexLexer::yypush_buffer_state (yybuffer new_buffer)
+
{
- if (new_buffer == NULL)
+ if (new_buffer == NULL) {
return;
-
+ }
yyensure_buffer_stack();
/* This block is copied from yy_switch_to_buffer. */
- if ( YY_CURRENT_BUFFER )
- {
+ if ( yy_current_buffer() != NULL ) {
/* Flush out information for old buffer. */
*(yy_c_buf_p) = (yy_hold_char);
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
- }
+ }
/* Only push if top exists. Otherwise, replace top. */
- if (YY_CURRENT_BUFFER)
+ if (yy_current_buffer()) {
(yy_buffer_stack_top)++;
+ }
YY_CURRENT_BUFFER_LVALUE = new_buffer;
/* copied from yy_switch_to_buffer. */
(yy_did_buffer_switch_on_eof) = 1;
}
+
/** Removes and deletes the top of the stack, if present.
* The next element becomes the new top.
*
*/
+
+
void yyFlexLexer::yypop_buffer_state (void)
+
{
- if (!YY_CURRENT_BUFFER)
+ if (yy_current_buffer() == NULL) {
return;
-
- yy_delete_buffer(YY_CURRENT_BUFFER );
+ }
+ yy_delete_buffer(yy_current_buffer() );
YY_CURRENT_BUFFER_LVALUE = NULL;
- if ((yy_buffer_stack_top) > 0)
+ if ((yy_buffer_stack_top) > 0) {
--(yy_buffer_stack_top);
-
- if (YY_CURRENT_BUFFER) {
+ }
+ if (yy_current_buffer() != NULL) {
yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
}
+
/* Allocates the stack if it does not exist.
* Guarantees space for at least one push.
*/
+
+
void yyFlexLexer::yyensure_buffer_stack(void)
+
{
yy_size_t num_to_alloc;
-
- if (!(yy_buffer_stack)) {
-
+
+ if ((yy_buffer_stack) == NULL) {
/* First allocation is just for 2 elements, since we don't know if this
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
- */
- num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
+ */
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
- if ( ! (yy_buffer_stack) )
+ if ( (yy_buffer_stack == NULL) ) {
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+ }
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
return;
}
- if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
-
+ if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1) {
/* Increase the buffer to prepare for a possible push. */
yy_size_t grow_size = 8 /* arbitrary grow size */;
((yy_buffer_stack),
num_to_alloc * sizeof(struct yy_buffer_state*)
);
- if ( ! (yy_buffer_stack) )
+ if ((yy_buffer_stack) == NULL) {
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
-
+ }
/* zero only the new slots.*/
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
(yy_buffer_stack_max) = num_to_alloc;
}
}
- void yyFlexLexer::yy_push_state( int _new_state )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+void yyFlexLexer::yy_push_state( int _new_state )
+
{
- if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
- {
+ if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) ) {
yy_size_t new_size;
(yy_start_stack_depth) += YY_START_STACK_INCR;
new_size = (yy_size_t) (yy_start_stack_depth) * sizeof( int );
- if ( ! (yy_start_stack) )
+ if ( ! (yy_start_stack) ) {
(yy_start_stack) = (int *) yyalloc( new_size );
- else
+ } else {
(yy_start_stack) = (int *) yyrealloc(
(void *) (yy_start_stack), new_size );
-
- if ( ! (yy_start_stack) )
+ }
+ if ( ! (yy_start_stack) ) {
YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
}
+ }
+ (yy_start_stack)[(yy_start_stack_ptr)++] = yystart();
- (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;
-
- BEGIN(_new_state);
+ yybegin(_new_state);
}
- void yyFlexLexer::yy_pop_state()
-{
- if ( --(yy_start_stack_ptr) < 0 )
- YY_FATAL_ERROR( "start-condition stack underflow" );
- BEGIN((yy_start_stack)[(yy_start_stack_ptr)]);
-}
- int yyFlexLexer::yy_top_state()
+
+
+
+void yyFlexLexer::yy_pop_state()
+
{
- return (yy_start_stack)[(yy_start_stack_ptr) - 1];
+ if ( --(yy_start_stack_ptr) < 0 ) {
+ YY_FATAL_ERROR( "start-condition stack underflow" );
+ }
+ yybegin((yy_start_stack)[(yy_start_stack_ptr)]);
}
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-void yyFlexLexer::LexerError( const char* msg )
+
+
+
+
+int yyFlexLexer::yy_top_state()
+
{
- std::cerr << msg << std::endl;
- exit( YY_EXIT_FAILURE );
+ return (yy_start_stack_ptr) > 0 ? (yy_start_stack)[(yy_start_stack_ptr) - 1] : yystart();
}
+
/* Redefine yyless() so it works in section 3 code. */
#undef yyless
#define yyless(n) \
- do \
- { \
+ do { \
/* Undo effects of setting up yytext. */ \
- int yyless_macro_arg = (n); \
- YY_LESS_LINENO(yyless_macro_arg);\
- yytext[yyleng] = (yy_hold_char); \
- (yy_c_buf_p) = yytext + yyless_macro_arg; \
- (yy_hold_char) = *(yy_c_buf_p); \
- *(yy_c_buf_p) = '\0'; \
- yyleng = yyless_macro_arg; \
- } \
- while ( 0 )
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ yytext[yyleng] = (yy_hold_char); \
+ (yy_c_buf_p) = yytext + yyless_macro_arg; \
+ (yy_hold_char) = *(yy_c_buf_p); \
+ *(yy_c_buf_p) = '\0'; \
+ yyleng = yyless_macro_arg; \
+ } while ( 0 )
+
+
/* Accessor methods (get/set functions) to struct members. */
+
+
+
+
+
+
+
+
+
+
+
/*
* Internal utility routines.
*/
+
+
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, const char * s2, int n )
-{
+static void yy_flex_strncpy (char* s1, const char * s2, int n ) {
int i;
- for ( i = 0; i < n; ++i )
+ for ( i = 0; i < n; ++i ) {
s1[i] = s2[i];
+ }
}
#endif
+
+
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (const char * s )
{
}
#endif
-#define YYTABLES_NAME "yytables"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#include <Standard.hxx>
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.
-// 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
// 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
#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)
parser::syntax_error::~syntax_error () YY_NOEXCEPT YY_NOTHROW
{}
- /*---------------.
- | symbol kinds. |
- `---------------*/
+ /*---------.
+ | symbol. |
+ `---------*/
// basic_symbol.
template <typename Base>
{}
template <typename Base>
- parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, YY_RVREF (semantic_type) v)
+ parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, YY_RVREF (value_type) v)
: Base (t)
, value (YY_MOVE (v))
{}
+
template <typename Base>
parser::symbol_kind_type
parser::basic_symbol<Base>::type_get () const YY_NOEXCEPT
return this->kind ();
}
+
template <typename Base>
bool
parser::basic_symbol<Base>::empty () const YY_NOEXCEPT
}
// 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;
}
return kind_;
}
+
parser::symbol_kind_type
parser::by_kind::type_get () const YY_NOEXCEPT
{
}
+
// by_state.
parser::by_state::by_state () YY_NOEXCEPT
: state (empty_state)
YY_SYMBOL_PRINT (yymsg, yysym);
// User destructor.
- YYUSE (yysym.kind ());
+ YY_USE (yysym.kind ());
}
#if YYDEBUG
parser::yy_print_ (std::ostream& yyo, const basic_symbol<Base>& yysym) const
{
std::ostream& yyoutput = yyo;
- YYUSE (yyoutput);
+ YY_USE (yyoutput);
if (yysym.empty ())
yyo << "empty symbol";
else
symbol_kind_type yykind = yysym.kind ();
yyo << (yykind < YYNTOKENS ? "token" : "nterm")
<< ' ' << yysym.name () << " (";
- YYUSE (yykind);
+ YY_USE (yykind);
yyo << ')';
}
}
}
void
- parser::yypop_ (int n)
+ parser::yypop_ (int n) YY_NOEXCEPT
{
yystack_.pop (n);
}
}
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_;
}
// 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]))
+
+
+
int
parser::yy_syntax_error_arguments_ (const context& yyctx,
symbol_kind_type yyarg[], int yyargn) const
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
};
#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.
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;
}
-// 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
// 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
/* 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
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
};
/// 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;
typedef Base super_type;
/// Default constructor.
- basic_symbol ()
+ basic_symbol () YY_NOEXCEPT
: value ()
{}
/// 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 ()
clear ();
}
+
+
/// Destroy contents, and record that is empty.
- void clear ()
+ void clear () YY_NOEXCEPT
{
Base::clear ();
}
void move (basic_symbol& s);
/// The semantic value.
- semantic_type value;
+ value_type value;
private:
#if YY_CPLUSPLUS < 201103L
/// Type access provider for token (enum) based symbols.
struct by_kind
{
+ /// The symbol kind as needed by the constructor.
+ typedef token_kind_type kind_type;
+
/// Default constructor.
- by_kind ();
+ by_kind () YY_NOEXCEPT;
#if 201103L <= YY_CPLUSPLUS
/// Move constructor.
- by_kind (by_kind&& that);
+ by_kind (by_kind&& that) YY_NOEXCEPT;
#endif
/// Copy constructor.
- by_kind (const by_kind& that);
-
- /// The symbol kind as needed by the constructor.
- typedef token_kind_type kind_type;
+ 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);
{
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).
/// 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);
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_[];
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)
{}
class slice
{
public:
- slice (const stack& stack, index_type range)
+ slice (const stack& stack, index_type range) YY_NOEXCEPT
: stack_ (stack)
, range_ (range)
{}
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