Borderbasix

Classes | Macros | Typedefs | Enumerations | Functions
parser.hpp File Reference
#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
#include <complex>
#include <limits>
#include "lex.yy.c"
#include <stddef.h>

Go to the source code of this file.

Classes

struct  bool2type< bool >
 
union  yyalloc
 
struct  parser< VALUE, MONOM, MPOLY >
 Parser for polynomials. More...
 
struct  parser< VALUE, MONOM, MPOLY >::YYSTYPE
 

Macros

#define YYBISON   1
 
#define YYBISON_VERSION   "3.0"
 
#define YYSKELETON_NAME   "yacc.c"
 
#define YYPURE   0
 
#define YYPUSH   0
 
#define YYPULL   1
 
#define YYERROR_VERBOSE   0
 
#define YY_YY_PARSER_TAB_H_INCLUDED
 
#define YYDEBUG   0
 
#define YYTOKENTYPE
 
#define YYSIZE_T   size_t
 
#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)
 
#define YY_(Msgid)   Msgid
 
#define __attribute__(Spec)   /* empty */
 
#define YYUSE(E)   ((void) (E))
 
#define YY_INITIAL_VALUE(Value)   Value
 
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
 
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
 
#define YYSTACK_ALLOC   YYMALLOC
 
#define YYSTACK_FREE   YYFREE
 
#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM
 
#define YYMALLOC   malloc
 
#define YYFREE   free
 
#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)
 
#define YYSTACK_BYTES(N)
 
#define YYCOPY_NEEDED   1
 
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
 
#define YYCOPY(Dst, Src, Count)
 
#define YYFINAL   12
 
#define YYLAST   27
 
#define YYNTOKENS   18
 
#define YYNNTS   6
 
#define YYNRULES   13
 
#define YYNSTATES   23
 
#define YYUNDEFTOK   2
 
#define YYMAXUTOK   272
 
#define YYTRANSLATE(YYX)   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
#define YYPACT_NINF   -8
 
#define yypact_value_is_default(Yystate)   (!!((Yystate) == (-8)))
 
#define YYTABLE_NINF   -1
 
#define yytable_value_is_error(Yytable_value)   0
 
#define yyerrok   (yyerrstatus = 0)
 
#define yyclearin   (yychar = YYEMPTY)
 
#define YYEMPTY   (-2)
 
#define YYEOF   0
 
#define YYACCEPT   goto yyacceptlab
 
#define YYABORT   goto yyabortlab
 
#define YYERROR   goto yyerrorlab
 
#define YYRECOVERING()   (!!yyerrstatus)
 
#define YYBACKUP(Token, Value)
 
#define YYTERROR   1
 
#define YYERRCODE   256
 
#define YYDPRINTF(Args)
 
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
 
#define YY_STACK_PRINT(Bottom, Top)
 
#define YY_REDUCE_PRINT(Rule)
 
#define YYINITDEPTH   200
 
#define YYMAXDEPTH   10000
 
#define YYSTYPE_IS_TRIVIAL   1
 
#define YYSTYPE_IS_DECLARED   1
 
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
 

Typedefs

typedef unsigned char yytype_uint8
 
typedef signed char yytype_int8
 
typedef unsigned short int yytype_uint16
 
typedef short int yytype_int16
 

Enumerations

enum  yytokentype {
  TXVAR = 258, TVALUE = 259, TMUL = 260, TDIV = 261,
  TPLUS = 262, TMINUS = 263, TLPAREN = 264, TRPAREN = 265,
  TPOW = 266, TEND = 267, TCOMMA = 268, TEXP = 269,
  UMINUS = 270, EXP = 271, CPLX = 272
}
 

Functions

template<typename T >
T * from_string_impl (std::string &s, bool2type< true >)
 
template<typename T >
T * from_string_impl (std::string &s, bool2type< false >)
 
template<class T >
T * from_string (std::string s)
 
template<>
std::complex< double > * from_string (std::string s)
 
template<>
std::complex< long double > * from_string (std::string s)
 
voidmalloc (YYSIZE_T)
 
void free (void *)
 

Macro Definition Documentation

#define __attribute__ (   Spec)    /* empty */
#define YY_ (   Msgid)    Msgid
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
#define YY_INITIAL_VALUE (   Value)    Value
#define YY_REDUCE_PRINT (   Rule)
#define YY_STACK_PRINT (   Bottom,
  Top 
)
#define YY_SYMBOL_PRINT (   Title,
  Type,
  Value,
  Location 
)
#define YY_YY_PARSER_TAB_H_INCLUDED
#define YYABORT   goto yyabortlab
#define YYACCEPT   goto yyacceptlab
#define YYBACKUP (   Token,
  Value 
)
Value:
if (yychar == YYEMPTY) \
{ \
yychar = (Token); \
yylval = (Value); \
YYPOPSTACK (yylen); \
yystate = *yyssp; \
goto yybackup; \
} \
else \
{ \
yyerror (YY_("syntax error: cannot back up")); \
} \
while (0)
#define YYPOPSTACK(N)
char * yylval
if(!(yy_init))
Definition: lex.mpoly.c:689
#define YY_(Msgid)
Definition: parser.hpp:242
while(1)
Definition: lex.mpoly.c:715
#define YYERROR
Definition: parser.hpp:585
#define YYEMPTY
Definition: parser.hpp:580
#define YYBISON   1
#define YYBISON_VERSION   "3.0"
#define yyclearin   (yychar = YYEMPTY)
#define YYCOPY (   Dst,
  Src,
  Count 
)
Value:
do \
{ \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
while (0)
while(1)
Definition: lex.mpoly.c:715
#define YYSIZE_T
Definition: parser.hpp:226
#define YYCOPY_NEEDED   1
#define YYDEBUG   0
#define YYDPRINTF (   Args)
#define YYEMPTY   (-2)
#define YYEOF   0
#define YYERRCODE   256
#define yyerrok   (yyerrstatus = 0)
#define YYERROR   goto yyerrorlab
#define YYERROR_VERBOSE   0
#define YYFINAL   12
#define YYFREE   free
#define YYINITDEPTH   200
#define YYLAST   27
#define YYMALLOC   malloc
#define YYMAXDEPTH   10000
#define YYMAXUTOK   272
#define YYNNTS   6
#define YYNRULES   13
#define YYNSTATES   23
#define YYNTOKENS   18
#define YYPACT_NINF   -8
#define yypact_value_is_default (   Yystate)    (!!((Yystate) == (-8)))
#define YYPOPSTACK (   N)    (yyvsp -= (N), yyssp -= (N))
#define YYPULL   1
#define YYPURE   0
#define YYPUSH   0
#define YYRECOVERING ( )    (!!yyerrstatus)
#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)
#define YYSIZE_T   size_t
#define YYSKELETON_NAME   "yacc.c"
#define YYSTACK_ALLOC   YYMALLOC
#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM
#define YYSTACK_BYTES (   N)
Value:
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
#define YYSTACK_GAP_MAXIMUM
Definition: parser.hpp:361
short int yytype_int16
Definition: parser.hpp:216
#define YYSTACK_FREE   YYFREE
#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)
#define YYSTACK_RELOCATE (   Stack_alloc,
  Stack 
)
Value:
do \
{ \
YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
while (0)
#define YYSTACK_GAP_MAXIMUM
Definition: parser.hpp:361
while(1)
Definition: lex.mpoly.c:715
#define YYCOPY(Dst, Src, Count)
Definition: parser.hpp:397
#define YYSIZE_T
Definition: parser.hpp:226
#define YYSTYPE_IS_DECLARED   1
#define YYSTYPE_IS_TRIVIAL   1
#define YYTABLE_NINF   -1
#define yytable_value_is_error (   Yytable_value)    0
#define YYTERROR   1
#define YYTOKENTYPE
#define YYTRANSLATE (   YYX)    ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
#define YYUNDEFTOK   2
#define YYUSE (   E)    ((void) (E))

Typedef Documentation

typedef short int yytype_int16
typedef signed char yytype_int8
typedef unsigned short int yytype_uint16
typedef unsigned char yytype_uint8

Enumeration Type Documentation

Enumerator
TXVAR 
TVALUE 
TMUL 
TDIV 
TPLUS 
TMINUS 
TLPAREN 
TRPAREN 
TPOW 
TEND 
TCOMMA 
TEXP 
UMINUS 
EXP 
CPLX 

Function Documentation

void free ( void )
template<class T >
T* from_string ( std::string  s)
template<>
std::complex<double>* from_string ( std::string  s)
template<>
std::complex<long double>* from_string ( std::string  s)
template<typename T >
T* from_string_impl ( std::string &  s,
bool2type< true >   
)
template<typename T >
T* from_string_impl ( std::string &  s,
bool2type< false >   
)
void* malloc ( YYSIZE_T  )
Home  |  Download & InstallContributions